create-pmos 0.285.0 → 0.286.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.285.0",
3
+ "version": "0.286.0",
4
4
  "description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@5f35d52
1
+ kernel-source: pmos@08f8f33
2
2
  assembled: 2026-10-19
3
3
  mode: vendor
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Eval calibration log"
4
4
  description: "Append-only record of every PM override of an evaluator verdict."
5
- generated: {by: process:create-pmos, at: "2026-10-19T02:58:44Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-19T03:07:18Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Health budgets"
4
4
  description: "Closed registry of health-budget anchors (D59), edited only by the PM."
5
- generated: {by: process:create-pmos, at: "2026-10-19T02:58:44Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-19T03:07:18Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Discoveries and friction log"
4
4
  description: "Append-only record of what runs discovered and where the process rubbed."
5
- generated: {by: process:create-pmos, at: "2026-10-19T02:58:44Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-19T03:07:18Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -241,7 +241,7 @@ Insights is the fourth place on the rail, at `/premium-insights.html`. It reads
241
241
  - **What stands out.** Up to three plain sentences taken from the series: behind its line for three readings in a row, behind and still moving away from the target, closing in, slipped, reached its target, or a large one-step move. There is no forecast and no cause.
242
242
  - **No series recorded.** A KR metric with one reading or none is listed with the reason and is not drawn.
243
243
  - **Ask PMOS to set up a report.** Type what the report is for and press **Ask**. A background run proposes a report and does nothing else. The request is listed as Working, then Ready to review. A ready request opens with its proposal: **Set it up**, **Change it** (say what to change; the run revises it), or **Cancel**.
244
- - **Found in your work.** Up to three reports PMOS found in your calendar, mail or documents, each with why and what it saw. **Set it up** records the report and drafts its first cycle as a file. **Not a report** hides it and records it after 5 seconds, unless you press **Undo**.
244
+ - **Found in your work.** Up to three reports PMOS found in your calendar, mail or documents, each with why and what it saw. **Set it up** records the report and drafts its first cycle as a file. **Not a report** hides it and records it after 5 seconds, unless you press **Undo**. If the finding changed while the window was open, the window says what happened. It was already set up, it was marked not a report, or a new scan replaced it. The list is read again. Close the window and open the report from the list. If PMOS does not hear back, the window says nothing was recorded. Press the button to try again.
245
245
  - **Set up.** Your recurring reports, with their schedule and next draft. A report opens with **Draft it now** (for a report drawn from your work) and **Pause** or **Resume**.
246
246
  - **Documents.** The report files of the workspace, with cadence, slot and whether each is a draft or issued. Pressing one opens it on the page as a **Deck**: a title slide, then one slide for each section, with the arrow keys and a strip of slides. **Document** shows it as a page. **Present** shows the slide on the whole screen; the arrow keys move and Escape stops. **Download** gives PowerPoint, Word, Excel, CSV or the Markdown file; the files carry the words, not the look. **Print or save as PDF** prints one slide to a page. **Open in the console** is where a document is edited or issued. Nothing is sent from this page.
247
247
  - **Shape a report's look.** On a draft, **Add a sample** takes a PDF, PowerPoint, Word, PNG or JPG file to follow. Say how it should look in the conversation; PMOS draws the next design version (D1, D2, …) and says what it changed. Press a version to go back to it. **This is it** saves the version shown as the report's design, and PMOS draws the cycle to match. An issued cycle is frozen with its look.
@@ -629,10 +629,32 @@ function fileFinding(file, input, { run, by, now } = {}) {
629
629
  append(file, { ev: 'finding', id, run: run || null, pattern, name: x.name.trim(), why: x.why.trim(), evidence: ev.evidence, confidence: x.confidence, proposal: pr.proposal }, { now, by });
630
630
  return { ok: true, result: 'filed', id };
631
631
  }
632
- function dismissFinding(file, { id, by, now }) {
633
- const f = fold(readLines(file)).findings.get(id);
634
- if (!f) return refuse(404, 'no such finding');
635
- append(file, { ev: 'finding-dismiss', id, pattern: f.pattern }, { now, by });
632
+ /**
633
+ * Find the finding a page names. A page holds an id from its last read, so the ledger may have moved on: the finding was set up (here or in the console),
634
+ * marked not a report, or a later finder run filed the same report again under a new id. Returns { ok: true, finding, moved } (moved: found by name or
635
+ * pattern, not by id) or a refusal whose `reason` is set-up | dismissed | gone and whose text says what happened and what to do next.
636
+ */
637
+ function lookupFinding(st, id, name) {
638
+ const q = (id == null ? '' : String(id)).slice(0, 80), nm = name ? slugOf(String(name)) : '';
639
+ const byId = st.findings.get(q);
640
+ const label = (f) => `"${String((f && f.name) || name || 'This report').slice(0, 80)}"`;
641
+ if (byId && byId.state === 'open') return { ok: true, finding: byId, moved: false };
642
+ const sameOpen = [...st.findings.values()].find((f) => f.state === 'open' && !isDismissed(st, f.pattern, f.name)
643
+ && ((byId && (f.pattern === byId.pattern || slugOf(f.name) === slugOf(byId.name))) || (nm && slugOf(f.name) === nm)));
644
+ if (sameOpen) return { ok: true, finding: sameOpen, moved: true };
645
+ if (byId && byId.state === 'set-up') {
646
+ const s = [...st.setups.values()].find((x) => x.from && x.from.finding === byId.id);
647
+ return { ...refuse(409, `${label(byId)} is already set up${s ? ' as ' + s.id : ''}. Nothing more was recorded. Open it under Set up.`), reason: 'set-up' };
648
+ }
649
+ if (byId && byId.state === 'dismissed') return { ...refuse(409, `${label(byId)} was marked not a report, so it is hidden. Nothing was set up.`), reason: 'dismissed' };
650
+ const known = nm && [...st.setups.values()].find((x) => slugOf(x.name) === nm);
651
+ if (known) return { ...refuse(409, `${label()} is already set up as ${known.id}. Nothing more was recorded. Open it under Set up.`), reason: 'set-up' };
652
+ return { ...refuse(404, `${label()} is no longer in the report ledger; a rescan may have replaced it. Nothing was recorded. The list has refreshed: open it again from Found in your work.`), reason: 'gone' };
653
+ }
654
+ function dismissFinding(file, { id, name, by, now }) {
655
+ const l = lookupFinding(fold(readLines(file)), id, name);
656
+ if (!l.ok) return l.reason === 'dismissed' ? { ok: true, unchanged: true } : l;
657
+ append(file, { ev: 'finding-dismiss', id: l.finding.id, pattern: l.finding.pattern }, { now, by });
636
658
  return { ok: true };
637
659
  }
638
660
  function setFinder(file, { cadence, sources, by, now }) {
@@ -738,6 +760,6 @@ module.exports = {
738
760
  ledgerFile, stateDir, append, readLines, fold, stateOf, openFindings, isDismissed, slugOf, patternOf, checkProposal, checkEvidence, checkSchedule,
739
761
  scheduleLabel, scheduleOf, firstSlot, initialLastRun, nextDraftAt, definitionText, writeDefinition, definitionsOf, definitionFile, shaOf,
740
762
  fileScheduleStore, scheduleFor, registerSchedule, updateSchedule, unregisterSchedule,
741
- setUp, change, pause, resume, remove, askStart, askChange, askCancel, askEnd, fileProposal, findStart, findEnd, fileFinding, dismissFinding, setFinder,
763
+ setUp, change, pause, resume, remove, askStart, askChange, askCancel, askEnd, fileProposal, findStart, findEnd, fileFinding, dismissFinding, lookupFinding, setFinder,
742
764
  writeDocument, frameMarkdown, migrate, migratedKeys, dashboardKeys, dashTitle, keyOfSource, longDate, localDay,
743
765
  };
@@ -309,7 +309,7 @@ async function handle(req, res, url, ctx) {
309
309
  const root = w.root;
310
310
  const file = RS.ledgerFile(root);
311
311
  const opts = { by: g.actor, wsId: w.id, scheduleStore: ctx.scheduleStore };
312
- const fail = (r) => send(bad(r.status || 400, r.error));
312
+ const fail = (r) => send({ status: r.status || 400, body: { ok: false, error: r.error, ...(r.reason ? { reason: r.reason } : {}) } });
313
313
 
314
314
  if (sub === 'ask') {
315
315
  if (typeof ctx.spawnSession !== 'function' || headless.kindFor({ agent: 'claude', origin: 'report-setup:probe' }) !== 'report-setup') {
@@ -343,7 +343,7 @@ async function handle(req, res, url, ctx) {
343
343
  const st = RS.fold(RS.readLines(file));
344
344
  let from = null; let base = null;
345
345
  if (body.ask) { const a = st.asks.get(text(body.ask)); if (!a) return send(bad(404, 'no such request')); from = { ask: a.id }; base = a.proposal; }
346
- else if (body.finding) { const f = st.findings.get(text(body.finding)); if (!f || f.state !== 'open') return send(bad(404, 'no such finding')); from = { finding: f.id }; base = f.proposal; }
346
+ else if (body.finding) { const l = RS.lookupFinding(st, text(body.finding), text(body.name)); if (!l.ok) return send({ status: l.status, body: { ok: false, error: l.error, reason: l.reason } }); from = { finding: l.finding.id }; base = l.finding.proposal; }
347
347
  const proposal = body.proposal && typeof body.proposal === 'object' && !Array.isArray(body.proposal) ? body.proposal : base;
348
348
  if (!proposal) return send(bad(400, 'say which request or finding to set up, or give the proposal'));
349
349
  const r = RS.setUp(root, { ...proposal, ...(from ? { from } : {}) }, opts);
@@ -356,7 +356,7 @@ async function handle(req, res, url, ctx) {
356
356
  return send({ status: 200, body: { ok: true, setup: setupOut(r.setup, new Date(), documentsOf(ctx, w), copyIndex(root), root), first_draft: r.first_draft, drafted } });
357
357
  }
358
358
  if (sub === 'dismiss') {
359
- const r = RS.dismissFinding(file, { id: text(body.finding), by: g.actor });
359
+ const r = RS.dismissFinding(file, { id: text(body.finding), name: text(body.name), by: g.actor });
360
360
  if (!r.ok) return fail(r);
361
361
  return send({ status: 200, body: { ok: true } });
362
362
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.285.0",
3
+ "version": "0.286.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.285.0",
9
+ "version": "0.286.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.285.0",
3
+ "version": "0.286.0",
4
4
  "private": true,
5
5
  "description": "PMOS Terminal Workspace — local companion hosting real PTYs beside the library and gates (D62)",
6
6
  "license": "MIT",
@@ -256,11 +256,17 @@ function repDlg(o) {
256
256
  closeDlg(); await load();
257
257
  };
258
258
  }
259
+ /* Words for a refused press: what the server said, then how to go on. A reason (set-up | dismissed | gone) means the list this window came from is out of date, so it is read again and a retry would only repeat the refusal. */
260
+ const pressFailed = (res, plain) => {
261
+ const e = res && res.error ? String(res.error) : plain;
262
+ if (res && res.reason) return e + ' This window is out of date. Close it; the list has been read again.';
263
+ return e + ' Nothing was recorded. Press the button to try again.';
264
+ };
259
265
  /* A press: post, then say the result in words, or keep the dialog open with the server's refusal. */
260
266
  const press = (sub, body, said) => async (m) => {
261
267
  m.textContent = 'Recording.';
262
268
  const res = await repPost(sub, body);
263
- if (!res || res.ok !== true) { m.textContent = (res && res.error) || 'That did not go through.'; return 'keep'; }
269
+ if (!res || res.ok !== true) { m.textContent = pressFailed(res, 'That did not go through.'); if (res && res.reason) load(); return 'keep'; }
264
270
  toast(typeof said === 'function' ? said(res) : said); return null;
265
271
  };
266
272
  const setupSaid = (res) => { const d = res.drafted || {}; return 'Set up. ' + (d.path ? 'The first draft is ' + d.path + '.' : 'The first draft was not written' + (d.error ? ': ' + d.error : '') + '. Draft it now on the report tries again.'); };
@@ -271,9 +277,9 @@ function openFound(f) {
271
277
  html: `<p class="lede" style="margin:0 0 12px">${esc(f.why)}</p>${propHtml(f.proposal)}<h3 class="h2">What PMOS saw · ${f.evidence.length}</h3><ul class="pdev">${f.evidence.map((x) => `<li>${esc(x.text)}${x.kind ? ` <small>${esc(x.kind)}</small>` : ''}</li>`).join('')}</ul><p class="note">Set it up records the report in the report ledger and drafts its first cycle as a file. Not a report hides it; you can undo for 5 seconds.</p>`,
272
278
  acts: [['set', 'Set it up'], ['no', 'Not a report', 1]],
273
279
  on: {
274
- set: press('setup', { finding: f.id }, setupSaid),
280
+ set: press('setup', { finding: f.id, name: f.name }, setupSaid),
275
281
  no: (m) => {
276
- const t = setTimeout(async () => { dismissing.delete(f.id); const res = await repPost('dismiss', { finding: f.id }); if (!res || res.ok !== true) toast((res && res.error) || 'Not a report did not go through.'); await load(); }, 5000);
282
+ const t = setTimeout(async () => { dismissing.delete(f.id); const res = await repPost('dismiss', { finding: f.id, name: f.name }); if (!res || res.ok !== true) toast(pressFailed(res, 'Not a report did not go through.')); await load(); }, 5000);
277
283
  dismissing.set(f.id, t); drawReps();
278
284
  m.innerHTML = 'Hidden. It is recorded as not a report in 5 seconds. <button class="lk" id="rxUndo">Undo</button>';
279
285
  $('#rxUndo').onclick = () => { clearTimeout(dismissing.get(f.id)); dismissing.delete(f.id); drawReps(); m.textContent = 'Undone. Nothing was recorded.'; $$('#oMain [data-rx]').forEach((x) => { x.disabled = false; }); };