Repository navigation
Attach a skill to any node; read a node with what its paths reach; return attached skills with a node and a query run (closes #3555) - #3596
Conversation
Pragmatic Code Review: PR #3596 (issue #3555)Review Type: INITIAL review, head SummaryThe change is a net improvement and follows the architecture. The read is type-agnostic, each hop reuses the existing path compiler (correlated-subquery form, participation filter), the skill rendering is shared with the fetch by name through Requirements Check
Findings🔴 CriticalNone. 🟡 Important1. Untrusted checkbox text is printed raw, ahead of the line that authenticates the provenance banners. 2. The read is unbounded in nodes, and costs one query per returned node. 3. Whether an unknown name is refused depends on the data, not the path.
4. 5. Agent-side attached skills are a different, unmarked shape, and the docs say otherwise. 🟢 Suggestions6. 📁 7. 📁 8. 📁 9. 📁 10. 📁 11. Nit: 📁 What was verified and how
Recommendation: COMMENTNo blocker, and the design is sound. Findings 1 to 4 are small, local fixes and should be addressed in this PR before merge; finding 5 is a one-sentence docs correction in the unpushed docs change. |
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: COMMENT (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
Address-review summary (commit a4b20ac)Addressed
Also added: Skipped
Verification: Re-Review DecisionDecision: RE-REVIEW NEEDED Rationale: the fixes change logic on four surfaces (delete result, output ordering, a new cap, the validation path) and add a proto field. |
Pragmatic Code Review: PR #3596 (issue #3555)Review Type: RE-REVIEW of commit Previous Review Summary
Status of the five Important findings
Finding 4 in detail.
Findings🔴 CriticalNone. 🟡 Important (non-blocking)R1. With no skill attached, no tag line is printed, so the "tag line first" guarantee does not cover that branch. R2. Node titles, content and properties are still printed unsanitised between the tag line and the banners. 🟢 SuggestionsR3. 📁 R4. 📁 R5. 📁 R6. Nit: 📁 R7. Nit: tests. No test pins exactly 50 nodes giving R8. Nit: 📁 Skipped items
Docs
Recommendation: APPROVEThe four logic fixes are correct as read, the flag and the bool are carried through every layer, and the docs match. R1 and R2 are small and worth folding in before merge, but neither blocks: R1 is detectable by the documented rule, and R2 affects terminal display only. |
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review (re-review): APPROVE (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
Address-review summary, round 2 (commit 46ea7c6)Addressed
Skipped
Verification: Re-Review DecisionDecision: NO RE-REVIEW NEEDED Rationale: the re-review approved. This round changes one printed line, adds sanitising to human-mode output, and tidies a signature and two comments; no logic on the read or write paths changed. |
…turn attached skills with a node and a query run (closes #3555)
9181487 to
9158aa6
Compare
Closes #3555. Implements ADR-094 §2 (read with paths) and §3 (a skill can be linked to any node), build-order step 2.
What changed
Node type change (node type sequence followed).
skillis a flat core type; its fields are unchanged. One relationship is added:skillattached_toattached_skillsNo field, structural rule, participation rule, wire type or generated TypeScript changed (
bun run gen:typesreports no diff).applies_tois untouched.Read with paths.
ops::node_context_ops::read_node_contextreads a node with the nodes eachRelationshipPathreaches, grouped by path, plus the skills attached to any node it returned.resolve_relationship_path), so it keeps the correlated-subquery form; archived nodes are neither reached nor walked through.Attached skills.
attached_skills(node_ids)returns each skill once with the returned nodes it is attached to, rendered the way a fetch by name renders it (instructions,applies_toschemas, tool commands).get_skill_guidancenow shares that rendering (skill_ops::fetch_skills). Archived skills are left out.Surfaces.
GetNodeContext;RunSavedQuerynow returnsRunSavedQueryResponse(nodes, count, attached skills, schemas).nodespace node context <id> [--path a.b ...](own subcommand, dotted paths,*for open-ended),nodespace relationship delete --from --type --to, andquery runprints the query's attached skills. Skills print inside the existing provenance banner / JSON envelope.get_node_contextanddelete_relationshipare in the tool registry with their CLI commands and seeded tool nodes;run_queryreturns the query's attached skills.get_node_contextis offered by Research & Search;delete_relationshipby Relationship Management and Organization.Worth a look
attached_totargets any node, so every node's relationship view now lists anattached_skillsgroup, empty until a skill is attached. That is the existing rule for a declared any-target relationship (pinned bytest_a_user_schemas_untyped_relationship_is_listed_when_empty), and it lets a skill be attached from the node's side. One existing test that counted all inbound groups on a node now filters to the relationship it is about.delete_relationshipis classified as an idempotent write that does not remove user data: it removes one link, leaves both records, and onecreate_relationshipputs it back.Tests
core/tests/it/skill_attached_to_test.rs: attach to a project, saved query, task and user-defined node; proof on tasks; proof on arequest/deskworkflow built withcreate_schema; path forms; unknown path; dedupe; detach; archived.agent/tests/it/node_context_tools.rs: both tools throughGraphToolExecutor::execute,run_queryskills, registry/seed/whitelist.cli/tests/it/cli_integration.rs: parse,node context,query run,relationship deleteover the real transport.bun run skill:checkpasses.Docs
Docs change (pushed to nodespace-docs
mainbefore merge):components/node-types.md(skill sheet),components/seeded-nodes.md(new "Skills attached to nodes"),components/typed-relationships.md,components/query-node.md,architecture/prompt-skill-system.md,architecture/relationship-paths.md. In this repo:packages/skill/references/cli.mdandSKILL.md.🤖 Generated with Claude Code