@creator-notes/cnotes 0.86.0 → 0.87.1

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.
@@ -0,0 +1,149 @@
1
+ # Drafts
2
+
3
+ Read this before reworking notes or a board other people read, or whenever you are asked to draft something.
4
+
5
+ ## Contents
6
+
7
+ - [What a draft is](#what-a-draft-is)
8
+ - [When to open one](#when-to-open-one)
9
+ - [Branching a board](#branching-a-board)
10
+ - [Commands](#commands)
11
+ - [The loop](#the-loop)
12
+ - [Deciding as someone's agent](#deciding-as-someones-agent)
13
+ - [What to rely on](#what-to-rely-on)
14
+
15
+ ## What a draft is
16
+
17
+ A draft is a private workspace opened FROM the active one. Only the person who
18
+ opened it, and agents using their login, can see it. Nothing in it reaches the
19
+ shared workspace until the person asked approves it: in the browser, or, for
20
+ a proposed version of a board, through their own agent (`cnotes draft accept`
21
+ under their key). The key that built a draft can never land it. You build the
22
+ draft; the person asked decides it.
23
+
24
+ ## When to open one
25
+
26
+ Open a draft before you:
27
+ - rework notes other people read (a guide, a decision others cite);
28
+ - rework a board other people read (branch it, below);
29
+ - write many interlinked notes at once;
30
+ - do anything you were asked to "draft".
31
+
32
+ ## Branching a board
33
+
34
+ **To rework a board other people read, branch it:** `cnotes draft open
35
+ --from-canvas CANVAS-390`. The draft holds your working copy (it prints its
36
+ id, say CANVAS-412) and the live board does not change. Inside the draft, the
37
+ ordinary canvas verbs work on CANVAS-412: `canvas read`, `place` (shared notes
38
+ included), `move-node` / `bulk-move` / `arrange`, `remove-node` /
39
+ `bulk-remove`, `add-edge`. A canvas write aimed at
40
+ CANVAS-390 from inside the draft is refused and names your copy; never pass
41
+ `-w <shared workspace>` to reach it, which edits the live board. A person
42
+ accepts your copy as the board's next version (V2), on the live board.
43
+
44
+ ## Commands
45
+
46
+ ```bash
47
+ cnotes draft open "Pricing rethink" --intent "Rework tiers for teams" # opens AND switches to it
48
+ cnotes draft open --from-canvas CANVAS-390 --intent "Restamp screens 4 to 7" # branch a board
49
+ cnotes notes create --notes '[...]' # lands in the draft (it is the active workspace)
50
+ cnotes notes get DECISION-12 # a SHARED note reads through from the draft (sharedFrom in --json)
51
+ cnotes draft propose DECISION-12 --markdown-file new.md --description "Annual is the default"
52
+ cnotes draft edits # the proposals: proposed title, base version, conflict marker
53
+ cnotes draft discard DECISION-12 # withdraw one; the shared note was never touched
54
+ cnotes draft status # who it waits on, what V2 changes, the checks, the link
55
+ cnotes draft ask --reviewer sam@example.com # name who decides; then STOP
56
+ cnotes draft list # your open drafts across workspaces (--all adds closed)
57
+ cnotes draft checkout pricing # resume in a NEW session: id or unique name substring
58
+ cnotes draft dismiss # close it; nothing reaches the shared workspace
59
+ ```
60
+
61
+ ## The loop
62
+ 1. **Build inside the draft, one run per change.** New notes and canvases land
63
+ in it, and a branch copy takes your canvas edits. The person reviews your
64
+ version run by run, each under the intent you began it with (`cnotes
65
+ operations begin --prompt "Resolve the sign-in ticket with its Decision"`),
66
+ the way a pull request is read commit by commit. So bracket one intention
67
+ per run, named as the change, and never a run whose prompt lists three
68
+ things with "and". Reflowing cards inside a frame is folded away as layout;
69
+ moving a card into another frame, adding, removing, relinking and
70
+ rewording are what the person reads. Link to shared notes normally:
71
+ `[DECISION-12: Title](relationship:builds-on)` resolves to the shared note
72
+ and stays a working link once the draft lands.
73
+ 2. **Change a shared note by proposing it, never live.** Read it (`cnotes
74
+ notes get DECISION-12` works from inside the draft), write the complete new
75
+ body, then `cnotes draft propose DECISION-12 --markdown-file new.md
76
+ --description "<what changed>"`. The shared note keeps its text until the
77
+ draft lands. A live write to a shared note from inside a draft (`versions
78
+ create`, `notes update`, archive, retype) is refused and points here.
79
+ Proposing the same note again replaces the proposal.
80
+ 3. **Run `cnotes draft status` until no check blocks.** Blocking: a link to a
81
+ shared note that is archived, a citation of a shared note that moved since
82
+ you cited it (`stale-citation`: read it again and save the citing note
83
+ again), and a proposal whose base moved (`base-conflict`: read the current
84
+ text, fold it in, propose again). Warnings never block: a missing title, an
85
+ empty body, `stale-read`. Every finding names the card and the fix. For a
86
+ branch, status also prints "V2 of CANVAS-390: 2 added, 5 moved, ...", each
87
+ conflict with the live board (a card changed on both sides; make your copy
88
+ match the live board's value to clear it), and how many cards changed on
89
+ the live board since you branched.
90
+ 4. **Ask, then stop.** On a branched board, `cnotes draft ask --reviewer
91
+ <their email>` names the person who decides (an editor of the shared
92
+ workspace, usually the board's owner). On a plain draft only `--reviewer me`
93
+ is accepted: the person whose login you use lands it, and naming anyone
94
+ else is refused because a draft is private to them. It prints the link they
95
+ open; post it, then stop. Never try to merge or approve what you built:
96
+ `cnotes draft merge` and `cnotes review complete --outcome approved` on
97
+ your own draft are refused, and pressing Accept or Approve through a
98
+ browser tool is not yours to do either.
99
+ 5. **When they send it back,** `cnotes draft status` opens with their line
100
+ ("Changes requested by <name>: ..."). Fix it in the draft, run status until
101
+ no check blocks, then `draft ask` again and stop.
102
+
103
+ ## Deciding as someone's agent
104
+
105
+ When the person whose login you use was
106
+ asked to decide a proposed version of their board, `cnotes shared` lists it
107
+ as `decide` with the draft id. Read it with `cnotes draft status <draftId>`
108
+ (V2 against the live board, each conflict, the checks) and the reworded
109
+ notes with `cnotes draft edits --draft <draftId> --note <NOTE-n>`. Then
110
+ `cnotes draft accept <draftId> --note "why"` lands it as the board's next
111
+ version, as them, or `cnotes draft send-back <draftId> --note "what should
112
+ change"` returns one line to the proposer. Accept re-reads everything first
113
+ and refuses on a blocking check or a conflict. History shows the landing as
114
+ "approved by <them>, through their agent", and Undo stays theirs in the
115
+ browser. Decide only when the person told you how; when unsure, say what you
116
+ read and let them click.
117
+
118
+ ## What to rely on
119
+ - **One line says who it waits on.** `draft status`, `draft checkout` and
120
+ `workspace current` print it: nobody asked yet, the changes a person asked
121
+ for, or a named reviewer. When the next move is yours, it ends with the
122
+ `draft ask` to run. `--json` carries it as `decision.line`, with
123
+ `decision.state` (`awaiting_person`, `changes_requested`,
124
+ `waiting_on_reviewer`).
125
+ - **Ids survive.** A draft mints display ids from the shared workspace's
126
+ sequence, so `DECISION-6K9` written in a draft is still `DECISION-6K9` once it
127
+ lands. In the rare clash the id is re-minted, every mention is rewritten, and
128
+ `draft status` lists the change (`merge.renamed` in `--json`).
129
+ - **A saved switch can be shadowed.** `draft open` and `draft checkout` save the
130
+ draft as the active workspace, but `CNOTES_WORKSPACE` and `-w` beat the saved
131
+ one. When either names another workspace the command says writes still go
132
+ there; unset it to work in the draft. `workspace current` shows what picked
133
+ the workspace.
134
+ - **After it lands,** `draft status` says who approved it and which ids were
135
+ renamed. Your CLI still points at the closed draft: `cnotes workspace
136
+ current` names it and prints the `cnotes workspace select` that switches
137
+ back. The person can undo the merge while nobody has built on it.
138
+ - **Canvases in a draft can hold shared notes.** Place them as usual; the card
139
+ points at the shared note, and to change what it says, propose it.
140
+ - **It lands all at once:** at most 100 notes, 25 canvases and 100 proposals.
141
+ Only live items count: archived notes and canvases stay in the draft, and any
142
+ link, card or list item pointing at them is dropped so their titles never
143
+ reach the shared workspace. The draft's empty starting canvas stays behind.
144
+ - **A draft can't be shared.** Invites, email shares and public links refuse
145
+ in a draft. The hand-over is `draft ask`, nothing else: for a branch, it is
146
+ what lets the person you name see your version at all.
147
+ - **Wrap the work in an operation as usual** (`operations begin` while the
148
+ draft is active): runs attribute to the draft like any workspace, and follow
149
+ the work onto the shared timeline when it lands.
@@ -6,6 +6,18 @@ drafts, Slack messages, canvas orientation banners, and the prose body of typed
6
6
  notes. Its job is to remove generic model habits so text lands as a real human
7
7
  author wrote it, **without corrupting meaning or erasing a legitimate voice**.
8
8
 
9
+ ## Contents
10
+
11
+ - [First decide: does this text get touched at all?](#first-decide-does-this-text-get-touched-at-all)
12
+ - [The four modes](#the-four-modes)
13
+ - [The workflow](#the-workflow)
14
+ - [The anti-slop audit](#the-anti-slop-audit)
15
+ - [The three verifiable flags](#the-three-verifiable-flags)
16
+ - [The preservation gate](#the-preservation-gate)
17
+ - [Two layers: quality floor and personal voice](#two-layers-quality-floor-and-personal-voice)
18
+ - [CreatorNotes mechanics (deterministic — always apply)](#creatornotes-mechanics-deterministic--always-apply)
19
+ - [Restraint is the most important behavior](#restraint-is-the-most-important-behavior)
20
+
9
21
  Two things this is NOT:
10
22
  - It is not a truth checker. The model cannot verify a claim is correct; it can
11
23
  only flag the three defects listed under [The three verifiable flags](#the-three-verifiable-flags).
@@ -80,8 +92,8 @@ material. Only rewrite existing notes once an audit has named the specific defec
80
92
  2. **Audit only.** Identify notes with clear problems; leave clean notes alone.
81
93
  3. Create a new version (`cnotes versions create`) **only** for the selected notes,
82
94
  with a change description saying what you fixed.
83
- 4. Replace affected canvas richtext banners separately (text elements have no
84
- version history — remove and re-add).
95
+ 4. Fix affected canvas text cards in place with `cnotes canvas update-text`
96
+ (text cards have no version history).
85
97
  5. **Verify** numbers, names, IDs, links, mention titles, tables, uncertainty,
86
98
  and canvas layout survived unchanged.
87
99
 
@@ -0,0 +1,151 @@
1
+ # Other commands
2
+
3
+ Focus plans, files and images, setup, theme, config, and sending feedback to the CreatorNotes team.
4
+
5
+ ## Contents
6
+
7
+ - [Focus plans (`cnotes focus`)](#focus-plans-cnotes-focus)
8
+ - [Files (`cnotes files` / `cnotes f`)](#files-cnotes-files--cnotes-f)
9
+ - [Init & MCP (`cnotes init` / `cnotes mcp`)](#init--mcp-cnotes-init--cnotes-mcp)
10
+ - [Theme (`cnotes theme`)](#theme-cnotes-theme)
11
+ - [Config](#config)
12
+ - [Feedback (`cnotes feedback`)](#feedback-cnotes-feedback)
13
+ - [Closing the loop: submit feedback when you hit friction](#closing-the-loop-submit-feedback-when-you-hit-friction)
14
+
15
+ ## Focus plans (`cnotes focus`)
16
+
17
+ Protected flow-state blocks, private to the user. The Focus calendar overlays
18
+ plans on recorded attention; kept/missed is derived, so there is no
19
+ "complete" verb.
20
+
21
+ ```bash
22
+ # Plan a block. Link the prepared canvas so opening the block orients in
23
+ # seconds — and --target to land it on the exact card the block works on.
24
+ cnotes focus plan --start 09:00 --duration 90m \
25
+ --goal "Decide the pricing wedge" --canvas CANVAS-12
26
+
27
+ # --target names a NOTE-… or SECTION-… display id ON that canvas (an
28
+ # Attention card, a Decision). Needs --canvas; validated at plan time (a
29
+ # ref not on the canvas is refused). The calendar block then renders
30
+ # "CANVAS-80 → ATTENTION-6J4 · <title>" and clicking it opens the canvas
31
+ # landed on that card.
32
+ cnotes focus plan --start 09:00 --duration 45m \
33
+ --goal "Approve the customer target" \
34
+ --canvas CANVAS-80 --target ATTENTION-6J4
35
+
36
+ cnotes focus list [--days <n>] [--past <n>] # target shows in the canvas column
37
+ cnotes focus cancel <planId>
38
+ # --start takes "HH:MM" (next occurrence), "tomorrow HH:MM",
39
+ # "YYYY-MM-DD HH:MM", or full ISO; --duration takes "45m", "90m", "1.5h".
40
+ # list --json rows: { id, startMs, endMs, goal, canvasViewId, canvasName,
41
+ # canvasDisplayId, targetRef, targetTitle, createdBySource, createdAt }.
42
+ # targetTitle null while targetRef is set = the card drifted off the board
43
+ # since planning — re-target or re-plan rather than trusting the block.
44
+ ```
45
+
46
+ **Keep the plan row thin.** Time, goal, destination — nothing else. The
47
+ durable clues (decisions, criteria, "complete when") live IN the target note,
48
+ never in the goal string: a display id pasted into the goal is inert prose the
49
+ graph cannot see, while `--target` is the clickable, validated form of the
50
+ same intent. A plan with no `--canvas` renders as a non-clickable block; that
51
+ is by design, not a bug — there is nothing to open.
52
+
53
+
54
+ ## Files (`cnotes files` / `cnotes f`)
55
+ ```bash
56
+ # Upload an image to the workspace (max 5MB, supports .jpg .jpeg .png .gif .webp)
57
+ cnotes files upload <path> [--markdown] # --markdown outputs ![filename](url) syntax
58
+
59
+ # Read an image that's INSIDE a note. A note's content prints images as
60
+ # ![alt](/api/images/convex/<storageId>) — that path is your storage id. Use
61
+ # this to turn it into actual pixels you can look at (authenticates with your
62
+ # CLI key, same as `cnotes notes get` does for text).
63
+ cnotes files get <storageId> [-o <path>] # download the bytes (default: ./<storageId>.<ext>)
64
+ cnotes files get <storageId> --url # just print a directly-fetchable URL
65
+ cnotes files get '/api/images/convex/<storageId>' # paste the path straight from a note
66
+ ```
67
+ To "see" an image in a note: `cnotes notes get NOTE-X` to find the
68
+ `/api/images/convex/<storageId>` reference, then `cnotes files get <storageId> -o /tmp/img.png`
69
+ and open the saved file.
70
+
71
+ ## Init & MCP (`cnotes init` / `cnotes mcp`)
72
+ ```bash
73
+ # Interactive setup wizard — auth, workspace, AI integrations, skill install
74
+ cnotes init
75
+
76
+ # Configure MCP server for AI tools (also handled by cnotes init)
77
+ cnotes mcp setup # Claude Desktop
78
+ cnotes mcp setup-codex # OpenAI Codex
79
+ ```
80
+
81
+ ## Theme (`cnotes theme`)
82
+
83
+ Personal UI theme preference (synced to your account, applies on next browser reload — does NOT live-update an open tab).
84
+
85
+ ```bash
86
+ # List built-in presets — current one is marked with *
87
+ cnotes theme list
88
+
89
+ # Show the active theme + any per-token color overrides
90
+ cnotes theme get
91
+
92
+ # Switch to a built-in preset
93
+ cnotes theme set <id> # e.g. dracula, ember, catppuccin-mocha, sage, light, dark
94
+
95
+ # Override a single color (switches the theme to "custom" automatically)
96
+ cnotes theme set-color <token> <hex> # e.g. cnotes theme set-color primary "#ff00aa"
97
+
98
+ # Drop all custom overrides and return to the base preset
99
+ cnotes theme reset
100
+ ```
101
+
102
+ **Editable tokens** (anything else is rejected with 422):
103
+ `background`, `card`, `popover`, `muted`, `border`, `sidebar-background`,
104
+ `primary`, `primary-foreground`, `ring`, `accent-teal`,
105
+ `foreground`, `muted-foreground`, `prose-body`, `prose-heading`,
106
+ `code-background`, `code-foreground`, `blockquote-border`,
107
+ `destructive`, `success`, `warning`, `info`.
108
+
109
+ `set-color` merges into existing overrides — call it repeatedly to build up a custom palette. `reset` returns to the preset that was the base of your custom theme (or `dark` if you started from scratch).
110
+
111
+ ## Config
112
+ ```bash
113
+ cnotes config get-server
114
+ cnotes config set-server <url>
115
+ ```
116
+
117
+ ## Feedback (`cnotes feedback`)
118
+ ```bash
119
+ # Report friction, a bug, or praise from inside an agent session.
120
+ # Routes to the CreatorNotes team's central feedback inbox (server-side routing —
121
+ # you never need a canvas or workspace id). See "Closing the loop" below
122
+ # for WHEN to use this and the rule to ask the user first.
123
+ cnotes feedback submit --severity <blocking|high|medium|low|praise> --area <area> --title <text> \
124
+ [--body <md> | --body-file <path> | --body-stdin] [--model <id>] [--rating <1-5>]
125
+
126
+ # Examples
127
+ cnotes feedback submit --severity blocking --area cli/canvas \
128
+ --title "canvas list 500s" --body-file ./report.md --model <your-model-id>
129
+ echo "Loved the batch @key cross-links." | cnotes feedback submit \
130
+ --severity praise --area cli/notes --title "Batch create is the right primitive" --body-stdin
131
+ ```
132
+
133
+
134
+ ## Closing the loop: submit feedback when you hit friction
135
+
136
+ CreatorNotes is built for humans *and* agents, so feedback from an agent is real feedback. When you hit something worth reporting, offer to log it with `cnotes feedback submit` (above).
137
+
138
+ **When to offer it** (be selective, not noisy):
139
+ - A reproducible bug: a command 500s, returns wrong/empty data, or a documented path doesn't behave as described.
140
+ - A real capability gap that blocked the task (not a transient blip, not your own mistake — rule those out first).
141
+ - Standout praise is welcome too, but lead with friction; it's the actionable signal.
142
+
143
+ **Always ask the user first.** The report is attributed to them and goes to the CreatorNotes team. Say in one line what you'd report and ask if they want it sent. Never file silently, and never file the same issue twice.
144
+
145
+ **Make it directly fixable.** In the `--body` (markdown), include:
146
+ - **What happened** — the exact command you ran and the exact error/behavior.
147
+ - **Root cause (suspected)** — your best read from the outside; say what's uncertain.
148
+ - **Suggested fix** — what would resolve it.
149
+ - **Severity** — who/what is blocked.
150
+
151
+ Set `--severity` honestly (`blocking` only if it stops the task), `--area` to where it bites (e.g. `cli/canvas`, `editor`, `api/notes`), and `--model` to your own model id so the team knows which agent reported it. One note per issue.
@@ -0,0 +1,232 @@
1
+ # Notes, versions and types
2
+
3
+ Read this before creating, reading or revising notes: batch create, `--expand` reads, versions, types and rubrics, markdown rules.
4
+
5
+ ## Contents
6
+
7
+ - [Notes (`cnotes notes` / `cnotes n`)](#notes-cnotes-notes--cnotes-n)
8
+ - [Versions (`cnotes versions` / `cnotes v`)](#versions-cnotes-versions--cnotes-v)
9
+ - [Types (`cnotes types` / `cnotes t`)](#types-cnotes-types--cnotes-t)
10
+ - [Note IDs](#note-ids)
11
+ - [Note Types](#note-types)
12
+ - [Content via Markdown](#content-via-markdown)
13
+ - [Updating Content vs Metadata](#updating-content-vs-metadata)
14
+
15
+ ## Notes (`cnotes notes` / `cnotes n`)
16
+ ```bash
17
+ # List notes (default 20, excludes drafts)
18
+ cnotes notes list [--search <query>] [--type <type>] [--tags <csv>] [--pinned] [--limit <n>]
19
+ cnotes notes list --no-canvas [--type <type>] [--tags <csv>] [--limit <n>] # notes on no canvas at all
20
+
21
+ # Get one or more notes by display ID (always returns an array, in input order,
22
+ # in a single round-trip). Pass one ID or many — never call this in a loop.
23
+ cnotes notes get <id> [<id>...] [--all-versions] [--content-only]
24
+ cnotes notes get MEETING-12
25
+ cnotes notes get MEETING-12 PRD-3 IDEA-7
26
+
27
+ # Load a note together with the notes it rests on. --expand follows outgoing
28
+ # relationship rows and inline [[rel::ID]] / [[ID]] links (a bare [[ID]] is
29
+ # references). Each linked note is labelled `assumes -> OBSERVATION-6K13`.
30
+ # --depth N (default 1, max 4) walks further, deduped, and stops at 40 notes
31
+ # with a notice when truncated. --rel assumes,depends-on limits which slugs
32
+ # are followed. --summary keeps the title and the first real prose paragraph
33
+ # of linked notes (the requested notes stay whole). It skips leading headings,
34
+ # blank lines, and chip-only lines, so a Metric that starts
35
+ # `## Primary measure` returns the sentence after it, not the heading.
36
+ # Heading-only notes fall back to the last heading text; list-only notes
37
+ # fall back to the first list. --incoming also includes notes that
38
+ # link to the target (`assumes <- OTHER-1`).
39
+ cnotes notes get DECISION-6KN --expand
40
+ cnotes notes get DECISION-6KN --expand --depth 2 --rel assumes,depends-on
41
+ cnotes notes get DECISION-6KN --expand --summary --incoming --json
42
+ cnotes notes get DECISION-6KN --expand --content-only
43
+ # --json with --expand is an object, not the bare array:
44
+ # { notes, linked, truncated, cap, omitted, notice }.
45
+ # Each linked entry is { displayId, relation, direction, depth, from, label, links, note }
46
+ # and note matches a notes get row. A truncation sets truncated and notice, and
47
+ # the notice is also printed on stderr so stdout stays valid JSON.
48
+ # Reads also cap at 40 relationship rows/inline mentions per note and 512
49
+ # candidates across the walk. These limits set truncated and notice too;
50
+ # omitted counts only discovered notes skipped at the 40-note output cap.
51
+ # Without --expand, reads stay a bare array, so a single note is always at .[0].
52
+
53
+ # Reading a LARGE note/transcript: --content-only prints just the raw markdown
54
+ # (no JSON envelope, no metadata chrome), so the terminal won't clip a giant
55
+ # JSON line. Best for transcripts you want to read or chunk. With --expand,
56
+ # linked notes follow the root, each introduced by an HTML comment of its label.
57
+ cnotes notes get TRANSCRIPT-1 --content-only
58
+ cnotes notes get TRANSCRIPT-1 --content-only > /tmp/transcript.md # then chunk the file
59
+
60
+ # A REPLACED note says so. When a live supersedes / superseded-by / invalidates /
61
+ # replaces link marks a note as replaced, `notes get --json` carries
62
+ # `supersededBy: [{ displayId, title, type, relationship, relationshipId }]`
63
+ # (newest replacer first), the plain output prints "Superseded by: …", and
64
+ # `canvas read` prints "> Superseded by …" under that note's header. Read the
65
+ # replacer before relying on the old note. The field is never inside the body,
66
+ # so --content-only and edits are unaffected.
67
+ # NO field does NOT mean current: it means no link says otherwise. A note
68
+ # superseded only by a prose banner has no field, so still read banners. When
69
+ # you write a note that replaces another, add the link
70
+ # (`[OLD-1: Title](relationship:supersedes)`) so the next reader is told.
71
+
72
+ # Which canvases is this note on? The agent mirror of the editor's "Canvases"
73
+ # affordance. Container-aware: counts the note whether it's placed directly OR
74
+ # nested inside a list/grid container. Each row has { id, name, via, viewType,
75
+ # visibility, isHome, goal, updatedAt }; `via` = node | list | both. Feed `id`
76
+ # into `canvas get/read`. (See "See how a found note connects" under Relationships.)
77
+ cnotes notes canvases <displayId>
78
+ cnotes notes canvases INSIGHT-1 --json --fields id,name,via
79
+
80
+ # Who relied on this note, and what they built from it — the read-side
81
+ # counterpart to the timeline's "which run wrote this version". Ask it AFTER
82
+ # editing a note that other work was written from: it returns the agent runs
83
+ # that read an older version, plus the notes each run went on to write. That is
84
+ # the "who do I have to tell" list, and it catches reliance the relationship
85
+ # graph cannot, because a note an agent read and never cited leaves no mention.
86
+ # --json: { note, readers[], staleRuns[], unattributedStaleReads }. A reader is
87
+ # `stale` when the note advanced past the version it was served — drift, not
88
+ # obsolescence. Reads made before the agent opened its run carry no run id and
89
+ # are counted rather than listed. Agent reads only (CLI + MCP); a person reading
90
+ # in the browser is deliberately never recorded here.
91
+ cnotes notes reads <displayId>
92
+ cnotes notes reads FEATURE-1 --quiet # just the display IDs of the derived notes
93
+
94
+ # Create one or more notes (always batch-shaped).
95
+ # FIRST: read each target type's rubric, then author to it. Do not skip this —
96
+ # the create response echoes rubrics after save, which is too late to guide
97
+ # the draft. operations begin --json also returns typeRubrics for the workspace.
98
+ cnotes types show Insight
99
+ cnotes types show PainPoint
100
+ # Then create. Pass --notes as a single JSON object or an array. Title comes
101
+ # from the # h1 heading in each note's markdown. Use
102
+ # [@key: Title](relationship:<type>) to cross-reference another item in the
103
+ # same batch — @key is replaced with the new note's display ID after creation.
104
+ # Pick <type> from the verb your own prose uses ("blocks", "depends-on",
105
+ # "invalidates" — `cnotes rel types` lists the vocabulary; free-form, unknown
106
+ # types auto-create). `references` = pure citation ONLY: a verb narrated in
107
+ # prose around a references chip is invisible to backlinks and `rel list`.
108
+ cnotes notes create --notes '{"key":"A","type":"Insight","markdown":"# Solo note","tags":["ux"]}'
109
+ cnotes notes create --notes '[
110
+ {"key":"A","type":"PainPoint","markdownFile":"./problem.md"},
111
+ {"key":"B","type":"Insight","markdown":"# Fix\n[@A: Problem](relationship:resolves)"}
112
+ ]'
113
+ # Each item: {key, type, markdown | markdownFile, tags?, changeDescription?}.
114
+ # changeDescription is version 1's timeline line: a verb-first headline
115
+ # (specific object in the first 40 characters, at most 110 characters), a
116
+ # blank line, then a body the agent owns. `{displayId}` is filled in. A
117
+ # failing agent headline may be rewritten; the body is kept. The response
118
+ # includes `headline` and `headlineWarnings`. Omit the line and the platform
119
+ # later writes one. Human-typed editor text only gets the token filled.
120
+ # On validation failure the response lists every bad item by index + key + field
121
+ # (and `details.items` in --json mode), so you can fix the whole batch in one shot.
122
+ # Each .results[] item carries .type + .rubric — keep them when filtering JSON.
123
+
124
+ # THEN: grade what you just wrote and revise before ending the run.
125
+ # You are the grader. Grading spends no credits. `cnotes quality` does not
126
+ # call a server model. It returns a gradeRequest on each ungraded note:
127
+ # task "grade_against_rubric", the type rubric, the note content, and the
128
+ # instruction "Grade this against the rubric". The create response's
129
+ # .selfCheck is this command. Read .items[].gradeRequest (it also sits on
130
+ # .gradeRequests). Do not drop it when you keep only the display id.
131
+ cnotes quality INSIGHT-12 PAINPOINT-4 --fail-below 4 --json
132
+ # Exit 3 until you record a grade. Then:
133
+ cnotes quality record INSIGHT-12 --graded-version 4 --level 3 --criteria '[{"criterion":"Evidence","reason":"Grounded in two tickets."}]' --feedback "The pattern is named." --next-step "Say what would falsify it."
134
+ cnotes quality --canvas CANVAS-60 --json
135
+ cnotes quality --all --limit 200 --no-grade
136
+ # Structural codes (free, no credits): missing_title, empty_body, bare_id,
137
+ # unknown_type, no_rubric, superseded, missing_section.
138
+ # missing_section fires only for headings named in a rubric line
139
+ # "Required sections: Problem; Options". A rubric without that line
140
+ # requires no headings.
141
+
142
+ # Update metadata only (not content — use versions for that)
143
+ # NOTE: --title is NOT available. Title is read-only, derived from the # h1 heading in version content.
144
+ # To change a note's title, create a new version with a different # h1 heading.
145
+ cnotes notes update <id> [--type <t>] [--tags <csv>] [--archive] [--unarchive] [--pin] [--unpin]
146
+
147
+ # Delete (archive)
148
+ cnotes notes delete <id>
149
+
150
+ # Bulk archive/unarchive multiple notes at once
151
+ cnotes notes bulk-archive --ids '["MEETING-1","PRD-3","IDEA-7"]' [--unarchive]
152
+
153
+ # Bulk retype multiple notes to a new type (atomic per note: creates new, archives old, cross-links)
154
+ cnotes notes bulk-retype --ids '["NOTE-1","NOTE-3","NOTE-5"]' --type Insight
155
+
156
+ # Text search
157
+ cnotes notes search <query> [--type <type>] [--limit <n>]
158
+ ```
159
+
160
+
161
+ ## Versions (`cnotes versions` / `cnotes v`)
162
+ ```bash
163
+ # List versions
164
+ cnotes versions list <noteId>
165
+
166
+ # Create a new version (updates note content)
167
+ cnotes versions create <noteId> --description "Added the pricing objection from the call" --markdown-file <path.md>
168
+ cnotes versions create <noteId> --description "what changed" --markdown "<short content>" # inline (short only)
169
+ cnotes versions create <noteId> --description "what changed" --markdown-stdin < changes.md
170
+ ```
171
+
172
+
173
+ ## Types (`cnotes types` / `cnotes t`)
174
+ ```bash
175
+ # List all types (supertags) in the workspace
176
+ cnotes types list
177
+
178
+ # Show one type's quality rubric (validationPrompt) — read before authoring that type
179
+ cnotes types show <name>
180
+
181
+ # Create a new type (prefix is auto-derived from display name)
182
+ cnotes types create <name> [--display-name <name>] [--description <text>] [--color <hex>]
183
+
184
+ # Update an existing type (prefix updates automatically when display name changes)
185
+ cnotes types update <name> [--display-name <name>] [--description <text>] [--color <hex>]
186
+
187
+ # Retype a note (atomic: creates new note with target type, archives old one, cross-links both)
188
+ cnotes notes retype <displayId> --type <NewType>
189
+ ```
190
+
191
+
192
+ ## Note IDs
193
+ - Notes have **display IDs** like `MEETING-12`, `PRD-5`, `IDEA-3` — use these in commands.
194
+ - Convex IDs (e.g., `n17a43p7aenrxyr...`) also work but are less readable.
195
+ - When creating notes, capture the display ID from the output for subsequent commands.
196
+
197
+ ## Note Types
198
+ - The `--type` parameter must reference an **existing supertag** in the workspace. Free-text type strings are rejected.
199
+ - **Pick the type, then read its rubric, then write to it — in that order.** Each type carries a `validationPrompt` (its quality rubric: what a good instance contains). Once you know the type, run `cnotes types show <Type>` (or read `typeRubrics` from `cnotes operations begin --json` / `validationPrompt` from `cnotes types list --json`) and author to that rubric so the note lands well-formed. Example: a Decision needs the alternatives weighed, the rationale, and a revisit trigger, and it cites the cards it depends on (see [Decisions](#decisions)). `cnotes notes create --json` also puts the rubric on **each** `.results[]` item (`type` + `rubric`) and as a top-level `rubrics` array. Do not cut the output down to only `displayId` until you have checked `.results[].rubric`. After the write, you grade: `cnotes quality` hands back `gradeRequest` (rubric + content + "Grade this against the rubric") and spends no credits. Record the grade with `cnotes quality record`. A Decision rubric that declares `Required sections:` fails the free structural check until those `##` headings are present.
200
+ - If the type you need doesn't exist, create it first: `cnotes types create "MyType" --display-name "My Type"`
201
+ - Type names are **case-sensitive** and use PascalCase (e.g., `Update`, `PainPoint`, `Meeting`).
202
+ - 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`).
203
+ - Prefix is **immutable** once notes of that type exist. To change a note's type, use `cnotes notes retype <displayId> --type <NewType>`.
204
+
205
+
206
+ ## Content via Markdown
207
+ - Markdown is the only content format on the wire. For multi-line content, write to a file and pass the path via `markdownFile`:
208
+ ```bash
209
+ cnotes notes create --notes '[{"key":"A","type":"Note","markdownFile":"./note.md"}]'
210
+ ```
211
+ - Use inline `markdown` only for short, single-line content.
212
+ - **Always start markdown content with a `# h1` heading.** This becomes the note title. Follow proper markdown structure: `## h2` for major sections, `### h3` for subsections. Well-structured heading hierarchy is expected for all notes.
213
+ - **Relationship mentions in markdown**: Use `[NOTE-123: Title](relationship:<type>)` — plain text "NOTE-123" does NOT create clickable mentions, and the title-less form renders as "Untitled". Match `<type>` to the verb your prose uses (`blocks`, `depends-on`, …); `references` is for pure citations. The typed wiki form `[[blocks::NOTE-123]]` is equivalent — it's how note bodies serialize mentions back to you, and an untyped `[[NOTE-123]]` is a plain reference.
214
+ - **The classic miss: capturing an answer/outcome that lives in another note.** "The answer is the packaging decision in DECISION-24" saved as plain prose creates no chip, no relationship, no backlink — the graph never learns the question was answered. Write the mention with the verb as its type: `Answered by [DECISION-24: Title](relationship:answered-by)`. `notes create` and `versions create` detect bare IDs that name real notes and return them in `plainTextIdWarnings` (stderr + `--json`), each with a paste-ready rewrite carrying the note's actual title — treat every entry as a fix instruction (save a corrected version) unless the bare ID is deliberate prose.
215
+ - **Reuse an existing relationship type before inventing one.** Run `cnotes rel types` (or read the list printed by `cnotes workspace current`) and pick the closest existing label. The type slot is free-form, so an unknown label is auto-created as a custom workspace type rather than dropped — but that means a typo or a needless synonym (`support` vs `supports`, `relates-to` vs `related-to`) silently pollutes the workspace's type vocabulary forever. Only coin a new type when nothing existing fits.
216
+ - Names are normalized to lowercase + hyphens, so `Depends On`, `depends on`, and `depends-on` all resolve to the same type. When `cnotes notes create` does create new types, it reports them (`+ created N new relationship types: …`) — treat that line as a prompt to double-check you didn't mean an existing one.
217
+ - Common built-in types to reach for first:
218
+ - `depends-on` / `blocks` — dependency ordering between notes
219
+ - `references` — pure citation with no claimed relationship (the type `[NOTE-123]` gets when you name none)
220
+ - `implements` — a note that delivers on what another identifies (e.g., feature → requirement, solution → gap)
221
+ - `derived-from` — a note created based on another's content
222
+ - `extends` — adds depth or detail to another note's topic
223
+ - `invalidates` / `supersedes` — supersedes or contradicts another note
224
+ - `related-to` — loose thematic connection
225
+ - `duplicates` — notes covering the same thing
226
+ - Simple mention shorthand: `[NOTE-123]` or `[NOTE-123: Title]` (defaults to "references")
227
+
228
+ ## Updating Content vs Metadata
229
+ - To change note **content** (including title), create a new **version**: `cnotes versions create <id> --description "..." --markdown-file ./updated.md`
230
+ - Title is derived from the `# h1` heading in the latest version — to rename a note, create a new version with a different heading.
231
+ - To change note **type/tags/pin/archive**, use: `cnotes notes update <id> --type "..." --tags "..."`
232
+ - These are separate operations by design.