Repository navigation
Description
Four skill-documentation defects, all found by watching external agents with no prior NodeSpace knowledge work against a real install. Grouped because they edit the same two files and should ship as one pass.
Source of truth: packages/agent/src/skill_rules.rs (generates both the local-agent imperative form and references/cli.md) and packages/skill/SKILL.md. The published NodeSpaceAI/nodespace-skill repo is a generated target — a hand edit there is overwritten on the next release.
The common root: an agent's default is to invent a flat field for something the graph already models natively, and the skill does not claim that ground. In every case below the agent reasoned carefully, read the docs, and still produced the wrong shape — because the documentation's examples and errors taught a different model than its prose. Agents pattern-match on worked examples and on error messages far more strongly than on descriptive statements; a capability documented in prose but absent from every example is, in practice, undiscovered.
1. Person-shaped fields should be relationships
An agent designing an ADR schema modelled sign-off as deciders: array — a text array of names — rather than a relationship to person, which already existed as a schema and was unused. It only reconsidered when asked directly, then produced a correct decided_by → person relationship with sound reasoning:
A text[] array of names has no integrity. "M. Alibio", "m…" are three different deciders to a query engine. That gets worse over time, and there's no rename path — you'd rewrite every ADR.
The model can reach the right answer. It did not reach it unprompted.
The rule exists and does not fire. skill_rules.rs:117-121:
pub const RELATIONSHIP_VS_FIELD: SchemaRule = SchemaRule {
id: "relationship-vs-field",
imperative: "RELATIONSHIPS: Use relationships (not fields) when a field references another node type.",
prose: "**Relationships vs. fields:** use a relationship (not a field) when a value references another node type.",
};Two reasons it fails:
-
It presumes the recognition it needs to teach. "When a value references another node type" only helps once you have noticed that deciders IS a reference. A person's name does not look like a node reference — it looks like text, and
array of textis a natural encoding of "who signed off". Spotting that a human-sounding attribute is really an entity is the hard step, and the rule starts after it. -
It has no examples, unlike its neighbours.
TARGET_TYPE_MUST_EXISTandUNIQUE_FIELD_FLAGSboth carry concrete ones.UNIQUE_FIELD_FLAGSalso demonstrates the pattern that works — teaching recognition from the user's own words: "each ticket should have a unique key" → flagkeyunique. -
Teach the recognition step: a field naming a person, team, project or any other entity is a reference, even when it reads naturally as text
-
Concrete examples in the
UNIQUE_FIELD_FLAGSstyle, driven by user phrasing — "who signed off" →decided_by → person, "who it's assigned to" →assignee → person, "which project it affects" →affects_project → project -
Name the false friends explicitly:
deciders,assignee,owner,author,reviewer,reported_by,members -
Say why, briefly: a name string has no integrity, no reverse lookup, no rename path
-
State the escape hatch so the rule is not over-applied — free text is legitimate for one-off external parties who will never be nodes
-
Apply to the sibling
imperative(local-agent) form too, since both ship from one definition
2. Collections ARE the tagging and grouping mechanism
The same agent modelled topic areas as tags: array and did not consider collections until asked.
This is not a trade-off to present. NodeSpace has one mechanism for tagging and for structured grouping, and it is collections. A flat label (storage) and a nested path (docs:rust) are the same mechanism at different depths. An agent declaring a tags: array field is not choosing a lighter option — it is building a parallel, invisible reimplementation of a built-in system. Invisible literally: array values appear in no UI, while member_of is a native edge whose kind has "their own UI affordances" (references/cli.md:230).
Collections also carry a description, are renamed once instead of across every member, nest, and need no schema change to join.
The existing collection guidance is actively wrong. SKILL.md:244-249:
Use a relationship with
--type member_ofagainst the collection node. If the collection doesn't exist as a node yet, ask the user to create it first.
CollectionService::resolve_path (collection_service.rs:389) creates missing collections automatically, including every segment of a nested path. The skill tells the agent to interrupt the user for something the system does silently — the most expensive path and an unnecessary stop.
Collection paths are never explained. --collection <path> appears four times in references/cli.md (:179, :413, :439, :447) with examples like "docs:rust", and nothing says : denotes hierarchy, that missing segments auto-create, or that the node joins the leaf.
member_of's no-declaration status is documented far from where it is needed. cli.md:230 states it correctly, under relationships. An agent that had just been rejected for an undeclared targetType, then saw collection's empty relationships array, concluded membership needed a schema update first — a correct prose rule losing to a stronger inference from an error message.
- State that collections are the tagging and grouping mechanism — flat labels and hierarchical paths as one system, not two options
- Prefer a distinct rule in
skill_rules.rs(aGROUPING_IS_COLLECTIONSsibling) over a clause insideRELATIONSHIP_VS_FIELD, so each rule teaches one recognition - Name the false friends:
tags,categories,topics,labels,areas,groups - The escape hatch stays reachable — a user who asks for a plain tags field gets one without argument
- Fix
SKILL.md:244-249: stop telling the agent to have the user pre-create collections - Explain collection path syntax once, properly, rather than implying it through four flag descriptions
- State
member_of's no-declaration status where collections are discussed, not only under relationships - State that a node has one parent but many collections — membership and hierarchy are different axes, and the skill never says so
- Once
node create --collection <path>exists (tracked separately), make the one-call form the primary documented example
3. Documents should decompose into child nodes
An agent authored a ~40-line ADR — headings, prose, nested bullets — and stored the whole document as one node's content. The intended shape is a root node with ## Context, ## Decision, ## Consequences as children: NodeSpace is one-node-per-block with hierarchy as first-class edges. Nothing rejected it; the create succeeded and queries returned it.
Its own reconstruction, all verified:
-
Every
node createexample is a one-liner. Eight of them (SKILL.md:182,:194,:207,:211, …), all short single-line content. Nothing demonstrates a multi-block document, so the working template becomes "one node, one line" — and scaling up means making the line longer, not decomposing. -
"Content is markdown" reads as permission.
SKILL.md:24: "Store prose, code blocks, lists — whatever fits the note." That is about a single node's content being markdown-formatted, but nothing rules out the other reading. -
import fileis filed under "Bulk import from markdown" (SKILL.md:263), documented as "Top-level headings become root nodes, sub-headings become children" — exactly the decomposition wanted. The agent had already written the body to a markdown file andcat'd it into--contentinstead:The capability was documented, I'd read it, and I still didn't reach for it — because it's filed under "Bulk import from markdown", and I'd classified my task as "create one ADR," which didn't feel like bulk anything.
-
Nothing pushes back — no validation notices headings in content and asks whether children were meant.
-
Add a worked example of authoring a structured document: root plus one child per section
-
State the boundary as a one-line rule — "if it has headings, it is a tree, not a node"
-
Reframe
import fileas the normal path for any multi-section content, including a single document just authored, not only bulk/migration -
Revisit
SKILL.md:24's "whatever fits the note" — it is the sentence that licenses a document in one node -
Show the intended shape for document-like entities (ADR, spec, plan) in Common Agent Tasks, which agents use as a template menu
-
Cover both the
--contentand--params-filepaths, since a long body naturally arrives via a file
4. Property shape in --json output
Node properties are namespaced under the schema id on the wire (properties.task.status), while the skill's only properties example is {} (SKILL.md:304) and the --json shape is never described (references/cli.md:12 says only that the flag exists). An agent parsing --json wrote n['properties'].get('status'), got nothing, and nearly reported "1 task, status unknown" as a fact about the user's data.
The CLI-side fix is tracked separately — --json should emit the flat API shape the existing flatten_properties_for_api already defines, so nesting is never observable from the CLI. This item is only the documentation half, and its content depends on that landing.
- Once the CLI emits the flat shape,
SKILL.md's node example shows a populatedpropertiesobject reflecting it, not{} -
references/cli.mddescribes the--jsonoutput shape rather than only stating the flag exists - If the CLI fix is deferred, document the nesting and the
--filtersasymmetry as an interim measure — but prefer fixing the CLI
Verification
The failure mode here is guidance that reads correctly and does not change behaviour, so wording changes must be tested rather than assumed.
- Cold agent, no prior NodeSpace knowledge, asked to design a schema for a document-like type: produces relationships for entity-shaped fields and does not invent a
tagsarray for topic areas - Cold agent asked to "organize these notes by topic": reaches for collections with paths, does not stop to ask the user to pre-create them
- Cold agent asked to author an ADR or spec: produces a root plus child sections, not one node containing a document
- Re-test end to end rather than assuming a wording change lands — every failure here was a rule that existed in prose and did not fire
Context
All four from real external Claude Code sessions on a clean v0.2.7 install. Consolidated from what were separate issues: they edit the same two files, share a root cause, and are verified in a single pass.
Activity
malibio commentedon Sep 7, 2026
A second instance of the same recognition gap, from the same session: grouping fields vs collections.
The agent designed the ADR schema with
tags: arrayand did not consider modelling topics ascollectionnodes until the user raised it. Its own assessment afterwards:The decisive factor it did not have:
member_ofis one of the four native edges (models/schema.rs:56) and, perreferences/cli.md:230, these have "their own UI affordances". A collection appears in the sidebar and is navigable; a tag string has no UI anywhere. So for a durable topic area the user would browse, a collection is not merely better-modelled — it is the only option that surfaces in the product. That is a stronger argument than queryability alone and is not stated anywhere an agent would encounter while designing a schema.A related false alarm worth fixing alongside it. The agent also warned it had not verified that collection membership works, because
collection's schema shows"relationships": []:It works fine —
core_schemas.rs:587says// member_of is a native edge, not schema-defined, andcli.md:230documents the exemption explicitly. But the agent had just been rejected for an undeclaredtargetType, generalised that rule, saw an emptyrelationshipsarray, and concluded the documented path was unverified. A correct prose rule lost to a stronger inference from an error message.Suggested additions to
RELATIONSHIP_VS_FIELD(or a sibling rule):member_of,has_child,mentions,has_role) at schema-design time, not only in the CLI reference — an agent designing a schema needs to know these exist and need no declaration, precisely because the declaration rule it just learned does not apply to themmalibio commentedon Sep 7, 2026
Sharpening the grouping half: it should be stated as a default, not a trade-off.
My earlier comment framed collections vs. a tags array as "here is when each wins". That is too weak, and it reproduces the failure — an agent that weighs it each time is an agent that will keep inventing
tags: array, which is exactly what happened in the observed session.The rule to encode:
Collections are the built-in mechanism and win on every axis: navigable in the product (
member_ofis a native edge whose kind has "their own UI affordances",cli.md:230), a real node that can carry a description and be renamed once instead of across every member, hierarchical ("docs:rust"nests, an array is flat), and requiring no schema change to join. Oncenode create --collection <path>lands, not more expensive to write either — one flag versus--property tags='["a","b"]'with its JSON quoting.So the schema-design rule should steer an agent away from declaring a tags-shaped field at all, rather than helping it choose. An agent should have to justify not using a collection, not the reverse. The escape hatch stays real — a user who asks for a tags field gets one — but it is the exception.
This is the same shape as the
deciderscase this issue already covers: the agent's default was to invent a scalar/array field for something the graph models natively. Person-shaped fields → relationships; grouping-shaped fields → collections. Both are recognition rules, and both need to be defaults rather than considerations.Concretely for
skill_rules.rs: the false-friend field-name list should cover grouping names too —tags,categories,topics,labels,areas,groups— alongside the person-shaped ones (deciders,assignee,owner, …). Both lists exist to catch a field name that reads as plain data but is really something the graph already models.malibio commentedon Sep 7, 2026
Refining my previous comment once more, per the user: collections replace tags and structured grouping. Not "are preferred over" — they are the mechanism, and there is no separate tagging feature to choose against.
That changes what the rule should say. "Collections vs. a tags array" invites the agent to design a tagging system and pick an implementation. The accurate framing is that one already exists and spans both cases: a flat label (
storage) and a nested path (docs:rust) are the same mechanism at different depths.So an agent declaring a
tags: arrayfield is not choosing a lighter-weight option — it is building a parallel, invisible reimplementation of a built-in system. Invisible literally: array values appear in no UI, while collection membership is navigable (member_ofis a native edge whose kind has "their own UI affordances",cli.md:230).For
skill_rules.rs, that argues for a distinct rule rather than a clause insideRELATIONSHIP_VS_FIELD— something like aGROUPING_IS_COLLECTIONSsibling:Keeping it separate from the relationship rule also keeps each one teaching a single recognition:
Both catch the same class of mistake — a field name that reads as ordinary data but names something the graph already models — but they resolve to different mechanisms and are better learned apart.
[-]Schema-design guidance doesn't teach agents that person-shaped fields should be relationships[/-][+]Skill guidance: teach relationships, collections, and document decomposition — agents invent flat fields for what the graph models natively[/+]mstomar125 commentedon Sep 8, 2026
Items 2 (collections) and 4 (JSON property shape) were already fixed by #2450 and #2423 before this issue was picked up.
Items 1 (relationship recognition) and 3 (document decomposition) fixed in #2466: worked examples + a false-friends list added to
references/cli.md's schema section, and a decomposition worked example + reframed bulk-import guidance added for structured documents.SKILL.mditself only got the minimal fix (dropped a badassignee: textexample, added a cross-reference) since its body was already at ~4992/5000 of its enforced token budget before this PR — the substantive detail lives incli.mdinstead (no cap).Scope note: #2466 only updates the markdown skill (
cli.md's prose form, consumed by external PTY agents) for item 1. The parallelimperativeform inpackages/agent/src/skill_rules.rs::RELATIONSHIP_VS_FIELD— what the in-app local agent reads — is untouched (packages/agent boundary). Filed #2467 as a fast-follow for that half.Closing this issue as done for the markdown-skill side; #2467 tracks the remaining in-app-agent half.
Mirror #2383's relationship-recognition worked examples into skill_ru…