Repository navigation
Description
Spun off from architectural-audit tracking issue #1228, finding D4 — the teaching-quality half (the stale-DB-claims half was already fixed in D4/#1232). This is D4b: rewrite
packages/skill/SKILL.mdaround the "teacher, not wrapper" principle.
Background — the teacher principle (from #1228 §D0)
#1228's D0 section sets the guiding principle: the skill is a teacher, not a wrapper. An LLM arrives knowing nothing about NodeSpace — what a node is, that hierarchy is edges (not nesting), that node types are schema-defined, that there's a daemon, or when it should reach for this tool at all. MCP gives a flat list of tool signatures with no worldview; a skill must impart the domain model and usage judgment first, then the mechanism.
Per D0, a good SKILL.md must convey, in order:
- What NodeSpace is — local-first knowledge graph; typed nodes (note/task/date/custom); relationships are first-class edges.
- The mental model — parent/child via edges + fractional ordering; date nodes anchor daily context; content is markdown.
- When to use it — "search for prior context at session start"; "save findings as you go"; "this persists across sessions" — the judgment the model has no prior for.
- How — the CLI commands as the mechanism.
Related context: ADR-030: Prompt & Skill Node Architecture (Proposed) — establishes that skills wrap tools with rich guidance because thin JSON-schema descriptions give a model insufficient context for reliable use. That's the internal-agent analog of the same principle this issue applies to the published SKILL.md.
Verified current state — partly there, mental-model gap is the hole
packages/skill/SKILL.md today (post-D4/#1232) is decent on D0 #1, #3, #4 — it has a one-line "what it is," a "When to Use NodeSpace" section, a preflight/health section (#1229), and a complete CLI reference. The stale SurrealDB/RocksDB claims are gone.
What's missing is D0 #2 — the mental model. Verified gaps:
- Hierarchy is described only as "parent-child relationships" /
--parent <id>(SKILL.md:31, 47, 54). It does not teach that hierarchy is first-class edges with fractional ordering — so a model has no concept of sibling order, reordering, or that a node can be moved without recreating it. - Node types:
--type text|task|date|any schema-defined type(line 52) is mentioned but not explained — the model isn't taught that types are schema-defined and extensible, or what each built-in type is for (date nodes as daily anchors, tasks as structured-status items). - Date nodes anchoring daily context — absent. A model won't know to attach a finding to "today" or that date nodes are the temporal spine.
- The "when" guidance exists but is generic bullets; D0 wants session-judgment framing ("search at session start," "save as you go," "persists across sessions").
The task
Rewrite packages/skill/SKILL.md to lead with the domain model, following the D0 order. Concretely add/strengthen:
- Mental model section (the main gap) — a concise "How NodeSpace thinks" block:
- Hierarchy = first-class edges (a node has one parent edge; children are ordered via fractional ordering). Moving/reordering is an edge operation, not a recreate.
- Node types are schema-defined —
text/task/dateare built-ins; custom types come from schemas. Briefly, what each built-in is for. - Date nodes anchor daily context — the temporal spine; attach time-relevant findings under the relevant date.
- Content is markdown.
- Sharpen the "when" into session judgment — frame as the workflow a model should adopt: search for prior context at session start → save findings as you go → it persists across sessions. (Keep it tight; this is judgment, not a tutorial.)
- Keep the preflight/health section (Skill preflight: agent must detect whether the nodespace CLI is installed and the daemon is healthy #1229), the CLI reference, and the output-format docs — those are good. Do NOT regress them.
- Keep it concise — a teacher, not a manual. The mental model is a handful of sentences, not pages. The CLI reference stays the bulk.
Acceptance criteria
- SKILL.md has a clear "mental model / how NodeSpace thinks" section covering: edges + fractional ordering (hierarchy), schema-defined node types (with built-in purposes), date nodes as daily anchors, markdown content.
- The "when to use" guidance is framed as session judgment (search-at-start / save-as-you-go / persists-across-sessions), not just feature bullets.
- Preflight (Skill preflight: agent must detect whether the nodespace CLI is installed and the daemon is healthy #1229), CLI reference, and output-format sections are preserved (no regression).
- No stale/incorrect claims (no DB-engine assertions an agent could persist as fact; the D4/CLI coverage gap: surface remaining knowledge-graph operations so skills+scripts can replace MCP #1232 cleanup stays intact).
- The doc reads as a teacher (domain model first, mechanism second) per Architectural audit (post-daemon + post-SQLite): structural findings & improvement plan #1228 §D0, and stays concise.
Testing
- This is a docs file; no automated test. Validation:
bun run --cwd packages/skill buildstill succeeds (SKILL.md is bundled by the installer) and the skill still installs (bun run testfor the skill package passes, no broken references). - Manual read-through against the D0 four-point checklist (what / mental model / when / how, in order).
- If the skill package has a test that snapshots or validates SKILL.md content, update it.
Coordination
- Interacts with D5 (D5: Decommission MCP — delete packages/mcp + agent-tools, shims shell the CLI, write ADR-035 #1265) — D5 deletes
packages/mcp/agent-toolsand rewrites the skill shims to shell the CLI. D4b rewrites SKILL.md prose. Different parts ofpackages/skill, but both touch that package — land D5 first or coordinate, since D5 may adjust how the skill is described/installed. Recommend D4b after D5 so the SKILL.md describes the final (CLI-only, no-MCP) world. - Builds on D3/CLI coverage gap: surface remaining knowledge-graph operations so skills+scripts can replace MCP #1227 (CLI coverage) and Skill preflight: agent must detect whether the nodespace CLI is installed and the daemon is healthy #1229 (preflight) — both merged; the CLI commands SKILL.md teaches all exist.
Standard NodeSpace startup / PR sequence
EnterWorktree({name: "issue-<N>-d4b-skill-teacher-rewrite"}), bun install, baseline, gh:*. Before PR: bun run test:all (no new failures), bun run quality:fix + commit, bun run gh:pr <N>, /pragmatic-code-review, then ExitWorktree + gh pr merge --squash --delete-branch.
Spun off from #1228 (architectural audit), finding D4 (D4b — teaching-quality rewrite of SKILL.md).
Activity
malibio commentedon May 30, 2026
Frontend baseline: 133 test files passed (3866 tests)
D4b: Rewrite SKILL.md as a teacher — lead with the domain/mental mode…