Repository navigation
Closed
Labels
Description
Overview
A play's rules carry no human text: a condition is a bare CEL string such as node.child_of.has_child.all(status == 'done'). ADR-090 makes the play's author write what each part means, in the same write as the rule, so the play viewer can show a readable workflow and agents keep rule and intent together. This is a change to the play type and the first of the ADR-090 work: the viewer and the agent's play tools depend on the new rule shape.
Proposed Solution
RuleDefinitiongains a requireddescription.- Conditions change from
Vec<String>to objects{ expr, description }, both required. - Each
Actionvariant gains a requireddescriptionbesideaction_type,paramsandfor_each. - The trigger gets no description.
- Save-time validation rejects a blank description and a stale one, as ADR-090 §1 specifies (matching by rule
name, then by index; what counts as each component's content). - Seeded core plays and bundled playbooks' plays ship descriptions in their seed tables.
- The CLI reads and prints the new shape;
SKILL.mdandreferences/cli.mdteach it.
Documentation
- ADR-090 §1 (the rule shape, blank and stale rejection, matching) and §7 (external agents)
- Playbook System — Descriptions: the rule, condition and action shape with examples
- Node Types — play:
RuleDefinitionand the description rule - Seeded Nodes — Shared rule fragments: one rule text for agent and skill forms
- Node type sequence: mandatory for this change
- Updates: none expected. The docs already describe the target shape; if implementation forces a difference, update them in the same change
Architecture Impact
Implements ADR-090 §1 and §7, which change the play rule shape documented in architecture/playbook-system.md (conditions were CEL strings). The docs were updated first (nodespace-docs 88cc64b). Pre-release: change the shape and reset the database; no migration of stored plays.
Acceptance Criteria
-
RuleDefinition.description, condition{ expr, description }and actiondescriptionexist innodespace-types, required;bun run gen:typesoutput committed - Decoding rejects a missing description and a bare-string condition, naming the rule and field
- Save-time validation rejects a blank (empty or whitespace) description, naming rule, component and index
- Save-time validation rejects a stale description per ADR-090 §1: a changed condition
expr, a changed action (action_type,params,for_each), or a changed ruletrigger/classthat keeps its stored description. Tests cover each case, plus an unmatched (new) component, a renamed rule (treated as new), and a write that leavesrulesalone (no stale check, so a play with broken rules can still be switched off) - The CEL compiler, the engine,
get_workflow_stateand graph resolution readexpr; no behavior change in evaluation (existing engine tests pass with the new shape) - Every core play (
playbook/core_plays.rs) and every bundled playbook play (methodology/linear.rs,jira.rs,spec_driven.rs) carries descriptions; a test validates every seeded and bundled play through save-time validation -
_seed.default_rules(reset target) carries the descriptions too - CLI:
playbook listandnode getprint the new shape; writing rules through the CLI accepts it and surfaces the validation errors readably -
SKILL.md/references/cli.mdteach descriptions, the condition object and the stale rejection, written as shared rule fragments; the SKILL.md drift check passes -
components/node-types.mdstill matches (bun run node-types:check) -
bun run quality:fixclean;bun run test:changedpasses
Technical Specifications
Reference Files
- Rule types:
packages/nodespace-types/src/play.rs(conditions: Vec<String>at theRuleDefinitionstruct) - Core-side rule types:
packages/core/src/playbook/types.rs - Validation:
packages/core/src/playbook/validation.rs(validate_play); the typed update pathpackages/core/src/services/node_service/schema.rs(update_play_node), which already knows whenruleschanged - CEL:
packages/core/src/playbook/cel.rs; graph resolutionpackages/core/src/playbook/graph_resolver.rs - Seeded plays:
packages/core/src/playbook/core_plays.rs,packages/core/src/playbook/seeded.rs; bundled:packages/core/src/methodology/ - CLI:
packages/cli/src/commands/playbook.rs - Skill:
packages/skill/SKILL.md,packages/skill/references/cli.md; fragments underpackages/agent/src/seeds/rules/
Implementation Details
- The stale check needs the stored rules and the incoming rules together, so it belongs where the typed update compares them, not in decode.
- The error text is consumed by agents: name the rule by
name, the component kind and its 1-based index, and say what to change.
Activity
malibio commentedon Oct 4, 2026
Baseline (fresh worktree, machine under load from other sessions — 2001s run): Frontend 5591 passed, 22 failed across 17 files, before any change. Kind: structured core type (play), category unchanged; the change is to the nested RuleDefinition shape (rule description, condition { expr, description }, action description).
Require a description on every play rule, condition and action, and r…