Repository navigation
Description
Summary
Two prose rules in packages/agent/src/skill_rules.rs that are individually accurate but led an agent to the wrong action in a real session. Both emit into references/cli.md under BEGIN GENERATED markers, so fixes belong in skill_rules.rs.
1. title_template — the actual rule is never stated (skill_rules.rs:187-188)
set
title_templatewhen a node's identity comes from its fields rather than free-form content … Omit it if the content/title field alone identifies the node.
The missing premise: what content holds
The guidance never establishes that content is almost always the node's name. For an entity node (customer, person, invoice, project) content is the identity — NodeSpace surfaces it as the title automatically. Only for primitive markdown nodes (text, header, quote-block, code-block) does content hold an actual prose body.
Without that premise, "identity comes from its fields rather than free-form content" reads as a contrast between structured data and a prose blob — so any structured entity looks like the template case. The real contrast is one field vs. several.
The rule
title_template exists to assemble a title from two or more fields. If one field already holds the whole title, that value belongs in content and no template is needed.
| Case | Where the name lives |
|---|---|
Single-field identity — Customer |
content. No company_name field, no template. |
Composed identity — Person (first_name + last_name) |
Component fields + title_template: "{first_name} {last_name}" |
Markdown primitive — text, header |
content is the prose body, not a name |
How it failed, in both directions, in one session
Over-applied. An agent authoring Customer read "identity comes from its fields" and set title_template: "{company_name}" — a customer's identity is a field. Defensible from the sentence as written; a single-field identity is still "identity coming from a field." It also added a company_name field, producing straightforward duplication:
content = "Northwind Labs"
properties.company_name = "Northwind Labs"
Under-applied. The same agent created person instances and hand-assembled the very title a template would have produced:
content = "Dana Whitfield", first_name = "Dana", last_name = "Whitfield"
person is in fact the one core schema that gets this right — core_schemas.rs:1330 sets title_template: Some("{first_name} {last_name}"), the only non-None title_template in the file, and it is exactly the canonical composed-title case.
The agent nonetheless duplicated the assembled name into content, because nodespace schema get person does not surface title_template in its output. Reading the schema showed only first_name, last_name, email, so the agent concluded there was no template and hand-composed the title.
That omission is worth fixing independently of the prose: it caused a wrong conclusion twice in one session, and it makes the correctly-modelled built-in invisible as an example. A caller inspecting a schema cannot see the one field that decides whether to set content or let the template compose it.
Suggested replacement
Title template:
contentis the node's name for entity types — NodeSpace uses it as the title automatically. Usetitle_templateonly when a title must be assembled from two or more fields, e.g. a person withfirst_nameandlast_name→"{first_name} {last_name}". If a single field already holds the full title, omit the template and put that value incontent. Never add a field that duplicatescontent— noname,title,company_name, or equivalent. Every placeholder must be a defined field.
Interaction with :371
:371 says "don't add a name or title field; every node already has a built-in content/title field" — currently with a title_template exception. Two problems:
- It reads as a naming-collision rule (avoid those two literal words) rather than a semantic one (don't duplicate what
contentholds).company_nameviolates the intent while passing the letter. - The
title_templateexception is what makes adding such a field feel sanctioned.
Worth restating as: don't add any field whose value would equal the node's name; the exception is a title_template placeholder field, which is a title component, never the whole title.
Related, undocumented
The clear → modify → restore ordering required to remove a field a live template references. The error names the end state it rejects, not the sequence that resolves it. Worth stating in the Editing: rule (:350). In session this cost four of six failures in one request — all downstream of the unnecessary template.
2. One-schema-per-request — a policy and a mechanical constraint in one paragraph (skill_rules.rs:52)
The paragraph carries two rules that fail differently:
- Policy: don't create types the user didn't ask for (owns both examples — "asked for ADR — don't also create Ticket or Sprint")
- Constraint:
targetTypemust already exist or be the type being created in this call
When a user explicitly asks for two linked types ("Customer + Invoice, linked"), the policy reads as not-applicable — nothing is unrequested. The agent skipped to planning both at once, with invoices declared on Customer pointing at a not-yet-existent invoice. Illegal regardless of what was requested, per rule 2.
The constraint is the operative half in that scenario, but it trails a policy statement that owns the emphasis and the examples. And the resolution — sequence the calls: Customer first, then Invoice declaring billed_to → customer, whose required reverseName: "invoices" supplies the Customer-side accessor for free — is never stated. "then stop and report it" actively suggests a hard stop, which reads oddly against a legitimate two-type request.
Suggested fix: split into two rules. Keep the policy as-is; promote the ordering constraint to its own statement with the worked sequence for a legitimately-requested linked pair, making explicit that one declaration with reverseName yields both directions.
Found via
Agent session using the nodespace skill. Both rules had been read before the mistakes were made — this is about stating the operative discriminator, not about missing information.
Activity
[-]Skill guidance on title_template and one-schema-per-request both misled an agent: no negative example for the former, an ordering constraint buried under a policy rule in the latter[/-][+]title_template guidance doesn't convey that it is for titles ASSEMBLED from multiple fields; single-field names belong in content[/+]mstomar125 commentedon Sep 22, 2026
Frontend: 5240 passed (260 files)