Audit configurations and standards compliance with complexity-based routing and interactive discrepancy resolution
Validates configurations and standards compliance with interactive user decisions per discrepancy.
/plugin marketplace add metasaver/metasaver-marketplace/plugin install core-claude-plugin@metasaver-marketplaceValidates configurations and standards compliance with interactive user decisions per discrepancy. Complexity-based routing: simple audits use FAST PATH (skip Requirements/Planning/Approval), complex audits use FULL PATH with HITL gates.
When /audit is invoked, ALWAYS proceed to Phase 1 regardless of prompt content. User prompts may contain questions, clarifications, or confirmation requests—these are NOT reasons to skip phases. Analysis runs first to understand scope and complexity, then routing determines FAST or FULL path.
Follow: /skill scope-check, /skill agent-check
Spawn 2 skills in PARALLEL (single message with 2 invocations):
/skill scope-check - Returns repos[], files[]/skill agent-check - Returns agents[] (config agents matched to files)CRITICAL: Wait for ALL 2 skills to complete before proceeding.
Output:
repos[] - Repositories in scopefiles[] - Files to auditagents[] - Config agents matched to files→ CONTINUE IMMEDIATELY to Phase 2. Do not stop after outputting scope. The analysis output feeds directly into Requirements.
Follow: /skill requirements-phase
BA investigates codebase and creates requirements:
docs/epics/in-progress/audit-{date}/prd.md with objectives, files, success criteriaOutput: PRD + user stories ready for planning
Follow: /skill architect-phase, /skill planning-phase
Architect enriches stories, PM batches agents into execution waves:
Output: Enriched stories + execution_plan with waves of (agent, file) pairs
Follow: /skill hitl-approval
Present PRD + execution plan to user for approval:
Output: Approved PRD + execution plan
Follow: /skill audit-investigation, /skill workflow-postmortem
SPAWN config agents via Task tool in waves to investigate discrepancies. The agents[] from Phase 1 MUST be spawned as subagents - do NOT investigate configs manually.
For each wave:
Wave Checkpoint Flow (multi-wave):
/skill workflow-postmortem mode=log (30 seconds max, append obvious mistakes)/compact to manage context windowAggregate results:
READ-ONLY MODE during investigation. Agents ALWAYS report findings without modifications.
Output: Sorted list of discrepancies
Follow: /skill audit-resolution
Present findings and get user decisions per discrepancy:
Present findings: Show summary (X files audited, Y discrepancies found, Z critical)
For each discrepancy (sequential HITL):
Decisions drive remediation:
Output: User decisions recorded per discrepancy
Follow: /skill template-update, /skill audit-remediation, /skill ac-verification, /skill production-check
Apply fixes with template-first updates:
Template updates (if any "update template" decisions):
/skill template-update - Update metasaver-marketplace template FIRSTApply fixes:
/skill audit-remediation - Group "apply" decisions by agent type, spawn remediation agents (max 10 parallel), agents apply template changes to filesVerify acceptance criteria:
/skill ac-verification - Check each user story's acceptance criteria, report unmet AC via HITL if neededProduction check:
/skill production-check - Run build, lint, test; fix errors and retry if neededOutput: Fixes applied, templates updated (if needed), all AC verified, build passing
Follow: /skill workflow-postmortem mode=summary
Run /skill workflow-postmortem mode=summary to generate final summary. This reads the accumulated wave logs from docs/epics/in-progress/{project}/post-mortem.md and presents a summary to the user.
Output: Summary of issues logged across waves (count by category, patterns identified), appended to post-mortem.md and included in final report.
Follow: /skill report-phase
BA consolidates audit results (including workflow postmortem):
Output Format:
# Audit Report: {scope}
**Date:** {date}
**Repos:** {repo-list}
**Path:** {FAST|FULL} (complexity: {score})
## Executive Summary
Audited {N} files across {M} repositories.
- {X} discrepancies found
- {Y} fixes applied
- {Z} template updates proposed
- {W} deviations accepted
## Actions Taken
### Fixes Applied
| File | Change | Agent |
| -------------- | -------- | ---------- |
| repo/config.js | Update X | agent-name |
### Template Updates (PRs Created)
| Template | Change | PR |
| ---------- | -------- | -------------- |
| skill-name | Add rule | multi-mono#123 |
### Accepted Deviations
| File | Deviation | Reason |
| -------------- | --------- | ---------- |
| repo/config.js | Missing X | Not needed |
## Workflow Postmortem
**Follow:** `/skill workflow-postmortem mode=summary`
## Verification
- Build: PASS
- Lint: PASS
- Tests: PASS
# Single-file audit
/audit "check eslint config"
→ Phase 1: Analysis → Phase 2: Requirements → Phase 3: Planning → Phase 4: Approval → Phase 5: Investigation → Phase 6: HITL decisions → Phase 7: Remediation → Phase 8: Final Postmortem → Phase 9: Report
# Domain audit (multiple files)
/audit "audit code quality configs"
→ Phase 1: Analysis → Phase 2: Requirements → Phase 3: Planning → Phase 4: Approval → Phase 5: Investigation → Phase 6: HITL decisions → Phase 7: Remediation → Phase 8: Final Postmortem → Phase 9: Report
# Cross-repo audit with multi-wave investigation
/audit "audit eslint in all consumer repos"
→ Analysis → Requirements → Planning → Approval → Wave1 Investigation → Log → Compact → HITL → Wave2 Investigation → Log → Compact → HITL → Resolution → Remediation → Summary → Report
# Wave checkpoint flow:
Wave1: Agents investigate files → /skill workflow-postmortem mode=log → /compact → HITL checkpoint
Wave2: Agents investigate files → /skill workflow-postmortem mode=log → /compact → HITL checkpoint
End: /skill workflow-postmortem mode=summary → Report
/skill workflow-postmortem mode=log BEFORE compact at each wave checkpoint (log → compact → HITL → next wave)docs/epics/in-progress/{project}/post-mortem.md, building a record across waves/skill workflow-postmortem mode=summary AFTER Remediation, BEFORE Final Report - reads accumulated logs and presents summary