specs/002-self-printing-schema/tasks.md
Tasks: Self-Printing Schema
Input: Design documents from /specs/002-self-printing-schema/
Prerequisites: plan.md, spec.md
Tests: Required by constitution IV and AGENTS.md (new method → integration test).
Format: [ID] [P?] [Story] Description
Phase 1: Canonical lists in proto (US1+US2 foundation)
- T001 [US1] Add failing test in
crates/signaltty-proto/src/lib.rs:ALLslices contain every named constant, no duplicates (writeALLfirst as empty to watch it fail, or assert on a member before adding the slice) - T002 [US1] Add
method::ALL,event::ALL,code::ALL+method::SERVER_SCHEMAincrates/signaltty-proto/src/lib.rs;cargo test -p signaltty-proto
Phase 2: Server handler (US1)
- T003 [US1] Add
h_server_schema+ dispatch arm incrates/signaltty-server/src/router.rsbuilt from theALLslices;cargo test -p signaltty-server
Phase 3: Sync test (US2)
- T004 [US2] Add
schema_lists_every_dispatched_methodtocrates/signaltty-server/tests/integration.rs: callserver.schema, probe every method exceptserver.shutdownwith{}, assert noUNKNOWN_METHOD; assert key members present.cargo test -p signaltty-server --test integration schema_
Phase 4: CLI + docs (US1)
- T005 [P] [US1] Add
Schemavariant + match arm incrates/signaltty-cli/src/main.rs(status-command pattern); verify with a livesignaltty schema/schema --jsonrun - T006 [P] [US1] Add
server.schemarow to the methods table indocs/08-ipc.md
Phase 5: Verification
- T007 Run
cargo fmt --check,cargo clippy --workspace --all-targets,cargo test --workspace
Dependencies & Execution Order
- T001 → T002 → T003 → T004 → (T005, T006 in parallel) → T007
Notes
server.shutdownis listed in the schema but excluded from the probe loop: with{}on an idle store it would stop the fixture server. Its dispatch is covered by existing shutdown tests.- Probing
workspace.createwith{}creates one empty workspace in the ephemeral fixture — harmless, assertion is dispatch-only. - Commit as
server: self-printing schema (server.schema + CLI)after T007 (CLI + docs ride along; one concern: the contract).