一键导入
audit
Audit a feature implementation against its approved plan and implementation report, then produce the architect verdict and follow-up direction.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Audit a feature implementation against its approved plan and implementation report, then produce the architect verdict and follow-up direction.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Validate workflow markdown documents such as plans, reviews, implementation reports, and audits against the required format contract.
Master workflow orchestrating feature planning, review, implementation, audit, and retrospectives. Entry point for feature development lifecycle.
Create a feature-specific context document and save it under the feature contexts directory for later planning, review, or implementation work.
Create a feature document covering business context and initial architecture for a new feature using the PM and Architect workflow.
Execute a review-approved feature plan and produce or refine the implementation report for that feature.
Orchestrate the full feature workflow loop by detecting artifact state and routing through review, implementation, audit, and follow-up steps.
| name | audit |
| description | Audit a feature implementation against its approved plan and implementation report, then produce the architect verdict and follow-up direction. |
Purpose: Audit Developer's implementation report as Architect and provide final decision plus follow-up direction. Hermetic per feature; agent doc context = feature.
Choose any of the following:
/audit # No args: auto-detect from chat history
/audit feat-2026-01-123 # With FEATURE_ID: infer plan-slug from feature dir
/audit plan # Artifact ref: use current feature's latest plan + implementation
/audit I{n} # Implementation ref: audit latest implementation round
/audit feat-2026-01-123 1-refactor # FEATURE_ID + plan-slug explicitly
When no args: auto-detect from chat — find most recent FEATURE_ID reference and most recent implementation report, or validate if already in feature context.
/audit — skill will infer current feature and plan from chat./audit plan (use current implementation), /audit I{n} (reference specific round).{feature-dir}/reports/{plan-slug}.implementation.md before audit can proceed.Parse the user's input using this order:
Extract FEATURE_ID from:
feat-2026-01-123)If unable to determine: Prompt user for FEATURE_ID before proceeding.
Infer plan-slug from:
plans/ directory)Extract implementation round reference (optional):
I{n} → audit specific Implementation Round nplan → audit latest implementation round for this planAfter input parsing:
{feature-dir}/reports/{plan-slug}.implementation.md from disk. Do NOT assume it exists based on chat history or inference.reports/{plan-slug}.implementation.md. Run /implement first." — STOP immediately. Do NOT run /implement, do NOT fall back to any other action.You are the Architect (architect.md). Doc context = this feature (feat doc + plans/ + notes/ + reports/).
Input: Feature context + plan slug (required). Implementation report path = reports/{plan-slug}.implementation.md. Plan path = plans/{plan-slug}.plan.md.
plans/{plan-slug}.plan.md — sections ## Retrospective and user-only ## Decision Log. Extract all ### v{N} blocks and explicit user choices/corrections. Use as context — especially [risk] entries and user decisions that shaped the plan.reports/{plan-slug}.implementation.md — sections ## Retrospective and user-only ## Decision Log. Extract all ### I{n} blocks and explicit user choices/corrections. Use as context — know what the Developer learned, what risks were flagged, and what operations/patterns the Developer identified as candidates for automation.## Contexts, read those context documents from {feature-dir}/contexts/. Note any requirements defined there — these will be checked in the Audit Process (step 4a below).Read implementation report: Extract all ## Implementation Round I{n} sections — step results, issues, out-of-plan work.
Compare against plan: Check each plan step against implementation round results.
Check acceptance criteria: For each criterion in plan — met / not met / partial.
Re-evaluate risks: Which plan risks materialized? Which were mitigated?
[automation] entries from implementation Retrospective. Synthesize them — if multiple rounds noted similar repeating patterns, note this as a potential skill candidate in your audit summary (does not affect verdict, but informs retrospective). Examples: "Developer observed manual validation step repeating in 3 places — skill candidate"; "Config pattern X appears in implementation steps — consider parametric skill for similar future features".## Decision Log entries from plan and implementation. Check only whether implementation or report output contradicts explicit user choices/corrections. Do not expect priority labels in Decision Log; it is not a backlog and not a source for codebase issues. If a contradiction affects requested scope, artifact format, language, placement, or validation/reporting expectations, include it as an audit finding.## Retrospective entries from plan and implementation. Check whether unresolved [risk], [codebase], [plan], [process], or [tooling] findings affect implemented behavior, maintainability, validation confidence, or future work. Infer audit severity from evidence and impact; do not require source entries to carry priority labels.Implementation quality check (mandatory): Review the actual code changes listed in the implementation report (## Files Changed). Read the modified files (or relevant diffs) and assess:
Decision: ready | needs-fixes | plan-fix | re-plan.
plan-fix conditions (all must be true):
re-plan.{feature-dir}/reports/{plan-slug}.audit.md per audit-format.md.problems.md (if verdict ≠ ready): write {feature-dir}/notes/{plan-slug}.problems.md per the problems.md format in audit-format.md. This is the primary handoff document to the next agent (fixer / replanner). Include one AC block per non-passing criterion.plans/{plan-slug}.plan.md:
status from active to implemented**Status**: done to each Step that was completed (based on implementation report)[x] if they were metversion, round) unchanged{feature-dir}/{feature-id}.md:
## Plans{plan-slug}- [{plan-slug}](plans/{plan-slug}.plan.md) — {title} · status: implementedfeat: {1-sentence summary} — from what actually changed in the repo + ## Steps Executed / ## Files Changed; max 72 chars## Steps Executed where it maps to code)Files: {count} — count of unique paths under ## Files Changed in the repo (omit if unknown)Plan 3, 17-copilot-…), .pythia/, .claude/ workflow paths, feature workflow filenames, or any reference to internal planning artifacts. Those are not part of the code repo; git history must stay free of them.After emitting Architect Audit Response, halt and wait for the user's next input. The response must end with:
---
**Active context**: role: Architect · feat: {feat-id} · plan: {plan-slug} · audit: A{round} · skill: /audit
When the next user input is exactly one of the offered chooser keys:
[t] / t (ready only): run /retro {feature-dir} in the current Architect context. Do not launch a subagent by default.[x] / x (ready only): finish and stop.[i] / i (needs-fixes only): launch a Developer subagent (developer.md) with /implement {feature-dir}/plans/{plan-slug}.plan.md A{round} in refinement mode. Pass the audit report, problems.md, implementation report, and active audit round as context. If subagent launch is unavailable, print only the copyable /implement command from the response template and stop.[q] / q (needs-fixes only): launch QA Automation subagent (qa-automation.md, subagent_type="qa-automation") for validation/test-evidence analysis of audit concerns. QA returns assessment only; Architect decides whether it changes the audit follow-up direction.[r] / r (plan-fix or re-plan): stay in Architect context and run /replan {feature-dir}/plans/{plan-slug}.plan.md A{round}. If the host cannot execute /replan inline, print only the copyable /replan command from the response template and stop.[d] / d (plan-fix or re-plan): stay in current Architect context and clarify whether this is a local plan fix or broader re-plan before editing artifacts. Do not edit artifacts until the user confirms direction.[v] / v (needs-fixes, plan-fix, or re-plan only): restart /audit as a skill invocation on the same implementation artifact after external changes. Do not continue with free-form Architect audit analysis in place. Append a new audit round; do not overwrite the existing round. If the implementation round is not explicit, read the implementation report and use the latest implementation round. If the host cannot execute /audit inline, print only the copyable /audit command from the response template and stop.Do not treat arbitrary custom user messages as chooser input. If the user writes a normal instruction instead of a chooser key, handle it as normal Architect/audit context and do not auto-launch workflow agents.
CRITICAL — Execution context: When the user invokes /audit directly (inline mode, no "loop" or "auto"), execute the audit in the current context — you ARE the Architect auditor. Do NOT launch a subagent for the audit itself. After producing the audit artifacts, show the verdict-aware next-step chooser and stop.
Loop/auto mode only: If the user invoked this command in loop mode (said "loop" or "auto", or called /loop), continue automatically after writing the audit artifacts:
| Verdict | Action |
|---|---|
ready | Report DONE. Output commit message. Stop. |
needs-fixes | Spawn Developer subagent (refinement mode) using problems.md. Wait. Then spawn fresh Architect subagent for re-audit. Max 2 needs-fixes iterations total. |
plan-fix | Report BLOCKED. Do not auto-continue — plan repair still requires user decision before /replan or any later implementation. |
re-plan | Report BLOCKED. Do not auto-continue — re-plan requires user-assisted scope decision unless user explicitly delegated full authority. |
Fresh-session constraint: The re-audit subagent must be a different subagent instance from the Developer that just ran. Never re-audit in the same context that just implemented.
Cross-document links and trailing refs: see cross-document-links.md.
reports/{plan-slug}.audit.md is written on disk, launch a Validator subagent in a separate context. Use the handoff prompt in /validate skill § Validator subagent (delegation): absolute {ABS_PATH_TO_VALIDATE_SKILL} and absolute path to the audit file. Do not complete until exit 0. PostToolUse hook warnings ≠ PASS — see hook-integration.md.
subagent_type="generalPurpose" or the same type your /loop skill uses for one-shot handoffs. Delegated body = only the filled handoff prompt from /validate skill § Validator subagent; do not paste audit verdict narrative, findings, or implementation excerpts — only validation instructions./loop already documented successful validation for this revision, you may skip nested Validator — state that.ready: Verify problems.md is written to {feature-dir}/notes/{plan-slug}.problems.mdplan-fix: Verify only plan-fix conditions are met (≤ 2 steps, implementation faithfully followed wrong spec)status changed to implemented**Status**: done)[x] for met criteria## Plans by slugstatus: implementedfeat: and is ≤ 72 chars.pythia/, or workflow-only paths in the message## Next Steps and the active audit footer from response-formats.md.See also: Use /loop skill for automated post-audit routing.