@creator-notes/cnotes 0.21.1 → 0.23.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/dist/cn.js +5 -0
- package/dist/cn.js.map +1 -1
- package/dist/commands/skills.d.ts +3 -0
- package/dist/commands/skills.d.ts.map +1 -0
- package/dist/commands/skills.js +96 -0
- package/dist/commands/skills.js.map +1 -0
- package/dist/commands/upgrade.d.ts +13 -0
- package/dist/commands/upgrade.d.ts.map +1 -0
- package/dist/commands/upgrade.js +83 -0
- package/dist/commands/upgrade.js.map +1 -0
- package/dist/lib/errors.js +1 -1
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/install-skill.d.ts +28 -0
- package/dist/lib/install-skill.d.ts.map +1 -1
- package/dist/lib/install-skill.js +51 -1
- package/dist/lib/install-skill.js.map +1 -1
- package/package.json +1 -1
- package/skills/fat-marker-flows/SKILL.md +194 -0
- package/skills/fat-marker-flows/examples/01-timeline-view.png +0 -0
- package/skills/fat-marker-flows/examples/02-switch-manual-drag.png +0 -0
- package/skills/fat-marker-flows/examples/03-flip-back-nothing-lost.png +0 -0
- package/skills/fat-marker-flows/examples/04-by-theme-zoom-out.png +0 -0
- package/skills/fat-marker-flows/examples/05-ask-for-a-view.png +0 -0
- package/skills/fat-marker-flows/examples/06-save-as-lens.png +0 -0
package/dist/cn.js
CHANGED
|
@@ -9,6 +9,7 @@ import { refreshInstalledSkills } from "./lib/install-skill.js";
|
|
|
9
9
|
import { registerAuthCommands } from "./commands/auth.js";
|
|
10
10
|
import { registerConfigCommands } from "./commands/config.js";
|
|
11
11
|
import { registerWorkspaceCommands } from "./commands/workspace.js";
|
|
12
|
+
import { registerUpgradeCommand } from "./commands/upgrade.js";
|
|
12
13
|
import { registerNotesCommands } from "./commands/notes.js";
|
|
13
14
|
import { registerVersionsCommands } from "./commands/versions.js";
|
|
14
15
|
import { registerCanvasCommands } from "./commands/canvas.js";
|
|
@@ -24,6 +25,7 @@ import { registerSchemaCommand } from "./commands/schema.js";
|
|
|
24
25
|
import { registerThemeCommands } from "./commands/theme.js";
|
|
25
26
|
import { registerOperationsCommands } from "./commands/operations.js";
|
|
26
27
|
import { registerFeedbackCommands } from "./commands/feedback.js";
|
|
28
|
+
import { registerSkillsCommands } from "./commands/skills.js";
|
|
27
29
|
import { registerClaudeHookCommand } from "./commands/claude-hook.js";
|
|
28
30
|
import { loadConfig, getServerConfig } from "./lib/auth-store.js";
|
|
29
31
|
import { handleError } from "./lib/errors.js";
|
|
@@ -43,6 +45,7 @@ Examples:
|
|
|
43
45
|
$ cnotes notes get MEETING-12 PRD-3 IDEA-7
|
|
44
46
|
$ cnotes search semantic "user retention" --limit 5
|
|
45
47
|
$ cnotes canvas place <canvasId> --spec ./layout.json
|
|
48
|
+
$ cnotes skills install fat-marker # add the storyboard skill to your agent
|
|
46
49
|
$ cnotes notes list --fields displayId,title,type # trim output to chosen keys
|
|
47
50
|
$ cnotes schema --json # describe types, relationships, exit codes
|
|
48
51
|
|
|
@@ -58,6 +61,7 @@ registerInitCommand(program);
|
|
|
58
61
|
registerAuthCommands(program);
|
|
59
62
|
registerConfigCommands(program);
|
|
60
63
|
registerWorkspaceCommands(program);
|
|
64
|
+
registerUpgradeCommand(program);
|
|
61
65
|
registerNotesCommands(program);
|
|
62
66
|
registerVersionsCommands(program);
|
|
63
67
|
registerCanvasCommands(program);
|
|
@@ -72,6 +76,7 @@ registerSchemaCommand(program);
|
|
|
72
76
|
registerThemeCommands(program);
|
|
73
77
|
registerOperationsCommands(program);
|
|
74
78
|
registerFeedbackCommands(program);
|
|
79
|
+
registerSkillsCommands(program);
|
|
75
80
|
registerClaudeHookCommand(program);
|
|
76
81
|
// Default action: show help + first-run hint when invoked with no arguments
|
|
77
82
|
program.action(() => {
|
package/dist/cn.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cn.js","sourceRoot":"","sources":["../src/cn.ts"],"names":[],"mappings":";AAEA,OAAO,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A,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiCpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqF7D"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { resolveBaseConfig } from "../lib/config.js";
|
|
2
|
+
import { handleError, ValidationError } from "../lib/errors.js";
|
|
3
|
+
import { outputJson } from "../lib/output.js";
|
|
4
|
+
import { SKILL_CATALOG, SKILL_TARGETS, resolveCatalogSkill, hasAgentConfigDir, installSkillFolder, skillTargetLabel, } from "../lib/install-skill.js";
|
|
5
|
+
/**
|
|
6
|
+
* Decide which agents to install for. An explicit `--agent` wins; otherwise
|
|
7
|
+
* install for every agent the user already uses (its config dir exists), and
|
|
8
|
+
* if they use neither yet, set both up so the skill is there whichever harness
|
|
9
|
+
* they fire up first.
|
|
10
|
+
*/
|
|
11
|
+
function resolveTargets(agentOpt) {
|
|
12
|
+
if (agentOpt) {
|
|
13
|
+
const a = agentOpt.trim().toLowerCase();
|
|
14
|
+
if (a === "all")
|
|
15
|
+
return [...SKILL_TARGETS];
|
|
16
|
+
if (a === "claude" || a === "codex")
|
|
17
|
+
return [a];
|
|
18
|
+
throw new ValidationError(`Unknown --agent "${agentOpt}". Use claude, codex, or all.`);
|
|
19
|
+
}
|
|
20
|
+
const detected = SKILL_TARGETS.filter(hasAgentConfigDir);
|
|
21
|
+
return detected.length ? detected : [...SKILL_TARGETS];
|
|
22
|
+
}
|
|
23
|
+
export function registerSkillsCommands(program) {
|
|
24
|
+
const skills = program
|
|
25
|
+
.command("skills")
|
|
26
|
+
.description("Install bundled agent skills (e.g. fat-marker flows) into Claude Code or Codex");
|
|
27
|
+
skills
|
|
28
|
+
.command("list")
|
|
29
|
+
.description("List the skills this CLI can install")
|
|
30
|
+
.action(() => {
|
|
31
|
+
const cfg = resolveBaseConfig(program.opts());
|
|
32
|
+
if (cfg.json) {
|
|
33
|
+
outputJson(SKILL_CATALOG.map((s) => ({
|
|
34
|
+
name: s.name,
|
|
35
|
+
aliases: s.aliases,
|
|
36
|
+
label: s.label,
|
|
37
|
+
description: s.description,
|
|
38
|
+
auto: s.auto,
|
|
39
|
+
})));
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
console.log("Installable skills:\n");
|
|
43
|
+
for (const s of SKILL_CATALOG) {
|
|
44
|
+
const aka = s.aliases.length ? ` (aka ${s.aliases.join(", ")})` : "";
|
|
45
|
+
console.log(` ${s.name}${aka}`);
|
|
46
|
+
console.log(` ${s.description}`);
|
|
47
|
+
if (s.auto)
|
|
48
|
+
console.log(" auto-installed by `cnotes init`");
|
|
49
|
+
console.log("");
|
|
50
|
+
}
|
|
51
|
+
console.log("Install one with: cnotes skills install <name>");
|
|
52
|
+
});
|
|
53
|
+
skills
|
|
54
|
+
.command("install <name>")
|
|
55
|
+
.description("Install a bundled skill into your agent's skills dir")
|
|
56
|
+
.option("--agent <agent>", "Which agent to install for: claude, codex, or all (default: auto-detect)")
|
|
57
|
+
.addHelpText("after", `
|
|
58
|
+
Examples:
|
|
59
|
+
$ cnotes skills install fat-marker
|
|
60
|
+
$ cnotes skills install fat-marker --agent codex
|
|
61
|
+
$ cnotes skills install fat-marker --agent all`)
|
|
62
|
+
.action((name, options) => {
|
|
63
|
+
const cfg = resolveBaseConfig(program.opts());
|
|
64
|
+
try {
|
|
65
|
+
const skill = resolveCatalogSkill(name);
|
|
66
|
+
if (!skill) {
|
|
67
|
+
const known = SKILL_CATALOG.map((s) => s.name).join(", ");
|
|
68
|
+
throw new ValidationError(`Unknown skill "${name}". Available: ${known}.`);
|
|
69
|
+
}
|
|
70
|
+
const targets = resolveTargets(options.agent);
|
|
71
|
+
const results = targets.map((t) => installSkillFolder(skill.name, t));
|
|
72
|
+
if (cfg.json) {
|
|
73
|
+
outputJson({ skill: skill.name, results });
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
for (const r of results) {
|
|
77
|
+
const label = skillTargetLabel(r.target);
|
|
78
|
+
if (r.alreadyUpToDate) {
|
|
79
|
+
console.log(`✓ ${skill.label} already up to date for ${label} (${r.destPath})`);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
console.log(`✓ Installed ${skill.label} for ${label} → ${r.destPath}`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
// fat-marker also needs an authed workspace to place its filmstrip.
|
|
86
|
+
if (skill.name === "fat-marker-flows") {
|
|
87
|
+
console.log("");
|
|
88
|
+
console.log('Next: cnotes auth login then ask your agent to "fat-marker this flow".');
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
handleError(error, cfg.json);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=skills.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/commands/skills.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EACL,aAAa,EACb,aAAa,EAEb,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,yBAAyB,CAAC;AAEjC;;;;;GAKG;AACH,SAAS,cAAc,CAAC,QAAiB;IACvC,IAAI,QAAQ,EAAE,CAAC;QACb,MAAM,CAAC,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QACxC,IAAI,CAAC,KAAK,KAAK;YAAE,OAAO,CAAC,GAAG,aAAa,CAAC,CAAC;QAC3C,IAAI,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,OAAO;YAAE,OAAO,CAAC,CAAC,CAAC,CAAC;QAChD,MAAM,IAAI,eAAe,CACvB,oBAAoB,QAAQ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AAI,EAAE,OAAO,EAAE,CAAC,CAAC;gBAC3C,OAAO;YACT,CAAC;YAED,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;gBACxB,MAAM,KAAK,GAAG,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;gBACzC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;oBACtB,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,KAAK,2BAA2B,KAAK,KAAK,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC;gBAClF,CAAC;qBAAM,CAAC;oBACN,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,CAAC,KAAK,QAAQ,KAAK,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;gBACzE,CAAC;YACH,CAAC;YAED,oEAAoE;YACpE,IAAI,KAAK,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;gBACtC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;gBAChB,OAAO,CAAC,GAAG,CAAC,2EAA2E,CAAC,CAAC;YAC3F,CAAC;QACH,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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
/**
|
|
3
|
+
* `cnotes upgrade` (alias `cnotes trial`)
|
|
4
|
+
*
|
|
5
|
+
* CLI and API writes require a Pro workspace. When a write hits the free-plan
|
|
6
|
+
* gate (exit code 8, serverCode subscription_required), this command lets the
|
|
7
|
+
* workspace OWNER unblock themselves in one step: it starts the one-time,
|
|
8
|
+
* 7-day, no-credit-card Pro trial on the active workspace, then they re-run
|
|
9
|
+
* their command. If the trial was already used, it points at (and, for an
|
|
10
|
+
* interactive human, opens) the billing page to subscribe with a card.
|
|
11
|
+
*/
|
|
12
|
+
export declare function registerUpgradeCommand(program: Command): void;
|
|
13
|
+
//# sourceMappingURL=upgrade.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../src/commands/upgrade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAepC;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqF7D"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { ApiClient } from "../lib/api-client.js";
|
|
2
|
+
import { resolveConfig } from "../lib/config.js";
|
|
3
|
+
import { handleError, ApiError } from "../lib/errors.js";
|
|
4
|
+
import { outputJson } from "../lib/output.js";
|
|
5
|
+
/**
|
|
6
|
+
* `cnotes upgrade` (alias `cnotes trial`)
|
|
7
|
+
*
|
|
8
|
+
* CLI and API writes require a Pro workspace. When a write hits the free-plan
|
|
9
|
+
* gate (exit code 8, serverCode subscription_required), this command lets the
|
|
10
|
+
* workspace OWNER unblock themselves in one step: it starts the one-time,
|
|
11
|
+
* 7-day, no-credit-card Pro trial on the active workspace, then they re-run
|
|
12
|
+
* their command. If the trial was already used, it points at (and, for an
|
|
13
|
+
* interactive human, opens) the billing page to subscribe with a card.
|
|
14
|
+
*/
|
|
15
|
+
export function registerUpgradeCommand(program) {
|
|
16
|
+
program
|
|
17
|
+
.command("upgrade")
|
|
18
|
+
.alias("trial")
|
|
19
|
+
.description("Start the free 7-day Pro trial on the active workspace (no credit card) so CLI/API writes work")
|
|
20
|
+
.addHelpText("after", `
|
|
21
|
+
Examples:
|
|
22
|
+
$ cnotes upgrade # start the free Pro trial on the active workspace
|
|
23
|
+
$ cnotes upgrade -w <id> # target a specific workspace
|
|
24
|
+
$ cnotes upgrade --json # machine-readable result
|
|
25
|
+
|
|
26
|
+
Notes:
|
|
27
|
+
CLI and API writes require Pro. This starts the one-time, 7-day, no-credit-card
|
|
28
|
+
trial on your active workspace, then you can retry your command. Only the
|
|
29
|
+
workspace owner can start the trial. If the trial is already used, you'll be
|
|
30
|
+
pointed to the billing page to subscribe ($49/mo).
|
|
31
|
+
`)
|
|
32
|
+
.action(async () => {
|
|
33
|
+
const opts = program.opts();
|
|
34
|
+
const cfg = resolveConfig(opts); // requires a token + an active workspace
|
|
35
|
+
const api = new ApiClient(cfg.serverUrl, cfg.token);
|
|
36
|
+
const billingUrl = `${cfg.serverUrl.replace(/\/$/, "")}/workspace/${cfg.workspaceId}/billing`;
|
|
37
|
+
try {
|
|
38
|
+
const res = await api.post(`/api/workspaces/${cfg.workspaceId}/trial`, {});
|
|
39
|
+
if (cfg.json) {
|
|
40
|
+
outputJson(res);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (res.outcome === "already_active") {
|
|
44
|
+
console.log("This workspace is already on Pro (or has an active trial). CLI and API writes are unlocked. " +
|
|
45
|
+
"Re-run your command; if it still fails, it is not a billing issue.");
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const ends = res.trialEndsAt
|
|
49
|
+
? new Date(res.trialEndsAt).toLocaleDateString()
|
|
50
|
+
: undefined;
|
|
51
|
+
console.log(`Pro trial started${ends ? `, active until ${ends}` : ""}. ` +
|
|
52
|
+
`This is your one free 7-day trial and cannot be restarted. ` +
|
|
53
|
+
`CLI and API writes are unlocked. Re-run your command.`);
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
// Trial already used: the only path is a card subscription (browser-only
|
|
57
|
+
// Stripe checkout). For an interactive human, open the billing page;
|
|
58
|
+
// otherwise fall through to the standard error handling so agents get a
|
|
59
|
+
// clean exit code + the upgrade URL in the hint.
|
|
60
|
+
if (error instanceof ApiError &&
|
|
61
|
+
error.serverCode === "trial_used" &&
|
|
62
|
+
process.stdout.isTTY &&
|
|
63
|
+
!cfg.json) {
|
|
64
|
+
// Use the CLI's own origin (cfg.serverUrl), not the server-built
|
|
65
|
+
// upgradeUrl, which derives from appUrl() and can point at the wrong
|
|
66
|
+
// host on self-hosted/dev where NEXT_PUBLIC_APP_URL is unset.
|
|
67
|
+
const url = billingUrl;
|
|
68
|
+
console.log("Your free Pro trial has already been used on this workspace.");
|
|
69
|
+
console.log(`Opening the billing page to subscribe: ${url}`);
|
|
70
|
+
try {
|
|
71
|
+
const open = (await import("open")).default;
|
|
72
|
+
await open(url);
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
/* headless — the printed URL is the fallback */
|
|
76
|
+
}
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
handleError(error, cfg.json);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=upgrade.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upgrade.js","sourceRoot":"","sources":["../../src/commands/upgrade.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAW9C;;;;;;;;;GASG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAgB;IACrD,OAAO;SACJ,OAAO,CAAC,SAAS,CAAC;SAClB,KAAK,CAAC,OAAO,CAAC;SACd,WAAW,CACV,gGAAgG,CACjG;SACA,WAAW,CACV,OAAO,EACP;;;;;;;;;;;CAWL,CACI;SACA,MAAM,CAAC,KAAK,IAAI,EAAE;QACjB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;QAC5B,MAAM,GAAG,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,yCAAyC;QAC1E,MAAM,GAAG,GAAG,IAAI,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,C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,CAAC,GAAG,CAAC,0CAA0C,GAAG,EAAE,CAAC,CAAC;gBAC7D,IAAI,CAAC;oBACH,MAAM,IAAI,GAAG,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;oBAC5C,MAAM,IAAI,CAAC,GAAG,CAAC,CAAC;gBAClB,CAAC;gBAAC,MAAM,CAAC;oBACP,gDAAgD;gBAClD,CAAC;gBACD,OAAO;YACT,CAAC;YACD,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/lib/errors.js
CHANGED
|
@@ -95,7 +95,7 @@ export class ApiError extends CliError {
|
|
|
95
95
|
const hint = typeof body.hint === "string"
|
|
96
96
|
? body.hint
|
|
97
97
|
: serverCode === "subscription_required"
|
|
98
|
-
? "This workspace
|
|
98
|
+
? "This workspace is on the free plan. Run `cnotes upgrade` to start a free 7-day Pro trial (no card), then retry."
|
|
99
99
|
: hintForStatus(status, baseMsg, resource);
|
|
100
100
|
super(msg, exitCode, hint);
|
|
101
101
|
this.status = status;
|
package/dist/lib/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/lib/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,EAAE,EAAE,CAAC;IACL,OAAO,EAAE,CAAC;IACV,IAAI,EAAE,CAAC;IACP,UAAU,EAAE,CAAC;IACb,SAAS,EAAE,CAAC;IACZ,QAAQ,EAAE,CAAC;IACX,UAAU,EAAE,CAAC;IACb,UAAU,EAAE,CAAC;IACb,YAAY,EAAE,CAAC;IACf,OAAO,EAAE,CAAC;CACF,CAAC;AAEX,MAAM,OAAO,QAAS,SAAQ,KAAK;IAKxB;IAJT,IAAI,CAAU;IAEd,YACE,OAAe,EACR,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K,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;QACzC,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,KAAK,CAAC,UAAU,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACzC,IAAI,KAAK,CAAC,IAAI;gBAAE,OAAO,CAAC,KAAK,CAAC,WAAW,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QACzD,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC;IAED,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,IAAI,IAAI,EAAE,CAAC;QACT,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACzG,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAC,UAAU,OAAO,EAAE,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -30,6 +30,34 @@ export declare function hasAgentConfigDir(target: SkillTarget): boolean;
|
|
|
30
30
|
export declare function skillAlreadyInstalled(target?: SkillTarget): boolean;
|
|
31
31
|
/** True if a target still has the old `cn` skill installed. */
|
|
32
32
|
export declare function legacySkillInstalled(target: SkillTarget): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* A skill the user can install with `cnotes skills install <name>`.
|
|
35
|
+
*
|
|
36
|
+
* Unlike the auto-installed `cnotes` skill (a single SKILL.md), catalog skills
|
|
37
|
+
* can be whole folders — e.g. `fat-marker-flows` ships SKILL.md plus an
|
|
38
|
+
* `examples/` set of reference keyframes the skill tells the agent to read.
|
|
39
|
+
* The source folder lives at `<package>/skills/<name>/`.
|
|
40
|
+
*/
|
|
41
|
+
export interface CatalogSkill {
|
|
42
|
+
/** Canonical name = the folder agents discover it under (skills/<name>/). */
|
|
43
|
+
name: string;
|
|
44
|
+
/** Extra names accepted on the CLI (case-insensitive). */
|
|
45
|
+
aliases: string[];
|
|
46
|
+
label: string;
|
|
47
|
+
description: string;
|
|
48
|
+
/** True for skills `cnotes init` auto-installs (the cnotes skill itself). */
|
|
49
|
+
auto: boolean;
|
|
50
|
+
}
|
|
51
|
+
export declare const SKILL_CATALOG: CatalogSkill[];
|
|
52
|
+
/** Resolve a CLI-provided name/alias to a catalog skill (case-insensitive). */
|
|
53
|
+
export declare function resolveCatalogSkill(query: string): CatalogSkill | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Copy a bundled skill *folder* (SKILL.md plus any assets) into a target
|
|
56
|
+
* agent's skills dir. Overwrites an existing copy so re-running upgrades it.
|
|
57
|
+
* "Up to date" is judged cheaply by comparing the SKILL.md bytes — the version
|
|
58
|
+
* bumps that file whenever the skill changes.
|
|
59
|
+
*/
|
|
60
|
+
export declare function installSkillFolder(name: string, target: SkillTarget): SkillInstallResult;
|
|
33
61
|
/**
|
|
34
62
|
* Refresh ALREADY-installed skill copies if the bundled copy has changed.
|
|
35
63
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-skill.d.ts","sourceRoot":"","sources":["../../src/lib/install-skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAOH,mDAAmD;AACnD,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE7C,eAAO,MAAM,aAAa,EAAE,WAAW,EAAwB,CAAC;AAEhE,sEAAsE;AACtE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAE5D;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,OA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7E;AAOD,+DAA+D;AAC/D,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAEjE;AAwBD;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,0DAA0D;IAC1D,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,IAAI,EAAE,OAAO,CAAC;CACf;AAED,eAAO,MAAM,aAAa,EAAE,YAAY,EAiBvC,CAAC;AAEF,+EAA+E;AAC/E,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAK3E;AAaD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,kBAAkB,CAiBxF;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,IAAI,kBAAkB,EAAE,CAc7D;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,GAAE,WAAsB,GAAG,kBAAkB,CAgB/E"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* At runtime this file lives at <package>/dist/lib/install-skill.js, so the
|
|
10
10
|
* skill source is two directories up.
|
|
11
11
|
*/
|
|
12
|
-
import { copyFileSync, existsSync, mkdirSync, readFileSync, rmSync } from "fs";
|
|
12
|
+
import { copyFileSync, cpSync, existsSync, mkdirSync, readFileSync, rmSync } from "fs";
|
|
13
13
|
import { dirname, resolve } from "path";
|
|
14
14
|
import { homedir } from "os";
|
|
15
15
|
import { fileURLToPath } from "url";
|
|
@@ -66,6 +66,56 @@ function filesAreIdentical(a, b) {
|
|
|
66
66
|
return false;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
+
export const SKILL_CATALOG = [
|
|
70
|
+
{
|
|
71
|
+
name: "cnotes",
|
|
72
|
+
aliases: [],
|
|
73
|
+
label: "CreatorNotes CLI",
|
|
74
|
+
description: "Drive notes, canvases, search, and relationships from the terminal.",
|
|
75
|
+
auto: true,
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "fat-marker-flows",
|
|
79
|
+
aliases: ["fat-marker", "fatmarker", "fat-markers", "fatmarkers"],
|
|
80
|
+
label: "Fat-marker flows",
|
|
81
|
+
description: "Storyboard a UI flow as rough Shape Up 'broad-strokes' keyframes and lay them on a canvas as a left-to-right filmstrip.",
|
|
82
|
+
auto: false,
|
|
83
|
+
},
|
|
84
|
+
];
|
|
85
|
+
/** Resolve a CLI-provided name/alias to a catalog skill (case-insensitive). */
|
|
86
|
+
export function resolveCatalogSkill(query) {
|
|
87
|
+
const q = query.trim().toLowerCase();
|
|
88
|
+
return SKILL_CATALOG.find((s) => s.name.toLowerCase() === q || s.aliases.some((a) => a.toLowerCase() === q));
|
|
89
|
+
}
|
|
90
|
+
/** Where a bundled skill's source folder lives inside the installed package. */
|
|
91
|
+
function bundledSkillDir(name) {
|
|
92
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
93
|
+
return resolve(__dirname, "..", "..", "skills", name);
|
|
94
|
+
}
|
|
95
|
+
/** Where a skill folder should be copied for a given agent. */
|
|
96
|
+
function skillFolderDest(name, target) {
|
|
97
|
+
return resolve(agentConfigDir(target), "skills", name);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Copy a bundled skill *folder* (SKILL.md plus any assets) into a target
|
|
101
|
+
* agent's skills dir. Overwrites an existing copy so re-running upgrades it.
|
|
102
|
+
* "Up to date" is judged cheaply by comparing the SKILL.md bytes — the version
|
|
103
|
+
* bumps that file whenever the skill changes.
|
|
104
|
+
*/
|
|
105
|
+
export function installSkillFolder(name, target) {
|
|
106
|
+
const source = bundledSkillDir(name);
|
|
107
|
+
if (!existsSync(source)) {
|
|
108
|
+
throw new Error(`Bundled skill "${name}" not found at ${source}`);
|
|
109
|
+
}
|
|
110
|
+
const dest = skillFolderDest(name, target);
|
|
111
|
+
const upToDate = existsSync(dest) &&
|
|
112
|
+
filesAreIdentical(resolve(source, "SKILL.md"), resolve(dest, "SKILL.md"));
|
|
113
|
+
if (!upToDate) {
|
|
114
|
+
mkdirSync(dirname(dest), { recursive: true });
|
|
115
|
+
cpSync(source, dest, { recursive: true });
|
|
116
|
+
}
|
|
117
|
+
return { target, installed: !upToDate, destPath: dest, alreadyUpToDate: upToDate };
|
|
118
|
+
}
|
|
69
119
|
/**
|
|
70
120
|
* Refresh ALREADY-installed skill copies if the bundled copy has changed.
|
|
71
121
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-skill.js","sourceRoot":"","sources":["../../src/lib/install-skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"install-skill.js","sourceRoot":"","sources":["../../src/lib/install-skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAKpC,MAAM,CAAC,MAAM,aAAa,GAAkB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AAEhE,sEAAsE;AACtE,MAAM,UAAU,gBAAgB,CAAC,MAAmB;IAClD,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC;AACvD,CAAC;AASD,uDAAuD;AACvD,SAAS,cAA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CHANGED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fat-marker-flows
|
|
3
|
+
description: Generate Shape Up "fat-marker" broad-strokes mockup keyframes of a UI flow with an image model, then lay them on a CreatorNotes canvas as a left-to-right user-journey filmstrip. Use when the user wants to SEE a proposed flow ("mock this up", "show me what it would look like", "fat-marker / broad-strokes sketch", "fat marker mockup", "keyframes", "storyboard the flow", "user journey on the canvas") rather than read about it.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Fat-Marker Flows (Shape Up broad-strokes keyframes on a canvas)
|
|
7
|
+
|
|
8
|
+
Turn a described flow into a small set of deliberately rough sketch images, one per key moment, and place them on a CreatorNotes canvas as a numbered left-to-right journey. The output helps a reader *feel* the interaction without anyone mistaking it for finished design.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## The fidelity principle (do not skip)
|
|
13
|
+
|
|
14
|
+
Use **fat-marker / broad-strokes fidelity** (from Shape Up). Thick hand-drawn marker, rough boxes, handwritten labels, almost no detail. This is intentional:
|
|
15
|
+
|
|
16
|
+
- It makes people react to the **shape of the flow**, not fonts, spacing, or color.
|
|
17
|
+
- It signals "this is still wet clay, push back on it," which polished mockups suppress.
|
|
18
|
+
- It is fast and cheap to regenerate when the shape changes.
|
|
19
|
+
|
|
20
|
+
Resist the urge to make it pretty. If it looks like a real screenshot, you have failed the brief.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Reference examples (look at these first)
|
|
25
|
+
|
|
26
|
+
`examples/` holds a real six-frame journey produced with this skill (the CreatorNotes "Home canvas as a multi-view lens" flow). **Read a couple of them before generating** to calibrate the target fidelity and the coral-accent discipline:
|
|
27
|
+
|
|
28
|
+
- `01-timeline-view.png` — the starting state, with the `Timeline · Manual · By theme · +` tab chrome
|
|
29
|
+
- `02-switch-manual-drag.png` — a card mid-drag with a dashed "was-here" outline and a coral drag arrow
|
|
30
|
+
- `03-flip-back-nothing-lost.png` — back to Timeline, the card returned, coral check
|
|
31
|
+
- `04-by-theme-zoom-out.png` — clustered theme blobs
|
|
32
|
+
- `05-ask-for-a-view.png` — prompt bar plus a dashed Preview with Save/Discard
|
|
33
|
+
- `06-save-as-lens.png` — a new named tab added to the switcher
|
|
34
|
+
|
|
35
|
+
What to copy from them: the same window + tab row in every frame, one coral-highlighted change per frame, a circled number, a handwritten title, and a one-line caption stating the step's promise.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Step 0 — Scope ONE flow and list the keyframes
|
|
40
|
+
|
|
41
|
+
A keyframe is a **key moment in a single flow**, not a screen inventory. Before generating:
|
|
42
|
+
|
|
43
|
+
1. Pick one flow (e.g. "drag a portal, flip back, save a view"). Don't mix flows.
|
|
44
|
+
2. List 4–7 keyframes. Each is a state where **something changed** from the prior frame.
|
|
45
|
+
3. Decide the **shared chrome** that stays identical across every frame (same window, same tab bar, same panel). Only the changed thing differs frame to frame. Consistent chrome is what makes the set read as one continuous journey.
|
|
46
|
+
4. For each frame, write: a circled number, a short title, what the user just did, the one element to highlight, and a one-line caption that states the *promise* of that step.
|
|
47
|
+
|
|
48
|
+
Keep captions free of em dashes (house style).
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Step 1 — The reusable style preamble
|
|
53
|
+
|
|
54
|
+
Prepend this verbatim to every frame's prompt so the set is visually consistent:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
Fat-marker product sketch in the Shape Up "broad strokes" style: thick black marker
|
|
58
|
+
on off-white paper, deliberately rough and low-fidelity, hand-drawn rectangles and
|
|
59
|
+
handwritten labels, like a quick whiteboard wireframe. NOT a polished UI: no gradients,
|
|
60
|
+
no realistic chrome, no photorealism, no fine detail. Use ONE accent color, a warm
|
|
61
|
+
coral-pink, and ONLY on the single active or changed element. Lots of whitespace. It
|
|
62
|
+
should read as one storyboard keyframe that shows the SHAPE of an interaction, not its
|
|
63
|
+
visual design.
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
(The coral accent matches the CreatorNotes brand. Swap the accent if the project's brand differs, but keep it to ONE color used only on the changed element.)
|
|
67
|
+
|
|
68
|
+
Then add the frame-specific content: the circled number, the title, the shared chrome (describe it the same way every frame), and the one thing that changed. Be concrete and literal so the model draws the right boxes and labels.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Step 2 — Generate (test one, then batch)
|
|
73
|
+
|
|
74
|
+
Generate each frame with `cnotes files gen-image`: it produces the image with an image model
|
|
75
|
+
**and stores it in the workspace**, returning a ready-to-use URL. No local API key and no repo
|
|
76
|
+
checkout needed. The prompt goes on **stdin** (so you don't escape quotes); use `--aspect 16:9`
|
|
77
|
+
for screen-like frames and `--json` so you can read `.storageId` and `.fullUrl`.
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
WS=<workspaceId> # e.g. your Private workspace for internal work
|
|
81
|
+
mkdir -p /tmp/mockups && cd /tmp/mockups
|
|
82
|
+
|
|
83
|
+
# Frame 1 — generate, capture the JSON, then LOOK at it before batching the rest.
|
|
84
|
+
cnotes files gen-image --aspect 16:9 -w "$WS" --json <<'PROMPT' > kf1.json
|
|
85
|
+
<style preamble>
|
|
86
|
+
|
|
87
|
+
Content of this frame:
|
|
88
|
+
- A hand-drawn circled number "1" in the top-left corner.
|
|
89
|
+
- Handwritten title across the top: "...".
|
|
90
|
+
- <shared chrome described literally>
|
|
91
|
+
- <the one highlighted/changed element, in coral>
|
|
92
|
+
- A handwritten caption along the bottom: "...".
|
|
93
|
+
PROMPT
|
|
94
|
+
|
|
95
|
+
# Download the pixels and Read them to confirm the style landed.
|
|
96
|
+
cnotes files get "$(node -e 'console.log(JSON.parse(require("fs").readFileSync("kf1.json","utf8")).storageId)')" -o /tmp/mockups/kf1.png
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Always generate frame 1 first and look at it** (Read `/tmp/mockups/kf1.png`) to confirm the
|
|
100
|
+
fidelity lands before spending calls on the rest. Once it's right, generate the remaining frames
|
|
101
|
+
the same way (one `gen-image` call each), re-pasting the same style preamble and the same chrome
|
|
102
|
+
description in every frame. Collect each frame's `.fullUrl`, **in frame order**, into `urls.txt`:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Repeat per frame; appends the fullUrl in order.
|
|
106
|
+
cnotes files gen-image --aspect 16:9 -w "$WS" --json <<'PROMPT' \
|
|
107
|
+
| node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>console.log(JSON.parse(s).fullUrl))' >> urls.txt
|
|
108
|
+
<style preamble + this frame's content>
|
|
109
|
+
PROMPT
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Then look at every frame and check: same chrome across all, coral only on the changed thing,
|
|
113
|
+
numbers in order, captions legible, the sequence tells the story.
|
|
114
|
+
|
|
115
|
+
> **Admins** generate server-side with no local key. **Everyone else** adds `--byo-key` after
|
|
116
|
+
> setting `GOOGLE_GENERATIVE_AI_API_KEY` (get a key at ai.google.dev): the image is then generated
|
|
117
|
+
> on the local machine and uploaded, and the key never leaves it. See `cnotes files gen-image --help`.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Step 3 — Place on the canvas as a journey filmstrip
|
|
122
|
+
|
|
123
|
+
Use the `cnotes` CLI. Wrap the canvas writes in an operation. Step 2 already stored each image and
|
|
124
|
+
gave you a `fullUrl` per frame (in `urls.txt`, frame order), so there is **no separate upload
|
|
125
|
+
step** — just place the URLs as a horizontal stack (the filmstrip) with a header above.
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
WS=<workspaceId>
|
|
129
|
+
CANVAS=<canvasId>
|
|
130
|
+
cd /tmp/mockups # where urls.txt from Step 2 lives
|
|
131
|
+
|
|
132
|
+
cnotes operations begin -w "$WS" --prompt "Add fat-marker user-journey keyframes for <flow>" --json >/dev/null
|
|
133
|
+
# urls.txt already holds one fullUrl per line, in frame order, from Step 2.
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Build a `place` spec where each frame is a `richtext` item whose content is just ``, wrapped in a horizontal stack, with a header richtext above it:
|
|
137
|
+
|
|
138
|
+
```js
|
|
139
|
+
// build-journey.js — writes journey.json
|
|
140
|
+
const fs = require('fs');
|
|
141
|
+
const urls = fs.readFileSync('urls.txt','utf8').trim().split('\n');
|
|
142
|
+
const imgs = urls.map((u,i)=>({kind:'item',type:'richtext',size:'medium',key:`kf${i+1}`,content:``}));
|
|
143
|
+
const spec = { root: { kind:'stack', axis:'vertical', gap:'medium', align:'start', items:[
|
|
144
|
+
{kind:'item',type:'richtext',size:'medium',content:'# User journey: <flow>\n\nFat-marker keyframes (broad strokes). Read left to right, 1 to N. Coral marks the active or changed thing.'},
|
|
145
|
+
{kind:'stack', axis:'horizontal', gap:'medium', align:'start', items:imgs},
|
|
146
|
+
]}};
|
|
147
|
+
fs.writeFileSync('journey.json', JSON.stringify(spec));
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
node build-journey.js
|
|
152
|
+
cnotes canvas place $CANVAS -w $WS --spec ./journey.json --json > placed.json
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Step 4 — Position the band (the bulk-move offset trick)
|
|
158
|
+
|
|
159
|
+
`cnotes canvas place` **ignores an absolute origin** and appends the new block *below* existing content. To put the filmstrip somewhere specific (e.g. a hero band above the title), read the returned positions, compute one uniform offset, and `bulk-move` the whole group so the relative layout is preserved:
|
|
160
|
+
|
|
161
|
+
```js
|
|
162
|
+
// move-to-top.js
|
|
163
|
+
const fs=require('fs'); const p=require('./placed.json'); const items=p.items||[];
|
|
164
|
+
const minY=Math.min(...items.map(i=>i.positionY));
|
|
165
|
+
const dy=-1500-minY; // move the group's top edge to y = -1500 (above content at y=100)
|
|
166
|
+
const moves=items.map(i=>({nodeId:i.id,nodeType:'richtext',x:i.positionX,y:Math.round(i.positionY+dy)}));
|
|
167
|
+
fs.writeFileSync('moves.json',JSON.stringify(moves));
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
node move-to-top.js
|
|
172
|
+
cnotes canvas bulk-move $CANVAS -w $WS --moves "$(cat moves.json)"
|
|
173
|
+
cnotes operations end -w $WS
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Gotchas (learned the hard way)
|
|
179
|
+
|
|
180
|
+
- **Edges cannot connect richtext/image nodes.** `cnotes canvas add-edge` / `place` edges between image stickies return a server error. Carry the sequence with the **circled numbers and left-to-right layout**, not drawn arrows. (If arrows are essential, use small numbered text stickies between frames as a workaround.)
|
|
181
|
+
- **`place` ignores absolute origin** and appends below existing content. Use the bulk-move offset trick above to reposition.
|
|
182
|
+
- **richtext size presets:** `large` ≈ 1680px wide, `medium` ≈ 1120px, `small` ≈ 560px. For a 6-frame filmstrip, `medium` is the sweet spot; `large` makes a ~11,000px strip nobody can pan.
|
|
183
|
+
- **Don't verify by grepping `![` in node content.** CreatorNotes converts the image markdown into a TipTap image node on save, so the raw content no longer contains `![`. Verify instead by counting richtext nodes / their positions (e.g. nodes with negative Y for a top band).
|
|
184
|
+
- **No local key needed (admin).** `cnotes files gen-image` generates server-side, so there's nothing to export. Non-admins pass `--byo-key` after setting `GOOGLE_GENERATIVE_AI_API_KEY`; the image is generated locally and the key never leaves the machine.
|
|
185
|
+
- **Internal/working mockups go in the Private workspace.** Use `-w <privateId>` and verify with `cnotes workspace current`.
|
|
186
|
+
- **One change per frame.** If two things differ between adjacent frames, split into two frames. Ambiguity about "what changed" is what makes a storyboard unreadable.
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## When NOT to use this
|
|
191
|
+
|
|
192
|
+
- The user wants production-ready, pixel-accurate UI: use a real design tool, not fat-marker sketches.
|
|
193
|
+
- It's a single static screen with no flow: one sketch is fine, skip the journey scaffolding.
|
|
194
|
+
- The decision is still about the *problem*, not a solution shape: shape it in words first (see the shaping / framing-doc skills) before drawing keyframes of a solution you haven't chosen.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|