AI Contributor Audit Fix
name: ai-contributor-audit-fixdescription: Fix the AI Contributor audit backlog findings that block the next conformance level (fix-next-level) or one named finding (fix-one), then verify with a single re-audit.disable-model-invocation: truePurpose
Section titled “Purpose”This skill is user-invoked only (disable-model-invocation: true). Start it explicitly — /ai-contributor-audit-fix in Claude Code or GitHub Copilot, $ai-contributor-audit-fix in Codex — it never starts because an agent matched a prompt.
Fix the backlog findings in AI-CONTRIBUTOR-AUDIT.md that block the next AI Contributor conformance level. This skill complements ai-contributor-audit: it changes only the target-repository evidence or hosted settings needed for the confirmed fixes. The audit skill reruns evidence collection, stamping, and validation to record the result.
Do not edit generated audit results. This includes statuses, summaries, conformance levels, checklist rows, evidence JSON, and backlog rows.
The invocation selects one of two modes:
- fix-next-level (default, no argument): fix every backlog row blocking the next unreached conformance level.
- fix-one (a rule named in the invocation, e.g.
/ai-contributor-audit-fix AIC-secret-scanning): fix that single backlog row.
Both modes run the same fix loop and end with the same single re-audit; only the scope differs.
Scope Selection
Section titled “Scope Selection”- Read the root audit summary
AI-CONTRIBUTOR-AUDIT.md. The conformance summary shows the current level. The## Backlog — what to address firsttable is the action queue — already stamped and sorted byaudit-stamp.ts(lowestLevel, then lowestPriority, then table order). Read it directly; do not maintain a separate backlog parser. - Resolve the scope from the mode:
- fix-next-level: every backlog row whose
Levelis at or below the next unreached conformance level. If the user names a different target level, scope to that level’s blockers instead. Level 4 SHOULD rows enter scope only when Level 4 is the target. - fix-one: the single backlog row for the named rule.
- fix-next-level: every backlog row whose
- Confirm the scope with the user before changing anything: name the mode and target (level or single rule), list the in-scope backlog rows, and ask whether to do the work in a separate git worktree.
Fix Loop
Section titled “Fix Loop”Work through the confirmed scope one finding at a time, in backlog order. For each finding:
- Read the matching checklist row in
.ai-contributor-audit/AI-CONTRIBUTOR-CHECKLIST.mdand itsCommentbefore editing. The root backlogNext actionis the task. The checklistCommentand.ai-contributor-audit/AI-CONTRIBUTOR-EVIDENCE.jsonexplain the evidence gap. - Classify the fix:
- Hosted GitHub control: branch rules, reviews, secret scanning, push protection, deployment protection, Dependabot alerts, CODEOWNERS enforcement. Change repository settings only after the user confirms that specific change.
- Repository file/config: workflows, policy docs, CodeQL/Semgrep, lint/type/test tooling, runtime validation, ownership docs.
- AI governance:
AGENTS.md, AI contribution policy, provenance, prompt retention, redaction, MCP scoping, incident process. - Level 4 SHOULD: either implement the control or add a documented reason that the repository intentionally defers it.
- Make the smallest change that creates real evidence for the current finding only. Repository fixes may edit normal source, config, workflow, or policy files; they must not edit audit output files.
- Verify with the command or API evidence the audit expects. Prefer the same command family named in the checklist comment or audit evidence.
- Record the finding’s outcome:
fixed,blocked(with the reason), orawaiting hosted-setting confirmation. A blocked finding does not stop the batch — continue with the next in-scope row.
Re-Audit Once, After the Batch
Section titled “Re-Audit Once, After the Batch”Run the re-audit after every in-scope finding is fixed or recorded as blocked — not after each individual fix.
- Offer the user next-step choices for the accumulated changes: leave them uncommitted, commit directly, create a branch and commit, push, or create a PR. Do not perform git publish actions without the user asking for them.
- Run one AI Contributor audit cycle to refresh results:
- For pre-commit verification, run the audit collector in
--working-treemode. - For claimable release evidence, commit the fixes first, then run the SHA-pinned audit flow.
- Always run stamp and validate after collection.
- For pre-commit verification, run the audit collector in
- If the user defers the re-audit, state clearly that the backlog and conformance level are stale until the audit reruns.
Final Report
Section titled “Final Report”Name the mode and target (level or single rule) and give a per-finding outcome table (rule, outcome, files or hosted settings changed, verification command). State whether the re-audit ran and whether it confirms the target level was reached, or which findings remain blocked.
Before Declaring Done
Section titled “Before Declaring Done”- The user confirmed the batch scope before any change was made.
- Every in-scope backlog row has a recorded outcome:
fixed,blocked, orawaiting hosted-setting confirmation. - Each
fixedfinding has verification command or API evidence from this run. - No generated audit result file was hand-edited; any change to
AI-CONTRIBUTOR-AUDIT.mdor.ai-contributor-audit/came from the audit scripts. - Exactly one re-audit cycle ran after the batch, or the user explicitly deferred it and was told the results are stale.
- The final report covers target level, per-finding outcomes, changes, verification commands, and re-audit result.
Guardrails
Section titled “Guardrails”- Never edit
AI-CONTRIBUTOR-AUDIT.md,.ai-contributor-audit/AI-CONTRIBUTOR-CHECKLIST.md,.ai-contributor-audit/AI-CONTRIBUTOR-EVIDENCE.json, or other generated audit result files as part of a fix. - Do not treat a document-only policy as satisfying an executable control unless the rule allows process evidence.
- Do not bundle rows outside the confirmed scope into the batch. If the user asks for more mid-run, reconfirm the expanded scope first.