---
name: journey-audit
description: "In-repo workflow-continuity audit over the prototype. Dispatches one journey-auditor per journey (parallel, capped), merges + dedupes the gap rows, presents the severity-ranked list for approval, then routes fixes as single writer — missing screens to the design backlog (→ /design-build or the console lane), unbuilt-source micro-rewires applied directly with provenance refresh, built-screen deltas to design-sync, graduated screens forward-only. Also the phase-1 exit gate (zero S1 on the golden journeys). Usage: /journey-audit <J-id…|ModuleCode|golden|all>"
argument-hint: "<J-id…|ModuleCode|golden|all> (golden = the priority journeys in CLAUDE.md §6)"
---
> **Specialization:** Read `CLAUDE.md` first and bind every `<…>` placeholder and every "per `CLAUDE.md`" reference from it (priority journeys + roles, prototype location + entry point, design-backlog + design-prompts board paths, screen registry, workflow registry, concurrency cap, design-language anchors). This file hard-codes no project value. If a needed value is missing from `CLAUDE.md`, STOP-and-ask. See `SPECIALIZE.md`.

You are the **orchestrator** for an in-repo journey-continuity audit and the **single writer** (Law 3) of everything it changes. `journey-auditor` agents are advisory — they return gap rows and write only their report files; you merge, get approval, and route every fix. Read the **`journey-continuity-audit`** skill first; its routing table governs step 5.

## 1. Resolve journeys
Parse `$ARGUMENTS`: one or more `J-…` ids → those journeys; a module code → that module's journeys (from the workflow registry); `golden` → the priority journeys named in `CLAUDE.md §6`; `all` → every journey with a workflow-registry row. A path to a `design-sync` plan file (in the approval inbox) → the plan's **journeys to re-audit** union — the drift-adoption continuity delta check; run it only AFTER the orchestrator executed the plan (auditing mid-execution reports half-applied edges as gaps). For each, assemble the dispatch packet: the journey's role list + expected step chain (from `CLAUDE.md §6` / its `<X>_WORKFLOW.md`), the prototype entry point + glob, the current design-backlog board, and the screen registry.

## 2. Dispatch (parallel, capped per `CLAUDE.md`)
One `journey-auditor` per journey, concurrently (cap per `CLAUDE.md`; default 8). Journeys share screens, so agents may read the same sources — that is safe (all reads); each uses its own isolated browser per the parallel rules. Retry a failure ≤2 times (Law 11), then file it in the approval inbox and continue.

## 3. Merge + dedupe (cross-journey)
Collect the gap rows. Two journeys often hit the same broken edge from different directions — merge duplicates (same from→to + same missing thing), keeping the row from the journey where it bites hardest (highest severity, then closest to the journey's start). Re-verify the agents' backlog dedupe against the board's current state (it may have moved during the sweep).

## 4. Checkpoint — present, then STOP
Present the merged list severity-ordered, grouped by journey, with the per-row `touches` routing (`unbuilt | BUILT ✅ | graduated`) and the continuity ledgers. **Ask which gaps to fix** (propose a default batch: all S1s of the highest-priority journey). If this run is the **phase-1 exit gate**, also state the verdict explicitly: `GATE: PASS (zero S1 on golden journeys)` or `GATE: FAIL (S1s: …)` — the gate result goes in `PROGRESS.md` either way.

## 5. Route the approved fixes (single writer — the skill's routing table)
- **Missing screen** → file the `DesignBacklog:` row to the design-backlog board (next id per the board's scheme) **carrying the splice fields verbatim** — `GAP-nn`, the journey id, the inbound edge (upstream file · CTA · current state), the outbound edge (downstream route · context key), the reuse anchor — then fire **`design-prompt-authoring`** for its brief (which lifts those fields into §J's Journey-splice block), and note the suggested lane. This is what lets `/design-build` hand the builder a real splice packet instead of a prose Trigger. The fix then flows through `/design-build` or the console lane + `/promote-design` like any backlog row — this command does not build screens.
- **Rewire / new state on an UNBUILT prototype source** → apply the micro-edit yourself (the smallest change that closes the gap, in the existing vocabulary), then **refresh that source's provenance hash** on its registry row (`resync: journey-audit GAP-nn`). A "new state" too large for a micro-edit (a real design task) becomes a design-backlog row instead — judge honestly.
- **Anything touching a BUILT `✅` screen's source** → do NOT edit; hand the named delta to **`design-sync`** for classification (it will route cosmetic/structural/contract-affecting + preserve-wiring). Your job is only to file the handoff.
- **Graduated screens** → file the gap forward-only: a remediation item against the built side (the `interaction-auditor`/builder path), never a prototype edit.
- After each applied batch, **re-dispatch the affected journey's auditor** (or re-run its Phase-0 ledger) to prove closure — `GAP-nn closed by <…>` lines go in the summary; a fix that opened a new dead edge is a defect, not done.

## 6. Integrate the paper trail
`PROGRESS.md` activity line (journeys audited, gate verdict if applicable, gaps filed/fixed/handed-off); graduate Insights/Lessons; sync the design-prompts index for any rows filed. Keep the agents' report files in the approval inbox as provenance.

## 7. Report
Summarize per journey: edges audited (OK/DEAD-END/LEGACY/WRONG counts), gaps by severity, what was filed vs micro-fixed vs handed to design-sync vs deferred, the gate verdict, and anything awaiting a human.
