skills/auto-steward/SKILL.md
Iterative code quality audit that loops until clean. Runs the code-steward agent in a bounded fix-audit cycle — first pass gets human approval, subsequent passes auto-fix until the audit returns clean or the iteration cap is hit.
npx skillsauth add mjmorales/claude-prove auto-stewardInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Audit, fix, re-audit modified files, repeat until clean or capped.
test_*, *_test.*, tests/, __tests__/, *.spec.*, *.test.*, fixtures). Source first, tests adapt second..claude/.prove.json validators. Do not guess commands..prove/steward/, reports in .prove/reports/steward/.CLAUDE.md for conventions, .claude/.prove.json for validators/structure.plan.json (scripts/prove-run show plan) or .prove/plans/ for task context.$ARGUMENTS:
--full -- full codebase on pass 1 (default: changed files via git diff main...HEAD --name-only)--max-passes N -- iteration cap (default: 3).prove/steward/auto-report.md:# Auto Steward Report
**Date**: [today] **Scope**: [full | changed files | directory] **Max passes**: [N]
## Pass Log
--full or directory: use that scopegit diff main...HEAD --name-only, filter test files. No source files remaining = inform user and stop.Run the steward PCD pipeline on the determined scope. This is identical to the pipeline in skills/steward/SKILL.md Phase 1 (rounds 0a through synthesis + fallback). Produces .prove/steward/findings.md and .prove/steward/fix-plan.md.
Skip if PCD produced both files. Otherwise create .prove/steward/findings.md (standard steward format: Critical Issues, Structural Refactors, Naming & Readability, Code Hygiene, Performance, Recommendations -- numbered with file:line refs) and .prove/steward/fix-plan.md (independent, parallelizable work packages).
Present findings summary and fix plan. AskUserQuestion: "Approve all" / "Cherry-pick" / "Abort".
On abort: update auto-report, stop.
Launch parallel code-steward subagents per approved work package (findings, file list, change instructions). Serialize only packages with overlapping files.
Run .claude/.prove.json validators (lint, then tests). Note failures but do not stop the loop.
Append to auto-report:
### Pass [N]
- **Files audited**: [count]
- **Issues found**: [count] (Critical: X, Major: X, Minor: X)
- **Issues fixed**: [count]
- **Files modified**: [list]
- **Validator status**: lint [pass/fail], tests [pass/fail]
Track modified files -- they scope the next pass.
No human approval. The user approved direction in Phase 1.
Repeat until clean or capped:
Re-audit only files modified in the previous pass (excluding tests). No modified source files = loop done.
For >= 5 files: run the full PCD pipeline scoped to modified files:
python3 $PLUGIN_DIR/tools/pcd/__main__.py --project-root "$PROJECT_ROOT" map --scope <comma-separated files>
Then rounds 1-3 as in Phase 1b.
For < 5 files: skip PCD, launch code-steward directly:
Re-audit ONLY these files modified in the previous pass: [list]. Check for: (1) issues introduced by refactoring, (2) quality issues previously masked, (3) integration issues with callers/dependencies. Produce findings. Do not fix yet.
No findings = loop converges, skip to Phase 3.
Findings exist: create .prove/steward/findings-pass-N.md, auto-approve, launch fix subagents, validate and record pass (same template as 1f).
At max-passes with remaining findings: record "Cap reached" in auto-report, proceed to Phase 3.
## Summary
- **Total passes**: [N]
- **Outcome**: [Converged clean | Cap reached with N remaining issues]
- **Total issues found/fixed**: [sums]
- **Files modified**: [deduplicated]
## Test Remediation Required
| Test file | Failure reason | Source change that caused it |
|---|---|---|
## Remaining Issues (if cap reached)
[Unfixed findings from final pass]
Convergence status, per-pass breakdown, test remediation if applicable, remaining issues. If capped, suggest rerunning or manual fixes.
testing
Anchor session context into prove primitives before compaction and rehydrate from them after. Built-in compaction summarizes by recency and drops the claude-prove state an agent needs to reorient; this skill externalizes volatile context into durable anchors (scrum tasks, decisions, run-state, a compact-anchors pointer file) pre-compact, then runs a deterministic reorientation sequence post-compact. Use before a manual /compact, when context is about to auto-compact, or immediately after a compaction. Triggers on "smart compact", "prepare for compaction", "anchor before compact", "context is getting long", "rehydrate", "reorient after compact".
tools
Apply model-driven CONTENT reshaping to stored run artifacts that sit behind the current schema, on explicit operator invocation only. Triggers on "migrate runs", "migrate run artifacts", "run content migration", "reshape run artifacts", "bring runs to current schema". You are the driver: the `run-state migrate-runs` CLI mechanically detects which artifacts are behind and emits a plan naming each one plus its migration-instruction file; you read the instructions and reshape the prose/findings, gated by the operator. The deterministic `schema migrate` handles structural column moves; this skill covers only the content reshaping beyond them. Never run as a background or resident loop — only when the operator asks.
tools
Synthesize the 7-section risk-forward Review Brief from a run's reasoning log. Triggers on "reasoning brief", "review brief", "synthesize the brief", "generate the brief", "brief the run", "brief for review", "story brief". You are the driver: the `acb brief` CLI renders a mechanical preservation-safe backbone and proves preservation; you synthesize the narrative prose (summary + changes), single-pass or multipass over episode chunks, then gate it through Stage-1 (mechanical, blocking) and Stage-2 (prose judge, advisory).
tools
Prune stale cached versions of the prove plugin from Claude Code's plugin cache. Use when superseded versions pile up under plugins/cache and agents read stale skills/references from them, or when reclaiming plugin-cache disk space. Triggers on "clean up cached plugin versions", "prune the plugin cache", "remove old prove versions", "stale plugin cache".