| name | tiered-audit |
| description | Runs a three-tier codebase audit (git history, targeted scans, full review) with gating. Use when auditing a codebase before release or after incidents. |
| alwaysApply | false |
| category | audit |
| tags | ["audit","git-history","code-quality","review","escalation"] |
| tools | [] |
| usage_patterns | ["codebase-audit","git-history-review","targeted-review"] |
| complexity | intermediate |
| model_hint | standard |
| estimated_tokens | 600 |
| modules | ["modules/escalation-criteria.md","modules/tier2-targeted.md","modules/tier3-gate.md"] |
| dependencies | ["imbue:proof-of-work","imbue:review-core","imbue:structured-output"] |
Tiered Audit
Table of Contents
When To Use
- Auditing codebase quality, patterns, or problems
- Reviewing what changed on a branch before merge
- Investigating areas of instability or churn
- Pre-PR quality assessment
When NOT to Use
- Reviewing a specific file (use pensive:code-reviewer)
- Architecture-only review (use pensive:architecture-review)
- Single-commit review (use imbue:diff-analysis)
Tier 1: Git History Audit
Always runs first. Analyzes git log, diff stats, and
blame to identify areas of concern without reading any
source files.
What Tier 1 Analyzes
Run these git commands for the target commit range
(default: current branch vs main):
git log --format="" --name-only {base}..HEAD \
| sort | uniq -c | sort -rn | head -20
git diff --stat {base}..HEAD
git log --oneline {base}..HEAD \
| grep -iE "(fix|revert|patch|hotfix)"
git diff --name-status {base}..HEAD \
| grep "^A" | cut -f2 \
| sed 's|/[^/]*$||' | sort | uniq -c | sort -rn
git log --format="%h %s" --shortstat {base}..HEAD