[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77K0A71S2MJ09GYM4BCQEXG":3,"skill-same:01M77K0A71S2MJ09GYM4BCQEXG":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M77K0A71S2MJ09GYM4BCQEXG","debug",null,"Signal-driven production debugging via shared RCA core. Use when triaging production errors, crashes, or regressions before fixing. Diagnoses and routes; does not implement patches or merge.","grdavies\u002Fshipwright","grdavies","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2638082?v=4","01M77JZCZJTWB8WBWX4NNW8MNP","Ross Davies","01M77JZD0S2Q4JZEM0310T9A73",2,"MIT","https:\u002F\u002Fgithub.com\u002Fgrdavies\u002Fshipwright\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdebug\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: debug\ndescription: Signal-driven production debugging via shared RCA core. Use when triaging production errors, crashes, or regressions before fixing. Diagnoses and routes; does not implement patches or merge.\n---\n# Debug workflow\n\nPost-ship production signals **and** dev-time test\u002Fbuild failures (R22). Shares `skills\u002Frca-core` with\nstabilize (R35). **Diagnoses + proposes; does not implement or merge** — routing hands off to\nimplementation (`003`) or documentation (`002`).\n\n\n**Model tier:** build — resolve via `python3 scripts\u002Fsw_bootstrap.py resolve-model-tier.py -- --skill debug`. When using the Task tool for subagent dispatch, resolve concrete model IDs from `models.tiers` in config (never semantic tier names in subagent `model:` frontmatter).\n\n\n## Orchestrator plan-policy (PRD 024)\n\nSingle-tier orchestrator-step plan proposal, validation, and capability selection are owned by\n`core\u002Fcommands\u002Fsw-debug.md` + `skills\u002Fconductor\u002FSKILL.md` — this skill maps phases to step IDs\n(`triage`, `normalize`, `enrich`, `rca`, `route-confirm-halt`, `route`, `rca-human-decision-halt`, `record`).\n\nUnder `proposed`, Sentry bodies MUST be redacted via `python3 scripts\u002Fsw_bootstrap.py memory-redact.py` before any persist or\nhandoff (including DBG-A2 concurrent enrich + preflight).  Fail-closed on redaction error.\n\nUnder `proposed`, R21 surfacing writes `chosenPlan`, `capabilitySet`, and `planRejections` to\n`.cursor\u002Fsw-debug-runs\u002F\u003CrunId>\u002Fepisodic-run-summary.json` (fixture: `debug-r21-surfacing`).\nDriver-enforced budget\u002Fno-progress trips after repeated plan rejections (fixture: `debug-budget-trip`).\n\n## Phase 0 — Triage\n\nParse the inbound signal:\n\n| Input pattern | Normalized type | RCA entry |\n|---------------|-----------------|-----------|\n| Sentry issue URL\u002FID | `sentry` | `debug` |\n| Deploy log excerpt \u002F CI deploy failure | `deploy_log` | `debug` |\n| User-described broken behavior | `user_report` | `debug` |\n| Failing test output \u002F assertion | `test_failure` | `dev-time` |\n| Build\u002Ftypecheck\u002Flint failure | `build_failure` | `dev-time` |\n| `\u002Fsw-verify` failure + log excerpt | `verify_failure` | `dev-time` |\n\n**Dev-time path:** when type is `test_failure`, `build_failure`, or `verify_failure`, skip production-signal\nenrichment and invoke `skills\u002Frca-core` **dev-time entry** (strict reproduction-first + failing-regression-test\ngate). See **Dev-time gates** below.\n\n**Trivial fast-path:** cause obvious from signal alone (single-line config typo visible in stack, known\nmissing env var in deploy log). Present diagnosis + proposed one-line fix; offer **Route to scoped phase \u002F\nDiagnosis only** — never edit on bare `main`. If the user chooses scoped phase, skip to Phase 3 routing with\nthe one-line fix as the proposal. Diagnosis-only → skip to Phase 4.\n\nOtherwise → Phase 1.\n\n## Phase 1 — Enrich + memory preflight\n\n1. Normalize to `skills\u002Frca-core\u002Freferences\u002Fdebug-inputs.md` shape.\n2. **Redact** all text: `python3 scripts\u002Fsw_bootstrap.py memory-redact.py`.\n\n### Sentry expansion reader (R9\u002FR10)\n\nWhen expanding a bare Sentry ref via MCP (`skills\u002Fdebug\u002Freferences\u002Fsentry.md`), delegate a **reader**\nTask at boundary `debug-sentry-expansion` (`role: reader`, `readonly: true`). The reader fetches and\nredacts the Sentry body; the acting debug agent receives only the redacted enveloped excerpt.\n\n```bash\npython3 scripts\u002Fdispatch-check.py --agent generalPurpose --command sw-debug --skill debug   --parent-model \u003Cconcrete-parent-id> --role reader --boundary debug-sentry-expansion   --dispatch-id \u003Cid> --prompt \"$RUN_DIR\u002Fsentry-reader-prompt.md\"\n```\n\n3. If `type == sentry` → `skills\u002Fdebug\u002Freferences\u002Fsentry.md` (MCP enrich or degrade).\n4. `memory-preflight` **search**: category `debug`, `relatedFiles`, tags for failing area.\n5. Attach `priorDebugMemoryIds` to the signal context.\n\n## Phase 1.5 — Repro-first gate (R16–R21)\n\nBefore RCA hypothesis generation, run the mechanical repro-first gate:\n\n```bash\npython3 scripts\u002Fdebug_repro_gate.py run \\\n  --signal \"$RUN_DIR\u002Fnormalized-signal.json\" \\\n  --state \"$RUN_DIR\u002Frepro-gate-state.json\" \\\n  --out \"$RUN_DIR\u002Frepro-gate.status.json\"\n```\n\nGate verdicts: `pass` (repro confirmed or production evidence bundle complete), `blocked`\n(pending checklist items — exit 20), `exhausted` (bounded acquisition exhausted — exit 20). Typed halts\ninclude `resumeCommand` and checklist state (R21).\n\n### Mechanical reproduction path (dev-time, R17)\n\nFor `test_failure`, `build_failure`, and `verify_failure`:\n\n1. **Repro command (red)** — run the narrowest repro command; record exact command + output digest in\n   `repro-gate-state.json` under `repro.reproCommand` \u002F `repro.reproConfirmed`.\n2. **Minimize** — shrink surface area until failure remains (`mechanicalRepro.repro_minimize`).\n3. **Instrument** — add temporary logging or trace hooks on the failing path\n   (`mechanicalRepro.repro_instrument`).\n\nChecklist metadata: `python3 scripts\u002Fdebug_repro_gate.py checklist-metadata --signal-class dev-time`.\n\n### Evidence acquisition path (production, R18–R20)\n\nWhen local repro is impossible for `sentry`, `deploy_log`, or `user_report`:\n\n1. Fetch logs (`evidenceAcquisition.logs`).\n2. Fetch traces\u002Fspans (`evidenceAcquisition.traces`).\n3. Collect replay bundle when available (`evidenceAcquisition.replay_bundle`).\n4. Sentry MCP enrich read-only (`evidenceAcquisition.sentry_enrich`).\n\nBefore hypothesis unlock, persist production evidence bundle metadata in gate state:\n\n- `signalClass`, `checklistState`, redacted `artifactPaths`, and `complete: true` when required items finish.\n\nChecklist metadata: `python3 scripts\u002Fdebug_repro_gate.py checklist-metadata --signal-class production`.\n\n### Hypothesis gate (R19)\n\nDo not emit or dispatch RCA hypotheses while gate verdict is `blocked`. If hypotheses are present during\nevaluation, the gate returns `hypothesisGate: refused` with cause `hypothesis-before-gate`.\n\nOn `pass`, proceed to Phase 2. On `blocked` or `exhausted`, halt with `resumeCommand` and surface checklist\nstate — no speculative fix or hypothesis fan-out.\n\n## Phase 2 — RCA\n\nInvoke `skills\u002Frca-core`:\n\n- **Production signals** (`sentry`, `deploy_log`, `user_report`) → **debug entry procedure**\n- **Dev-time signals** (`test_failure`, `build_failure`, `verify_failure`) → **dev-time entry procedure**\n\n**Fan-out entry (opt-in):** when `rca.fanout.enabled` is true, evaluate D5 gating via\n`python3 scripts\u002Frca_fanout.py should-fanout --signal \u003Cnormalized-signal.json>`. On `useFanout: true`, follow\n`skills\u002Frca-core\u002Freferences\u002Ffan-out.md` (partitioned generators → synthesize → per-survivor refuters). On\n`useFanout: false`, use single-context shared discipline below.\n\nShared across entries:\n\n- Rank hypotheses with evidence\n- Causal-chain gate before fix proposal (refuter panel when fan-out active)\n- Invalidate rejected hypotheses explicitly\n- Hard stops: max 5 iterations, no-progress, rule-of-three, human-decision (R29)\n- Production debug: attempt repro-from-context; local repro optional\n- Dev-time: **reproduction-first (strict)** and **failing-regression-test gate** (see below)\n\n## Dev-time gates\n\nApply when Phase 0 classifies a dev-time signal:\n\n1. **Reproduction-first** — run the narrowest repro command; record exact command + output. If repro cannot\n   be established, log attempts and stop at R29 human-decision — no speculative fix.\n2. **Failing-regression-test-before-fix** — identify or write a test that fails on current `HEAD`; cite its\n   path. The fix is not proposed until this test is red. After fix, the same test must pass without\n   weakening assertions.\n3. **Optional git-bisect-for-regressions** — when the failure is a regression with unclear introducer, offer\n   bisect with a determinism-forcing wrapper (exit `0`\u002F`1`\u002F`125`-skip per `rca-core` dev-time entry).\n4. **Rule-of-three** — three identical failed fix attempts (same hypothesis + evidence signature) triggers\n   R29 circuit breaker → escalate to architecture review; do not retry variants.\n\n## Phase 3 — Fix-size classification + routing (R24)\n\nAfter root cause + proposed fix, classify **small** vs **substantial** using `skills\u002Ftriage\u002FSKILL.md`\nrubrics on the **proposed fix scope** (estimated file count, risk triggers, workaround detection):\n\n| Outcome | Route | Handoff |\n|---------|-------|---------|\n| **Small** — Quick or Standard tier (≤5 files, no risk-floor triggers), no architectural mismatch, not workaround-only | Scoped implementation | `\u002Fsw-worktree provision debug-\u003Cslug>` → `\u002Fsw-start` with RCA output as phase brief |\n| **Substantial** — Full tier, wrong interface\u002Frequirements, risk-floor triggers, or every fix is a workaround | Documentation | `\u002Fsw-brainstorm` (new) or `\u002Fsw-amend` + freeze for frozen PRD scope changes |\n\n**Never** patch in place on `main` without worktree + phase loop.\n\n### Workaround detection (bias → substantial)\n\n- Fix only masks symptom (retry loop, broader catch, silent swallow)\n- Root cause is missing requirement or wrong abstraction\n- Proposed fix contradicts frozen PRD without amendment path\n\n### Routing record (compounding)\n\nAfter routing decision, `memory-preflight` **write** (redacted):\n\n```json\n{\n  \"category\": \"debug\",\n  \"tags\": [\"surface:debug-route\", \"route:\u003Cscoped|brainstorm|amendment>\"],\n  \"relatedFiles\": [],\n  \"summary\": \"root cause one-liner\",\n  \"originatingSignal\": \"\u003Ctype + redacted ref>\"\n}\n```\n\nFeeds `\u002Fsw-compound` and future debug preflight.\n\n## Phase 4 — Handoff summary\n\n```markdown\n## Signal\n[type + redacted ref]\n\n## Root cause\n…\n\n## Proposed fix\n…\n\n## Route\n\u003Cscoped phase | brainstorm | amendment> — rationale\n\n## Next command\n\u002Fsw-worktree … + \u002Fsw-start  OR  \u002Fsw-brainstorm \u002F amendment path\n```\n\n## Guardrails\n\n- Production path is signal-driven (R22); dev-time path is repro-driven with strict gates.\n- All Sentry\u002Flog text redacted before prompts\u002Fmemory (R41).\n- Bounded RCA loop (R29) — same hard stops as stabilize, including rule-of-three escalation.\n- No auto-merge, no silent in-place patches on default branch.\n- Sentry MCP read-only; degrade when unavailable.\n\n\n## Small-fix → deliver handoff (PRD 067 R10–R14)\n\nWhen route classification is **small**:\n\n1. Materialize a thin one-phase frozen pack via `scripts\u002Fdebug_deliver_handoff.py materialize`\n   (`tasks-debug-\u003Cslug>`; virtual body under `docs\u002Fprds\u002Fdebug-\u003Cslug>\u002F`).\n2. Print `\u002Fsw-deliver run --unit-id tasks-debug-\u003Cslug>` and optionally confirm same-turn handoff.\n3. Confirm → invoke `\u002Fsw-deliver run` inline in-turn; decline → end debug. **Never** Task-spawn deliver.\n4. Pre-confirm: `debug_deliver_handoff.py pre-confirm-guard --step \u003Cstep>` fails closed on execute\u002Fship (R12).\n5. Post-handoff legitimate halts are the deliver\u002Fship set only (R13).\n\n**Substantial** routes still go to `\u002Fsw-brainstorm` or `\u002Fsw-amend` and **bypass** the thin debug pack (R14).\nDebug never auto-merges to `main`.\n","# Debug workflow\n\nPost-ship production signals **and** dev-time test\u002Fbuild failures (R22). Shares `skills\u002Frca-core` with\nstabilize (R35). **Diagnoses + proposes; does not implement or merge** — routing hands off to\nimplementation (`003`) or documentation (`002`).\n\n\n**Model tier:** build — resolve via `python3 scripts\u002Fsw_bootstrap.py resolve-model-tier.py -- --skill debug`. When using the Task tool for subagent dispatch, resolve concrete model IDs from `models.tiers` in config (never semantic tier names in subagent `model:` frontmatter).\n\n\n## Orchestrator plan-policy (PRD 024)\n\nSingle-tier orchestrator-step plan proposal, validation, and capability selection are owned by\n`core\u002Fcommands\u002Fsw-debug.md` + `skills\u002Fconductor\u002FSKILL.md` — this skill maps phases to step IDs\n(`triage`, `normalize`, `enrich`, `rca`, `route-confirm-halt`, `route`, `rca-human-decision-halt`, `record`).\n\nUnder `proposed`, Sentry bodies MUST be redacted via `python3 scripts\u002Fsw_bootstrap.py memory-redact.py` before any persist or\nhandoff (including DBG-A2 concurrent enrich + preflight).  Fail-closed on redaction error.\n\nUnder `proposed`, R21 surfacing writes `chosenPlan`, `capabilitySet`, and `planRejections` to\n`.cursor\u002Fsw-debug-runs\u002F\u003CrunId>\u002Fepisodic-run-summary.json` (fixture: `debug-r21-surfacing`).\nDriver-enforced budget\u002Fno-progress trips after repeated plan rejections (fixture: `debug-budget-trip`).\n\n## Phase 0 — Triage\n\nParse the inbound signal:\n\n| Input pattern | Normalized type | RCA entry |\n|---------------|-----------------|-----------|\n| Sentry issue URL\u002FID | `sentry` | `debug` |\n| Deploy log excerpt \u002F CI deploy failure | `deploy_log` | `debug` |\n| User-described broken behavior | `user_report` | `debug` |\n| Failing test output \u002F assertion | `test_failure` | `dev-time` |\n| Build\u002Ftypecheck\u002Flint failure | `build_failure` | `dev-time` |\n| `\u002Fsw-verify` failure + log excerpt | `verify_failure` | `dev-time` |\n\n**Dev-time path:** when type is `test_failure`, `build_failure`, or `verify_failure`, skip production-signal\nenrichment and invoke `skills\u002Frca-core` **dev-time entry** (strict reproduction-first + failing-regression-test\ngate). See **Dev-time gates** below.\n\n**Trivial fast-path:** cause obvious from signal alone (single-line config typo visible in stack, known\nmissing env var in deploy log). Present diagnosis + proposed one-line fix; offer **Route to scoped phase \u002F\nDiagnosis only** — never edit on bare `main`. If the user chooses scoped phase, skip to Phase 3 routing with\nthe one-line fix as the proposal. Diagnosis-only → skip to Phase 4.\n\nOtherwise → Phase 1.\n\n## Phase 1 — Enrich + memory preflight\n\n1. Normalize to `skills\u002Frca-core\u002Freferences\u002Fdebug-inputs.md` shape.\n2. **Redact** all text: `python3 scripts\u002Fsw_bootstrap.py memory-redact.py`.\n\n### Sentry expansion reader (R9\u002FR10)\n\nWhen expanding a bare Sentry ref via MCP (`skills\u002Fdebug\u002Freferences\u002Fsentry.md`), delegate a **reader**\nTask at boundary `debug-sentry-expansion` (`role: reader`, `readonly: true`). The reader fetches and\nredacts the Sentry body; the acting debug agent receives only the redacted enveloped excerpt.\n\n```bash\npython3 scripts\u002Fdispatch-check.py --agent generalPurpose --command sw-debug --skill debug   --parent-model \u003Cconcrete-parent-id> --role reader --boundary debug-sentry-expansion   --dispatch-id \u003Cid> --prompt \"$RUN_DIR\u002Fsentry-reader-prompt.md\"\n```\n\n3. If `type == sentry` → `skills\u002Fdebug\u002Freferences\u002Fsentry.md` (MCP enrich or degrade).\n4. `memory-preflight` **search**: category `debug`, `relatedFiles`, tags for failing area.\n5. Attach `priorDebugMemoryIds` to the signal context.\n\n## Phase 1.5 — Repro-first gate (R16–R21)\n\nBefore RCA hypothesis generation, run the mechanical repro-first gate:\n\n```bash\npython3 scripts\u002Fdebug_repro_gate.py run \\\n  --signal \"$RUN_DIR\u002Fnormalized-signal.json\" \\\n  --state \"$RUN_DIR\u002Frepro-gate-state.json\" \\\n  --out \"$RUN_DIR\u002Frepro-gate.status.json\"\n```\n\nGate verdicts: `pass` (repro confirmed or production evidence bundle complete), `blocked`\n(pending checklist items — exit 20), `exhausted` (bounded acquisition exhausted — exit 20). Typed halts\ninclude `resumeCommand` and checklist state (R21).\n\n### Mechanical reproduction path (dev-time, R17)\n\nFor `test_failure`, `build_failure`, and `verify_failure`:\n\n1. **Repro command (red)** — run the narrowest repro command; record exact command + output digest in\n   `repro-gate-state.json` under `repro.reproCommand` \u002F `repro.reproConfirmed`.\n2. **Minimize** — shrink surface area until failure remains (`mechanicalRepro.repro_minimize`).\n3. **Instrument** — add temporary logging or trace hooks on the failing path\n   (`mechanicalRepro.repro_instrument`).\n\nChecklist metadata: `python3 scripts\u002Fdebug_repro_gate.py checklist-metadata --signal-class dev-time`.\n\n### Evidence acquisition path (production, R18–R20)\n\nWhen local repro is impossible for `sentry`, `deploy_log`, or `user_report`:\n\n1. Fetch logs (`evidenceAcquisition.logs`).\n2. Fetch traces\u002Fspans (`evidenceAcquisition.traces`).\n3. Collect replay bundle when available (`evidenceAcquisition.replay_bundle`).\n4. Sentry MCP enrich read-only (`evidenceAcquisition.sentry_enrich`).\n\nBefore hypothesis unlock, persist production evidence bundle metadata in gate state:\n\n- `signalClass`, `checklistState`, redacted `artifactPaths`, and `complete: true` when required items finish.\n\nChecklist metadata: `python3 scripts\u002Fdebug_repro_gate.py checklist-metadata --signal-class production`.\n\n### Hypothesis gate (R19)\n\nDo not emit or dispatch RCA hypotheses while gate verdict is `blocked`. If hypotheses are present during\nevaluation, the gate returns `hypothesisGate: refused` with cause `hypothesis-before-gate`.\n\nOn `pass`, proceed to Phase 2. On `blocked` or `exhausted`, halt with `resumeCommand` and surface checklist\nstate — no speculative fix or hypothesis fan-out.\n\n## Phase 2 — RCA\n\nInvoke `skills\u002Frca-core`:\n\n- **Production signals** (`sentry`, `deploy_log`, `user_report`) → **debug entry procedure**\n- **Dev-time signals** (`test_failure`, `build_failure`, `verify_failure`) → **dev-time entry procedure**\n\n**Fan-out entry (opt-in):** when `rca.fanout.enabled` is true, evaluate D5 gating via\n`python3 scripts\u002Frca_fanout.py should-fanout --signal \u003Cnormalized-signal.json>`. On `useFanout: true`, follow\n`skills\u002Frca-core\u002Freferences\u002Ffan-out.md` (partitioned generators → synthesize → per-survivor refuters). On\n`useFanout: false`, use single-context shared discipline below.\n\nShared across entries:\n\n- Rank hypotheses with evidence\n- Causal-chain gate before fix proposal (refuter panel when fan-out active)\n- Invalidate rejected hypotheses explicitly\n- Hard stops: max 5 iterations, no-progress, rule-of-three, human-decision (R29)\n- Production debug: attempt repro-from-context; local repro optional\n- Dev-time: **reproduction-first (strict)** and **failing-regression-test gate** (see below)\n\n## Dev-time gates\n\nApply when Phase 0 classifies a dev-time signal:\n\n1. **Reproduction-first** — run the narrowest repro command; record exact command + output. If repro cannot\n   be established, log attempts and stop at R29 human-decision — no speculative fix.\n2. **Failing-regression-test-before-fix** — identify or write a test that fails on current `HEAD`; cite its\n   path. The fix is not proposed until this test is red. After fix, the same test must pass without\n   weakening assertions.\n3. **Optional git-bisect-for-regressions** — when the failure is a regression with unclear introducer, offer\n   bisect with a determinism-forcing wrapper (exit `0`\u002F`1`\u002F`125`-skip per `rca-core` dev-time entry).\n4. **Rule-of-three** — three identical failed fix attempts (same hypothesis + evidence signature) triggers\n   R29 circuit breaker → escalate to architecture review; do not retry variants.\n\n## Phase 3 — Fix-size classification + routing (R24)\n\nAfter root cause + proposed fix, classify **small** vs **substantial** using `skills\u002Ftriage\u002FSKILL.md`\nrubrics on the **proposed fix scope** (estimated file count, risk triggers, workaround detection):\n\n| Outcome | Route | Handoff |\n|---------|-------|---------|\n| **Small** — Quick or Standard tier (≤5 files, no risk-floor triggers), no architectural mismatch, not workaround-only | Scoped implementation | `\u002Fsw-worktree provision debug-\u003Cslug>` → `\u002Fsw-start` with RCA output as phase brief |\n| **Substantial** — Full tier, wrong interface\u002Frequirements, risk-floor triggers, or every fix is a workaround | Documentation | `\u002Fsw-brainstorm` (new) or `\u002Fsw-amend` + freeze for frozen PRD scope changes |\n\n**Never** patch in place on `main` without worktree + phase loop.\n\n### Workaround detection (bias → substantial)\n\n- Fix only masks symptom (retry loop, broader catch, silent swallow)\n- Root cause is missing requirement or wrong abstraction\n- Proposed fix contradicts frozen PRD without amendment path\n\n### Routing record (compounding)\n\nAfter routing decision, `memory-preflight` **write** (redacted):\n\n```json\n{\n  \"category\": \"debug\",\n  \"tags\": [\"surface:debug-route\", \"route:\u003Cscoped|brainstorm|amendment>\"],\n  \"relatedFiles\": [],\n  \"summary\": \"root cause one-liner\",\n  \"originatingSignal\": \"\u003Ctype + redacted ref>\"\n}\n```\n\nFeeds `\u002Fsw-compound` and future debug preflight.\n\n## Phase 4 — Handoff summary\n\n```markdown\n## Signal\n[type + redacted ref]\n\n## Root cause\n…\n\n## Proposed fix\n…\n\n## Route\n\u003Cscoped phase | brainstorm | amendment> — rationale\n\n## Next command\n\u002Fsw-worktree … + \u002Fsw-start  OR  \u002Fsw-brainstorm \u002F amendment path\n```\n\n## Guardrails\n\n- Production path is signal-driven (R22); dev-time path is repro-driven with strict gates.\n- All Sentry\u002Flog text redacted before prompts\u002Fmemory (R41).\n- Bounded RCA loop (R29) — same hard stops as stabilize, including rule-of-three escalation.\n- No auto-merge, no silent in-place patches on default branch.\n- Sentry MCP read-only; degrade when unavailable.\n\n\n## Small-fix → deliver handoff (PRD 067 R10–R14)\n\nWhen route classification is **small**:\n\n1. Materialize a thin one-phase frozen pack via `scripts\u002Fdebug_deliver_handoff.py materialize`\n   (`tasks-debug-\u003Cslug>`; virtual body under `docs\u002Fprds\u002Fdebug-\u003Cslug>\u002F`).\n2. Print `\u002Fsw-deliver run --unit-id tasks-debug-\u003Cslug>` and optionally confirm same-turn handoff.\n3. Confirm → invoke `\u002Fsw-deliver run` inline in-turn; decline → end debug. **Never** Task-spawn deliver.\n4. Pre-confirm: `debug_deliver_handoff.py pre-confirm-guard --step \u003Cstep>` fails closed on execute\u002Fship (R12).\n5. Post-handoff legitimate halts are the deliver\u002Fship set only (R13).\n\n**Substantial** routes still go to `\u002Fsw-brainstorm` or `\u002Fsw-amend` and **bypass** the thin debug pack (R14).\nDebug never auto-merges to `main`.\n",{"name":5,"description":7},"main","2633b37cdc50086084cc9c0ce6c994871d3e7aad","core\u002Fskills\u002Fdebug",0,"https:\u002F\u002Fgithub.com\u002Fgrdavies\u002Fshipwright","https:\u002F\u002Fgithub.com\u002Fgrdavies","2026-11-03 23:44:15",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add grdavies\u002Fshipwright --skill debug",{"tool":37,"command":38},"bunx","bunx skills add grdavies\u002Fshipwright --skill debug",{"tool":40,"command":41},"pnpm","pnpm dlx skills add grdavies\u002Fshipwright --skill debug","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgrdavies\u002Fshipwright\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdebug\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"references\u002Fsentry.md","REFERENCE","参考文档",1935,"https:\u002F\u002Fgithub.com\u002Fgrdavies\u002Fshipwright\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdebug\u002Freferences\u002Fsentry.md",[52,59,66,73,79,86],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M77K4Z004VAMY705XQKJAH4Y","wrong-name","Missing use when phrase and wrong directory name for critical lint failure.","https:\u002F\u002Fgithub.com\u002Fgrdavies\u002Fshipwright\u002Fblob\u002Fmain\u002Fscripts\u002Ftest\u002Ffixtures\u002Fworkflow-pack-sdk\u002Fnegative\u002Fbad-instruction\u002Fskills\u002Fbad-skill\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M77K4WR3WP22SBT6053PYWAK","demo-skill","Demo workflow pack skill fixture. Use when validating workflow-pack-sdk golden paths in CI.","https:\u002F\u002Fgithub.com\u002Fgrdavies\u002Fshipwright\u002Fblob\u002Fmain\u002Fscripts\u002Ftest\u002Ffixtures\u002Fworkflow-pack-sdk\u002Fgolden\u002Fvalid-pack\u002Fskills\u002Fdemo-skill\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M77K4SV48XDDDQ81PD09G9N6","good-skill","Validates Agent Skills spec conformance for fixture trees. Use when testing skills-spec-guard pass paths across core and dist mirrors. Does not ship production skills.","https:\u002F\u002Fgithub.com\u002Fgrdavies\u002Fshipwright\u002Fblob\u002Fmain\u002Fscripts\u002Ftest\u002Ffixtures\u002Fskills-spec\u002Fpass-valid\u002Fcore\u002Fskills\u002Fgood-skill\u002FSKILL.md",[],[],{"skillNo":74,"name":54,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M77K4PWVT96VMTMMFE2Y80GJ","Fixture with name\u002Fdir mismatch for guard failure tests. Use when verifying skills-spec-guard rejects invalid identity. Does not ship production skills.","https:\u002F\u002Fgithub.com\u002Fgrdavies\u002Fshipwright\u002Fblob\u002Fmain\u002Fscripts\u002Ftest\u002Ffixtures\u002Fskills-spec\u002Ffail-name-mismatch\u002Fcore\u002Fskills\u002Fgood-skill\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M77K4KSS5Z0Q0DEAA8PV9316","bad-description","Missing the required when trigger phrase in this fixture skill.","https:\u002F\u002Fgithub.com\u002Fgrdavies\u002Fshipwright\u002Fblob\u002Fmain\u002Fscripts\u002Ftest\u002Ffixtures\u002Fskills-spec\u002Ffail-description-shape\u002Fcore\u002Fskills\u002Fbad-description\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M77K4H9HK5FDF84D65228XFA","dropin-demo","https:\u002F\u002Fgithub.com\u002Fgrdavies\u002Fshipwright\u002Fblob\u002Fmain\u002Fscripts\u002Ftest\u002Ffixtures\u002Fcapability-select\u002Fdropin\u002Fcore\u002Fskills\u002Fdropin-demo\u002FSKILL.md",[],[]]