/epic:auditfrom epic
Runs parallel read-only audits across code quality, security, tests, and runtime behavior. Outputs PASS/WARN/FAIL per dimension with semantic dedup and spec coverage validation.
Ships in epic. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
CRITICAL: Run EPIC_PROJECT_DIR=$(epic path) first. NEVER use .harness/ in the project directory.
This skill has 4 internal modes that run in parallel:
The agent that wrote the code must not grade it, and the agents that grade it must not be able to change it. Dispatch each mode to an evaluator that has no Edit or Write tool:
| Mode | Claude Code plugin agent | Tools |
|---|---|---|
| audit:code, audit:security | epic:reviewer | Read, Grep, Glob |
| audit:test, audit:behavior | epic:prober | Read, Grep, Glob, Bash |
On hosts without plugin agents (Codex, agy, grok), use the host's subagent mechanism and put this line first in each mode prompt: "You are a read-only evaluator. Do not edit, create, or delete project files. Report findings only." An evaluator that edits files has graded its own work; discard its verdict and rerun the mode.
--strict Mode (Trust Boundary Isolation)When invoked with --strict (or when .harness/engagement.md has mode: strict), the audit enforces independence between verification agents to prevent reward hacking:
audit:code and audit:security run without visibility into each other's findings. Results are combined only during synthesis (Step 4)./go), a different agent instance must run audit. The builder's session ID is checked and excluded.Use --strict for security-sensitive projects, compliance requirements, or when the build phase had ambiguous outcomes.
Confirm go has run:
git symbolic-ref --short HEAD # must NOT be main/master
Load the spec to know what was supposed to be built:
ls -t $EPIC_PROJECT_DIR/specs/SPEC-*.md | head -1
Read the Requirements and Acceptance Criteria sections.
git diff --stat $(git merge-base HEAD main)
git diff --name-only $(git merge-base HEAD main)
git diff --numstat $(git merge-base HEAD main)
Over-edit signal. From --numstat, flag any file whose added+removed lines exceed 100 while the spec has 2 or fewer Requirements, or any file the spec never mentions. Flagged files get the Diff minimality check in audit:code. Typical cause: a formatter the project never adopted rewrote the whole file (quote style, line wrapping, import splitting).
| Pattern | Scope | Extra checks |
|---|---|---|
*.api.*, *route*, *controller*, *handler* | API | + Contract testing, request validation |
*.tsx, *.jsx, *.vue, *.svelte, *.css | Frontend | + Accessibility, semantic HTML |
*.sql, *migration*, *schema* | Database | + Migration safety, rollback plan |
*.rs, Cargo.toml, *.go, go.mod | Backend | + Build verification, type safety |
*.test.*, *.spec.*, __tests__/ | Tests | + Coverage delta, flaky test detection |
Dockerfile*, *.yml, *.yaml, Makefile | Infra | + Config validation, secret detection |
*.md, *.txt | Docs | + Link checking, freshness |
Launch all 4 modes with run_in_background: true, each on the read-only evaluator from the table above.
--strict isolation protocol: When strict mode is active, each mode agent must be launched with:
This ensures each mode forms independent conclusions. Results are combined only in Step 4 synthesis.
## Code Review: <file or area>
- [BLOCKER] <description> (line X)
- [WARN] <description> (line Y)
- [NIT] <description> (line Z)
## Summary
- Blockers: N
- Warnings: N
- Verdict: APPROVE / REQUEST_CHANGES
.env files are in .gitignore## Security Audit
- [CRITICAL] SQL injection risk in <file>:<line>
- [HIGH] Hardcoded secret in <file>:<line>
- [MEDIUM] Missing rate limit on <endpoint>
## Performance Audit
- [HIGH] N+1 query in <file>:<line>
- [MEDIUM] Unbounded array growth in <file>:<line>
## Summary
- Security: PASS / FAIL (N critical, N high)
- Performance: PASS / WARN (N issues)
epic-harness test-guard # base: origin/HEAD, then main, master. exit 1 = deleted tests, removed assertions, or added skips
A passing suite proves nothing if the diff deleted the test that failed. Each finding needs a stated reason in the report (test moved, feature removed, duplicate assertion). Any finding without one makes Tests FAIL; justified findings make it at least WARN. Exit 2 (no git, no base ref) is reported as N/A with the reason. The guard counts patterns, not meaning: also read every changed assertion, since assert!(true) in place of a real check passes it.Static review reads the diff; this mode runs the result. It answers "does the change do what the spec says when executed", which no diff reading can.
| Project shape | Probe |
|---|---|
| Web UI | Start the dev server, drive it with Playwright (MCP or script), screenshot each AC state |
| HTTP API | Start the server, call each changed endpoint with curl, check status and body |
| CLI | Run the binary with the scenario from each AC, check exit code and output |
| Library | Run an example or integration test that calls the changed public API |
| Docs, config, or nothing runnable | Mark the mode N/A with the reason and stop |
TZ=UTC, isolated temp HOME or DB, no network unless the AC needs it.$EPIC_PROJECT_DIR/evidence/{goal_slug}/: command lines, exit codes, trimmed output, screenshots, HTTP transcripts. Mask secrets and personal data before writing.## Behavior Probe
- Surface: CLI / HTTP / Web / Library / N/A (reason)
- AC1: PASS (evidence/{goal_slug}/ac1.txt)
- AC2: FAIL expected exit 64, got 0 (evidence/{goal_slug}/ac2.txt)
- Verdict: PASS / WARN / FAIL / N/A
FAIL when any probed AC misbehaves. WARN when a probe could not run for an environmental reason (port in use, missing browser) and the static modes pass.
After all 4 modes complete, merge their findings and deduplicate:
Collection: Gather all findings from code, security, test, and behavior modes into a single pool.
Root-Cause Grouping: For each finding, identify the root cause. Findings sharing the same root cause (same file, same function, same underlying pattern) form a group.
Classification (per group):
| Classification | Meaning | Action |
|---|---|---|
NEW | First finding for this root cause | Include in report |
DUP_BETTER | Duplicate with better evidence or higher severity | Replace original with this |
DUP_SKIP | Duplicate with weaker or equal evidence | Drop; reference the NEW finding |
Severity Reassessment: The surviving finding in each group takes the highest severity across all modes. For example, if code review says [WARN] but security says [CRITICAL] for the same root cause, the deduped finding is [CRITICAL].
Output: Only deduplicated findings proceed to Step 4 synthesis. The report should note: "N findings deduplicated from M total (K groups collapsed)."
Combine deduplicated findings into a single report:
## Audit Report
- Spec: SPEC-{timestamp} ({goal_slug})
- Branch: {current branch}
### Change Scope
- Scopes detected: [API, Frontend, Backend, Database, Infra, Docs, Tests]
- Scope-specific checks: [list what ran]
### Code Quality: [PASS/WARN/FAIL]
### Security: [PASS/WARN/FAIL]
### Performance: [PASS/WARN/FAIL]
### Tests: [X/Y passing, Z% coverage] (test-guard: clean | N findings, each justified)
### Behavior: [PASS/WARN/FAIL/N/A] (evidence: $EPIC_PROJECT_DIR/evidence/{goal_slug}/)
### Deduplication
- Total findings: M
- Deduplicated: N (K groups collapsed)
### Spec Coverage
- R1: ✅/❌ addressed in diff
- R2: ✅/❌ addressed in diff
- AC1: ✅/❌ verified by test
- AC2: ✅/❌ verified by test
### Action Items
1. [blocker or warning]
Record the independent verdicts so the evolution loop learns from the evaluators, not only from the builder's tool success:
epic-harness evolve record-verdict --source audit --result <pass|warn|fail>
epic-harness evolve record-verdict --source behavior --result <pass|warn|fail> # skip when N/A
audit takes the worst of Code Quality, Security, Performance and Tests. Results are case-insensitive. Record once per audit run, including reruns after fixes. Never record a verdict the evaluators did not produce. The verdict is blended into the next reflect round that analyzes observations. Typed verdicts are claims and count half as much as the verified eval and CI results the binary derives itself.
/ship to create a PR."/go, then re-run /audit."| Excuse | Rebuttal | What to do instead |
|---|---|---|
| "It's a small change, skip security" | Small changes introduce big vulnerabilities | Always run the security checklist |
| "Tests are passing, that's enough" | Tests don't catch security or performance issues | Run all 4 modes |
| "That test was flaky, so I removed it" | Deleting or skipping a failing test is the cheapest fake pass | Justify each test-guard finding or restore the test |
| "The diff looks right, no need to run it" | Reading code predicts behavior; running it observes behavior | Run audit:behavior and save the evidence |
| "I'll fix this small issue while reviewing" | An evaluator that edits has graded its own work | Report it; the builder fixes it via /go |
| "I'll fix the warnings later" | Later never comes | Fix blockers now, warnings before merge |
| "Dedup is overkill for small audits" | Small audits can still have cross-mode overlap | Always dedup — the cost is trivial |
| "Strict mode is overkill" | Without isolation, the builder can influence reviewers via shared context | Use --strict for security-sensitive or compliance-driven projects |
| "The agents are independent enough" | Shared context creates anchoring bias — a clean code review inflates security scores | Strict mode ensures blind scoring until synthesis |
test-guard output quoted, every finding justified$EPIC_PROJECT_DIR/evidence/{goal_slug}/evolve record-verdictWhat SKILL.md sets; muted values are Claude Code's defaults
27 skills in this plugin
/agent-introspectionLoop-breaking self-diagnosis. Use when 3+ consecutive failures occur, circular retries persist, or context overwhelms the session./commitConventional Commits 1.0 generator. Stages relevant files, infers type(scope): description, never uses --no-verify./contextWorking-state snapshot guidance. Restates task/files/decisions in one block so state survives context compaction. Compaction timing is the host's job./council4-voice parallel deliberation (Architect · Skeptic · Pragmatist · Critic) for architecture, tech selection, or design decisions with no clear answer. Anti-anchoring: each voice gets independent context. Records decision in harness-mem./_criticHarnessX Critic (Tier 2.1) — adversarial review of evolved-skill proposals against trace evidence. Detects reward hacking and manifest/evidence contradictions. Out-of-band LLM counterpart to the in-loop deterministic critic in src/evolve/critic.rs./debugSystematic root-cause isolation for test failures, runtime errors, or unexpected behavior. Narrow hypothesis → verify → fix.npx claudepluginhub epicsagas/epic-harness --plugin epicOther plugins' skills for the same job