src/autoskillit/skills_extended/audit-impl/SKILL.md
Audit a completed implementation against its originating plan(s). Returns GO (merge approved) or NO GO (generates remediation file for retry). Final gate before merge in any implementation pipeline.
npx skillsauth add talont-org/autoskillit audit-implInstall 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 a completed implementation against its plan(s) before merge. Identifies gaps, missed requirements, scope creep, and unexpected changes. Produces a GO or NO GO verdict.
/autoskillit:audit-impl {plans_input} {branch_name} {base_branch}{plans_input} {branch_name} {base_branch} [conflict_report_paths]
plans_input — one of:
.md file path.md plan file paths (no spaces around commas)*_plan_*.md filesmanifest_*.json from /autoskillit:make-groupsbranch_name — commit SHA of the pre-implementation base ref (preferred from pipeline,
stable after merge_worktree destroys named refs); a branch name is also accepted for
standalone invocations. A live worktree path is accepted for legacy use (Step 0 extracts
the branch name automatically).base_branch — branch to diff against (default: develop)conflict_report_paths (optional) — comma-separated list of absolute paths to conflict
resolution reports produced by resolve-merge-conflicts. When provided and non-empty,
cross-reference resolution decisions against plan intent in Step 2.5.NEVER:
{{AUTOSKILLIT_TEMP}}/audit-impl/MISSING or CONFLICT finding existsrun_in_background: true is prohibited)ALWAYS:
model: "sonnet" when spawning all subagents via the Task toolDry-walkthrough verified = TRUE as the absolute first line of any remediation filetemp/audit-impl/... save path to absolute by prepending the full CWD:
verdict = NO GO
remediation_path = /absolute/cwd/temp/audit-impl/{filename}.md
On a GO verdict, emit only verdict = GO (no remediation_path token).
The remediation_path token is MANDATORY on NO GO — the pipeline cannot proceed without it.Resolve plans_input:
.md file: no comma, ends in .md → use it directly.md paths: value contains , → split on ,, trim whitespace
from each token. Validate that each trimmed token ends in .md; log a warning and
skip any token that does not. Use each valid token as a plan file path.md or .json → glob for *_plan_*.md
files in the directorymanifest_*.json: no comma, ends in .json → parse it; extract groups[*].file
paths, resolved relative to the manifest's parent directoryVerify every plan file exists. If any are missing, abort with a clear error listing them.
Determine the diff source from implementation_ref:
If implementation_ref is an existing directory path:
git -C {implementation_ref} branch --show-currentgit diff {base_branch}...{branch_name} from the current working directoryOtherwise, detect whether implementation_ref is a commit SHA or branch name:
echo "$implementation_ref" | grep -qE '^[0-9a-f]{40}$'git diff {implementation_ref}..{base_branch} — two-dot, SHA on the leftgit diff {base_branch}...{implementation_ref} — three-dot (unchanged)"implementation_ref '{implementation_ref}' is neither an existing worktree directory nor a known git ref. If you are passing a worktree path, ensure the worktree has not been deleted before calling audit-impl."
The old silent fallthrough (non-existent path treated as branch name without error) is removed. A clear error is emitted instead.
Parse the optional fourth positional argument conflict_report_paths (may be absent or empty
string). Split on ,, trim each entry, and filter out any empty strings after splitting;
store as conflict_report_path_list. Proceed even if empty — the cross-reference check in
Step 2.5 is skipped when the list is empty.
Path-existence guard: Before issuing a Read call on a path that is not guaranteed to
exist (e.g., plan file arguments, {{AUTOSKILLIT_TEMP}}/investigate/ reports, external file references), use
Glob or ls to confirm the path exists first. This prevents ENOENT errors that cascade into
sibling parallel-call cancellations.
Launch one Explore subagent per plan file in parallel. Each returns:
Aggregate into a unified requirements inventory.
Stale branch guard (branch name refs only — skip for SHA refs):
Skip this check when implementation_ref is a commit SHA (a SHA-as-ancestor of base_branch
is expected after all worktrees are merged — this check is only meaningful for named refs).
# Only run for branch name refs (not SHA):
if ! echo "$implementation_ref" | grep -qE '^[0-9a-f]{40}$'; then
# Step 1: ref must exist at all
git rev-parse --verify {implementation_ref} 2>/dev/null
# Step 2: branch must not already be fully merged into base (fast-forward absorption check)
git merge-base --is-ancestor {implementation_ref} {base_branch}
fi
If ref lookup fails (branch ref not found): abort with a clear error —
"branch ref '{implementation_ref}' not found — it may have been absorbed by a fast-forward merge before audit_impl ran. This is a pipeline routing error." Output {"success": false}
with this message. Do not proceed to audit.
If --is-ancestor exits 0 (branch is an ancestor of base — already fully merged): log a
warning, then treat this as GO with note:
"Branch '{implementation_ref}' is already an ancestor of '{base_branch}' — absorbed by fast-forward merge prior to audit. No delta to evaluate; returning GO." This is
O(1), unambiguous, and distinguishes the stale-fast-forward case from legitimate no-op
branches (empty diff is an unreliable guard; --is-ancestor is the correct tool).
Launch one Explore subagent to retrieve:
git diff {base_branch}...HEAD --stat — file-level summarygit log {base_branch}..HEAD --oneline — commit historygit diff {base_branch}...HEAD — full diffBefore running standard audit, check if any plan contains a PR Changes Inventory section
(written by merge-pr to document all files changed by the PR).
If a PR Changes Inventory is found:
MISSING finding — even if no plan
requirement explicitly named it. Missing carry-over files indicate silent data loss
in the conflict resolution and always force a NO GO verdict.Record all Category C MISSING findings alongside the standard audit findings in Step 3.
Conflict Resolution Report Cross-Reference (when conflict_report_path_list is non-empty):
For each path in conflict_report_path_list:
"Warning: conflict report not found at {path} — skipping" and continue to the next path.## Per-File Resolution Decisions table — extract all rows as
(file, category, confidence, strategy, justification) tuples.Category = 3 indicates a Category 3
(architectural tension) conflict was resolved rather than escalated. This ALWAYS forces a
CONFLICT finding — Category 3 conflicts must never be automatically resolved per the
resolve-merge-conflicts escalation contract.## Resolver Contract or
## Implementation Steps sections prescribe a specific outcome for the file that
contradicts the recorded strategy (e.g., plan says "preserve the new API signature"
but strategy is "ours" which kept the old signature), record a CONFLICT finding.MISSING finding — the resolved
content was not carried into the integration branch.Record all findings from this cross-reference alongside the standard Step 3 audit findings.
Each CONFLICT or MISSING finding here forces a NO GO verdict per the existing verdict
logic (Step 4).
Divide the requirements inventory into up to 3 slices. Launch parallel Explore subagents, each receiving its slice and the full diff. Each subagent checks:
Each subagent returns structured findings:
COVERED — requirement satisfied in the diffMISSING — required change absent from diffODD — change in diff with no plan backingCONFLICT — two plans' implementations interfere with each otherNO GO if any finding is MISSING or CONFLICT.
GO (with notes) if only ODD findings exist — unexpected additions that do not break
correctness.
GO if all findings are COVERED.
Print:
## Audit Result: GO
### Scope Audited
{list of plan files audited}
### Summary
{2–3 sentences on overall implementation quality}
### Notes
{Minor ODD findings — not blockers. Omit section if none.}
### Verdict
MERGE APPROVED
Exit 0. The pipeline may proceed to merge.
After printing the GO result, emit the following structured output token as the very last line of your text output:
IMPORTANT: Emit the structured output tokens as literal plain text with no markdown formatting on the token names. Do not wrap token names in
**bold**,*italic*, or any other markdown. The adjudicator performs a regex match on the exact token name — decorators cause match failure.
verdict = GO
Generate {{AUTOSKILLIT_TEMP}}/audit-impl/remediation_{topic}_{YYYY-MM-DD_HHMMSS}.md:
Dry-walkthrough verified = TRUE
# Remediation Plan: {topic}
## Audit Context
Generated by `/autoskillit:audit-impl` after auditing:
{list of original plan files}
## Findings
{For each MISSING and CONFLICT finding:}
### {Finding type}: {short title}
- **Plan reference:** {plan file + section}
- **Expected:** {what the plan specified}
- **Found:** {what the diff shows, or "not present"}
## Remediation Steps
{For each finding, a concrete fix:}
### Fix: {short title}
- **File:** {path}
- **Change:** {what to add, modify, or remove}
- **Requirement:** {plan requirement this satisfies}
## Verification
After remediation:
- Run:
```bash
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) && \
AUTOSKILLIT_TEST_FILTER="${AUTOSKILLIT_TEST_FILTER:-conservative}" \
AUTOSKILLIT_TEST_BASE_REF=$(cat "{{AUTOSKILLIT_TEMP}}/worktrees/${CURRENT_BRANCH}/base-branch" 2>/dev/null || echo "") \
task test-all
/autoskillit:audit-impl to confirm GO
Then print:
{list of plan files audited}
{Mirror the findings from the remediation file}
{absolute path to remediation file}
MERGE BLOCKED — feed remediation file to /autoskillit:retry-worktree or /autoskillit:implement-worktree-no-merge
Exit 1.
After printing the NO GO result, emit the following structured output tokens as the very
last lines of your text output:
> **IMPORTANT:** Emit the structured output tokens as **literal plain text with no
> markdown formatting on the token names**. Do not wrap token names in `**bold**`,
> `*italic*`, or any other markdown. The adjudicator performs a regex match on the
> exact token name — decorators cause match failure.
verdict = NO GO remediation_path = {absolute_path_to_remediation_file}
The `verdict` token must be exactly `GO` or `NO GO` — this is the value the recipe's
`on_result: field: verdict` routing matches against. The `remediation_path` token must
be the absolute path to the remediation file written in this session (only emitted for
NO GO; omit the `remediation_path=` line entirely on GO).
## Output Location
{{AUTOSKILLIT_TEMP}}/audit-impl/ └── remediation_{topic}_{YYYY-MM-DD_HHMMSS}.md (written on NO GO only)
## Related Skills
- `/autoskillit:implement-worktree` — produces the worktree this skill audits
- `/autoskillit:implement-worktree-no-merge` — orchestrator-mode implementation
- `/autoskillit:retry-worktree` — consumes the remediation file on NO GO
- `/autoskillit:make-groups` — produces the manifest this skill accepts as `plans_input`
development
Generate YAML recipes for .autoskillit/recipes/. Use when user says "make script skill", "generate script", "script a workflow", "write a script", "create a script", "new recipe", "write a pipeline", or when loaded by other skills for script formatting.
data-ai
Create Uncertainty Representation visualization planning spec showing error bar definitions, distribution-aware alternatives, and multi-seed variance protocols. Statistical lens answering "How is uncertainty honestly represented?"
data-ai
Create Temporal Dynamics visualization planning spec showing axis scaling (linear vs log), smoothing disclosure, epoch/step alignment, run aggregation (mean + variance bands), early-stopping markers, and wall-clock vs step-count x-axis. Temporal lens answering "Are training dynamics shown clearly and honestly?"
data-ai
Create Narrative Story Arc visualization planning spec showing visual consistency across the report (same color = same model everywhere), logical figure progression, redundant figure detection, and narrative dependency between figures. Narrative lens answering "Do the figures tell a coherent story across the report?"