Project Tests — Specs & Verification
Two modes that implement Touchpoints 3 and 4. The adversarial verification fix — Skeptic writes test specs, implementing Claude writes test code, Skeptic reviews the code against its own specs.
Mode 1: Write Test Specs (/project tests — Touchpoint 3)
Step 1: Gather Test Criteria
Read tasks.json v2. For each task in the active phase:
- •Extract
test_criteriaanddone_when - •Read relevant
SPEC.mdsections
Step 2: Write Skeptic's Inbox
Compose a brief for Skeptic only:
inbox/brief.md:
You are reviewing test criteria for Phase {N}: {phase name}.
For each task below, write test specifications as structured prose. Cover:
- •Happy path scenarios
- •Edge cases and boundary conditions
- •Error conditions and failure modes
- •Integration points (if applicable)
Format each spec with the task ID as a header. Be specific — "test error handling" is not a spec. "Verify that a 401 response returns JSON
{error: 'unauthorized'}and does not leak stack traces" is.Tasks: {task list with test_criteria and done_when}
Step 3: Run Skeptic (Quick mode)
Write inbox, invoke /run in Quick mode with Skeptic only. 1 round.
Step 4: Save Specs
After Skeptic produces specs:
- •Create
docs/test-specs/directory if it doesn't exist - •Save each task's spec to
docs/test-specs/{task-id}.md - •Update each task's
test_specfield intasks.jsonto point to the spec file
Test specs written by Skeptic:
- •
docs/test-specs/APP-001.md— 6 test scenarios- •
docs/test-specs/APP-002.md— 4 test scenariosNow implement the tests. When ready, run
/project tests --verifyfor Skeptic to review your test code.
Mode 2: Verify Test Code (/project tests --verify — Touchpoint 4)
This is the adversarial verification. The implementing Claude cannot self-grade — Skeptic checks the homework.
Step 1: Gather Test Code + Specs
For each task in the active phase with a test_spec:
- •Read the spec from
docs/test-specs/{task-id}.md - •Find and read the implemented test files (check
verification.test_commandfor hints, or scan common test directories)
If no test specs exist:
No test specs found. Run
/project testsfirst to have Skeptic write specifications.
If no test code exists:
Test specs exist but no test code found. Write the tests first, then run
/project tests --verify.
Step 2: Write Skeptic's Inbox
inbox/brief.md:
You previously wrote test specifications for Phase {N}. Now review the actual test code against your specs.
For each task, compare the implemented tests against the specification. Flag:
- •Missing scenarios — specs you wrote that have no corresponding test
- •Weak assertions — tests that pass trivially (e.g.,
expect(true).toBe(true),assert response.status)- •Wrong coverage — tests that test something other than what the spec describes
- •Missing edge cases — edge cases in your spec that aren't tested
Use FIX NOW for missing or trivially-passing tests. Use INFO for style preferences.
{For each task: spec content + test code content}
Step 3: Run Skeptic (Quick mode)
Write inbox, invoke /run in Quick mode with Skeptic only. 1 round.
Step 4: Process Results
Read Skeptic's report. For each FIX NOW finding:
- •Reopen the relevant task (
status: "open", clearverification) - •Add finding details to the task description
- •Set
source: "board-review-T4"
Skeptic reviewed your test code against specs:
- •APP-001: PASS — all 6 scenarios covered
- •APP-002: FIX NOW — 2 missing edge cases, 1 weak assertion
APP-002 reopened. Fix the tests, then run
/project tests --verifyagain.
If all pass:
All test code verified against Skeptic's specs. Tests are good. Run
/project nextto continue.