Repository navigation
Description
Overview
Seed the rule that makes the gate mean something: no repo writes without a claimed task whose spec is approved. Without this issue the gate check has nothing meaningful to enforce.
Problem Statement
The shipped Plays all guard graph state. The rule agents most need is about the repository, and today it is only a sentence in the "Implement a task" skill.
Existing rules do not express it. ADR-092 §6's lineage rule fires only for a task that has a plan, so a task with a draft spec and no plan, or no spec at all, starts without objection. The gate's dry run (ADR-097 §2) would therefore allow it.
Proposed Solution
- Add a seeded core invariant Play: a task moving to
in_progressmust link a spec that is approved, unless it is marked as not needing a spec (the light lane). Because it is a Play on the status change, it guards graph writes too, not only repo writes, and the gate picks it up through the dry run with no extra machinery. - Add the light-lane marker as a declared task field.
- The Play's rejection message names the next step in
nodespaceterms and the skill to follow (ADR-097 §8). - Exempt paths (for example docs and tests) are configurable data read by
gate check, not Play logic.
Documentation
- ADR-097 §2, §3, §6 and §8
- ADR-092 §6 (task lineage, blockers, criteria Plays; a task with no plan is unrestricted today)
- ADR-072 (seeded items, user edits, reset, shipped changes put to the user)
- Node type sequence: node-type-sequence.md, ADR-086, ADR-089, node-types.md
- Updates: seeded Plays page in
components/seeded-nodes.md,node-types.md
Architecture Impact
A new seeded Play with a fixed id in CORE_PLAY_IDS, following the ADR-072 seeding pattern, and a new declared field on the core task type. The field change MUST follow the node type sequence: closed schema field with a schema default, bun run gen:types, and node-types.md updated in the same change (bun run node-types:check fails otherwise). This amends ADR-092 §6, which lets a task with no spec start; the amendment is recorded before or with this issue.
Acceptance Criteria
- A task cannot move to
in_progresswithout a linked approved spec unless marked as not needing one (graph write and repo-write gate alike) - A repo write is denied when the session has no in-progress task
- A repo write is denied when the task's spec is not approved
- The deny reason says what to do next, names the skill, and says not to retry
- Light lane: a task marked as not needing a spec (chores, small fixes) allows repo writes once claimed
- Paths that never need a task (docs, tests; configurable) are exempt
- The Play ships like the other core Plays: user-editable, resettable, warning on edit or disable, delivered to new and existing databases
- The rule can be set to advisory without editing the Play (the setting from the gate check issue)
- Tests cover allow, both deny cases, light lane, advisory, and an edited or disabled Play
- Generated types are regenerated and committed;
bun run node-types:checkpasses - Code passes
bun run quality:fix; tests pass (bun run test:changed)
Technical Specifications
Reference Files
packages/core/src/playbook/core_plays.rs(seeded_play,reject_change,CORE_PLAY_IDS, the id tests at the end)packages/core/src/playbook/seeded.rspackages/core/src/models/core_schemas.rs(task, spec and plan relationships)
Implementation Details
- Mirror an existing seeded Play, including the tests that pin ids and descriptions.
- Do not read
lifecycle_statusor compare node type literals; use governance and registry helpers. - Existing databases: change the seed and reset; no backfill.
Dependencies
Related Issues
- Seed the spec, plan, task, review and decision procedures as built-in skills, the work queues they are attached to, and a skill-authoring skill #3543 (seeded procedures, work queues and skills; closed)
Non-Goals
- A rule per harness or per path
Activity
malibio commentedon Oct 10, 2026
Frontend: 5873 passed (324 files)
Refuse starting a task without an approved spec, with a requires_spec…
malibio commentedon Oct 11, 2026
What shipped and what did not: the seeded Play that guards a task's move to in_progress landed with the pull request that closed this issue. The repository-write half in the title (a gate check command called from a hook in each harness, exempt paths, the advisory setting) was not built and is not planned; ADR-097 was rewritten to record that, with the gate kept as an alternative considered. The ADR link in the body points at the old file name: the current file is decisions/097-a-task-needs-an-approved-spec-to-start.md in nodespace-docs.