Skip to content

Align CLI + SKILL.md with local-agent capability and guidance (external-harness parity) #1529

Closed

Description

@malibio

Summary

NodeSpace exposes its knowledge-graph capabilities through two agent surfaces that must stay at feature and guidance parity:

  1. 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()).
  2. External harness via SKILL.md — any AI provider that supports a skills companion (Claude Code, Codex, Gemini CLI, OpenCode) drives NodeSpace through the nodespace CLI. Guidance lives in packages/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.md was 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 use title_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 ⚠️ content-only — no property updates
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's create_schema / update_schema path (the atomic schema-node + relationship-DDL flow, not a raw node 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 — expose execute_query (structured property filters + operators equals/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 to update_task_status.
  • typed relationships — nodespace relationship create/get mapping to create_relationship / get_related_nodes (distinct from mention).
  • Decide search_semantic param 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; targetType must 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 a name field.
  • Fields: only type-specific fields; no name/title field (except the title_template exception); 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 (remove execute_query/search_semantic daemon-tool naming that the CLI can't invoke).
  • Port the seed-node guidance (schema creation, title_template, enums, relationships, find-then-edit) into SKILL.md against 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.md update — e.g. hash/marker per skill section, or a manifest mapping each seed skill to its SKILL.md section.
  • 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.md installed, daemon running, GUI closed) can, end-to-end via CLI only: create a schema with a title_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.md guidance 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.md or fails a check until SKILL.md is updated — a silent seed-only refinement can no longer leave SKILL.md stale.

References

Activity

  1. malibio commented on Jul 5, 2026

    @malibio
    CollaboratorAuthor

    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.md parity work:

    Startup seeding is create-if-absent by node type. seed_nodes_from_templates() (packages/core/src/services/node_service/mod.rs) skips the whole skill/prompt/tool type if any node of that type already exists. So refined seed_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 reads skill nodes 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.

    • Startup seeding stays create-if-absent (never silently clobbers a user's graph).
    • Refresh is explicit and overwrites — the understood tradeoff is that in-place edits to built-in skills are discarded. Users wanting durable customization should add their own user-created nodes rather than editing built-ins.
    • The in-DB refresh covers only the internal local-agent path. Refined guidance must still be propagated to SKILL.md for the external/CLI surface (scope stream 3).

    Added task (scope stream 3 — propagation)

    • Add an explicit "refresh skill library" operation that overwrites the seed-managed nodes (prompt/skill/tool) in the database from the current source templates. Surface the overwrite tradeoff to users. This is the internal-DB counterpart to the SKILL.md propagation 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".

  2. malibio commented on Jul 11, 2026

    @malibio
    CollaboratorAuthor

    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).

  3. self-assigned this
    on Jul 11, 2026
  4. added 6 commits that reference this issue on Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions