audit
Purpose
Comprehensive project health audit across 8 dimensions (7 project + 1 mesh analytics). Delegates security scanning to sentinel, dependency analysis to dependency-doctor, and code complexity to autopsy, then directly audits architecture, performance, infrastructure, and documentation. Applies framework-specific checks (React/Next.js, Node.js, Python, Go, Rust, React Native/Flutter) based on detected stack. Produces a consolidated health score and prioritized action plan saved to AUDIT-REPORT.md.
Triggers
/rune audit— full 8-dimension project health audit/rune audit dx— DX Review Mode (Addy Osmani 8 principles, see below)- User says "audit", "review project", "health check", "project assessment"
- User says "developer experience", "DX audit", "onboarding experience", "time to hello world"
Calls (outbound)
scout(L2): Phase 0 — project structure and stack discoverydependency-doctor(L3): Phase 1 — vulnerability scan and outdated dependency checksentinel(L2): Phase 2 — security audit (OWASP Top 10, secrets, config)autopsy(L2): Phase 3 — code quality and complexity assessmentimprove-architecture(L2): Phase 3.5 — architecture sub-score (depth / leverage / locality across top modules)perf(L2): Phase 4 — performance regression checkdb(L2): Phase 5 — database health dimension (schema, migrations, indexes)journal(L3): record audit date, overall score, and verdictconstraint-check(L3): audit HARD-GATE compliance across project skillssast(L3): Phase 2 — deep static analysis (Semgrep, Bandit, ESLint security rules)retro(L2): Phase 6 — engineering velocity and health dimension (rune:retro)browser-pilot(L3): DX Review Mode — real browser testing of docs, setup guides, error pages
Called By (inbound)
cook(L1): pre-implementation audit gatelaunch(L1): pre-launch health check- User:
/rune auditdirect invocation
Executable Instructions
Phase 0: Project Discovery
Call rune:scout for a full project map. Then use Read on:
README.md,CLAUDE.md,CONTRIBUTING.md,.editorconfig(if they exist)
Determine:
- Language(s) and version(s)
- Framework(s) — determines which Framework-Specific Checks below apply
- Package manager, build tool(s), test framework(s), linter/formatter config
- Project type:
API/backend|frontend/SPA|fullstack|CLI tool|library|mobile|infra/IaC - Monorepo setup (workspaces, turborepo, nx, etc.)
Output before proceeding: Brief project profile, stack summary, and which Framework-Specific Checks will be applied.
Phase 0.5: Context-Building (Pure Understanding)
<HARD-GATE>
This phase is FORBIDDEN from producing findings. No BLOCKs, no WARNs, no issues. Context-building only.
Rushed context = hallucinated vulnerabilities. Slow is fast.
</HARD-GATE>
For each critical module (entry points, auth, data layer, core business logic):
- Read line-by-line. Note at minimum:
- 3 invariants: What MUST always be true for this code to work? (e.g., "user is authenticated before reaching this handler")
- 5 assumptions: What does this code assume about its inputs, environment, and callers?
- 3 risks: What could break if assumptions are violated?
- Record findings as context notes — these feed into Phases 1-7, NOT into the final report directly
Why: Without this phase, the auditor pattern-matches against known vulnerability lists and hallucinates findings that don't exist in THIS specific codebase. The invariants + assumptions ground all later analysis in reality.
Phase 1: Dependency Audit
Delegate to dependency-doctor. The dependency-doctor report covers:
- Vulnerability scan (CVEs by severity)
- Outdated packages (patch / minor / major)
- Unused dependencies
- Dependency health score
Pass the full dependency-doctor report through to the final audit.
Phase 2: Security Audit
Delegate to sentinel. Request a full security scan covering:
- Hardcoded secrets, API keys, tokens, passwords in source code
- OWASP Top 10: injection, broken auth, sensitive data exposure, XSS, CSRF, insecure deserialization, broken access control
- Configuration security (debug mode in prod, CORS
*, missing HTTP security headers) - Input validation at API boundaries
.gitignorecoverage of sensitive files
Pass the full sentinel report through to the final audit.