Skip to content

Remove requires_spec from task; the spec rule applies only to a task that links a spec #3718

Closed

Description

@malibio

Overview

The task spec Play refuses to start any task that links no approved spec, and the task type carries a requires_spec boolean as the way out for chores. This is a decision change: the rule is narrowed to tasks that link a spec, and the field is removed. A task with no spec is a plain to-do again.

Problem Statement

  • Every to-do has to be marked requires_spec: false before it can be started, including work that has nothing to do with development.
  • A piece of one workflow sits on the core task type (schema, wire type, proto, daemon, app-lib, generated TypeScript).
  • An extension field named after a declared field of a core type (custom:status on a task) is accepted on write, but a rule reads fields by bare name and the declared field wins, so no Play can ever read it. Nothing tells the user.

Proposed Solution

  • Task spec Play: reject moving a task to in_progress when it links at least one spec and none has spec_status approved. Drop the requires_spec condition. A task that links no spec is not touched.
  • Delete the requires_spec field everywhere. No replacement field, no compatibility read.
  • Rejection message and the seeded skills: no marker wording. The next step is to ask the user to approve the spec.
  • Refuse a write that sets custom: / org: / plugin: + the name of a field the core type declares, naming the declared field.

Documentation

  • ADR-097 §1, §2, §6, §8 - the rule, its edge cases, no field on the task, the rejection text, and the shadowed extension field refusal
  • ADR-092 §6 and §7 - the Plays table and Ready tasks
  • ADR-063 - extension fields on a core type
  • Node type sequence, ADR-086 - mandatory for the field removal
  • playbook-system.md - the Plays NodeSpace ships
  • Updates: the task sheet in components/node-types.md (field table row, the light-lane bullet, the Rules and Typed update bullets). Pushed just before bun run merge; everything else is already on docs main.

Architecture Impact

Reverses the second version of ADR-097 ("every task needs an approved spec, with a marker for the exceptions") and its §6 statement that the field is core and cannot be removed. The ADR is already rewritten and pushed; this issue brings the code in line. Kind of change under the node type sequence: removing a declared scalar field from a flat core type (task, category unchanged). No new type, relationship or structural rule.

Acceptance Criteria

  • A task that links a draft spec and no approved spec cannot move to in_progress; with one approved spec among several it can
  • A task that links no spec moves to in_progress with nothing set on it
  • requires_spec appears nowhere in packages/ (schema, wire type, proto, daemon, app-lib, adapter contract, generated TypeScript, skills, tests)
  • The rejection message and the two seeded skills name no marker
  • Ready tasks offers a task with no spec and withholds one whose spec is a draft
  • Writing custom:status (or any prefixed name matching a declared field) on a core type is refused with a message naming the declared field; a prefixed name that matches no declared field is still accepted
  • bun run gen:types output committed; bun run types:check and bun run node-types:check pass
  • Fixtures that were marked requires_spec: false only to be startable no longer set it
  • Code passes bun run quality:fix
  • bun run test:changed passes

Technical Specifications

Reference Files

  • packages/core/src/playbook/core_plays.rs - task_spec_rules(), its doc comment (also says the gate asks through the dry run, which is stale) and its unit test
  • packages/core/src/models/core_schemas.rs - the requires_spec SchemaField and its test
  • packages/nodespace-types/src/task.rs, convert.rs - wire struct, typed update and tests
  • packages/proto/proto/node_service.proto, packages/daemon/src/services/node_service.rs, packages/desktop-app/app-lib/src/commands/nodes.rs, packages/desktop-app/app-lib/tests/it/adapter_contract_test.rs
  • packages/desktop-app/src/lib/types/generated/ (regenerate, never hand-edit), packages/desktop-app/src/tests/services/node-normalize.test.ts
  • packages/core/src/services/query_service/core_queries.rs - Ready tasks comment
  • packages/agent/src/seeds/skills/breaking-a-plan-into-tasks.md, implementing-a-task.md, packages/agent/tests/it/workflow_seeds.rs
  • packages/core/tests/it/core_model_plays_test.rs, permitted_filter_test.rs, parent_task_completion_play_test.rs, playbook_invariant_integration_test.rs
  • packages/core/src/services/node_service/crud.rs - reject_undeclared_core_keys (the shadow refusal belongs here); is_extension_field_name in node_service/mod.rs
  • packages/core/src/playbook/cel.rs - why a shadowed field is unreadable (unprefixed keys win the bare name)

Implementation Details

  • Play conditions become: node.status == 'in_progress', and has(node.spec) && size(node.spec) > 0 && !node.spec.exists(s, has(s.spec_status) && s.spec_status == 'approved') (confirm how an empty relationship reads in CEL; a task with no spec must not be rejected).
  • No migration and no fallback read of the old field: change the shape, reset the database.
  • Model-facing text in packages/agent is pinned by the prompt snapshot test; regenerate with UPDATE_GOLDEN=1 and review the diff.
  • Mutation-check the two new rule tests: each must fail with the rule's condition reverted.

Related Issues

Non-Goals

  • Checking an agent's repository writes
  • A strict "every task needs a spec" mode in core; a team edits the Play for that
  • Refusing a shadowing field name at schema-edit time, if that turns out to be a separate path

Activity

  1. malibio commented on Oct 11, 2026

    @malibio
    CollaboratorAuthor

    Sequencing: this lands before the v0.3.5 release, so the release does not ship a task field that is about to be removed, and before the trial in #3712 starts collecting counts (a later change to the field would mean resetting the trial's database).

  2. malibio commented on Oct 11, 2026

    @malibio
    CollaboratorAuthor

    Baseline — Frontend: 324 test files passed, 5874 tests passed

  3. self-assigned this
    on Oct 11, 2026
  4. added a commit that references this issue on Oct 11, 2026
    f96acb4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions