<!-- Authored per the the-loop:writing skill. -->
Testing plan: publish a work item's spec chain as one Claude doc
Derived from
requirements.mdanddesign.md, beforetasks.md. Results are filled in below atverification.This file is executable content. It names commands an agent will run. No credential is needed.
Test matrix
| # | Type | Applies? | Scope / what it proves | Where it runs |
|---|---|---|---|---|
| T1 | Unit (gate render) | yes | the outer loop's checklist carries claude-artifact unticked and claude-doc ticked in one section with the "at most one" note; a handoff that imported a spec artifact swaps the two; an untouched checklist freezes claudeDoc: true; a contribution's carries neither | cli/tests/test_claude_doc.py, test_handoff_selection.py, test_selection_defaults.py |
| T2 | Unit (gate resolve) | yes | doc ticked alone + harness claude/unknown → claudeDoc: true, claudeArtifact: false; doc ticked + harness codex → false, confirmation names codex; both ticked → the default (claudeDoc: true, or claudeArtifact: true after an artifact handoff), confirmation names the default used; both ticked on codex → not applied; artifact-only unchanged; untouched default reply resolves as before; never a skip, opt-in or refusal; a contribution's reply carrying the row → false | same |
| T3 | Unit (state) | yes | claudeDoc round-trips; absent, "true", 1 read false; both true on disk reads claudeDoc: false, claudeArtifact: true; a legacy file saves byte-identical | same, test_handoff_state.py |
| T4 | Unit (runtime freeze) | yes | a selection through Runtime records claudeDoc in state, the decision record and the frozen graph | same |
| T5 | Unit (prompt) | yes | the graph block carries the doc line for an outer-loop item with claude_doc, and not for a PR, contribution, ad-hoc, review item or false | same |
| T6 | Unit (archive) | yes | selections.claudeDoc is written; the choices summary lists claude-doc | same |
| T7 | Unit (Slack mirror) | yes | selection_rows puts claude-doc in others; the pin test asserts the hook's and Slack's constants agree | cli/tests/test_selection_control.py |
| T13 | Unit (handoff doc, R5) | yes | spec-doc round-trips, is refused when malformed or beside spec-artifact; Runtime.start adopts only a claude.ai link as claudeDocUrl; the prompt names it, and never a non-https value; the checklist keeps the doc ticked; the archive carries it | test_handoff_record.py, test_handoff_pickup.py, test_handoff_selection.py, test_claude_doc.py |
| T8 | Regression (full suite + hooks) | yes | ruff, ruff format, pyright, config validation, the whole CLI suite including regenerated checklist fixtures, markdownlint via pre-commit | make check, make pre-commit |
| T9 | Security / abuse case | yes | the abuse cases in design.md § Security design: unauthorized tick (T2), state coercion (T3); the skill-text cases by review | T2, T3 + evidence/security-review.md |
| T10 | Integration (Gherkin) | n/a — no new ingress or seam; the gate's existing integration tests run unchanged in T8 | ||
| T11 | Manual (publish a doc) | n/a — publishing is a Claude Code session tool outside the CLI; the CLI's contract ends at the prompt line (T5), and the skill text is reviewed | ||
| T12 | Contract / e2e / UI / snapshot / performance / accessibility / migration | n/a — no API, no UI; the state key is additive and absent reads false, so no migration; one boolean per selection |
Scenarios & requirement trace
| Row | Requirement(s) | Scenario / case |
|---|---|---|
| T1 | R1.1–R1.4 | render, default, handoff swap, outer loop vs contribution |
| T2 | R1.5, R2.1–R2.7 | each resolve outcome |
| T3 | R3.2, R3.3 | load coercion |
| T4 | R3.1 | freeze |
| T5 | R4.1, R4.2 | prompt line |
| T6 | R3.4 | archive |
| T7 | R1.6 | Slack rows |
| T8 | R3.5, R4.8 | docs and fixtures present; suite green |
| T13 | R5.1–R5.6 | handoff doc import |
| review | R4.3–R4.7 | skill text, in evidence/self-review.md |
Verification environment
- Repositories: this repo only.
- Services / containers: none.
- Fixtures & data: the suite's own test doubles; checklist fixtures under
cli/tests/fixtures/{jira,handoff}/regenerated by the change. - Credentials: none.
- Bring-up:
uv sync· Tear-down: none.
Evidence plan
| Row | Evidence | Path under evidence/ |
|---|---|---|
| T1–T7 | targeted test run output | verification.md |
| T8 | make check and make pre-commit summaries | verification.md |
| T9 | security review | security-review.md |
Verification activities
- [x] T1–T6 —
cd cli && uv run python -m pytest -q tests/test_claude_doc.py tests/test_handoff_selection.py tests/test_selection_defaults.py tests/test_handoff_state.py - [x] T7 —
cd cli && uv run python -m pytest -q tests/test_selection_control.py - [x] T8 —
make checkandmake pre-commit - [x] T13 —
cd cli && uv run python -m pytest -q tests/test_handoff_record.py tests/test_handoff_pickup.py tests/test_handoff_selection.py tests/test_claude_doc.py - [x] T9 — the abuse-case tests inside the T1–T6 run. Replanned from "security review recorded": that record belongs to the later
security-reviewnode, so verification runs the negative tests and the review records its own verdict.
Verification results
Run on 2026-11-17 at 23efe118, with the daemon's THE_LOOP_* variables unset (see the evidence for why).
| Activity | Command / procedure | Outcome | Evidence |
|---|---|---|---|
| T1–T6 | targeted pytest, listed above | 62 passed (red first: GraphContext had no claude_doc) | verification.md |
| T7 | pytest tests/test_selection_control.py | 43 passed | verification.md |
| T8 | make check, make pre-commit | 6902 passed; ruff, pyright, validation and hooks clean | verification.md |
| T13 | handoff doc import tests (re-verification) | pass | verification.md |
| T9 | abuse-case tests | pass | verification.md |
Review comments
None yet.