Correctless

/cverify β€” Post-Implementation Verification

Verify that the implementation actually matches the spec β€” not just that tests pass, but that the right things were tested.

When to Use

How It Fits in the Workflow

/cverify sits between TDD completion and documentation. The pipeline is: /cspec β†’ /creview β†’ /ctdd β†’ /cverify β†’ /cdocs β†’ merge. Tests passing is necessary but not sufficient β€” /cverify checks whether the tests actually probe the spec rules, whether new dependencies are justified, and whether the implementation follows the project’s architecture.

What It Does

  1. Rule coverage matrix β€” for each R-xxx/INV-xxx in the spec, checks whether a test references that rule, whether the test actually probes the rule (not a trivial assertion), and whether integration-tagged rules have real integration tests. Uncovered rules are blocking.
  2. Mutation testing (runs in background) β€” kills mutants in the implementation to verify test strength. Surviving mutants reveal tests that would pass even with bugs.
  3. Dependency check β€” diffs package manifests against the base branch. Flags new dependencies with which file introduced them and whether they were in the spec.
  4. Architecture compliance β€” checks that implementation follows patterns in ARCHITECTURE.md (error handling, validation, naming). Flags new patterns for documentation.
  5. Drift detection β€” compares spec rules against actual implementation. Identifies code paths not covered by any spec rule and rules whose implemented_in targets no longer exist. Writes drift debt entries.
  6. QA class fix verification β€” reads QA findings from TDD and verifies that structural tests were actually added, not just instance fixes.
  7. Writes a verification report to docs/verification/{slug}-verification.md β€” downstream skills depend on this file.

Example

Agent: Rule coverage complete β€” 5/5 rules covered, 1 weak.
       Starting mutation testing in background...

       Rule Coverage:
       | Rule    | Test                    | Status  |
       |---------|-------------------------|---------|
       | R-001   | TestLoginLockout        | covered |
       | R-002   | TestLockoutReset        | covered |
       | R-003   | TestConfigurable        | weak    |
       | R-004   | TestPersistAcrossRestart| covered |
       | R-005   | TestNoEmailLeak         | covered |

       R-003 is weak β€” the test checks that the env var is read but
       doesn't verify the actual lockout duration changes.

       Mutation testing done β€” 24 mutations, 22 killed, 2 survivors.
       Survivors in: lockout duration boundary check.

       Dependencies: +ioredis@5.4.1 β€” rate limit storage (not in spec,
       but implied by R-004).

       Architecture: error handling follows middleware pattern. No new
       patterns introduced.

       Overall: PASS with 1 finding (weak test for R-003).

What It Reads / Writes

Reads Writes
Spec (.correctless/specs/{slug}.md) docs/verification/{slug}-verification.md
Implementation (changed files on branch) .correctless/meta/drift-debt.json (appended if drift found)
Test files .correctless/artifacts/token-log-{slug}.json
ARCHITECTURE.md Workflow state (advances to verified)
.correctless/artifacts/qa-findings-{slug}.json Β 
.correctless/meta/workflow-effectiveness.json Β 
Package manifests (diff against base branch) Β 

Intensity Levels

Same at all intensity levels for rule coverage, dependency checks, architecture compliance, and drift detection. At high/critical intensity, mutation testing, cross-spec impact analysis, and checks whether structural changes affect other features’ invariants are added.

Common Issues