Audits codebases via three-tier escalation: git history scan (Tier 1, fast), targeted deep-dive (Tier 2), full review (Tier 3, approved). Starts at Tier 1 for PRs, quality checks.
From pensivenpx claudepluginhub athola/claude-night-market --plugin pensiveThis skill uses the workspace's default tool permissions.
modules/escalation-criteria.mdmodules/tier2-targeted.mdmodules/tier3-gate.mdDesigns and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Always runs first. Analyzes git log, diff stats, and blame to identify areas of concern without reading any source files.
Run these git commands for the target commit range (default: current branch vs main):
# 1. Churn hotspots: files changed most often
git log --format="" --name-only {base}..HEAD \
| sort | uniq -c | sort -rn | head -20
# 2. Diff stats: size of changes per file
git diff --stat {base}..HEAD
# 3. Fix-on-fix patterns: commits fixing previous commits
git log --oneline {base}..HEAD \
| grep -iE "(fix|revert|patch|hotfix)"
# 4. New file clusters: modules with many new files
git diff --name-status {base}..HEAD \
| grep "^A" | cut -f2 \
| sed 's|/[^/]*$||' | sort | uniq -c | sort -rn
# 5. Large commits: single commits with big diffs
git log --format="%h %s" --shortstat {base}..HEAD
Verification: Confirm each command produces output.
If a command returns empty, the commit range may be wrong;
verify {base} resolves correctly with git merge-base.
Write findings to .coordination/agents/tier1-audit.findings.md:
---
agent: tier1-audit
tier: 1
evidence_count: {N}
---
## Summary
{1-2 sentence overview of what the git history reveals}
## Churn Hotspots
{top 10 most-changed files with change counts}
[E1] Command: git log --format="" --name-only ...
Output: {relevant output}
## Fix-on-Fix Patterns
{commits that fix previous commits in the same area}
[E2] Command: git log --oneline ... | grep -iE ...
Output: {relevant output}
## New File Clusters
{modules with 5+ new files}
## Large Diffs
{commits with 200+ line changes}
## Escalation Recommendation
{list of areas flagged for Tier 2, or "no escalation needed"}
After Tier 1 completes, check findings against the
escalation criteria in modules/escalation-criteria.md.
If NO criteria are met: audit is complete. Report findings.
If criteria ARE met: list flagged areas and proceed to Tier 2 for each area sequentially.
Runs only for areas flagged by Tier 1. Each flagged area is audited one at a time, not in parallel.
For each flagged area:
One findings file per area:
.coordination/agents/tier2-{area-name}.findings.md
Each file follows the output contract for audits (see imbue:proof-of-work/modules/output-contracts).
Requires explicit user approval. See
modules/escalation-criteria.md for the gate protocol.
Tier 3 should use dedicated sessions (one per area) with file-based coordination, NOT parallel subagents.
All tiers use this contract:
output_contract:
required_sections:
- summary
- evidence
min_evidence_count: 3 # Tier 1
# min_evidence_count: 8 # Tier 2
expected_artifacts: []
retry_budget: 1
strictness: normal
Tier 2 raises the minimum evidence count to 8 because it reads source files and should produce deeper analysis.
Verification: After each tier completes, verify the
findings file exists and contains at least the minimum
evidence count ([E1], [E2], etc.) before proceeding
to the next tier or reporting results.