Task audit

From theafh/ai-modules · View interactive version

Task audit is an AI agent skill from the GitHub repository theafh/ai-modules. Audit one implemented or finished task against the actual codebase. Use when verifying a believed-done task, checking claimed completion against the code, or running a drift check before close-out. Inspect code and tests, run verification, stamp audited only on clean implemented work, and report gap

How to use this skill

Skill file

task_audit

<task_audit_skill>

<role>

task_audit verifies whether a task's claimed completion is real, by checking the codebase rather than the prose. It reads one task, reads the actual implemented code and tests, walks every body item and ## Acceptance check, runs the suite the task names, and reports a verdict: clean, or a list of gaps with fixes. It is a gate with two allowed lifecycle mutations: on a clean, complete verdict over a current implemented task, it stamps status: audited and bumps updated, and on a gap verdict over an audited task, it re-opens the task to status: implemented and bumps updated, the base <status_discipline> re-audit re-open. A clean re-check of an archived finished task leaves it finished, and a gap on an implemented or archived task leaves the status as it is. It answers "is this task genuinely done?"; task_finish answers "now close it." On a clean pass it hands the close-out to task_finish; on gaps it hands the remaining work on an implemented or re-opened task to task_implement, and the gaps on an archived task to a new task under the base <status_discipline> follow-up rule.

</role>

<when_to_activate>

Activate when the user wants a task's done-ness checked against reality:

Audit only a task whose work is claimed complete: a live implemented or audited task under verification, or an archived finished task re-checked for drift. Decline a task whose body is still a plan.

Route elsewhere when the user wants to assess a task's readiness before building (task_check), automatically repair readiness issues before building (task_auto_check), choose what to work on next (task_select), do the implementation work (task_implement), close and archive a task (task_finish), or audit the whole tree's lint health (task_fix).

</when_to_activate>

<authority>

The base task skill's SKILL.md is the source of truth for the task-file shape; read it and use its <discover> step to locate tasks/ and its <file_format> / <body> sections to read the task under audit. The task being audited names its own checks in ## Acceptance, and the repo's suite (make lint, the bundled lint.py, the matching tests/<skill>/script_tests) is the verification surface. Run what the task and repo name under the base <verification_economy> rule: run fresh wherever this session holds no citable prior run, and accept a recorded expensive-surface result only when it postdates every artifact under test.

</authority>

<path_resolution>

The bundled scripts (discover_tasks.sh, lint.py) ship in scripts/ next to the base task skill's SKILL.md, not next to this one. After reading that base SKILL.md (per <authority>), resolve each script's absolute path by combining the directory you loaded it from with scripts/<script-name> and invoke that absolute path, never a bare scripts/..., which resolves against the current working directory (the target project) rather than the skill, and so finds the project's own scripts/ or nothing. If the first invocation reports a missing file, re-resolve the absolute path once before treating the script as failed.

</path_resolution>

<workflow>

Run in order. Change no code, and change the task only for the two status stamps the Stamp the verdict. step describes, each with its updated bump.

  1. Read the task end-to-end. Understand the desired behaviour, the ## Approach, the scope and any Out of scope block, and every ## Acceptance item. This is the contract you audit against.
  2. Understand what is actually built. Read the implemented code and the existing tests around the work to establish what is really in place, not what the task claims.
  3. Verify each item against the code. Walk every body item and every ## Acceptance check and confirm the codebase covers it. Confirm the design-extended signal matches what the built change actually did, reading absence as false per the base <frontmatter> entry: a recorded true needs a design extension to justify it, and a false or absent signal needs the change to have genuinely left goals, stack, and design decisions alone. An absent field reads as false and is checked exactly like a recorded false: when that reading matches the change, name the missing field as a recording note among the supporting evidence that precedes the verdict line, outside any Gaps: list. A gap is only a mismatch between signal and change, namely a false or absent signal on a change that extended the design, or a true with no extension. Trust the code, not the prose.
  4. Audit the tests as first-class. When TESTING.md exists at the project root, read it for project-specific testing details (stack, runner, layout, thresholds) before judging the test surface. When it is absent, continue with the repo and task context already loaded. Confirm every acceptance check that names or implies a test has a corresponding, passing test. A missing or incomplete test is a gap, audited with the same rigour as the feature work, not waved through.
  5. Run the suite and attribute every failure. Execute the verifications the task and repo name under the base <verification_economy> rule, running fresh wherever this session holds no citable prior run (a cross-session audit inherits no run from the session that built the work, so it runs the checks itself), and accepting a recorded expensive-surface result as evidence only when it postdates every artifact under test. Record each failure or warning as evidence. Attribute honestly: a failure your audited work would cause is a gap; a pre-existing failure unrelated to this task is context, named as such rather than counted against the task.
  6. Stamp the verdict. When every body item, acceptance check, and required test is confirmed, the design-extended signal check is confirmed under the verify step's severity rule, where a recording note for an absent field that matches the change leaves it confirmed, and the current task status is implemented, stamp status: audited and bump updated. A clean verdict over a task already audited or archived as finished leaves its status as it is. When gaps remain on an implemented task, leave the status as it is and route the gaps to task_implement. When gaps that task_implement should fix remain on an audited task, write status: implemented and bump updated, which is the base <status_discipline> re-audit re-open, and route the gaps to task_implement on the same task. Route gaps on an archived finished task, and any finding the base <status_discipline> follow-up rule sends to a new task, to a new task under that rule.

</workflow>

<output_contract>

Report an evidence-based verdict, never on prose alone.

Make only the status stamps the Stamp the verdict. step describes. On a clean pass, point at task_finish to perform the close-out. On gaps, hand the remaining work to task_implement for an implemented task or an audited task the gap verdict re-opened, and to a new task for an archived one under the base <status_discipline> follow-up rule. Surface any pre-existing, unrelated failure as context separate from the gap list.

</output_contract>

<family>

The task_* family, in which each sibling does one job, then points to the next; the base task skill is the hub that can do all of it:

These ship together as a family; any sibling may be absent if a deployment excluded it. The default manual chain is create → check → implement → audit → finish, with task_auto_check as an opt-in readiness repair loop, task_select a read-only chooser for what to work on next, and task_fix maintaining the tree.

</family>

</task_audit_skill>

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.