@wemuda/launchrail 1.17.0 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -58,6 +58,7 @@ From there, the day-to-day driver is not the CLI — it's the **`launch` skill**
58
58
 
59
59
  - **`launch-project-alignment`** — the on-ramp for an existing codebase: infer a vision from the code, interview only the gaps, inventory the design system, then join the loop
60
60
  - **`launch-design-handoff`** — the design→code on-ramp: drop a Claude Design export (a zip, a folder, artboards) and it becomes a committed handoff package under `docs/design/` — read against the code and design system, gaps recorded as the grill's agenda — then sized into the loop ([ADR-0024](https://github.com/wemuda/launchrail/blob/master/docs/adr/0024-design-handoff-onramp.md))
61
+ - **`launch-design-implement`** — one invocation from a Claude Design export to a built page, *true to the prototype*: drop the zip, name the canvas, and it packages the drop (through the on-ramp), writes the state inventory and the token, component, and data maps first, the product is built from the prototype's own markup and styles state by state, and every state is compared side by side with the running prototype at the designed viewport until each row matches or is an accepted deviation with a reason ([design-fidelity-build](https://github.com/wemuda/launchrail/blob/master/docs/adr/2026-09-17-design-fidelity-build.md)); user-typed, like `launch-implement`
61
62
  - **`launch-vision-creation`**, **`launch-discovery`**, **`launch-grill`**, **`launch-research`** — vision, then the divergent landscape scan, the grill (the convergent interview that runs both as the foundation's complexity grill and per-feature before speccing, keeping the glossary and ADRs honest as it goes), and primary-source research
62
63
  - **`launch-wayfinder`**, **`launch-spec`**, **`launch-tickets`**, **`launch-design-validation`** — break big work into decision maps, synthesize the spec, validate it visually, and cut tracer-bullet tickets with blocking edges
63
64
  - **`launch-browser-smoke`** — drives the running app in a real browser to see a just-built change working — one-off, from the shell with `agent-browser` against a stack `launchrail dev` started, no test suite and no evidence bundle ([ADR-0034](https://github.com/wemuda/launchrail/blob/master/docs/adr/0034-browser-smoke-one-off-driving.md), [ADR-0036](https://github.com/wemuda/launchrail/blob/master/docs/adr/0036-cli-owned-stack-start.md); with the browser-testing module)
@@ -11,7 +11,7 @@
11
11
  //
12
12
  // The lean shape (ADR-0032): builders push their branch from the first commit on, so
13
13
  // a lost container costs minutes, not a build; each finished branch is landed by the
14
- // loop itself — a local squash-merge onto the integration base gated by the FAST
14
+ // loop itself — a local merge onto the integration base — the branch's commits preserved — gated by the FAST
15
15
  // verification tier, in this checkout, one land at a time — and pushed; the FULL
16
16
  // gate runs at checkpoints (every N lands) and at release, with one bounded repair
17
17
  // when a checkpoint is red. No per-ticket PR, no cloud-CI wait anywhere in the loop:
@@ -26,7 +26,7 @@ export const meta = {
26
26
  { title: 'Preflight', detail: 'read project config, sync the integration base into this checkout, run the full gate (or honor knownGreen)' },
27
27
  { title: 'Graph', detail: 'list ready tickets and their blocking edges, verbatim' },
28
28
  { title: 'Build', detail: 'one fresh-context implementer per ticket on a pushed ralph/<n>-* branch, handing off at a green fast gate' },
29
- { title: 'Land', detail: 'local squash-merge onto the base under the fast gate, push, explicit close — one land at a time' },
29
+ { title: 'Land', detail: 'local merge onto the base under the fast gate, push, explicit close — one land at a time' },
30
30
  { title: 'Verify', detail: 'remote ground truth for every claimed land' },
31
31
  { title: 'Checkpoint', detail: 'the full gate on the base every N lands, with one bounded repair when red' },
32
32
  { title: 'Park', detail: 'comment failure history, label needs-info' },
@@ -87,7 +87,7 @@ const POLICY = {
87
87
  // separately at the same number.
88
88
  attempts: A.attempts ?? 2,
89
89
  // Land hand-backs that spend no attempt: the base moved under a finished branch and the
90
- // squash-merge conflicted, or the merged tree failed the loop's gate although the branch
90
+ // merge conflicted, or the merged tree failed the loop's gate although the branch
91
91
  // was fine on its own. The builder did nothing wrong, so a fresh implementer re-syncs the
92
92
  // pushed branch (minutes, not a rebuild) — up to this many times per ticket before it
93
93
  // counts as a real failure.
@@ -230,7 +230,7 @@ const BUILD_SCHEMA = {
230
230
  headSha: { type: 'string', description: 'the pushed tip, as the remote reports it' },
231
231
  commitTitle: {
232
232
  type: 'string',
233
- description: 'a Conventional Commit title for the squash the loop will make, e.g. "feat(auth): add magic-link sign-in"',
233
+ description: 'a Conventional Commit title for the merge commit the loop will make, e.g. "feat(auth): add magic-link sign-in"',
234
234
  },
235
235
  summary: { type: 'string', description: 'what happened, short; on failure, enough for a retry to act on' },
236
236
  failure: {
@@ -254,7 +254,7 @@ const LAND_SCHEMA = {
254
254
  type: 'string',
255
255
  enum: ['landed', 'conflict', 'gate-failed', 'stale', 'failed'],
256
256
  description:
257
- '"landed": squashed onto the base, gate green, pushed, remote confirmed; "conflict": the squash-merge conflicted; "gate-failed": the merged tree failed the gate; "stale": the remote base kept moving outside this loop; "failed": a precondition (dirty or diverged checkout, empty squash)',
257
+ '"landed": merged onto the base, gate green, pushed, remote confirmed; "conflict": the merge conflicted; "gate-failed": the merged tree failed the gate; "stale": the remote base kept moving outside this loop; "failed": a precondition (dirty or diverged checkout, an already-merged branch)',
258
258
  },
259
259
  mergeCommit: { type: 'string', description: 'on landed: the landing commit sha, as the remote reports it' },
260
260
  baseMoved: {
@@ -351,7 +351,7 @@ Steps, in order:
351
351
  4. Branch and push immediately. ${adopt} From here on the pushed branch is your checkpoint: commit and push after every green step (a passing test slice, a finished subtask) — a session that dies keeps everything up to its last push, and its successor resumes from there instead of rebuilding. The pushes are also the loop's liveness signal.
352
352
  5. Implement by invoking the launch-ralph-implement skill — it owns the per-ticket contract: TDD, commit-and-push cadence, the fast gate, browser smoke for user-facing changes, self-review via launch-code-review, commit conventions.
353
353
  6. Pre-land sync: merge the latest origin/${pre.base} into your branch. Conflicts are ordinary work — resolve them with the launch-resolving-merge-conflicts skill. If ${pre.base} gained DB migrations since you branched, regenerate yours to follow them with the project's migration tool — never hand-edit the migration journal. Re-run the fast gate if anything changed, then push.
354
- 7. Hand off: confirm the tip is pushed (\`git ls-remote origin refs/heads/<branch>\` equals \`git rev-parse HEAD\`) and report status "ready" with branch, headSha, and commitTitle — a Conventional Commit title for the squash the loop will make (e.g. "feat(auth): add magic-link sign-in"). Then STOP: the loop lands your branch (a local squash-merge onto ${pre.base} under its own gate run, the push, the explicit issue close). Never push to ${pre.base} yourself, never merge your work into ${pre.base}, and never open a PR — the campaign is released by one PR at the end.
354
+ 7. Hand off: confirm the tip is pushed (\`git ls-remote origin refs/heads/<branch>\` equals \`git rev-parse HEAD\`) and report status "ready" with branch, headSha, and commitTitle — a Conventional Commit title for the merge commit the loop will make (e.g. "feat(auth): add magic-link sign-in"). Then STOP: the loop lands your branch (a local merge onto ${pre.base} under its own gate run, the push, the explicit issue close). Never push to ${pre.base} yourself, never merge your work into ${pre.base}, and never open a PR — the campaign is released by one PR at the end.
355
355
 
356
356
  ${INTEGRITY}
357
357
 
@@ -370,19 +370,19 @@ function landPrompt(pre, subject, full) {
370
370
  : `ticket #${subject.number} ("${subject.title}")`
371
371
  const title = subject.commitTitle || (subject.repair ? `fix: repair ${pre.base}` : `feat: ${subject.title}`)
372
372
  const trailer = subject.repair ? '' : ` -m "Closes #${subject.number}"`
373
- return `You are landing ${what}: the implementer pushed branch ${subject.branch} (head ${subject.headSha || 'see remote'}) and reports the fast gate green there. You own the local squash-merge onto ${pre.base}, the loop's own gate run, the push, and the tracker bookkeeping — nothing else. You never write code and never repair a branch: a squash that conflicts or a gate that fails is reported, not fixed here. Work in THIS checkout (no worktree); exactly one land runs at a time, so nothing else touches it while you do.
373
+ return `You are landing ${what}: the implementer pushed branch ${subject.branch} (head ${subject.headSha || 'see remote'}) and reports the fast gate green there. You own the local merge onto ${pre.base}, the loop's own gate run, the push, and the tracker bookkeeping — nothing else. You never write code and never repair a branch: a merge that conflicts or a gate that fails is reported, not fixed here. Work in THIS checkout (no worktree); exactly one land runs at a time, so nothing else touches it while you do.
374
374
  Tracker access from this environment: ${pre.trackerAccess}
375
375
  1. Preconditions: \`git status --porcelain\` must show no modified or staged files (untracked files are fine) — a dirty tree is status "failed" ("dirty checkout"); never stash or discard anything. Then \`git fetch origin ${pre.base} ${subject.branch}\`.
376
376
  2. Check out the base: \`git checkout ${pre.base}\` (or \`git checkout -b ${pre.base} --track origin/${pre.base}\` when no local branch exists), then \`git merge --ff-only origin/${pre.base}\`. If the fast-forward is refused, the local ${pre.base} has diverged from the remote — report status "failed" saying so; do not reset it.
377
377
  3. Record whether the base moved since the implementer synced: \`git merge-base --is-ancestor origin/${pre.base} origin/${subject.branch}\` — exit 0 means the branch already contains the base tip (baseMoved: false); otherwise baseMoved: true.
378
- 4. Squash-merge: \`git merge --squash origin/${subject.branch}\`. On conflicts, restore the exact clean state of step 2 with \`git reset --hard origin/${pre.base}\` and report status "conflict" naming the conflicting files. Otherwise commit: \`git commit -m ${JSON.stringify(subject.repair ? title : `${title} (#${subject.number})`)}${trailer} -m "Landed by the Ralph loop from ${subject.branch}@${subject.headSha || 'HEAD'}"\`. Nothing to commit → status "failed" (the branch adds nothing to the base).
378
+ 4. Merge, preserving every commit on the branch: \`git merge --no-ff origin/${subject.branch} -m ${JSON.stringify(subject.repair ? title : `${title} (#${subject.number})`)}${trailer} -m "Landed by the Ralph loop from ${subject.branch}@${subject.headSha || 'HEAD'}"\`. \`--no-ff\` always records a merge commit carrying that message, so the branch's own commits land intact beneath it — never a squash. On conflicts, restore the exact clean state of step 2 with \`git reset --hard origin/${pre.base}\` and report status "conflict" naming the conflicting files. A merge that reports "Already up to date" made no commit — the branch adds nothing to the base → status "failed".
379
379
  5. If the landed change touched a dependency manifest or lockfile (\`git diff --name-only HEAD~1 HEAD\`), run the install command first: ${pre.installCommand}. Then run ${gate}. It must exit 0. On failure, undo the landing with \`git reset --hard origin/${pre.base}\` and report status "gate-failed" with the failing checks/tests and their key lines — enough for a fresh implementer to act on. A red base is never pushed.
380
380
  6. \`git push origin ${pre.base}\`. A rejected (non-fast-forward) push means the remote moved outside this loop: \`git fetch origin ${pre.base} && git reset --hard origin/${pre.base}\` and redo steps 3–6 ONCE; a second rejection is status "stale".
381
381
  7. Confirm on the remote: \`git ls-remote origin refs/heads/${pre.base}\` must equal \`git rev-parse HEAD\`. That sha is mergeCommit.${
382
382
  subject.repair
383
383
  ? ''
384
384
  : `
385
- 8. Tracker bookkeeping: close issue #${subject.number} explicitly (auto-close never fires off the default branch) and read it back closed; remove the ralph:building label; post one comment: "Landed on ${pre.base} at <sha> (squash of ${subject.branch}) by the Ralph loop." Report status "landed" with mergeCommit and issueClosed.`
385
+ 8. Tracker bookkeeping: close issue #${subject.number} explicitly (auto-close never fires off the default branch) and read it back closed; remove the ralph:building label; post one comment: "Landed on ${pre.base} at <sha> (merge of ${subject.branch}) by the Ralph loop." Report status "landed" with mergeCommit and issueClosed.`
386
386
  }
387
387
  Report "landed" only after step 7 confirmed the remote; every other outcome by its status, with a summary the loop can act on.`
388
388
  }
@@ -639,7 +639,7 @@ async function drive(pre, ticket, pushed) {
639
639
  s.failures.push(`[attempt ${s.attempts}] reported ready but returned no branch`)
640
640
  return { ticket, ok: false }
641
641
  }
642
- // The loop owns the landing (ADR-0022, ADR-0032): a local squash-merge onto the base
642
+ // The loop owns the landing (ADR-0022, ADR-0032): a local merge onto the base
643
643
  // under the fast gate, one at a time. No PR, no CI wait — the builder's branch is
644
644
  // pushed, so nothing is lost whatever happens next.
645
645
  const land = await landTicket(pre, ticket, { ...build, resyncLabel: resync ? `:resync${s.resyncs}` : '' })
@@ -667,7 +667,7 @@ async function drive(pre, ticket, pushed) {
667
667
  return { ticket, ok: true }
668
668
  }
669
669
  // Landed-but-issue-open fails verification too: the retry finds the ticket's work on
670
- // the base (empty squash) or the issue open, finishes the bookkeeping, and settles.
670
+ // the base (already merged) or the issue open, finishes the bookkeeping, and settles.
671
671
  s.failures.push(`[attempt ${s.attempts}] claimed landed, remote disagrees: ${verdict ? verdict.evidence : 'verifier died'}`)
672
672
  return { ticket, ok: false }
673
673
  }
@@ -45,7 +45,7 @@ Once the foundation exists (a real vision, ADRs beyond the template) and the use
45
45
 
46
46
  Judgment calls: the grill here is feature-scoped (same `launch-grill`, narrower brief); discovery earns a place only when the feature opens genuinely new tech territory — a vendor category or storage engine the project hasn't used; design validation is for real UI surface; a genuine architecture decision gets an ADR before tickets. Between two sizes pick the smaller — it's cheaper to add a stage than to over-plan a small change. Every size ends at `/launch-implement`. The sized path is also the feature's **banner path**: its phases are counted against that path (a semi feature's grill opens as "Phase 1 of 3: Decisions"), so progress reads against what will actually happen, not the full foundation rail.
47
47
 
48
- A feature that arrives **design-first** — a dropped zip or folder of Claude Design artboards, "here is the prototype of X" — routes through `launch-design-handoff` before sizing: it commits the package under `docs/design/<slug>/` and proposes a size; sizing then consumes its `handoff.md` as the feature brief, the grill takes the doc's open questions as its agenda, the spec cites the package as its UX/UI reference, and design validation usually becomes a recorded skip citing it.
48
+ A feature that arrives **design-first** — a dropped zip or folder of Claude Design artboards, "here is the prototype of X" — routes through `launch-design-handoff` before sizing: it commits the package under `docs/design/<slug>/` and proposes a size; sizing then consumes its `handoff.md` as the feature brief, the grill takes the doc's open questions as its agenda, the spec cites the package as its UX/UI reference, and design validation usually becomes a recorded skip citing it. When the prototype *is* the spec — a redesign of an existing page, or a new page the canvas fully shows — the handoff proposes the **faithful build** instead of a size: `/launch-design-implement "<canvas>"`, user-typed like `/launch-implement`, builds that one canvas from the prototype's own code and verifies it side by side at the designed viewport ([fidelity protocol](../launch-design-implement/fidelity.md)) — hand the command over, never start it. It is one invocation: a user who drops an export and asks for it built types that command directly, and it packages the drop through the on-ramp on the way.
49
49
 
50
50
  ## Running it
51
51
 
@@ -61,7 +61,7 @@ Case-insensitive direct jumps:
61
61
 
62
62
  - `status` / `where` — render the rail banner for the detected position (with the evidence) and stop.
63
63
  - `next` — detect the frontier and drive it (the default).
64
- - `setup` / `init` — 0 · `readiness` / `tune` / `optimize` — `launch-loop-readiness` · `align` / `adopt` — the existing-project on-ramp · `vision` — 1 · `explore` — 2 · `discovery` / `landscape` — 3 · `grill` — 4 · `research` — 5 · `deep-research` — 3→5 · `adr` / `architecture` — 6 · `spec` — 7 · `design-validation` / `validate` — 8 · `tickets` — 9 · `implement` / `build` / `ralph` / `loop` — hand over `/launch-implement` · `verify` / `smoke` — 11 · `release` — 12 · `handoff` / `design-handoff` — the design→code on-ramp (`launch-design-handoff`).
64
+ - `setup` / `init` — 0 · `readiness` / `tune` / `optimize` — `launch-loop-readiness` · `align` / `adopt` — the existing-project on-ramp · `vision` — 1 · `explore` — 2 · `discovery` / `landscape` — 3 · `grill` — 4 · `research` — 5 · `deep-research` — 3→5 · `adr` / `architecture` — 6 · `spec` — 7 · `design-validation` / `validate` — 8 · `tickets` — 9 · `implement` / `build` / `ralph` / `loop` — hand over `/launch-implement` · `verify` / `smoke` — 11 · `release` — 12 · `handoff` / `design-handoff` — the design→code on-ramp (`launch-design-handoff`) · `design-implement` / `build design` / `implement design` — hand over `/launch-design-implement` (user-typed; one invocation — it takes a dropped export directly and packages it through the on-ramp on the way, or a package already committed under `docs/design/<slug>/`).
65
65
  - `feature` / `size` — size a described feature (recommend a path; route on request).
66
66
 
67
67
  Unrecognized keyword → show this list and ask.
@@ -70,7 +70,7 @@ A planning session (a grill, a wayfinder ticket, an interview) closes with the b
70
70
  | 11 | Verification | `npx @wemuda/launchrail verify` · `launch-browser-smoke` | Merged work | The gate green; user-facing behavior seen working in a real browser |
71
71
  | 12 | Release | The project's release setup | Verified base | The release cut |
72
72
 
73
- † **User-typed by design** — `disable-model-invocation`: only the user can start these. `launch-wayfinder`/`launch-spec` and `launch-tickets` publish to the tracker; `/launch-implement` spawns agents and merges PRs. A conductor prepares the handoff instead of calling them — see the conductor rules.
73
+ † **User-typed by design** — `disable-model-invocation`: only the user can start these. `launch-wayfinder`/`launch-spec` and `launch-tickets` publish to the tracker; `/launch-implement` spawns agents and merges PRs. `/launch-design-implement` — not a stage, but the faithful build of a design package (see *Returning from Claude Design*) — is user-typed for the same reason: implementation is never started unprompted. A conductor prepares the handoff instead of calling them — see the conductor rules.
74
74
 
75
75
  Stage notes:
76
76
 
@@ -98,6 +98,8 @@ The stages drive Claude Design code→design (stages 2 and 8). The delivery loop
98
98
 
99
99
  From there the normal sizing paths apply, with two design-first twists: the handoff doc's open questions become the feature grill's agenda (the handoff feeds the grill, as the grill feeds research), and the spec cites `docs/design/<feature-slug>/` as its UX/UI reference — so design validation typically becomes a recorded skip citing the package, recorded through the `design-validation` skill as always. Like alignment, this is an on-ramp onto the same rail, not a second workflow; the handoff skill routes and never starts implementation.
100
100
 
101
+ When the prototype *is* the spec — a redesign of an existing page, or a new page whose behavior the canvas fully shows — the handoff proposes a **faithful build** instead of a size: the user-typed `/launch-design-implement "<canvas>"` — one invocation, taking the dropped export directly and composing the on-ramp to package it on the way, or a package already committed — builds that one canvas under the [fidelity protocol](../launch-design-implement/fidelity.md) ([design-fidelity-build](https://github.com/wemuda/launchrail/blob/master/docs/adr/2026-09-17-design-fidelity-build.md)). The state inventory and the token, component, and data maps are written to `docs/design/<slug>/fidelity.md` before the build; the product is built from the prototype's own markup and styles, state by state; and every state is compared side by side with the running prototype at the designed viewport, its verdict recorded, until each row is a match or an accepted deviation with a reason. A ticket that names a design package follows the same protocol inside the loop through `launch-ralph-implement`, and the browser smoke's named design comparison is the protocol's side-by-side — one definition of "true to the design", wherever a design gets built.
102
+
101
103
  ## Adopting an existing project
102
104
 
103
105
  When `.launchrail.yml` records `origin: existing`, stage 1 is reached through the Launchrail `project-alignment` skill: it inventories what the codebase already has, infers a draft vision from the code, interviews only the gaps, and detects the existing design system as the baseline for stages 2 and 8, then hands to `vision-creation` to commit ([ADR-0013](https://github.com/wemuda/launchrail/blob/master/docs/adr/0013-existing-project-alignment.md)). Alignment is an on-ramp onto the same rail, not a second workflow.
@@ -33,7 +33,7 @@ A hosted session (`CLAUDE_CODE_REMOTE=true`) is always a fresh clone, and a miss
33
33
  - `npx agent-browser errors`, `console`, `network requests` — after each step, not only at the end. `errors` is uncaught exceptions only; `console` carries the page's own error logs.
34
34
  3. **Click around beyond the happy path.** The obvious wrong input, the empty state, a reload, the back button. You are looking for what the ticket did not spell out.
35
35
  4. **The standard checks, every time:** no uncaught exceptions, no failed requests, the success state visible in a screenshot you looked at, the data still there after a reload.
36
- 5. **Design:** compare the screen to a design only when the ticket or spec names one (a `docs/design/` handoff, a mockup). Never invent a comparison.
36
+ 5. **Design:** compare the screen to a design only when the ticket or spec names one (a `docs/design/` handoff, a mockup). Never invent a comparison. When it is a handoff package, the comparison is the [fidelity protocol's](../launch-design-implement/fidelity.md) side-by-side: the prototype driven to the same state in a second session at the designed viewport, both screenshots looked at, the verdict recorded in the package's `fidelity.md`.
37
37
 
38
38
  ## When something is wrong
39
39
 
@@ -1,16 +1,16 @@
1
1
  ---
2
2
  name: launch-design-handoff
3
- description: The design→code on-ramp — turn a Claude Design prototype dropped into the session (a .zip export, an extracted folder, artboard/HTML files, or a published canvas link) into a committed handoff package under docs/design/, then route it into the delivery loop. Use when the user drops design files from Claude Design and wants them documented or implemented — "here is the prototype of feature X" — or asks to bring designs back from Claude Design into code.
3
+ description: The design→code on-ramp — turn a Claude Design prototype dropped into the session (a .zip export, an extracted folder, artboard/HTML files, or a published canvas link) into a committed handoff package under docs/design/, then route it — into the planning path, or to /launch-design-implement when the prototype is the spec. Use when the user drops design files from Claude Design and wants them documented or implemented — "here is the prototype of feature X" — or asks to bring designs back from Claude Design into code.
4
4
  ---
5
5
 
6
6
  # Design handoff — from Claude Design back into the loop
7
7
 
8
- The rail drives Claude Design in two places — visual exploration (stage 2) and design validation at the top fidelity (stage 8). The delivery loop also runs the reverse trip: design work happens *in* Claude Design — a tweak, the next few pages, a redesign — and comes back as files. This skill is the **on-ramp for that return trip**: it turns a dropped prototype into a committed, readable handoff package and routes the work into the loop at the right size. It builds nothing itself — it gets the design intent into the repository as an artifact the planning stages can gate on and reference, then hands over.
8
+ The rail drives Claude Design in two places — visual exploration (stage 2) and design validation at the top fidelity (stage 8). The delivery loop also runs the reverse trip: design work happens *in* Claude Design — a tweak, the next few pages, a redesign — and comes back as files. This skill is the **on-ramp for that return trip**: it turns a dropped prototype into a committed, readable handoff package and routes the work into the loop at the right size. It builds nothing itself — it gets the design intent into the repository as an artifact the planning stages can gate on and reference, then hands over: to the planning path, or to the user-typed `/launch-design-implement` when the prototype *is* the spec and one canvas should be built true to it ([the fidelity protocol](../launch-design-implement/fidelity.md)).
9
9
 
10
10
  ## Ground rules
11
11
 
12
12
  - **The package is committed, and everything in it is project-owned.** A dropped zip has no durable link and the session is ephemeral — so unlike stage 8's validation evidence, which stays linked ([ADR-0016](https://github.com/wemuda/launchrail/blob/master/docs/adr/0016-design-validation-fidelity-ladder.md)), a handoff prototype is the input of record for implementation and lands in the repo ([ADR-0024](https://github.com/wemuda/launchrail/blob/master/docs/adr/0024-design-handoff-onramp.md)). Launchrail tooling never rewrites `docs/design/`.
13
- - **Read the artboards, don't just file them.** Claude Design artboards are self-contained HTML: real layout, spacing, colors, type, and copy. The handoff doc is written from what the files actually say, cross-checked against what the user said the drop is.
13
+ - **Read the artboards, don't just file them.** Claude Design artboards are self-contained HTML: real layout, spacing, colors, type, and copy. An export holds one file per canvas, and one canvas can be a whole clickable prototype — screens, tabs, and modals switched by its own script — so reading means the markup, the styles, *and* the script, and the inventory lists every state the prototype can reach, not its first render ([fidelity protocol §1](../launch-design-implement/fidelity.md)). The handoff doc is written from what the files actually say, cross-checked against what the user said the drop is.
14
14
  - **Interview only what documenting needs; leave alignment to the grill.** This skill asks just enough to file the package truthfully — scope, intentional-vs-accidental design-system divergence, load-bearing copy. Everything the prototype is silent on (missing states, behavior rules, edge cases) is *recorded as open questions* that become the feature grill's agenda, not interviewed twice.
15
15
  - **Design-system deltas are findings, not fixes.** Where the prototype's tokens diverge from the project's existing design system, ask whether that is an intentional restyle or an accident. Never silently normalize the prototype, and never silently fork the design system.
16
16
  - **The committed prototype has authority downstream.** Once the package is committed, the behavior it shows is *presumed in scope* for the planning stages that consume it ([ADR-0029](https://github.com/wemuda/launchrail/blob/master/docs/adr/0029-planning-interaction-contract.md)): the grill and spec treat it as a decision record, and cutting something it shows requires a concrete safety, infrastructure, or measured-cost reason — never a simplification default. Record that presumption in `handoff.md` so it survives the session.
@@ -18,18 +18,19 @@ The rail drives Claude Design in two places — visual exploration (stage 2) and
18
18
 
19
19
  ## Process
20
20
 
21
- 1. **Take intake.** Accept whatever arrived: a `.zip` (unpack in a scratch directory — never straight into the repo), an extracted folder, loose artboard/HTML/image exports, or a published canvas link (export what is reachable; if the session can't reach it, ask for the zip). Strip packaging junk (`__MACOSX/`, `.DS_Store`, editor caches). Confirm scope in one line: which feature this is, and whether it reads as a tweak, new pages, or a redesign.
22
- 2. **Inventory and read.** For each artboard/screen: name it, read its markup, and note layout, components, states shown, and copy. Identify components repeated across screens, and the assets (images, fonts) the screens actually reference — anything shipped but unused stays out of the package and is noted as excluded.
21
+ 1. **Take intake.** Accept whatever arrived: a `.zip` (unpack in a scratch directory — never straight into the repo), an extracted folder, loose artboard/HTML/image exports, or a published canvas link (export what is reachable; if the session can't reach it, ask for the zip). Strip packaging junk (`__MACOSX/`, `.DS_Store`, editor caches). **Name the canvases:** list every canvas file (`<name>.dc.html`, or artboard) by its `<title>` and filename, and match the user's words to the one(s) the drop is about — the others are context or earlier iterations, and a canvas byte-identical to one already committed under `docs/design/` is noted as unchanged. Ask when two could fit; never guess. Confirm scope in one line: which feature this is, which canvas, and whether it reads as a tweak, new pages, or a redesign.
22
+ 2. **Inventory and read.** For each artboard/screen: name it, read its markup, and note layout, components, states shown, and copy. When a canvas is an interactive prototype, run the state inventory from [fidelity protocol §1](../launch-design-implement/fidelity.md) — read its script for every branch, then open it in a browser at the designed viewport and click through everything — so the inventory carries each reachable state and how it is reached; record the designed viewport ("1080p" is 1920×1080). Identify components repeated across screens, and the assets (images, fonts) the screens actually reference — anything shipped but unused stays out of the package and is noted as excluded.
23
23
  3. **Diff against the code.** Classify each screen against the current implementation: **new** (no counterpart), **changed** (a counterpart exists — enumerate the deltas: layout, components, tokens, copy), or **context** (unchanged, included for orientation only). Extract the tokens the prototype actually uses (palette, type scale, spacing, radii) and compare them with the project's design-system baseline (theme/tokens/Tailwind config, component library — the baseline `launch-project-alignment` records). Express deltas in the project's vocabulary where one exists.
24
24
  4. **Ask the documenting questions.** Settle only what the package can't be filed without: confirm the scope reading, rule on each design-system divergence (intentional or accident), and flag copy that reads load-bearing (is it real or placeholder?). Everything else the prototype doesn't show — empty/loading/error states, responsive behavior, permissions, motion, validation rules — goes into the handoff doc's **Open questions**, addressed to the grill.
25
25
  5. **Commit the package** under `docs/design/<feature-slug>/`:
26
26
  - `prototype/` — the design files as received (after the junk strip), verbatim. Never edit an artboard; it is the designer's record.
27
- - `handoff.md` — the distilled contract: date and source; scope (tweak / extension / redesign) in a paragraph; the screen inventory (per screen: file, intent, new/changed/context with deltas, states shown, states missing); the component map (prototype component → existing code component, or "new"); token/design-system deltas with the intentional-vs-accident ruling; assets kept and excluded; **Open questions** (the grill's agenda); and the recommended path. Record the precedence rule: implementation follows the prototype for look and layout, `handoff.md` for behavior, states, and everything the pixels don't show.
27
+ - `handoff.md` — the distilled contract: date and source (the export's name, the canvases it held, the one(s) this package is about, the designed viewport); scope (tweak / extension / redesign) in a paragraph; the screen inventory (per screen: file, intent, new/changed/context with deltas, states shown, states missing); the component map (prototype component → existing code component, or "new"); token/design-system deltas with the intentional-vs-accident ruling; assets kept and excluded; **Open questions** (the grill's agenda); and the recommended path. Record the precedence rule: implementation follows the prototype for look and layout, `handoff.md` for behavior, states, and everything the pixels don't show.
28
28
 
29
29
  One slug per feature; use the same `docs/design/` root as earlier handoffs (visual identity, prior features) so design references accumulate in one place. Iterating on the same feature revises the same slug — replace `prototype/`, revise `handoff.md` in place with a dated revision note — never a blind overwrite of settled answers, and never a second competing package for one feature.
30
30
  6. **Route.** Recommend a size with a one-line reason and let the user confirm (sizing is `launch`'s call; this is the on-ramp's proposal):
31
31
  - **Tweak** — token/copy/spacing changes to existing screens → short feature grill → `launch-tickets`, prototype as the visual reference.
32
32
  - **New pages / a feature on the existing system** (the common case) → short feature grill *fed this handoff doc, its open questions as the agenda* → `launch-spec`, naming `docs/design/<feature-slug>/` as the design reference the spec cites for UX/UI → `launch-tickets`. Because the spec is written *from* the prototype, design validation usually becomes a recorded skip citing this package — recorded through `launch-design-validation` as always, so the gate stays artifact-based.
33
33
  - **Redesign / new surface area** → `launch-wayfinder` and the full large-feature path.
34
+ - **Faithful build** — the prototype *is* the spec: a redesign of an existing page, or a new page whose behavior the canvas fully shows, with no open question that blocks a state it draws → hand over `/launch-design-implement <slug> "<canvas>"`. It builds that one canvas from the prototype's own code, state by state, and verifies it side by side at the designed viewport ([fidelity protocol](../launch-design-implement/fidelity.md)); the open questions the prototype is silent on stay parked in `handoff.md` for a later grill. This is the path for "take this canvas and implement it" — the sized paths are for a *feature* the design opens. A user who already wants the canvas built doesn't come through here first: they type `/launch-design-implement` with the drop, and it calls this skill to make the package on the way.
34
35
 
35
- Then hand to `/launch`, naming the committed `handoff.md` as the input, and close with the rail banner ([`workflow.md`](../launch/workflow.md)'s phase view): the committed package under Done, the recommended path as the feature's phase arc, the `➤` line carrying the sizing command. Never start `/launch-implement` yourself — every path ends there by the user's hand.
36
+ Then hand to `/launch`, naming the committed `handoff.md` as the input — or, for the faithful build, hand the user the fully-argumented `/launch-design-implement` command — and close with the rail banner ([`workflow.md`](../launch/workflow.md)'s phase view): the committed package under Done, the recommended path as the feature's phase arc, the `➤` line carrying the next command. Never start `/launch-implement` or `/launch-design-implement` yourself — every path ends there by the user's hand. When `launch-design-implement` itself called this skill to package a fresh drop, stop at the committed package: no sizing, no banner — return, and it continues; your documenting questions are then part of its one interview, so ask only what the package cannot be filed without and let it batch the rest.
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: launch-design-implement
3
+ description: One invocation from a Claude Design export to a built page — drop the zip (or name a package already committed under docs/design/), name the canvas, and this skill packages it, writes the fidelity contract, builds the canvas from the prototype's own markup and styles state by state, and verifies it side by side against the running prototype in a real browser at the designed viewport before it counts as done. Use when the user wants a Claude Design prototype implemented as a redesign or a new page — "implement the issue detail prototype", "build this design", "make it look like the Claude Design version".
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Design implement — build the prototype, not an impression of it
8
+
9
+ A design that comes back from Claude Design is running code: every screen, modal, and sub-page of the canvas, with exact spacing, type, color, and copy. Implementations "miss the mark" in six known ways — the agent reads screenshots instead of that code; builds the first render and skips the states behind clicks; normalizes the design toward the components and tokens the product already has; never puts the two side by side at the size the design was approved at; picks the wrong canvas from an export that holds several; and quietly drops or fakes data the prototype shows. This skill closes all six in **one invocation**: the user drops the export (or names a package already under `docs/design/`), names the canvas, and types the command — the skill packages the drop, writes the contract, builds **that one canvas** under the [fidelity protocol](fidelity.md) (what "true" means), and ends only when every reachable state of the prototype exists in the product and has been compared against it on screen. Nothing has to be run before it.
10
+
11
+ It is user-typed, like `/launch-implement`: only the user starts a build. `/launch-implement` stays the door for tickets; a ticket that names a design package follows the same protocol through `launch-ralph-implement`. Packaging is composed, never re-done here: `launch-design-handoff` owns the handoff package and is called for it on the way ([ADR design-fidelity-build](https://github.com/wemuda/launchrail/blob/master/docs/adr/2026-09-17-design-fidelity-build.md)).
12
+
13
+ ## Ground rules
14
+
15
+ - **The prototype's code is the source of truth.** Values come from its markup and styles (or its computed styles in the browser), never from eyeballing an image. Screenshots verify; they never inform.
16
+ - **Every reachable state is in scope** — screens, tabs, modals, drawers, expanded rows, hover and focus treatments, the empty and error variants it draws. The state inventory is written before the first line of product code, and a state on it stays there until it is built or accepted with a reason.
17
+ - **Structure from the prototype, idiom from the project.** Port layout and values into the product's component model and styling system; reuse an existing component only when it renders the state with no visible difference; never restyle the design toward what exists. Where the design system must change to carry the prototype, change it.
18
+ - **Data is real or declared.** Every visible datum maps to a source, is marked placeholder, or is a recorded decision. Nothing is faked in product code; nothing is dropped silently.
19
+ - **Verified means compared.** The build is done when every row of the record is `match` or `accepted` after a side-by-side look at the designed viewport — a row you could not compare is `unverified` and is reported that way, never as done.
20
+ - **The interaction contract applies** ([`workflow.md`](../launch/workflow.md)): at most three questions per round, each with a recommended answer, and the prototype is a decision record — "as shown" is the default. Ask only what blocks a shown state.
21
+
22
+ ## Step 0 — a fresh clone has nothing installed
23
+
24
+ In a hosted session (`CLAUDE_CODE_REMOTE=true`), or whenever `node_modules` is missing, run `node scripts/setup.mjs` first, unconditionally — it installs dependencies, Playwright's Chromium, and `agent-browser` (the `launch-browser-smoke` skill's step zero).
25
+
26
+ ## Step 1 — Resolve the source, then echo it
27
+
28
+ 1. **The package — made on the way.** The usual input is a fresh drop: a `.zip` export, an extracted folder, or artboard files in the session. Call the Skill tool with **`launch-design-handoff`** and tell it the package is for a faithful build — it unpacks in a scratch directory, names the canvases, reads and inventories the prototype, asks only its documenting questions, commits `docs/design/<slug>/` (`prototype/` verbatim plus `handoff.md`), and returns without sizing or routing; then continue here. Never unpack an export straight into the repo yourself, and never re-derive the package inline. When the user instead names a package already committed under `docs/design/<slug>/`, read its `handoff.md` and `prototype/` in full and skip the packaging.
29
+ 2. **The canvas.** List every canvas in `prototype/` — each `.dc.html` (or artboard file) by its `<title>` and filename. Match the user's words to exactly one; when two could fit, ask (one question). Several canvases build in sequence, one contract each — never one blended contract.
30
+ 3. **The viewport.** From `handoff.md`; else the fixed dimensions on the canvas root or frame; else ask — "1080p" is 1920×1080.
31
+ 4. **The branch.** The session's designated working branch when the environment pinned one; otherwise `design/<slug>` from a fresh sync of the default branch. Push it before the first product change.
32
+ 5. **Echo, once, before any code** — the one pre-build report, in the shape of `/launch-implement`'s scope echo: canvas and file; viewport; what it maps to in the product (routes or pages, each `new` or `changed` per `handoff.md`); the token rulings the handoff made; the branch. A misread canvas corrected here costs a sentence; corrected after the build it costs the build.
33
+
34
+ ## Step 2 — Write the contract before the code
35
+
36
+ 1. **Inventory the states** — [fidelity.md §1](fidelity.md): read the script and markup for every branch, then open the prototype in the browser at the designed viewport and click through everything, recording how each state is reached and what in it must match.
37
+ 2. **Map tokens, components, and data** — [§2 and §3](fidelity.md). The handoff's intentional-vs-accident rulings decide which values become tokens; everything else ships verbatim and is marked `raw`. Each visible datum is sourced, placeholder, or missing.
38
+ 3. **Write `docs/design/<slug>/fidelity.md`** from the [§5 template](fidelity.md) with every state `pending`, and commit it. The contract exists before the build so nothing can be narrowed quietly along the way — a state that is hard to build is a `deviation` to argue in the open, not a row that disappears.
39
+ 4. **Ask what blocks a shown state — and nothing else.** Missing data that changes what the page promises; an interaction the prototype implies but cannot show (what a button does after the click it animates). Three questions per round at most, each with a recommended answer; everything reversible is an agent default written into the record as Provisional. Questions the prototype is silent on (states it doesn't draw) stay in `handoff.md`'s open questions for the grill; they don't gate this build. **One interview, not two:** when the package was made in this invocation, the handoff's documenting questions (the scope reading, a token divergence ruling, load-bearing copy) and these blocking questions share the same rounds and the same session budget — batch them, in that order, and let the prototype's authority answer everything it can.
40
+
41
+ ## Step 3 — Build, state by state
42
+
43
+ 1. **Order.** The main screen's default state first, then the rows in table order. Compare each row (Step 4) as soon as it is built — a build that compares once at the end finds its deviations when they are most expensive to fix.
44
+ 2. **Port, don't reinterpret.** For each row, read the prototype's DOM and styles for that state — `agent-browser get styles <sel>` and `get box <sel>` on the running prototype when the stylesheet is indirect — and write the same structure and values in the project's idiom. A value changes only where a token ruling maps it. An existing component is reused only for an identical render; otherwise extend it with a variant or build the element.
45
+ 3. **Replace, don't accumulate.** When a row replaces an existing design (an earlier redesign attempt, the old page), the replaced markup and styles go in the same change once the row matches — never two designs left behind for someone to reconcile.
46
+ 4. **Wire real data.** Sourced data comes from the real field; placeholder copy from the prototype never ships; a missing datum follows its recorded decision. No sample data in product code, no `TODO` standing in for a state.
47
+ 5. **Test what has behavior.** Tabs, expand/collapse, modal open and close, filters — the state logic gets a unit or component test at the cheapest seam. Tests written for the replaced design are updated deliberately, never deleted to get green.
48
+ 6. **Push cadence.** Commit and push after every green step, as `launch-ralph-implement` does; the pushed branch is the checkpoint a lost session resumes from. Conventional Commits when the manifest says so.
49
+
50
+ ## Step 4 — Verify side by side
51
+
52
+ The loop that makes the build true — [fidelity.md §4](fidelity.md):
53
+
54
+ 1. **Start the product** from the manifest: `npx @wemuda/launchrail dev --background` (with `--port <n>` when builders share the machine), then `set -a; . .launchrail/state/browser.env; set +a`. Read the origin from `.launchrail/state/stack.json`. A stack `dev` cannot start is a blocker to report with the exact gap (see the smoke skill's `composed-stack.md`), not something to rebuild by hand here. Seed whatever data every row needs to be reachable.
55
+ 2. **Two sessions, one viewport.** `AGENT_BROWSER_SESSION=proto` opens the committed prototype file (`file://…/docs/design/<slug>/prototype/<canvas>.dc.html`; a static server on the `prototype/` directory if the driver refuses file URLs); `AGENT_BROWSER_SESSION=app` opens the product. `agent-browser set viewport <w> <h>` on both before the first `open`.
56
+ 3. **Per row:** drive the prototype to the state by its recorded path, `screenshot` it to `.launchrail/state/design/<slug>/<id>.proto.png`; drive the product to the same state through its real UI, `screenshot` to `<id>.app.png`; open both images with the Read tool and compare the row's specifics, then the constants — layout, spacing, type, color, radii and shadows, icons, copy. Measure with `get box` and `get styles` where the eye can't tell.
57
+ 4. **Record the verdict** in `fidelity.md` — `match`, or `deviation` with what and why — fix the deviation, re-capture, repeat. `accepted` only with a concrete reason and who accepted it; "close enough" is a deviation.
58
+ 5. **The standard checks** on the product side after the rows: `errors`, `console`, `network requests`, a reload. Then one narrower width, once, for overflow and clipping — never to judge fidelity.
59
+ 6. **Close the browsers**: `npx agent-browser close` for each session, `npx @wemuda/launchrail dev --stop`.
60
+
61
+ Captures are regenerable and never committed; `.launchrail/state/` ignores itself. If no browser can run here — `modules.browser-testing` off, or the driver and its fallback both unavailable — the build is **unverified**: mark every compared-nothing row `unverified`, say so in the close, and recommend `npx @wemuda/launchrail add browser-testing`; the throwaway `playwright-core` script the smoke skill describes can still capture both sides when only the driver is missing.
62
+
63
+ ## Step 5 — Gate, record, close
64
+
65
+ 1. `npx @wemuda/launchrail verify --fast`, then the full `npx @wemuda/launchrail verify` — green before any PR. Call the Skill tool with `launch-code-review` and fix what it finds.
66
+ 2. Finalize `fidelity.md`: every row `match` or `accepted`, the accepted deviations listed with reasons, the data decisions, the verification line (counts, gates, checks). Commit and push it with the build.
67
+ 3. **The change ships as a PR of its own** — a single-scope build, so its base is the default branch (or the pinned designated branch): open the PR per the environment's rules, `Closes #n` when a ticket exists. Never merge it yourself.
68
+ 4. **Report evidence, not assertions:** states matched, accepted deviations with their reasons, anything unverified, gate outcomes, the PR. Then the rail banner ([`workflow.md`](../launch/workflow.md)'s phase view): the canvas under Build ✓ and Ship — verification and release — as what remains; the `➤` line carries the one next action.
69
+
70
+ ## Iterating — a new export of the same canvas
71
+
72
+ The user goes back to Claude Design, changes the canvas, and drops a new zip. Call `launch-design-handoff` to revise the package in place (same slug, dated revision note, the prototype file replaced), `git diff` the prototype file to see what moved, reset the touched rows to `pending`, rebuild them — and re-run Step 4 on **every** row: a re-export can shift what the diff doesn't name.
@@ -0,0 +1,98 @@
1
+ # The fidelity protocol — what "true to the prototype" means
2
+
3
+ A Claude Design prototype comes back as running code: real markup, real styles, a script that switches its screens and opens its modals. An implementation is *true* to it when every state the prototype can reach exists in the product and looks the same at the viewport the design was approved at — not when the first render resembles a screenshot. This file is the operational definition. `launch-design-implement` builds under it; `launch-design-handoff` uses §1 to inventory an interactive prototype; `launch-ralph-implement` follows it when a ticket names a `docs/design/<slug>/` package; `launch-browser-smoke`'s named design comparison is §4.
4
+
5
+ ## Reading a Claude Design export
6
+
7
+ - **One file per canvas.** An export zip carries each canvas of the project as a self-contained HTML file (`<name>.dc.html` — inline styles and script, sometimes an `assets/` folder beside it). Its `<title>` or filename is the name the user refers to; an export usually holds *several* canvases, and only the one(s) the user names are the subject — the rest are context or earlier iterations. Never guess: list them, match the user's words, ask when two could fit.
8
+ - **One canvas can be a whole clickable prototype.** A single file may hold a page, its sub-pages, tabs, drawers, and modals, switched by its own script. Opened in a browser, it runs. Reading it means reading the markup, the stylesheet, *and* the script — not the first render.
9
+ - **Values live in the code.** Spacing, sizes, colors, radii, shadows, weights, line-heights, and copy are literal in the file — custom properties, utility classes, inline styles. Take them from there. When a value is indirect (a class chain, a computed layout), read it off the running prototype: `agent-browser get styles <sel>` for computed styles, `get box <sel>` for the rendered box.
10
+ - **The designed viewport** is the size the design was approved at: fixed dimensions on the canvas root or frame in the file, or what the user says ("1080p" is 1920×1080). Everything below is judged at that viewport; record it in `handoff.md` and `fidelity.md`.
11
+
12
+ ## 1. The state inventory — every reachable state is in scope
13
+
14
+ A **state** is any distinct render the prototype can reach: a screen or sub-page; a tab; a modal, drawer, popover, menu, or tooltip; an expanded row or section; a filter, sort, or selection applied; a hover, focus, or active treatment the prototype styles; an empty, loading, error, long-content, or permission variant it shows; a step in a flow. Two states differ when a user would see a different screen.
15
+
16
+ **Find them twice** — the second pass catches what the first missed:
17
+
18
+ 1. **Read the script and markup.** Hidden sections (`hidden`, `display: none`, off-canvas), class or `data-*` toggles, click handlers, anything that swaps content or routes between views. Every branch is a state.
19
+ 2. **Drive the prototype.** Open the file in the browser at the designed viewport, `snapshot -i`, click every interactive element (re-snapshot after each click — refs die on re-render), scroll to the bottom of every screen, hover and focus what the styles treat. Every new render is a state; note exactly how you reached it.
20
+
21
+ **Record each state as a row:** an id (`S1`, `S2`, …), a name, its kind, how it is reached in the prototype (the click path from the initial render), and the *specifics that must match* — the elements, copy, and treatments particular to that state (a badge, an inline form, a disabled control, a count).
22
+
23
+ **The completeness rule.** A state the prototype reaches and the product doesn't is a deviation, never an omission — it stays on the table until built or explicitly accepted with a reason. A state the prototype does *not* show (a validation error it never renders, a width it isn't drawn at) is an open question for `handoff.md`, never invented: build what is shown, record what isn't.
24
+
25
+ ## 2. Token and component maps — structure from the prototype, idiom from the project
26
+
27
+ - **Tokens.** Map each value the prototype uses to the project's design system only where `handoff.md` rules the divergence *intentional* and names the token — or where the value already equals the token. Any other value ships verbatim, marked `raw` in the record, until a ruling exists. Never substitute the nearest existing token, and never restyle the prototype toward what the product already has; where the design system must change to carry the prototype, change the design system (that is the ruling's meaning).
28
+ - **Components.** Map each prototype element to an existing component only when that component renders the state with no visible difference; otherwise a variant of it, or a new component. "No visible difference" is proven by the comparison in §4, never assumed from a name — an existing `Card` is not the prototype's card because both are called cards.
29
+ - **Structure.** Port the prototype's layout technique and dimensions (grid vs. flex, fixed vs. fluid, column widths, gaps) into the project's component model; do not re-derive a layout from a screenshot. Where the product's framework forces a different DOM, the *render* still has to match.
30
+
31
+ ## 3. The data map — real or declared, never faked
32
+
33
+ Every visible datum in a state is one of:
34
+
35
+ - **sourced** — a real field, prop, or computation; name it;
36
+ - **placeholder** — sample content the prototype needed (names, dates, counts) that the real source replaces; and
37
+ - **missing** — shown by the prototype with no source in the product today.
38
+
39
+ Placeholder copy never ships in code. A **missing** datum is a decision, recorded before the build: a `decide-now` question for the user when it changes what the page promises (at most three per round, each with a recommended answer), otherwise an agent default — usually "build the layout; the element renders when the data exists" — written into the record as Provisional. Neither faking the value nor dropping the element silently is an option. The prototype is a decision record ([ADR-0029](https://github.com/wemuda/launchrail/blob/master/docs/adr/0029-planning-interaction-contract.md)): "as the prototype shows it" is the default answer to every question.
40
+
41
+ ## 4. The side-by-side comparison — same state, same viewport, both looked at
42
+
43
+ Verification is you, looking at the prototype and the product in the same state at the same size, and saying whether they match. Nothing else counts as verified.
44
+
45
+ 1. **Two browser sessions**, one viewport. `AGENT_BROWSER_SESSION=proto` for the prototype, `=app` for the product; `agent-browser set viewport <w> <h>` on each before the first `open`. The prototype opens from its committed file (`file://<absolute path to docs/design/<slug>/prototype/<canvas>.dc.html>`; if the driver refuses file URLs, serve the `prototype/` directory with any static server on a free port). The product runs from the stack `launchrail dev --background` started, with data seeded so every row is reachable.
46
+ 2. **Per row:** drive the prototype to the state by its recorded path and `screenshot`; drive the product to the same state through its real UI and `screenshot`; open both images and compare. Where the eye cannot tell, measure: `get box` for positions and sizes, `get styles` for type, color, spacing, radius, shadow — on both sides, same element.
47
+ 3. **Compare the state's specifics** (the row's "must match"), then the constants: layout and alignment; spacing rhythm; type family, size, weight, line-height; color of text, surfaces, borders; radii and shadows; iconography; copy, casing, and punctuation; the treatment of the interactive element that reached this state.
48
+ 4. **Verdicts** — one per row, always current in the record:
49
+ - `pending` — not yet built or not yet compared;
50
+ - `match` — no visible difference at the designed viewport (sub-pixel and font-rendering noise is not a difference; a different font family, weight, or size is);
51
+ - `deviation` — a visible difference, described: what, where, and why it is there — to be fixed and re-captured;
52
+ - `accepted` — a deviation kept on purpose, with its concrete reason (data that does not exist, a platform constraint, the user's call) and who accepted it; "close enough" is not a reason;
53
+ - `unverified` — built but not compared on screen (no browser available); reported as such, never as done.
54
+ 5. **The checks the smoke always runs**, on the product side: no uncaught exceptions, no failed requests, the state still correct after a reload.
55
+ 6. **One narrower width**, once, on the product only — to catch overflow, clipping, and wrapped controls. Fidelity is judged at the designed viewport; behavior at other widths the prototype doesn't draw is an open question, not a deviation.
56
+
57
+ **Captures** live under `.launchrail/state/design/<slug>/` as `<row-id>.proto.png` and `<row-id>.app.png` (the directory ignores itself once `launchrail dev` has run; if it doesn't exist yet, create it with a `.gitignore` containing `*`). They are regenerable from the committed prototype and the running product, so they are never committed — the prototype file is the durable reference, the record below is the durable verdict.
58
+
59
+ ## 5. The record — `docs/design/<slug>/fidelity.md`
60
+
61
+ Project-owned, written *before* the build with every row `pending` and kept current until every row is `match` or `accepted`. It sits beside `handoff.md`: the handoff says what the design is and decides; this file says what was built against it and how it was proven.
62
+
63
+ ```markdown
64
+ # Fidelity — <canvas name>
65
+
66
+ Canvas: `prototype/<file>.dc.html` · Viewport: 1920×1080 · Revision: <date> (<zip or export name>)
67
+ Built on: <branch> · Routes: <product routes or pages this canvas maps to>
68
+
69
+ ## States
70
+
71
+ | Id | State | Reached in the prototype by | In the product at | Component / file | Verdict | Note |
72
+ |---|---|---|---|---|---|---|
73
+ | S1 | Issue detail — default | initial render | `/issues/:id` | `IssueDetail.tsx` | match | |
74
+ | S2 | Trace tab, row expanded | Trace tab → first row | `/issues/:id?tab=trace` → click row | `TraceRow.tsx` | deviation | expanded row misses the 1px divider (#E5E7EB) — fixing |
75
+ | S3 | Assign modal | header → Assign | header → Assign | `AssignDialog.tsx` | accepted | search field omitted: no user search endpoint yet (user, 2026-09-17) |
76
+
77
+ ## Tokens
78
+
79
+ | Prototype value | Used for | Project token | Ruling |
80
+ |---|---|---|---|
81
+ | `#2563EB` | primary action | `--color-primary` | equal |
82
+ | `14px / 500` | meta labels | — | raw (no ruling in handoff.md) |
83
+
84
+ ## Data
85
+
86
+ | Shown | Source | Decision |
87
+ |---|---|---|
88
+ | assignee avatar | `issue.assignee.avatarUrl` | sourced |
89
+ | "captured" badge on request body | `issue.serverContext.requestBody` | sourced — renders only when present (Provisional) |
90
+
91
+ ## Accepted deviations
92
+ - S3 — search field: no user search endpoint; the modal lists members without a filter. Accepted by the user, 2026-09-17. Reopens when the endpoint lands.
93
+
94
+ ## Verification
95
+ <date> — <n> of <m> states match, <k> accepted, 0 pending; gates: `verify --fast` green, `verify` green; standard checks clean.
96
+ ```
97
+
98
+ Revising the canvas later (a new export) updates this file in place: bump the revision line, reset the rows the diff touched to `pending`, and re-run §4 on every row — a re-export can move things the diff doesn't name.
@@ -11,7 +11,7 @@ You are the orchestrator. **You do not write code. You do not read diffs. You do
11
11
 
12
12
  **Output budget: decisions, not working.** You owe the user two reports per run — a one-line pre-launch echo (scope, target, engine) and the close-out recap — plus any *failure* or *changed plan* the moment it happens. Everything else is working, not output: precondition checks, base-branch resolution, guard-hook state, journal reads, arming check-ins. Do it silently. A passing check is not a status update; a launched run is not a recap; the scope, target, and engine are stated once at the echo and once at close-out, never restated between. Keep the running log for yourself — surface it only at those two moments.
13
13
 
14
- One agent implementing a whole backlog in a single session degrades — context fills with diffs and half-remembered state, and quality drops with every ticket. This loop inverts that: every ticket gets a fresh-context implementer subagent that owns the build through a pushed, fast-gate-green `ralph/<n>-*` branch; the loop lands that branch itself — a local squash-merge onto the integration base under its own gate run, pushed straight to the remote — and nothing anyone reports is trusted until the remote confirms it. There is no per-ticket PR and no cloud-CI wait anywhere in the loop: the same gate that CI would run runs locally in minutes (or seconds, on warm caches), and cloud CI runs once, on the release PR the run offers at the end (ADR-0032).
14
+ One agent implementing a whole backlog in a single session degrades — context fills with diffs and half-remembered state, and quality drops with every ticket. This loop inverts that: every ticket gets a fresh-context implementer subagent that owns the build through a pushed, fast-gate-green `ralph/<n>-*` branch; the loop lands that branch itself — a local merge onto the integration base (the branch's own commits preserved) under its own gate run, pushed straight to the remote — and nothing anyone reports is trusted until the remote confirms it. There is no per-ticket PR and no cloud-CI wait anywhere in the loop: the same gate that CI would run runs locally in minutes (or seconds, on warm caches), and cloud CI runs once, on the release PR the run offers at the end (ADR-0032).
15
15
 
16
16
  This skill is the loop's contract and its supervisor. The loop itself runs as the deterministic `ralph` workflow (`.claude/workflows/ralph.js`, installed by init; `launchrail sync` restores it) — **the workflow is the engine for every multi-ticket run**, launched with the resolved scope and integration target as JSON args and then supervised per this skill; its script state cannot be compacted away. Orchestrating dispatches from this session instead is the exception, and it is chosen out loud — name the engine and why before anything dispatches: the user asked to watch each dispatch, the Workflow tool is unavailable in this environment, or this is a targeted intervention (one parked ticket, re-run watchably). A hand-rolled fan-out that is neither is not the loop. And the exception swaps only who orchestrates, never the shape: fresh context per ticket, per-ticket pushed branches landed one at a time by the loop's own local gate onto the target, and the full gate at checkpoints survive every engine. An environment rule about branches or PRs re-targets the run (see Integration target) — it never selects this exception and never licenses sequential in-session implementation. The two forms share one policy block: change a policy here, change it in the workflow too (ADR-0005, field-revised by ADR-0010, ADR-0022, ADR-0026, and ADR-0032).
17
17
 
@@ -24,14 +24,14 @@ This skill is the loop's contract and its supervisor. The loop itself runs as th
24
24
  - **Cap: none** by default. The user may bound a run ("the next 5"): stop once that many lands have been *verified*, keeping dispatch within the remainder so the run cannot overshoot. Failed and deferred dispatches never consume the cap. Hitting the cap ends the run cleanly: the rest of the frontier stays ready (reported, never parked), and close-out runs as usual.
25
25
  - **Persistence: the pushed branch is the checkpoint.** An implementer pushes its `ralph/<n>-<slug>` branch the moment it branches and after every green step. A lost container costs the minutes since the last push, never a build: the next dispatch (this run's retry, or a relaunch after a recycle) adopts the pushed branch and continues from its last commit. Pushed `ralph/*` branches are never deleted mid-run; the release prunes only the branches of verified-landed tickets.
26
26
  - **Attempts: 2** — retry a failed ticket once with a fresh context, then park it. The retry adopts the pushed branch and fixes forward; only when the failure shows the approach itself was wrong does it reset the branch and start over.
27
- - **Re-syncs: 2 — a land hand-back spends no attempt.** When the base moved under a finished branch (the squash conflicts, or the merged tree fails the gate although the branch was fine on its own, or the remote base kept moving), the builder did nothing wrong: a fresh implementer re-syncs the pushed branch — merge the latest base in, resolve, fast gate, push, hand off again — up to twice per ticket before it counts as a real failure.
27
+ - **Re-syncs: 2 — a land hand-back spends no attempt.** When the base moved under a finished branch (the merge conflicts, or the merged tree fails the gate although the branch was fine on its own, or the remote base kept moving), the builder did nothing wrong: a fresh implementer re-syncs the pushed branch — merge the latest base in, resolve, fast gate, push, hand off again — up to twice per ticket before it counts as a real failure.
28
28
  - **Deferrals are not attempts.** An implementer that stops at its dependency gate (a declared blocker had not actually landed) hands the attempt back and is retried after the next land or tracker refresh — capped at 2 deferrals, then it counts as a real failure.
29
29
  - **Two gates, tiered.** The **fast gate** — `npx @wemuda/launchrail verify --fast` (`testing.checkCommand`, else the unit command; never e2e) — runs before every hand-off and again, by the loop, on every merged tree before it is pushed. The **full gate** — `npx @wemuda/launchrail verify` — runs at preflight, at **checkpoints** (after every 5 lands: `checkpointEvery`), and at release before the loop may report success. The full suite is paid once per checkpoint instead of once per ticket, and a red checkpoint has at most five suspects.
30
30
  - **A red checkpoint gets one repair.** The loop dispatches a single fresh implementer with the failures and the tickets landed since the last green base; its branch lands under the *full* gate and becomes the new green checkpoint. If that repair does not land, the base is **red**: nothing else lands, finished tickets are **held** on their pushed branches, and the run ends unverified with the reason — a human fixes the base and relaunches with `knownGreen`.
31
31
  - **Max builds: 60** — a backstop, not a target; retries, deferrals, re-syncs, and repairs all spend from it. Stop and report if the frontier hasn't drained.
32
32
  - **Checkpoints: none** in the human sense by default — run to completion, report once. The user may ask for a pause after each land instead.
33
33
  - **Review gate:** the implementer's own self-review via the `launch-code-review` skill, inside `launch-ralph-implement`.
34
- - **Landing ownership: the loop, not the implementer.** Implementers build, push, and hand off at a green fast gate; the landing — fetch, fast-forward the base, squash-merge, the loop's own gate run, push, explicit issue close, `ralph:building` removal — belongs to the loop (you in skill mode, a per-ticket lander agent in the workflow), strictly one at a time. A lander never writes code: a conflict or a red gate is reported and handed back, never repaired in place.
34
+ - **Landing ownership: the loop, not the implementer.** Implementers build, push, and hand off at a green fast gate; the landing — fetch, fast-forward the base, merge, the loop's own gate run, push, explicit issue close, `ralph:building` removal — belongs to the loop (you in skill mode, a per-ticket lander agent in the workflow), strictly one at a time. A lander never writes code: a conflict or a red gate is reported and handed back, never repaired in place.
35
35
  - **Labels:** tickets enter as `ready-for-agent`, are marked `ralph:building` while owned, and leave as closed or `needs-info` (parked). A held ticket keeps `ralph:building` — the next run owns it.
36
36
 
37
37
  ## Preconditions — refuse to start if any fails
@@ -63,7 +63,7 @@ Each implementer prompt is self-contained — assume it knows nothing about this
63
63
  4. **Branch and push immediately.** Adopt a pushed `ralph/<n>-*` branch when one exists (fetch it, continue from its last commit — never start over); otherwise branch from a fresh fetch of the base — `git checkout -b ralph/<n>-<short-slug> origin/<base>`, never a checkout of the base itself in the worktree — and push at once. From then on **commit and push after every green step**: the pushed branch is the checkpoint a lost session resumes from and the loop's liveness signal.
64
64
  5. Implement by calling the Skill tool with **`launch-ralph-implement`** — it owns TDD, the commit-and-push cadence, the fast gate, browser smoke for user-facing changes, self-review via `launch-code-review`, and commit conventions. Name the skill; do not paraphrase it.
65
65
  6. Pre-land sync: merge the latest base into the branch; resolve conflicts by calling the Skill tool with **`launch-resolving-merge-conflicts`**; if the base gained DB migrations since branching, regenerate yours to follow them with the project's migration tool — never hand-edit the journal; re-run the fast gate if anything changed, then push.
66
- 7. **Hand off:** confirm the pushed tip matches `HEAD`, then report "ready" with the branch, its sha, and a Conventional Commit title for the squash — and stop. The landing belongs to the loop. Never push to the base, never merge your work into it, and never open a PR — the campaign is released by one PR at the end.
66
+ 7. **Hand off:** confirm the pushed tip matches `HEAD`, then report "ready" with the branch, its sha, and a Conventional Commit title for the merge — and stop. The landing belongs to the loop. Never push to the base, never merge your work into it, and never open a PR — the campaign is released by one PR at the end.
67
67
 
68
68
  ## The landing — owned by the loop
69
69
 
@@ -71,7 +71,7 @@ In skill mode you land every branch the implementers hand off, in your own check
71
71
 
72
72
  1. Preconditions: a clean tree (never stash or discard); fetch the base and the branch; check out the base and fast-forward it to the remote — a local base that has diverged is a stop, not a reset.
73
73
  2. Note whether the base moved since the implementer synced (is the base tip an ancestor of the branch?).
74
- 3. `git merge --squash origin/ralph/<n>-<slug>`; on conflicts, reset to the remote base and hand back "conflict" with the files. Otherwise commit with the implementer's Conventional Commit title, `(#n)`, and a `Closes #n` trailer.
74
+ 3. `git merge --no-ff origin/ralph/<n>-<slug>` with the implementer's Conventional Commit title, `(#n)`, and a `Closes #n` trailer as the merge commit message — every commit on the branch is preserved beneath one merge commit, never squashed. On conflicts, reset to the remote base and hand back "conflict" with the files.
75
75
  4. If the change touched a dependency manifest or lockfile, run the install command. Then run the **fast gate** on the merged tree. Red → reset to the remote base and hand back "gate-failed" with the failing checks; a red base is never pushed.
76
76
  5. Push the base. A rejected push means the remote moved outside the loop: reset to it and redo once; a second rejection is "stale".
77
77
  6. Confirm on the remote that the base tip is your commit — that sha is the landing commit.
@@ -95,7 +95,7 @@ Every dispatch — retries, re-syncs, repairs included — also carries these tw
95
95
  - **Blocked (deferred)** → the dependency gate stopped the build. Hand the attempt back and retry after the next land or tracker refresh; after 2 deferrals it becomes a real failure. A deferral costs a dispatch, never an attempt.
96
96
  - **Land hand-back (re-sync)** → the base moved under a finished branch. Re-dispatch a fresh implementer to adopt the pushed branch, merge the latest base, fast gate, push, hand off — no attempt spent, twice at most.
97
97
  - **First failure** → re-dispatch later with a *fresh context* plus the failure summary; the retry adopts the pushed branch and fixes forward. A failed attempt's *context* is assumed poisoned — never resume it; its *code* is persisted and reused.
98
- - **Claimed landed, remote disagrees** — including landed-but-issue-still-open — → a failure like any other; the retry finds the work on the base (an empty squash) or the issue open, finishes the bookkeeping, and settles cleanly.
98
+ - **Claimed landed, remote disagrees** — including landed-but-issue-still-open — → a failure like any other; the retry finds the work on the base (already merged) or the issue open, finishes the bookkeeping, and settles cleanly.
99
99
  - **Second failure** → park: comment both failure summaries and the pushed branch on the ticket, remove `ralph:building`, add `needs-info`, move on.
100
100
  - **Held** → built and pushed while the base is red. Report it with its branch; a relaunch adopts it. Nothing to fix on the ticket.
101
101
  - **Systemic failure** — the base breaks and the repair does not land, the tracker becomes unreachable, or the *same* infrastructure error hits different tickets (three dead agents in a row) → stop the whole run and report; another retry won't fix it.
@@ -7,12 +7,12 @@ description: Implement a single ticket end to end under the Launchrail completio
7
7
 
8
8
  The per-ticket implementation contract. Ralph dispatches name this skill so the contract lives in one place — every implementer, on every run, gets the same one.
9
9
 
10
- 1. **Read before coding.** The ticket, every artifact it links (spec sections, ADRs, designs), and `AGENTS.md`/`CLAUDE.md`. The commands you run come from `.launchrail.yml` (`testing.*`) and `AGENTS.md`, verbatim.
10
+ 1. **Read before coding.** The ticket, every artifact it links (spec sections, ADRs, designs), and `AGENTS.md`/`CLAUDE.md`. The commands you run come from `.launchrail.yml` (`testing.*`) and `AGENTS.md`, verbatim. A ticket that names a `docs/design/<slug>/` package is built under the [fidelity protocol](../launch-design-implement/fidelity.md): the prototype's own markup and styles are the source for the states the ticket covers, every reachable state among them is inventoried in the package's `fidelity.md` before you code, and none is narrowed or restyled toward what already exists.
11
11
  2. **Push early, push often.** Your branch is pushed before you write a line, and you **commit and push after every green step** — a passing test slice, a finished subtask. The pushed branch is the checkpoint a lost session resumes from (a successor adopts it at its last commit instead of rebuilding) and the loop's liveness signal. Work that is not on the remote does not exist to the next session. Never push to the base branch and never open a PR from inside a loop dispatch — the loop lands your branch.
12
12
  3. **TDD at the seams the ticket names.** Write the failing test first where the ticket or spec defines behavior. Typecheck and run single test files as you go; save whole-suite runs for the gate — the machine may be shared with other implementers.
13
13
  4. **The gate — tiered.** Before you hand off, `npx @wemuda/launchrail verify --fast` (the fast gate: `testing.checkCommand`, else the unit command) must exit 0 on your branch. Inside a Ralph dispatch that is your gate: the loop runs it again on the merged tree before pushing the base, and runs the full `npx @wemuda/launchrail verify` (e2e specs included) at its checkpoints — so do not spend your turn on the whole suite; run only the slow test files your change touches (an e2e spec you edited). Outside the loop (single-ticket mode, a PR of your own), the full `npx @wemuda/launchrail verify` must exit 0 before the PR. Never delete, skip, or weaken a test to get there; if a test is genuinely wrong, fix it deliberately and say so in the commit message.
14
- 5. **User-facing behavior, with `modules.browser-testing` enabled:** drive the change in a real browser per the `launch-browser-smoke` skill — a one-off check of what you built, its steps taken from the ticket's acceptance criteria, ending in your handoff's few lines on what you drove and saw. No journeys file, no evidence bundle, no spec written from it; a regression test for anything it finds goes at the cheapest seam that catches it. A smoke you could not drive is a failure, not a pass.
14
+ 5. **User-facing behavior, with `modules.browser-testing` enabled:** drive the change in a real browser per the `launch-browser-smoke` skill — a one-off check of what you built, its steps taken from the ticket's acceptance criteria (and, when the ticket names a design package, the protocol's side-by-side comparison of each covered state against the running prototype at the designed viewport, verdicts recorded in the package's `fidelity.md`), ending in your handoff's few lines on what you drove and saw. No journeys file, no evidence bundle, no spec written from it; a regression test for anything it finds goes at the cheapest seam that catches it. A smoke you could not drive is a failure, not a pass.
15
15
  6. **Self-review:** call the Skill tool with `launch-code-review` on the result and fix what it finds before handing off.
16
- 7. **Commit to the current branch** following the project's commit conventions (Conventional Commits when `.launchrail.yml` says so); the loop squashes your branch onto the base, so also hand it a Conventional Commit title for that squash. Update any artifact the change invalidates (spec, ADR, design note) in the same change.
16
+ 7. **Commit to the current branch** following the project's commit conventions (Conventional Commits when `.launchrail.yml` says so); the loop merges your branch onto the base — your commits are preserved, not squashed — so also hand it a Conventional Commit title for the merge commit. Update any artifact the change invalidates (spec, ADR, design note) in the same change.
17
17
 
18
18
  Done means: the gate is green, the review found nothing unaddressed, the branch is pushed, and the evidence (test output, the smoke's verdict) exists — not that the code "should work".
@@ -1,6 +1,6 @@
1
1
  import { existsSync, readFileSync } from "node:fs";
2
2
  import { join } from "node:path";
3
- import { ADR_REGISTRY_PATH, duplicateAdrIds, scanAdrs, unindexedAdrs, withRegeneratedIndex } from "../lib/adr.js";
3
+ import { ADR_REGISTRY_PATH, adrDuplicates, scanAdrs, unindexedAdrs, withRegeneratedIndex } from "../lib/adr.js";
4
4
  import { BROWSER_DRIVER_PACKAGE, BROWSER_TESTING_MODULE, SEMANTIC_SCRIPTS } from "../lib/browser-testing.js";
5
5
  import { sha256 } from "../lib/checksum.js";
6
6
  import { missingImports } from "../lib/claudeImports.js";
@@ -109,12 +109,13 @@ export function runDoctor(cwd) {
109
109
  // project-doc hygiene, so they warn rather than fail.
110
110
  const adrs = scanAdrs(cwd);
111
111
  if (adrs.length > 0) {
112
- const dupes = duplicateAdrIds(adrs);
112
+ const dupes = adrDuplicates(adrs);
113
113
  if (dupes.length === 0) {
114
114
  add("pass", "adr identifiers", `${adrs.length} decision record(s), identifiers unique`);
115
115
  }
116
116
  else {
117
- add("warn", "adr identifiers", `identifier(s) ${dupes.join(", ")} claimed by more than one file — references are ambiguous; rename one of each pair (dated records: change the slug) and update its links`);
117
+ const detail = dupes.map((d) => `${d.id} (${d.files.join(", ")})`).join("; ");
118
+ add("warn", "adr identifiers", `${detail} — each id is claimed by more than one file, so every reference by it is ambiguous; give the newer collider a dated \`YYYY-MM-DD-slug.md\` name (dated ids never collide) and update its links`);
118
119
  }
119
120
  if (!existsSync(join(cwd, ADR_REGISTRY_PATH))) {
120
121
  add("warn", "adr registry", `${ADR_REGISTRY_PATH} missing — run \`launchrail sync\` to seed the index`);
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,QAAQ,EAAE,aAAa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,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AAEhF,MAAM,UAAU,WAAW,CAAC,OAAsB;IAChD,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACnC,OAAO,CAAC,GAAG,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACtG,CAAC;IACD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,MAAM,CAAC;IACxE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,MAAM,CAAC;IACxE,OAAO,CAAC,GAAG,CACT,KAAK,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,YAAY,MAAM,YAAY,MAAM,cAAc,CACxH,CAAC;IACF,IAAI,MAAM,KAAK,CAAC,EAAE,CAAC;QACjB,OAAO,CAAC,GAAG,CAAC,yDAAyD,CAAC,CAAC;IACzE,CAAC;AACH,CAAC"}
package/dist/lib/adr.d.ts CHANGED
@@ -26,8 +26,14 @@ export interface AdrEntry {
26
26
  * Read-only.
27
27
  */
28
28
  export declare function scanAdrs(cwd: string): AdrEntry[];
29
- /** Ids (numbers or slugs) claimed by more than one record — every reference by id is ambiguous. */
30
- export declare function duplicateAdrIds(entries: AdrEntry[]): string[];
29
+ /**
30
+ * Ids (numbers or slugs) claimed by more than one record, each with the files
31
+ * that claim it — every reference by such an id is ambiguous.
32
+ */
33
+ export declare function adrDuplicates(entries: AdrEntry[]): {
34
+ id: string;
35
+ files: string[];
36
+ }[];
31
37
  /** Records whose filename never appears in the registry — rows the index is missing. */
32
38
  export declare function unindexedAdrs(registrySource: string, entries: AdrEntry[]): AdrEntry[];
33
39
  type Relation = "supersedes" | "amends" | "extends";
@@ -54,6 +60,31 @@ export declare function adrIndexTable(entries: AdrEntry[]): string;
54
60
  * migrates on its first run). Null when the registry has neither.
55
61
  */
56
62
  export declare function withRegeneratedIndex(registrySource: string, entries: AdrEntry[]): string | null;
63
+ /** The seeded ADR template: date-and-slug titled, teaching the forward-declared relation model. */
64
+ export declare const ADR_TEMPLATE = "# Short decision title\n\n## Status\nProposed | Accepted | Superseded by [slug](YYYY-MM-DD-slug.md)\n\nName here what this record supersedes, amends, or extends, linking the earlier record by file (`Accepted \u2014 amends [slug](YYYY-MM-DD-slug.md): what changed`). The registry index ([README.md](README.md)) derives the reverse links, so an earlier record need not be edited when this one amends it; when this record is superseded later, this line is rewritten to name the successor. Re-run `launchrail adr index` after any change here.\n\n## Context\nWhat requirement or constraint requires a decision?\n\n## Decision\nWhat was selected?\n\n## Alternatives considered\nWhat realistic alternatives were rejected?\n\n## Consequences\nWhat becomes easier, harder, or constrained?\n\n## Revisit when\nWhat change would justify reconsidering this decision?\n";
65
+ /** The `# ADR-NNNN:`-titled template seeded before the dated-identifier ADR (byte-stable until then). */
66
+ export declare const PRE_DATE_SLUG_ADR_TEMPLATE = "# ADR-NNNN: Short decision title\n\n## Status\nProposed | Accepted | Accepted \u2014 amended by ADR-NNNN | Superseded by ADR-NNNN\n\nWhen a later ADR amends or supersedes this one, update this line and the registry index ([README.md](README.md)) in the same commit.\n\n## Context\nWhat requirement or constraint requires a decision?\n\n## Decision\nWhat was selected?\n\n## Alternatives considered\nWhat realistic alternatives were rejected?\n\n## Consequences\nWhat becomes easier, harder, or constrained?\n\n## Revisit when\nWhat change would justify reconsidering this decision?\n";
67
+ /** The registry's project-owned summary of how records are minted; defers to the managed contract. */
68
+ export declare const ADR_MAINTAINING_SECTION = "## Maintaining this registry\n\n- New ADRs copy [0000-template.md](0000-template.md) to `YYYY-MM-DD-short-slug.md` \u2014 the date the decision was made, then a slug unique in this directory. There is no sequence number to claim, so parallel branches never collide, and nothing is renumbered.\n- The index table between the markers is **generated**: run `launchrail adr index` after adding or re-statusing a record (and after merging), and commit the result. Never hand-edit the rows; the rest of this file is yours.\n- A new ADR declares what it supersedes, amends, or extends in its own `## Status` line, linking the earlier record by file. The index derives the reverse links, so amending an ADR does not require editing it. A superseded ADR's `## Status` line is still rewritten to name its successor \u2014 that is the one fact a reader of the record alone must not miss.\n- Never delete or rename an ADR once it is referenced; superseded ADRs are historical records other documents link to.\n- The naming and relation mechanics above summarize a contract Launchrail keeps current in the managed workflow instructions (`.launchrail/CLAUDE.generated.md`); if this seeded summary ever drifts from that managed contract, the managed contract is what holds.";
69
+ /**
70
+ * The "Maintaining this registry" section seeded before the dated-identifier ADR —
71
+ * the one that told agents to "take the next free number". Byte-stable from
72
+ * ADR-0031 until that ADR, so `healRegistryMinting` matches it exactly.
73
+ */
74
+ export declare const PRE_DATE_SLUG_MAINTAINING_SECTION = "## Maintaining this registry\n\n- New ADRs copy [0000-template.md](0000-template.md), take the next free number (`NNNN-short-slug.md` \u2014 check both this index and the files on disk), and add their row here **in the same commit**. The shared row turns two branches minting the same number into a visible merge conflict instead of a silent collision.\n- When a new ADR supersedes or amends an earlier one \u2014 including reversing part of the earlier one's context \u2014 update the earlier ADR's `## Status` line and its row here in the same commit.\n- Never delete or renumber an ADR once it is referenced; superseded ADRs are historical records other documents link to.";
75
+ export type MintingGuidanceState = "healed" | "current" | "modified" | "absent";
76
+ /**
77
+ * Correct a registry's minting guidance in place. Returns `healed` (with the
78
+ * rewritten source) only when the section is exactly the pre-date-slug text
79
+ * Launchrail seeded; `current` when it already matches the canonical section;
80
+ * `modified` when a project has edited it (left untouched — it is theirs);
81
+ * `absent` when there is no such section. The heal migration acts only on
82
+ * `healed`; the others are no-ops, which keeps a re-run empty.
83
+ */
84
+ export declare function healRegistryMinting(source: string): {
85
+ state: MintingGuidanceState;
86
+ next: string;
87
+ };
57
88
  /**
58
89
  * The seeded ADR registry. When init/sync adopts a repository that already has
59
90
  * decision records, the index prefills from them; a fresh repository gets the
package/dist/lib/adr.js CHANGED
@@ -61,12 +61,15 @@ export function scanAdrs(cwd) {
61
61
  }
62
62
  return entries;
63
63
  }
64
- /** Ids (numbers or slugs) claimed by more than one record — every reference by id is ambiguous. */
65
- export function duplicateAdrIds(entries) {
66
- const counts = new Map();
64
+ /**
65
+ * Ids (numbers or slugs) claimed by more than one record, each with the files
66
+ * that claim it — every reference by such an id is ambiguous.
67
+ */
68
+ export function adrDuplicates(entries) {
69
+ const byId = new Map();
67
70
  for (const entry of entries)
68
- counts.set(entry.id, (counts.get(entry.id) ?? 0) + 1);
69
- return [...counts.entries()].filter(([, n]) => n > 1).map(([id]) => id);
71
+ byId.set(entry.id, [...(byId.get(entry.id) ?? []), entry.file]);
72
+ return [...byId.entries()].filter(([, files]) => files.length > 1).map(([id, files]) => ({ id, files }));
70
73
  }
71
74
  /** Records whose filename never appears in the registry — rows the index is missing. */
72
75
  export function unindexedAdrs(registrySource, entries) {
@@ -218,6 +221,112 @@ export function withRegeneratedIndex(registrySource, entries) {
218
221
  const after = rest.slice(tableMatch.index + tableMatch[0].length);
219
222
  return `${before}\n${table}\n${after}`;
220
223
  }
224
+ // --- Minting guidance: a managed contract, a seeded summary, a one-time heal ----
225
+ //
226
+ // How a record is minted is an *operational instruction* the toolchain must be
227
+ // able to keep current. The authoritative copy therefore lives in the managed
228
+ // workflow instructions (`.launchrail/CLAUDE.generated.md`), which sync rewrites
229
+ // every version. The seeded registry and template carry only a project-owned
230
+ // summary and defer to it. The strings below are shared by the seed and by the
231
+ // heal migration so both write the same bytes, and the pre-date-slug versions
232
+ // are pinned exactly so the migration corrects a repo Launchrail seeded before
233
+ // the dated-identifier scheme without ever touching one a project has edited.
234
+ /** The seeded ADR template: date-and-slug titled, teaching the forward-declared relation model. */
235
+ export const ADR_TEMPLATE = `# Short decision title
236
+
237
+ ## Status
238
+ Proposed | Accepted | Superseded by [slug](YYYY-MM-DD-slug.md)
239
+
240
+ Name here what this record supersedes, amends, or extends, linking the earlier record by file (\`Accepted — amends [slug](YYYY-MM-DD-slug.md): what changed\`). The registry index ([README.md](README.md)) derives the reverse links, so an earlier record need not be edited when this one amends it; when this record is superseded later, this line is rewritten to name the successor. Re-run \`launchrail adr index\` after any change here.
241
+
242
+ ## Context
243
+ What requirement or constraint requires a decision?
244
+
245
+ ## Decision
246
+ What was selected?
247
+
248
+ ## Alternatives considered
249
+ What realistic alternatives were rejected?
250
+
251
+ ## Consequences
252
+ What becomes easier, harder, or constrained?
253
+
254
+ ## Revisit when
255
+ What change would justify reconsidering this decision?
256
+ `;
257
+ /** The `# ADR-NNNN:`-titled template seeded before the dated-identifier ADR (byte-stable until then). */
258
+ export const PRE_DATE_SLUG_ADR_TEMPLATE = `# ADR-NNNN: Short decision title
259
+
260
+ ## Status
261
+ Proposed | Accepted | Accepted — amended by ADR-NNNN | Superseded by ADR-NNNN
262
+
263
+ When a later ADR amends or supersedes this one, update this line and the registry index ([README.md](README.md)) in the same commit.
264
+
265
+ ## Context
266
+ What requirement or constraint requires a decision?
267
+
268
+ ## Decision
269
+ What was selected?
270
+
271
+ ## Alternatives considered
272
+ What realistic alternatives were rejected?
273
+
274
+ ## Consequences
275
+ What becomes easier, harder, or constrained?
276
+
277
+ ## Revisit when
278
+ What change would justify reconsidering this decision?
279
+ `;
280
+ /** The registry's project-owned summary of how records are minted; defers to the managed contract. */
281
+ export const ADR_MAINTAINING_SECTION = `## Maintaining this registry
282
+
283
+ - New ADRs copy [0000-template.md](0000-template.md) to \`YYYY-MM-DD-short-slug.md\` — the date the decision was made, then a slug unique in this directory. There is no sequence number to claim, so parallel branches never collide, and nothing is renumbered.
284
+ - The index table between the markers is **generated**: run \`launchrail adr index\` after adding or re-statusing a record (and after merging), and commit the result. Never hand-edit the rows; the rest of this file is yours.
285
+ - A new ADR declares what it supersedes, amends, or extends in its own \`## Status\` line, linking the earlier record by file. The index derives the reverse links, so amending an ADR does not require editing it. A superseded ADR's \`## Status\` line is still rewritten to name its successor — that is the one fact a reader of the record alone must not miss.
286
+ - Never delete or rename an ADR once it is referenced; superseded ADRs are historical records other documents link to.
287
+ - The naming and relation mechanics above summarize a contract Launchrail keeps current in the managed workflow instructions (\`.launchrail/CLAUDE.generated.md\`); if this seeded summary ever drifts from that managed contract, the managed contract is what holds.`;
288
+ /**
289
+ * The "Maintaining this registry" section seeded before the dated-identifier ADR —
290
+ * the one that told agents to "take the next free number". Byte-stable from
291
+ * ADR-0031 until that ADR, so `healRegistryMinting` matches it exactly.
292
+ */
293
+ export const PRE_DATE_SLUG_MAINTAINING_SECTION = `## Maintaining this registry
294
+
295
+ - New ADRs copy [0000-template.md](0000-template.md), take the next free number (\`NNNN-short-slug.md\` — check both this index and the files on disk), and add their row here **in the same commit**. The shared row turns two branches minting the same number into a visible merge conflict instead of a silent collision.
296
+ - When a new ADR supersedes or amends an earlier one — including reversing part of the earlier one's context — update the earlier ADR's \`## Status\` line and its row here in the same commit.
297
+ - Never delete or renumber an ADR once it is referenced; superseded ADRs are historical records other documents link to.`;
298
+ const MAINTAINING_HEADING = "## Maintaining this registry";
299
+ /** Slice a registry into the text before/at/after its "Maintaining this registry" section (to the next `## ` heading or EOF). */
300
+ function maintainingSlice(source) {
301
+ const start = source.indexOf(MAINTAINING_HEADING);
302
+ if (start === -1)
303
+ return null;
304
+ const bodyStart = start + MAINTAINING_HEADING.length;
305
+ const nextRel = source.slice(bodyStart).search(/\n## /);
306
+ const end = nextRel === -1 ? source.length : bodyStart + nextRel;
307
+ return { before: source.slice(0, start), section: source.slice(start, end), after: source.slice(end) };
308
+ }
309
+ /**
310
+ * Correct a registry's minting guidance in place. Returns `healed` (with the
311
+ * rewritten source) only when the section is exactly the pre-date-slug text
312
+ * Launchrail seeded; `current` when it already matches the canonical section;
313
+ * `modified` when a project has edited it (left untouched — it is theirs);
314
+ * `absent` when there is no such section. The heal migration acts only on
315
+ * `healed`; the others are no-ops, which keeps a re-run empty.
316
+ */
317
+ export function healRegistryMinting(source) {
318
+ const slice = maintainingSlice(source);
319
+ if (!slice)
320
+ return { state: "absent", next: source };
321
+ const found = slice.section.trim();
322
+ if (found === ADR_MAINTAINING_SECTION.trim())
323
+ return { state: "current", next: source };
324
+ if (found === PRE_DATE_SLUG_MAINTAINING_SECTION.trim()) {
325
+ const tail = slice.after === "" ? "\n" : slice.after;
326
+ return { state: "healed", next: slice.before + ADR_MAINTAINING_SECTION.trim() + tail };
327
+ }
328
+ return { state: "modified", next: source };
329
+ }
221
330
  /**
222
331
  * The seeded ADR registry. When init/sync adopts a repository that already has
223
332
  * decision records, the index prefills from them; a fresh repository gets the
@@ -248,12 +357,7 @@ How the accepted decisions compose into the current system. This section describ
248
357
 
249
358
  ${livePicture}
250
359
 
251
- ## Maintaining this registry
252
-
253
- - New ADRs copy [0000-template.md](0000-template.md) to \`YYYY-MM-DD-short-slug.md\` — the date the decision was made, then a slug unique in this directory. There is no sequence number to claim, so parallel branches never collide.
254
- - The index table between the markers is **generated**: run \`launchrail adr index\` after adding or re-statusing a record (and after merging), and commit the result. Never hand-edit the rows; the rest of this file is yours.
255
- - A new ADR declares what it supersedes, amends, or extends in its own \`## Status\` line, linking the earlier record by file. The index derives the reverse links, so amending an ADR does not require editing it. A superseded ADR's \`## Status\` line is still rewritten to name its successor — that is the one fact a reader of the record alone must not miss.
256
- - Never delete or rename an ADR once it is referenced; superseded ADRs are historical records other documents link to.
360
+ ${ADR_MAINTAINING_SECTION}
257
361
  `;
258
362
  }
259
363
  //# sourceMappingURL=adr.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"adr.js","sourceRoot":"","sources":["../../src/lib/adr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,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MG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAAmB;IACpD,MAAM,gBAAgB,GACpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,EAAE,CAAC;QAClC,CAAC,CAAC,2NAA2N;QAC7N,CAAC,CAAC,EAAE,CAAC;IACT,MAAM,WAAW,GACf,OAAO,CAAC,MAAM,KAAK,CAAC;QAClB,CAAC,CAAC,sJAAsJ;QACxJ,CAAC,CAAC,8IAA8I,CAAC;IAErJ,OAAO;;;;;;;;EAQP,aAAa,CAAC,OAAO,CAAC,GAAG,gBAAgB;;;;;;EAMzC,WAAW;;EAEX,uBAAuB;CACxB,CAAC;AACF,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { existsSync, readFileSync, rmdirSync, unlinkSync, writeFileSync } from "node:fs";
2
2
  import { dirname, join } from "node:path";
3
+ import { ADR_DIR, ADR_REGISTRY_PATH, ADR_TEMPLATE, ADR_TEMPLATE_FILENAME, healRegistryMinting, PRE_DATE_SLUG_ADR_TEMPLATE, } from "./adr.js";
3
4
  import { sha256 } from "./checksum.js";
4
5
  import { applyPluginDeclaration, applyRalphGuardHook, applyRemovePluginDeclaration, CLAUDE_SETTINGS_PATH, planPluginDeclaration, planRalphGuardHook, planRemovePluginDeclaration, RETIRED_SUPERPOWERS_DECLARATION, } from "./claudeSettings.js";
5
6
  import { RETIRED_BROWSER_TESTING_SEEDS } from "./browser-testing.js";
@@ -338,6 +339,56 @@ export const MIGRATIONS = [
338
339
  };
339
340
  },
340
341
  },
342
+ {
343
+ id: "2026-09-heal-adr-minting-guidance",
344
+ description: "rewrite the pre-date-slug ADR minting guidance seeded before the dated-identifier ADR — the registry's Maintaining section and the 0000-template — so agents name records by date and slug instead of minting colliding numbers (managed-not-seeded-guidance)",
345
+ plan(ctx) {
346
+ // The forward fix (naming, `adr index`, the seed) only reached new repos;
347
+ // this carries it into repos seeded earlier. Sync deliberately never
348
+ // rewrites a seeded file, so the correction rides this one-time migration
349
+ // instead — and only over the exact prose Launchrail wrote, so a section a
350
+ // project has since edited (or ejected) stays theirs. The authoritative
351
+ // rule now lives in the managed workflow instructions, which the same sync
352
+ // regenerates right after this runs.
353
+ const changes = [];
354
+ const writes = [];
355
+ const registryEntry = ctx.lockfile.files[ADR_REGISTRY_PATH];
356
+ const registryPath = join(ctx.cwd, ADR_REGISTRY_PATH);
357
+ if (existsSync(registryPath) && registryEntry?.class !== "ejected") {
358
+ const heal = healRegistryMinting(readFileSync(registryPath, "utf8"));
359
+ if (heal.state === "healed") {
360
+ changes.push(`${ADR_REGISTRY_PATH} — replace the pre-date-slug "Maintaining this registry" guidance (mint the next number → name by date and slug)`);
361
+ writes.push(() => {
362
+ writeFileSync(registryPath, heal.next, "utf8");
363
+ if (registryEntry)
364
+ ctx.lockfile.files[ADR_REGISTRY_PATH] = { class: registryEntry.class, checksum: sha256(heal.next) };
365
+ });
366
+ }
367
+ }
368
+ const templateRel = `${ADR_DIR}/${ADR_TEMPLATE_FILENAME}`;
369
+ const templateEntry = ctx.lockfile.files[templateRel];
370
+ const templatePath = join(ctx.cwd, ADR_DIR, ADR_TEMPLATE_FILENAME);
371
+ if (existsSync(templatePath) &&
372
+ templateEntry?.class !== "ejected" &&
373
+ readFileSync(templatePath, "utf8") === PRE_DATE_SLUG_ADR_TEMPLATE) {
374
+ changes.push(`${templateRel} — replace the pre-date-slug ADR template (ADR-NNNN title → date and slug)`);
375
+ writes.push(() => {
376
+ writeFileSync(templatePath, ADR_TEMPLATE, "utf8");
377
+ if (templateEntry)
378
+ ctx.lockfile.files[templateRel] = { class: templateEntry.class, checksum: sha256(ADR_TEMPLATE) };
379
+ });
380
+ }
381
+ if (changes.length === 0)
382
+ return { changes: [], apply: () => { } };
383
+ return {
384
+ changes,
385
+ apply: () => {
386
+ for (const write of writes)
387
+ write();
388
+ },
389
+ };
390
+ },
391
+ },
341
392
  ];
342
393
  export function migrationIds(registry = MIGRATIONS) {
343
394
  return registry.map((migration) => migration.id);
@@ -1 +1 @@
1
- {"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../src/lib/migrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACzF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,4BAA4B,EAC5B,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACxH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAoBpD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAgB;IACrC;QACE,EAAE,EAAE,4BAA4B;QAChC,WAAW,EAAE,2CAA2C,oBAAoB,aAAa;QACzF,IAAI,CAAC,GAAG;YACN,MAAM,QAAQ,GAAG,qBAAqB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAChD,IAAI,QAAQ,CAAC,OAAO,KAAK,IAAI;gBAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,CAAC;YACvE,OAAO;gBACL,OAAO,EAAE,CAAC,GAAG,oBAAoB,MAAM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,CAAC;YACX,EAAE,EAAE,SAAS,CAAC,EAAE;YAChB,WAAW,EAAE,SAAS,CAAC,WAAW;YAClC,MAAM,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,mBAAmB;YAC5D,OAAO;YACP,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC;IACL,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
package/dist/lib/seeds.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ADR_REGISTRY_PATH, adrRegistryContent, scanAdrs } from "./adr.js";
1
+ import { ADR_REGISTRY_PATH, ADR_TEMPLATE, adrRegistryContent, scanAdrs } from "./adr.js";
2
2
  import { AGENTS_COMMANDS_TODO } from "./readiness.js";
3
3
  function agentsMd(ctx) {
4
4
  const { manifest } = ctx;
@@ -77,7 +77,7 @@ function claudeGeneratedMd(ctx) {
77
77
  ## The Ralph loop
78
78
 
79
79
  - Implementation starts with \`/launch-implement\` — all ready tickets, or one with \`/launch-implement <ticket>\`. Multi-ticket runs execute as the \`ralph\` workflow (\`.claude/workflows/ralph.js\`), supervised per the \`launch-ralph\` skill; single tickets build in-session. Only ever started explicitly by the user.
80
- - Every run declares one integration target: by default a consolidation branch (named via the \`target\` workflow arg, it collects the campaign and ends by offering one release PR to the default branch, which stays untouched), or the default branch (trunk) as an explicit opt-in. The loop lands each finished \`ralph/<n>-*\` branch itself — a local squash-merge onto the base under \`npx @wemuda/launchrail verify --fast\`, pushed — and runs the full \`npx @wemuda/launchrail verify\` every few lands and at release; no per-ticket PR, no CI wait — cloud CI runs once, on the offered release PR. The run's recap states where the work lives and the single next step.
80
+ - Every run declares one integration target: by default a consolidation branch (named via the \`target\` workflow arg, it collects the campaign and ends by offering one release PR to the default branch, which stays untouched), or the default branch (trunk) as an explicit opt-in. The loop lands each finished \`ralph/<n>-*\` branch itself — a local merge onto the base (the branch's commits preserved) under \`npx @wemuda/launchrail verify --fast\`, pushed — and runs the full \`npx @wemuda/launchrail verify\` every few lands and at release; no per-ticket PR, no CI wait — cloud CI runs once, on the offered release PR. The run's recap states where the work lives and the single next step.
81
81
  - Implementers push their branch from the first commit on and after every green step; a relaunch adopts pushed branches (pass \`knownGreen: "<sha>"\` to skip re-proving a verified base). Name a quick lint/typecheck/unit gate as \`testing.checkCommand\` in \`.launchrail.yml\` to make every land cheaper (the fast gate falls back to the unit command).
82
82
  - Tickets enter the loop with the \`ready-for-agent\` label and explicit \`Blocked by: #n\` edges; parked tickets carry \`needs-info\` plus their failure history.
83
83
  - A ticket counts done only when its landing commit is on the remote base, the issue is closed, and the gates are green — agent reports are claims, not evidence.
@@ -93,36 +93,13 @@ function claudeGeneratedMd(ctx) {
93
93
  - This project follows the Launchrail rail — six phases: Intent → Exploration → Decisions → Blueprint → Build → Ship. Report position with the rail banner at every transition; the stage detail and the interaction contract live in \`.claude/skills/launch/workflow.md\`.
94
94
  - Product knowledge (vision, specs, ADRs, designs, tickets, code) is project-owned; Launchrail never overwrites it.
95
95
  - Architecture decisions: read \`docs/adr/README.md\` — the registry index — first, and open only the ADRs touching your area. An ADR records a decision, not the current system; never take one as evidence that a component exists or still works as described — the code is the source of truth.
96
+ - Recording an ADR (the authoritative minting contract — the registry's own guidance summarizes this): copy [docs/adr/0000-template.md](docs/adr/0000-template.md) to \`docs/adr/YYYY-MM-DD-short-slug.md\` — the decision date, then a slug unique in the directory. There is **no sequence number to claim**, so parallel sessions never collide and nothing is renumbered; the slug is the record's handle in prose and links, and titles carry no \`ADR-NNNN:\` prefix. Declare what the record supersedes, amends, or extends in its own \`## Status\` line, linking the earlier record by file — the index derives the reverse links, so amending one never means editing it. Regenerate the index with \`launchrail adr index\` and commit it in the same change. Records that predate this scheme keep their \`NNNN-\` names and are cited by number.
96
97
  - \`.launchrail.yml\` is project configuration; \`.launchrail-lock.json\` is machine-managed — do not hand-edit it.
97
98
  - The issue-tracker workflow (labels included) and the domain-doc consumer rules live in \`docs/agents/\` — seeded from \`.launchrail.yml\`, yours to edit.
98
99
  - Before claiming completion, run the project's deterministic checks. Completion requires evidence, not assertion.
99
100
  - Run \`npx @wemuda/launchrail doctor\` when repository state seems inconsistent.
100
101
  ${browserTesting}${ralph}`;
101
102
  }
102
- function adrTemplate() {
103
- return `# Short decision title
104
-
105
- ## Status
106
- Proposed | Accepted | Superseded by [slug](YYYY-MM-DD-slug.md)
107
-
108
- Name here what this record supersedes, amends, or extends, linking the earlier record by file (\`Accepted — amends [slug](YYYY-MM-DD-slug.md): what changed\`). The registry index ([README.md](README.md)) derives the reverse links, so an earlier record need not be edited when this one amends it; when this record is superseded later, this line is rewritten to name the successor. Re-run \`launchrail adr index\` after any change here.
109
-
110
- ## Context
111
- What requirement or constraint requires a decision?
112
-
113
- ## Decision
114
- What was selected?
115
-
116
- ## Alternatives considered
117
- What realistic alternatives were rejected?
118
-
119
- ## Consequences
120
- What becomes easier, harder, or constrained?
121
-
122
- ## Revisit when
123
- What change would justify reconsidering this decision?
124
- `;
125
- }
126
103
  /** The managed Claude instructions file — regenerated whenever module configuration changes. */
127
104
  export function claudeGeneratedFile(ctx) {
128
105
  return { relPath: ".launchrail/CLAUDE.generated.md", content: claudeGeneratedMd(ctx), ownership: "managed" };
@@ -132,7 +109,7 @@ export function seedFiles(ctx) {
132
109
  return [
133
110
  { relPath: "AGENTS.md", content: agentsMd(ctx), ownership: "seeded" },
134
111
  { relPath: "CLAUDE.md", content: claudeMd(), ownership: "seeded" },
135
- { relPath: "docs/adr/0000-template.md", content: adrTemplate(), ownership: "seeded" },
112
+ { relPath: "docs/adr/0000-template.md", content: ADR_TEMPLATE, ownership: "seeded" },
136
113
  // The registry (ADR-0031) makes the corpus navigable: agents read its index,
137
114
  // not the whole directory. Adopting a repo with existing records prefills it.
138
115
  { relPath: ADR_REGISTRY_PATH, content: adrRegistryContent(scanAdrs(ctx.cwd)), ownership: "seeded" },
@@ -1 +1 @@
1
- {"version":3,"file":"seeds.js","sourceRoot":"","sources":["../../src/lib/see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AG,CAAC,iBAAiB;;;;;;;;;;;;EAY3D,cAAc,GAAG,KAAK,EAAE,CAAC;AAC3B,CAAC;AAED,gGAAgG;AAChG,MAAM,UAAU,mBAAmB,CAAC,GAAgB;IAClD,OAAO,EAAE,OAAO,EAAE,iCAAiC,EAAE,OAAO,EAAE,iBAAiB,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;AAC/G,CAAC;AAED,8DAA8D;AAC9D,MAAM,UAAU,SAAS,CAAC,GAAgB;IACxC,OAAO;QACL,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE;QACrE,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE;QAClE,EAAE,OAAO,EAAE,2BAA2B,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE;QACpF,6EAA6E;QAC7E,8EAA8E;QAC9E,EAAE,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,kBAAkB,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE;QACnG,mBAAmB,CAAC,GAAG,CAAC;KACzB,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wemuda/launchrail",
3
- "version": "1.17.0",
3
+ "version": "1.18.0",
4
4
  "description": "Launchrail — initialize, inspect, update, and validate repositories using the Launchrail development system.",
5
5
  "license": "MIT",
6
6
  "type": "module",