core/skills/sw-debug/SKILL.md
Investigation-first debugging workflow. Scopes the problem, delegates root cause analysis, produces a diagnosis report, and applies fix/log/defer autonomously.
npx skillsauth add obsidian-owl/specwright sw-debugInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
First-class debugging path. Scope the problem, investigate concurrently,
diagnose with evidence, then decide: fix it now, log it, or defer. Operates
autonomously, applying protocols/decision.md for the fix/log/defer decision.
{projectArtifactsRoot}/config.json — backlog.type and backlog.labeldiagnosis.md at {workArtifactsRoot}/{id}/diagnosis.md — always producedspec.md at {workArtifactsRoot}/{id}/spec.md — Fix path only (2-3 acceptance criteria)decisions.md at {workArtifactsRoot}/{id}/decisions.md — fix/log/defer decision recorded per protocols/decision.mdStage boundary (LOW freedom):
Follow protocols/stage-boundary.md. Investigate and diagnose. NEVER write code,
run tests, branch, or commit. Fix path: produce spec.md, handoff to /sw-build.
Scope (MEDIUM freedom):
Investigate (HIGH freedom):
Delegate concurrently per protocols/delegation.md: specwright-researcher (code
context, call paths) and specwright-architect (root cause, blast radius).
Diagnose (MEDIUM freedom):
Write diagnosis.md: Problem (observed vs expected), Root Cause (confidence level,
file:line evidence), Blast Radius (affected / not affected), Fix Approach (high-level),
Alternatives Considered. If agents return insufficient evidence: produce low-confidence
diagnosis and note the gap in decisions.md.
Decision (MEDIUM freedom):
Apply protocols/decision.md DISAMBIGUATION + reversibility:
/sw-build./sw-design (Type 1 — structural scope).protocols/backlog.md.defer tag.
Record the decision in decisions.md.State (LOW freedom):
Follow protocols/state.md. Work ID: debug-{short-description}.
protocols/stage-boundary.md -- scope and handoffprotocols/decision.md -- autonomous decision framework (fix/log/defer)protocols/state.md -- workflow state updatesprotocols/delegation.md -- concurrent delegationprotocols/backlog.md -- backlog items| Condition | Action |
|-----------|--------|
| No problem description or context | Apply DISAMBIGUATION from conversation history. Record interpretation. |
| Agents return no evidence | Low-confidence diagnosis. Apply fix/log/defer per reversibility. |
| Fix is architectural (>3 files) | Halt. Recommend /sw-design. |
| Compaction during investigation | Re-run investigation; diagnosis.md rebuilt from scratch |
testing
Explicitly adopt an existing work into the current worktree after validating live ownership, stale sessions, and branch consistency.
testing
Orchestrates quality gates for the current work unit. Runs enabled gates in dependency order, produces an aggregate evidence report with gate handoff.
tools
Syncs the local repository by fetching all remotes, updating the base branch, and removing stale local branches that are not protected by live sessions or helper worktrees.
data-ai
Shows current Specwright state for this worktree, the attached work, repo-wide active works, gate results, and lock status. Supports --reset, --cleanup, and --repair {unitId}.