@creator-notes/cnotes 0.82.0 → 0.83.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.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +7 -4
- package/dist/commands/canvas-milestone.d.ts +3 -1
- package/dist/commands/canvas-milestone.d.ts.map +1 -1
- package/dist/commands/canvas-milestone.js +50 -8
- package/dist/commands/canvas-milestone.js.map +1 -1
- package/dist/lib/milestone-message.d.ts +12 -1
- package/dist/lib/milestone-message.d.ts.map +1 -1
- package/dist/lib/milestone-message.js +26 -4
- package/dist/lib/milestone-message.js.map +1 -1
- package/package.json +1 -1
- package/skills/cnotes/SKILL.md +13 -3
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ cnotes search semantic "onboarding flow"
|
|
|
36
36
|
| `cnotes versions list\|create` | `cnotes v` | Note version history |
|
|
37
37
|
| `cnotes canvas list\|get\|create\|delete` | `cnotes c` | Manage canvases |
|
|
38
38
|
| `cnotes canvas place` | | Declarative layout — server packs items with no overlap |
|
|
39
|
-
| `cnotes canvas milestone create\|list\|show` | | Save and
|
|
39
|
+
| `cnotes canvas milestone create\|list\|show\|rename` | | Save, read and rename canvas milestones (git-style message, verb-first headline required; attaches to the active operations run) |
|
|
40
40
|
| `cnotes canvas add-node\|add-text\|add-list\|add-link` | | Add a single node at explicit `--x`/`--y` (`add-richtext` is a deprecated alias of `add-text`) |
|
|
41
41
|
| `cnotes canvas bulk-add\|bulk-move` | | Bulk canvas operations — requires explicit coordinates |
|
|
42
42
|
| `cnotes canvas bulk-remove` | | Take nodes/edges off a canvas (the notes themselves are untouched) |
|
|
@@ -163,12 +163,15 @@ cnotes canvas read <canvasId>
|
|
|
163
163
|
# editing, or to confirm a previous agent run actually applied.
|
|
164
164
|
cnotes canvas activity <canvasId> [--limit 50]
|
|
165
165
|
|
|
166
|
-
# Save a milestone. First line is the timeline headline
|
|
167
|
-
#
|
|
168
|
-
#
|
|
166
|
+
# Save a milestone. First line is the timeline headline: it must start with a
|
|
167
|
+
# past-tense verb and name a specific object ("Shipped the public comic canvas",
|
|
168
|
+
# never "V1"), at most 110 characters; anything else is rejected. A blank line,
|
|
169
|
+
# then the body. The platform may tidy an agent headline. The body is kept.
|
|
170
|
+
# An active operations run is stamped on.
|
|
169
171
|
cnotes canvas milestone create <canvasId> --message "Opened pricing question: charge for agents or the workspace?"
|
|
170
172
|
cnotes canvas milestone list <canvasId>
|
|
171
173
|
cnotes canvas milestone show <milestoneId>
|
|
174
|
+
cnotes canvas milestone rename <milestoneId> -m "Shipped the public comic canvas"
|
|
172
175
|
|
|
173
176
|
# Place items with a declarative layout (preferred — no x/y math)
|
|
174
177
|
cnotes canvas place <canvasId> --spec ./layout.json
|
|
@@ -4,7 +4,9 @@ import type { Command } from "commander";
|
|
|
4
4
|
* web UI writes (`canvasSnapshots` kind "milestone", via createMilestone).
|
|
5
5
|
*
|
|
6
6
|
* The message is one git-style field: first line is the timeline headline,
|
|
7
|
-
* the rest is the body. The
|
|
7
|
+
* the rest is the body. The headline must be verb-first (past-tense verb plus
|
|
8
|
+
* a specific object); the server rejects anything else. The platform may tidy
|
|
9
|
+
* an agent headline. The body is kept.
|
|
8
10
|
* Writes ride the active operations run through X-Agent-Run-Id, the same
|
|
9
11
|
* header every other CLI write sends.
|
|
10
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas-milestone.d.ts","sourceRoot":"","sources":["../../src/commands/canvas-milestone.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASzC
|
|
1
|
+
{"version":3,"file":"canvas-milestone.d.ts","sourceRoot":"","sources":["../../src/commands/canvas-milestone.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASzC;;;;;;;;;;GAUG;AACH,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CA8NvF"}
|
|
@@ -2,7 +2,7 @@ import { ApiClient } from "../lib/api-client.js";
|
|
|
2
2
|
import { milestonesCollectionPath, milestoneShowPath } from "../lib/canvas-paths.js";
|
|
3
3
|
import { resolveConfig } from "../lib/config.js";
|
|
4
4
|
import { handleError } from "../lib/errors.js";
|
|
5
|
-
import { readMilestoneMessage } from "../lib/milestone-message.js";
|
|
5
|
+
import { readMilestoneHeadline, readMilestoneMessage } from "../lib/milestone-message.js";
|
|
6
6
|
import { outputJson, outputQuiet, outputTable, timeAgo, truncate } from "../lib/output.js";
|
|
7
7
|
import { readHeadlineWarnings, reportHeadlineWarnings } from "../lib/headline-warnings.js";
|
|
8
8
|
/**
|
|
@@ -10,7 +10,9 @@ import { readHeadlineWarnings, reportHeadlineWarnings } from "../lib/headline-wa
|
|
|
10
10
|
* web UI writes (`canvasSnapshots` kind "milestone", via createMilestone).
|
|
11
11
|
*
|
|
12
12
|
* The message is one git-style field: first line is the timeline headline,
|
|
13
|
-
* the rest is the body. The
|
|
13
|
+
* the rest is the body. The headline must be verb-first (past-tense verb plus
|
|
14
|
+
* a specific object); the server rejects anything else. The platform may tidy
|
|
15
|
+
* an agent headline. The body is kept.
|
|
14
16
|
* Writes ride the active operations run through X-Agent-Run-Id, the same
|
|
15
17
|
* header every other CLI write sends.
|
|
16
18
|
*/
|
|
@@ -19,8 +21,9 @@ export function registerCanvasMilestoneCommands(canvas, program) {
|
|
|
19
21
|
.command("milestone")
|
|
20
22
|
.description("Save and read canvas milestones. A milestone is a named snapshot of the canvas, like a git tag. " +
|
|
21
23
|
"The message is one field: the first line is the headline shown on the timeline, and the rest is the body. " +
|
|
22
|
-
"The first line is the timeline headline:
|
|
23
|
-
"
|
|
24
|
+
"The first line is the timeline headline: it must start with a past-tense verb and name a specific object in the first 40 characters " +
|
|
25
|
+
"(\"Shipped the public comic canvas\", never \"V1\"). The server rejects anything else. At most 110 characters. " +
|
|
26
|
+
"A blank line, then the body. The platform may tidy an agent headline and leaves the body. " +
|
|
24
27
|
"See https://creatornotes.app/blog/timeline-as-navigation");
|
|
25
28
|
milestone
|
|
26
29
|
.command("create")
|
|
@@ -30,10 +33,12 @@ export function registerCanvasMilestoneCommands(canvas, program) {
|
|
|
30
33
|
.option("-m, --message <text>", "Checkpoint message. First line is the headline; the rest is the body.")
|
|
31
34
|
.option("-F, --message-file <path>", "Read the checkpoint message from a file")
|
|
32
35
|
.addHelpText("after", `
|
|
33
|
-
The headline is a scan-first label, not a summary of the canvas.
|
|
34
|
-
verb
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
The headline is a scan-first label, not a summary of the canvas. It must start
|
|
37
|
+
with a past-tense verb and name a specific object: "Shipped the public comic
|
|
38
|
+
canvas", not "V1". The server rejects a headline that is not verb-first
|
|
39
|
+
(exit code 3) and saves nothing. A one-line message is enough. Add a blank
|
|
40
|
+
line and a body when the reason matters later. Fix a saved headline with
|
|
41
|
+
\`cnotes canvas milestone rename\`.
|
|
37
42
|
|
|
38
43
|
If an operations run is active (cnotes operations begin, or canvas agent-run),
|
|
39
44
|
the save attaches to it and is recorded as that run's actor, not as a human
|
|
@@ -84,6 +89,43 @@ Examples:
|
|
|
84
89
|
handleError(error, cfg.json);
|
|
85
90
|
}
|
|
86
91
|
});
|
|
92
|
+
milestone
|
|
93
|
+
.command("rename")
|
|
94
|
+
.description("Replace a milestone's headline and keep its body. The new headline must start with a past-tense verb " +
|
|
95
|
+
"and name a specific object; the server rejects anything else. Auto-checkpoints cannot be renamed.")
|
|
96
|
+
.argument("<milestoneId>", "Milestone id (the id printed by milestone create or list)")
|
|
97
|
+
.requiredOption("-m, --message <headline>", "New one-line headline, verb-first")
|
|
98
|
+
.addHelpText("after", `
|
|
99
|
+
Examples:
|
|
100
|
+
$ cnotes canvas milestone rename <milestoneId> -m "Shipped the public comic canvas"
|
|
101
|
+
$ cnotes canvas milestone rename <milestoneId> -m "Narrowed pricing to per-seat" --json
|
|
102
|
+
`)
|
|
103
|
+
.action(async (milestoneId, opts) => {
|
|
104
|
+
const cfg = resolveConfig(program.opts());
|
|
105
|
+
const api = new ApiClient(cfg.serverUrl, cfg.token);
|
|
106
|
+
try {
|
|
107
|
+
const headline = readMilestoneHeadline(opts.message);
|
|
108
|
+
const data = await api.patch(milestoneShowPath(milestoneId, cfg.workspaceId), { headline });
|
|
109
|
+
reportHeadlineWarnings(readHeadlineWarnings(data));
|
|
110
|
+
if (cfg.quiet) {
|
|
111
|
+
outputQuiet(String(data.id ?? milestoneId));
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
if (cfg.json) {
|
|
115
|
+
outputJson(data);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
console.log(`Renamed milestone v${data.snapshotNumber}`);
|
|
119
|
+
if (typeof data.previousHeadline === "string" && data.previousHeadline) {
|
|
120
|
+
console.log(` was: ${data.previousHeadline}`);
|
|
121
|
+
}
|
|
122
|
+
console.log(` now: ${data.headline}`);
|
|
123
|
+
console.log(` id: ${data.id}`);
|
|
124
|
+
}
|
|
125
|
+
catch (error) {
|
|
126
|
+
handleError(error, cfg.json);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
87
129
|
milestone
|
|
88
130
|
.command("list")
|
|
89
131
|
.description("List milestones for a canvas, newest first. Auto-checkpoints are not included.")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas-milestone.js","sourceRoot":"","sources":["../../src/commands/canvas-milestone.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"canvas-milestone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kB,CAAC,CAAC,CAAC;YACxD,IAAI,OAAO,GAAG,CAAC,IAAI,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;gBAC7C,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;gBAChB,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACxB,CAAC;YACD,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,UAAU,IAAI,CAAC,YAAY,GAAG,CAAC,aAAa,IAAI,CAAC,eAAe,GAAG,CAAC,YAAY,IAAI,CAAC,UAAU,CAAC;YACvH,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAChB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACpB,OAAO,CAAC,GAAG,CAAC,OAAO,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;YAC7B,OAAO,CAAC,GAAG,CAAC,WAAW,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;QACzC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/** Matches the API cap in lib/api/canvas-milestones.ts. */
|
|
2
2
|
export declare const MILESTONE_MESSAGE_MAX = 8000;
|
|
3
|
+
/** Matches the rename cap in lib/api/canvas-milestones.ts. */
|
|
4
|
+
export declare const MILESTONE_HEADLINE_MAX = 500;
|
|
5
|
+
/** Example the server's rejection also quotes (lib/timeline/headline-lint.ts). */
|
|
6
|
+
export declare const MILESTONE_HEADLINE_EXAMPLE = "Shipped the public comic canvas";
|
|
7
|
+
export declare const VERB_FIRST_HINT: string;
|
|
3
8
|
export interface MilestoneMessage {
|
|
4
9
|
description: string;
|
|
5
10
|
headline: string;
|
|
@@ -7,7 +12,8 @@ export interface MilestoneMessage {
|
|
|
7
12
|
}
|
|
8
13
|
/**
|
|
9
14
|
* Git-style checkpoint message. The first line is the headline; the rest
|
|
10
|
-
* is the body.
|
|
15
|
+
* is the body. The verb-first check runs on the server, the one place the
|
|
16
|
+
* web app, CLI and agents share.
|
|
11
17
|
*/
|
|
12
18
|
export declare function splitMilestoneMessage(raw: string): MilestoneMessage;
|
|
13
19
|
export interface MilestoneMessageInput {
|
|
@@ -23,4 +29,9 @@ export interface MilestoneMessageInput {
|
|
|
23
29
|
* on stdin.
|
|
24
30
|
*/
|
|
25
31
|
export declare function readMilestoneMessage(input: MilestoneMessageInput): Promise<MilestoneMessage>;
|
|
32
|
+
/**
|
|
33
|
+
* A rename replaces only the headline, so it takes one line. The verb-first
|
|
34
|
+
* check runs on the server.
|
|
35
|
+
*/
|
|
36
|
+
export declare function readMilestoneHeadline(raw: string | undefined): string;
|
|
26
37
|
//# sourceMappingURL=milestone-message.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"milestone-message.d.ts","sourceRoot":"","sources":["../../src/lib/milestone-message.ts"],"names":[],"mappings":"AAIA,2DAA2D;AAC3D,eAAO,MAAM,qBAAqB,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"milestone-message.d.ts","sourceRoot":"","sources":["../../src/lib/milestone-message.ts"],"names":[],"mappings":"AAIA,2DAA2D;AAC3D,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAE1C,8DAA8D;AAC9D,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,kFAAkF;AAClF,eAAO,MAAM,0BAA0B,oCAAoC,CAAC;AAE5E,eAAO,MAAM,eAAe,QAKkC,CAAC;AAE/D,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAwBnE;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACpC,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;CACvC;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAwBlG;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAkBrE"}
|
|
@@ -3,14 +3,19 @@ import { readStdin } from "./stdin.js";
|
|
|
3
3
|
import { ValidationError } from "./errors.js";
|
|
4
4
|
/** Matches the API cap in lib/api/canvas-milestones.ts. */
|
|
5
5
|
export const MILESTONE_MESSAGE_MAX = 8000;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
/** Matches the rename cap in lib/api/canvas-milestones.ts. */
|
|
7
|
+
export const MILESTONE_HEADLINE_MAX = 500;
|
|
8
|
+
/** Example the server's rejection also quotes (lib/timeline/headline-lint.ts). */
|
|
9
|
+
export const MILESTONE_HEADLINE_EXAMPLE = "Shipped the public comic canvas";
|
|
10
|
+
export const VERB_FIRST_HINT = "The headline must start with a past-tense verb and name a specific object " +
|
|
11
|
+
`(for example: "${MILESTONE_HEADLINE_EXAMPLE}", never "V1"). The server rejects anything else. ` +
|
|
8
12
|
"The first line is the timeline label (at most 110 characters); a blank line, then the body. " +
|
|
9
|
-
"The platform may
|
|
13
|
+
"The platform may tidy an agent headline. The body is kept. " +
|
|
10
14
|
"See https://creatornotes.app/blog/timeline-as-navigation";
|
|
11
15
|
/**
|
|
12
16
|
* Git-style checkpoint message. The first line is the headline; the rest
|
|
13
|
-
* is the body.
|
|
17
|
+
* is the body. The verb-first check runs on the server, the one place the
|
|
18
|
+
* web app, CLI and agents share.
|
|
14
19
|
*/
|
|
15
20
|
export function splitMilestoneMessage(raw) {
|
|
16
21
|
const normalized = raw.replace(/\r\n/g, "\n");
|
|
@@ -63,4 +68,21 @@ export async function readMilestoneMessage(input) {
|
|
|
63
68
|
}
|
|
64
69
|
return splitMilestoneMessage(raw);
|
|
65
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* A rename replaces only the headline, so it takes one line. The verb-first
|
|
73
|
+
* check runs on the server.
|
|
74
|
+
*/
|
|
75
|
+
export function readMilestoneHeadline(raw) {
|
|
76
|
+
const headline = (raw ?? "").trim();
|
|
77
|
+
if (!headline) {
|
|
78
|
+
throw new ValidationError("A new headline is required. Pass --message.", VERB_FIRST_HINT);
|
|
79
|
+
}
|
|
80
|
+
if (/[\r\n]/.test(headline)) {
|
|
81
|
+
throw new ValidationError("A milestone rename takes a one-line headline. The body is kept as it is.", VERB_FIRST_HINT);
|
|
82
|
+
}
|
|
83
|
+
if (headline.length > MILESTONE_HEADLINE_MAX) {
|
|
84
|
+
throw new ValidationError(`Milestone headline is too long (${headline.length} characters; max ${MILESTONE_HEADLINE_MAX}).`, VERB_FIRST_HINT);
|
|
85
|
+
}
|
|
86
|
+
return headline;
|
|
87
|
+
}
|
|
66
88
|
//# sourceMappingURL=milestone-message.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"milestone-message.js","sourceRoot":"","sources":["../../src/lib/milestone-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,2DAA2D;AAC3D,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAE1C,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"milestone-message.js","sourceRoot":"","sources":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,CAAC;QAC7B,MAAM,IAAI,GAAG,KAAK,CAAC,aAAa,IAAI,SAAS,CAAC;QAC9C,GAAG,GAAG,MAAM,IAAI,EAAE,CAAC;IACrB,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,eAAe,CACvB,gGAAgG,EAChG,eAAe,CAChB,CAAC;IACJ,CAAC;IAED,OAAO,qBAAqB,CAAC,GAAG,CAAC,CAAC;AACpC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,GAAuB;IAC3D,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACpC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,eAAe,CAAC,6CAA6C,EAAE,eAAe,CAAC,CAAC;IAC5F,CAAC;IACD,IAAI,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,eAAe,CACvB,0EAA0E,EAC1E,eAAe,CAChB,CAAC;IACJ,CAAC;IACD,IAAI,QAAQ,CAAC,MAAM,GAAG,sBAAsB,EAAE,CAAC;QAC7C,MAAM,IAAI,eAAe,CACvB,mCAAmC,QAAQ,CAAC,MAAM,oBAAoB,sBAAsB,IAAI,EAChG,eAAe,CAChB,CAAC;IACJ,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/package.json
CHANGED
package/skills/cnotes/SKILL.md
CHANGED
|
@@ -553,9 +553,11 @@ cnotes canvas from-template <templateId> --populate # Auto-populat
|
|
|
553
553
|
|
|
554
554
|
# Milestones — the same canvasSnapshots rows the web UI saves (kind "milestone").
|
|
555
555
|
# The message is one field: the first line is the timeline headline, a blank
|
|
556
|
-
# line, then the body.
|
|
557
|
-
#
|
|
558
|
-
#
|
|
556
|
+
# line, then the body. The headline MUST start with a past-tense verb and name a
|
|
557
|
+
# specific object in the first 40 characters ("Shipped the public comic canvas",
|
|
558
|
+
# never "V1"); the server rejects anything else with exit code 3 and saves
|
|
559
|
+
# nothing. Headline at most 110 characters. The platform may tidy an agent
|
|
560
|
+
# headline and leaves the body. `headlineWarnings` comes back on the JSON response.
|
|
559
561
|
# See https://creatornotes.app/blog/timeline-as-navigation
|
|
560
562
|
# An AI summary is stored separately and does not replace this message.
|
|
561
563
|
# If an operations run is active, the save attaches to it and records that run's
|
|
@@ -565,6 +567,7 @@ cnotes canvas milestone create <canvasId> --message-file ./milestone.txt
|
|
|
565
567
|
cnotes canvas milestone list <canvasId>
|
|
566
568
|
cnotes canvas milestone list <canvasId> --json
|
|
567
569
|
cnotes canvas milestone show <milestoneId>
|
|
570
|
+
cnotes canvas milestone rename <milestoneId> -m "Shipped the public comic canvas" # new headline, body kept
|
|
568
571
|
|
|
569
572
|
# Agent-run bracketing — group a sequence of canvas changes into one operation
|
|
570
573
|
# with before/after snapshots so the user can see "AI did X" and revert as a unit.
|
|
@@ -1054,6 +1057,13 @@ For any canvas you only *added to* (you already hold its id, so you didn't re-`g
|
|
|
1054
1057
|
- The display ID prefix is **auto-derived** from the display name: spaces become hyphens, all uppercase (e.g., display name "Pain Point" → prefix `PAIN-POINT`, display name "Idea" → prefix `IDEA`).
|
|
1055
1058
|
- Prefix is **immutable** once notes of that type exist. To change a note's type, use `cnotes notes retype <displayId> --type <NewType>`.
|
|
1056
1059
|
|
|
1060
|
+
### Milestone headlines
|
|
1061
|
+
|
|
1062
|
+
Agents creating or editing canvas milestones (`cnotes canvas milestone create` / `rename`, the REST routes, or the web save dialog) must use a headline that starts with a past-tense verb and names a specific object, e.g. `Shipped the public comic canvas`, never `V1`. The rule is enforced: a milestone create or rename whose headline is not verb-first, or names no object, is rejected (exit code 3) and nothing is saved. Read the error, rewrite the first line, and retry. To fix a milestone that is already saved, run `cnotes canvas milestone rename <milestoneId> -m "<headline>"`; it replaces the headline and keeps the body.
|
|
1063
|
+
|
|
1064
|
+
- Good: `Shipped the public comic canvas`, `Narrowed pricing to per-seat`, `Dropped the onboarding survey`
|
|
1065
|
+
- Rejected: `V1`, `Launch prep`, `The board after review`, `Shipped`
|
|
1066
|
+
|
|
1057
1067
|
### Decisions
|
|
1058
1068
|
|
|
1059
1069
|
Anything settled in conversation that shapes what we build or say publicly gets its own Decision card, citing the cards it depends on (typed links such as depends-on / grounded-in). If something is stated as decided but no Decision card exists, say so and create one.
|