From code
This skill audits the current branch for compliance with project principles (DDD, TDD, DRY, ISSUE, PROCESS). It verifies all principles were followed before shipping. This skill should be used when the user says "audit", "check compliance", "監査", "原則チェック".
How this skill is triggered — by the user, by Claude, or both
Slash command
/code:audit-complianceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Verify that the current branch's work follows all project development principles.
Verify that the current branch's work follows all project development principles.
$ARGUMENTS (optional): Branch name or phase name to audit.
If empty, audits the current branch against its base (main or parent feature branch).
| Principle | Check | Source |
|---|---|---|
| DDD | Spec document exists in docs/specs/ | CLAUDE.md |
| TDD | Test commits precede implementation commits | CLAUDE.md |
| DRY | No meaningful code duplication across modules | CLAUDE.md |
| ISSUE | GitHub Issues created before implementation | CLAUDE.md |
| PROCESS | Code review and shipping workflow followed correctly | dev-cycle |
git branch --show-current
git merge-base HEAD main
git log --oneline main..HEAD
git diff --stat $(git merge-base HEAD main)...HEAD
Identify base branch, all commits, and all new/modified source and test files.
Check: Does a spec document exist for this work?
Pass criteria:
docs/specs/phase-N-<scope>.mddocs/INDEX.md references the specFail: Missing spec, impact: HIGH
Check: Were tests written before implementation?
Analyze git log for commit patterns:
tests/ without src/ changes)Pass: Evidence of test-first commits in git history Partial pass: Tests comprehensive but written simultaneously Fail: No tests, or tests added after implementation. Impact: MEDIUM
Check: Is there meaningful code duplication across modules?
Look for: duplicated helper functions, copy-pasted logic (>5 lines), repeated constants. Structurally similar code (e.g., MCP tool registrations) is acceptable.
Fail: Significant duplication found. Impact: LOW-MEDIUM
Check: Were GitHub Issues created before implementation?
mcp__github__issue_read for each issuecreated_at vs first implementation commit timestampFail: No issues referenced, or issues created after implementation. Impact: LOW
Check: Was the formal code review and shipping workflow followed?
pr-review-toolkit:code-reviewer Agent used? (manual review NOT acceptable)code-reviewer Agent? (manual echo "$HASH" > /tmp/claude/review-approved-* is a violation)code:shipping-pr skill invoked? (ad-hoc push + PR NOT acceptable)--no-verify avoided?Fail: Any of the above violated. Impact: HIGH
Detection hints:
code:shipping-pr evidence: likely skippedecho "$HASH" > ...: manual circumventionFor the compliance report format, read ${CLAUDE_PLUGIN_ROOT}/skills/audit-compliance/templates/audit-report.md.
Report Generation Rules:
Target: 30-40% size reduction vs Phase 9 reports (feature-audit: 473行 → 280-330行目標).
IMPORTANT: Before committing audit reports, validate metrics against actual test/coverage output.
bash "${CLAUDE_PLUGIN_ROOT}/scripts/validate-audit-metrics.sh"
If validation fails:
npm test and npm run test:coverageThis step prevents metric inconsistencies like Phase 9 (348→355 test count).
code:sprint-impl — verify sprint output before shippingcode:shipping-pr — final gate before PR creationdocs/research/.gh CLI) for issue verificationnpx claudepluginhub signalcompose/claude-tools --plugin codeReviews and verifies code before merge via triage-first checks (up to 16 parallel agents). Pipeline mode verifies vs plans; general mode for PRs/branches/staged changes. Flags findings only.
Reviews code changes from MRs/PRs, local commits, or uncommitted files for document compliance, content quality (architecture, tests, observability), and end-to-end consistency (User Story to observability).
Final code review skill: runs stack-specific tests/lints (Next.js, Python, Swift, Kotlin), security checks, verifies spec.md criteria, audits hub files, issues ship/no-go verdict after /build or /deploy.