@creator-notes/cnotes 0.125.7 → 0.126.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "creator-notes-cli",
3
- "version": "0.125.7",
3
+ "version": "0.126.0",
4
4
  "description": "CreatorNotes CLI: create notes, build canvases, search knowledge from the terminal",
5
5
  "author": {
6
6
  "name": "CreatorNotes",
package/README.md CHANGED
@@ -53,7 +53,7 @@ cnotes search semantic "onboarding flow"
53
53
  | `cnotes query` | `cnotes q` | Filter, group or run a SELECT over every note's metadata from a local SQLite copy of the workspace, synced on each call |
54
54
  | `cnotes timeline` | `cnotes tl` | Recent activity feed |
55
55
  | `cnotes relationships list` | `cnotes rel` | Note relationships |
56
- | `cnotes brief` | | What the workspace already knows about a task: the most relevant notes, canvases and recent changes, with what earlier runs made of each note |
56
+ | `cnotes brief` | | What the workspace already knows about a task: the most relevant notes, canvases and recent changes, with what earlier runs made of each note; ends on one line that says to name the kind of request before writing |
57
57
  | `cnotes lessons record\|list` | | Say whether the notes you read were useful, a dead end or corrected (also `operations end --useful`); the next run's brief starts from them |
58
58
  | `cnotes types list\|create\|update` | `cnotes t` | Manage note types (supertags) |
59
59
  | `cnotes workspace list\|select\|current` | | Workspace management |
@@ -2,7 +2,7 @@ import { ApiClient } from "../lib/api-client.js";
2
2
  import { resolveConfig } from "../lib/config.js";
3
3
  import { handleError, ValidationError } from "../lib/errors.js";
4
4
  import { outputJson } from "../lib/output.js";
5
- import { briefIsEmpty, loadSessionBrief, renderBrief } from "../lib/session-brief.js";
5
+ import { BEFORE_WRITING, briefIsEmpty, loadSessionBrief, renderBrief } from "../lib/session-brief.js";
6
6
  /**
7
7
  * `cnotes brief "<task>"`: what the workspace already knows about a task,
8
8
  * before you act on it. The same brief `operations begin --prompt` returns,
@@ -18,7 +18,8 @@ export function registerBriefCommand(program) {
18
18
  .argument("<task...>", "The task, in plain words")
19
19
  .addHelpText("after", `
20
20
  Read-only and free of credits. \`operations begin --prompt\` includes the same
21
- brief, so you only need this when you are not opening a run.
21
+ brief, so you only need this when you are not opening a run. The brief ends on
22
+ one line, beforeWriting in --json: name the kind of request before you write.
22
23
 
23
24
  Examples:
24
25
  $ cnotes brief "set the Amplitude API key in production"
@@ -34,15 +35,17 @@ Examples:
34
35
  const brief = await loadSessionBrief(api, cfg.workspaceId, task);
35
36
  const result = brief ?? { query: task, notes: [], canvases: [], changes: [] };
36
37
  if (cfg.json) {
37
- outputJson(result);
38
+ outputJson({ ...result, beforeWriting: BEFORE_WRITING });
38
39
  return;
39
40
  }
40
41
  if (briefIsEmpty(result)) {
41
42
  console.log(`Nothing in this workspace matches "${task}" yet.`);
43
+ console.log(`\n${BEFORE_WRITING}`);
42
44
  return;
43
45
  }
44
46
  console.log(renderBrief(result));
45
47
  console.log("\nOpen a note with `cnotes notes get <id>`, a canvas with `cnotes canvas read <id>`.");
48
+ console.log(BEFORE_WRITING);
46
49
  }
47
50
  catch (error) {
48
51
  handleError(error, cfg.json);
@@ -15,6 +15,7 @@ import { resolveHostAgentSession } from "../lib/claude-session.js";
15
15
  import { WARN, dim } from "../lib/style.js";
16
16
  import { findOverlaps, findFrameSpills, layoutItemsFrom, parseSize, resolveAnchor, suggestFreeSpot, } from "../lib/canvas-layout.js";
17
17
  import { canvasUrl, canvasLinkForRef } from "../lib/urls.js";
18
+ import { boardChecks, renderBoardChecks } from "../lib/board-checks.js";
18
19
  import { CANVAS_GOAL_DESCRIPTION } from "../lib/canvas-goal.js";
19
20
  import { canvasActionPath, commentsListPath, parseCommentStatus, } from "../lib/canvas-paths.js";
20
21
  import { buildSectionUpdateRequest, CLI_SECTION_WORDING } from "../lib/section-update.js";
@@ -607,14 +608,23 @@ Examples:
607
608
  canvas
608
609
  .command("status")
609
610
  .description("See a canvas's whole layout before you move anything: every item (cards, text, lists, portals, " +
610
- "sections) as one list of rectangles, the items that overlap, and with --near a free spot next to an anchor.")
611
+ "sections) as one list of rectangles, the items that overlap, and with --near a free spot next to an anchor. " +
612
+ "Also checks the board as an agent reads it: the size of the read, and links that have gone stale.")
611
613
  .argument("<canvasId>", "Canvas ID")
612
614
  .option("--near <ref>", "Suggest a free spot next to this item (display id or node id) or point (x,y)")
613
615
  .option("--size <WxH>", "Box to find room for with --near (default: a note card, 340x130)", "340x130")
616
+ .option("--no-checks", "Skip the read and link checks (they cost one more read of the canvas)")
614
617
  .addHelpText("after", `
615
618
  Sections are containers: they are listed, but a card inside one is not an
616
619
  overlap. Read-only.
617
620
 
621
+ The read check says how many characters \`cnotes canvas read\` returns for this
622
+ board and whether that fits one tool result (100,000 characters). The link
623
+ check lists mentions that show a title their note no longer has, quote cards
624
+ pinned to a version their note has moved past, arrows between two notes that no
625
+ note body records, and mentions with no relationship type. Each comes with its
626
+ fix. --json carries them as read and links.
627
+
618
628
  Examples:
619
629
  $ cnotes canvas status CANVAS-361
620
630
  $ cnotes canvas status CANVAS-361 --near DECISION-6KJ # where can this card go?
@@ -627,9 +637,15 @@ Examples:
627
637
  const size = parseSize(opts.size);
628
638
  if (!size)
629
639
  throw new ValidationError(`--size must look like 340x130 (got "${opts.size}")`);
630
- const data = await api.get(`/api/canvas/${encodeURIComponent(canvasId)}`, {
631
- workspaceId: cfg.workspaceId,
632
- });
640
+ const [data, read] = await Promise.all([
641
+ api.get(`/api/canvas/${encodeURIComponent(canvasId)}`, {
642
+ workspaceId: cfg.workspaceId,
643
+ }),
644
+ opts.checks === false
645
+ ? Promise.resolve(null)
646
+ : api.get("/api/canvas/read", { canvas: canvasId, workspaceId: cfg.workspaceId }),
647
+ ]);
648
+ const checks = read ? boardChecks(read.result) : null;
633
649
  const items = layoutItemsFrom(data);
634
650
  const overlaps = findOverlaps(items);
635
651
  const spills = findFrameSpills(items);
@@ -648,6 +664,7 @@ Examples:
648
664
  items,
649
665
  overlaps: overlaps.map((o) => ({ a: o.a.ref, b: o.b.ref, area: o.area })),
650
666
  spills: spills.map((s) => ({ item: s.item.ref, section: s.section.ref, overhang: s.overhang })),
667
+ ...(checks ?? {}),
651
668
  ...(opts.near ? { freeSpot } : {}),
652
669
  });
653
670
  return;
@@ -680,6 +697,8 @@ Examples:
680
697
  }
681
698
  console.log(" Fix with `canvas arrange <canvas> --section <SECTION-n>`: it lays the section out and sizes the frame to fit.");
682
699
  }
700
+ if (checks)
701
+ console.log(`\n${renderBoardChecks(checks, WARN)}`);
683
702
  if (opts.near) {
684
703
  if (freeSpot) {
685
704
  console.log(`\nFree ${size.width}x${size.height} spot near ${opts.near}: x=${freeSpot.x} y=${freeSpot.y}`);
@@ -8,7 +8,7 @@ import { parseDateInput } from "./timeline.js";
8
8
  import { loadConfig, setActiveAgentRunId, registerAgentRun, unregisterAgentRun, isOwnedAgentRun, } from "../lib/auth-store.js";
9
9
  import { resolveHostAgentSession } from "../lib/claude-session.js";
10
10
  import { allWorkspaceRubrics, loadRubricMap } from "../lib/rubrics.js";
11
- import { briefIsEmpty, loadSessionBrief, renderBrief } from "../lib/session-brief.js";
11
+ import { BEFORE_STOPPING, BEFORE_WRITING, briefIsEmpty, loadSessionBrief, renderBrief } from "../lib/session-brief.js";
12
12
  import { hasLessonFlags, lessonsFromFlags, postLessons, renderRecorded } from "../lib/lessons.js";
13
13
  import { renderProposalsForCaller } from "../lib/waiting-proposals.js";
14
14
  /**
@@ -82,7 +82,8 @@ about the task: the most relevant notes (decisions, guides, metrics, findings),
82
82
  canvases matched by meaning through their digests, and recent changes on the
83
83
  topic from the change log. Read it BEFORE suggesting or doing anything; a note
84
84
  may already settle the question. --json carries it as brief.{notes,canvases,
85
- changes}. \`cnotes brief "<task>"\` gives the same brief without opening a run.
85
+ changes}, and beforeWriting, the one line that says to name the kind of request
86
+ before you write. \`cnotes brief "<task>"\` gives the same brief without opening a run.
86
87
 
87
88
  If a previous run was never ended, begin asks the server about it first:
88
89
  a run that is no longer running there (the bot crashed, the reaper marked
@@ -175,6 +176,7 @@ start fresh, or --detached to open your own run alongside it.
175
176
  detached: Boolean(opts.detached),
176
177
  typeRubrics,
177
178
  ...(brief ? { brief } : {}),
179
+ ...(opts.brief === false ? {} : { beforeWriting: BEFORE_WRITING }),
178
180
  });
179
181
  return;
180
182
  }
@@ -207,6 +209,10 @@ start fresh, or --detached to open your own run alongside it.
207
209
  console.log("Open a note with `cnotes notes get <id>`, a canvas with `cnotes canvas read <id>`.");
208
210
  console.log("");
209
211
  }
212
+ if (opts.brief !== false) {
213
+ console.log(BEFORE_WRITING);
214
+ console.log("");
215
+ }
210
216
  if (opts.detached) {
211
217
  console.log(`Run \`cnotes operations end --agent-run-id ${result.agentRunId}\` when done.`);
212
218
  }
@@ -319,7 +325,11 @@ code 5. Pass --force to end such a run anyway.
319
325
  return;
320
326
  }
321
327
  if (cfg.json) {
322
- outputJson({ ...result, ...(lessons ? { lessons } : {}) });
328
+ outputJson({
329
+ ...result,
330
+ ...(lessons ? { lessons } : {}),
331
+ ...(result.idempotent ? {} : { beforeStopping: BEFORE_STOPPING }),
332
+ });
323
333
  return;
324
334
  }
325
335
  if (result.idempotent) {
@@ -338,6 +348,7 @@ code 5. Pass --force to end such a run anyway.
338
348
  }
339
349
  if (lessons)
340
350
  console.log(renderRecorded(lessons));
351
+ console.log(`\n${BEFORE_STOPPING}`);
341
352
  }
342
353
  catch (error) {
343
354
  handleError(error, cfg.json);
@@ -0,0 +1,149 @@
1
+ /**
2
+ * Two checks on a board as an agent reads it, computed from the structure
3
+ * `cnotes canvas read --json` prints. `cnotes canvas status` reports them.
4
+ *
5
+ * Read: how much an agent pays to read the board. A read over ONE_RESULT_CHARS
6
+ * does not fit one tool result, so the agent pages a file to get at it; on the
7
+ * board this was first measured on, five source reports placed whole made the
8
+ * read 210,757 characters and three fifths of it backing material.
9
+ *
10
+ * Links: whether a correction could travel. A mention that still shows a
11
+ * retitled note's old title, a quote card pinned to a version its note has
12
+ * moved past, a mention with no relationship type, and an arrow between two
13
+ * notes that no note body records are each a place where the board and the
14
+ * notes behind it have drifted apart.
15
+ *
16
+ * Only what this board holds can be checked: a mention of a note that is not on
17
+ * the board is skipped, since its current title is not in the read.
18
+ */
19
+ /** What one tool result holds, in characters (about 25,000 tokens). */
20
+ export const ONE_RESULT_CHARS = 100_000;
21
+ const str = (v) => (typeof v === "string" ? v : "");
22
+ /** A text card has no id a person would know, so it is named by its first words. */
23
+ function labelOf(el) {
24
+ if (el.displayId)
25
+ return el.displayId;
26
+ const words = str(el.markdown).replace(/^#+\s*/, "").replace(/\s+/g, " ").trim();
27
+ return `text card "${words.length > 32 ? `${words.slice(0, 32)}…` : words}"`;
28
+ }
29
+ /** `[TARGET: shown](relationship:verb)`, with an optional `@v3` pin on the target. */
30
+ const TITLED_MENTION = /\[([^\]\[:]+?)(@v\d+)?: ([^\]]+)\]\(relationship:[a-z0-9-]+\)/g;
31
+ /** `[[TARGET]]`: a mention with no relationship type. `[[verb::TARGET]]` carries `::` and is typed. */
32
+ const BARE_MENTION = /\[\[([^\]\[|:]+)\]\]/g;
33
+ export function boardChecks(result) {
34
+ const root = (result ?? {});
35
+ const elements = (Array.isArray(root.elements) ? root.elements : []);
36
+ const edges = (Array.isArray(root.edges) ? root.edges : []);
37
+ const chars = JSON.stringify(result ?? {}, null, 2).length;
38
+ const sized = elements.map((el) => ({ ref: labelOf(el), chars: JSON.stringify(el, null, 2).length, el }));
39
+ const quoteChars = sized.filter((s) => s.el.type === "Quote").reduce((sum, s) => sum + s.chars, 0);
40
+ const largest = [...sized]
41
+ .sort((a, b) => b.chars - a.chars)
42
+ .slice(0, 3)
43
+ .map((s) => ({ ref: s.ref, chars: s.chars, share: chars > 0 ? Math.round((s.chars / chars) * 100) / 100 : 0 }));
44
+ const notes = new Map();
45
+ for (const el of elements)
46
+ if (el.kind === "note" && el.displayId)
47
+ notes.set(el.displayId, el);
48
+ const staleTitles = [];
49
+ const untypedMentions = [];
50
+ const stalePins = [];
51
+ for (const el of elements) {
52
+ const md = str(el.markdown);
53
+ if (!md)
54
+ continue;
55
+ const here = labelOf(el);
56
+ if (el.type === "Quote") {
57
+ // A quote card names the version it was cut from; that title is history, not a stale stamp.
58
+ const pin = /\[([^\]\[:]+?)@v(\d+): /.exec(md);
59
+ const source = pin ? notes.get(pin[1]) : undefined;
60
+ if (pin && source && typeof source.version === "number" && source.version > Number(pin[2])) {
61
+ const words = /^>\s?(.+)$/m.exec(md)?.[1]?.trim() ?? "";
62
+ stalePins.push({
63
+ quote: here,
64
+ source: pin[1],
65
+ pinned: Number(pin[2]),
66
+ current: source.version,
67
+ wordsKept: words.length > 0 && str(source.markdown).includes(words),
68
+ });
69
+ }
70
+ continue;
71
+ }
72
+ for (const m of md.matchAll(TITLED_MENTION)) {
73
+ const [, target, pinned, shown] = m;
74
+ const current = notes.get(target)?.title;
75
+ if (pinned || !current || shown === current)
76
+ continue;
77
+ staleTitles.push({ in: here, target, shown, current });
78
+ }
79
+ for (const m of md.matchAll(BARE_MENTION)) {
80
+ if (notes.has(m[1]))
81
+ untypedMentions.push({ in: here, target: m[1] });
82
+ }
83
+ }
84
+ // An arrow is local to this canvas. Between two notes it must also be a
85
+ // mention in one of the bodies, or the relationship exists nowhere else.
86
+ // Arrows to text cards and quote cards are the board's own and mirror nothing.
87
+ const unmirroredArrows = [];
88
+ for (const edge of edges) {
89
+ const from = notes.get(str(edge.from));
90
+ const to = notes.get(str(edge.to));
91
+ if (!from || !to || from.type === "Quote" || to.type === "Quote")
92
+ continue;
93
+ const a = str(from.displayId);
94
+ const b = str(to.displayId);
95
+ if (str(from.markdown).includes(b) || str(to.markdown).includes(a))
96
+ continue;
97
+ unmirroredArrows.push({ from: a, to: b, label: typeof edge.label === "string" ? edge.label : null });
98
+ }
99
+ return {
100
+ read: { chars, approxTokens: Math.round(chars / 4), fitsOneResult: chars <= ONE_RESULT_CHARS, quoteChars, largest },
101
+ links: { staleTitles, stalePins, untypedMentions, unmirroredArrows },
102
+ };
103
+ }
104
+ const count = (n, one, many) => `${n} ${n === 1 ? one : many}`;
105
+ /** The text `cnotes canvas status` prints under the layout; each finding carries its fix. */
106
+ export function renderBoardChecks(checks, warn = "!") {
107
+ const lines = [];
108
+ const { read, links } = checks;
109
+ const size = `${read.chars.toLocaleString("en-US")} characters (about ${read.approxTokens.toLocaleString("en-US")} tokens)`;
110
+ if (read.fitsOneResult) {
111
+ lines.push(`Read: ${size}, which fits one tool result.`);
112
+ }
113
+ else {
114
+ lines.push(`${warn} Read: ${size}, over the ${ONE_RESULT_CHARS.toLocaleString("en-US")} one tool result holds.`);
115
+ lines.push(` Largest: ${read.largest.map((l) => `${l.ref} ${Math.round(l.share * 100)}%`).join(", ")}.`);
116
+ lines.push(" Sources a reader opens on demand belong in a list card (`canvas add-list`), which reads back as titles only.");
117
+ }
118
+ const found = links.staleTitles.length + links.stalePins.length + links.untypedMentions.length + links.unmirroredArrows.length;
119
+ if (found === 0) {
120
+ lines.push("Links: no stale titles, stale quote cards, untyped mentions or unmirrored arrows.");
121
+ return lines.join("\n");
122
+ }
123
+ if (links.staleTitles.length > 0) {
124
+ lines.push(`${warn} ${count(links.staleTitles.length, "mention shows", "mentions show")} a title its note no longer has:`);
125
+ for (const s of links.staleTitles)
126
+ lines.push(` ${s.in} shows "${s.shown}" for ${s.target}, now "${s.current}"`);
127
+ lines.push(" Save the mentioning note again (`versions create` with its current body), or `canvas update-text` for a text card.");
128
+ }
129
+ if (links.stalePins.length > 0) {
130
+ lines.push(`${warn} ${count(links.stalePins.length, "quote card is", "quote cards are")} pinned to a version its note has moved past:`);
131
+ for (const p of links.stalePins) {
132
+ lines.push(` ${p.quote} quotes v${p.pinned} of ${p.source}, now v${p.current} (${p.wordsKept ? "the words are still there" : "the words are gone"})`);
133
+ }
134
+ lines.push(" Remove the card and `canvas add-quote` the sentence again.");
135
+ }
136
+ if (links.unmirroredArrows.length > 0) {
137
+ lines.push(`${warn} ${count(links.unmirroredArrows.length, "arrow exists", "arrows exist")} on this canvas only:`);
138
+ for (const a of links.unmirroredArrows)
139
+ lines.push(` ${a.from} -> ${a.to}${a.label ? ` "${a.label}"` : ""}`);
140
+ lines.push(" Write the same relationship as a mention in one of the two note bodies.");
141
+ }
142
+ if (links.untypedMentions.length > 0) {
143
+ lines.push(`${warn} ${count(links.untypedMentions.length, "mention has", "mentions have")} no relationship type:`);
144
+ for (const u of links.untypedMentions)
145
+ lines.push(` ${u.in} names ${u.target} as [[${u.target}]]`);
146
+ lines.push(" Say what the link is: [[depends-on::NOTE-12]].");
147
+ }
148
+ return lines.join("\n");
149
+ }
@@ -116,6 +116,18 @@ export function briefIsEmpty(brief) {
116
116
  brief.changes.length === 0 &&
117
117
  (brief.lessons?.preferred.length ?? 0) === 0);
118
118
  }
119
+ /**
120
+ * The one line every brief ends on. Agents chose a board shape by habit: the
121
+ * skill listed shapes and no step named the request, and two rounds of skill
122
+ * text changed nothing on boards. So the instruction is printed where the
123
+ * agent already reads, at the moment it applies.
124
+ */
125
+ export const BEFORE_WRITING = "Before you write: name the kind of request and find its row in the cnotes skill (references/situations.md). Most requests need no board.";
126
+ /**
127
+ * The line a run ends on. Nothing asked an agent what was worth keeping, so a
128
+ * correction or a decision made in passing was lost with the session.
129
+ */
130
+ export const BEFORE_STOPPING = "Before you stop: if you were corrected, a decision was made or a fact changed and no note holds it, write that one note now (cnotes skill, references/situations.md, When to write unasked).";
119
131
  /** Text form, shared by `operations begin` and `cnotes brief`. */
120
132
  export function renderBrief(brief, now = Date.now()) {
121
133
  const clip = (s, n) => (s.length > n ? s.slice(0, n - 3) + "..." : s);
@@ -30,6 +30,7 @@ import { CANVAS_GOAL_DESCRIPTION } from "./lib/canvas-goal.js";
30
30
  import { parseStart as parseFocusStart } from "./lib/focus-time.js";
31
31
  import { resolveNoteId } from "./lib/resolve-note.js";
32
32
  import { findOverlaps, layoutItemsFrom, resolveAnchor, suggestFreeSpot } from "./lib/canvas-layout.js";
33
+ import { boardChecks } from "./lib/board-checks.js";
33
34
  import { buildSchema } from "./lib/build-schema.js";
34
35
  import { assertMcpLocalFileReadable, getMcpLocalFileRoots, } from "./lib/mcp-local-file.js";
35
36
  import { attachRubricsToResults, loadRubricMap, rubricsForTypes, } from "./lib/rubrics.js";
@@ -380,22 +381,26 @@ sharedTool("cnotes_canvas_list", async ({ includeArchived }) => withErrorHandlin
380
381
  ...(includeArchived ? { includeArchived: "true" } : {}),
381
382
  })));
382
383
  sharedTool("cnotes_canvas_get", async ({ canvasId }) => withErrorHandling(() => api.get(`/api/canvas/${encodeURIComponent(canvasId)}`, { workspaceId, format: "markdown" })));
383
- server.tool("cnotes_canvas_status", "See a canvas's whole layout BEFORE placing or moving anything by x/y: every item (cards, text, lists, portals, sections) as one list of rectangles {kind, ref, x, y, width, height}, the pairs that overlap, and with `near` a free spot next to an anchor. Sections are containers, never overlaps. Read-only.", {
384
+ server.tool("cnotes_canvas_status", "See a canvas's whole layout BEFORE placing or moving anything by x/y: every item (cards, text, lists, portals, sections) as one list of rectangles {kind, ref, x, y, width, height}, the pairs that overlap, and with `near` a free spot next to an anchor. Sections are containers, never overlaps. Also checks the board as an agent reads it: `read` is the size of the read and whether it fits one tool result (100,000 characters); `links` lists mentions showing a title their note no longer has, quote cards pinned to a version their note has moved past, arrows between two notes that no note body records, and mentions with no relationship type. Run it before calling a board done. Read-only.", {
384
385
  canvasId: z.string().describe("Canvas ID"),
385
386
  near: z.string().optional().describe("Find a free spot next to this item (display id or node id) or point 'x,y'"),
386
387
  width: z.number().optional().default(340).describe("Width of the box to find room for (default: a note card)"),
387
388
  height: z.number().optional().default(130).describe("Height of the box to find room for"),
388
389
  }, async ({ canvasId, near, width, height }) => withErrorHandling(async () => {
389
- const data = await api.get(`/api/canvas/${encodeURIComponent(canvasId)}`, { workspaceId });
390
+ const [data, read] = await Promise.all([
391
+ api.get(`/api/canvas/${encodeURIComponent(canvasId)}`, { workspaceId }),
392
+ api.get("/api/canvas/read", { canvas: canvasId, workspaceId }),
393
+ ]);
390
394
  const items = layoutItemsFrom(data);
391
395
  const overlaps = findOverlaps(items).map((o) => ({ a: o.a.ref, b: o.b.ref, area: o.area }));
396
+ const checks = boardChecks(read.result);
392
397
  if (!near)
393
- return { items, overlaps };
398
+ return { items, overlaps, ...checks };
394
399
  const anchor = resolveAnchor(items, near);
395
400
  if (!anchor)
396
401
  throw new CliError(`No item "${near}" on this canvas.`);
397
402
  const spot = suggestFreeSpot(items, anchor, { width, height });
398
- return { items, overlaps, freeSpot: spot ? { ...spot, width, height, near } : null };
403
+ return { items, overlaps, ...checks, freeSpot: spot ? { ...spot, width, height, near } : null };
399
404
  }));
400
405
  sharedTool("cnotes_canvas_read", async ({ canvasId }) => withErrorHandling(async () => {
401
406
  // The server reads share links too (access=shared, no workspace).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@creator-notes/cnotes",
3
- "version": "0.125.7",
3
+ "version": "0.126.0",
4
4
  "description": "CLI for CreatorNotes — create notes, build canvases, search knowledge from the terminal",
5
5
  "type": "module",
6
6
  "bin": {
@@ -13,12 +13,13 @@ metadata:
13
13
 
14
14
  Every note and canvas you write is context: what the next reader, a teammate or the next agent session, opens instead of asking the user to explain again. A write is done when that reader can act on it without the user present. It states what is true, what was decided, what is still open, and what each rests on, and leaves out what that reader would not need. Past sessions left context for you in the same way, which is why every task starts by reading. The definition and its reasoning are DECISION-6KM9 (`cnotes notes get DECISION-6KM9`).
15
15
 
16
- ## Most tasks: read, then one write
16
+ ## Most tasks: read, name the request, then one write
17
17
 
18
18
  Each call costs the user a model round trip, so batch, and send independent calls together. Reads need no run.
19
19
 
20
20
  1. **Read, in parallel.** `cnotes workspace current` names the workspace and its relationship types (`-w <id>` targets another for one command). `cnotes brief "<task>"` returns the notes, canvases and recent changes most relevant to the task, with what earlier runs made of each (`lesson:` under a note; `Start here` lists the notes runs keep finding useful): read a correction before relying on the note it sits on. `cnotes search "<topic>"` finds notes, canvases and images in one call. `cnotes notes get <id> --expand` loads a note with the notes it rests on. Before changing a canvas, `cnotes canvas read <canvasId>` (or `read-section SECTION-n` when the request names a frame). `cnotes types show <Type>` for each type you will write: author to its rubric. A Decision or Guide you find may already settle what you were about to propose.
21
- 2. **Write once, with `--intent`.** `--intent "<headline>"` opens an agent run for that one command and closes it after, so the change lands on the timeline as one revertable run; a removal gets a before snapshot. When a run is already open, the write joins it. To add cards, create and place them together:
21
+ 2. **Name the kind of request.** [references/situations.md](references/situations.md) sorts it into one of 13 rows by what the person will do with the result, and each row says what to write, how to lay it out and how to check it. The first row is no board: most requests want the work done or a plain answer, and at most one note.
22
+ 3. **Write once, with `--intent`.** `--intent "<headline>"` opens an agent run for that one command and closes it after, so the change lands on the timeline as one revertable run; a removal gets a before snapshot. When a run is already open, the write joins it. To add cards, create and place them together:
22
23
  ```json
23
24
  {"notes":[{"key":"A","type":"Insight","markdown":"# Reviews wait on one person\nFour features shipped a week late in October."},
24
25
  {"key":"B","type":"Decision","markdown":"# Add a second reviewer\nRests on [@A: Reviews wait on one person](relationship:depends-on)."}],
@@ -32,13 +33,13 @@ Each call costs the user a model round trip, so batch, and send independent call
32
33
  The `notes` array is the `notes create` shape; a note leaf places one with `"noteId":"@<key>"`, a `quote` leaf gives it a face (its claim sentence, drawn as a quote inside the same frame), and edges say `@<key>` too. `--into SECTION-n` appends to an existing frame. Each note comes back under `notes`, graded where the workspace grades: revise only notes below 4.
33
34
  `cnotes canvas place <canvasId> --spec spec.json --intent "Added the reviewer bottleneck to the Q1 roadmap"`
34
35
  Every write takes the flag: `cnotes canvas arrange <canvasId> --section SECTION-7 --intent "Tidied the Risks section"`, `cnotes versions create DECISION-12 --markdown-file new.md --description "<what changed>" --intent "<headline>"`.
35
- 3. **Say what the notes were worth, then link the result.** `cnotes lessons record --useful <ids> --dead-end <ids>` names the notes from the brief that settled the task and the ones that led nowhere; the next run's brief starts from them. End the reply with the canvas link from the `Link:` line ([Surfacing the canvas link](#surfacing-the-canvas-link)).
36
+ 4. **Say what the notes were worth, keep what lasts, then link the result.** `cnotes lessons record --useful <ids> --dead-end <ids>` names the notes from the brief that settled the task and the ones that led nowhere; the next run's brief starts from them. If you were corrected, a decision was made or a fact changed and no note holds it, write that one note before you stop (situations.md, When to write unasked). End the reply with the canvas link from the `Link:` line ([Surfacing the canvas link](#surfacing-the-canvas-link)).
36
37
 
37
38
  ### A new canvas is one write too
38
39
 
39
40
  `cnotes canvas create "Q1 · Roadmap" --goal "<goal>" --audience "<who>" --spec spec.json --intent "Built the Q1 roadmap canvas"`
40
41
 
41
- The spec is the same document, `notes` included; the placement comes back under `layout`. Its root is a vertical stack that opens with the hero (`{"kind":"item","type":"richtext","size":"large","content":"# <what a person would call the board>"}`, one to three plain words such as "The problem" or "Glossary", never a claim or a slogan), then the `medium` banner (four lines with a blank line between each, so each is its own paragraph), then the board. Pick the shape first (canvas-elements.md, Board shapes): an Argument's spine is notes with quote faces joined by connectives and arrows, tiles on the shelf. The name follows the title rule (rule 2 below, `·` between its parts), the goal ends with a "Done when" sentence, and the server refuses either otherwise. The spec is checked before the canvas exists, and a refused layout removes the canvas again, so a bad file creates nothing: fix the spec and run the same command again. Read [references/canvas-elements.md](references/canvas-elements.md) (rules 4, 5, 7 and 9) before choosing elements and [references/canvas-layout.md](references/canvas-layout.md) before writing a spec with anchors, origins or several sections.
42
+ The spec is the same document, `notes` included; the placement comes back under `layout`. Its root is a vertical stack that opens with the hero (`{"kind":"item","type":"richtext","size":"large","content":"# <what a person would call the board>"}`, one to three plain words such as "The problem" or "Glossary", never a claim or a slogan), then the `medium` banner (four lines with a blank line between each, so each is its own paragraph), then the board. The request's row names the shape (situations.md; canvas-elements.md, Board shapes): an Argument's spine is notes with quote faces joined by connectives and arrows, tiles on the shelf. The name follows the title rule (rule 2 below, `·` between its parts), the goal ends with a "Done when" sentence, and the server refuses either otherwise. The spec is checked before the canvas exists, and a refused layout removes the canvas again, so a bad file creates nothing: fix the spec and run the same command again. Read [references/canvas-elements.md](references/canvas-elements.md) (rules 4, 5, 7 and 9) before choosing elements and [references/canvas-layout.md](references/canvas-layout.md) before writing a spec with anchors, origins or several sections.
42
43
 
43
44
  ## Longer work: one run
44
45
 
@@ -47,7 +48,7 @@ When the writes belong together but cannot be one command (several notes and new
47
48
  1. `cnotes operations begin --prompt "<past-tense headline, e.g. Added a risks list to the Q1 roadmap>" --json`, as its own command; check its exit code before writing (a pipe hides it). The response carries `typeRubrics`, the brief, and the proposals waiting on you (read those first, [references/drafts.md](references/drafts.md) step 8); `-q` prints only the run id. Canvas writes in one run stay on one canvas: end it and begin another before touching a second board.
48
49
  2. Write. Audience-facing prose (note bodies, banners, pre-reads) goes through [references/humanizer.md](references/humanizer.md) first; transcripts, quotes and other raw capture are stored verbatim.
49
50
  3. **Grade what you wrote.** `cnotes quality <displayIds...> --fail-below 4` hands back each note's rubric and body. Grade them all at once with `cnotes quality record --grades-file grades.json` (one `{displayId, level, criteria, nextStep?, gradedVersion?}` per note, one reason per rubric criterion), then revise only a note below 4 with `cnotes versions create`. A level 3 with `unsure: true` and nothing under `missing`, or a `needs_agent` answer, means the server grader abstained: read the note yourself.
50
- 4. **Read it back.** `cnotes canvas read <canvasId>`: every claim appears in a note with a display ID, the spine reads at fit zoom as faces and connectives, the hero is the board's plain name and the banner carries the claim, and the banner makes sense to someone who was not in the session and never says who asked for the board. A write that touches no canvas gets the same test with `cnotes notes get <id> --expand`, read as the next session will.
51
+ 4. **Read it back.** `cnotes canvas status <canvasId>` reports the size of the board's read and its stale links; fix what it flags. Then `cnotes canvas read <canvasId>`: every claim appears in a note with a display ID, the spine reads at fit zoom as faces and connectives, the hero is the board's plain name and the banner carries the claim, and the banner makes sense to someone who was not in the session and never says who asked for the board. A write that touches no canvas gets the same test with `cnotes notes get <id> --expand`, read as the next session will.
51
52
  5. **Close with what the notes were worth.** `cnotes operations end --useful <ids> --dead-end <ids>` names the notes that answered the task and the ones that led nowhere; `--corrected <id> --correction "<what was right>"` marks one that was wrong (fix it with `versions create` too, when you can). The next run's brief starts from these. Then link the result.
52
53
 
53
54
  ## Rules that hold on every task
@@ -119,6 +120,7 @@ After you create a canvas or finish changing one, end your reply with its link,
119
120
 
120
121
  | When you are | Open |
121
122
  |---|---|
123
+ | Deciding what a request needs: a board, one note or nothing; which row; when to write unasked | [references/situations.md](references/situations.md) |
122
124
  | Writing any prose a person will read | [references/humanizer.md](references/humanizer.md) |
123
125
  | Creating, reading or revising notes; types, rubrics and dimensions; markdown rules; grading | [references/notes.md](references/notes.md) |
124
126
  | Linking notes, reading backlinks, checking what an edit affects (`deps`) | [references/relationships.md](references/relationships.md) |
@@ -126,7 +126,7 @@ A board is made of three kinds of words, and a board that holds only the first k
126
126
 
127
127
  ## Board shapes
128
128
 
129
- Pick the shape before placing anything; it sets the ratio of notes, faces and text cards, and the completion tests read differently for each.
129
+ Pick the shape before placing anything; it sets the ratio of notes, faces and text cards, and the completion tests read differently for each. The request's row in [situations.md](situations.md) names the shape; this table says what each shape is made of.
130
130
 
131
131
  | Shape | When | Notes | Faces (quotes, rule 4) | Text cards |
132
132
  |---|---|---|---|---|
@@ -10,6 +10,7 @@ Read this before putting more than one item on a canvas. Describe structure; the
10
10
  - [Arrange existing nodes (reflow)](#arrange-existing-nodes-reflow)
11
11
  - [Arranged sections](#arranged-sections)
12
12
  - [Edges](#edges)
13
+ - [Layouts by content](#layouts-by-content)
13
14
  - [Examples](#examples)
14
15
  - [Workflow](#workflow)
15
16
  - [Constraints](#constraints)
@@ -176,6 +177,29 @@ Edges live at the top level alongside `root`. Each endpoint is resolved in this
176
177
 
177
178
  `lineStyle` is `solid` (the default: the chain the reader follows) or `dashed` (what a card rests on), so a board with two layers of arrows is drawn in one call (canvas-elements.md, rule 5). `canvas update-edge --line-style` restyles an arrow that already exists.
178
179
 
180
+ ## Layouts by content
181
+
182
+ The kind of content picks the layout. The counts are guidelines from practice guides and a few studies, not limits.
183
+
184
+ | Content | Layout | Guideline |
185
+ |---|---|---|
186
+ | A sequence in time | a left-to-right strip: one horizontal stack | four to six frames for a newcomer |
187
+ | A chain of reasoning | the Argument spine below | sentences between the steps, never bullets |
188
+ | Many items of one kind, order unknown | named frames, sorted first and named after | worth the sorting from about twenty items |
189
+ | Options against criteria | a table in a note, or a grid under a heading row | three to six options |
190
+ | Routes to one outcome | a tree: one card on top, its branches under it | one root |
191
+ | A workflow | activities across the top, detail under each | |
192
+ | A start page | portals in named frames | under about twenty links, then a second hub |
193
+ | Sources the board rests on | a list card (`"type": "list"`) | it reads back as titles only |
194
+
195
+ What makes a board readable at fit zoom:
196
+
197
+ - **Wider than tall.** A window is. A tall board fits at a lower zoom, where only the hero reads. Run the spine left to right and put sources in list cards beside the banner, not in bands below.
198
+ - **Frames side by side.** Give each frame a name that reads at fit zoom, and avoid a frame inside a frame.
199
+ - **A wider gap between groups than inside them.** A frame is the stronger cue when the two disagree.
200
+ - **Short arrows.** An arrow that crosses a frame it does not belong to reads as noise. Let a list card or a mention carry what a long arrow would.
201
+ - **Cards stay put.** People find things again by where they were. Move a card only when the gain is worth the reader's lost bearings.
202
+
179
203
  ## Examples
180
204
 
181
205
  **Argument spine** (a decision read left to right). The shape for an Argument board ([canvas-elements.md](canvas-elements.md), Board shapes). Each step of the argument is one column: a heading naming the step, the note the step rests on with its face (a `quote` leaf of its claim sentence) under it, and then a `small` connective, the board's own sentence saying what that card means for the next step. Edges join the steps; the rests-on arrow is dashed. The shelf, the sources the spine rests on, is a section of tiles below. One call builds all of it.
@@ -33,7 +33,14 @@ cnotes canvas get <canvasId>
33
33
  # `cnotes canvas place` already avoids overlaps.)
34
34
  # See the whole layout before touching x/y: every item's box by kind, the pairs
35
35
  # that overlap, and with --near a free spot next to an anchor.
36
- cnotes canvas status <canvasId> [--near <displayId|nodeId|x,y>] [--size 340x130]
36
+ # It also checks the board as an agent reads it. Read: the characters
37
+ # `canvas read` returns and whether that fits one tool result (100,000). Links:
38
+ # mentions that show a title their note no longer has, quote cards pinned to a
39
+ # version their note has moved past, arrows between two notes that no note body
40
+ # records, and mentions with no relationship type. Each finding prints its fix;
41
+ # --json carries them as `read` and `links`. Run it before you call a board
42
+ # done. --no-checks skips them (they cost one more read of the canvas).
43
+ cnotes canvas status <canvasId> [--near <displayId|nodeId|x,y>] [--size 340x130] [--no-checks]
37
44
 
38
45
  # Read a canvas as STRUCTURE, not just content — one round-trip to think across it.
39
46
  # Returns the notes as concatenated markdown in display order (top-to-bottom, then
@@ -10,6 +10,7 @@ Read this before creating, reading or revising notes: batch create, `--expand` r
10
10
  - [Note IDs](#note-ids)
11
11
  - [Note Types](#note-types)
12
12
  - [Content via Markdown](#content-via-markdown)
13
+ - [Notes that read alone](#notes-that-read-alone)
13
14
  - [Updating Content vs Metadata](#updating-content-vs-metadata)
14
15
 
15
16
  ## Notes (`cnotes notes` / `cnotes n`)
@@ -287,6 +288,16 @@ each note is judged again; a new label alone keeps them.
287
288
  - `duplicates`, notes covering the same thing
288
289
  - Simple mention shorthand: `[NOTE-123]` (the id alone), `[NOTE-123: Title]` (the title) or `[NOTE-123|your words]`; all three are "references"
289
290
 
291
+ ## Notes that read alone
292
+
293
+ A note gets read out of place: in a search result, in a brief, or on the first screen of a long board. These rules keep it readable there.
294
+
295
+ - **Say what it is about in the second sentence.** The title and the first sentence state the claim. The next sentence names the project, the thing, the person and the period, so an excerpt makes sense without its neighbours.
296
+ - **Write evidence and claims in different tenses, in different notes.** Evidence (an Observation, a Quote) is past tense and says who saw it, where and when. A claim (an Insight, a Claim) is present tense and names the evidence it rests on. An Insight that only repeats its evidence is an Observation.
297
+ - **Keep what a source found apart from the rule you draw from it.** Say which is which, and check the figures you lean on against the original source, not a summary of it.
298
+ - **Give a changed fact a successor.** When a fact stops being true, write the new one as its own note with the date it changed, and link the old one with `supersedes` (see above). Edit in place only to fix how something is said.
299
+ - **Keep a single claim short.** A note that states one claim or one piece of evidence stays within a few hundred words. A Plan, a Guide or a Decision runs longer, because its rubric asks for more parts.
300
+
290
301
  ## Updating Content vs Metadata
291
302
  - To change note **content** (including title), create a new **version**: `cnotes versions create <id> --description "..." --markdown-file ./updated.md`
292
303
  - Title is derived from the `# h1` heading in the latest version, to rename a note, create a new version with a different heading.
@@ -9,6 +9,7 @@ Read this for the detail behind `operations begin`/`end`: when to wrap, two agen
9
9
  - [Writing a good `--prompt`](#writing-a-good---prompt)
10
10
  - [Verifying it worked](#verifying-it-worked)
11
11
  - [Read before you write](#read-before-you-write)
12
+ - [Handing off mid-work](#handing-off-mid-work)
12
13
  - [Canvas agent-runs](#canvas-agent-runs)
13
14
  - [Timeline (`cnotes timeline` / `cnotes tl`)](#timeline-cnotes-timeline--cnotes-tl)
14
15
 
@@ -133,6 +134,19 @@ If the timeline shows individual note rows instead of one grouped run, the write
133
134
  `cnotes operations read-first [--since 7d]` reports how many agent runs that wrote notes read something first, and lists the "cold" runs that wrote without reading. A run counts as read-first when a read carries its run id, or when the same person's agent read in the workspace from 30 minutes before the run until it ended. It also reports orientation: the median reads before a run's first write, and how many runs that changed an existing canvas read it first. Reading the canvas you are about to change, before you change it, is what keeps your run off the cold list and in the second count.
134
135
 
135
136
 
137
+ ## Handing off mid-work
138
+
139
+ When the session will stop before the work does, write one handoff note before you end the run. Place it directly under the banner of the board it concerns, or leave it unplaced when there is no board. Use the `Note` type unless the workspace has a better one, and title it "Handoff · <the work>". Six parts, each under a short heading:
140
+
141
+ 1. **How urgent.** What waits or breaks if nobody picks this up, and by when.
142
+ 2. **Where things stand.** What is done and checked, and what is half done.
143
+ 3. **What to do next.** The actions, in order.
144
+ 4. **What could go wrong.** And what to do then.
145
+ 5. **First command.** The one command the next session runs first.
146
+ 6. **Proof it is still true.** A command whose output shows the note still describes the work: a test, a `git log` line, a `cnotes canvas read`.
147
+
148
+ Link the decisions made and the questions still open, and do not restate them. Leave out anything the timeline already holds. The next session reads the note first, runs the proving command, and says the state back before acting. If the proof fails, the note is stale: say so and read the work again. Replace the note when that session hands off in turn.
149
+
136
150
  ## Canvas agent-runs
137
151
 
138
152
  ```bash
@@ -17,6 +17,7 @@ The one contract every command follows is in the core skill (the flag table and
17
17
  - `notes list` says on stderr which source answered and whether the list may be short. With the local copy on, type, tag, text, pin and no-canvas lists count every note, your own writes included; `Showing N of M` is the real count. A line saying older matches may be missing means that: narrow the list or relay the hint, never report it as the whole. Counting or grouping is `cnotes query` (more-commands.md).
18
18
  - `cnotes auth status` and `cnotes whoami` exit 2 when no token is stored. That means signed out, not a broken install; exit 0 means a token is present.
19
19
  - `operations begin -q` prints only the run id on stdout; the proposals waiting on you go to stderr.
20
+ - `cnotes brief --json` and `operations begin --json` carry `beforeWriting`, and `operations end --json` carries `beforeStopping`: one line each, pointing at [situations.md](situations.md). They are reminders, not data.
20
21
 
21
22
  ## No `jq` needed
22
23
 
@@ -0,0 +1,108 @@
1
+ # Choosing what to write: the kind of request
2
+
3
+ Read this after the brief and before you choose a board shape or a note type. It sorts a request into one of 13 rows. Each row says what to write, how to lay it out and how to check it. The first row is no board at all, and most requests land there.
4
+
5
+ ## Contents
6
+
7
+ - [Does it need a board?](#does-it-need-a-board)
8
+ - [Find the row](#find-the-row)
9
+ - [The rows](#the-rows)
10
+ - [Two kinds at once](#two-kinds-at-once)
11
+ - [When the board already exists](#when-the-board-already-exists)
12
+ - [How much to write](#how-much-to-write)
13
+ - [When to write unasked](#when-to-write-unasked)
14
+ - [Where the rows come from](#where-the-rows-come-from)
15
+
16
+ ## Does it need a board?
17
+
18
+ Most requests do not. A board is needed when the person asks for one, asks for something to look at, keep or share, or when the answer takes more than about three notes that depend on each other. Otherwise do the work or answer in the reply, and write a note only when [When to write unasked](#when-to-write-unasked) says so.
19
+
20
+ When the person wants to think a problem through, talk first. Offer a Working board once the talk holds more than about five points they want to keep.
21
+
22
+ ## Find the row
23
+
24
+ Match the request to a row by what the person will do with the result. The phrases are examples, and a request that uses none of them still has a row.
25
+
26
+ | Row | Sounds like | The person will | Write | Lay out |
27
+ |---|---|---|---|---|
28
+ | No board | "fix it", "why did we", "remember that", "summarise where we are" | carry on working | the answer, and one note if the capture rule says so | nothing |
29
+ | Decide | "should we", "A or B" | choose | a Problem or Question, one Option each, a Decision once made | Argument board, left to right |
30
+ | Shape | "let's shape", "how should X work", "mock up" | build | Problem, Requirements, rival Options, Slices | options against requirements, then slices in order |
31
+ | Plan | "by when", "the next 12 weeks" | follow a schedule | one Plan per horizon, or one Goal per level | columns, a tree or a strip |
32
+ | Record | "what shipped", "this month's numbers" | look it up later | dated Observations, numbers as tables | one card layout repeated |
33
+ | Explain | "walk me through", "teach me" | learn | one Workflow or Guide | Poster of four to six frames |
34
+ | Explore | "what do we know", "look into" | keep looking | Questions, Claims, dated evidence | question at one edge, evidence under each claim |
35
+ | Digest | "here's the transcript", "what needs me today" | act on what was said | the source whole, then one note per decision, question and commitment | source left, what came out right |
36
+ | Hub | "start here", "one place that shows" | go somewhere else | few notes, links to boards | Map, under about 20 links |
37
+ | Make | "draft", "write the reply", "something to forward" | send or publish | one note per piece, of its type | pieces in publishing order |
38
+ | Review | "assess", "what's weak" | fix it | fixes, comments, and a score only if it will be compared | no new board |
39
+ | Work live | "let's get it out of our heads" | think aloud | text cards now, typed notes before the run ends | Working board, groups named after sorting |
40
+ | Hand off | "I have to stop here" | resume | one handoff note in six parts | one card under the banner |
41
+
42
+ The table names note types a workspace may not have. `cnotes types list` shows the ones it does. Use the nearest type that exists, and `Note` when none fits.
43
+
44
+ ## The rows
45
+
46
+ **No board.** A bug fix, a lookup, a status summary, a question the workspace already answers. Do the work or answer from the notes that exist. A summary of where things stand goes in the reply and is not stored. Check: the reply answers the request, and any note written passes the capture rule and repeats no note that exists.
47
+
48
+ **Decide.** Two or more ways forward and someone has to pick. Write what the choice holds up, one Option per way forward with its cost, and a Decision only when the person has decided: until then a Question carries the lean. A Decision records what the person said, never the wording of the option you offered. When the choice is hard to undo, add a Risk written as a pre-mortem (assume it failed, say why) and a date to revisit. Check: you would sign it as written, and the losing option is stated so that someone who backs it would agree with the wording.
49
+
50
+ **Shape.** The problem is known or nearly known and the solution is not. Write a Problem, a Requirement for each thing any solution must do, two or more rival Options, a sketch of each option when the solution is a screen, a fit check of each option against the requirements, then Slices a builder can plan from. No Plan until one option is picked. Check: every requirement is met or openly dropped, and each slice can be built and shown on its own. The `shaping` skill runs this row and `fat-marker-flows` draws the sketches.
51
+
52
+ **Plan.** The request carries a date, a number of weeks or a target. Write one Plan per horizon: a "Done when" sentence a stranger could check, five to seven steps with an owner and a budget each, what is left out and what would stop it. For a goal worked backwards, write one Goal per level. Lay out as Now, Next and Later columns when confidence matters more than dates, as a tree with one root for a goal worked backwards, or as a left-to-right strip for a calendar. Check: each step has an owner and a budget, and the plan says what would stop it. The `goal-tree` skill runs the goal-backwards form.
53
+
54
+ **Record.** Something already happened and must be found later, including a review or audit someone has already carried out. Write one Observation per event in the past tense, with who, where and when in the first sentence, and numbers as tables. A figure that changes gets a new version of the same note. A fact that stops being true gets a successor note that says when it stopped. Check: every number has its date and its source.
55
+
56
+ **Explain.** The reader has to understand a thing that already exists or is already settled. A picture of something not yet built belongs to Shape. Write one Workflow or Guide that holds the whole thing with its pictures inside, and keep why it works that way in its own Insight. Lay out as a Poster: four to six frames in reading order, one action each. Check: a stranger says back, in their own words, what each frame shows. The `howto-filmstrips` and `teach-workspace` skills run forms of this row.
57
+
58
+ **Explore.** The request is to find out, compare or research, and no choice is on the table yet. Write Questions for what the work must settle, evidence as Observations and Quotes (past tense, with who said it, where and when), and Claims and Insights in the present tense, each naming the evidence it rests on. Keep a claim and its evidence in separate notes, and write what a source found apart from the rule you draw from it. Lay out with the question at one edge, claims next to it and evidence under each. Sort into named groups only when there are about twenty or more items of one kind. Check: every Insight names at least one Observation or Quote, and the claims the work leans on most were checked against the original source, not a summary of it.
59
+
60
+ **Digest.** The request arrives with a source attached: a transcript, a document, a pile of what arrived. Store the source whole and unedited. Then write one note per thing that outlives it: each decision made, each question left open, each commitment with its owner, and Quotes for the lines worth keeping, each linked back to the source. Check: nothing in the extracted notes is missing from the source. The `attention-planner` and `transcript-timeline` skills run forms of this row.
61
+
62
+ **Hub.** A start page or a directory. Write few notes and link to the live boards with portals: a hub points and never copies. When no board yet holds what the hub should point at, build that board first under its own row. Check: a newcomer reaches the board for any live piece of work in one click.
63
+
64
+ **Make.** The thing asked for is the writing itself, and its reader will not open the workspace: a public post, a reply, a pitch, a document someone will forward. Write one note per piece. For a run of pieces add a short schedule. The reasoning behind a piece stays in its own notes and is linked, never pasted in. When the piece needs findings first, run Explore before it. Check: each piece reads aloud as something a person would say ([humanizer.md](humanizer.md)), and nothing in it needs the workspace to be understood.
65
+
66
+ **Review.** The request is to judge, now, something that already exists. Fix what can be fixed and say what changed. For what cannot be fixed without the person, leave a comment on the card it concerns ([reviews-and-comments.md](reviews-and-comments.md)). Write notes only for a score someone will compare later. Run `cnotes canvas status <canvasId>` first: it reports the size of the board's read and its stale links. Check: every finding is fixed, commented on or scored, and none lives only in the chat.
67
+
68
+ **Work live.** The person is thinking aloud and wants it on a board as they go. During the session, short text cards, one idea each. Before the run ends, each card becomes a typed note or is deleted, and one recap note groups the repeats into themes with decisions, owners and actions. Check: no text card left on the board states a claim.
69
+
70
+ **Hand off.** The session will stop before the work does. Write one handoff note in the six parts [operations.md](operations.md#handing-off-mid-work) lists. Check: the next session can say the state back, and the proving command passes on the day it is read.
71
+
72
+ ## Two kinds at once
73
+
74
+ Many requests carry two: find out and then choose, plan and then write it up. Name both. Do first the part the other depends on. The last part owns the board's layout and the earlier part sits in a frame beside it. Use two boards only when the two parts have different readers.
75
+
76
+ ## When the board already exists
77
+
78
+ Read it first. Add to it in the shape it has when the new material fits a row it already follows. When the kind of request has changed, say so and lay the board out again in one run.
79
+
80
+ ## How much to write
81
+
82
+ Once the row is chosen, five questions set how much goes inside it.
83
+
84
+ | Question | What the answer changes |
85
+ |---|---|
86
+ | Is there a test for solved? | With no test, write a Question and something small to try. |
87
+ | Who signs, and can it be undone? | Hard to undo: the full record, a pre-mortem and a date to revisit. Easy to undo: a short note. |
88
+ | How much time is it worth? | With no budget stated, assume this session. Write a Problem and no Plan only when the work plainly will not fit. |
89
+ | Is it a symptom, a cause, or something the person wants done? | To understand a symptom: Observations that end in one Insight. A request to fix it is the No board row. |
90
+ | Does the reader need to act or to understand? | To act: a Guide or a Plan. To understand: an Insight, kept apart from the steps. |
91
+
92
+ The second and third questions are rarely answered in the request. Assume the choice can be undone and the work is worth this session. Ask the person once when a wrong guess would be expensive.
93
+
94
+ ## When to write unasked
95
+
96
+ In the middle of other work, with nobody asking for a note, write one when the next session would otherwise have to be told again:
97
+
98
+ - **You were corrected**, by a person or by your own check. Write the rule that was right.
99
+ - **A decision was made** with its reasons. Write a Decision, and only what the person said.
100
+ - **A fact changed.** Write the new fact as a successor and link it to the note it replaces.
101
+ - **The work is pausing** or the context is about to reset. Write a handoff note.
102
+ - **Something took real effort to find** and would have to be found again.
103
+
104
+ Do not write when the code, the data or an existing note already holds it, when it is passing state (a task id, a status, a summary of the session), when it is a secret, or when nobody will read it again. A shared workspace costs a person attention for every note in it.
105
+
106
+ ## Where the rows come from
107
+
108
+ Eight rows came from sorting published practice on decision records, planning, research notes, storyboards and handoffs. Five (No board, Shape, Digest, Make and Review) came from watching fresh agents fail to place real requests. The counts in the rows are guidelines from practice guides and a few studies, not limits. Fresh agents sorted 24 requests with this table and agreed on 23; the table has not been measured on the boards built from it.