[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M758P0WH6C9SHACY85ZHE6H9":3,"skill-same:01M758P0WH6C9SHACY85ZHE6H9":60},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":13,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":36,"install":37,"resources":49},"01M758P0WH6C9SHACY85ZHE6H9","spec-to-tickets",null,"Use when decomposing a Continuity Loom spec into actionable implementation tickets aligned with docs\u002Fprinciples\u002FFOUNDATIONS.md. Reads the spec, validates its assumptions against the codebase, then writes one ticket per reviewable diff to tickets\u002F\u003CPREFIX>-NNN.md. Produces: ticket files. Mutates: only tickets\u002F (never specs\u002F, docs\u002F, or .claude\u002Fskills\u002F).","joeloverbeck\u002Fcontinuity-loom","joeloverbeck","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F120873?v=4","01M758KCBJ0GWAPGN74C9NJF8T","01M758KCCNQ8F0YS327T45F7C0",0,"GPL-3.0","https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fcontinuity-loom\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fspec-to-tickets\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: spec-to-tickets\ndescription: \"Use when decomposing a Continuity Loom spec into actionable implementation tickets aligned with docs\u002Fprinciples\u002FFOUNDATIONS.md. Reads the spec, validates its assumptions against the codebase, then writes one ticket per reviewable diff to tickets\u002F\u003CPREFIX>-NNN.md. Produces: ticket files. Mutates: only tickets\u002F (never specs\u002F, docs\u002F, or .claude\u002Fskills\u002F).\"\nuser-invocable: true\narguments:\n  - name: spec_path\n    description: \"Path to the spec file (e.g., specs\u002FSPEC-001-prompt-compiler.md)\"\n    required: true\n  - name: namespace\n    description: \"Ticket namespace prefix, used as \u003CPREFIX>-\u003CNNN>.md (e.g., SPEC001PROMPT). If omitted, the skill derives one from the spec number and title and asks the user to confirm.\"\n    required: false\n---\n\n# Spec to Tickets\n\nBreak a Continuity Loom spec into small, actionable implementation tickets a reviewer can merge one at a time, each validated against the current codebase and aligned with `docs\u002Fprinciples\u002FFOUNDATIONS.md`.\n\n\u003CHARD-GATE>\nDo NOT Write any ticket file at `tickets\u002F\u003CPREFIX>-\u003CNNN>.md` until ALL of the following hold:\n\n(a) Pre-flight has verified `docs\u002Fprinciples\u002FFOUNDATIONS.md`, `tickets\u002F_TEMPLATE.md`, `tickets\u002FREADME.md`, and `\u003Cspec_path>` are all readable; if any is missing the skill aborts before Step 1.\n\n(b) Step 2 (codebase validation) has completed, and every surfaced Issue has an explicit user disposition — one of: fix-before-decomposition, defer-to-follow-up-ticket (named dependency), reject-with-rationale (route back to `\u002Freassess-spec`), expand-scope-in-place (decompose against the wider surface the codebase requires; the spec text is not edited), or drop-as-moot (named target doesn't exist AND intent is covered by sibling deliverables or is a structural no-op).\n\n(c) Step 4 has emitted the decomposition summary table in chat (numbered tickets with Title, Scope, Effort, Deps, FND, Notes) AND the user has explicitly approved it, OR the auto-mode carve-out has fired (auto mode active AND Step 2 surfaced no Issues AND no `\u002Freassess-spec` findings were deferred by the user).\n\n(d) Every `Deps` reference resolves to a ticket produced in this run, or to a pre-existing `tickets\u002F` \u002F `specs\u002F` \u002F `archive\u002Fspecs\u002F` path verified at Pre-flight or at Step 4's cross-spec Deps check before approval.\n\nThis gate is authoritative under auto mode and any autonomous-execution context. Invoking the skill does not constitute approval of the decomposition.\n\u003C\u002FHARD-GATE>\n\n## Process Flow\n\n```\nPre-flight: verify required files readable; derive + confirm \u003Cnamespace> if omitted\n       |\n       v\nStep 1: mandatory reads (spec, tickets\u002F_TEMPLATE.md, tickets\u002FREADME.md, docs\u002Fprinciples\u002FFOUNDATIONS.md)\n       |\n       v\nStep 2: codebase validation (load references\u002Fcodebase-validation.md); surface Issues; await per-Issue disposition\n       |\n       v\nStep 3: decompose the spec (load references\u002Fdecomposition-patterns.md)\n       |\n       v\nStep 4: present decomposition summary table; await user approval\n       |\n       +-- [HARD-GATE fires here]\n       |\n       v\nStep 5: batched ticket writes (one or a few messages, parallel Write calls, one per ticket)\n       |\n       v\nStep 6: final summary (cross-ticket Deps check, deliverable coverage, dependency graph, suggested order). Do NOT commit.\n```\n\n## Inputs \u002F Output\n\n**Input**: `spec_path` (required); `namespace` (optional, derived + confirmed if omitted). Plan-mode and worktree-root resolution are auto-detected.\n\n**Output**:\n- **Ticket files at `tickets\u002F\u003CPREFIX>-\u003CNNN>.md`** — one per reviewable diff, each following `tickets\u002F_TEMPLATE.md` exactly.\n- **Decomposition summary table** — emitted in chat at Step 4 before any Write.\n- **Final summary** — emitted at Step 6 (cross-ticket Deps verification, deliverable coverage mapping, dependency graph, suggested implementation order).\n\nThis skill emits markdown tickets only — no structured YAML records. It operates at pipeline scope: it produces tickets that feed implementation, so FOUNDATIONS alignment applies even though it writes no story-record content itself.\n\n## Prerequisites\n\nBefore acting, this skill MUST read:\n\n- `\u003Cspec_path>` — the target spec, entire contents (Step 1).\n- `tickets\u002F_TEMPLATE.md` — the canonical ticket structure; every ticket must follow it exactly (Step 1).\n- `tickets\u002FREADME.md` — the ticket authoring contract (Step 1).\n- `docs\u002Fprinciples\u002FFOUNDATIONS.md` — the non-negotiable design contract. Skip only if read earlier this session and unmodified (Step 1).\n- Every file path, skill directory, type, schema field, and spec reference extracted from the spec — read on demand at Step 2.\n\nReading scope: anything under `specs\u002F`, `archive\u002Fspecs\u002F`, `.claude\u002Fskills\u002F`, `docs\u002F`, `reports\u002F`, and `tickets\u002F`. This skill does not author story-record data and does not read story-record files.\n\n## Reference Files\n\n- **Step 2** — `references\u002Fcodebase-validation.md`\n- **Step 3** — `references\u002Fdecomposition-patterns.md`\n\nLoad each before the corresponding step. Loading both right after Step 1 is the simplest path; on-demand is also fine.\n\n## Worktree & Plan-Mode Awareness\n\nInside a git worktree, ALL paths (reads, writes, globs, greps) resolve from the worktree root. If plan mode is active, present the decomposition in the plan file and call `ExitPlanMode` in lieu of the Step 4 chat-table approval; write tickets only after approval.\n\n## Pre-flight Check\n\nBefore Step 1, verify:\n1. `docs\u002Fprinciples\u002FFOUNDATIONS.md` exists and is readable.\n2. `tickets\u002F_TEMPLATE.md` exists and is readable.\n3. `tickets\u002FREADME.md` exists and is readable.\n4. `\u003Cspec_path>` exists and is readable. If it is a glob (e.g. `specs\u002FSPEC-01*`), resolve first: exactly one match → use it (note the resolution); zero or many → abort or ask to disambiguate.\n5. `\u003Cnamespace>` is provided, OR derive one from the spec ID and abbreviated title (e.g. `specs\u002FSPEC-001-prompt-compiler.md` → `SPEC001PROMPT`) and ask the user to confirm or override before Step 1.\n\nIf any of checks 1–4 fails, abort with a clear missing-file error. If check 5's spec-ID parsing is ambiguous, ask the user for the namespace directly.\n\n## Step 1: Mandatory Reads\n\nRead ALL of: the spec file (entire), `tickets\u002F_TEMPLATE.md`, `tickets\u002FREADME.md`, and `docs\u002Fprinciples\u002FFOUNDATIONS.md` (skip the last only if read earlier this session and unmodified).\n\nParse the spec's metadata (Status, `Depends on:` \u002F `Predecessors:` \u002F `Blocks:` \u002F `Related:`) and its sections (Problem Statement, Approach, Deliverables, FOUNDATIONS Alignment, Verification — or its equivalently-named carrier: Testing \u002F Acceptance \u002F Acceptance Criteria \u002F Coverage rules \u002F Definition of Done, Out of Scope, Risks & Open Questions, and any deliverable sections).\n\n**Non-numbered deliverables**: many specs lack a numbered `§Deliverables` section. Anchor the deliverable enumeration in this precedence order: (1) a numbered `§Deliverables`; (2) absent that, a **per-deliverable** `§Implementation sequencing guidance` \u002F `§Sequencing` ordered list when present — its steps are already work-ordered units and usually map close to one-per-ticket; (3) else the items of a `§Scope` \u002F `§In scope` list, or each distinct named implementation section. Whichever enumeration you anchor on, **cross-check its coverage** against the spec's `§Acceptance` \u002F `§Coverage` \u002F `§Verification` (or equivalent) so no testable rule is left unmapped to a ticket, and reconcile divergent counts (one spec may carry, for the same work, a 4-surface `§Scope`, a 9-step `§Implementation sequencing guidance`, and 13 acceptance criteria) rather than treating any single list as exhaustive. **Per-layer\u002Fphase sequencing is the exception, not item (2)'s default case**: when the sequencing list is organized by *layer* (e.g. schema → migration → validation → compiler → UI → docs) cutting across several deliverables rather than by deliverable, do NOT map one ticket per phase — a per-phase ticket leaves a broken intermediate (a strict-schema phase tightened before its migration phase lands; a type member removed in one package while consumers in others remain). Anchor on the deliverable axis (item (1) or (3)) and treat the phase plan as *ordering input* only (see `references\u002Fdecomposition-patterns.md` §Schema-field-removal vertical for the co-landing reason).\n\n## Step 2: Codebase Validation\n\n**Load `references\u002Fcodebase-validation.md`.** Validate the spec's assumptions against the current codebase, surface Issues, and obtain a per-Issue disposition before Step 3. A spec that was reassessed via `\u002Freassess-spec` earlier this session with all findings resolved qualifies for the abbreviated spot-check path documented in the reference.\n\n**The reference load is required on both paths — including the abbreviated one.** The abbreviated path is not a license to skip the load and drive the spot-check from `\u002Freassess-spec` memory: the path's required sub-checks (a)–(h) and its output contract live only in `references\u002Fcodebase-validation.md`. After running the spot-checks, emit the compact inline evidence line the reference prescribes — `Spot-checks: (a) ✓, (b) ✓, (c) skipped — …, (d) ✓, (e) N\u002FA — …, (f) N\u002FA — …, (g) N\u002FA — …, (h) ✓ — codes fit the inventory severity model` — as Step 2's audit-trail output before Step 3. Prose like \"abbreviated spot-check passes\" without that enumerated line is an incomplete Step 2.\n\n## Step 3: Decompose the Spec\n\n**Load `references\u002Fdecomposition-patterns.md`.** Identify discrete work units — each a reviewable diff — map dependencies into each ticket's `Deps`, order by dependency graph and criticality, and ensure every spec deliverable is covered (no silent skipping). The reference documents the deliverable-coverage categories, the merge\u002Fsplit rules, and the recurring ticket-shape patterns (capstone integration ticket, cross-cutting docs ticket).\n\n## Step 4: Present Summary for Approval\n\nBefore writing any ticket files, present a numbered summary table:\n\n| # | Ticket ID | Title | Scope | Effort | Pri | Deps | FND | Notes |\n|---|-----------|-------|-------|--------|-----|------|-----|-------|\n| 1 | \u003CNS>-001  | …     | \u003C5-10 word scope> | Small  | HIGH | None | — | — |\n| 2 | \u003CNS>-002  | …     | \u003C5-10 word scope> | Medium | MED  | 001  | §11 | shared file set |\n\nColumn roles: **Title** matches the ticket's first line; **Scope** is the deliverable mapping (`D1+D6`) or acceptance surface — must not duplicate the Title; **Effort** Small\u002FMedium\u002FLarge (Small ≈ one file + its test; Medium ≈ a new module\u002Froute with tests; Large ≈ a multi-component UI surface); **Pri** the ticket's Priority (HIGH\u002FMED\u002FLOW), surfaced here because every ticket carries a `Priority` field the user should see before approving — HIGH when the ticket unblocks ≥2 downstream tickets or gates the dependency chain, LOW for trailing docs\u002Fbookkeeping, MED otherwise; **Deps** other tickets in this batch or pre-existing tickets\u002Fspecs (state once if all independent); **FND** a FOUNDATIONS section only when notable (e.g. §11 validation, §15 secrets), `—` otherwise; **Notes** merged\u002Fsplit deliverables, shared files, multi-dependency validation tickets.\n\n**Cross-spec Deps verification (before HARD-GATE fires)**: run `test -f` (or equivalent) on every cross-spec `Deps` path introduced during Step 3 that was not verified at Pre-flight (typically `specs\u002F\u003Csibling>.md`, `archive\u002Fspecs\u002F\u003Carchived>.md`, or `tickets\u002F\u003CPREFIX>-NNN.md` from a prior batch). Abort with a missing-Deps error if any fails. Cite the result alongside the table (e.g. `Cross-spec Deps verification: N\u002FA — all Deps resolve to tickets produced in this run`).\n\n**Wait for user approval or adjustments.** Do not write files until the user confirms. **Auto-mode \u002F no-stopping carve-out**: when auto mode (or an in-session \"work without stopping\" directive) is active AND Step 2 surfaced no Issues AND no `\u002Freassess-spec` findings were deferred, auto-approve and proceed; announce it inline and cite the directive. Any open Issue or deferred finding holds the wait-gate per HARD-GATE clause (c). When every Issue carries an explicit recommended disposition under a no-stopping directive, the operator MAY proceed by applying the named dispositions, citing each before the writes; the user can redirect.\n\n**Provisional-table bundling**: when Step-2 Issues each carry a recommended disposition, you MAY present them together with a *provisional* Step-4 table explicitly conditioned on those recommendations, so a single approval satisfies both the per-Issue disposition (HARD-GATE (b)) and the table (HARD-GATE (c)) — provided each Issue's disposition is still stated explicitly and you re-affirm the table if the user's pick diverges from a recommendation. This saves a round-trip without weakening the gate.\n\n## Step 5: Batched Ticket Writes\n\n**Post-approval refinement (mechanical only)**: while composing, you MAY apply a *mechanical tightening* to the approved Step-4 table without re-approval — specifically, removing a `Deps` entry that composition shows is unnecessary, relocating a sub-feature between already-approved sibling tickets of the same deliverable, or adding a `(modify)` of an **already-existing** file that an already-approved deliverable's stated behavior requires (e.g. a navigation deep-link target the deliverable's described behavior implies but the Step-4 table did not enumerate) — provided it adds no ticket, creates no new file, crosses no deliverable boundary, and does not change the ticket count. Disclose every such tightening in the Step 6 summary (original table entry → applied change). Anything beyond that — adding\u002Fremoving a ticket, changing the count, moving work across deliverables, or introducing a `(new)` file \u002F new deliverable — must round-trip to the user for re-approval per HARD-GATE clause (c). (Touching an additional pre-existing file to fulfil approved behavior is mechanical; creating a new file is not.) A **seam-confirmation read** (see the carve-out below) may itself surface such a mechanical expansion — a pre-existing file the already-approved behavior requires, e.g. a version-bump's hardcoded-assertion sites discovered by a ripple grep: apply it here and disclose it at Step 6. This is a mechanical Files-to-Touch addition, not a table re-plan, so it needs no re-approval — distinct from the carve-out's statement that seam-confirmation does not *re-plan* the table. **Mid-batch re-approval**: if a discovery while composing (e.g. a sibling spec turns out to own a planned deliverable) changes the ticket count or scope, stop the write cadence, re-present the adjusted Step-4 table for re-approval (HARD-GATE clause (c)), then resume from the next unwritten ticket — already-written tickets unaffected by the change need not be rewritten.\n\n**Pre-write rehearsal (mandatory)**: in the turn immediately before the writes, state the exact number of Write calls the next response will contain. **Pick the cadence by ticket size.** Full `_TEMPLATE.md` tickets in this repo run ~100–150 lines each; at that size, emitting **one Write per turn is the expected, first-class cadence** — announce `1 Write: NNN` and emit exactly that ticket. It is NOT a divergence and carries no penalty; it is the normal path for full-template decompositions. Reserve **multi-Write batches (up to ~3 parallel Writes)** for short tickets (bookkeeping, capstone-only, near-stub) or once a larger parallel batch has already succeeded this session. You MAY state the full cadence plan once upfront (e.g. `one Write per turn, 001…011` or `2 batches: [001,002,003], [004,005,006]`); each subsequent write turn then needs only a one-line restatement (`1 Write: 004` or `Batch 2 — 3 Writes: 004, 005, 006`), not a fresh standalone rehearsal turn. The Write turn that follows must contain exactly that count of Write calls plus at most the one-line restatement — no other tool calls and no other prose. Worked example for a one-per-turn cold run: **Turn A** — state the plan and run the pre-write existence checks (zero Writes); **Turns B…L** — each the line `1 Write: NNN` then exactly that one Write call. (Multi-Write worked example, short tickets \u002F warm session: **Turn B** `Batch 1 — 3 Writes: 001, 002, 003` then those 3 Writes; etc.) **Divergence handling is for *over*-emission only**: if a turn emits MORE Writes than rehearsed, or you are tempted to emit a single catch-up Write \"to keep momentum,\" the next turn is a zero-Write acknowledgment that restates the remaining count and resumes. **Under-emission is not a divergence** — if you announced a multi-Write batch but emitted fewer (e.g. a large ticket consumed the turn), simply continue the next turn with the remaining tickets at whatever cadence fits; do not ratchet the cap down and do not insert a recovery turn.\n\n**Pre-write existence checks** (same rehearsal turn): for every `(modify)` Files-to-Touch entry across the composed tickets, run `test -f` against the working tree; correct or reclassify any path that doesn't resolve. A `(modify)` entry pointing to a file another ticket creates `(new)` in this batch is valid only when the modifying ticket declares `Deps:` on the creator (per `references\u002Fdecomposition-patterns.md` §Intra-batch create-then-modify chains). **Symmetrically, run `test ! -f` on every `(new)` Files-to-Touch entry** (excluding files an earlier ticket in this batch creates): a `(new)` path that already resolves is a collision — reclassify it to `(modify)` (or rename the planned file) before writing, so a ticket never instructs the implementer to create a file that already exists. New-vs-modify misclassification of test files (a sibling `*.test.tsx`\u002F`*.test.ts` for a surface that already has one is the common case) is cheaper to catch here than at Step 6. For every command in a ticket's Test Plan, confirm it resolves against the repo. Enumerate `(modify)` entries individually, not as a collapsed \"all new\" claim. **Emit the `(modify)` `test -f` loop and the `(new)` `test ! -f` loop as one batched command** (e.g. one `OK\u002FMISS` line per modify path and one `OK\u002FCOLLISION` line per new path), so the rehearsal turn cannot enumerate the modify set without also running the new-file collision check — a `(new)` collision deferred to Step 6 is a salience miss, not a content gap. Also run a **section-presence self-check** on every composed ticket before emitting its write — assert each `_TEMPLATE.md` `## ` header (Problem, Assumption Reassessment, Architecture Check, Verification Layers, What to Change, Files to Touch, Out of Scope, Acceptance Criteria, Test Plan) **and** each required metadata line (`**Status**`, `**Priority**`, `**Effort**`, `**Engine Changes**`, `**Deps**`) is present in the draft; a missing section (e.g. an omitted `## Verification Layers`) or a dropped metadata field (e.g. `**Engine Changes**`) is cheaper to fix pre-write than to catch at Step 6. (The `## ` headers and the `**bold**` metadata block are distinct grep targets — a `## `-only check cannot see the metadata lines.)\n\n**Cadence-matched timing of the self-check.** \"Before emitting its write\" binds to *each ticket's own write*, not to a single batch barrier — so the self-check matches whatever cadence you picked: in a **one-Write-per-turn** run, self-check the ticket you are about to write *within its own write turn* (the rehearsal turn covers only the cross-ticket existence \u002F `(modify)` \u002F Test-Plan-command checks, which are greppable before any draft exists); in a **multi-Write batch**, self-check every ticket in that batch immediately before the batch's writes. The composed draft you check is the content you are about to pass to `Write`, not a separate buffer. Step 6's grep loops re-run the same section\u002Fmetadata\u002Fnumbering checks against the written files and are the **authoritative** full-batch verification — the Step 5 self-check is the cheap early catch, Step 6 is the backstop. The within-write-turn self-check is **silent** — it inspects the draft you are about to pass to `Write` and needs no narration; its evidence lives in the ticket's Assumption Reassessment. Keep the write turn to the one-line restatement only (per the rehearsal rule above); put any per-ticket fact recap in the rehearsal turn or a seam-confirmation turn, never the write turn.\n\n**Flow**: settle the full decomposition (all ticket designs, Deps, and Files-to-Touch) before the first Write, then emit the Write calls at the cadence chosen above — one Write per turn for full-template tickets, or a multi-Write batch for short tickets \u002F a warm session. The prohibition is on **re-deriving** per ticket: do NOT re-run Step 2\u002FStep 3 validation, re-read references, or re-plan the table between writes. Writing one composed ticket per turn is fine and expected for large tickets; what is not fine is interleaving fresh design\u002Fvalidation work with each write.\n\n**Targeted seam-confirmation carve-out**: confirming a *single internal implementation fact* a ticket's What-to-Change must describe accurately — a function's branch directions, a route\u002Fcall seam, an exact field set — is NOT \"re-deriving\" and is permitted in its own dedicated zero-Write turn immediately before that ticket's write. This is expected on the **Abbreviated Spot-Check Path**, where Step 2 confirms references, schema, and blast-radius but *not* the internal behavior a ticket narrates. \"Settle the full decomposition before the first Write\" binds the ticket **designs, Deps, and Files-to-Touch** — not every internal fact; a just-in-time confirmation Read that neither re-runs Step 2\u002F3 validation nor re-plans the table keeps the ticket codebase-true (the Codebase-truth guardrail) without counting as a divergence. Keep such a Read in its own turn — never inside the Write turn, which still carries no tool calls but the one-line restatement.\n\nFor each approved ticket, compose its full content following `tickets\u002F_TEMPLATE.md` exactly — every required section present (Status, Priority, Effort, Engine Changes, Deps, Problem, Assumption Reassessment, Architecture Check, Verification Layers, What to Change, Files to Touch, Out of Scope, Acceptance Criteria, Test Plan). For the **Assumption Reassessment** menu: items 1–3 are always required; for items 4+ **Select** the menu items matching this ticket's scope, **Rewrite** each selected item's number to its position in the surviving list (starting at 4), and **Verify** the final list reads `1, 2, 3, 4, …` with no gaps (a list like `1, 2, 3, 6` means the rewrite step was skipped). **Substrate-only tickets**: when a ticket builds the *inputs* to a FOUNDATIONS enforcement surface a later phase will implement (e.g. a record\u002Fbrief schema that feeds future validation, deterministic compilation, or the secret firewall — but no validator\u002Fcompiler exists yet), the secret-firewall \u002F deterministic-compilation menu item still applies: satisfy it by naming the deferred enforcement surface and confirming the data-model change introduces no leakage or nondeterminism path the later surface would have to undo, citing the phase that will enforce it. **Test-armoring tickets**: the mirror case — a *test-only* ticket that pins (mutation\u002Fproperty\u002Fcontract-tests) an **existing** FOUNDATIONS enforcement surface (the deterministic compiler, fail-closed validation, the secret firewall) rather than building inputs to a future one. The secret-firewall \u002F deterministic-compilation menu item still applies even though the ticket modifies no production code: satisfy it by naming the surface *under test* and confirming the tests change no production behavior (e.g. they mutate the surface in a sandbox only). This applies uniformly to every sibling ticket in the batch that armors the same surface class — do not include it on some pillar test tickets and omit it on others (see the cross-ticket uniformity check in Step 6). Every ticket modifying existing behavior must cite the change rationale in Assumption Reassessment (no silent retcon — §20). **`Engine Changes` for non-behavioral tickets**: a test-only or docs-only ticket sets `Engine Changes: Yes — \u003Cnew\u002Fmodified test or doc surfaces>; no production behavior change`, naming the surfaces it adds while making explicit that runtime behavior is unchanged — do not mark it `None` (the field tracks surfaces touched, not only behavioral deltas). Apply this convention uniformly across a batch.\n\nAfter the batch returns, verify every ticket file exists; retry any failed Write before Step 6. If a system-reminder shows a ticket was externally edited (e.g. a linter hook), treat the edit as authoritative and re-verify sibling references against the edited content before the final summary.\n\n## Step 6: Final Summary\n\nAfter writing all files:\n\n1. **Cross-ticket dependency consistency**: for each `Deps`, confirm the depended-on ticket actually produces what the dependent needs; `test -f` every `Deps` path at emission time. If a `(modify)` Files-to-Touch entry names a file a sibling creates `(new)` in this batch without a declared `Deps` on the creator, flag it.\n2. **Template fidelity**: confirm every required section is present and that each ticket's Assumption Reassessment uses gapless sequential numbering starting at 1. Section-presence check (run per ticket): `for s in \"## Problem\" \"## Assumption Reassessment\" \"## Architecture Check\" \"## Verification Layers\" \"## What to Change\" \"## Files to Touch\" \"## Out of Scope\" \"## Acceptance Criteria\" \"## Test Plan\"; do grep -qF \"$s\" tickets\u002F\u003CPREFIX>-NNN.md || echo \"MISSING $s in \u003CPREFIX>-NNN\"; done` — must print nothing. Metadata-presence check (the `## `-only loop above cannot see these): `for m in \"**Status**\" \"**Priority**\" \"**Effort**\" \"**Engine Changes**\" \"**Deps**\"; do grep -qF \"$m\" tickets\u002F\u003CPREFIX>-NNN.md || echo \"MISSING $m in \u003CPREFIX>-NNN\"; done` — must also print nothing. Numbering check: `awk '\u002F^## Assumption Reassessment\u002F,\u002F^## Architecture Check\u002F' tickets\u002F\u003CPREFIX>-NNN.md | grep -oE '^[0-9]+'` should be strictly sequential. Also confirm each applicable conditional menu item is present **by its content, not its position** (Step 5 renumbers selected menu items to gapless positions starting at 4, so a ticket's position number no longer maps to the original menu number): a FOUNDATIONS principle \u002F Validation Rule motivated → the FOUNDATIONS-principle item; a fail-closed-validation \u002F secret-firewall \u002F deterministic-compilation surface touched (including substrate that feeds a deferred enforcement surface — see Step 5) → the secret-firewall\u002Fdeterminism item; an existing output schema extended → the schema-extension item; a skill\u002Fsymbol renamed or removed → the rename\u002Fremoval item. **Cross-ticket uniformity**: when a conditional menu item applies to a whole *class* of sibling tickets touching the same FOUNDATIONS surface (e.g. every pillar test ticket armoring the deterministic-compilation surface — see §Test-armoring tickets in Step 5), confirm it is present on *all* of them, not just per-ticket — a 4-item ticket sitting beside 5-item siblings in the same class is the signal that an applicable item was missed on one. This mirrors the \"apply this convention uniformly across a batch\" rule the Engine-Changes field already carries.\n3. **Deliverable coverage mapping**: list each spec deliverable and the ticket(s) covering it (`D1→001`, `D3→003+004` for a split), including the exempt categories from `references\u002Fdecomposition-patterns.md`. Flag any uncovered deliverable.\n4. List: all ticket files created, the dependency graph, the suggested implementation order, any **deferred `\u002Freassess-spec` findings** (\"may warrant separate tickets\"), any **cross-spec follow-ups** surfaced by the spec's Risks section or discovered during decomposition, and any **post-approval mechanical refinements** applied during Step 5 (per §Step 5 Post-approval refinement — original table entry → applied change). **Discovered non-deliverable remediation** (dead code, an orphaned symbol, an adjacent cleanup that is *not* a deliverable of this spec) defaults to a listing here — do NOT auto-create a ticket for it. Create one only on explicit user request; when you do, author it under a **standalone non-spec namespace** (e.g. `CLEANUP-NNN`, distinct from the spec's `\u003CPREFIX>`), mark it independent of the spec's approved decomposition and exempt from that run's HARD-GATE table, declare its real `Deps` (often `None`), and validate it for codebase-truth and template fidelity like any other ticket.\n5. **Shared-file overlaps**: enumerate files that ≥2 mutually-independent tickets each modify — tickets with no `Deps` on each other, even when they share a common upstream `Deps` (parallel siblings off one foundation ticket still merge-conflict on a shared file), and whether the shared file is pre-existing or created in-batch by that foundation ticket — so implementers coordinate mechanical merges.\n\nDo NOT commit. Leave files for user review.\n\n## Guardrails\n\n- **FOUNDATIONS is authoritative**: never approve a decomposition that violates a FOUNDATIONS principle or trips a §29 hard-fail — flag it as a CRITICAL Issue at Step 2 and await disposition.\n- **Template fidelity**: every ticket uses `tickets\u002F_TEMPLATE.md` exactly — no ad-hoc sections, no missing fields, no \"simplified\" variants. Template evolution is a separate spec.\n- **Ticket fidelity**: never silently skip a deliverable. If one seems wrong, use the 1-problem \u002F 3-options \u002F 1-recommendation format and ask.\n- **Codebase truth**: file paths, skill names, types, and schema references in tickets must be validated against the actual codebase, not assumed from the spec. Stale references propagated spec → ticket are a skill failure.\n- **Reviewable size**: each ticket should be reviewable as a single diff. When in doubt, split.\n- **Explicit dependencies**: declare inter-ticket ordering in `Deps`; never leave it implicit. Every `Deps` entry resolves to a ticket produced this run or a verified pre-existing path.\n- **No spec edits**: this skill never edits the source spec. If decomposition reveals a spec defect, flag it as an Issue and route the fix to `\u002Freassess-spec`.\n- **Worktree discipline**: inside a worktree, all paths resolve from the worktree root.\n- **Do not `git commit`**: writes land in the working tree; the user reviews and commits.\n\n## FOUNDATIONS Alignment\n\n| Principle | Step | Mechanism |\n|-----------|------|-----------|\n| §4 Non-negotiable principles | Pre-flight + Step 1 | `docs\u002Fprinciples\u002FFOUNDATIONS.md`, _TEMPLATE.md, README.md, and the spec are required reads; the skill refuses to decompose without them. |\n| §8 Deterministic prompt compilation | Step 2 | Deliverables touching compilation are flagged if they introduce a nondeterministic input or an LLM intermediary in the compilation path. |\n| §11 Validation and hard fails | Step 2 | Deliverables proposing validation rules must stay deterministic and blocking and distinguish warnings from blockers; deviations are flagged. |\n| §15 POV, knowledge, secrets | Step 2 | Deliverables touching POV\u002Fsecret handling that would weaken the secret firewall trigger a CRITICAL Issue. |\n| §20 Durable change & human gatekeeping | Step 5 | Every ticket modifying existing behavior must cite the change rationale in Assumption Reassessment (no silent retcon). |\n| §29 Alignment checklist | Step 2 | Any §29 hard-fail answered \"yes\" is a CRITICAL Issue blocking decomposition. |\n\n## Final Rule\n\nA decomposition is not complete until every spec deliverable maps to a ticket OR to an explicit non-goal OR to a documented exempt category, every `Deps` resolves to a real target, every ticket's Files to Touch matches the current codebase, and every FOUNDATIONS-impacting deliverable has been validated against `docs\u002Fprinciples\u002FFOUNDATIONS.md` before its ticket was written.\n","# Spec to Tickets\n\nBreak a Continuity Loom spec into small, actionable implementation tickets a reviewer can merge one at a time, each validated against the current codebase and aligned with `docs\u002Fprinciples\u002FFOUNDATIONS.md`.\n\n\u003CHARD-GATE>\nDo NOT Write any ticket file at `tickets\u002F\u003CPREFIX>-\u003CNNN>.md` until ALL of the following hold:\n\n(a) Pre-flight has verified `docs\u002Fprinciples\u002FFOUNDATIONS.md`, `tickets\u002F_TEMPLATE.md`, `tickets\u002FREADME.md`, and `\u003Cspec_path>` are all readable; if any is missing the skill aborts before Step 1.\n\n(b) Step 2 (codebase validation) has completed, and every surfaced Issue has an explicit user disposition — one of: fix-before-decomposition, defer-to-follow-up-ticket (named dependency), reject-with-rationale (route back to `\u002Freassess-spec`), expand-scope-in-place (decompose against the wider surface the codebase requires; the spec text is not edited), or drop-as-moot (named target doesn't exist AND intent is covered by sibling deliverables or is a structural no-op).\n\n(c) Step 4 has emitted the decomposition summary table in chat (numbered tickets with Title, Scope, Effort, Deps, FND, Notes) AND the user has explicitly approved it, OR the auto-mode carve-out has fired (auto mode active AND Step 2 surfaced no Issues AND no `\u002Freassess-spec` findings were deferred by the user).\n\n(d) Every `Deps` reference resolves to a ticket produced in this run, or to a pre-existing `tickets\u002F` \u002F `specs\u002F` \u002F `archive\u002Fspecs\u002F` path verified at Pre-flight or at Step 4's cross-spec Deps check before approval.\n\nThis gate is authoritative under auto mode and any autonomous-execution context. Invoking the skill does not constitute approval of the decomposition.\n\u003C\u002FHARD-GATE>\n\n## Process Flow\n\n```\nPre-flight: verify required files readable; derive + confirm \u003Cnamespace> if omitted\n       |\n       v\nStep 1: mandatory reads (spec, tickets\u002F_TEMPLATE.md, tickets\u002FREADME.md, docs\u002Fprinciples\u002FFOUNDATIONS.md)\n       |\n       v\nStep 2: codebase validation (load references\u002Fcodebase-validation.md); surface Issues; await per-Issue disposition\n       |\n       v\nStep 3: decompose the spec (load references\u002Fdecomposition-patterns.md)\n       |\n       v\nStep 4: present decomposition summary table; await user approval\n       |\n       +-- [HARD-GATE fires here]\n       |\n       v\nStep 5: batched ticket writes (one or a few messages, parallel Write calls, one per ticket)\n       |\n       v\nStep 6: final summary (cross-ticket Deps check, deliverable coverage, dependency graph, suggested order). Do NOT commit.\n```\n\n## Inputs \u002F Output\n\n**Input**: `spec_path` (required); `namespace` (optional, derived + confirmed if omitted). Plan-mode and worktree-root resolution are auto-detected.\n\n**Output**:\n- **Ticket files at `tickets\u002F\u003CPREFIX>-\u003CNNN>.md`** — one per reviewable diff, each following `tickets\u002F_TEMPLATE.md` exactly.\n- **Decomposition summary table** — emitted in chat at Step 4 before any Write.\n- **Final summary** — emitted at Step 6 (cross-ticket Deps verification, deliverable coverage mapping, dependency graph, suggested implementation order).\n\nThis skill emits markdown tickets only — no structured YAML records. It operates at pipeline scope: it produces tickets that feed implementation, so FOUNDATIONS alignment applies even though it writes no story-record content itself.\n\n## Prerequisites\n\nBefore acting, this skill MUST read:\n\n- `\u003Cspec_path>` — the target spec, entire contents (Step 1).\n- `tickets\u002F_TEMPLATE.md` — the canonical ticket structure; every ticket must follow it exactly (Step 1).\n- `tickets\u002FREADME.md` — the ticket authoring contract (Step 1).\n- `docs\u002Fprinciples\u002FFOUNDATIONS.md` — the non-negotiable design contract. Skip only if read earlier this session and unmodified (Step 1).\n- Every file path, skill directory, type, schema field, and spec reference extracted from the spec — read on demand at Step 2.\n\nReading scope: anything under `specs\u002F`, `archive\u002Fspecs\u002F`, `.claude\u002Fskills\u002F`, `docs\u002F`, `reports\u002F`, and `tickets\u002F`. This skill does not author story-record data and does not read story-record files.\n\n## Reference Files\n\n- **Step 2** — `references\u002Fcodebase-validation.md`\n- **Step 3** — `references\u002Fdecomposition-patterns.md`\n\nLoad each before the corresponding step. Loading both right after Step 1 is the simplest path; on-demand is also fine.\n\n## Worktree & Plan-Mode Awareness\n\nInside a git worktree, ALL paths (reads, writes, globs, greps) resolve from the worktree root. If plan mode is active, present the decomposition in the plan file and call `ExitPlanMode` in lieu of the Step 4 chat-table approval; write tickets only after approval.\n\n## Pre-flight Check\n\nBefore Step 1, verify:\n1. `docs\u002Fprinciples\u002FFOUNDATIONS.md` exists and is readable.\n2. `tickets\u002F_TEMPLATE.md` exists and is readable.\n3. `tickets\u002FREADME.md` exists and is readable.\n4. `\u003Cspec_path>` exists and is readable. If it is a glob (e.g. `specs\u002FSPEC-01*`), resolve first: exactly one match → use it (note the resolution); zero or many → abort or ask to disambiguate.\n5. `\u003Cnamespace>` is provided, OR derive one from the spec ID and abbreviated title (e.g. `specs\u002FSPEC-001-prompt-compiler.md` → `SPEC001PROMPT`) and ask the user to confirm or override before Step 1.\n\nIf any of checks 1–4 fails, abort with a clear missing-file error. If check 5's spec-ID parsing is ambiguous, ask the user for the namespace directly.\n\n## Step 1: Mandatory Reads\n\nRead ALL of: the spec file (entire), `tickets\u002F_TEMPLATE.md`, `tickets\u002FREADME.md`, and `docs\u002Fprinciples\u002FFOUNDATIONS.md` (skip the last only if read earlier this session and unmodified).\n\nParse the spec's metadata (Status, `Depends on:` \u002F `Predecessors:` \u002F `Blocks:` \u002F `Related:`) and its sections (Problem Statement, Approach, Deliverables, FOUNDATIONS Alignment, Verification — or its equivalently-named carrier: Testing \u002F Acceptance \u002F Acceptance Criteria \u002F Coverage rules \u002F Definition of Done, Out of Scope, Risks & Open Questions, and any deliverable sections).\n\n**Non-numbered deliverables**: many specs lack a numbered `§Deliverables` section. Anchor the deliverable enumeration in this precedence order: (1) a numbered `§Deliverables`; (2) absent that, a **per-deliverable** `§Implementation sequencing guidance` \u002F `§Sequencing` ordered list when present — its steps are already work-ordered units and usually map close to one-per-ticket; (3) else the items of a `§Scope` \u002F `§In scope` list, or each distinct named implementation section. Whichever enumeration you anchor on, **cross-check its coverage** against the spec's `§Acceptance` \u002F `§Coverage` \u002F `§Verification` (or equivalent) so no testable rule is left unmapped to a ticket, and reconcile divergent counts (one spec may carry, for the same work, a 4-surface `§Scope`, a 9-step `§Implementation sequencing guidance`, and 13 acceptance criteria) rather than treating any single list as exhaustive. **Per-layer\u002Fphase sequencing is the exception, not item (2)'s default case**: when the sequencing list is organized by *layer* (e.g. schema → migration → validation → compiler → UI → docs) cutting across several deliverables rather than by deliverable, do NOT map one ticket per phase — a per-phase ticket leaves a broken intermediate (a strict-schema phase tightened before its migration phase lands; a type member removed in one package while consumers in others remain). Anchor on the deliverable axis (item (1) or (3)) and treat the phase plan as *ordering input* only (see `references\u002Fdecomposition-patterns.md` §Schema-field-removal vertical for the co-landing reason).\n\n## Step 2: Codebase Validation\n\n**Load `references\u002Fcodebase-validation.md`.** Validate the spec's assumptions against the current codebase, surface Issues, and obtain a per-Issue disposition before Step 3. A spec that was reassessed via `\u002Freassess-spec` earlier this session with all findings resolved qualifies for the abbreviated spot-check path documented in the reference.\n\n**The reference load is required on both paths — including the abbreviated one.** The abbreviated path is not a license to skip the load and drive the spot-check from `\u002Freassess-spec` memory: the path's required sub-checks (a)–(h) and its output contract live only in `references\u002Fcodebase-validation.md`. After running the spot-checks, emit the compact inline evidence line the reference prescribes — `Spot-checks: (a) ✓, (b) ✓, (c) skipped — …, (d) ✓, (e) N\u002FA — …, (f) N\u002FA — …, (g) N\u002FA — …, (h) ✓ — codes fit the inventory severity model` — as Step 2's audit-trail output before Step 3. Prose like \"abbreviated spot-check passes\" without that enumerated line is an incomplete Step 2.\n\n## Step 3: Decompose the Spec\n\n**Load `references\u002Fdecomposition-patterns.md`.** Identify discrete work units — each a reviewable diff — map dependencies into each ticket's `Deps`, order by dependency graph and criticality, and ensure every spec deliverable is covered (no silent skipping). The reference documents the deliverable-coverage categories, the merge\u002Fsplit rules, and the recurring ticket-shape patterns (capstone integration ticket, cross-cutting docs ticket).\n\n## Step 4: Present Summary for Approval\n\nBefore writing any ticket files, present a numbered summary table:\n\n| # | Ticket ID | Title | Scope | Effort | Pri | Deps | FND | Notes |\n|---|-----------|-------|-------|--------|-----|------|-----|-------|\n| 1 | \u003CNS>-001  | …     | \u003C5-10 word scope> | Small  | HIGH | None | — | — |\n| 2 | \u003CNS>-002  | …     | \u003C5-10 word scope> | Medium | MED  | 001  | §11 | shared file set |\n\nColumn roles: **Title** matches the ticket's first line; **Scope** is the deliverable mapping (`D1+D6`) or acceptance surface — must not duplicate the Title; **Effort** Small\u002FMedium\u002FLarge (Small ≈ one file + its test; Medium ≈ a new module\u002Froute with tests; Large ≈ a multi-component UI surface); **Pri** the ticket's Priority (HIGH\u002FMED\u002FLOW), surfaced here because every ticket carries a `Priority` field the user should see before approving — HIGH when the ticket unblocks ≥2 downstream tickets or gates the dependency chain, LOW for trailing docs\u002Fbookkeeping, MED otherwise; **Deps** other tickets in this batch or pre-existing tickets\u002Fspecs (state once if all independent); **FND** a FOUNDATIONS section only when notable (e.g. §11 validation, §15 secrets), `—` otherwise; **Notes** merged\u002Fsplit deliverables, shared files, multi-dependency validation tickets.\n\n**Cross-spec Deps verification (before HARD-GATE fires)**: run `test -f` (or equivalent) on every cross-spec `Deps` path introduced during Step 3 that was not verified at Pre-flight (typically `specs\u002F\u003Csibling>.md`, `archive\u002Fspecs\u002F\u003Carchived>.md`, or `tickets\u002F\u003CPREFIX>-NNN.md` from a prior batch). Abort with a missing-Deps error if any fails. Cite the result alongside the table (e.g. `Cross-spec Deps verification: N\u002FA — all Deps resolve to tickets produced in this run`).\n\n**Wait for user approval or adjustments.** Do not write files until the user confirms. **Auto-mode \u002F no-stopping carve-out**: when auto mode (or an in-session \"work without stopping\" directive) is active AND Step 2 surfaced no Issues AND no `\u002Freassess-spec` findings were deferred, auto-approve and proceed; announce it inline and cite the directive. Any open Issue or deferred finding holds the wait-gate per HARD-GATE clause (c). When every Issue carries an explicit recommended disposition under a no-stopping directive, the operator MAY proceed by applying the named dispositions, citing each before the writes; the user can redirect.\n\n**Provisional-table bundling**: when Step-2 Issues each carry a recommended disposition, you MAY present them together with a *provisional* Step-4 table explicitly conditioned on those recommendations, so a single approval satisfies both the per-Issue disposition (HARD-GATE (b)) and the table (HARD-GATE (c)) — provided each Issue's disposition is still stated explicitly and you re-affirm the table if the user's pick diverges from a recommendation. This saves a round-trip without weakening the gate.\n\n## Step 5: Batched Ticket Writes\n\n**Post-approval refinement (mechanical only)**: while composing, you MAY apply a *mechanical tightening* to the approved Step-4 table without re-approval — specifically, removing a `Deps` entry that composition shows is unnecessary, relocating a sub-feature between already-approved sibling tickets of the same deliverable, or adding a `(modify)` of an **already-existing** file that an already-approved deliverable's stated behavior requires (e.g. a navigation deep-link target the deliverable's described behavior implies but the Step-4 table did not enumerate) — provided it adds no ticket, creates no new file, crosses no deliverable boundary, and does not change the ticket count. Disclose every such tightening in the Step 6 summary (original table entry → applied change). Anything beyond that — adding\u002Fremoving a ticket, changing the count, moving work across deliverables, or introducing a `(new)` file \u002F new deliverable — must round-trip to the user for re-approval per HARD-GATE clause (c). (Touching an additional pre-existing file to fulfil approved behavior is mechanical; creating a new file is not.) A **seam-confirmation read** (see the carve-out below) may itself surface such a mechanical expansion — a pre-existing file the already-approved behavior requires, e.g. a version-bump's hardcoded-assertion sites discovered by a ripple grep: apply it here and disclose it at Step 6. This is a mechanical Files-to-Touch addition, not a table re-plan, so it needs no re-approval — distinct from the carve-out's statement that seam-confirmation does not *re-plan* the table. **Mid-batch re-approval**: if a discovery while composing (e.g. a sibling spec turns out to own a planned deliverable) changes the ticket count or scope, stop the write cadence, re-present the adjusted Step-4 table for re-approval (HARD-GATE clause (c)), then resume from the next unwritten ticket — already-written tickets unaffected by the change need not be rewritten.\n\n**Pre-write rehearsal (mandatory)**: in the turn immediately before the writes, state the exact number of Write calls the next response will contain. **Pick the cadence by ticket size.** Full `_TEMPLATE.md` tickets in this repo run ~100–150 lines each; at that size, emitting **one Write per turn is the expected, first-class cadence** — announce `1 Write: NNN` and emit exactly that ticket. It is NOT a divergence and carries no penalty; it is the normal path for full-template decompositions. Reserve **multi-Write batches (up to ~3 parallel Writes)** for short tickets (bookkeeping, capstone-only, near-stub) or once a larger parallel batch has already succeeded this session. You MAY state the full cadence plan once upfront (e.g. `one Write per turn, 001…011` or `2 batches: [001,002,003], [004,005,006]`); each subsequent write turn then needs only a one-line restatement (`1 Write: 004` or `Batch 2 — 3 Writes: 004, 005, 006`), not a fresh standalone rehearsal turn. The Write turn that follows must contain exactly that count of Write calls plus at most the one-line restatement — no other tool calls and no other prose. Worked example for a one-per-turn cold run: **Turn A** — state the plan and run the pre-write existence checks (zero Writes); **Turns B…L** — each the line `1 Write: NNN` then exactly that one Write call. (Multi-Write worked example, short tickets \u002F warm session: **Turn B** `Batch 1 — 3 Writes: 001, 002, 003` then those 3 Writes; etc.) **Divergence handling is for *over*-emission only**: if a turn emits MORE Writes than rehearsed, or you are tempted to emit a single catch-up Write \"to keep momentum,\" the next turn is a zero-Write acknowledgment that restates the remaining count and resumes. **Under-emission is not a divergence** — if you announced a multi-Write batch but emitted fewer (e.g. a large ticket consumed the turn), simply continue the next turn with the remaining tickets at whatever cadence fits; do not ratchet the cap down and do not insert a recovery turn.\n\n**Pre-write existence checks** (same rehearsal turn): for every `(modify)` Files-to-Touch entry across the composed tickets, run `test -f` against the working tree; correct or reclassify any path that doesn't resolve. A `(modify)` entry pointing to a file another ticket creates `(new)` in this batch is valid only when the modifying ticket declares `Deps:` on the creator (per `references\u002Fdecomposition-patterns.md` §Intra-batch create-then-modify chains). **Symmetrically, run `test ! -f` on every `(new)` Files-to-Touch entry** (excluding files an earlier ticket in this batch creates): a `(new)` path that already resolves is a collision — reclassify it to `(modify)` (or rename the planned file) before writing, so a ticket never instructs the implementer to create a file that already exists. New-vs-modify misclassification of test files (a sibling `*.test.tsx`\u002F`*.test.ts` for a surface that already has one is the common case) is cheaper to catch here than at Step 6. For every command in a ticket's Test Plan, confirm it resolves against the repo. Enumerate `(modify)` entries individually, not as a collapsed \"all new\" claim. **Emit the `(modify)` `test -f` loop and the `(new)` `test ! -f` loop as one batched command** (e.g. one `OK\u002FMISS` line per modify path and one `OK\u002FCOLLISION` line per new path), so the rehearsal turn cannot enumerate the modify set without also running the new-file collision check — a `(new)` collision deferred to Step 6 is a salience miss, not a content gap. Also run a **section-presence self-check** on every composed ticket before emitting its write — assert each `_TEMPLATE.md` `## ` header (Problem, Assumption Reassessment, Architecture Check, Verification Layers, What to Change, Files to Touch, Out of Scope, Acceptance Criteria, Test Plan) **and** each required metadata line (`**Status**`, `**Priority**`, `**Effort**`, `**Engine Changes**`, `**Deps**`) is present in the draft; a missing section (e.g. an omitted `## Verification Layers`) or a dropped metadata field (e.g. `**Engine Changes**`) is cheaper to fix pre-write than to catch at Step 6. (The `## ` headers and the `**bold**` metadata block are distinct grep targets — a `## `-only check cannot see the metadata lines.)\n\n**Cadence-matched timing of the self-check.** \"Before emitting its write\" binds to *each ticket's own write*, not to a single batch barrier — so the self-check matches whatever cadence you picked: in a **one-Write-per-turn** run, self-check the ticket you are about to write *within its own write turn* (the rehearsal turn covers only the cross-ticket existence \u002F `(modify)` \u002F Test-Plan-command checks, which are greppable before any draft exists); in a **multi-Write batch**, self-check every ticket in that batch immediately before the batch's writes. The composed draft you check is the content you are about to pass to `Write`, not a separate buffer. Step 6's grep loops re-run the same section\u002Fmetadata\u002Fnumbering checks against the written files and are the **authoritative** full-batch verification — the Step 5 self-check is the cheap early catch, Step 6 is the backstop. The within-write-turn self-check is **silent** — it inspects the draft you are about to pass to `Write` and needs no narration; its evidence lives in the ticket's Assumption Reassessment. Keep the write turn to the one-line restatement only (per the rehearsal rule above); put any per-ticket fact recap in the rehearsal turn or a seam-confirmation turn, never the write turn.\n\n**Flow**: settle the full decomposition (all ticket designs, Deps, and Files-to-Touch) before the first Write, then emit the Write calls at the cadence chosen above — one Write per turn for full-template tickets, or a multi-Write batch for short tickets \u002F a warm session. The prohibition is on **re-deriving** per ticket: do NOT re-run Step 2\u002FStep 3 validation, re-read references, or re-plan the table between writes. Writing one composed ticket per turn is fine and expected for large tickets; what is not fine is interleaving fresh design\u002Fvalidation work with each write.\n\n**Targeted seam-confirmation carve-out**: confirming a *single internal implementation fact* a ticket's What-to-Change must describe accurately — a function's branch directions, a route\u002Fcall seam, an exact field set — is NOT \"re-deriving\" and is permitted in its own dedicated zero-Write turn immediately before that ticket's write. This is expected on the **Abbreviated Spot-Check Path**, where Step 2 confirms references, schema, and blast-radius but *not* the internal behavior a ticket narrates. \"Settle the full decomposition before the first Write\" binds the ticket **designs, Deps, and Files-to-Touch** — not every internal fact; a just-in-time confirmation Read that neither re-runs Step 2\u002F3 validation nor re-plans the table keeps the ticket codebase-true (the Codebase-truth guardrail) without counting as a divergence. Keep such a Read in its own turn — never inside the Write turn, which still carries no tool calls but the one-line restatement.\n\nFor each approved ticket, compose its full content following `tickets\u002F_TEMPLATE.md` exactly — every required section present (Status, Priority, Effort, Engine Changes, Deps, Problem, Assumption Reassessment, Architecture Check, Verification Layers, What to Change, Files to Touch, Out of Scope, Acceptance Criteria, Test Plan). For the **Assumption Reassessment** menu: items 1–3 are always required; for items 4+ **Select** the menu items matching this ticket's scope, **Rewrite** each selected item's number to its position in the surviving list (starting at 4), and **Verify** the final list reads `1, 2, 3, 4, …` with no gaps (a list like `1, 2, 3, 6` means the rewrite step was skipped). **Substrate-only tickets**: when a ticket builds the *inputs* to a FOUNDATIONS enforcement surface a later phase will implement (e.g. a record\u002Fbrief schema that feeds future validation, deterministic compilation, or the secret firewall — but no validator\u002Fcompiler exists yet), the secret-firewall \u002F deterministic-compilation menu item still applies: satisfy it by naming the deferred enforcement surface and confirming the data-model change introduces no leakage or nondeterminism path the later surface would have to undo, citing the phase that will enforce it. **Test-armoring tickets**: the mirror case — a *test-only* ticket that pins (mutation\u002Fproperty\u002Fcontract-tests) an **existing** FOUNDATIONS enforcement surface (the deterministic compiler, fail-closed validation, the secret firewall) rather than building inputs to a future one. The secret-firewall \u002F deterministic-compilation menu item still applies even though the ticket modifies no production code: satisfy it by naming the surface *under test* and confirming the tests change no production behavior (e.g. they mutate the surface in a sandbox only). This applies uniformly to every sibling ticket in the batch that armors the same surface class — do not include it on some pillar test tickets and omit it on others (see the cross-ticket uniformity check in Step 6). Every ticket modifying existing behavior must cite the change rationale in Assumption Reassessment (no silent retcon — §20). **`Engine Changes` for non-behavioral tickets**: a test-only or docs-only ticket sets `Engine Changes: Yes — \u003Cnew\u002Fmodified test or doc surfaces>; no production behavior change`, naming the surfaces it adds while making explicit that runtime behavior is unchanged — do not mark it `None` (the field tracks surfaces touched, not only behavioral deltas). Apply this convention uniformly across a batch.\n\nAfter the batch returns, verify every ticket file exists; retry any failed Write before Step 6. If a system-reminder shows a ticket was externally edited (e.g. a linter hook), treat the edit as authoritative and re-verify sibling references against the edited content before the final summary.\n\n## Step 6: Final Summary\n\nAfter writing all files:\n\n1. **Cross-ticket dependency consistency**: for each `Deps`, confirm the depended-on ticket actually produces what the dependent needs; `test -f` every `Deps` path at emission time. If a `(modify)` Files-to-Touch entry names a file a sibling creates `(new)` in this batch without a declared `Deps` on the creator, flag it.\n2. **Template fidelity**: confirm every required section is present and that each ticket's Assumption Reassessment uses gapless sequential numbering starting at 1. Section-presence check (run per ticket): `for s in \"## Problem\" \"## Assumption Reassessment\" \"## Architecture Check\" \"## Verification Layers\" \"## What to Change\" \"## Files to Touch\" \"## Out of Scope\" \"## Acceptance Criteria\" \"## Test Plan\"; do grep -qF \"$s\" tickets\u002F\u003CPREFIX>-NNN.md || echo \"MISSING $s in \u003CPREFIX>-NNN\"; done` — must print nothing. Metadata-presence check (the `## `-only loop above cannot see these): `for m in \"**Status**\" \"**Priority**\" \"**Effort**\" \"**Engine Changes**\" \"**Deps**\"; do grep -qF \"$m\" tickets\u002F\u003CPREFIX>-NNN.md || echo \"MISSING $m in \u003CPREFIX>-NNN\"; done` — must also print nothing. Numbering check: `awk '\u002F^## Assumption Reassessment\u002F,\u002F^## Architecture Check\u002F' tickets\u002F\u003CPREFIX>-NNN.md | grep -oE '^[0-9]+'` should be strictly sequential. Also confirm each applicable conditional menu item is present **by its content, not its position** (Step 5 renumbers selected menu items to gapless positions starting at 4, so a ticket's position number no longer maps to the original menu number): a FOUNDATIONS principle \u002F Validation Rule motivated → the FOUNDATIONS-principle item; a fail-closed-validation \u002F secret-firewall \u002F deterministic-compilation surface touched (including substrate that feeds a deferred enforcement surface — see Step 5) → the secret-firewall\u002Fdeterminism item; an existing output schema extended → the schema-extension item; a skill\u002Fsymbol renamed or removed → the rename\u002Fremoval item. **Cross-ticket uniformity**: when a conditional menu item applies to a whole *class* of sibling tickets touching the same FOUNDATIONS surface (e.g. every pillar test ticket armoring the deterministic-compilation surface — see §Test-armoring tickets in Step 5), confirm it is present on *all* of them, not just per-ticket — a 4-item ticket sitting beside 5-item siblings in the same class is the signal that an applicable item was missed on one. This mirrors the \"apply this convention uniformly across a batch\" rule the Engine-Changes field already carries.\n3. **Deliverable coverage mapping**: list each spec deliverable and the ticket(s) covering it (`D1→001`, `D3→003+004` for a split), including the exempt categories from `references\u002Fdecomposition-patterns.md`. Flag any uncovered deliverable.\n4. List: all ticket files created, the dependency graph, the suggested implementation order, any **deferred `\u002Freassess-spec` findings** (\"may warrant separate tickets\"), any **cross-spec follow-ups** surfaced by the spec's Risks section or discovered during decomposition, and any **post-approval mechanical refinements** applied during Step 5 (per §Step 5 Post-approval refinement — original table entry → applied change). **Discovered non-deliverable remediation** (dead code, an orphaned symbol, an adjacent cleanup that is *not* a deliverable of this spec) defaults to a listing here — do NOT auto-create a ticket for it. Create one only on explicit user request; when you do, author it under a **standalone non-spec namespace** (e.g. `CLEANUP-NNN`, distinct from the spec's `\u003CPREFIX>`), mark it independent of the spec's approved decomposition and exempt from that run's HARD-GATE table, declare its real `Deps` (often `None`), and validate it for codebase-truth and template fidelity like any other ticket.\n5. **Shared-file overlaps**: enumerate files that ≥2 mutually-independent tickets each modify — tickets with no `Deps` on each other, even when they share a common upstream `Deps` (parallel siblings off one foundation ticket still merge-conflict on a shared file), and whether the shared file is pre-existing or created in-batch by that foundation ticket — so implementers coordinate mechanical merges.\n\nDo NOT commit. Leave files for user review.\n\n## Guardrails\n\n- **FOUNDATIONS is authoritative**: never approve a decomposition that violates a FOUNDATIONS principle or trips a §29 hard-fail — flag it as a CRITICAL Issue at Step 2 and await disposition.\n- **Template fidelity**: every ticket uses `tickets\u002F_TEMPLATE.md` exactly — no ad-hoc sections, no missing fields, no \"simplified\" variants. Template evolution is a separate spec.\n- **Ticket fidelity**: never silently skip a deliverable. If one seems wrong, use the 1-problem \u002F 3-options \u002F 1-recommendation format and ask.\n- **Codebase truth**: file paths, skill names, types, and schema references in tickets must be validated against the actual codebase, not assumed from the spec. Stale references propagated spec → ticket are a skill failure.\n- **Reviewable size**: each ticket should be reviewable as a single diff. When in doubt, split.\n- **Explicit dependencies**: declare inter-ticket ordering in `Deps`; never leave it implicit. Every `Deps` entry resolves to a ticket produced this run or a verified pre-existing path.\n- **No spec edits**: this skill never edits the source spec. If decomposition reveals a spec defect, flag it as an Issue and route the fix to `\u002Freassess-spec`.\n- **Worktree discipline**: inside a worktree, all paths resolve from the worktree root.\n- **Do not `git commit`**: writes land in the working tree; the user reviews and commits.\n\n## FOUNDATIONS Alignment\n\n| Principle | Step | Mechanism |\n|-----------|------|-----------|\n| §4 Non-negotiable principles | Pre-flight + Step 1 | `docs\u002Fprinciples\u002FFOUNDATIONS.md`, _TEMPLATE.md, README.md, and the spec are required reads; the skill refuses to decompose without them. |\n| §8 Deterministic prompt compilation | Step 2 | Deliverables touching compilation are flagged if they introduce a nondeterministic input or an LLM intermediary in the compilation path. |\n| §11 Validation and hard fails | Step 2 | Deliverables proposing validation rules must stay deterministic and blocking and distinguish warnings from blockers; deviations are flagged. |\n| §15 POV, knowledge, secrets | Step 2 | Deliverables touching POV\u002Fsecret handling that would weaken the secret firewall trigger a CRITICAL Issue. |\n| §20 Durable change & human gatekeeping | Step 5 | Every ticket modifying existing behavior must cite the change rationale in Assumption Reassessment (no silent retcon). |\n| §29 Alignment checklist | Step 2 | Any §29 hard-fail answered \"yes\" is a CRITICAL Issue blocking decomposition. |\n\n## Final Rule\n\nA decomposition is not complete until every spec deliverable maps to a ticket OR to an explicit non-goal OR to a documented exempt category, every `Deps` resolves to a real target, every ticket's Files to Touch matches the current codebase, and every FOUNDATIONS-impacting deliverable has been validated against `docs\u002Fprinciples\u002FFOUNDATIONS.md` before its ticket was written.\n",{"name":5,"arguments":23,"description":7,"user-invocable":26},[24,28],{"name":25,"required":26,"description":27},"spec_path",true,"Path to the spec file (e.g., specs\u002FSPEC-001-prompt-compiler.md)",{"name":29,"required":19,"description":30},"namespace","Ticket namespace prefix, used as \u003CPREFIX>-\u003CNNN>.md (e.g., SPEC001PROMPT). If omitted, the skill derives one from the spec number and title and asks the user to confirm.","main","bb13c72ec4134361fec0b0584913aee821330c02",".claude\u002Fskills\u002Fspec-to-tickets","https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fcontinuity-loom","https:\u002F\u002Fgithub.com\u002Fjoeloverbeck","2026-11-10 23:00:02",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":26},[39,42,45],{"tool":40,"command":41},"npx","npx skills add joeloverbeck\u002Fcontinuity-loom --skill spec-to-tickets",{"tool":43,"command":44},"bunx","bunx skills add joeloverbeck\u002Fcontinuity-loom --skill spec-to-tickets",{"tool":46,"command":47},"pnpm","pnpm dlx skills add joeloverbeck\u002Fcontinuity-loom --skill spec-to-tickets","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fcontinuity-loom\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fspec-to-tickets\u002FSKILL.md",[50,56],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fcodebase-validation.md","REFERENCE","参考文档",19454,"https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fcontinuity-loom\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fspec-to-tickets\u002Freferences\u002Fcodebase-validation.md",{"path":57,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Fdecomposition-patterns.md",20400,"https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fcontinuity-loom\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fspec-to-tickets\u002Freferences\u002Fdecomposition-patterns.md",[61,68,73,78,85,90],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M758XG3F9AESCQBKYQX0GPSD","triage","Move issues and external PRs through a state machine of triage roles — categorise, verify, grill if needed, and write agent-ready briefs.","https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fcontinuity-loom\u002Fblob\u002Fmain\u002Freports\u002Fskill-evidence\u002Ftriage\u002Freviews\u002Frev_a4ce832d-b023-4fa0-8d5d-382e558791d8\u002Fcandidate\u002FSKILL.md",[],[],{"skillNo":69,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M758XDY39PNPRY8FSXVE8SZN","https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fcontinuity-loom\u002Fblob\u002Fmain\u002Freports\u002Fskill-evidence\u002Ftriage\u002Fdecontamination\u002Fdec_2d4305f8-ee96-4376-a267-061413c4fdd6\u002Fcandidate\u002FSKILL.md",[],[],{"skillNo":74,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M758XB4XZ6N5XP8XZXWVMVQ0","https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fcontinuity-loom\u002Fblob\u002Fmain\u002Freports\u002Fskill-evidence\u002Ftriage\u002Fdecontamination\u002Fdec_2d4305f8-ee96-4376-a267-061413c4fdd6\u002Fbaseline\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M758X7WRCGV9BM5RNEGH4MSX","to-prd","Turn the current conversation into a PRD and publish it to the project issue tracker — no requirements interview, just synthesis of what you've already discussed; the seam confirmation is the sole checkpoint.","https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fcontinuity-loom\u002Fblob\u002Fmain\u002Freports\u002Fskill-evidence\u002Fto-prd\u002Fdecontamination\u002Fdec_581ad8e4-4f9d-4aad-a6ee-59eeec05c8a4\u002Fpre-land-backup\u002FSKILL.md",[],[],{"skillNo":86,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":18},"01M758X55QJQTVHH1MWHJF2BBZ","https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fcontinuity-loom\u002Fblob\u002Fmain\u002Freports\u002Fskill-evidence\u002Fto-prd\u002Fdecontamination\u002Fdec_581ad8e4-4f9d-4aad-a6ee-59eeec05c8a4\u002Fcandidate\u002FSKILL.md",[],[],{"skillNo":91,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M758X1Z0F2YRRHNTR3ZCY02C","https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fcontinuity-loom\u002Fblob\u002Fmain\u002Freports\u002Fskill-evidence\u002Fto-prd\u002Fdecontamination\u002Fdec_581ad8e4-4f9d-4aad-a6ee-59eeec05c8a4\u002Fbaseline\u002FSKILL.md",[],[]]