@creator-notes/cnotes 0.103.4 → 0.103.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "creator-notes-cli",
3
- "version": "0.103.4",
3
+ "version": "0.103.5",
4
4
  "description": "CreatorNotes CLI: create notes, build canvases, search knowledge from the terminal",
5
5
  "author": {
6
6
  "name": "CreatorNotes",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@creator-notes/cnotes",
3
- "version": "0.103.4",
3
+ "version": "0.103.5",
4
4
  "description": "CLI for CreatorNotes — create notes, build canvases, search knowledge from the terminal",
5
5
  "type": "module",
6
6
  "bin": {
@@ -3,7 +3,7 @@ name: howto-filmstrips
3
3
  description: >-
4
4
  Capture a real product UI how-to as a horizontal filmstrip on a CreatorNotes
5
5
  canvas: live CSS highlight on the click target, soft radial spotlight, then
6
- screenshot → upload → place. Use when the user wants a screenshot storyboard,
6
+ screenshot → upload → one walkthrough note → place. Use when the user wants a screenshot storyboard,
7
7
  click-path how-to, JTBD walkthrough, multi-path UI guide, or "show me how to
8
8
  do X in the app" with accurate click markers (not fat-marker sketches).
9
9
  ---
@@ -12,6 +12,8 @@ description: >-
12
12
 
13
13
  Turn a real product flow into a left-to-right filmstrip of screenshots on a CreatorNotes canvas. Each frame shows the full UI with a clear click (or type) target: **crimson highlight on the real element box** + **soft radial spotlight** dimming the rest.
14
14
 
15
+ The durable output is **one walkthrough note** holding every step and its screenshot, stamped with the product version and date it shows. The filmstrip on the canvas is a projection of that note: people scan the strip, while search, citations and agents read the note.
16
+
15
17
  This is the **pixel-accurate sibling** of `fat-marker-flows`. Use fat-marker for proposed / Shape Up sketches; use this skill for “how do I do this in the live product?”
16
18
 
17
19
  ---
@@ -23,7 +25,8 @@ This is the **pixel-accurate sibling** of `fat-marker-flows`. Use fat-marker for
23
25
  | Highlight colour | Classy crimson `#C43036` (outline, soft wash, CLICK/TYPE pill) |
24
26
  | Spotlight | Soft **radial** fade, max opacity **~40%** (up to **~55%** on dark forms), long fade (`fade_mult ≈ 5.5`) |
25
27
  | Done frame | Green `#2F9E6A` outline + `DONE` pill; lighter spotlight (~30%) |
26
- | Captions | Canvas **richtext** under the image (same node), not Notes |
28
+ | Steps | One walkthrough note per job: `## N · <action>` headings, screenshot embedded under each |
29
+ | Captions | Canvas **richtext** under each image, projected from the note (short, no mentions) |
27
30
  | Titles | Middle dot `·` as separator; **no em dashes** |
28
31
  | Layout | One path = one horizontal row; multiple paths = stacked sections |
29
32
  | Language | Match the product UI; prefer UK English in captions unless the product is US-only |
@@ -42,9 +45,10 @@ This is the **pixel-accurate sibling** of `fat-marker-flows`. Use fat-marker for
42
45
 
43
46
  ## Prerequisites
44
47
 
45
- 1. Browser automation available (Cursor browser MCP / CDP `Runtime.evaluate` + screenshot).
46
- 2. `cnotes` authenticated with a writable workspace (`cnotes auth status`, `cnotes workspace current`).
47
- 3. This skill folder installed (`cnotes skills install howto-filmstrips`) so scripts resolve under the agent skills dir.
48
+ 1. A browser tool that can run JavaScript in the page **and save a screenshot to a file**: CDP `Runtime.evaluate`, Cursor's browser MCP, Playwright, or `agent-browser`. A tool that only shows the screenshot to the model cannot feed `cnotes files upload`.
49
+ 2. A sandbox or demo account with made-up data. Never capture a production account that holds customer records.
50
+ 3. `cnotes` authenticated with a writable workspace (`cnotes auth status`, `cnotes workspace current`).
51
+ 4. This skill folder installed (`cnotes skills install howto-filmstrips`) so scripts resolve under the agent skills dir.
48
52
 
49
53
  ---
50
54
 
@@ -53,7 +57,8 @@ This is the **pixel-accurate sibling** of `fat-marker-flows`. Use fat-marker for
53
57
  1. Name the job (e.g. “Create a new contact”).
54
58
  2. List each **entry path** separately (Path A, Path B…). One path = one row.
55
59
  3. For each path, list 4–7 frames: each frame is **one action** (click or type) or a final Done state.
56
- 4. Write captions before capture: `N · Click …` / `N · Type …` / `N · Done · …`.
60
+ 4. Plan one line per frame (`N · Click …` / `N · Type …` / `N · Done · …`). The final caption text comes from capture (Step 2).
61
+ 5. Write the **capture stamp** before the first shot: product name, the release or version shown (from the app's About page, footer or release ticket), plan or region if it changes the UI, the account used, and today's date. It becomes the first line of the note so a reader knows which build the screenshots show.
57
62
 
58
63
  ---
59
64
 
@@ -64,11 +69,22 @@ Read `scripts/inject-highlight.js` and evaluate its **entire file contents** in
64
69
  - `window.__cnHowto.highlight(el, { label: 'CLICK'|'TYPE'|'DONE' })`
65
70
  - `window.__cnHowto.clear()`
66
71
  - `window.__cnHowto.findExact(text, opts)` — visible, sized matches; prefer menu-row / control size
72
+ - `window.__cnHowto.redact(selectors)` / `unredact()` — blur sensitive regions for every later frame
67
73
 
68
74
  The injector uses a **fixed full-viewport radial overlay** (not element `box-shadow`), so the spotlight survives screenshot and parent clipping.
69
75
 
70
76
  **Calibrate visually:** after first inject, highlight one control and screenshot. Check that the crimson outline hugs the element box (not an inner span), the CLICK pill sits just above it and is legible, and the spotlight is a soft radial fade centred on the control — never a hard-edged rectangle. Adjust opacity only if the product chrome is unusually light or dark.
71
77
 
78
+ ### Redact before the first shot
79
+
80
+ Look at the first screen for names, emails, phone numbers, amounts, matter or account numbers and anything else that identifies a real person or customer. Blur them:
81
+
82
+ ```js
83
+ __cnHowto.redact(['.client-name', '[data-field="email"]', 'table.invoices td.amount'])
84
+ ```
85
+
86
+ Redactions survive `clear()` and hold for every later frame; re-run `redact` after each navigation, because a new page has new elements. `__cnHowto.unredact()` removes them. Redaction is a backstop for a sandbox account, never a licence to capture production data. Check every PNG by eye before upload; if anything sensitive shows, re-shoot.
87
+
72
88
  ---
73
89
 
74
90
  ## Step 2 — Capture loop (per frame)
@@ -76,11 +92,14 @@ The injector uses a **fixed full-viewport radial overlay** (not element `box-sha
76
92
  For each click/type frame:
77
93
 
78
94
  1. **Find** the target with `__cnHowto.findExact` (exact label text) or a tight selector. Prefer the **largest visible** control that matches (menu row over inner text span).
79
- 2. **Highlight** with the right label (`CLICK` / `TYPE`).
95
+ 2. **Highlight** with the right label (`CLICK` / `TYPE`). Keep the return value: `stepDraft` is a first-draft caption built from the control's own label (`Click **Save contact**`, `Type in **Email address**`, `Choose from **Matter type**`).
80
96
  3. **Screenshot** the viewport → save as `A1.png`, `A2.png`, …
81
97
  4. **Clear** highlight.
82
98
  5. **Perform** the action (click / type), wait for UI settle.
83
- 6. Repeat.
99
+ 6. **Finish the caption** from `stepDraft` plus what changed on screen: `Click **Save contact**. The contact opens with its matters tab empty.` One or two sentences, in the product's words.
100
+ 7. Repeat.
101
+
102
+ After the last frame, **tidy the sequence** before upload: drop frames whose action changed nothing visible, merge consecutive typing into one field into one frame, and renumber.
84
103
 
85
104
  For the **Done** frame: land on the success state, highlight the result (e.g. contact name) with `{ label: 'DONE' }`, screenshot, clear.
86
105
 
@@ -105,7 +124,7 @@ python3 "<skillDir>/scripts/soft-spotlight.py" \
105
124
 
106
125
  ---
107
126
 
108
- ## Step 3 — Upload and place on the canvas
127
+ ## Step 3 — Upload, write the note, place the filmstrip
109
128
 
110
129
  ```bash
111
130
  WS=<workspaceId>
@@ -124,7 +143,30 @@ for f in A1 A2 A3 A4 A5 A6; do
124
143
  done
125
144
  ```
126
145
 
127
- Build a place spec: header + one **section per path**, each with a **grid** of richtext cells (image markdown + caption). Prefer `columns: N` matching frame count (e.g. 6). Use `size: "medium"` for frames.
146
+ **Write the walkthrough note first.** Pick its type with `cnotes types list`: `Workflow` if the workspace has it, else `Guide`, else `Note`. One note per job:
147
+
148
+ ```markdown
149
+ # Create a new contact · the walkthrough
150
+
151
+ Captured 16 Oct 2026 in Acme Practice v26.10 (APAC, Boutique plan), sandbox account, from the Contacts page.
152
+
153
+ What the job is and who does it, in one or two sentences.
154
+
155
+ ## 1 · Click Create new
156
+
157
+ Click **Create new +**. A menu opens with Contact, Matter and Task.
158
+
159
+ ![Create new highlighted](/api/images/convex/<storageId>)
160
+
161
+ ## 2 · …
162
+ ```
163
+
164
+ - Numbered `##` headings, never a markdown ordered list: images inside list items convert unreliably.
165
+ - Several entry paths: one note, `## Path A · …` headings with `### A1 · …` steps under each.
166
+ - Create it inside the open run with `cnotes notes create --notes '[{"key":"W","type":"Workflow","markdownFile":"./walkthrough.md"}]'`.
167
+ - **Refresh** after the product changes: re-shoot, then `cnotes versions create <displayId> --markdown-file …` with a new capture stamp. Never a second note for the same job.
168
+
169
+ Then build a place spec: header + the walkthrough note + one **section per path**, each with a **grid** of richtext cells (image markdown + short caption copied from the note). Prefer `columns: N` matching frame count (e.g. 6). Use `size: "medium"` for frames. Tiles are projections: no mention syntax inside them (it blanks the card).
128
170
 
129
171
  Image URL form inside richtext:
130
172
 
@@ -169,6 +211,7 @@ cnotes operations end -w "$WS" --json
169
211
  "items": [
170
212
  { "kind": "item", "type": "richtext", "size": "large",
171
213
  "content": "# How to …\n\nSame job, several entry points. Read each row left to right." },
214
+ { "kind": "item", "type": "note", "noteId": "<the walkthrough note's displayId>" },
172
215
  {
173
216
  "kind": "section",
174
217
  "name": "Path A · …",
@@ -200,7 +243,8 @@ cnotes operations end -w "$WS" --json
200
243
  - **DPR:** post-process centres must be CSS × devicePixelRatio.
201
244
  - **`place` appends below existing content** unless you bulk-remove first when rebuilding.
202
245
  - **Verify images by node count / positions**, not by grepping `![` in stored content (TipTap converts markdown images).
203
- - **Do not commit secrets** from the product under test; use throwaway trial data in screenshots.
246
+ - **Do not commit secrets** from the product under test; use throwaway trial data in screenshots and `redact` anything that still looks real.
247
+ - **No stamp, no trust:** a filmstrip without the version and date it shows reads as current long after the UI has moved on.
204
248
 
205
249
  ---
206
250
 
@@ -6,6 +6,11 @@
6
6
  * __cnHowto.highlight(el, { label: 'CLICK' | 'TYPE' | 'DONE' })
7
7
  * __cnHowto.clear()
8
8
  * __cnHowto.findExact('Contact', { minW: 100, minH: 36, preferX: 1100 })
9
+ * __cnHowto.redact(['.client-name', '[data-field="email"]']) // blur until unredact()
10
+ * __cnHowto.unredact()
11
+ *
12
+ * highlight() returns { text, kind, stepDraft, box, center, label }; stepDraft
13
+ * is a first-draft caption ("Click **Save**", "Type in **Email**").
9
14
  *
10
15
  * Uses a fixed full-viewport radial overlay so the spotlight is not clipped by
11
16
  * parent overflow (unlike element box-shadow: 0 0 0 9999px).
@@ -22,6 +27,7 @@
22
27
  const OVERLAY_ID = "cn-howto-filmstrip-overlay";
23
28
  const LABEL_ID = "cn-howto-filmstrip-label";
24
29
  const HL_CLASS = "cn-howto-filmstrip-hl";
30
+ const REDACT_CLASS = "cn-howto-filmstrip-redact";
25
31
 
26
32
  function ensureStyle() {
27
33
  if (document.getElementById(STYLE_ID)) return;
@@ -37,6 +43,9 @@
37
43
  position: relative !important;
38
44
  z-index: 2147483646 !important;
39
45
  }
46
+ .${REDACT_CLASS} {
47
+ filter: blur(8px) !important;
48
+ }
40
49
  #${OVERLAY_ID} {
41
50
  position: fixed;
42
51
  inset: 0;
@@ -124,19 +133,84 @@
124
133
  placeSpotlight(cx, cy, { maxOpacity, holeR, fadeMult: opts.fadeMult ?? 5.5 });
125
134
  placeLabel(r, label, accent);
126
135
 
136
+ const target = describe(el);
127
137
  return {
128
138
  ok: true,
129
139
  tag: el.tagName,
130
- text: (el.getAttribute("aria-label") || el.textContent || "")
131
- .replace(/\s+/g, " ")
132
- .trim()
133
- .slice(0, 80),
140
+ text: target.name,
141
+ kind: target.kind,
142
+ stepDraft: draftStep(label, target),
134
143
  box: { x: r.x, y: r.y, w: r.width, h: r.height },
135
144
  center: { x: cx, y: cy },
136
145
  label,
137
146
  };
138
147
  }
139
148
 
149
+ function squash(s) {
150
+ return (s || "").replace(/\s+/g, " ").trim().slice(0, 80);
151
+ }
152
+
153
+ // What the user would call this control: the visible label for a field,
154
+ // the text for a button or link.
155
+ function describe(el) {
156
+ const tag = el.tagName.toLowerCase();
157
+ const role = el.getAttribute("role") || "";
158
+ const isField =
159
+ tag === "input" || tag === "textarea" || tag === "select" || role === "textbox" || role === "combobox";
160
+ let name = "";
161
+ if (isField) {
162
+ const labelledBy = el.getAttribute("aria-labelledby");
163
+ name =
164
+ el.getAttribute("aria-label") ||
165
+ (labelledBy && document.getElementById(labelledBy)?.textContent) ||
166
+ (el.labels && el.labels[0]?.textContent) ||
167
+ el.getAttribute("placeholder") ||
168
+ el.getAttribute("name") ||
169
+ "";
170
+ } else {
171
+ name = el.getAttribute("aria-label") || el.textContent || el.getAttribute("title") || "";
172
+ }
173
+ let kind = "control";
174
+ if (isField) kind = tag === "select" || role === "combobox" ? "picker" : "field";
175
+ else if (tag === "a" || role === "link") kind = "link";
176
+ else if (role === "tab") kind = "tab";
177
+ else if (role === "menuitem" || role === "option") kind = "menu item";
178
+ else if (tag === "button" || role === "button") kind = "button";
179
+ else if (role === "radio" || role === "checkbox" || el.type === "checkbox" || el.type === "radio") kind = "option";
180
+ return { name: squash(name), kind };
181
+ }
182
+
183
+ // A first-draft caption from the target alone. The agent finishes it with
184
+ // what changed on screen after the action.
185
+ function draftStep(label, target) {
186
+ const name = target.name ? `**${target.name}**` : `the ${target.kind}`;
187
+ if (label === "TYPE") return `Type in ${name}`;
188
+ if (label === "DONE") return `Done · ${target.name || "the result"} appears`;
189
+ if (target.kind === "picker") return `Choose from ${name}`;
190
+ return `Click ${name}`;
191
+ }
192
+
193
+ // Blur sensitive regions before a screenshot. Redactions survive clear()
194
+ // so they hold for every frame until unredact() is called.
195
+ function redact(targets) {
196
+ ensureStyle();
197
+ const list = typeof targets === "string" ? [targets] : [...(targets || [])];
198
+ let count = 0;
199
+ for (const t of list) {
200
+ const els = typeof t === "string" ? document.querySelectorAll(t) : [t];
201
+ els.forEach((el) => {
202
+ if (!el || !el.classList) return;
203
+ el.classList.add(REDACT_CLASS);
204
+ count += 1;
205
+ });
206
+ }
207
+ return { ok: true, redacted: count };
208
+ }
209
+
210
+ function unredact() {
211
+ document.querySelectorAll("." + REDACT_CLASS).forEach((el) => el.classList.remove(REDACT_CLASS));
212
+ }
213
+
140
214
  function findExact(exact, opts = {}) {
141
215
  const minW = opts.minW ?? 20;
142
216
  const minH = opts.minH ?? 20;
@@ -189,10 +263,10 @@
189
263
  return candidates[0].el;
190
264
  }
191
265
 
192
- window.__cnHowto = { highlight, clear, findExact, ensureStyle };
266
+ window.__cnHowto = { highlight, clear, findExact, describe, redact, unredact, ensureStyle };
193
267
  window.__cnHighlight = (el, opts) => highlight(el, opts);
194
268
  window.__cnClearHighlight = clear;
195
269
  window.__cnFindExact = findExact;
196
270
 
197
- return { ok: true, api: ["highlight", "clear", "findExact"] };
271
+ return { ok: true, api: ["highlight", "clear", "findExact", "describe", "redact", "unredact"] };
198
272
  })();