Skip to content

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

Closed

Description

@malibio

Overview

With spec, plan and decision built into core, the procedures for using them have to ship too: how to write a spec and its criteria, plan from it, break the plan into tasks, implement a task, complete it, and record a decision. This issue seeds those as built-in skills, adds a skill that teaches skill authoring, and seeds the saved queries that list specs, plans and decisions by status.

Problem Statement

  • The procedures that existed lived in the removed spec-driven bundle, and they mostly taught how to pass the gates. None covered doing a task: picking it up, reading what governs it, working to its checklist and recording what was done.
  • Nothing teaches breaking a plan into tasks with checklists, or recording a decision.
  • Skills are any instruction a user writes, but no skill tells an agent what a skill can be or how to write one that will be found.
  • Saved views were only ever created by a bundle install. There is no path that seeds a query into every database.

Proposed Solution

Seed these built-in skills, each linked to the types it works on through applies_to:

  1. Writing a spec and its criteria: objective and boundaries in the user's terms; criteria as checkbox children, each a testable condition; never invent a criterion; create as draft and ask before approving.
  2. Writing a plan from a spec: read the spec first; link the plan to it; approach tied to the spec's criteria; risks specific to the approach; one live plan per spec; approval is the user's.
  3. Breaking a plan into tasks: one task per unit of work, each with its own checklist written from the spec's criteria, linked to plan and spec, with blocks links where order matters.
  4. Implementing a task: take a ready task, read its context, work to its checklist, tick each item with evidence beneath it, record the pull request and commit links, move it to in_review.
  5. Completing a task: every checklist item checked before done; what a rejection means and how to resolve its cause.
  6. Recording a decision: when a choice deserves a decision, its status, linking it from the spec or task it constrains, superseding an older one.
  7. Authoring a skill: what a skill can be, writing a description that will be found, structuring the body, when to reference a schema, naming tools by their registry names, and looking for an existing skill first.
  8. Reviewing a task: for an agent working the review queue: reading the task, its checklist and evidence, its pull request and what governs it; what to check; recording the outcome; moving it to done or back to in progress.

Seed query nodes listing specs by status, plans by status and decisions by status, and three queues: "Ready tasks", "In progress" and "Awaiting review".

Link the procedures to the work they are for with attached_to: implementing a task is attached to "Ready tasks" and "In progress", and reviewing a task to "Awaiting review". A task then carries the procedure for the stage it is in. Declare the context paths of task: its spec, its plan, the decisions linked from it and from its spec, and its project.

A team adds its own standards (naming conventions, a test strategy, lint and coverage rules) by writing skills and linking them to a project, with no change to anything seeded here.

A small change is a first-class path: skill 3 and skill 4 say that a task with a checklist of its own needs no spec or plan.

Documentation

  • ADR-092 §8 - the seeded skills and queries; §2 - criteria and evidence; §6 - the rules the skills explain
  • ADR-094 - "The shipped workflow, restated on these primitives": queues, procedures, standards, a task's context, claiming a task
  • ADR-093 §2 - what a skill is, descriptions, tool names, per-reader steps, the skill-authoring skill
  • ADR-064 §3 and §5 (revised) - descriptions are retrieval text; skill nodes own procedure; a step whose procedure differs has a form per audience
  • ADR-072 - seeded nodes and user edits
  • ADR-091 - saved queries and where saved views appear
  • Seeded Nodes and Prompt and skill system - seed tables, fixed ids, applies_to
  • Updates: components/seeded-nodes.md (the new skills and the seeded queries), architecture/prompt-skill-system.md (the skill list)

Architecture Impact

Implements ADR-092 §8 and the skill-authoring part of ADR-093 §2. Seeding query nodes is new: seeded-nodes.md lists agent guidance, skills, tools and Plays as seeded today, and gains queries.

Acceptance Criteria

  • The eight skills are seeded into every database with fixed ids, Markdown bodies, and applies_to links to the types each works on
  • No body opens with an H1, and each follows the built-in skills' shape: tool-specific steps are rules with an agent form and a CLI form; other prose names no tool that only one reader has
  • Each description is retrieval text for the situation it applies to; the retrieval benchmark has cases for all eight and none of the existing built-in skills regresses on it
  • "Implementing a task" is one procedure start to finish: run the queue with context, start the task naming the version read, follow the skills that came with it, tick each checklist item with evidence as it is met (naming the version read), record the pull request and commit links, and move the task to in_review. It says what a version conflict means: re-read, and stop if the task is no longer open to work on
  • "Reviewing a task" is one procedure start to finish for the "Awaiting review" queue, and neither procedure tells its reader to do the other's work
  • "Implementing a task" covers, in order: getting a ready task, reading its context, working to the checklist, evidence under each ticked item, the pull request and commit links, and in_review
  • The skills state that approval of a spec or plan is the user's, and that a rejected write is resolved at its cause and never retried or worked around
  • "Authoring a skill" tells the agent to search for an existing skill first and to write the description as when the skill applies
  • Six query nodes are seeded with fixed ids: specs by status, plans by status, decisions by status, and the queues "Ready tasks", "In progress" and "Awaiting review"; they appear where saved views appear
  • "Ready tasks" lists open tasks with at least one checkbox child, no unfinished blocked_by task and no plan that is not approved, ordered by priority then creation time; a test has a task excluded by each condition alone, and a task with no blocker and no plan included
  • Seeded attached_to links: implementing a task → "Ready tasks" and "In progress"; reviewing a task → "Awaiting review"
  • task is seeded with context paths to its spec, its plan, the decisions linked from it and from its spec, and its project
  • Running "Ready tasks" with context returns the top task with its governing nodes and the implementing procedure; after the task is started, a context read of it still returns the implementing procedure; after it moves to in_review, it returns the reviewing procedure and not the implementing one
  • A skill a user links to a project is returned with every task of that project, with no change to seeded data
  • A user's edit to a seeded skill or query survives a restart, and the reset command restores it (ADR-072)
  • A user's change to task's seeded context paths survives a restart, and a later shipped change to them is put to the user as pending with the shipped paths beside theirs, never applied over their edit (ADR-094 §8, ADR-072)
  • The built-in agent, asked to write a spec, creates it as draft with checkbox criteria and does not approve it; a routing or golden test covers it
  • A coding agent given only the skill file, asked to write a spec and then to implement a ready task, fetches the matching skill before its first write and follows it; the live skill-fetch test covers both
  • Prompt and routing goldens regenerated with UPDATE_GOLDEN=1 and the diff reviewed
  • Docs updated as listed under Documentation
  • Code passes bun run quality:fix
  • Tests pass (bun run test:changed)

Technical Specifications

Reference Files

  • packages/agent/src/skill_pipeline.rs - SKILL_SEEDS, SkillSeed, seed_skill_nodes
  • packages/agent/src/seeds/skills/*.md - built-in skill bodies; packages/agent/src/seeds/rules/{agent,skill-md}/ - the two-form rules
  • packages/agent/src/skill_rules.rs - rule kinds and resolve_includes
  • packages/core/src/ops/skill_ops.rs - find_skills, applies_to handling
  • packages/agent/tests/it/live_skill_guidance_fetch.rs, packages/agent/tests/it/seed_tables.rs - live fetch test and seed-table tests
  • packages/core/src/services/node_service/mod.rs - seed_nodes_from_templates, the reconciliation every seed goes through
  • packages/core/src/services/ (QueryDefinition) - the saved query shape

Implementation Details

  • The bodies of the removed spec-driven skills are the starting text for skills 1, 2 and 5; rewrite them for checkbox criteria and for evidence under each item.
  • The "ready tasks" and "task context" steps name operations that are added separately; write those steps as rules so the command is filled in when the operations exist.
  • Skill descriptions compete in one embedding space. Add an exclusion only where a measured mis-route shows one is needed.
  • Seeded nodes use fixed literal UUIDs. Seed changes need a database reset, not a backfill.
  • Context paths are the first seeded aspect of a core schema. Core schemas do not go through seed_nodes_from_templates: seed_core_schemas_if_needed creates a missing schema and never rewrites an existing one, so there is no shipped-version fingerprint or modified flag for a schema's context paths, and nothing records a shipped change as pending. Give that one aspect the per-aspect treatment the other seeds have (a shipped fingerprint, a modified flag set when update_schema changes the paths, a pending record when the shipped paths differ from an edited set). The rest of a core schema stays as it is.
  • Seed the paths in core_schemas.rs (SchemaNode.context_paths). Each must resolve from task through the seeded schemas; a test resolves every seeded path with resolve_path.

Dependencies

Related Issues

Non-Goals

  • The permitted filter; "Ready tasks" states its conditions until it exists
  • Changing how skills are matched or delivered

Activity

  1. changed the title [-]Seed the spec, plan, task and decision procedures as built-in skills, plus a skill-authoring skill and the status queries[/-] [+]Seed the spec, plan, task, review and decision procedures as built-in skills, the work queues they guide, and a skill-authoring skill[/+] on Oct 4, 2026
  2. changed the title [-]Seed the spec, plan, task, review and decision procedures as built-in skills, the work queues they guide, and a skill-authoring skill[/-] [+]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[/+] on Oct 4, 2026
  3. malibio commented on Oct 5, 2026

    @malibio
    CollaboratorAuthor

    Carried over from #3542: the Stage-1 router now recognises spec, plan and decision as core type words (stage1_core_type_words in packages/agent/src/local_agent/agent_loop.rs). A prompt that uses one in its everyday sense can now resolve to the core type ahead of a user's own type: the updated unit test shows "show the Release Plans" yielding core plan before the user's release_plan. #3542 did not run the live tests or evals, so the effect on routing is unmeasured. When this issue runs the evals for the seeded procedures, include prompts that say "plan", "spec" and "decision" without meaning the core types (for example "what's the plan for Friday?", "show the Release Plans"), measured against main before any wording changes.

  4. malibio commented on Oct 5, 2026

    @malibio
    CollaboratorAuthor

    Baseline — Frontend: 322 test files passed, 5875 tests passed

  5. self-assigned this
    on Oct 5, 2026
  6. malibio commented on Oct 5, 2026

    @malibio
    CollaboratorAuthor

    Note from #3559 (PR #3644): the permitted query filter now exists, so the seeded "Ready tasks" query should not restate the blocker or plan conditions. Seed it as: status equals open, at least one checkbox child, and {"type":"permitted","operator":"equals","property":"status","value":"in_progress"}, sorted by priority then created_at. ADR-092 §7 and ADR-094 describe it this way. packages/core/tests/it/permitted_filter_test.rs already pins that shape against the gate Plays.

  7. malibio commented on Oct 5, 2026

    @malibio
    CollaboratorAuthor

    WIP handoff: e8c265e (branch issue-3543-seed-workflow-skills, worktree .claude/worktrees/issue-3543-seed-workflow-skills). Seeded and tested: the six saved queries, the eight procedure skills with their applies_to and attached_to links, task's context paths as a third seed aspect, and both procedures driven through the agent's tools with the gate Plays live. The confusion matrix passes on the live model. Blocked: 12 live routing guards fail on 11 requests the new skills take from existing ones, which wording could not fix; decided to change matching so queue-delivered procedure skills do not compete for the built-in agent's three routed slots, design to be settled first. Also remaining: prompt goldens, the draft-spec agent test, docs, test:changed, quality:fix, PR and review. The commit message has the full state and the measurements.

  8. malibio commented on Oct 5, 2026

    @malibio
    CollaboratorAuthor

    The handoff commit to read is 090d8f2 (090d8f286), which supersedes e8c265e: same state, with the decisions made, the benchmark and fixture expectations changed, the 11 guard requests by name, and the subagent-built context-paths slice added to the message.

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