Commit d135ad6
feat: critical per-page defects, agent-native audit output (2.0.0) (#44)
* feat: surface critical per-page defects, make audit output agent-native (2.0.0)
Resolves #42. Binary structural defects (an H1 count other than one, a
missing <title>, a missing meta description) were detected per page but
lost in sitemap aggregation: prioritizedFixes ranked by prevalence only,
the factor score averaged them away to a passing grade, and
crossCuttingIssues was keyed by factor. A homepage split across four H1s
appeared nowhere in the summary.
- Detect critical defects straight from the DOM, independent of scoring,
so no existing score, grade, or exit code changes. New criticalDefects
rollup on sitemap/static reports plus a Critical Defects section in the
text and markdown output, grouped by defect with every affected page
named (homepage and high sitemap-priority pages first). Shown even with
--top-issues.
- Make the output agent-native: prioritizedFixes is now a structured
PrioritizedFix[] (stable id, kind, severity, full affectedPages,
affectsHomepage, prevalencePct, summary) instead of prose strings, and
every report carries a schemaVersion so parsers detect shape drift.
- No truncation in the end-of-report sections: every issue and every
affected page is listed.
BREAKING CHANGE: SitemapAuditReport.prioritizedFixes is now PrioritizedFix[]
(read .summary for the previous one-liner); reports gain a required
schemaVersion field. Bumped to 2.0.0.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat: add --format agent, a slim agent-native decision output
Returns { schemaVersion, tool, mode, url, score, grade, pass,
criticalDefectCount, issues } as JSON, where issues is the ranked
PrioritizedFix[] and the per-factor/per-page detail is omitted, so an
agent can act on the decision without averaging and re-ranking scores.
Single-page reuses the sitemap critical-defect and cross-cutting
aggregation over a one-page site; --detect-platform falls back to JSON.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat: stable codes on every finding (2.1.0) (#45)
* feat: add stable codes to every finding (2.1.0)
Every AuditFinding now carries a `code` namespaced as
<factor-id>.<check>[.<variant>] (e.g. technical-seo.h1.multiple), so
agents and integrations key on a stable machine identifier instead of
regex-matching the human message (which can change between releases).
212 codes across all 19 analyzers; the registry is in
docs/finding-codes.md. `code` is required on AuditFinding, so the
compiler guarantees coverage, and a test enforces the convention and
global uniqueness.
hasMissingMetaDescription (the --require-meta gate) now keys on the
technical-seo.meta-description.missing code rather than a message prefix
— the first consumer migrated to codes. schemaVersion bumped to 1.1
(additive: findings gained the code field).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* docs: correct schemaVersion example value to 1.1
The api.md runSitemapAudit example printed '1.0', but SCHEMA_VERSION
was bumped to '1.1' in 2.1.0. Align the doc with the actual value.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix: cross-cutting reach unions all recommendations, not just the top
buildPrioritizedFixes derived a cross-cutting fix's affectedPages,
prevalencePct, and affectsHomepage from only the top recommendation's
affectedUrls. The entry is identified by the factor (factorId /
factorName), so its reach must cover the whole factor: a homepage hit
only by a secondary recommendation read as affectsHomepage=false, and
prevalence undercounted. Union every recommendation's pages instead,
sorted homepage-first, so the three fields stay consistent and
factor-level. Adds a regression test.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent c71e743 commit d135ad6
43 files changed
Lines changed: 1808 additions & 229 deletions
File tree
- docs
- skills/aeo
- src
- analyzers
- formatters
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
3 | 25 | | |
4 | 26 | | |
5 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
39 | | - | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
44 | 56 | | |
45 | 57 | | |
46 | 58 | | |
| |||
55 | 67 | | |
56 | 68 | | |
57 | 69 | | |
| 70 | + | |
58 | 71 | | |
59 | 72 | | |
60 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
24 | 31 | | |
25 | 32 | | |
26 | 33 | | |
| |||
76 | 83 | | |
77 | 84 | | |
78 | 85 | | |
79 | | - | |
| 86 | + | |
80 | 87 | | |
81 | 88 | | |
82 | 89 | | |
| |||
92 | 99 | | |
93 | 100 | | |
94 | 101 | | |
| 102 | + | |
| 103 | + | |
95 | 104 | | |
96 | 105 | | |
97 | 106 | | |
| |||
184 | 193 | | |
185 | 194 | | |
186 | 195 | | |
187 | | - | |
| 196 | + | |
188 | 197 | | |
189 | 198 | | |
190 | 199 | | |
191 | 200 | | |
192 | 201 | | |
193 | 202 | | |
194 | | - | |
| 203 | + | |
195 | 204 | | |
196 | 205 | | |
197 | 206 | | |
| |||
0 commit comments