Repository navigation
D4b: Rewrite SKILL.md as a teacher — lead with the domain/mental model (edges, schema types, date anchors) - #1271
Conversation
…on judgment (closes #1269) Add "How NodeSpace Thinks" section covering edges + fractional ordering, schema-defined node types with built-in purposes, and date nodes as the temporal spine. Reframe "When to Use" as session-judgment workflow (search-at-start / save-as-you-go / persists-across- sessions). Preserve preflight, CLI reference, and output-format sections intact. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Code Review SummaryThis PR rewrites `packages/skill/SKILL.md` to satisfy the D4b "teacher, not wrapper" requirement from issue #1269. The structural intent is sound and represents a genuine improvement: the rewrite successfully leads with the domain model (mental model section before mechanism sections), explicitly names the four D0 pillars, and replaces the old feature-bullet "When to Use" with actionable session-judgment framing. All preserved sections (preflight, CLI reference, output format) are intact and untouched. Tests pass, the skill package builds cleanly, and the stale DB/transport claims from the original are correctly removed. One correctness defect was identified in the new worked example that will cause the documented workflow to silently fail at runtime. Findings[Improvement] `packages/skill/SKILL.md` Lines 234–235 — `--title-contains` on date nodes always returns empty resultsThe new "Attach a finding to today's date node" example documents: ```bash This command cannot return results. Two independently verifiable reasons:
Additionally, `--type date` and `--title-contains` cannot be combined even if titles existed: the `content_contains` and `title_contains` filter paths are separate early-return branches (lines 810–843) that do not compose with `node_type`. The `node_type` filter only applies when neither early-return branch fires. The correct pattern leverages the fact that date nodes use their date string as the node ID (`crud.rs` line 351–352: `else if params.node_type == "date" { params.content.clone() }`): ```bash The date string IS the node ID — get it directlynodespace node get "2026-05-30" Returns the node (or a "not found" error if it doesn't exist yet)``` The `--parent` flag accepts the date string directly; the daemon will auto-create the date container via `ensure_date_exists` if absent. So the entire lookup-then-attach pattern collapses to a single command: ```bash Attach a finding — date node is auto-created if it doesn't existnodespace node create --type text --content "Discovered: rate limiter uses fixed windows" --parent "2026-05-30" This bug makes the documented workflow non-functional for any agent following the SKILL.md example, which is the primary audience of this document. [Improvement] `packages/skill/SKILL.md` Lines 230–242 — Date node example section, secondaryThe comment `# → use the returned id as parent for today's findings` is slightly misleading because the "returned id" from `node create --type date` is the date string itself (content = ID for date nodes). Stating this identity explicitly would help agents understand why `--parent "2026-05-30"` works without a separate lookup step and builds correctly on the mental model section. Coordination Note (Informational)Issue #1265 (D5, PR #1270) — which rewrites the skill shims to shell the CLI — is currently open and not yet merged. The issue text recommends landing D5 before D4b. This PR's SKILL.md rewrite is pure prose with no shim-level references, so the content is unlikely to conflict materially; noting it here in case D5 needs to update the "Preflight" or "Prerequisites" sections when it lands. Nits
VerdictThe `--title-contains` date-node example is a correctness defect that will cause the documented workflow to silently produce empty results. The fix is a targeted rewrite of that one example block: replace the `query --title-contains` lookup with a direct `nodespace node get "YYYY-MM-DD"` and collapse the attach step to a single `node create --parent "YYYY-MM-DD"`. All other acceptance criteria from #1269 are satisfied. Fix the example and this PR is ready to merge. |
… query Replace the broken `node query --type date --title-contains` lookup with a direct `--parent "YYYY-MM-DD"` call. Date nodes have NULL titles by design (excluded from compute_title) so the title filter always returns empty; the daemon's ensure_date_exists auto-creates the node on first use. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…l (edges, schema types, date anchors) (#1271) * D4b: Rewrite SKILL.md as a teacher — lead with domain model and session judgment (closes #1269) Add "How NodeSpace Thinks" section covering edges + fractional ordering, schema-defined node types with built-in purposes, and date nodes as the temporal spine. Reframe "When to Use" as session-judgment workflow (search-at-start / save-as-you-go / persists-across- sessions). Preserve preflight, CLI reference, and output-format sections intact. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix(skill): correct date-node attachment example — use direct ID, not query Replace the broken `node query --type date --title-contains` lookup with a direct `--parent "YYYY-MM-DD"` call. Date nodes have NULL titles by design (excluded from compute_title) so the title filter always returns empty; the daemon's ensure_date_exists auto-creates the node on first use. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> --------- Co-authored-by: Michael Libio <[email protected]> Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Closes #1269