You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(skills): distinguish relation fields from observation fields in schema guidance
Per the validator contract (schema/validator.py, schema/parser.py):
scalar, enum, and array fields validate against [field] observations,
while capitalized entity-reference fields validate against relations
whose type equals the field name (project?: Project -> project
[[Target]]). The guide previously told agents to encode every schema
field as an observation, so required entity-ref fields would never
validate and no graph edges would be created. Clarified in the
observation/relation sections and the Task playbook example.
Signed-off-by: Cody Faust <cody@luminarysol.com>
-**Naming:** tasks get short imperative titles (`Renew car registration`); completed tasks can be retitled with a date prefix (`2026-07-12 — Renew car registration`) when archived, so archives sort chronologically.
34
34
-**Index:** yes — the Task Board is usually the single most-used note in the system. Open items only; done tasks drop off the board (search finds them).
35
-
-**Bidirectional rule:** task ↔ project, both directions.
35
+
-**Bidirectional rule:** task ↔ project, both directions. The `project?: Project` field is a relation field — satisfied by `- project [[Project Name]]` in the task's Relations (the relation type must match the field name for validation).
36
36
-**Key workflow to document:** closing a task (set status, add close date, update board, move to archive folder if using one).
37
37
-**Expansions:** meeting notes with action items that become tasks; a weekly-review note; recurring-task conventions.
-**Categories are queryable** — searching by category finds every note carrying that kind of fact.
52
52
- Tags add cross-cutting findability: `- [risk] no SLA on the API #vendor #reliability`.
53
53
54
-
In this system, observations do double duty: they're facts, and they're the **fields** schemas validate. A Task schema requiring `status` means every task note carries `- [status] ...` as an observation.
54
+
In this system, observations do double duty: they're facts, and they're the **fields** schemas validate — for scalar, enum, and array fields. A Task schema requiring `status` means every task note carries `- [status] ...` as an observation. (Entity-reference fields validate against relations instead — see below.)
55
55
56
56
## Relations
57
57
@@ -79,7 +79,7 @@ schema:
79
79
- `?`suffix = optional field
80
80
- `(enum)`= fixed value list — use for anything status-like
81
81
- `(array)`= list field
82
-
- A capitalized type name (`Person`, `Project`) = relation to another entity type
82
+
- A capitalized type name (`Person`, `Project`) makes it a **relation field**, validated against the note's Relations section (the relation type must equal the field name: `- project [[Target Note]]`) — it creates a graph edge, not an observation
83
83
- Every field gets a comma-then-description: it's documentation the next assistant reads
84
84
85
85
## Creating a schema
@@ -115,7 +115,7 @@ Key points:
115
115
116
116
- **`validation: warn`, not `error`** — warn logs issues without blocking writes. Start every schema on warn; a new user fighting rejected writes will abandon the system. Move a schema to `error` only if something automated consumes the notes and malformed ones break it.
117
117
- **Content notes declare their type** via `note_type` matching the schema's entity (e.g. `note_type="task"`).
118
-
- **Fields must appear as observations** in the note body (`- [status] open`) to satisfy validation — frontmatter-only values don't count. Putting them in both places gives you metadata search *and* schema validation.
118
+
- **Scalar, enum, and array fields must appear as observations** in the note body (`- [status] open`) to satisfy validation — frontmatter-only values don't count. Putting them in both places gives you metadata search *and* schema validation. **Entity-reference fields are different**: they're satisfied by a relation, not an observation — a line in `## Relations` whose type matches the field name (`project?: Project` is satisfied by `- project [[Kitchen Renovation]]`).
119
119
- **Version in metadata** — bump on breaking changes (new required field, removed field, type change). Additive optional fields don't need a bump.
0 commit comments