forked from bchanot/claude
feat(seo/geo): projected code-only score + 17/20 trajectory, wired into client-handover
- Analyzers (seo/geo): every finding tagged fixable:code|user; mandatory projected axis+global scores (bundle fully applied), honest code ceiling, TRAJECTORY TO 17/20 block (ranked code fixes or ceiling + unlocking user actions) - /seo: §1 carries actual+projected columns + merged trajectory; console shows projected scores + trajectory one-liner - /geo: audit-end deliverables (HUMAN-ACTIONS.md, trajectory in report + console) even in conservative mode — parity with /seo - client-handover: fix loop breaks at code ceiling (score ≥ projected−0.2) instead of burning iterations on user-bound points; STEP 8 gate gains the code-ceiling pass (gap items land verbatim in client doc §5 with expected gains, explicit status in score table); §4 NAP table consumes NAP-KIT.md first; §5 consumes HUMAN-ACTIONS.md first; HANDOVER-ROADMAP splits CODE-BLOQUÉ vs CLIENT-BLOQUÉ
This commit is contained in:
@@ -367,11 +367,21 @@ iteration = 1
|
|||||||
while (audit == "SEO" ? (SCORE_SEO < 17 OR SCORE_GEO < 17) : score < 17) \
|
while (audit == "SEO" ? (SCORE_SEO < 17 OR SCORE_GEO < 17) : score < 17) \
|
||||||
and iteration ≤ MAX_ITERATIONS:
|
and iteration ≤ MAX_ITERATIONS:
|
||||||
re-dispatch the audit subagent with iteration context (see prompt below)
|
re-dispatch the audit subagent with iteration context (see prompt below)
|
||||||
re-parse score(s) from the updated audit file
|
re-parse score(s) AND projected code-only score(s) from the audit file
|
||||||
if no scores improved AND no files changed → break (no progress)
|
if no scores improved AND no files changed → break (no progress)
|
||||||
|
# Code-ceiling break: when the actual score has caught up with the
|
||||||
|
# projected code-only score (within 0.2), every remaining point is
|
||||||
|
# user-bound (GMB, citations, reviews, Wikidata…) — further code
|
||||||
|
# iterations are wasted. Break and let the STEP 8 gate arbitrate.
|
||||||
|
if score ≥ (projected_code − 0.2) → break (code ceiling reached)
|
||||||
iteration += 1
|
iteration += 1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The projected code-only scores come from the analyzers' mandatory
|
||||||
|
`TRAJECTORY TO 17/20` output (labeled `projeté code-only` in SEO.md §1 /
|
||||||
|
console). If no projected line is parseable, treat projected = 17
|
||||||
|
(legacy behavior: loop chases 17 blindly).
|
||||||
|
|
||||||
### Re-dispatch prompt template (SEO + GEO loop)
|
### Re-dispatch prompt template (SEO + GEO loop)
|
||||||
|
|
||||||
Send to `general-purpose` subagent:
|
Send to `general-purpose` subagent:
|
||||||
@@ -659,9 +669,29 @@ GEO than on SEO.
|
|||||||
|
|
||||||
### Gate rule
|
### Gate rule
|
||||||
|
|
||||||
Web: `ALL_PASS = (SEO_AFTER ≥ 17/20) AND (GEO_AFTER ≥ 17/20) AND (HARDEN_AFTER ≥ 17/20) AND (VALIDATE_AFTER ≥ 17/20 OR VALIDATE_SKIPPED)`
|
An axis PASSES if:
|
||||||
|
- `AFTER ≥ 17/20` (nominal), **OR**
|
||||||
|
- **code-ceiling pass**: `AFTER ≥ (PROJECTED_CODE − 0.2)` AND the
|
||||||
|
analyzer's trajectory names the residual gap as user-bound — i.e.
|
||||||
|
every code-fixable point has been taken and what remains (GMB,
|
||||||
|
citations, reviews, backlinks, Wikidata, AI-visibility outcomes) is
|
||||||
|
by definition the CLIENT's work, not the codebase's. In that case
|
||||||
|
the gap items MUST land verbatim in the client doc §5 ("Ce qui vous
|
||||||
|
reste à faire", sourced from `.claude/audits/HUMAN-ACTIONS.md`) with
|
||||||
|
their expected score gain — the deliverable ships with an honest
|
||||||
|
"here is what only you can unlock" section instead of being blocked
|
||||||
|
forever by points the code cannot reach.
|
||||||
|
|
||||||
Non-web: `ALL_PASS = (CSO_AFTER ≥ 17/20)`
|
Web: `ALL_PASS = PASS(SEO) AND PASS(GEO) AND PASS(HARDEN) AND (PASS(VALIDATE) OR VALIDATE_SKIPPED)`
|
||||||
|
|
||||||
|
Non-web: `ALL_PASS = PASS(CSO)`
|
||||||
|
|
||||||
|
HARDEN and VALIDATE have no user-bound axes (headers, markup, a11y are
|
||||||
|
all code/config) — for them the code-ceiling pass effectively never
|
||||||
|
applies; a below-17 HARDEN/VALIDATE is always code-blocked and stops
|
||||||
|
the pipeline. Every code-ceiling pass is listed in the §2 score table
|
||||||
|
with an explicit `✅ plafond code (X.X atteint / 17 requiert client)`
|
||||||
|
status — never silently presented as a nominal pass.
|
||||||
|
|
||||||
**GEO gate note**: `SCORE_GEO_AFTER = "UNKNOWN"` is treated as **fail** —
|
**GEO gate note**: `SCORE_GEO_AFTER = "UNKNOWN"` is treated as **fail** —
|
||||||
this typically happens when the SEO subagent produced a legacy single-score
|
this typically happens when the SEO subagent produced a legacy single-score
|
||||||
@@ -704,7 +734,13 @@ so the client knows what's still below the bar.
|
|||||||
If `ALL_PASS = false`:
|
If `ALL_PASS = false`:
|
||||||
|
|
||||||
1. Generate `.claude/audits/HANDOVER-ROADMAP.md` (analysis of what's
|
1. Generate `.claude/audits/HANDOVER-ROADMAP.md` (analysis of what's
|
||||||
blocking each below-threshold audit — see structure below).
|
blocking each below-threshold audit — see structure below). Split
|
||||||
|
every below-threshold axis in two labeled lists using the analyzers'
|
||||||
|
`fixable:` tags: **CODE-BLOQUÉ** (bundle/GATED items not yet applied,
|
||||||
|
additional code opportunities from the trajectory) vs **CLIENT-BLOQUÉ**
|
||||||
|
(user-bound actions with expected gain — mirror of HUMAN-ACTIONS.md).
|
||||||
|
A failed axis whose list is 100 % client-bloqué should not happen
|
||||||
|
(the code-ceiling pass covers it) — if it does, flag the gate logic.
|
||||||
2. Append checklist entries to `.claude/tasks/TODO.md`.
|
2. Append checklist entries to `.claude/tasks/TODO.md`.
|
||||||
3. **Do NOT generate the client doc**. Report to the user:
|
3. **Do NOT generate the client doc**. Report to the user:
|
||||||
|
|
||||||
@@ -1093,17 +1129,26 @@ End with two callouts:
|
|||||||
> n'est pas exacte, corrigez-la **ici d'abord**, puis appliquez la
|
> n'est pas exacte, corrigez-la **ici d'abord**, puis appliquez la
|
||||||
> nouvelle valeur partout.
|
> nouvelle valeur partout.
|
||||||
|
|
||||||
Auto-detection rules: pull values from CLAUDE.md, .claude/memory/
|
Auto-detection rules: **`.claude/audits/NAP-KIT.md` FIRST when present**
|
||||||
journal/decisions, README.md, first commits, and the live site. If a
|
— it is the user-confirmed canonical NAP produced by /seo (LRN-032:
|
||||||
value cannot be confirmed, leave `[À COMPLÉTER]` and warn in final
|
on-site sources may all share one wrong seed; the kit is the only
|
||||||
report. Do NOT invent SIRET, GPS, or legal name — those are too risky
|
user-validated source). Fields marked `UNCONFIRMED` there stay
|
||||||
to fake.]
|
`[À COMPLÉTER]` here. Only when no NAP-KIT exists, fall back to:
|
||||||
|
CLAUDE.md, .claude/memory/ journal/decisions, README.md, first commits,
|
||||||
|
and the live site. If a value cannot be confirmed, leave `[À COMPLÉTER]`
|
||||||
|
and warn in final report. Do NOT invent SIRET, GPS, or legal name —
|
||||||
|
those are too risky to fake.]
|
||||||
|
|
||||||
## 5. Ce qui vous reste à faire
|
## 5. Ce qui vous reste à faire
|
||||||
|
|
||||||
[Action-only checklist for the client. Pull from: open `blockers.md`
|
[Action-only checklist for the client. Pull from:
|
||||||
entries, ongoing-monitoring items, external platforms to claim,
|
**`.claude/audits/HUMAN-ACTIONS.md` FIRST when present** (the /seo//geo
|
||||||
content updates only the client can make, deploy steps if self-hosted.
|
audit-end checklist — carry its automation notes, vulgarized), then open
|
||||||
|
`blockers.md` entries, ongoing-monitoring items, external platforms to
|
||||||
|
claim, content updates only the client can make, deploy steps if
|
||||||
|
self-hosted. If any axis passed via the code-ceiling rule (STEP 8),
|
||||||
|
its unlocking user actions appear HERE with their expected score gain
|
||||||
|
("+X points quand fait") — that is the contract that made the gate pass.
|
||||||
|
|
||||||
Format as a checklist grouped by cadence. Every line starts with a
|
Format as a checklist grouped by cadence. Every line starts with a
|
||||||
verb. Every line is something the client can do without a developer.
|
verb. Every line is something the client can do without a developer.
|
||||||
|
|||||||
@@ -587,6 +587,25 @@ GEO GLOBAL (weighted) : XX.X/20 (<depth>)
|
|||||||
Per user instruction: **GEO weight in combined SEO+GEO report = 20% for
|
Per user instruction: **GEO weight in combined SEO+GEO report = 20% for
|
||||||
local, 25% for national/SaaS/content.**
|
local, 25% for national/SaaS/content.**
|
||||||
|
|
||||||
|
### Projected code-only score + trajectory to 17/20 (mandatory)
|
||||||
|
|
||||||
|
Tag EVERY finding `fixable: code` (bundle-reachable in the repo:
|
||||||
|
robots.txt, llms.txt, JSON-LD, content shape) or `fixable: user`
|
||||||
|
(Wikidata, external profiles/sameAs targets, citations, GMB, press,
|
||||||
|
AI-visibility outcomes). Emit alongside the actual scores:
|
||||||
|
|
||||||
|
- **Projected axis score** — each axis if every `fixable: code` finding
|
||||||
|
is applied (bundle fully executed).
|
||||||
|
- **Projected global** — same weights over projected axes.
|
||||||
|
- **Code ceiling** — for user-bound residuals (Entity SEO's external
|
||||||
|
half, AI visibility), state `code ceiling X.X/20 — reaching 17
|
||||||
|
requires <named user actions>`.
|
||||||
|
|
||||||
|
Append the same `TRAJECTORY TO 17/20 (code-only)` block as the
|
||||||
|
seo-analyzer spec: ACTUAL, PROJECTED, then either ranked bundle items
|
||||||
|
(projected ≥ 17) or additional code opportunities + honest ceiling +
|
||||||
|
unlocking user actions (projected < 17). NEVER inflate projections.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## STEP 11 — PRIORITIZED ACTION PLAN `[both]`
|
## STEP 11 — PRIORITIZED ACTION PLAN `[both]`
|
||||||
|
|||||||
@@ -640,6 +640,38 @@ Lighthouse run.
|
|||||||
LOCAL axes not audited (Off-page, Social, Competitive) appear as
|
LOCAL axes not audited (Off-page, Social, Competitive) appear as
|
||||||
`N/A — requires FULL audit` in the report.
|
`N/A — requires FULL audit` in the report.
|
||||||
|
|
||||||
|
### Projected code-only score + trajectory to 17/20 (mandatory)
|
||||||
|
|
||||||
|
Tag EVERY finding `fixable: code` (reachable by a bundle item — AUTO or
|
||||||
|
GATED — in the repo) or `fixable: user` (GMB, citations, reviews,
|
||||||
|
backlinks, social profiles, admin/DB content, host infra). From those
|
||||||
|
tags, emit alongside the actual scores:
|
||||||
|
|
||||||
|
- **Projected axis score** — what each axis reaches if every
|
||||||
|
`fixable: code` finding is applied (bundle fully executed).
|
||||||
|
- **Projected global** — same weighted formula over projected axes.
|
||||||
|
- **Code ceiling** — for axes whose residual gap is user-bound
|
||||||
|
(Off-page, Social, Competitive, the GMB/citations share of SEO
|
||||||
|
Local), state it explicitly: `code ceiling X.X/20 — reaching 17
|
||||||
|
requires <named user actions>`.
|
||||||
|
|
||||||
|
Trajectory block (verbatim shape, appended to the scoring output):
|
||||||
|
|
||||||
|
```
|
||||||
|
TRAJECTORY TO 17/20 (code-only)
|
||||||
|
ACTUAL : XX.X/20
|
||||||
|
PROJECTED : XX.X/20 (bundle fully applied)
|
||||||
|
<if PROJECTED ≥ 17> the bundle IS the trajectory — rank items by score impact.
|
||||||
|
<if PROJECTED < 17> (a) ADDITIONAL code-side opportunities beyond the
|
||||||
|
bundle (content depth, new pages, perf, internal linking), each with
|
||||||
|
estimated axis gain, until 17 is reachable or the ceiling is hit;
|
||||||
|
(b) honest ceiling statement + top user actions (expected gain each)
|
||||||
|
that unlock the rest — these MUST exist in the user-actions output.
|
||||||
|
```
|
||||||
|
|
||||||
|
NEVER inflate a projected score to fake reachability — a wrong ceiling
|
||||||
|
misroutes the client-handover gate and the user's effort.
|
||||||
|
|
||||||
### Output
|
### Output
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -96,6 +96,20 @@ term). NEVER apply a GATED item before explicit approval.
|
|||||||
2. Record each applied change in the report change-log section.
|
2. Record each applied change in the report change-log section.
|
||||||
3. USER ACTIONS from the bundle → report §11 (each with automation-catalog ref).
|
3. USER ACTIONS from the bundle → report §11 (each with automation-catalog ref).
|
||||||
|
|
||||||
|
### Audit-end deliverables + trajectory (ALWAYS — both modes)
|
||||||
|
|
||||||
|
Same contract as /seo:
|
||||||
|
- The report carries the analyzer's actual AND projected code-only scores
|
||||||
|
plus its `TRAJECTORY TO 17/20` block (ranked code fixes to 17, or the
|
||||||
|
honest code ceiling + the user actions that unlock the rest) — the
|
||||||
|
geo-analyzer spec (STEP 10) makes these mandatory in the envelope.
|
||||||
|
- Regenerate `.claude/audits/HUMAN-ACTIONS.md` from the user actions
|
||||||
|
(checkbox format, one `- [ ]` per action with automation ref + effort)
|
||||||
|
right after the report is written, EVEN in conservative mode — an
|
||||||
|
audit-only run must leave the user immediately actionable.
|
||||||
|
- Console summary includes: actual + projected scores, the trajectory
|
||||||
|
one-liner, and the HUMAN-ACTIONS.md path.
|
||||||
|
|
||||||
## Note on integration
|
## Note on integration
|
||||||
|
|
||||||
If `.claude/audits/SEO.md` already exists, geo-analyzer merges its findings
|
If `.claude/audits/SEO.md` already exists, geo-analyzer merges its findings
|
||||||
|
|||||||
+11
-4
@@ -522,7 +522,12 @@ Per user decision:
|
|||||||
<Merged from both agents — legal blockers, catastrophic issues>
|
<Merged from both agents — legal blockers, catastrophic issues>
|
||||||
|
|
||||||
## 1. Notes globales (/20 par axe + pondérée)
|
## 1. Notes globales (/20 par axe + pondérée)
|
||||||
<SEO scoring table from seo-analyzer + GEO scoring table from geo-analyzer + combined score>
|
<SEO scoring table from seo-analyzer + GEO scoring table from geo-analyzer + combined score.
|
||||||
|
Each table carries BOTH columns: actual score AND projected code-only score
|
||||||
|
(bundle fully applied). Follow with the merged "Trajectoire vers 17/20" block:
|
||||||
|
actual global, projected global, then — per the analyzers' TRAJECTORY output —
|
||||||
|
ranked code fixes to 17, or the honest code ceiling + the user actions that
|
||||||
|
unlock the rest (cross-linked to §11 / HUMAN-ACTIONS.md).>
|
||||||
|
|
||||||
## 2. Audit technique (HTTP, CWV, sécurité)
|
## 2. Audit technique (HTTP, CWV, sécurité)
|
||||||
<From seo-analyzer>
|
<From seo-analyzer>
|
||||||
@@ -653,9 +658,11 @@ URL : <url>
|
|||||||
FRAMEWORK : <name + rendering>
|
FRAMEWORK : <name + rendering>
|
||||||
DEPTH : LOCAL | FULL
|
DEPTH : LOCAL | FULL
|
||||||
|
|
||||||
NOTE SEO (classique) : XX.X / 20
|
NOTE SEO (classique) : XX.X / 20 (projeté code-only : XX.X)
|
||||||
NOTE GEO (IA) : XX.X / 20
|
NOTE GEO (IA) : XX.X / 20 (projeté code-only : XX.X)
|
||||||
NOTE GLOBALE (pondérée) : XX.X / 20
|
NOTE GLOBALE (pondérée) : XX.X / 20 (projeté : XX.X)
|
||||||
|
TRAJECTOIRE 17/20 : atteignable code-only via <top items> |
|
||||||
|
plafond code XX.X — débloquer via <user actions>
|
||||||
|
|
||||||
CHANGEMENTS APPLIQUES (N) : voir SEO.md §15
|
CHANGEMENTS APPLIQUES (N) : voir SEO.md §15
|
||||||
ACTIONS UTILISATEUR (N) : .claude/audits/HUMAN-ACTIONS.md (checklist)
|
ACTIONS UTILISATEUR (N) : .claude/audits/HUMAN-ACTIONS.md (checklist)
|
||||||
|
|||||||
Reference in New Issue
Block a user