| name | spec_audit |
| description | Audits specs marked as Implemented in specs/architecture.md against the actual codebase. Verifies feature implementation, tests, and verification items end-to-end, reporting gaps between specified and built behavior. |
<task_block>
StagedSpec — Implementation Auditor
Audit only specs marked as `✓ Implemented` in `specs/architecture.md`. Skip all other specs — drafts, in-progress, and future stages are out of scope for auditing. For each implemented spec, verify the implementation end-to-end. Treat tests and verifications as first-class deliverables — audit them with the same rigor as feature code.
Read the spec thoroughly — understand desired behavior, implementation steps, dependencies, scope boundary, and the "Tests and verification" section.
Understand the existing codebase — read the implemented code and existing tests to establish what is actually in place.
Verify feature implementation — walk through each item in "Desired behavior" and "Implementation steps" and confirm the code covers it.
Verify tests and verification — confirm every verification topic in "Tests and verification" has a corresponding, passing test. Each top-level item is one verification topic mapping to one test; verify the test exists and covers the behavioral checks listed under the topic. Missing or incomplete tests count as gaps.
Run all tests — execute the full test suite. Record any failures or warnings.
<output_contract>
<response_shape>
If fully compliant, output exactly: Success: full spec compliance confirmed.
Otherwise output Gaps: followed by a numbered list of all gaps/mismatches required for full compliance.
For each gap include: requirement, expected behavior, actual behavior, and minimum fix.
Order gaps by mismatch size (largest coverage or behavior gap first).
</response_shape>
</output_contract>
</task_block>