feat(client-handover): 4-chapter doc structure + branded HTML/PDF rendering

This commit is contained in:
bastien
2026-05-07 19:08:59 +02:00
parent 5d8103f595
commit a963faa764
5 changed files with 1081 additions and 141 deletions
+24 -18
View File
@@ -3,17 +3,22 @@ name: client-handover
description: |
Final ship-and-handover orchestrator. End-to-end pipeline that hardens the
project, commits, pauses for deploy, validates the live site, and only then
generates the non-technical client deliverable (LIVRAISON.md / HANDOVER.md).
Pipeline: (1) /seo (SEO+GEO) and /harden run in parallel with auto-fix loops
until each score ≥17/20, (2) /commit-change + push if changes made, (3) pause
to tell user what to deploy and wait for confirmation, (4) /validate against
the live site, (5) per-audit gate ≥17/20 — stop and analyze if any below,
(6) write client doc with before/after score table and explicit
owner-maintenance checklist. Reads git history + .claude/memory/ registries.
For local-business projects, appends manual SEO/GEO platform checklist (NAP
consistency across Google Business, Pages Jaunes, Yelp, Facebook, Instagram,
TikTok, Apple Maps, Bing Places, TripAdvisor, etc.). Asks whether to include
build/deploy chapter.
generates the non-technical client deliverable as Markdown + branded HTML +
PDF (ZenQuality identity: green palette, Inter + Playfair Display fonts,
cover page with logo and tagline). The deliverable uses a 4-chapter
structure: §1 what was needed and why, §2 what was done (≤300 words, zero
jargon, no internal tool/skill names), §3 what the client must do (action
checklist), §4 technical details for the curious (scores, key choices,
glossary). Pipeline: (1) /seo (SEO+GEO) and /harden run in parallel with
auto-fix loops until each score ≥17/20, (2) /commit-change + push if
changes made, (3) pause to tell user what to deploy and wait for
confirmation, (4) /validate against the live site, (5) per-axis gate
≥17/20 — stop and analyze if any below, (6) write client doc + render
branded HTML/PDF. Reads git history + .claude/memory/ registries. For
local-business projects, appends manual SEO/GEO platform checklist (NAP
consistency across Google Business, Pages Jaunes, Yelp, Facebook,
Instagram, TikTok, Apple Maps, Bing Places, TripAdvisor, etc.). Asks
whether to include build/deploy chapter.
Trigger: "client handover", "compte rendu client", "livraison client",
"synthese projet", "rapport client", "deliverable", "summary for client",
"recap projet", "handover doc", "livrable", "ship and handover",
@@ -51,13 +56,14 @@ The agent runs a **ship-and-handover pipeline** with explicit gates:
5. **DEPLOY PAUSE** — List exact deploy artifacts: changed files since baseline, deploy hints from project (vercel.json, netlify.toml, Dockerfile, .github/workflows/deploy.yml, etc.), and the deploy process in plain words. Use AskUserQuestion: "Deploy done? (Yes / Not yet / Skip validate)". Block until Yes or Skip.
6. **/validate (live site)** — Run validator-analyzer against the deployed URL. Capture `SCORE_VALIDATE`.
7. **GATE — per-axis threshold ≥17/20** — Compute final `SCORE_*_AFTER` for SEO classique, GEO (IA), HARDEN, VALIDATE. If ANY < 17/20: STOP. Generate `.claude/audits/HANDOVER-ROADMAP.md` with prioritized analysis of what's blocking each below-threshold axis. Do NOT write the client deliverable. Report to user.
8. **DOC GENERATION (only if all scores ≥17/20)** — Read `.claude/memory/` registries + full git history. Ask whether to include build/deploy chapter. Synthesize concise client deliverable with:
- Before/after score table with SEO classique and GEO (IA) on separate rows, plus HARDEN and VALIDATE — values + delta. SEO classique, GEO, HARDEN and VALIDATE are gated independently — each must reach ≥17/20 for the pipeline to pass.
- Plain-language summary of all changes since first commit.
- **Owner responsibilities** section: explicit checklist of what the client must do / maintain (SEO platforms, content updates, monitoring, deploy if self-hosted).
- Optional build/deploy chapter.
- For web projects with local-business signals: manual SEO/GEO platform checklist with registration links.
9. **OUTPUT** — Write to `LIVRAISON.md` (fr) or `HANDOVER.md` (en) at project root.
8. **DOC GENERATION (only if all scores ≥17/20)** — Read `.claude/memory/` registries + full git history. Ask whether to include build/deploy chapter. Synthesize the client deliverable using the 4-chapter structure:
- **§1 Ce qu'il fallait faire (et pourquoi)** — brief + motivation, 100–180 words.
- **§2 Ce qui a été fait** — lay summary, **≤300 words, zero technical jargon**, **no internal tool/skill names** (no `/seo`, `/harden`, `/validate`, `seo-analyzer`, etc. — replace with concept names: référencement / sécurité / conformité technique). Forbidden-token grep gate runs before write.
- **§3 Ce qui vous reste à faire** — action-only checklist grouped by cadence (one-time / monthly / quarterly / yearly / when something changes).
- **§4 Détails techniques (pour les curieux)** — score table (SEO classique + GEO + sécurité + conformité, before/after, gated independently at ≥17/20), vulgarized BDR decisions, phases with technical detail, optional glossary.
- **§5 Annexe — plateformes externes** (web/local-business only).
- **§6 Annexe — build & déploiement** (only if requested).
9. **RENDER** — Write `LIVRAISON.md` (fr) or `HANDOVER.md` (en) at project root, then run `scripts/handover-to-pdf.sh` to produce the matching branded `.html` (always) and `.pdf` (when a PDF engine is on the host: weasyprint > wkhtmltopdf > chromium). HTML/PDF use the ZenQuality cover page, green palette, Inter + Playfair Display typography, running header/footer with project name + page numbers.
Flags:
- `--skip-fix-loop` — run baseline audits once, skip auto-fix iterations.