create-pmos 0.384.0 → 0.385.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.384.0",
3
+ "version": "0.385.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": {
@@ -32,6 +32,18 @@
32
32
  "audit"
33
33
  ],
34
34
  "pmosChanges": [
35
+ {
36
+ "v": "0.385.0",
37
+ "at": "2026-10-21T14:04:22.922Z",
38
+ "f": 2,
39
+ "prs": [
40
+ {
41
+ "n": 996,
42
+ "t": "A task's Jira ticket from the stored reads, with Read it now",
43
+ "s": "A task's Jira ticket from the stored reads, with Read it now"
44
+ }
45
+ ]
46
+ },
35
47
  {
36
48
  "v": "0.384.0",
37
49
  "at": "2026-10-21T13:39:28.616Z",
@@ -294,23 +306,6 @@
294
306
  "s": "Refresh all is one ordered run on the server, following Wawan's rule (2026-10-21): derived content is rebuilt only after its sources are fresh."
295
307
  }
296
308
  ]
297
- },
298
- {
299
- "v": "0.365.0",
300
- "at": "2026-10-21T01:17:24.947Z",
301
- "f": 2,
302
- "prs": [
303
- {
304
- "n": 962,
305
- "t": "Item fields move out of the chat start into Edit ▾ beside the tabs",
306
- "s": "Item fields move out of the chat start into Edit ▾ beside the tabs"
307
- },
308
- {
309
- "n": 972,
310
- "t": "The morning brief is built from the saved reads of your tools (briefing-source-flow, slice 2)",
311
- "s": "The brief is derived content, following the rule Wawan set on 2026-10-21."
312
- }
313
- ]
314
309
  }
315
310
  ]
316
311
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@cb5f50a7
1
+ kernel-source: pmos@5396a91c
2
2
  assembled: 2026-10-21
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-21T13:39:25Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-21T14:04:20Z"}
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-21T13:39:25Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-21T14:04:20Z"}
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-21T13:39:25Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-21T14:04:20Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,4 +1,16 @@
1
1
  [
2
+ {
3
+ "v": "0.385.0",
4
+ "at": "2026-10-21T14:04:22.922Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 996,
9
+ "t": "A task's Jira ticket from the stored reads, with Read it now",
10
+ "s": "A task's Jira ticket from the stored reads, with Read it now"
11
+ }
12
+ ]
13
+ },
2
14
  {
3
15
  "v": "0.384.0",
4
16
  "at": "2026-10-21T13:39:28.616Z",
@@ -281,6 +281,8 @@ My work is the second place on the rail, at `/premium-work.html`. It reads the l
281
281
 
282
282
  **Claude's lead in a popup.** A popup such as a task, a document, a report or a measure opens on Claude's short lead, written ahead of time: why the thing matters now, what is asked or blocking, and what to do. Under it is when the lead was written and what Claude read for it. Opening a popup starts nothing: the lead is read from what is stored. **Refresh** asks the popup's own Claude Code session to write the lead again from the stored reads, and the new lead replaces the old one. A popup with no lead yet says so and offers **Write the lead**. An agent session saves a lead with `pmos lead put --key <popup key> --text "<lead>" --cite "<what it read, when>"`, and `pmos lead show [<key>]` prints what is stored. `pmos lead` calls no tool.
283
283
 
284
+ **A Jira ticket PMOS has not read.** A task's Jira tab first looks in the initiative's ticket draft and the sprint reads. When neither holds the ticket, it shows the newest Jira check that read it, or else what the stored Jira read says about it, and names which one. When nothing stored holds it, the tab says **Not read yet**, gives the time of the last Jira read, and offers **Read it now**. Read it now asks the popup's own Claude session to read that one ticket with your Atlassian connection, read only, and to save the popup's lead. Nothing reads Jira when the tab opens.
285
+
284
286
  **The agent's draft.** The draft shows as formatted text in the detail panel on the right, labelled as the agent's and not checked, with **Open** and **Copy**. Its heading names the item ("Draft for IDPF-2989", or "Draft for you"), the round and the time of the latest round, and an approved step shows as "Step when you approve". A long draft is cut short, with **Show all**. It appears there as soon as the agent finishes, even while the dialog is open. The left column keeps the conversation (with **View round**) and the decision cards, in the console's words: **Post it to Jira** (marked outward, with exactly the text that goes), **Edit the draft**, **Keep it as a draft** and **Mark it done**. Post asks you to confirm the exact text first, and nothing is posted before that.
285
287
 
286
288
  **An agent's offer.** When an agent has offered to draft an item, the dialog shows three choices: let the agent draft it (suggested), do it today, or not before next Monday. You pick one and press its button. A row with steps says how many it has and how many an agent can do. PMOS does not record that a step is done, so it shows no "done" count.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.384.0",
3
+ "version": "0.385.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.384.0",
9
+ "version": "0.385.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.384.0",
3
+ "version": "0.385.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",
@@ -141,6 +141,24 @@ const TICKETS = {
141
141
  ok('N2 a ticket that cannot be read says why, and invents nothing', !!k && /no such initiative/.test(k), k);
142
142
  await N.ctx.close();
143
143
  }
144
+ /* popup context slice 4: a ticket in no draft and no sprint read, and in no stored read either */
145
+ {
146
+ const Q = await open();
147
+ await Q.page.route('**/api/jira/ticket?*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, ticket: null, jira_read_at: new Date().toISOString() }) }));
148
+ await Q.page.evaluate(async () => { const m = await import('/pm/premium-vw-jira.js'); m.openTicket({ ws: 'w1', board: 'w1', initiative: 'self-serve-v2', ref: 'IDPF-2611' }); });
149
+ const q = await until(async () => { const x = await paneText(Q.page, 'jira:IDPF-2611'); return x && /Not read yet/.test(x) ? x : null; });
150
+ ok('N3 a ticket nothing stored holds says Not read yet, when Jira was last read, and offers Read it now (popup context slice 4)', !!q && /Not read yet: IDPF-2611\. The last Jira read \(read \d\d:\d\d\) does not hold it/.test(q) && /Read it now/.test(q)
151
+ && Q.reads.some((r) => /^\/api\/jira\/ticket\?.*key=IDPF-2611/.test(r)) && Q.posts.length === 0, q || JSON.stringify(Q.reads));
152
+ await Q.ctx.close();
153
+ // the route itself: a ticket no snapshot holds is found in the stored Jira source read, with what the read says and when
154
+ const fs = require('fs'), path = require('path');
155
+ fs.mkdirSync(path.join(T.STATE_DIR, 'source-reads'), { recursive: true });
156
+ fs.writeFileSync(path.join(T.STATE_DIR, 'source-reads', 'jira.json'), JSON.stringify({ source: 'jira', state: 'read', read_at: '2026-10-21T07:02:00.000Z', items: [{ id: 'a1b2c3d4e5f6', title: 'IDPF-2611 Payment retry', link: 'https://x.atlassian.net/browse/IDPF-2611', who: 'Sam', ask: 'Confirm the copy', about: 'Moved back to review' }] }));
157
+ const got = async (k) => (await fetch(BASE + '/api/jira/ticket?key=' + k)).json();
158
+ const g1 = await got('IDPF-2611'), g2 = await got('IDPF-261'), g3 = await got('idpf-2611');
159
+ ok('N4 GET /api/jira/ticket falls back to the stored Jira read: the key, title, what it says and the read time; a shorter key does not match', g1.ok && g1.ticket && g1.ticket.from === 'source-read' && g1.ticket.summary === 'IDPF-2611 Payment retry' && g1.ticket.about === 'Moved back to review' && g1.ticket.fetchedAt === '2026-10-21T07:02:00.000Z'
160
+ && g2.ticket === null && g2.jira_read_at === '2026-10-21T07:02:00.000Z' && g3.ticket && g3.ticket.key === 'IDPF-2611', JSON.stringify([g1, g2]));
161
+ }
144
162
 
145
163
  /* I the initiative page loads the ticket view for its Jira tasks */
146
164
  {
@@ -585,6 +585,8 @@ const onWebLink = (e) => {
585
585
  };
586
586
  $('#dBody').addEventListener('click', onWebLink); $('#dOut').addEventListener('click', onWebLink);
587
587
  /* /goal (slice 2): a chip sends its answer; Start and Cancel are the PM's presses on the goal card; Change something hands the box back. */
588
+ /** Send one message to the open popup's own conversation (a viewer tab's Read it now). False when no popup conversation is open. */
589
+ export async function askHere(text) { return S.key && $('#dlg').classList.contains('on') ? sendText(S.key, text) : false; }
588
590
  async function sendText(key, text, files) {
589
591
  const go = $('#askGo'); if (go) go.disabled = true; $('#askNote').textContent = 'Sending.';
590
592
  const ctx = S.ctx && key === S.key ? { context: S.ctx } : {};
@@ -119,3 +119,29 @@ export function readLine(iso, now = Date.now()) {
119
119
  const same = d.getFullYear() === n.getFullYear() && d.getMonth() === n.getMonth() && d.getDate() === n.getDate();
120
120
  return 'read ' + (same ? String(d.getHours()).padStart(2, '0') + ':' + String(d.getMinutes()).padStart(2, '0') : d.getDate() + ' ' + MON[d.getMonth()]);
121
121
  }
122
+
123
+ /**
124
+ * A ticket that is in no ticket draft and no sprint read, from GET /api/jira/ticket (popup context slice 4): the newest Jira check
125
+ * snapshot that holds it, or else the stored Jira source read. ans: that answer (or null), ref: the key.
126
+ * → a ticket model (fromStore: 'snapshot' | 'source-read'), or { ok: false, why, canRead } when nothing stored holds it, so the
127
+ * tab offers Read it now for that one ticket.
128
+ */
129
+ export function storedModel(ans, ref) {
130
+ const r = str(ref).toUpperCase();
131
+ const t = ans && ans.ok && ans.ticket ? ans.ticket : null;
132
+ if (!t) {
133
+ const last = ans && ans.jira_read_at ? ` The last Jira read (${readLine(ans.jira_read_at)}) does not hold it.` : ' Jira has not been read yet.';
134
+ return { ok: false, ref: r, canRead: !!r, why: `Not read yet: ${r || 'this ticket'}.${last} Read it now asks this popup's Claude session to read the one ticket.` };
135
+ }
136
+ const src = t.from === 'source-read' ? 'source-read' : 'snapshot';
137
+ const sp = t.sprint && t.sprint.name ? { name: t.sprint.name, state: t.sprint.state || '', dates: [day(t.sprint.start), day(t.sprint.end)].filter(Boolean).join(' – ') } : null;
138
+ const sub = t.subtasks && Number.isInteger(t.subtasks.total) && t.subtasks.total > 0 ? { done: Math.min(t.subtasks.done || 0, t.subtasks.total), total: t.subtasks.total } : null;
139
+ const about = [str(t.about), t.who && t.ask ? `${str(t.who)} asks: ${str(t.ask)}` : str(t.ask)].filter(Boolean).join('\n\n');
140
+ return {
141
+ ok: true, id: '', key: str(t.key) || r, inJira: true, title: str(t.summary) || r, type: '', priority: '', estimate: '', points: null,
142
+ status: str(t.status) || (src === 'source-read' ? 'Status not in the read' : 'No status read'), category: t.category || 'todo', sprint: sp,
143
+ flagged: !!t.flagged, reason: t.flagged ? str(t.reason) || 'Flagged in Jira' : '', stale: false,
144
+ sections: about ? [{ key: 'about', name: 'What the Jira read says', text: about }] : [], subtasks: sub, links: [], epic: null, prd: '', initiative: '',
145
+ url: safeUrl(t.url), readAt: t.fetchedAt || null, draftOnly: true, noDraft: false, readingOnly: false, fromStore: src,
146
+ };
147
+ }
@@ -8,8 +8,8 @@
8
8
  import { vwOpen, vwStyle } from './premium-viewer.js';
9
9
  import { openBacklog } from './premium-vw-backlog.js';
10
10
  import { mdRender } from './markdown.js';
11
- import { esc, toast } from './premium-shell.js';
12
- import { ticketModel, sprintModel, readLine } from './premium-vw-jira-model.js';
11
+ import { esc, toast, askHere } from './premium-shell.js';
12
+ import { ticketModel, sprintModel, readLine, storedModel } from './premium-vw-jira-model.js';
13
13
 
14
14
  const ICO = (p) => `<svg class="i" viewBox="0 0 24 24">${p}</svg>`;
15
15
  const EXT = ICO('<path d="M14 4h6v6M20 4l-9 9M18 14v6H4V6h6"/>');
@@ -26,11 +26,13 @@ const md = (t) => { try { const d = document.createElement('div'); d.append(...m
26
26
  const bar = (what, m) => `<div class="jbar"><span class="jlg" aria-hidden="true">J</span><span class="jbt"><b>From the last Jira read</b> · ${esc(what)} · ${esc(readLine(m.readAt))}</span>${m.url ? `<a class="jbtn" href="${esc(m.url)}" target="_blank" rel="noopener">${EXT}Open in Jira</a>` : ''}<button type="button" class="jbtn" data-jre>Read again</button></div>`;
27
27
  // the bars' widths are run-time geometry, set as a property rather than an inline style
28
28
  const bars = (el) => el.querySelectorAll('[data-pct]').forEach((i) => i.style.setProperty('--bd-w', Math.max(0, Math.min(100, +i.dataset.pct || 0)) + '%'));
29
- const empty = (why) => `<div class="jv"><div class="jempty"><b>Nothing to show</b><p>${esc(why)}</p></div></div>`;
29
+ const empty = (why, canRead) => `<div class="jv"><div class="jempty"><b>${canRead ? 'Not read yet' : 'Nothing to show'}</b><p>${esc(why)}</p>${canRead ? '<button type="button" class="jbtn" data-jread>Read it now</button>' : ''}</div></div>`;
30
+ // popup context slice 4: Read it now asks the popup's own Claude session to read the one ticket; nothing reads Jira when the tab opens
31
+ const readAsk = (ref) => `Read the Jira ticket ${ref} with my Atlassian connection, read only. Tell me its status, who has it, the latest comment and what is asked of me. Change nothing in Jira. Then save the lead of this popup with pmos lead put.`;
30
32
 
31
33
  /* ── the ticket ─────────────────────────────────────────────────────────────────────────────────────────── */
32
34
  function ticketHtml(m) {
33
- if (!m.ok) return empty(m.why);
35
+ if (!m.ok) return empty(m.why, m.canRead);
34
36
  const chips = [
35
37
  m.sprint ? `<span class="jchip" title="Sprint">${esc(m.sprint.name)}${m.sprint.state ? ` · ${esc(m.sprint.state)}` : ''}</span>` : '<span class="jchip mut" title="Sprint">No sprint</span>',
36
38
  m.points != null ? `<span class="jpts" title="Story points">${esc(m.points)} pt</span>` : '',
@@ -43,7 +45,7 @@ function ticketHtml(m) {
43
45
  ? `<button type="button" data-jt="${esc(l.ref)}">${LINK}<span class="jk">${esc(l.key || l.ref)}</span><b>${esc(l.title)}</b></button>`
44
46
  : `<span class="jlx">${LINK}<span class="jk">${esc(l.ref)}</span></span>`}</div>`).join('')}${m.prd ? `<div class="jln"><em>from</em><span class="jlx">${DOC}<b>${esc(m.prd)}</b></span></div>` : ''}</div>` : '';
45
47
  const body = m.sections.length ? m.sections.map((s) => `<h3>${esc(s.name)}</h3><div class="jmd">${md(s.text)}</div>`).join('')
46
- : `<p class="jnote">${m.noDraft ? 'This ticket is on no initiative of this board, so PMOS holds no text for it. Its title, status and points come from the sprint read.' : m.draftOnly ? 'This ticket is not in the initiative\'s ticket draft, so PMOS holds no text for it. Its title, status and points come from the sprint read.' : 'The ticket draft holds no text for this ticket.'}</p>`;
48
+ : `<p class="jnote">${m.fromStore ? `This ticket is not in the initiative's ticket draft. Its title and status come from ${m.fromStore === 'source-read' ? 'the stored Jira read' : 'the last Jira check that held it'}.` : m.noDraft ? 'This ticket is on no initiative of this board, so PMOS holds no text for it. Its title, status and points come from the sprint read.' : m.draftOnly ? 'This ticket is not in the initiative\'s ticket draft, so PMOS holds no text for it. Its title, status and points come from the sprint read.' : 'The ticket draft holds no text for this ticket.'}</p>`;
47
49
  return `<div class="jv">${bar('ticket', m)}<article class="jtk">
48
50
  <div class="jbc">${m.epic ? `<span class="jk">${esc(m.epic.key)}</span>${m.epic.title ? ` ${esc(m.epic.title)}` : ''} <span aria-hidden="true">/</span> ` : m.initiative ? `${esc(m.initiative)} <span aria-hidden="true">/</span> ` : ''}<span class="jk">${esc(m.key || m.id)}</span></div>
49
51
  <h1>${esc(m.title)}</h1>
@@ -65,8 +67,10 @@ export async function openTicket(o) {
65
67
  const draw = async (el) => {
66
68
  el.innerHTML = '<div class="jv"><p class="jnote">Reading the ticket</p></div>';
67
69
  const [view, sprints] = await Promise.all([initiative ? getJson('/api/jira/tickets', { ws, initiative }) : null, board ? getJson('/api/boards/sprints', { ws, board }) : null]);
68
- const m = ticketModel(view, ref, sprints);
70
+ let m = ticketModel(view, ref, sprints);
71
+ if (!m.ok && !(view && view.ok === false && view.error)) m = storedModel(await getJson('/api/jira/ticket', { ws, key: ref }), ref);
69
72
  el.innerHTML = ticketHtml(m); bars(el);
73
+ const rd = el.querySelector('[data-jread]'); if (rd) rd.onclick = async () => { rd.disabled = true; toast(await askHere(readAsk(ref)) ? 'Claude is reading ' + ref + ' in this popup\'s chat.' : 'Open the ticket from its popup to read it.'); };
70
74
  el.querySelectorAll('[data-jt]').forEach((b) => { b.onclick = () => openTicket({ ws, board, initiative, ref: b.dataset.jt }); });
71
75
  const re = el.querySelector('[data-jre]'); if (re) re.onclick = async () => { await draw(el); toast('Read the cached Jira reading again. A Jira check reads Jira itself.'); };
72
76
  };
@@ -8132,8 +8132,14 @@ async function handleRequest(req, res) {
8132
8132
  // holding the PM's own Atlassian connection, does (D53, D88).
8133
8133
  if (p === '/api/jira/ticket' && req.method === 'GET') { // premium-chat-viewer slice 2: one ticket by key from the stored Jira readings
8134
8134
  const w = getWs(url.searchParams.get('ws'));
8135
- const t = jiraStatus.findTicket(w ? w.root : SELF_ROOT, url.searchParams.get('key'));
8136
- return json(res, { ok: true, ticket: t });
8135
+ const key = String(url.searchParams.get('key') || '').toUpperCase();
8136
+ const t = jiraStatus.findTicket(w ? w.root : SELF_ROOT, key);
8137
+ if (t) return json(res, { ok: true, ticket: t });
8138
+ // popup context slice 4: a ticket no Jira check snapshot holds may be in the stored Jira source read (lib/source-reads.js)
8139
+ const jr = require('./lib/source-reads.js').read(STATE, 'jira');
8140
+ const hit = jr && /^[A-Z][A-Z0-9]+-\d+$/.test(key) ? (jr.items || []).find((x) => new RegExp('(^|[^A-Z0-9-])' + key + '($|[^0-9])').test(String(x.title || '') + ' ' + String(x.link || ''))) : null;
8141
+ return json(res, { ok: true, ticket: hit ? { key, summary: hit.title, status: null, about: hit.about || null, who: hit.who || null, ask: hit.ask || null, url: hit.link || null, fetchedAt: jr.read_at, from: 'source-read' } : null,
8142
+ jira_read_at: jr ? jr.read_at : null });
8137
8143
  }
8138
8144
  if (p === '/api/jira/tickets' && req.method === 'GET') {
8139
8145
  const w = getWs(url.searchParams.get('ws'));