core/skills/sw-audit/SKILL.md
Periodic codebase health check. Analyzes architecture, complexity, consistency, and debt across the full codebase. Produces persistent findings in AUDIT.md.
npx skillsauth add obsidian-owl/specwright sw-auditInstall 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.
Find systemic codebase issues that per-change quality gates miss. Architecture debt, complexity growth, convention drift, and accumulated workarounds compound silently. Surface them, let the user prioritize, and persist findings for future design cycles.
{projectArtifactsRoot}/CONSTITUTION.md -- practices to check against{projectArtifactsRoot}/AUDIT.md -- prior findings (if exists, for ID matching){projectArtifactsRoot}/LANDSCAPE.md -- module structure (if exists, for triage){projectArtifactsRoot}/config.json -- audit config (optional audit section){projectArtifactsRoot}/AUDIT.md -- findings per protocols/audit.md formatScope (LOW freedom):
currentWork in workflow.json. Does NOT require a lock. Can run while a work unit is in progress.Triage (MEDIUM freedom):
--full argument → Full: parallel agents, all dimensionsAnalysis (HIGH freedom):
protocols/delegation.md:
specwright-architect: architecture + complexity (structural analysis)specwright-reviewer: consistency + debt (convention and quality analysis)Synthesis (LOW freedom):
protocols/audit.md (dimension + location). Reuse matched IDs, assign new IDs for unmatched. Mark unmatched prior findings as stale.Presentation (MEDIUM freedom):
protocols/decision.md CURATION for severity and export decisions:
finding tag.protocols/audit.md -- finding format, IDs, matching, lifecycleprotocols/delegation.md -- agent delegationprotocols/decision.md -- autonomous decision framework (CURATION for severity)protocols/context.md -- config and anchor doc loadingprotocols/backlog.md -- backlog item format and write targets| Condition | Action | |-----------|--------| | No codebase files found | STOP: "No source files to audit." | | Agents unavailable | Fall back to inline analysis (less thorough) | | Prior AUDIT.md parse error | WARN, start fresh (no ID continuity) | | Compaction during audit | Re-run 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}.