DOCS SMARTSPEC / OUTPUT FORMATS

Output Formats

Un audit, 7 modi di consumarlo. Sceglilo con --format (alias -f).

Riferimento rapido

Format Quando usarlo Tipica destinazione
consoleSmoke test rapidoTerminal
jsonPipeline + automationjq, dashboard, CI/CD
htmlReport clienteEmail, link condiviso
markdownDocumentation dropNotion, Linear, Obsidian
textLog human-readableEmail plain, log file
xmlIntegrazione enterpriseXML parser tooling
llmInput per AIClaude, ChatGPT, agenti

console default

Output minimale: score + numero di finding. È il default se non specifichi -f.

$ smartspec audit https://example.com -m 1
auditing https://example.com...
score: 59
findings: 23

Ideale in CI per check pass/fail veloce.

json -f json

AuditResult completo, indentazione 2 spazi. Lo schema include: startUrl, finalUrl, score, pagesScanned, findings[].

{
  "startUrl": "https://example.com",
  "finalUrl": "https://example.com/",
  "score": 59,
  "pagesScanned": 1,
  "findings": [
    {
      "id": "home::page-meta-desc-missing",
      "title": "No meta description",
      "severity": "warning",
      "category": "page",
      "evidence": "...",
      "recommendation": "...",
      ...
    }
  ]
}

Pipe in jq per estrarre quello che serve: jq '.findings[] | select(.severity == "critical")'.

html -f html

Report standalone con CSS inline. Pronto da inviare al cliente o caricare su S3/Netlify.

smartspec audit https://example.com -f html -o report.html
open report.html

Score colorato (verde/giallo/rosso), category scorecard, findings raggruppati per severity, link "fix it" per ogni finding.

markdown -f markdown

Markdown standard con summary table + sezioni per severity. Funziona su Notion, Linear, Obsidian.

# Audit report — https://example.com

**Score:** 59/100
**Pages scanned:** 1

## Summary

| Severity | Count |
|---|---:|
| Critical | 0 |
| Warnings | 7 |
| Info     | 6 |
| Passes   | 10 |

## Warnings (7)
### 1. No meta description
**Category:** `page` · **Effort:** low · **Confidence:** confirmed
...

text -f text

Plain text wrapped a 78 colonne. Per email plain, log file, postit incollati in chat.

AUDIT REPORT
============

Target:        https://example.com
Score:         59/100
Pages scanned: 1

SUMMARY
-------
  critical 0
  warning  7
  info     6
  pass     10

WARNINGS (7)
------------

[1] No meta description
    category: page  |  effort: low  |  confidence: confirmed
    Evidence:
    The meta description tag is empty or missing...

xml -f xml

XML 1.0 con prolog. Per integrazioni enterprise (tool che parsano XML strettamente).

<?xml version="1.0" encoding="UTF-8"?>
<auditReport>
  <startUrl>https://example.com</startUrl>
  <score>59</score>
  <pagesScanned>1</pagesScanned>
  <findings>
    <finding>
      <id>home::page-meta-desc-missing</id>
      <severity>warning</severity>
      <category>page</category>
      ...
    </finding>
  </findings>
</auditReport>

llm -f llm (consigliato per Claude/ChatGPT)

XML tag-based ottimizzato per essere parsato da un LLM. Include un blocco di istruzioni iniziale che prepara il modello al task. Attributi per dati corti, content per campi lunghi → token cost basso, struttura preservata.

You are given a technical SEO audit. Each finding has a severity
(critical|warning|info|pass), category, evidence, and recommendation.
Use this report to prioritize fixes, starting with critical issues.
The score is computed as pass / (pass + critical*3 + warning) * 100,
with info excluded.

<audit target="https://example.com" score="59" pages-scanned="1">
<finding severity="warning" category="page" effort="low" confidence="confirmed">
  <title>No meta description</title>
  <evidence>The meta description tag is empty or missing.</evidence>
  <recommendation>Add a <meta name="description"> of 140-160 chars...</recommendation>
</finding>
...
</audit>

Use case: pipe direttamente in Claude/Cursor/Windsurf per ottenere fix automatici, o usalo come input di un agente che applica le patch.

Salvataggio su file

Tutti i formati supportano -o <path> per scrivere su file invece di stdout.

smartspec audit https://example.com -f markdown -o report.md
smartspec audit https://example.com -f html -o /tmp/report.html
smartspec audit https://example.com -f json -o audit-$(date +%Y-%m-%d).json

Continua