Run C2 of manual-push mode (BDR-111/BDR-112). The four flows that pushed on their own, or claimed the branch was on origin, now read the truth after the fact and hand the user the exact command: - client-handover-writer: the "Push to origin now?" question and its push block are gone (the hooks had already pushed in auto-push mode; push-guard denies it in manual mode). A reusable PUSH STATE READ (branch, origin probe, `git rev-list --count origin/<br>..<br>`, the verb only to word the reason) runs after commit-change, at the top of the deploy pause, after "Deployed" and before each end report. The branch name is validated against an allowlist before it is placed in any command or hint (a hostile branch name is otherwise a shell injection). Pending → the user pushes BEFORE the deploy pause; the deploy brief says "after your push". `Push:` line in both reports. - release-candidate STEP 6: two ahead counts + the verb; anything other than auto with both counts 0 prints one user command `! git push --atomic origin main develop v<X.Y.Z>` and stops; the tag gate stays for auto mode; `hold` notes --follow-tags; version regex. - release-executor: push claims qualified (auto-push mode, best effort). - tour: mode-agnostic rule; STEP 3 reads one `git -C <project>` fact per project (suffix-aware branch, --remotes=origin, origin probe) and the summary row says on origin / local only with the user command.
71 lines
5.7 KiB
Markdown
71 lines
5.7 KiB
Markdown
---
|
||
name: client-handover
|
||
effort: xhigh
|
||
description: |
|
||
Use when finalizing a project for non-technical client delivery —
|
||
final audits, live-site validation, branded deliverable (MD + HTML +
|
||
PDF). Orchestrator: client-handover-writer spawns /seo + /harden in
|
||
parallel, then /web-validate, then writes the deliverable.
|
||
Triggers: "client handover", "livraison client", "rapport client",
|
||
"deliverable", "livrable", "finaliser et livrer".
|
||
argument-hint: [optional: language fr|en, --include-deploy, --skip-deploy, --skip-seo, --skip-audits, --skip-fix-loop, --max-iterations N, --audit-max-age <duration>, --output <path>]
|
||
allowed-tools:
|
||
- Read
|
||
- Write
|
||
- Edit
|
||
- Bash
|
||
- Grep
|
||
- Glob
|
||
- WebSearch
|
||
- WebFetch
|
||
- AskUserQuestion
|
||
- Agent
|
||
---
|
||
|
||
MODEL GATE (blocking): run `$HOME/.claude/lib/model-gate.md` BEFORE loading
|
||
the agent below. Verdict `small` → STOP — print the gate's remedy, end the
|
||
turn, do not load the agent.
|
||
|
||
Load and follow strictly:
|
||
- $HOME/.claude/agents/client-handover-writer.md
|
||
|
||
Execute the CLIENT HANDOVER WRITER agent on this project. It runs the
|
||
audit/fix/gate pipeline INLINE on the big session model (gated above), its
|
||
skill-runner children dispatched `model: "fable"`, then delegates the
|
||
client deliverable to the two-mode `handover-doc-writer` subagent —
|
||
synthesize on opus, render (Markdown + branded HTML + PDF) on the sonnet
|
||
pin (BDR-077).
|
||
|
||
The agent runs a **ship-and-handover pipeline** with explicit gates:
|
||
|
||
1. **PRE-FLIGHT** — Detect git repo, project root, language, project type, web sub-type, NAP signals, stack.
|
||
2. **BASELINE AUDITS** — Run /seo (SEO+GEO) and /harden in parallel. Capture initial scores (`SCORE_SEO_BEFORE`, `SCORE_GEO_BEFORE`, `SCORE_HARDEN_BEFORE`).
|
||
3. **FIX LOOPS (parallel, bounded)** — For each audit < 17/20:
|
||
- Apply the pending FIX BUNDLE from the MAIN loop: items the audit classed AUTO directly, then every GATED item (CSP, redirects, anything harden marks "could BREAK the site") presented to the user at ONE gate before applying.
|
||
- Re-invoke the audit subagent in audit mode: it re-scores and returns the next FIX BUNDLE; it applies nothing (a dispatched child cannot hold a gate).
|
||
- Repeat up to `MAX_ITERATIONS` (default 5).
|
||
- If still < 17/20 after cap → escalate to user with concrete remaining issues; user decides continue / stop / manual intervention.
|
||
4. **COMMIT + PUSH** — If files changed during fix loops, run /commit-change (atomic logical commits); the gitflow hooks push in auto-push mode, otherwise (manual push mode, or a hook push that failed) the agent tells the user to push with `! git push -u origin <branch>` BEFORE the deploy pause.
|
||
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. **/web-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 the client deliverable using the 6-chapter structure (BDR-013, full spec in `agents/client-handover-writer.md`):
|
||
- **§1 Ce qu'il fallait faire (et pourquoi)** — brief + motivation, 100–180 words.
|
||
- **§2 Résultats — état de santé du site (avant / après)** — the score table (SEO classique + GEO + sécurité + conformité, before/after, gated independently at ≥17/20), promoted to the top of the doc for immediate impact.
|
||
- **§3 Ce qui a été fait** — lay summary, **≤300 words, zero technical jargon**, **no internal tool/skill names** (no `/seo`, `/harden`, `/web-validate`, `seo-analyzer`, etc. — replace with concept names: référencement / sécurité / conformité technique). Forbidden-token grep gate runs before write (covers chapters 1–5).
|
||
- **§4 Vos informations officielles (NAP)** — single source-of-truth table the client reuses across every external platform in §7 (web/local-business only).
|
||
- **§5 Ce qui vous reste à faire** — action-only checklist grouped by cadence (one-time / monthly / quarterly / yearly / when something changes).
|
||
- **§6 Détails techniques (pour les curieux)** — vulgarized BDR decisions, phases with technical detail, optional glossary (score table NOT here — promoted to §2).
|
||
- **§7 Annexe — plateformes externes** (web/local-business only).
|
||
- **§8 Annexe — build & déploiement** (only if requested).
|
||
9. **RENDER** — Write `LIVRAISON.md` (fr) or `HANDOVER.md` (en) at project root, then run `$HOME/.claude/skills/client-handover/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.
|
||
- `--max-iterations N` — cap fix loop iterations (default 5).
|
||
- `--skip-audits` — bypass entire pipeline; jump straight to doc generation from existing audit files.
|
||
- All previous flags still supported (see argument-hint).
|
||
|
||
Context from the user (if any):
|
||
$ARGUMENTS
|