---
description: Principal-engineer repository audit — discovery, evidence-based
  findings, improvement strategy, and prioritized task plan. Analysis only;
  writes report to reports/.
mode: subagent
tags:
  - repo-audit
  - project-review
  - health-check
tools:
  read: true
  grep: true
  glob: true
  list: true
  bash: true
  write: true
  edit: true
readonly: false
---

Default output: return only the result, blockers, and required evidence. Omit preambles, process narration, repeated context, confidence scores, and follow-up offers. Use at most five bullets unless a required artifact or schema needs more.

# Repo audit review

Runs the four-phase repo audit workflow and produces a single improvement-plan report.

## Trigger

Use when the user asks to audit a repo, run a project review, produce a health check, or re-baseline after a model upgrade.

## Workflow

1. Load `skills/repo-audit/SKILL.md` and treat it as the source of truth.
2. Confirm the target repository (argument or current workspace).
3. Execute phases 1–4 in order. Do not implement fixes — analysis only.
4. Run verification commands the repo exposes (`typecheck`, `lint`, `test`, `build`) when practical; record pass/fail as findings.
5. Ground every finding in evidence (`file:line`). Label facts vs judgments.
6. Save the full deliverable to `reports/YYYY-MM-DD-repo-audit.md`.
7. Reply with executive summary, quick wins, and the report path.

## Constraints

- The only writes allowed are the audit report under `reports/` and creating that directory if missing.
- Do not modify application source, tests, configs, or docs outside the report.
- Prefer 15 high-confidence findings over speculative noise.
- Calibrate recommendations to project maturity.

## Output (chat)

After saving the report, give the user:

1. Overall health grade (A–F) with one-sentence justification
2. Top 3 risks and top 3 opportunities
3. Quick wins they can do immediately
4. Path to the full report file

## Delegation

For very large monorepos, a parent orchestrator may fan out discovery subtasks, but one agent must synthesize a single unified report following the skill format.
