@creator-notes/cnotes 0.121.1 → 0.121.4
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.
- package/.claude-plugin/plugin.json +1 -1
- package/dist/commands/files.js +3 -10
- package/dist/commands/goals.js +17 -9
- package/dist/lib/auth-store.js +0 -23
- package/dist/lib/image-types.js +9 -1
- package/dist/lib/quality.js +0 -23
- package/dist/mcp-server.js +2 -9
- package/package.json +1 -1
- package/skills/attention-planner/references/orientation-canvas.md +5 -2
- package/skills/cnotes/SKILL.md +3 -3
- package/skills/cnotes/references/canvas-elements.md +30 -10
- package/skills/cnotes/references/canvas-layout.md +6 -5
- package/skills/cnotes/references/canvas.md +2 -0
- package/skills/goal-tree/SKILL.md +1 -1
- package/skills/shaping/SKILL.md +1 -1
- package/skills/teach-workspace/SKILL.md +1 -1
- package/skills/transcript-timeline/SKILL.md +2 -1
- package/skills/transcript-timeline/references/layout.md +14 -6
- package/skills/wayfind/SKILL.md +1 -1
package/dist/commands/files.js
CHANGED
|
@@ -5,16 +5,9 @@ import { resolveConfig } from "../lib/config.js";
|
|
|
5
5
|
import { handleError, ValidationError, ApiError, CliError, EXIT_CODES, } from "../lib/errors.js";
|
|
6
6
|
import { outputJson, outputQuiet } from "../lib/output.js";
|
|
7
7
|
import { extractStorageId } from "../lib/storage-id.js";
|
|
8
|
-
import { unsupportedImageTypeMessage } from "../lib/image-types.js";
|
|
8
|
+
import { UPLOAD_MIME_BY_EXT, unsupportedImageTypeMessage } from "../lib/image-types.js";
|
|
9
9
|
const MAX_FILE_SIZE = 5 * 1024 * 1024; // 5MB
|
|
10
|
-
|
|
11
|
-
".jpg": "image/jpeg",
|
|
12
|
-
".jpeg": "image/jpeg",
|
|
13
|
-
".png": "image/png",
|
|
14
|
-
".gif": "image/gif",
|
|
15
|
-
".webp": "image/webp",
|
|
16
|
-
};
|
|
17
|
-
// Reverse of MIME_MAP plus a few extra read-only types, for naming downloads.
|
|
10
|
+
// Reverse of UPLOAD_MIME_BY_EXT plus a few extra read-only types, for naming downloads.
|
|
18
11
|
const EXT_BY_MIME = {
|
|
19
12
|
"image/jpeg": "jpg",
|
|
20
13
|
"image/png": "png",
|
|
@@ -24,7 +17,7 @@ const EXT_BY_MIME = {
|
|
|
24
17
|
};
|
|
25
18
|
function getMimeType(filePath) {
|
|
26
19
|
const ext = path.extname(filePath).toLowerCase();
|
|
27
|
-
return
|
|
20
|
+
return UPLOAD_MIME_BY_EXT[ext];
|
|
28
21
|
}
|
|
29
22
|
function formatBytes(bytes) {
|
|
30
23
|
if (bytes < 1024)
|
package/dist/commands/goals.js
CHANGED
|
@@ -16,6 +16,8 @@ import { formatDoneParts } from "../lib/done-parts.js";
|
|
|
16
16
|
* every run re-reads the graph, so the tree cannot drift from the notes.
|
|
17
17
|
*/
|
|
18
18
|
const MAX_GOALS = 100;
|
|
19
|
+
/** Goals read side by side while walking the tree. */
|
|
20
|
+
const LOAD_AT_ONCE = 8;
|
|
19
21
|
const isGoalType = (type) => typeof type === "string" && type.trim().toLowerCase() === "goal";
|
|
20
22
|
async function loadGoal(api, workspaceId, displayId) {
|
|
21
23
|
const [notes, rels, placed] = await Promise.all([
|
|
@@ -115,17 +117,23 @@ Examples:
|
|
|
115
117
|
if (!isGoalType(root.type)) {
|
|
116
118
|
throw new ValidationError(`${displayId} is a ${root.type || "untyped"} note. A goal tree starts at a Goal note; create one with \`cnotes notes create --type Goal\`.`);
|
|
117
119
|
}
|
|
120
|
+
// Breadth first, a few goals at a time: each goal is three or four
|
|
121
|
+
// reads, so one at a time made a 20-goal tree 60+ round trips in a row.
|
|
118
122
|
const nodes = new Map([[root.displayId, root]]);
|
|
119
|
-
|
|
123
|
+
let queue = [...root.children];
|
|
120
124
|
while (queue.length > 0 && nodes.size < MAX_GOALS) {
|
|
121
|
-
const
|
|
122
|
-
if (
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
125
|
+
const batch = [...new Set(queue.filter((id) => !nodes.has(id)))].slice(0, Math.min(LOAD_AT_ONCE, MAX_GOALS - nodes.size));
|
|
126
|
+
if (batch.length === 0)
|
|
127
|
+
break;
|
|
128
|
+
queue = queue.filter((id) => !nodes.has(id) && !batch.includes(id));
|
|
129
|
+
const loaded = await Promise.all(batch.map((id) => loadGoal(api, cfg.workspaceId, id)));
|
|
130
|
+
batch.forEach((id, i) => {
|
|
131
|
+
const node = loaded[i];
|
|
132
|
+
if (!node || nodes.has(id))
|
|
133
|
+
return;
|
|
134
|
+
nodes.set(id, node);
|
|
135
|
+
queue.push(...node.children.filter((c) => !nodes.has(c)));
|
|
136
|
+
});
|
|
129
137
|
}
|
|
130
138
|
const view = deriveGoalTree(root.displayId, nodes);
|
|
131
139
|
if (nodes.size >= MAX_GOALS)
|
package/dist/lib/auth-store.js
CHANGED
|
@@ -343,29 +343,6 @@ export function listOpenAgentRuns(config, serverUrl) {
|
|
|
343
343
|
}))
|
|
344
344
|
.sort((a, b) => a.startedAt - b.startedAt);
|
|
345
345
|
}
|
|
346
|
-
/**
|
|
347
|
-
* Clear the active agent-run for a server. Called by `cnotes operations end` /
|
|
348
|
-
* `cnotes canvas agent-run end` after a successful close, so the next cnotes
|
|
349
|
-
* write reverts to "unattached" unless the user opens a new run.
|
|
350
|
-
*/
|
|
351
|
-
export function clearActiveAgentRunId(config, serverUrl) {
|
|
352
|
-
mutateServerConfig(config, serverUrl, (sc) => {
|
|
353
|
-
if (!(sc.activeAgentRunId || sc.activeAgentRunStartedAt || sc.activeAgentBeforeSnapshotId)) {
|
|
354
|
-
return false;
|
|
355
|
-
}
|
|
356
|
-
// The active run has ended, so it leaves the open-run registry with the
|
|
357
|
-
// pointer. Detached runs in the registry are untouched: they are other
|
|
358
|
-
// agents' business.
|
|
359
|
-
if (sc.activeAgentRunId && sc.agentRuns && sc.activeAgentRunId in sc.agentRuns) {
|
|
360
|
-
delete sc.agentRuns[sc.activeAgentRunId];
|
|
361
|
-
if (Object.keys(sc.agentRuns).length === 0)
|
|
362
|
-
delete sc.agentRuns;
|
|
363
|
-
}
|
|
364
|
-
delete sc.activeAgentRunId;
|
|
365
|
-
delete sc.activeAgentRunStartedAt;
|
|
366
|
-
delete sc.activeAgentBeforeSnapshotId;
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
346
|
/**
|
|
370
347
|
* Read the active agent-run for a server (if any). `beforeSnapshotId` is
|
|
371
348
|
* present only for canvas runs (see the field docs on ServerConfig).
|
package/dist/lib/image-types.js
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/** The image types the server stores, by extension: what `files upload` and `cnotes_files_upload` send. */
|
|
2
|
+
export const UPLOAD_MIME_BY_EXT = {
|
|
3
|
+
".jpg": "image/jpeg",
|
|
4
|
+
".jpeg": "image/jpeg",
|
|
5
|
+
".png": "image/png",
|
|
6
|
+
".gif": "image/gif",
|
|
7
|
+
".webp": "image/webp",
|
|
8
|
+
};
|
|
1
9
|
/**
|
|
2
10
|
* The refusal `files upload` and the stdio MCP server's `cnotes_files_upload`
|
|
3
11
|
* give for a file the server will not store. SVG gets its own reason because
|
|
@@ -11,5 +19,5 @@ export function unsupportedImageTypeMessage(ext) {
|
|
|
11
19
|
return ("SVG isn't accepted, because an SVG file can carry scripts. Convert it to PNG first " +
|
|
12
20
|
"(for example `rsvg-convert -o diagram.png diagram.svg`) and upload the PNG.");
|
|
13
21
|
}
|
|
14
|
-
return `Unsupported file type: ${ext}. Allowed: .
|
|
22
|
+
return `Unsupported file type: ${ext}. Allowed: ${Object.keys(UPLOAD_MIME_BY_EXT).join(", ")}`;
|
|
15
23
|
}
|
package/dist/lib/quality.js
CHANGED
|
@@ -168,29 +168,6 @@ export function gradeFromStored(note) {
|
|
|
168
168
|
gradedBy: stored.gradedBy,
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
/** @deprecated Server Check quality responses. Kept so a stored body still maps. */
|
|
172
|
-
export function gradeFromResponse(body) {
|
|
173
|
-
if (body.outcome === "graded" && typeof body.level === "number") {
|
|
174
|
-
return {
|
|
175
|
-
outcome: "graded",
|
|
176
|
-
level: body.level,
|
|
177
|
-
label: LADDER_LABELS[body.level] ?? `Level ${body.level}`,
|
|
178
|
-
isTopRung: body.level >= LADDER_TOP,
|
|
179
|
-
feedback: String(body.feedback ?? ""),
|
|
180
|
-
nextStep: String(body.nextStep ?? ""),
|
|
181
|
-
suggestions: Array.isArray(body.suggestions) ? body.suggestions.map(String) : [],
|
|
182
|
-
criteria: readCriteria(body.criteria),
|
|
183
|
-
gradedBy: typeof body.gradedBy === "string" ? body.gradedBy : null,
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
if (body.outcome === "needs_agent") {
|
|
187
|
-
return { outcome: "needs_agent", reason: String(body.reason ?? AGENT_GRADE_INSTRUCTION) };
|
|
188
|
-
}
|
|
189
|
-
return {
|
|
190
|
-
outcome: "skipped",
|
|
191
|
-
reason: String(body.reason ?? body.skipReason ?? "not graded"),
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
171
|
/** The payload handed to the calling agent: rubric, note, and how to record. */
|
|
195
172
|
export function gradeRequestFor(note, rubric) {
|
|
196
173
|
const criteriaExample = JSON.stringify([{ criterion: "<name>", reason: "<why>" }]);
|
package/dist/mcp-server.js
CHANGED
|
@@ -39,7 +39,7 @@ import { runQuery } from "./commands/query.js";
|
|
|
39
39
|
import { inToolRun } from "./lib/mcp-run.js";
|
|
40
40
|
import { isLocalDbEnabled } from "./lib/auth-store.js";
|
|
41
41
|
import { explainTruncation, listNotes, SERVER_LIST_CAP } from "./lib/notes-list.js";
|
|
42
|
-
import { unsupportedImageTypeMessage } from "./lib/image-types.js";
|
|
42
|
+
import { UPLOAD_MIME_BY_EXT, unsupportedImageTypeMessage } from "./lib/image-types.js";
|
|
43
43
|
// ---------------------------------------------------------------------------
|
|
44
44
|
// Environment
|
|
45
45
|
// ---------------------------------------------------------------------------
|
|
@@ -1449,13 +1449,6 @@ api.post(`/api/workspaces/${workspaceId}/trial`, { source: "mcp-stdio" })));
|
|
|
1449
1449
|
// ---------------------------------------------------------------------------
|
|
1450
1450
|
// Files
|
|
1451
1451
|
// ---------------------------------------------------------------------------
|
|
1452
|
-
const FILE_MIME_MAP = {
|
|
1453
|
-
".jpg": "image/jpeg",
|
|
1454
|
-
".jpeg": "image/jpeg",
|
|
1455
|
-
".png": "image/png",
|
|
1456
|
-
".gif": "image/gif",
|
|
1457
|
-
".webp": "image/webp",
|
|
1458
|
-
};
|
|
1459
1452
|
server.tool("cnotes_files_upload", "Upload an image file to the workspace. Returns the public URL. Supports .jpg, .jpeg, .png, .gif, .webp (max 5MB). Convert an SVG to PNG first.", {
|
|
1460
1453
|
filePath: z.string().describe("Absolute path to the image file on disk"),
|
|
1461
1454
|
}, async ({ filePath }) => withErrorHandling(async () => {
|
|
@@ -1473,7 +1466,7 @@ server.tool("cnotes_files_upload", "Upload an image file to the workspace. Retur
|
|
|
1473
1466
|
if (stat.size > 5 * 1024 * 1024)
|
|
1474
1467
|
throw new Error(`File too large (${stat.size} bytes). Maximum is 5MB.`);
|
|
1475
1468
|
const ext = path.extname(absPath).toLowerCase();
|
|
1476
|
-
const mimeType =
|
|
1469
|
+
const mimeType = UPLOAD_MIME_BY_EXT[ext];
|
|
1477
1470
|
if (!mimeType)
|
|
1478
1471
|
throw new Error(unsupportedImageTypeMessage(ext));
|
|
1479
1472
|
const buffer = readFileSync(absPath);
|
package/package.json
CHANGED
|
@@ -33,7 +33,9 @@ sections size themselves around their content, so no coordinates.
|
|
|
33
33
|
| `3 · Advances` | The Project, Decision, or Customer the card names in `advances`, with a text card saying what becomes true if the block succeeds and which external send still needs a yes | from the card: `advances` |
|
|
34
34
|
| `Where things live` (bottom) | Portals: the work board the card came from and the home board | none |
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
The hero at the top: `richtext` large, untinted, `# <card title>` shortened to
|
|
37
|
+
under 50 characters, the one line legible at zoom-to-fit. The banner directly
|
|
38
|
+
under it: `richtext` medium, untinted, no heading, at most five sentences, in the
|
|
37
39
|
cnotes skill's banner order (hard rule 7 in its `references/canvas-elements.md`): what happened,
|
|
38
40
|
what this board is for, who answers and where, how to read it. Then the lines
|
|
39
41
|
only this canvas needs: the block day and time, "answer on the card", where the
|
|
@@ -68,7 +70,8 @@ then project it.
|
|
|
68
70
|
```json
|
|
69
71
|
{ "placement": "exact", "origin": { "x": 100, "y": 100 },
|
|
70
72
|
"root": { "kind": "stack", "axis": "vertical", "gap": "spacious", "items": [
|
|
71
|
-
{ "kind": "item", "type": "richtext", "size": "
|
|
73
|
+
{ "kind": "item", "type": "richtext", "size": "large", "content": "# <card title, under 50 characters>" },
|
|
74
|
+
{ "kind": "item", "type": "richtext", "size": "medium", "content": "<what happened>\n<what this board decides>\n<who answers, on the card>\n<Day HH:MM> · Read left to right; portals below." },
|
|
72
75
|
{ "kind": "stack", "axis": "horizontal", "gap": "spacious", "align": "start", "items": [
|
|
73
76
|
{ "kind": "section", "name": "1 · Came from", "child": { "kind": "stack", "axis": "vertical", "gap": "medium", "items": [
|
|
74
77
|
{ "kind": "item", "type": "note", "noteId": "<DIGEST>", "key": "src" },
|
package/skills/cnotes/SKILL.md
CHANGED
|
@@ -21,8 +21,8 @@ Every note and canvas you write is context: what the next reader, a teammate or
|
|
|
21
21
|
4. **Write to the type's rubric.** Pick the type, run `cnotes types show <Type>`, and author to its rubric. 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.
|
|
22
22
|
5. **Create notes in one batch.** `cnotes notes create --notes '[{"key":"A","type":"Insight","markdownFile":"./a.md"}, ...]'`. Each body starts with a `# h1` (the title). Cross-link inside the batch with `[@A: Title](relationship:<verb>)`. Detail: [references/notes.md](references/notes.md).
|
|
23
23
|
6. **Grade what you wrote.** `cnotes quality <displayIds...> --fail-below 4`, then revise weak notes with `cnotes versions create <id> --description "<what changed>" --markdown-file <path>`.
|
|
24
|
-
7. **Lay out the canvas.** `cnotes canvas place <canvasId> --spec layout.json` packs items without overlap. A spec can carry the notes too (see the fast path below), which folds steps 5 and 7 into one call. For a new canvas, `canvas create --spec` takes the same spec, so creating the canvas, its notes and its layout is one call. Read [references/canvas-elements.md](references/canvas-elements.md) before choosing elements and [references/canvas-layout.md](references/canvas-layout.md) before writing the spec.
|
|
25
|
-
8. **Read it back.** `cnotes canvas read <canvasId>`: every claim must appear in a note with a display ID, and the banner must make sense to someone who was not in the session. A write that touches no canvas gets the same test: `cnotes notes get <id> --expand` on what you wrote, read as the next session will, without this conversation.
|
|
24
|
+
7. **Lay out the canvas.** `cnotes canvas place <canvasId> --spec layout.json` packs items without overlap. A spec can carry the notes too (see the fast path below), which folds steps 5 and 7 into one call. For a new canvas, `canvas create --spec` takes the same spec, so creating the canvas, its notes and its layout is one call. Every canvas opens with a hero: one `large` untinted text card at the top-left, above everything, holding `# <the goal's result>` in under 50 characters, with the four-line banner under it at `medium`. It is the only text legible at zoom-to-fit. Read [references/canvas-elements.md](references/canvas-elements.md) (rules 7 and 9) before choosing elements and [references/canvas-layout.md](references/canvas-layout.md) before writing the spec.
|
|
25
|
+
8. **Read it back.** `cnotes canvas read <canvasId>`: every claim must appear in a note with a display ID, the hero must name the goal's result, and the banner must make sense to someone who was not in the session. A write that touches no canvas gets the same test: `cnotes notes get <id> --expand` on what you wrote, read as the next session will, without this conversation.
|
|
26
26
|
9. **Close the run.** `cnotes operations end`.
|
|
27
27
|
10. **Link the result.** End your reply with the canvas link (see [Surfacing the canvas link](#surfacing-the-canvas-link)).
|
|
28
28
|
|
|
@@ -52,7 +52,7 @@ A new canvas with its notes and layout is one write. Read first, in parallel (`c
|
|
|
52
52
|
|
|
53
53
|
`cnotes canvas create "Q1 · Roadmap" --goal "<goal>" --audience "<who>" --spec spec.json --intent "Built the Q1 roadmap canvas"`
|
|
54
54
|
|
|
55
|
-
The spec is the same document `canvas place` takes, `notes` array included, and the result carries the placement under `layout`. The spec is checked before the canvas exists, and a layout the server refuses removes the canvas again, so a bad file, a missing run or a refused layout creates nothing: fix the spec and run the same command again.
|
|
55
|
+
The spec is the same document `canvas place` takes, `notes` array included, and the result carries the placement under `layout`. Its root is a vertical stack that opens with the hero (`{"kind":"item","type":"richtext","size":"large","content":"# <the goal's result>"}`), then the `medium` banner, then the board. The spec is checked before the canvas exists, and a layout the server refuses removes the canvas again, so a bad file, a missing run or a refused layout creates nothing: fix the spec and run the same command again.
|
|
56
56
|
|
|
57
57
|
Other writes that belong together (notes on two canvases, a change that needs several kinds of command) still go in one `operations begin`/`end` run, so the timeline shows one change. Open [references/canvas-layout.md](references/canvas-layout.md) only when the layout needs anchors, origins or several sections; the rules above and step 7 below cover the rest.
|
|
58
58
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Canvas elements: what goes where
|
|
2
2
|
|
|
3
|
-
Read this before building or changing a canvas. It decides which element holds what, the hard rules, the orientation banner and the three completion tests.
|
|
3
|
+
Read this before building or changing a canvas. It decides which element holds what, the hard rules, the hero and orientation banner and the three completion tests.
|
|
4
4
|
|
|
5
5
|
## Contents
|
|
6
6
|
|
|
7
7
|
- [Decision table](#decision-table)
|
|
8
|
-
- [Hard rules (each one has burned a real canvas)](#hard-rules-each-one-has-burned-a-real-canvas), including colour roles (rule 6), the banner (rule 7)
|
|
8
|
+
- [Hard rules (each one has burned a real canvas)](#hard-rules-each-one-has-burned-a-real-canvas), including colour roles (rule 6), the hero and banner (rule 7), quotes (rule 8) and the size ladder (rule 9)
|
|
9
9
|
- [Three completion tests](#three-completion-tests)
|
|
10
10
|
- [Worked example](#worked-example)
|
|
11
11
|
- [Current platform limitations](#current-platform-limitations-re-check-before-relying-on-these)
|
|
@@ -37,7 +37,8 @@ A canvas holds two tiers of content, and the difference is load-bearing:
|
|
|
37
37
|
| N distinct things (questions, risks, options, findings) | **N notes** grouped in a **list**; `--description` = one-line frame | bullets in one text element or in a list `--description` |
|
|
38
38
|
| A named REGION of the canvas ("Shaping", "Open Questions") | a **section** frame (`add-section`) — draggable region, mention-addressable as `[[SECTION-<n>]]` from note bodies | a floating text heading over an implied area |
|
|
39
39
|
| A heading / one-line label where a frame is too heavy (a column header inside a frame, a lane key) | a **text** element holding a markdown heading — `add-text --content '# Q1 Goals'`, no `--color` (leave it untinted), title case | a tinted card, or a section frame for something that isn't a region |
|
|
40
|
-
|
|
|
40
|
+
| The board's goal, readable at zoom-to-fit | one `large` untinted **text** hero at the top-left, `# <the goal's result>`, shaped by rule 7 | a `medium` heading standing in for it, the canvas name repeated, a tinted hero |
|
|
41
|
+
| Orientation: what happened, what the board is for, how to read it | one `medium` **text** banner per canvas, directly under the hero, shaped by rule 7 (a band may add a one-line one) | a paragraph banner, a reading-order-only banner, a Guide note |
|
|
41
42
|
| Emphasis — restating a key claim for screen presence | a **text** element that QUOTES a note (the note stays the home) | the text element as the only copy |
|
|
42
43
|
| An image tile (logo, mockup, screenshot) | a **text** element holding the image, beside the owning note; embed the same image in the note body via `cnotes files upload <path> --markdown` so the note stays self-contained | the image as the knowledge itself |
|
|
43
44
|
| A grid of images for review (mood board) | N text-element image tiles in a `grid` place spec + ONE note holding the decision criteria / rationale for the set | a caption note per tile, or rationale in the tiles |
|
|
@@ -50,7 +51,7 @@ A canvas holds two tiers of content, and the difference is load-bearing:
|
|
|
50
51
|
|
|
51
52
|
1. **A canvas element must never be the sole home of a claim.** Verdict tallies, dates, scan provenance, and even a moat-defining sentence have each been authored as text elements — then cited downstream while being unversioned, unsearchable, and uncitable. If a text element says something true and useful, a note says it first; the text element may quote the note. (Canvas-specific wayfinding — how to read THIS canvas — is the one exemption; it has no off-canvas value.)
|
|
52
53
|
2. **Name notes and canvases from text elements with relationship mentions, never bare ids.** `[NOTE-12: Title](relationship:references)` inside a text element renders as a mention chip carrying the target's real title (a list description renders the same mention as a labelled span). "See RISK-64" as plain prose is a defect: the reader gets no title and no link. Pick the relationship type from the verb the sentence uses and reuse the workspace vocabulary. The chip is presentational: it creates no graph relationship, is not searchable, and is not versioned, so a relationship that must survive off the canvas still lives as a mention in a NOTE body (rule 5).
|
|
53
|
-
3. **A text element is capped at card size**: at most 3 sentences, one heading at most, never a list of distinct knowledge items (questions, risks, findings — those are N notes; a 3-line color legend or lane key is fine). The one exception is the orientation banner (
|
|
54
|
+
3. **A text element is capped at card size**: at most 3 sentences, one heading at most, never a list of distinct knowledge items (questions, risks, findings — those are N notes; a 3-line color legend or lane key is fine). The one exception is the orientation banner (four short lines, rule 7). A heading-only text element (`--content '# Q1 Goals'`, or the hero) is of course fine — that is the smallest legitimate use. The cap is physical as much as doctrinal: a text element renders its full content inline, so long blocks explode the canvas — one canvas hit 43,000px tall from eight text reference blocks and had to be rebuilt as notes.
|
|
54
55
|
4. **Detail's HOME is the note body; text detail cards are projections.** Write the full spec/content INTO each note's body first. A parallel text card under a note is allowed only as a projection — it condenses or quotes a note that already contains everything, and says so ("from STAGE-3"). A detail card whose content exists nowhere else is the anti-pattern: one teaching canvas carried its entire method in text cards over one-line stub notes, and an agent reading it back got seven stubs and no method.
|
|
55
56
|
5. **Edges can connect any node type** (note, text, list, canvas-link, section — plus legacy heading nodes), as long as both endpoints are on the same canvas; labels are short verb phrases ("fixes", "grounds", "depends on"). A section endpoint is addressed by its SECTION-n handle (or the frame's node id), and the edge anchors to the frame's border — use one when the relationship's endpoint is genuinely the whole region ("this cluster feeds that stage"), not as a shortcut for a note-to-note link. `canvas read` returns edges, so they are no longer invisible on read-back — but an edge is still CANVAS-LOCAL: it is not part of the note graph, never appears in `rel list`, is not searchable, and means nothing once you leave this canvas. So any relationship **between notes** that must survive off the canvas has to ALSO exist as a mention inside the note bodies. The mention is the copy that travels; the edge is the copy you can see. Edges to text/list/canvas-link nodes are diagram decoration (pointing a label at a cluster, wiring a portal) and carry no note-to-note relationship to mirror.
|
|
56
57
|
6. **Color is a ROLE or it is absent.** Default neutral — a text element has NO background unless you pass `--color`, and that is usually the right look (an untinted heading is just type on the canvas). When a tint does mean something, pick from the six role hexes and reuse ONE role per meaning, 2–4 roles per canvas max:
|
|
@@ -66,9 +67,18 @@ A canvas holds two tiers of content, and the difference is load-bearing:
|
|
|
66
67
|
|
|
67
68
|
Do not hand-pick a hex outside this table: the renderer snaps every tint to the nearest role by hue, so an off-palette color does not get you a new shade — it just picks a role imprecisely (`#c2410c` lands on Danger, not Warning). A tint colors the CARD only; text inside it keeps the normal prose colors, so the tint can never make a card harder to read. If you cannot name the role, omit the color.
|
|
68
69
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
Neutral is the default, not the goal. A board where no card carries a role hides its caveat and its commitment among cards that all look alike. When the board has a caveat that could sink the plan, a piece of decided work or the one aha, tint those one to three cards by role. The hero and every heading stay untinted.
|
|
71
|
+
|
|
72
|
+
7. **The hero and the banner open every canvas.**
|
|
73
|
+
A cold reader sees them first, often only them.
|
|
74
|
+
|
|
75
|
+
**The hero** is one `large` untinted text card at the top-left, above every section and band, holding a single heading: `# <the goal's result in a few words>`. Nothing else goes in it. It is the one line a person can read at zoom-to-fit: real boards fit the screen at 14 to 29% zoom, where a large heading paints at 17 to 37px, a medium one at 8 to 16px and a small one at 4 to 9px. So a board without a large hero shows nothing legible at the glance.
|
|
76
|
+
- Keep the heading under 50 characters. A large line holds about 25, so 50 is two lines and a card about 600px tall; a full goal sentence as the heading runs to five lines and about 1000px.
|
|
77
|
+
- Name the result, not the board: "Agents read the canvas first", not "Ports canvas" or "Overview". No clever names, and never just the canvas name, which the title bar already shows.
|
|
78
|
+
- The full goal sentences stay in `canvas create --goal`; the hero is their result, so the two never drift.
|
|
79
|
+
- One hero per canvas. A section or band heading is never `large` (rule 9).
|
|
80
|
+
|
|
81
|
+
**The banner** sits directly under the hero: one `medium` untinted text card, no heading (the hero is its heading).
|
|
72
82
|
Write one line each, in this order, no paragraphs:
|
|
73
83
|
1. **What happened.** Dated, with names a stranger can look up. "On 19 Sep 2026 Deniss asked why CreatorNotes logs what people open but not what agents read."
|
|
74
84
|
2. **What it's for.** The decision or artifact the board produces.
|
|
@@ -80,21 +90,31 @@ A canvas holds two tiers of content, and the difference is load-bearing:
|
|
|
80
90
|
Wayfind and Attention canvases add their own lines after these four, never instead.
|
|
81
91
|
|
|
82
92
|
8. **Quotes carry a board's best lines.** A board of same-shaped cards hides its point. After the notes are placed, find the 2–4 sentences the board rests on (a customer's own words, the reason inside a Decision, the number that changes the story) and `add-quote` each from its source note. Each lands beside its source as a Quote note (QUOTE-<n>) that other boards can reuse.
|
|
83
|
-
- **Size is hierarchy.** One `large` quote per board: the line everything rests on. `medium` for one to three supporting lines. `small` for evidence beside the card it backs. Never two
|
|
93
|
+
- **Size is hierarchy (rule 9).** One `large` quote per board: the line everything rests on. `medium` for one to three supporting lines. `small` for evidence beside the card it backs. Never two large quotes; the hero is the only other large card.
|
|
84
94
|
- **Style follows the job.** `pull` for a line that stands alone. `highlight` when the words need their sentence around them. `evidence` for data or an excerpt backing a claim next to it.
|
|
85
95
|
- **Colour follows rule 6, by meaning.** `insight` for the hero line, `evidence` for customer words and data, `warning` for the caveat that could sink the plan, `people` for a stakeholder speaking. Most quotes stay untinted; tint two at most.
|
|
86
96
|
- **Every quote is cited by a claim on the board.** A wall of lines nobody interpreted is a pile, not an argument. About one quote per five notes is plenty.
|
|
87
97
|
- **Words from outside the workspace** (a call, a Slack thread, an AI reply) become a Quote note directly: `notes create` with type `Quote`, the words in a blockquote, then a `from <who>, <where>, <date>` line. Place it like any note and style it with `style-quote`.
|
|
88
98
|
|
|
99
|
+
9. **Three sizes make three layers.** A text card's `size` sets its type as well as its width (headings 30, 56 and 128px; body 14, 24 and 48px), so size is how a board says what to read first, second and third. A board where every text card is the same size reads as one flat layer.
|
|
100
|
+
|
|
101
|
+
| Size | Holds | How many |
|
|
102
|
+
|---|---|---|
|
|
103
|
+
| `large` | the hero (rule 7) and the one large quote (rule 8) | one hero, at most one quote |
|
|
104
|
+
| `medium` | the banner, band and column headings, supporting quotes | a few |
|
|
105
|
+
| `small` | projections, annotations and lane keys beside the card they speak for | as many as the cards need |
|
|
106
|
+
|
|
107
|
+
Pick the size by reach: a band heading at `large` competes with the hero, and an annotation at `medium` outshouts the note it backs. Colour (rule 6) adds the second axis: size says how far a line reaches, the role tint says what kind of line it is.
|
|
108
|
+
|
|
89
109
|
## Three completion tests
|
|
90
110
|
|
|
91
111
|
Run all three before ending your operation:
|
|
92
112
|
|
|
93
113
|
**The read-back test (for the next agent):** run `cnotes canvas read` and check that every claim is present as a NOTE section with a display ID, and the reasoning can be followed through note bodies and their mentions. Content that appears only as anonymous text-element prose fails the test even when visible — nothing can cite, search, or version it. List members read back as ID+title links without bodies; that is fine — the IDs are citable and batch-fetchable via `cnotes notes get`. As a heuristic for working canvases, at least ~4 notes per text element (zero text elements is fine); fewer means text elements are carrying content. Explainer canvases using the projection pattern (rule 4) are exempt from the ratio, not from the test.
|
|
94
114
|
|
|
95
|
-
**The glance test (for the human):** zoomed to fit, a person should grasp what this canvas argues and where to start reading in about 10 seconds. A canvas that passes read-back but renders as an undifferentiated card grid is also not done — that is what section labels, orientation banners, projections, and layout are for.
|
|
115
|
+
**The glance test (for the human):** zoomed to fit, a person should grasp what this canvas argues and where to start reading in about 10 seconds. A canvas that passes read-back but renders as an undifferentiated card grid is also not done — that is what the hero, section labels, orientation banners, projections, and layout are for. Fail it when there is no `large` hero at the top-left (rule 7) or when every text card is the same size (rule 9).
|
|
96
116
|
|
|
97
|
-
**The cold-reader test.** Cover everything but the banner.
|
|
117
|
+
**The cold-reader test.** Cover everything but the hero and the banner.
|
|
98
118
|
Can a stranger say what happened, what the board produces, and who acts?
|
|
99
119
|
Fail it if the banner only gives reading order, uses unnamed referents, or runs as a paragraph.
|
|
100
120
|
Test the banner text itself, not your memory of the run.
|
|
@@ -70,7 +70,7 @@ The schema is strict: an unknown or typo'd key anywhere in the doc (e.g. `gapp`,
|
|
|
70
70
|
|
|
71
71
|
Leaf enums (exact values): richtext `size` = `small` | `medium` | `large`, `colorHex` = a saturated hex (omit for no background); list `viewMode` = `list` | `grid`, list `size` = `sm` | `md` | `lg` | `xl`.
|
|
72
72
|
|
|
73
|
-
A richtext `size` is not a hint — it IS the width the card paints: `small` 560px, `medium` 1120px, `large` 1680px, with the height following the content. `place` measures that box for you, which is the whole reason to prefer it over hand-picked coordinates: pitch a row of columns for `small` and then send `medium` items and every card runs 460px into its neighbour.
|
|
73
|
+
A richtext `size` is not a hint — it IS the width the card paints: `small` 560px, `medium` 1120px, `large` 1680px, with the height following the content. It sets the type too (headings 30, 56 and 128px; body 14, 24 and 48px), which is why the hero is `large` and an annotation `small` ([canvas-elements.md](canvas-elements.md) rules 7 and 9). A large hero under 50 characters is about 600px tall; a four-line `medium` banner without a heading about 375px. `place` measures that box for you, which is the whole reason to prefer it over hand-picked coordinates: pitch a row of columns for `small` and then send `medium` items and every card runs 460px into its neighbour.
|
|
74
74
|
|
|
75
75
|
## Section container (frame WITH content — preferred)
|
|
76
76
|
|
|
@@ -198,15 +198,16 @@ Edges live at the top level alongside `root`. Each endpoint is resolved in this
|
|
|
198
198
|
- Bands are freeform on purpose. Do not wrap them in a section container: a section re-arranges itself, and a bands board is placed once and then edited by hand.
|
|
199
199
|
- To add a band to an existing bands board, `place` one band with the default placement; it lands below what is there. To reflow the cards already on the board into bands, send the same document to `canvas arrange --spec` with `"type": "existing"` leaves (older heading cards are `"nodeType": "text"`), an `origin` at the board's top-left and `"placement": "exact"`. Run it with `--dry-run` first and check that the `bbox` bottom stays above anything below the bands, such as a section.
|
|
200
200
|
|
|
201
|
-
**Fan-out under
|
|
201
|
+
**Fan-out under the hero and banner** (the failure case the agent kept getting wrong). Every new canvas opens this way: the `large` hero first, then the `medium` banner with no heading of its own, then the board:
|
|
202
202
|
```json
|
|
203
203
|
{
|
|
204
204
|
"root": {
|
|
205
205
|
"kind": "stack", "axis": "vertical", "gap": "medium",
|
|
206
206
|
"items": [
|
|
207
|
-
{ "kind": "item", "type": "richtext",
|
|
208
|
-
"content": "#
|
|
209
|
-
|
|
207
|
+
{ "kind": "item", "type": "richtext", "size": "large",
|
|
208
|
+
"content": "# Four goals we will hit by March" },
|
|
209
|
+
{ "kind": "item", "type": "richtext", "size": "medium",
|
|
210
|
+
"content": "On 3 Jan 2026 the team agreed four goals for Q1.\nThis board is what we commit to and who owns each goal.\nAna reviews progress weekly on each goal card.\nRead left to right." },
|
|
210
211
|
{ "kind": "grid", "columns": 4,
|
|
211
212
|
"items": [
|
|
212
213
|
{ "kind": "item", "type": "note", "noteId": "GOAL-1" },
|
|
@@ -109,6 +109,8 @@ cnotes canvas add-node <canvasId> --note <noteId> [--section SECTION-<n>] # NO
|
|
|
109
109
|
# text = free-form markdown on the canvas (wire type: richtext): headings, emphasis,
|
|
110
110
|
# images, and `[NOTE-12: Title](relationship:verb)` mentions, which render as chips.
|
|
111
111
|
# No background unless you pass --color. A heading is `--content '# Q1 Goals'`.
|
|
112
|
+
# --size sets the type as well as the width (headings 30/56/128px). Every canvas opens with a
|
|
113
|
+
# `large` untinted hero, `# <the goal's result>` under 50 chars (canvas-elements.md rule 7).
|
|
112
114
|
cnotes canvas add-text <canvasId> --content "<markdown>" [--size small|medium|large] [--color "<hex>"] [--section SECTION-<n>] # inline (short only)
|
|
113
115
|
cnotes canvas add-text <canvasId> --content-file <path.md> [--size small|medium|large] [--color "<hex>"] [--section SECTION-<n>]
|
|
114
116
|
cnotes canvas add-richtext ... # DEPRECATED alias of add-text (identical flags). Use add-text.
|
|
@@ -107,7 +107,7 @@ A good leaf goal: `Decide which phone-section bugs ship in the next PR. Done whe
|
|
|
107
107
|
6. **Lay out the tree canvas**: `cnotes canvas create "<Outcome> · Goal Tree" --goal "<the root's two sentences>"`,
|
|
108
108
|
then one `cnotes canvas place` spec with one column per depth, root on the
|
|
109
109
|
right, each Goal note in its column, and "depends on" edges from parent to
|
|
110
|
-
child.
|
|
110
|
+
child. The `large` hero first (the root goal's result in under 50 characters, cnotes hard rule 7), then the banner in the cnotes skill's banner order: what happened, what
|
|
111
111
|
the tree decides, who works it, how to read it (right to left).
|
|
112
112
|
7. **Read it back.** `cnotes goals tree <root>` must list every goal with no
|
|
113
113
|
"To fix" lines you can repair. Then close the run and give the user the tree
|
package/skills/shaping/SKILL.md
CHANGED
|
@@ -232,7 +232,7 @@ breadboard as context.
|
|
|
232
232
|
`cnotes canvas create "<Effort> · Shaping" --goal "<goal from the model table>" --audience "<who decides, who builds>"`.
|
|
233
233
|
Create the notes in one batch (`cnotes notes create --notes "$(cat batch.json)"`),
|
|
234
234
|
cross-linked with `@key` placeholders, then lay out the sections with one
|
|
235
|
-
`cnotes canvas place` spec.
|
|
235
|
+
`cnotes canvas place` spec. The `large` hero first (what the shape achieves, in under 50 characters, cnotes hard rule 7), then the banner in the cnotes skill's banner
|
|
236
236
|
order: what happened and who asked, what this board decides, who decides
|
|
237
237
|
it, how to read it.
|
|
238
238
|
7. **Iterate with the user** on requirements and shapes until the fit check
|
|
@@ -122,7 +122,7 @@ The learner names a subject: a canvas, an area, a project.
|
|
|
122
122
|
"<goal>" --audience "<learner, and what they will do with it>"`, then the
|
|
123
123
|
Mission note, the Sources note and the starting-point records in one
|
|
124
124
|
`cnotes notes create` batch, then one `cnotes canvas place` spec with the
|
|
125
|
-
banner and the four sections. The banner follows the cnotes skill's banner
|
|
125
|
+
`large` hero (the mission in under 50 characters, cnotes hard rule 7), the banner under it and the four sections. The banner follows the cnotes skill's banner
|
|
126
126
|
order (rule 7 in its `references/canvas-elements.md`): who asked and why,
|
|
127
127
|
the mission in the learner's words, how a session runs, how the four frames
|
|
128
128
|
read.
|
|
@@ -70,7 +70,8 @@ commands.
|
|
|
70
70
|
Contradictions also link each other with `relationship:contradicts`.
|
|
71
71
|
8. **Build the canvas.** Each edit is its own command:
|
|
72
72
|
- `cnotes canvas create "<name>" --goal "Show what <who> said about <topic>, in order. Done when every extract sits in its theme row at its timestamp."`
|
|
73
|
-
- the
|
|
73
|
+
- the hero: `cnotes canvas add-text <canvasId> --content "# <Interviewee role> at <Company> on <topic>" --size large --x 0 --y 0` (under 50 characters)
|
|
74
|
+
- the banner: `cnotes canvas add-text <canvasId> --content-file banner.md --size medium --x 0 --y 680` (HERO_H in [references/layout.md](references/layout.md))
|
|
74
75
|
- one `cnotes canvas add-section <canvasId> --name "<theme>" --x 0 --y <rowY> --width <w> --height <h>` per row
|
|
75
76
|
(add-section takes `--x/--y` directly; no follow-up `update-section` needed)
|
|
76
77
|
- one `cnotes canvas add-node <canvasId> --note <ID> --x <x> --y <y>` per card, coordinates from [references/layout.md](references/layout.md)
|
|
@@ -11,7 +11,8 @@ Position carries meaning, so cards use raw `--x/--y` from the math below.
|
|
|
11
11
|
| PX_PER_MIN | 120 | a 30-minute call is 3,600px wide |
|
|
12
12
|
| LEFT | 80 | inset inside a row frame |
|
|
13
13
|
| ROW_GAP | 80 | between frames |
|
|
14
|
-
|
|
|
14
|
+
| HERO_H | 680 | the banner's y: a large hero under 50 characters renders about 600px tall, plus an 80px gap |
|
|
15
|
+
| BANNER_H | 1060 | space reserved above row one: HERO_H plus the three-line medium banner (about 265px tall) and slack |
|
|
15
16
|
|
|
16
17
|
## Timestamp to x
|
|
17
18
|
|
|
@@ -38,18 +39,25 @@ in the lowest lane whose last card ends at least CARD_W to its left (lane 0, 1,
|
|
|
38
39
|
stop stacking, and merge nothing: grow the row instead. Never nudge x to make
|
|
39
40
|
room; a shifted card lies about when it was said.
|
|
40
41
|
|
|
41
|
-
##
|
|
42
|
+
## Hero and banner
|
|
42
43
|
|
|
43
|
-
|
|
44
|
+
The hero: a large text element at `x = 0, y = 0`, no colour, one heading under
|
|
45
|
+
50 characters. It is the one line legible when the whole timeline is zoomed to fit:
|
|
44
46
|
|
|
45
47
|
```
|
|
46
|
-
# <Interviewee role> at <Company>
|
|
47
|
-
|
|
48
|
+
# <Interviewee role> at <Company> on <topic>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The banner: a medium text element at `x = 0, y = HERO_H`. Three short lines, no
|
|
52
|
+
colour, no heading (the hero is its heading):
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
<Interviewer> interviewed them on <date> for <N> minutes.
|
|
48
56
|
Rows are themes; each card quotes them at the moment they said it.
|
|
49
57
|
Read left to right.
|
|
50
58
|
```
|
|
51
59
|
|
|
52
|
-
Line
|
|
60
|
+
Line 2 may instead name who acts on the board. The last line is always the
|
|
53
61
|
bare `Read left to right.`
|
|
54
62
|
|
|
55
63
|
## Optional time ruler
|
package/skills/wayfind/SKILL.md
CHANGED
|
@@ -135,7 +135,7 @@ The user arrives with a loose idea.
|
|
|
135
135
|
short fog note per dim patch. Read the Question rubric first; each ticket
|
|
136
136
|
states the question, what it gates, and your lean where you have one. Tag
|
|
137
137
|
`wayfind` plus the mode.
|
|
138
|
-
5. **Place the map** in one `cnotes canvas place` spec: orientation banner,
|
|
138
|
+
5. **Place the map** in one `cnotes canvas place` spec: the `large` hero (the destination in under 50 characters, cnotes hard rule 7), the orientation banner under it,
|
|
139
139
|
the four sections with their contents, blocking edges (blocker → dependent,
|
|
140
140
|
label "blocks"). Banner is at most five sentences in the cnotes skill's banner
|
|
141
141
|
order (hard rule 7 in its `references/canvas-elements.md`): what happened and who asked,
|