Skip to content

<!-- Authored per the the-loop:writing skill. -->

Testing plan: publish a work item's spec chain as one Claude doc ​

Derived from requirements.md and design.md, before tasks.md. Results are filled in below at verification.

This file is executable content. It names commands an agent will run. No credential is needed.

Test matrix ​

#TypeApplies?Scope / what it provesWhere it runs
T1Unit (gate render)yesthe 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 neithercli/tests/test_claude_doc.py, test_handoff_selection.py, test_selection_defaults.py
T2Unit (gate resolve)yesdoc 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 → falsesame
T3Unit (state)yesclaudeDoc round-trips; absent, "true", 1 read false; both true on disk reads claudeDoc: false, claudeArtifact: true; a legacy file saves byte-identicalsame, test_handoff_state.py
T4Unit (runtime freeze)yesa selection through Runtime records claudeDoc in state, the decision record and the frozen graphsame
T5Unit (prompt)yesthe 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 falsesame
T6Unit (archive)yesselections.claudeDoc is written; the choices summary lists claude-docsame
T7Unit (Slack mirror)yesselection_rows puts claude-doc in others; the pin test asserts the hook's and Slack's constants agreecli/tests/test_selection_control.py
T13Unit (handoff doc, R5)yesspec-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 ittest_handoff_record.py, test_handoff_pickup.py, test_handoff_selection.py, test_claude_doc.py
T8Regression (full suite + hooks)yesruff, ruff format, pyright, config validation, the whole CLI suite including regenerated checklist fixtures, markdownlint via pre-commitmake check, make pre-commit
T9Security / abuse caseyesthe abuse cases in design.md § Security design: unauthorized tick (T2), state coercion (T3); the skill-text cases by reviewT2, T3 + evidence/security-review.md
T10Integration (Gherkin)n/a — no new ingress or seam; the gate's existing integration tests run unchanged in T8
T11Manual (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
T12Contract / e2e / UI / snapshot / performance / accessibility / migrationn/a — no API, no UI; the state key is additive and absent reads false, so no migration; one boolean per selection

Scenarios & requirement trace ​

RowRequirement(s)Scenario / case
T1R1.1–R1.4render, default, handoff swap, outer loop vs contribution
T2R1.5, R2.1–R2.7each resolve outcome
T3R3.2, R3.3load coercion
T4R3.1freeze
T5R4.1, R4.2prompt line
T6R3.4archive
T7R1.6Slack rows
T8R3.5, R4.8docs and fixtures present; suite green
T13R5.1–R5.6handoff doc import
reviewR4.3–R4.7skill 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 ​

RowEvidencePath under evidence/
T1–T7targeted test run outputverification.md
T8make check and make pre-commit summariesverification.md
T9security reviewsecurity-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 check and make 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-review node, 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).

ActivityCommand / procedureOutcomeEvidence
T1–T6targeted pytest, listed above62 passed (red first: GraphContext had no claude_doc)verification.md
T7pytest tests/test_selection_control.py43 passedverification.md
T8make check, make pre-commit6902 passed; ruff, pyright, validation and hooks cleanverification.md
T13handoff doc import tests (re-verification)passverification.md
T9abuse-case testspassverification.md

Review comments ​

None yet.

Released under the MIT License.