Repository navigation
Closed
Labels
Description
Overview
Under ADR-094 a team says which instructions apply to which work by linking skills to nodes: a procedure to the queue it is for, standards to a project. This issue adds that link, a read that returns a node together with the nodes a set of relationship paths reach, and returns the skills attached to a node with it. It is the smallest slice that proves a workflow can be defined as data, and it is proved twice: on tasks, and on a workflow over user-defined types.
Problem Statement
- A skill can be linked only to a type.
applies_topoints at a schema and tells the built-in agent which types a skill's operations concern. There is no way to say "hand this skill over when working on this project" or "this is the procedure for this queue". - No read returns a node with its related nodes. The CLI can get one node, its children, or the nodes for one relationship name. An agent that needs a task with its spec, plan and project makes several calls and has to know which.
- A named relationship per aspect does not scale. Each new aspect (naming conventions, a test strategy) or kind of work (a review queue with its own procedure) would be a schema change.
Proposed Solution
attached_to:skilldeclares one relationship,attached_to, to a node of any type, with reverseattached_skills. It is separate fromapplies_to.- Read with paths: a node read accepts relationship paths to follow and returns the node with the nodes they reach.
- Skills with a node: the read returns the skills attached to the node and the skills attached to each node the given paths reach, each with its full instructions.
- Skills with a query run: running a saved query returns the skills attached to that query node.
The link delivers a skill and does not scope it: every skill stays discoverable through the skill list and match.
Documentation
- ADR-094 §2 (read with paths) and §3 (a skill can be linked to any node); Consequences - "the first slice is proved twice"; Build order step 2
- ADR-093 §2 and §3 - a skill can be attached to a node; what an agent receives with an item
- ADR-064 §3 and §5 - a skill's description says when it applies; how a skill is rendered for a coding agent
- ADR-070 and Relationship paths - relationship declarations and paths
- Node type sequence - mandatory for the new relationship on
skill - Updates:
components/node-types.md(theskillsheet),components/seeded-nodes.mdandarchitecture/prompt-skill-system.md(theattached_tolink besideapplies_to),packages/skill/references/cli.mdandSKILL.md
Architecture Impact
Implements ADR-094 §2 (read with paths) and §3. applies_to and the built-in agent's routing are unchanged.
Acceptance Criteria
-
skilldeclaresattached_towith no fixed target type and reverseattached_skills, added through the node type sequence; a link from a skill to a project, a saved query, a task and a user-defined type's node are all accepted -
applies_tobehaves as before: the built-in agent's skill search,schema_metadataand routed-turn type holding show no change, and prompt and routing goldens show no diff - A node read accepts one or more relationship paths (declared names, reverse names and
has_child, as aRelationshipPath) and returns the node with the nodes each path reaches, grouped by path; an unknown path is refused with a message naming it - The read returns the skills attached to the node and the skills attached to each node the paths reached; each skill comes with its instructions, referenced schemas and tool commands, as a skill fetch returns it, inside the provenance marking
- A skill attached to several returned nodes appears once, with the nodes it is attached to
- A skill can be detached from a node: the CLI can delete an
attached_tolink (it has no relationship delete today, though the daemon has the RPC), the built-in agent can do the same, and the next read of that node no longer returns the skill - Running a saved query returns the skills attached to that query node, once, beside the result nodes
- Archived skills and archived nodes are not returned
- The read and its output contain no reference to any node type by name
- Proof on tasks: a fixture with a project with a standards skill attached and a saved query with a procedure skill attached; running the query returns the procedure; reading a task with the path to its project returns the standards
- Proof on a user-defined workflow: the same test with types created through
create_schema(for example arequestand adesk), a saved query over them and skills attached to the query and the related node, using the same commands with no code change - The built-in agent can read a node with paths, through a tool that is in the tool registry with its CLI command
-
references/cli.mdandSKILL.mddocument linking a skill withattached_to, reading with paths and the skills returned, andbun run skill:checkpasses - Docs updated as listed under Documentation
- Code passes
bun run quality:fix - Tests pass (
bun run test:changed)
Technical Specifications
Reference Files
packages/core/src/models/core_schemas.rs- theskillschema and itsapplies_todeclarationpackages/nodespace-types/src/schema.rs-SchemaRelationship(target_typeis optional),packages/nodespace-types/src/relationship_path.rs-RelationshipPathpackages/core/src/services/node_service/relationship.rs- relationship creation and validationpackages/core/src/ops/skill_ops.rs- rendering a skill with its schemas (render_skill_instructions), the external fetchpackages/core/src/ops/rel_ops.rs-GetNodeRelationships, which returns related nodes as previews todaypackages/core/src/db/sqlite_store/relationship_paths.rs- resolving a path in SQLpackages/cli/src/commands/node.rs,packages/cli/src/commands/relationship.rs,packages/cli/src/commands/query.rspackages/proto/proto/node_service.proto,packages/daemon/src/services/node_service.rs
Implementation Details
- A related node is returned with its fields and its direct checkbox children, not its whole subtree. A skill is returned with its full instructions.
- Render a skill for its reader the way the skill fetch does, so a coding agent gets CLI forms.
- A path walk in SQL uses a correlated subquery, not a JOIN in a recursive CTE.
- Whether read-with-paths is a flag on
node getor its own subcommand is the implementer's choice; document it incli.md.
Dependencies
- Give each built-in tool its CLI command and return it with fetched skills; fetch one skill by name; version the skill list #3540 (tool commands returned with a fetched skill; fetching a skill by id)
- Run a saved query by id or title, narrow it at run time, negate filters, and filter into link and object values #3554 (running a saved query, whose result carries the skills attached to the query)
Related Issues
- Audit skill retrieval text: rename description/exclusion to use_for/not_for, tighten what each skill is for, and add measured not_for entries #3522 (renames the skill fields shown in output)
- Let the CLI move a node #3569 (adds node move to the CLI and notes the missing relationship delete)
Non-Goals
- Context paths declared on a schema, and skills derived from the saved queries a node matches
- A version on the read
- Seeding any link, queue or skill
Activity
[-]Let a skill guide any node, read a node with what its paths reach, and return guiding skills with a node and a query run[/-][+]Let a skill be attached to any node, read a node with what its paths reach, and return attached skills with a node and a query run[/+]malibio commentedon Oct 5, 2026
Baseline — Frontend: 318 test files passed (5770 tests)
Address review: honest delete result, tag line first, node cap, path …
Address re-review: always open with the attached-skills line; sanitis…
Attach a skill to any node; read a node with what its paths reach; re…
WIP: Workflow skills, queues and task context paths are seeded; routi…
WIP: Workflow skills, queues and task context paths are seeded; routi…