Skip to content

D4b: Rewrite SKILL.md as a teacher — lead with the domain/mental model (edges, schema types, date anchors) #1269

Closed

Description

@malibio

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.md around 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:

  1. What NodeSpace is — local-first knowledge graph; typed nodes (note/task/date/custom); relationships are first-class edges.
  2. The mental model — parent/child via edges + fractional ordering; date nodes anchor daily context; content is markdown.
  3. 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.
  4. 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:

  1. 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/date are 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.
  2. 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.)
  3. 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.
  4. 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

Testing

  • This is a docs file; no automated test. Validation: bun run --cwd packages/skill build still succeeds (SKILL.md is bundled by the installer) and the skill still installs (bun run test for 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

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

  1. added
    documentation
    on May 30, 2026
  2. malibio commented on May 30, 2026

    @malibio
    CollaboratorAuthor

    Frontend baseline: 133 test files passed (3866 tests)

  3. self-assigned this
    on May 30, 2026
  4. added a commit that references this issue on Jun 22, 2026
    8d53dbe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

backenddocumentation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions