Skip to content

Comments

feat(skills): add sw-audit for periodic codebase health checks#27

Merged
MacAttak merged 7 commits intomainfrom
work/codebase-audit
Feb 15, 2026
Merged

feat(skills): add sw-audit for periodic codebase health checks#27
MacAttak merged 7 commits intomainfrom
work/codebase-audit

Conversation

@MacAttak
Copy link
Contributor

Summary

  • Add sw-audit skill for periodic codebase health checks that find systemic tech debt (architecture, complexity, consistency, debt) that per-change quality gates miss
  • Add protocols/audit.md defining the AUDIT.md reference document format, finding IDs, matching heuristic, lifecycle, and freshness rules
  • Integrate audit findings into sw-design (surface relevant findings during research) and sw-learn (resolve addressed findings after shipping)

Acceptance Criteria

# Criterion Status
AC-1.1 Audit protocol defines AUDIT.md format PASS
AC-1.2 Finding ID format and matching heuristic PASS
AC-1.3 Resolved finding lifecycle PASS
AC-1.4 Size targets and truncation rules PASS
AC-1.5 Freshness rules, configurable threshold PASS
AC-1.6 Protocol is consumer-agnostic PASS
AC-1.7 Protocol under ~150 words PASS (123 words)
AC-2.1 AUDIT.md in context protocol Reference Documents PASS
AC-2.2 Existing context protocol entries unchanged PASS
AC-3.1 sw-audit follows standard skill anatomy PASS
AC-3.2 allowed-tools includes Read, Write, Glob, Grep, Task, AskUserQuestion PASS
AC-3.3 Adaptive triage (Focused/Standard/Full) PASS
AC-3.4 Agent delegation (architect + reviewer) PASS
AC-3.5 Synthesis by skill, not agents PASS
AC-3.6 Presentation grouped by dimension PASS
AC-3.7 No currentWork, no lock, concurrent-safe PASS
AC-3.8 Failure modes complete PASS
AC-3.9 Token budget (~600 tokens) WARN (479 words, 6.4% over ~450 target)
AC-4.1 sw-design loads AUDIT.md in Research PASS
AC-4.2 Surface relevant audit findings PASS
AC-4.3 Missing AUDIT.md — no warning PASS
AC-4.4 sw-design net word increase <=10 PASS (+10)
AC-5.1 Audit resolution constraint placement PASS
AC-5.2 Overlap check, move findings to Resolved PASS
AC-5.3 Missing AUDIT.md — silently skip PASS
AC-5.4 protocols/audit.md in sw-learn Protocol References PASS
AC-5.5 sw-learn net word increase <=15 PASS (+13)
AC-6.1 DESIGN.md Reference Documents includes AUDIT.md PASS
AC-6.2 DESIGN.md skills table includes sw-audit (15 total) PASS
AC-6.3 DESIGN.md protocols table includes audit.md PASS
AC-6.4 DESIGN.md directory tree includes sw-audit + AUDIT.md PASS
AC-6.5 CLAUDE.md table + protocols list updated PASS
AC-6.6 README.md counts updated (15 skills, 12 protocols) PASS

Gate Results

Gate Status Findings (B/W/I)
Build SKIP — (no build command)
Tests SKIP — (no test runner)
Security PASS 0/0/0
Wiring PASS 0/0/4
Spec PASS 0/1/0

Evidence

  • security-report.md — 0 findings across 8 changed files
  • wiring-report.md — All cross-references verified (19 checks), 4 INFO findings (cosmetic)
  • spec-compliance.md — 31/33 PASS, 1 WARN (AC-3.9 marginal word count), 1 N/A (no test framework)

🤖 Generated with Claude Code

MacAttak and others added 7 commits February 15, 2026 19:32
Defines AUDIT.md format, finding ID scheme with dimension+location
matching, lifecycle (open/stale/resolved/purged), size caps, and
freshness rules. Consumer-agnostic per P4.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Analyzes architecture, complexity, consistency, and debt dimensions.
Delegates to architect and reviewer agents, synthesizes findings into
persistent AUDIT.md. Adaptive intensity (focused/standard/full).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Load AUDIT.md during research phase to surface known tech debt in the
area being designed. Tightened User checkpoints to compensate (P2).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
After landscape update, checks if work unit resolved any open audit
findings. Tightened Presentation and Retrospective to compensate (P2).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
[codebase-audit/docs-audit]

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolves AC-1.7 (protocol over token budget), AC-4.4 (sw-design +14
words, limit 10), and AC-5.5 (sw-learn +36 words, limit 15).

[codebase-audit/verify-fixes]

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@MacAttak MacAttak merged commit 2f79ca6 into main Feb 15, 2026
2 checks passed
@MacAttak MacAttak deleted the work/codebase-audit branch February 15, 2026 20:06
@github-actions github-actions bot mentioned this pull request Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant