Repository navigation
Description
Summary
NodeSpace exposes its knowledge-graph capabilities through two agent surfaces that must stay at feature and guidance parity:
- Internal / local-agent harness — the in-app LLM, orchestrated via
search_skills, calling the 14 daemon tools (create_schema,execute_query,update_task_status,create_relationship, …). Guidance lives in the seeded skill nodes (packages/agent/src/skill_pipeline.rs::seed_skill_nodes()). - External harness via
SKILL.md— any AI provider that supports a skills companion (Claude Code, Codex, Gemini CLI, OpenCode) drives NodeSpace through thenodespaceCLI. Guidance lives inpackages/skill/SKILL.md.
The intent: a user can bypass the NodeSpace GUI entirely and use their own AI provider's harness, and get the same capability. If they instead use the in-app PTY chat interface, that path is also set up to consume SKILL.md. So SKILL.md + the CLI is not a lesser "shell-only" surface — it is a first-class peer of the local agent, and eventually the single companion both paths share.
Direction of refinement (canonical source → derived companion)
The seed nodes are the canonical, actively-refined source of guidance. They are tuned against the least capable consumer — the small local model — which needs heavy scaffolding to behave (⚡ IMMEDIATE ACTION REQUIRED, "do NOT output any text", "call X NOW", rigid stop/success semantics). As that guidance is refined to wrangle the local model, SKILL.md must inherit the same substance, because a more capable SOTA model (Claude, GPT, …) will follow the refined instructions easily — and often needs less of the coercive scaffolding while benefiting from the same rules (schema constraints, title_template semantics, enum conventions, find-then-edit).
This is one-directional: seed nodes lead, SKILL.md follows. SKILL.md is a derived, translated artifact — same substance, CLI vocabulary instead of tool-call vocabulary, and optionally softened scaffolding for stronger models. The maintenance obligation is propagation: every refinement to a seed skill triggers a corresponding SKILL.md update. SKILL.md must never be behind the seed nodes on substance.
Today they are not aligned, on two axes:
- Capability gap — the CLI is missing verbs for several tools the local agent has, so an external harness structurally cannot perform schema creation, structured property queries, task-status changes, or typed relationships.
- Guidance gap —
SKILL.mdwas partly written in daemon-tool vocabulary (execute_query,search_semantic) that the CLI can't invoke, and omits the hard-won instruction the seed nodes carry (when to usetitle_template, enum conventions, find-then-edit, one-schema-per-request, etc.).
Capability parity matrix (source of truth)
Local-agent tools: packages/agent/src/local_agent/tools.rs (Tool::ALL, 14 tools).
CLI commands: packages/cli/src/commands/.
| Local-agent tool | CLI command today | Status |
|---|---|---|
search_semantic |
nodespace search |
✅ partial (no collection/scope/graph_boost/property_filters params) |
search_nodes |
nodespace node query / search "" --type |
✅ |
get_node |
nodespace node get |
✅ |
create_node |
nodespace node create |
✅ |
update_node |
nodespace node update |
|
delete_node |
nodespace node delete |
✅ |
create_nodes_from_markdown |
nodespace import file/dir |
✅ |
execute_query |
— | ❌ missing (structured property filters/operators) |
create_schema |
— | ❌ missing (needs create_schema_node_atomic DDL path) |
update_schema |
— | ❌ missing |
update_task_status |
— | ❌ missing |
create_relationship |
mention create only |
❌ missing (mentions ≠ typed relationships) |
get_related_nodes |
— | ❌ missing |
search_skills |
— | ⏭️ intentionally out of scope for now. Skills are delivered as SKILL.md (loaded up front), not discovered at runtime. Runtime skill discovery over the CLI is interesting for the future — when users add skills to a shared library that auto-propagates, other harnesses could query it — but we defer it until the concept is refined based on user feedback. Do not add a CLI verb for it in this issue. |
Scope
1. Close the CLI capability gap
Add CLI verbs so an external harness can do everything the local agent can:
-
nodespace schema create/nodespace schema update— routed through the daemon'screate_schema/update_schemapath (the atomic schema-node + relationship-DDL flow, not a rawnode create --type schema). Coordinate with Delete the dead SurrealDB DDL generator (SchemaTableManager) #1496 (SchemaTableManager DDL removal) so we build on the surviving path. -
nodespace query— exposeexecute_query(structured property filters + operatorsequals/contains/gt/lt/gte/lte/in/exists, sorting). -
nodespace node update— extend to set properties, not just content. - task-status verb — e.g.
nodespace node set-status <id> <status>mapping toupdate_task_status. - typed relationships —
nodespace relationship create/getmapping tocreate_relationship/get_related_nodes(distinct frommention). - Decide
search_semanticparam parity (collection/scope/graph_boost/property_filters) — add flags or document the CLI subset explicitly.
2. Align the guidance (single source, two vocabularies)
The instructional content must be the same across both surfaces; only the invocation vocabulary differs (daemon tool call vs. CLI verb). This includes, verbatim in intent:
- Schema creation: one schema per request; don't invent related types;
targetTypemust already exist or omit the relationship. title_template: when to set it (identity comes from fields, not free-form content); every{placeholder}must be a defined field; the{name}placeholder ⇒ define anamefield.- Fields: only type-specific fields; no
name/titlefield (except thetitle_templateexception); enums use lowercase values + readable labels ({"value":"in_progress","label":"In Progress"}). - Find-then-edit / find-then-delete; ambiguity → one clarifying question, not a retry.
- Task status via the dedicated verb, not a generic content update.
- Success semantics: confirm and stop; don't re-fetch to verify.
Tasks:
- Rewrite
SKILL.md's "Tool Decision Guide" in CLI verbs (removeexecute_query/search_semanticdaemon-tool naming that the CLI can't invoke). - Port the seed-node guidance (schema creation, title_template, enums, relationships, find-then-edit) into
SKILL.mdagainst the new CLI verbs.
3. Make propagation durable (seed nodes → SKILL.md)
Because the seed library will be continuously refined (primarily to coerce the small local model), SKILL.md will fall behind unless propagation is a deliberate, catchable step. This is not a symmetric mirror and probably not a single shared prose file — the two differ in vocabulary (tool call vs. CLI verb) and scaffolding level (heavy for the local model, lighter for SOTA). Options to evaluate:
- A staleness/parity check (test or CI script) that fails when the seed guidance changes without a corresponding
SKILL.mdupdate — e.g. hash/marker per skill section, or a manifest mapping each seed skill to itsSKILL.mdsection. - Or a generation step:
SKILL.md(or its per-skill sections) generated/assembled from the seed nodes + a CLI-vocabulary translation layer, so refinement propagates by regeneration rather than manual copy. - A documented "edit a seed skill → update SKILL.md" checklist item in the contributor workflow as the minimum bar until the above lands.
4. Wire the in-app PTY chat to SKILL.md
- Wire the in-app PTY chat path to consume
SKILL.md(per the product intent that GUI PTY chat uses the same companion).
Verification / acceptance
- An external harness (e.g. Claude Code with
SKILL.mdinstalled, daemon running, GUI closed) can, end-to-end via CLI only: create a schema with atitle_template+ enum, create an instance, run a structured property query, change a task's status, and create a typed relationship — with no daemon-tool-only step. -
SKILL.mdguidance for those operations matches the seed-node guidance in substance (vocabulary/scaffolding may differ; rules must not). - Propagation is durable: a change to a seed skill's guidance either regenerates
SKILL.mdor fails a check untilSKILL.mdis updated — a silent seed-only refinement can no longer leaveSKILL.mdstale.
References
- Local-agent tools:
packages/agent/src/local_agent/tools.rs - Seed skill nodes (guidance source):
packages/agent/src/skill_pipeline.rs - CLI:
packages/cli/src/commands/ - Companion:
packages/skill/SKILL.md - Schema-creation path:
NodeService→create_schema_node_atomic(packages/core/src/services/node_service/mod.rs) - Related: Delete the dead SurrealDB DDL generator (SchemaTableManager) #1496 (SchemaTableManager DDL removal), AI-Chat model selector never offers the PTY (agent-CLI) option, leaving provider:'pty' unreachable #1489 (PTY provider reachability)
Activity
malibio commentedon Jul 5, 2026
Third propagation gap: refreshing the seed skill library in existing databases
While reconciling the docs, surfaced a related propagation gap in the same family as the CLI/
SKILL.mdparity work:Startup seeding is create-if-absent by node type.
seed_nodes_from_templates()(packages/core/src/services/node_service/mod.rs) skips the wholeskill/prompt/tooltype if any node of that type already exists. So refinedseed_skill_nodes()guidance shipped in an app update never reaches an existing user's database — only a fresh DB picks it up. The internal local agent readsskillnodes from the DB, not the Rust source, so the improvement ships in the binary but doesn't reach the graph.Decision: explicit user-initiated refresh (not silent auto-update)
We will add a "reset / refresh skill library" mechanism that overwrites the seed-managed nodes (prompts, skills + guidance subtrees, tools) in the database with the current source templates.
user-creatednodes rather than editing built-ins.SKILL.mdfor the external/CLI surface (scope stream 3).Added task (scope stream 3 — propagation)
SKILL.mdpropagation obligation — both are how a refined seed library reaches its consumers.Docs updated:
nodespace-docs/architecture/prompt-skill-system.md→ "Seed Data" → "Refreshing the skill library".malibio commentedon Jul 11, 2026
Frontend baseline: 159 test files passed, 4031 tests passed. Starting phased work — Phase 1: CLI capability gap (schema create/update, query, node update --property, set-status, relationship create/get).
WIP: #1529 Phase 2 — guidance alignment (SKILL.md rewritten against C…
WIP: #1529 Phase 2 — complete, reviewed, addressed; ready for Section 3
WIP: #1529 Section 3 — propagation tooling, ready for review
Address review: fix gen_skill_md drift-detection gap, restore verb de…
WIP: #1529 Section 3 — done, reviewed, addressed; ready for Section 4
Wire PTY chat to SKILL.md (closes #1529 Section 4)
Align CLI + SKILL.md with local-agent capability and guidance (#1529)…