From c983f1ff9430a2063362a815893274aa43e4e755 Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Wed, 26 Aug 2026 21:55:13 +0200 Subject: [PATCH] fix(handover-writers): stale ch.4 refs post-NAP-renumbering (glossary/tone->6, cross-links/THRESHOLD->5); 14.5 verification deferred to post-write; anchor gate ordered into STEP 16 --- agents/client-handover-writer.md | 2 +- agents/handover-doc-writer.md | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/agents/client-handover-writer.md b/agents/client-handover-writer.md index 6a71e36..c8883d1 100644 --- a/agents/client-handover-writer.md +++ b/agents/client-handover-writer.md @@ -732,7 +732,7 @@ write `.claude/audits/THRESHOLD-OVERRIDE.md` documenting: - Top 3 unresolved issues per axis - User's stated reason -This file is referenced in §4 of the client doc ("Ce qui vous reste à faire") +This file is referenced in §5 of the client doc ("Ce qui vous reste à faire") so the client knows what's still below the bar. If `ALL_PASS = false`: diff --git a/agents/handover-doc-writer.md b/agents/handover-doc-writer.md index 298881c..0575dd2 100644 --- a/agents/handover-doc-writer.md +++ b/agents/handover-doc-writer.md @@ -424,7 +424,7 @@ Wrong — has date prefix: ### 6.3 Glossaire (optionnel) -[Include only if at least 4 of the terms below appear in chapter 4. +[Include only if at least 4 of the terms below appear in chapter 6. Format: term — one-line plain-language definition. Sort alphabetically. This is the ONLY place internal tooling names may be mentioned by their internal label, and only when explaining what they correspond @@ -465,7 +465,7 @@ des audits de santé. Pour toute question, contactez [contact].* 1. Address the client directly ("votre site", "vous pouvez"). 2. Chapters 1–3: replace every tech term with a user-facing equivalent. 3. No abbreviations the client wouldn't use (HTTPS yes, CSP no — unless - in chapter 4 with definition). + in chapter 6 with definition). 4. Concrete numbers > adjectives. 5. Short paragraphs. Bullet lists for things you can count. 6. **Score deltas explained in plain words**. Never just dump numbers. @@ -535,9 +535,9 @@ The chapter must include: 8. **Outils gratuits pour vérifier votre présence**. -Cross-link this chapter from §4 (owner responsibilities — "Ce qui vous +Cross-link this chapter from §5 (owner responsibilities — "Ce qui vous reste à faire"). Items in this §7 annex that are recurring belong in -§4's cadence checklist (Mensuel / Trimestriel / Annuel). +§5's cadence checklist (Mensuel / Trimestriel / Annuel). --- @@ -624,7 +624,9 @@ checkbox: (`LANG=en`: "Items already checked have been validated.") -### Verification +### Verification (deferred — run right AFTER STEP 15 writes `$OUTPUT_MD`; +the pre-checks themselves are applied to the in-memory body here, the +file does not exist yet) ```bash # At least one pre-check expected for any project with real history. @@ -687,6 +689,9 @@ awk '/^## 1\./{flag=1} /^## 6\./{flag=0} flag' "$OUTPUT" \ **Anchor-resolution gate** (clickable section refs work). ```bash +# ORDER: run this gate in STEP 16, immediately AFTER the HTML render — +# $OUTPUT_HTML does not exist yet at STEP 15. A broken anchor found here +# loops back to fix the markdown ref, then re-render. grep -oE '\]\(#[a-z0-9-]+\)' "$OUTPUT_MD" | tr -d ']()#' | sort -u > /tmp/refs.txt grep -oE 'id="[^"]+"' "$OUTPUT_HTML" | sed 's/id="//;s/"//' | sort -u > /tmp/ids.txt comm -23 /tmp/refs.txt /tmp/ids.txt