@creator-notes/cnotes 0.116.0 → 0.117.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "creator-notes-cli",
3
- "version": "0.116.0",
3
+ "version": "0.117.0",
4
4
  "description": "CreatorNotes CLI: create notes, build canvases, search knowledge from the terminal",
5
5
  "author": {
6
6
  "name": "CreatorNotes",
@@ -1033,6 +1033,10 @@ verb (Changes), or repeats the headline or the Why; nothing is saved, so
1033
1033
  rewrite the line and ask again. The runs you flagged with operations end
1034
1034
  --unsure are listed for the person as the ones to look at.
1035
1035
 
1036
+ If another open proposal you can see rewords one of the same notes, the ask
1037
+ prints it to stderr as "Overlaps: ...": compare the two (cnotes draft status
1038
+ <id>) and say in the ask which should land first, or fold one into the other.
1039
+
1036
1040
  If a check blocks when you ask, the ask is still made, so a person can help
1037
1041
  settle it. Each blocking check is printed to stderr, the person sees the
1038
1042
  proposal blocked, and nothing can be accepted until you fix it and ask again.
@@ -1060,6 +1064,11 @@ Examples:
1060
1064
  const blocking = asked.checks.findings.filter((f) => f.blocking);
1061
1065
  for (const f of blocking)
1062
1066
  console.error(`Blocking: ${f.message} ${f.fix}`);
1067
+ // Another open proposal rewords the same notes: say so whatever the
1068
+ // output mode, so the agent compares the two before the person decides.
1069
+ for (const f of asked.checks.findings.filter((f) => f.code === "proposal-overlap")) {
1070
+ console.error(`Overlaps: ${f.message} ${f.fix}`);
1071
+ }
1063
1072
  if (cfg.quiet) {
1064
1073
  console.log(inPlaceId);
1065
1074
  return;
@@ -9,6 +9,7 @@ import { loadConfig, setActiveAgentRunId, registerAgentRun, unregisterAgentRun,
9
9
  import { resolveHostAgentSession } from "../lib/claude-session.js";
10
10
  import { allWorkspaceRubrics, loadRubricMap } from "../lib/rubrics.js";
11
11
  import { briefIsEmpty, loadSessionBrief, renderBrief } from "../lib/session-brief.js";
12
+ import { renderProposalsForCaller } from "../lib/waiting-proposals.js";
12
13
  /**
13
14
  * `cnotes operations` — workspace-scoped lifecycle for agentic batches.
14
15
  *
@@ -64,6 +65,12 @@ pointer, so neither agent can clobber or close the other's run.
64
65
 
65
66
  -q prints only the run id, without the rubrics and the brief.
66
67
 
68
+ Proposals: begin lists the open proposals asked of you in this workspace
69
+ (waitingOnYou) and your own not yet asked that reword a note another open
70
+ proposal also rewords (overlapping), each with its overlaps. Compare
71
+ overlapping proposals before either is accepted. Under -q these lines go to
72
+ stderr.
73
+
67
74
  --json includes typeRubrics: [{type, rubric}, ...] for every workspace type
68
75
  that has a validationPrompt. Read the ones you will author BEFORE notes create
69
76
  (or run cnotes types show <Type>). Post-write rubric echoes are too late to
@@ -150,7 +157,13 @@ start fresh, or --detached to open your own run alongside it.
150
157
  ]);
151
158
  const typeRubrics = allWorkspaceRubrics(rubricMap);
152
159
  reportHeadlineWarnings(readHeadlineWarnings(result));
160
+ // Proposals waiting on the caller, and the ones that overlap, reach
161
+ // the agent even under -q (on stderr), so it hears of another agent's
162
+ // work at the start of its own.
163
+ const proposalLines = renderProposalsForCaller(result);
153
164
  if (cfg.quiet) {
165
+ for (const line of proposalLines)
166
+ console.error(line);
154
167
  console.log(result.agentRunId);
155
168
  return;
156
169
  }
@@ -181,6 +194,11 @@ start fresh, or --detached to open your own run alongside it.
181
194
  if (typeRubrics.length > 0) {
182
195
  console.log(`${typeRubrics.length} type rubric${typeRubrics.length === 1 ? "" : "s"} in this workspace — read with \`cnotes types show <Type>\` BEFORE notes create (also in --json as typeRubrics).`);
183
196
  }
197
+ if (proposalLines.length > 0) {
198
+ console.log("");
199
+ for (const line of proposalLines)
200
+ console.log(line);
201
+ }
184
202
  if (brief && !briefIsEmpty(brief)) {
185
203
  console.log("");
186
204
  console.log("What the workspace already knows about this (read before acting):");
@@ -0,0 +1,39 @@
1
+ /**
2
+ * What `operations begin` says about proposals in the workspace: the ones
3
+ * asked of the caller, and the caller's own that overlap another (V1 on
4
+ * CANVAS-461). Two agents rewording the same note in two proposals hear of
5
+ * each other here, at the start of their work, in output they already read.
6
+ */
7
+ function overlapText(overlaps) {
8
+ return overlaps.map((o) => `overlaps ${o.displayId} on ${o.notes.join(", ")}`).join("; ");
9
+ }
10
+ /** The lines to print, or none when nothing waits and nothing overlaps. */
11
+ export function renderProposalsForCaller(result) {
12
+ const waiting = result.waitingOnYou ?? [];
13
+ const overlapping = result.overlapping ?? [];
14
+ if (waiting.length === 0 && overlapping.length === 0)
15
+ return [];
16
+ const lines = [];
17
+ if (waiting.length > 0) {
18
+ lines.push("Waiting on you in this workspace:");
19
+ for (const p of waiting) {
20
+ const parts = [`${p.displayId} "${p.name}"`, `built by ${p.builtBy}`];
21
+ if (p.sentBack)
22
+ parts.push("sent back");
23
+ if (p.overlaps.length > 0)
24
+ parts.push(overlapText(p.overlaps));
25
+ lines.push(` ${parts.join(" · ")}`);
26
+ }
27
+ }
28
+ if (overlapping.length > 0) {
29
+ lines.push("Your proposals not yet asked that overlap another:");
30
+ for (const p of overlapping) {
31
+ lines.push(` ${p.displayId} "${p.name}" · ${overlapText(p.overlaps)}`);
32
+ }
33
+ }
34
+ const anyOverlap = overlapping.length > 0 || waiting.some((p) => p.overlaps.length > 0);
35
+ if (anyOverlap) {
36
+ lines.push("Overlapping proposals reword the same notes: compare them before either is accepted (`cnotes draft status <id>`), and say in the ask which should land first.");
37
+ }
38
+ return lines;
39
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@creator-notes/cnotes",
3
- "version": "0.116.0",
3
+ "version": "0.117.0",
4
4
  "description": "CLI for CreatorNotes — create notes, build canvases, search knowledge from the terminal",
5
5
  "type": "module",
6
6
  "bin": {
@@ -17,7 +17,7 @@ Every note and canvas you write is context: what the next reader, a teammate or
17
17
 
18
18
  1. **Confirm the workspace.** `cnotes workspace current` names it and lists its relationship types. `-w <id>` targets another one for a single command.
19
19
  2. **Read before you write.** Past sessions and teammates left context for this task. `cnotes brief "<task>"` returns the notes, canvases and recent changes most relevant to the task. Search notes and canvases separately (they are different corpora): `cnotes search semantic "<topic>"` and `cnotes canvas search "<topic>"`. `cnotes notes get <id> --expand` loads a note with the notes it rests on. Before changing a canvas, `cnotes canvas read <canvasId>`. A Decision or Guide you find may already settle what you were about to propose.
20
- 3. **Open a run.** `cnotes operations begin --prompt "<the change as a past-tense headline, e.g. Added a risks list to the Q1 roadmap>" --json`, as its own command; check its exit code before writing (a pipe hides it). `notes create` refuses to run without one. The response carries `typeRubrics` and the same brief; `-q` prints only the run id when you already have both. One canvas per run: end it and begin another before writing to a second canvas.
20
+ 3. **Open a run.** `cnotes operations begin --prompt "<the change as a past-tense headline, e.g. Added a risks list to the Q1 roadmap>" --json`, as its own command; check its exit code before writing (a pipe hides it). `notes create` refuses to run without one. The response carries `typeRubrics`, the same brief, and the proposals waiting on you with any that reword the same note as another (read those first, [references/drafts.md](references/drafts.md) step 8); `-q` prints only the run id, with the proposals on stderr. One canvas per run: end it and begin another before writing to a second canvas.
21
21
  4. **Write to the type's rubric.** Pick the type, run `cnotes types show <Type>`, and author to its rubric. Audience-facing prose (note bodies, banners, pre-reads) goes through [references/humanizer.md](references/humanizer.md) first; transcripts, quotes and other raw capture are stored verbatim.
22
22
  5. **Create notes in one batch.** `cnotes notes create --notes '[{"key":"A","type":"Insight","markdownFile":"./a.md"}, ...]'`. Each body starts with a `# h1` (the title). Cross-link inside the batch with `[@A: Title](relationship:<verb>)`. Detail: [references/notes.md](references/notes.md).
23
23
  6. **Grade what you wrote.** `cnotes quality <displayIds...> --fail-below 4`, then revise weak notes with `cnotes versions create <id> --description "<what changed>" --markdown-file <path>`.
@@ -199,6 +199,16 @@ the checkout that reaches it.
199
199
  reads "Waiting on <you>: ..." instead of a proposal to decide. Make the fix,
200
200
  then `draft ask` again and stop. A live save of a note with a proposed new
201
201
  text prints that the save puts the proposal out of date.
202
+ 8. **When another proposal rewords the same note,** you are told wherever you
203
+ look: `draft ask` prints "Overlaps: PROPOSAL-7 "Team price" also rewords
204
+ DECISION-1, built by you via Codex (Slack)." on stderr, `draft status`
205
+ lists it as a `proposal-overlap` warning, and `operations begin` lists it
206
+ under the proposals waiting on you. You only ever hear of a proposal you
207
+ could already see (yours, or one asked of you). It never blocks. Read the
208
+ other one (`cnotes draft status PROPOSAL-7`) and decide which of three
209
+ holds: they agree (say in your ask which should land first), yours
210
+ repeats it (fold what is new into the other or dismiss yours), or they
211
+ conflict (write a Question for the person naming both, with your lean).
202
212
 
203
213
  ## Deciding as someone's agent
204
214