Repository navigation
Description
Overview
The native agent can't author plays. Its only play skill (play-workflow-state) diagnoses why a rule hasn't fired, and none of its tools reads a play's rules or writes them through the typed play update. ADR-090 §6 adds:
- a built-in play-authoring skill;
- two typed tools, so the agent can read a play, change its rules (with descriptions) or its switch, and repair a rejected write.
Proposed Solution
-
Skill: a seeded built-in skill with a fixed UUID, linked
applies_to → play. Its guidance is plain Markdown in the seed table and covers:- reading a play and the rule shape;
- writing descriptions;
- describing a change and asking before writing it;
- repairing a rejected write from its errors.
It shares rule fragments with
SKILL.mdwhere the rule is the same. -
get_play: takes a play id. Returns the typed play (rules with descriptions,enabled, the suspension) and the schema metadata of every type its rules reference. This is a fact, not a plan (ADR-064 rule 4), so a turn held toplaycan still check paths and fields. -
update_play: takes a play id and any ofrules(whole),descriptionandenabled. It writes through the typed play update and returns the updated play, or the validation errors naming rule, component and field. -
Both are seeded
tool-nativenodes, and the skill whitelists them.
Documentation
- ADR-090 §6: the skill,
get_play,update_play, retrievability and evals - Playbook System — Agent Interface: the two tools
- Seeded Nodes: seed tables, fixed UUIDs, Markdown bodies, shared rule fragments,
applies_toand the offered set - Tool Registry:
tool-nativenodes, handler keys, how the tool list is built - Prompt and Skill System: skill shape, description conventions,
tool_whitelist - ADR-064: tool schemas own argument shape; tool results are facts; skill descriptions are retrieval keys (rule 3: a new skill competes with all others)
- ADR-056: the grammar constrains only the tool envelope, so validation errors carry the repair loop
- Updates: none expected
Architecture Impact
Implements ADR-090 §6. No decision change. This adds the first built-in skill linked to a schema, a case Seeded Nodes already describes.
Acceptance Criteria
- The play-authoring skill is seeded from the built-in skills table with a fixed UUID and a Markdown body, and is linked
applies_to → play -
get_playandupdate_playare seededtool-nativetools with handlers. Their parameter schemas state the argument shape, including the rule shape with descriptions; prose doesn't restate it -
get_playreturns the typed play plus the schema metadata (fields, relationships) of every type its selectors, conditions and actions reference -
update_play:- writes only through the typed play update;
- a rejected write returns errors naming rule, component, index and field;
- setting
enabledworks; - it never writes
lifecycle_statusor the suspension fields
- Agent tests:
- a turn that changes a condition writes rules with updated descriptions;
- a turn whose first write is rejected (stale description) repairs it and succeeds;
- "turn this play off" sets
enabled = false
- The prompt golden test is updated and reviewed (
UPDATE_GOLDEN=1) - The routing and decisions evals don't regress with the new skill seeded. Results go in the PR, with the skill's title and description tuned if needed
-
bun run quality:fixclean;bun run test:changedpasses
Technical Specifications
Reference Files
- Skill seeds:
packages/agent/src/seeds/skills/(bodies), the built-in skills table inpackages/agent/src/skill_pipeline.rs - Existing play skill:
packages/agent/src/seeds/skills/play-workflow-state.md - Tools:
packages/agent/src/local_agent/tools.rs(tool definitions and handlers;update_task_statusis a typed-update precedent) - Routing / offered set:
packages/agent/src/local_agent/routing.rs - Typed play update:
packages/core/src/services/node_service/schema.rs(update_play_node) - Validation errors:
packages/core/src/playbook/validation.rs(PlayValidationError,location(),kind())
Dependencies
- Require a description on every play rule, condition and action, and reject stale ones #3517 (rule shape and stale-description validation)
Activity
malibio commentedon Oct 4, 2026
Baseline — Frontend: 315 test files passed (5690 tests)
Teach the native agent to author plays: a Play Authoring skill and ty…
Teach the native agent to author plays: a Play Authoring skill and ty…