create-pmos 0.318.0 → 0.319.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.318.0",
3
+ "version": "0.319.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@c02ec11
1
+ kernel-source: pmos@ed07d2c
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-19T14:36:49Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-19T14:43:52Z"}
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-19T14:36:49Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-19T14:43:52Z"}
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-19T14:36:49Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-19T14:43:52Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -72,15 +72,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
72
72
  ok('M1 the rail names four places, My work is current and the indicator sits on it', rail.names.join() === 'Briefing,My work,Board,Insights' && rail.cur === 'My work' && rail.go.join() === 'brief,work,init,rep' && rail.pi === '1', JSON.stringify(rail));
73
73
  { await p.click('#moreBtn'); const tc = await p.evaluate(() => { const a = document.querySelector('#toConsole'); if (!a) return null; const r = a.getBoundingClientRect(); return { href: a.getAttribute('href'), label: a.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height), tab: a.tabIndex }; }); ok('M1 the ⋯ menu links to the console (premium-console-link, premium-topbar)', tc && tc.href === '/console.html' && tc.label === 'Open the console' && tc.w >= 44 && tc.h >= 44 && tc.tab === 0, JSON.stringify(tc)); await p.keyboard.press('Escape'); }
74
74
  const res = await fetch(BASE + '/premium-work').then((r) => r.status);
75
- { /* the Calendar card shared with the Briefing (initiative premium-calendar-card) */
76
- const cal = await until(() => p.evaluate(() => { const b = [...document.querySelectorAll('#weekBody [data-day]')]; return b.length === 5 && !/Reading/.test(document.querySelector('#wkList').textContent) ? { title: document.querySelector('#hWeek').textContent, pressed: b.filter((x) => x.getAttribute('aria-pressed') === 'true').length, list: !!document.querySelector('#wkList .wkd'), fold: document.querySelector('#weekCard .foldb').getAttribute('aria-expanded') } : null; }));
77
- ok('M13 My work shows the same Calendar card: five day buttons, a day list and a chevron, open at 1280 px', cal && cal.title === 'Calendar' && cal.pressed <= 1 && cal.list && cal.fold === 'true', JSON.stringify(cal));
78
- const other = await p.evaluate(() => { const b = document.querySelector('#weekBody [data-day][aria-pressed="false"]'); b.click(); return b.dataset.day; });
79
- ok('M13 pressing a day lists that day', await until(() => p.evaluate((d) => document.querySelector('#weekBody [data-day="' + d + '"]').getAttribute('aria-pressed') === 'true' && !!document.querySelector('#wkList .wkd'), other)));
80
- await p.click('#weekCard .foldb');
81
- ok('M13 the chevron hides the card to one line', await p.evaluate(() => document.querySelector('#weekCard').classList.contains('calhid') && getComputedStyle(document.querySelector('#wkList')).display === 'none' && !document.querySelector('#weekCard .folds').hidden));
82
- await p.click('#weekCard .folds');
83
- }
75
+ ok('M13 My work has no Calendar card: the Briefing holds the calendar (premium-calendar-card A1)', await p.evaluate(() => !document.querySelector('#weekCard') && ![...document.querySelectorAll('h2')].some((h) => /Calendar|This week/.test(h.textContent))));
84
76
  ok('M1 the page is served at /premium-work and /premium-work.html', res === 200 && (await fetch(BASE + '/premium-work.html')).status === 200);
85
77
  {
86
78
  const r2 = await open(); await r2.page.locator('.rail [data-go="brief"]').click();
@@ -107,7 +107,7 @@ The pin on a row keeps it at the top for this session.
107
107
 
108
108
  ## Calendar
109
109
 
110
- The Calendar card holds the week and the day. Its top row is a strip of Monday to Friday: each day shows its meeting time from the calendar PMOS holds, and blocks for items done and due that day from your list. Today is picked when the page opens. Press another day to list its meetings; press today to come back. The same card is on My work.
110
+ The Calendar card holds the week and the day. Its top row is a strip of Monday to Friday: each day shows its meeting time from the calendar PMOS holds, and blocks for items done and due that day from your list. Today is picked when the page opens. Press another day to list its meetings; press today to come back. My work has no calendar: this card is the one place it shows.
111
111
 
112
112
  The chevron in the card header hides the card down to one line: the next meeting today (or "Nothing more today"), the week's meeting count and the items due. Press the line or the chevron to show the card again. The page remembers this in this browser. With nothing remembered, the card starts open on a computer and hidden on a phone.
113
113
 
@@ -207,8 +207,6 @@ The Start button on a blocked row stays off. Starting an agent that writes needs
207
207
 
208
208
  My work is the second place on the rail, at `/premium-work.html`. It reads the list the Work page reads, so the two pages show one list, and every press uses the Work page's own route. It adds no writer of its own.
209
209
 
210
- **Calendar.** The same Calendar card as on the Briefing sits at the top of the right column. Its strip shows Monday to Friday. Each day has a grey bar for its meeting time, from your calendar, with black blocks for items done that day and orange hatched blocks for items due, from your list (at most three of each; they count items, not hours). A legend names the three. If PMOS cannot read the calendar, the card says so and draws no meeting bar. The mockup's hours done, hours free, warning line and Move to Friday need an estimate per item and working hours, which PMOS does not hold, so they are not drawn. It makes no "will not fit" note, because no item has a size and PMOS holds no working hours. Press a day to list its meetings below the strip; here the rows are for reading only. The chevron hides the card, as on the Briefing.
211
-
212
210
  **Row suggestions and buttons.** A row shows a suggestion line only when a record backs it: an agent's offer on the item, a draft that is ready, or a date. A row has no button of its own. Press the row to open the item, where you review a draft, start the agent, or give the item a day. To act without opening it, swipe the row or press the right or left arrow key. A row in Today goes to Done (or opens its draft when one is ready) on the right and to Tomorrow on the left. Any other row goes to Today on the right and to Someday on the left. A row from Jira shows its Jira key.
213
211
 
214
212
  **Weekly review.** A card lists five steps: sort the inbox, place what you added, check who owes you, review agent drafts, and look at what sat untouched. Each step shows a count from your list and opens its first item. **Start the review** opens the first step that has something. On a Friday the card reads Friday review. PMOS keeps no review schedule and no timing, so the card shows none. Answers, ideas and reports an agent files by itself are not shown, because PMOS holds no records for them.
@@ -93,28 +93,6 @@ function suggestOf(it, list, today, overdue) {
93
93
  return { sug, cta };
94
94
  }
95
95
 
96
- /** This week, Monday to Friday, from three records: the meetings the calendar holds, the items marked done that day, and the open items with that due date.
97
- * No effort, capacity or "won't fit" figure is made: no item carries a size and PMOS holds no working hours. */
98
- function weekOf({ today, items, events }) {
99
- const base = isoDay(today);
100
- const dow = (base.getDay() + 6) % 7;
101
- const iso = (d) => d.getFullYear() + '-' + pad(d.getMonth() + 1) + '-' + pad(d.getDate());
102
- const days = [0, 1, 2, 3, 4].map((i) => { const d = new Date(base.getFullYear(), base.getMonth(), base.getDate() - dow + i); return { iso: iso(d), dow: WEEKDAYS[d.getDay()].slice(0, 3).toUpperCase(), n: d.getDate() }; });
103
- const read = Array.isArray(events);
104
- for (const d of days) {
105
- const ev = read ? events.filter((e) => String(e.at || '').slice(0, 10) === d.iso) : [];
106
- d.meetings = ev.length;
107
- d.meet_min = ev.reduce((a, e) => { const m = Date.parse(e.end) - Date.parse(e.at); return a + (m > 0 && m < 86400000 ? Math.round(m / 60000) : 0); }, 0);
108
- d.done = items.filter((it) => it.done && String(it.done_at || '').slice(0, 10) === d.iso).length;
109
- d.due = items.filter((it) => !it.done && it.due === d.iso).length;
110
- d.today = d.iso === today; d.past = d.iso < today;
111
- }
112
- const tot = (k) => days.reduce((a, d) => a + d[k], 0);
113
- const bits = [read ? tot('meetings') + ' ' + plural(tot('meetings'), 'meeting', 'meetings') : null, tot('done') + ' done', tot('due') + ' due'].filter(Boolean);
114
- return { title: 'This week', cap: bits.join(' · '), days, calendar: read,
115
- note: (read ? 'The grey bar is meeting time from your calendar. ' : 'The calendar could not be read, so there is no meeting bar. ') + 'Each Done block is an item done that day and each Due block an item due, up to three of each; they count items, not hours. PMOS holds no estimate or working hours, so it does not say what will not fit.' };
116
- }
117
-
118
96
  /** The weekly review: a count and a first item for each place the PM sorts things. Every figure is a count of the list. No step time is made: PMOS does not time a review. */
119
97
  function fridayOf({ today, work, tray, ready, review }) {
120
98
  const first = (a) => (a[0] ? 'work:' + (a[0].it ? a[0].it.id : a[0].id) : null);
@@ -168,7 +146,7 @@ function rowOf(it, list, v, inReview, focusIds) {
168
146
  };
169
147
  }
170
148
 
171
- function build({ v, now, events }) {
149
+ function build({ v, now }) {
172
150
  now = now || Date.now();
173
151
  v = v || {};
174
152
  const today = v.today || new Date(now).toISOString().slice(0, 10);
@@ -266,7 +244,6 @@ function build({ v, now, events }) {
266
244
  dock: { needs: clear, label: 'to clear', next: firstToday ? firstToday.title : (sections[0].rows[0] ? sections[0].rows[0].title : null) },
267
245
  queue,
268
246
  friday: fridayOf({ today, work, tray, ready, review: v.review || [] }),
269
- week: weekOf({ today, items: v.items || all.map((x) => x.it), events }),
270
247
  focus, jobs,
271
248
  rows: rowsAll,
272
249
  };
@@ -23,10 +23,8 @@ module.exports = {
23
23
  let v = null, err = null;
24
24
  try { v = await listView(req, ctx); } catch (e) { err = String((e && e.message) || e).slice(0, 200); }
25
25
  if (!v || v.ok === false) { ctx.json(res, { ok: false, state: 'error', error: err || (v && v.error) || 'the list could not be read' }, 500); return true; }
26
- let events = null;
27
- try { events = require('./calendar-events.js').readAll(ctx.runtimeDir, { now: Date.now() }); } catch { events = null; }
28
26
  let model;
29
- try { model = WP.build({ v, now: Date.now(), events }); } catch (e) { ctx.json(res, { ok: false, state: 'error', error: 'the page could not be built: ' + String((e && e.message) || e).slice(0, 160) }, 500); return true; }
27
+ try { model = WP.build({ v, now: Date.now() }); } catch (e) { ctx.json(res, { ok: false, state: 'error', error: 'the page could not be built: ' + String((e && e.message) || e).slice(0, 160) }, 500); return true; }
30
28
  ctx.json(res, { ok: true, state: 'ready', model, as_of: Date.now() });
31
29
  return true;
32
30
  },
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.318.0",
3
+ "version": "0.319.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.318.0",
9
+ "version": "0.319.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.318.0",
3
+ "version": "0.319.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",
@@ -42,12 +42,12 @@ export function weekView(r, today) {
42
42
  initiatives: (Array.isArray(r.gantt) ? r.gantt : []).filter((g) => g && g.id).slice(0, 60).map((g) => ({ id: g.id, name: clip(g.title || g.id, 70) })) };
43
43
  }
44
44
 
45
- /* ── the Calendar card shared by the Briefing and My work (initiative premium-calendar-card): the day strip, its summary line and the chevron ── */
45
+ /* ── the Briefing's Calendar card (initiative premium-calendar-card; My work has none, A1): the day strip, its summary line and the chevron ── */
46
46
  const weekKeys = (today) => {
47
47
  const [y, m, d] = today.split('-').map(Number), wd = (new Date(Date.UTC(y, m - 1, d)).getUTCDay() + 6) % 7;
48
48
  return [0, 1, 2, 3, 4].map((i) => new Date(Date.UTC(y, m - 1, d - wd + i)).toISOString().slice(0, 10));
49
49
  };
50
- /** Monday to Friday, in the shape lib/my-work-premium.js weekOf draws: meeting minutes from the week answer `W` (weekView), done and due counts from the PM's
50
+ /** Monday to Friday: meeting minutes from the week answer `W` (weekView), done and due counts from the PM's
51
51
  * list `items` (GET /api/pm-items). With no calendar the days still carry the list's counts and `calendar` is false. */
52
52
  export function stripOf(W, items, today) {
53
53
  const ok = !!(W && W.state === 'ok'), its = Array.isArray(items) ? items : [];
@@ -60,7 +60,7 @@ export function stripOf(W, items, today) {
60
60
  });
61
61
  return { days, calendar: ok };
62
62
  }
63
- /** The strip: one button per day, the picked one pressed. Its look is the My work This week card's (meeting bar, done and due blocks). */
63
+ /** The strip: one button per day, the picked one pressed. Meeting bar, done and due blocks, as PR 878 drew them. */
64
64
  export function stripHtml(S, picked, esc) {
65
65
  const top = Math.max(60, ...S.days.map((d) => d.meet_min));
66
66
  const blk = (n, c) => Array.from({ length: Math.min(n, 3) }, () => `<i class="${c}"></i>`).join('');
@@ -3,8 +3,7 @@
3
3
  * Every press goes to the Work page's own route under /api/pm-items, /api/pm-jobs or /api/my-work; this file adds no writer. A control with nothing honest to write stays off and says why.
4
4
  * My work depth (initiative premium-work-depth): the dialog's tool row (Edit, Who does each step, Not before, Someday), the Focus bar and its jobs, the agent on an item
5
5
  * (draft, stop, edit, post after a confirm, send back, try again), and keys and swipe on the rows. */
6
- import { pmPost, pmGet } from './http.js';
7
- import { weekView, stripHtml, foldLine, mountFold } from './premium-meeting.js';
6
+ import { pmPost } from './http.js';
8
7
  import { mdRender } from './markdown.js';
9
8
  import { $, $$, esc, openDlg, closeDlg, setMode, toast, loadThread, onScroll, wireRail, logHtml, turnA, turnU, ptx, CHECK, RM, S, setPageGaps, onPageChat, openPageChat } from './premium-shell.js';
10
9
 
@@ -121,31 +120,7 @@ $('#frBody').addEventListener('click', (e) => {
121
120
  const st = M.friday.steps.find((x) => x.key === b.dataset.fr); const r = st && st.first ? rowOf(st.first) : null;
122
121
  if (r) openRow(r); else toast('Nothing to open here.');
123
122
  });
124
- /* the Calendar card (initiative premium-calendar-card): the strip from this page's model, the picked day's meetings from GET /api/calendar-views (read-only here), a chevron */
125
- let wkPick = null, WK = null, wkFold = null;
126
- const wkToday = () => (M && M.today) || new Date().toISOString().slice(0, 10);
127
- async function readWk() {
128
- const w = new URLSearchParams(location.search).get('ws');
129
- WK = weekView(await pmGet('/api/calendar-views?view=week&date=' + wkToday() + (w ? '&ws=' + encodeURIComponent(w) : '')), wkToday());
130
- drawWeek();
131
- }
132
- function drawWeek() {
133
- const W = M.week; if (!W) return;
134
- if (!wkFold) wkFold = mountFold($('#weekCard'), 'work');
135
- const pick = wkPick || wkToday(), S = { days: W.days.map((d) => ({ ...d, meetings: d.meetings || 0 })), calendar: W.calendar };
136
- $('#weekCap').textContent = W.cap;
137
- $('#weekBody').innerHTML = stripHtml(S, pick, esc);
138
- $('#weekNote').textContent = W.note;
139
- wkFold.line(S, foldLine(S, WK), esc);
140
- const x = WK && WK.state === 'ok' ? WK.days.find((y) => y.key === pick) : null;
141
- const due = (M.rows || []).filter((r) => r.edit && r.edit.due === pick && r.list !== 'done');
142
- $('#wkList').innerHTML = !WK ? '<div class="empty">Reading the calendar PMOS holds.</div>' : WK.state === 'error' ? `<div class="empty" role="status">Calendar not read. ${esc(WK.reason)}</div>`
143
- : `<div class="wkd${x && x.today ? ' now' : ''}">${esc(x ? x.label : pick)}${x && x.today ? ' · today' : ''}<em>${x && x.rows.length ? x.rows.length + (x.rows.length === 1 ? ' meeting' : ' meetings') : ''}</em></div>`
144
- + due.map((r) => `<div class="wkdue" role="listitem"><span>Due</span><b>${esc(r.title)}</b></div>`).join('')
145
- + (x && x.rows.length ? x.rows.map((r) => `<div class="ev src-meeting${r.past || (x.today && Date.parse(r.end || r.at) < Date.now()) ? ' wkpast' : ''}" role="listitem"><time>${esc(r.time)}</time><span class="gl-t"><svg class="i" viewBox="0 0 24 24"><rect x="4" y="5" width="16" height="15" rx="3"/><path d="M4 10h16M9 3v4M15 3v4"/></svg></span><span><b>${esc(r.title)}</b><span class="d">${esc([r.sub, r.about].filter(Boolean).join(' · ') || 'No other people listed')}</span></span></div>`).join('') : '<div class="empty">No meetings.</div>');
146
- }
147
- $('#weekBody').addEventListener('click', (e) => { const b = e.target.closest('[data-day]'); if (!b || !M) return; wkPick = b.dataset.day; drawWeek(); });
148
- function draw() { drawHero(); drawWeek(); drawFriday(); drawFocus(); drawQueue(); drawWaiting(); drawReview(); drawDock(); onScroll(); backFocus(); }
123
+ function draw() { drawHero(); drawFriday(); drawFocus(); drawQueue(); drawWaiting(); drawReview(); drawDock(); onScroll(); backFocus(); }
149
124
  const rowOf = (key) => (M && M.rows || []).find((r) => r.key === key) || null;
150
125
 
151
126
  /* ── the dialog: detail first, the presses of the Work page, the tool row, the agent, the read-only agent beside it ─────────────────── */
@@ -654,7 +629,6 @@ async function load() {
654
629
  }
655
630
  M = r.model; draw();
656
631
  openAsked();
657
- if (!WK) readWk();
658
632
  const mine = dlgOpen() && ((dlgKind === 'item' && openR && S.key === openR.key) || (dlgKind === 'fjobs' && S.key === 'focus:today'));
659
633
  if (mine && dlgKind === 'item') refreshOpen(); else if (mine) drawFocusDlg();
660
634
  }
@@ -58,6 +58,8 @@
58
58
  <div class="ch"><span class="ic"><svg class="i" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></svg></span><h2 id="hWait">Waiting on others</h2><small id="waitCap"></small></div>
59
59
  <div id="waitBody"></div>
60
60
  </section>
61
+ </div>
62
+ <div>
61
63
  <section class="card rise" style="--d:9" id="frCard" aria-labelledby="hFr">
62
64
  <div class="ch"><span class="ic"><svg class="i" viewBox="0 0 24 24"><rect x="4" y="5" width="16" height="15" rx="3"/><path d="m8.5 13 2.5 2.5 4.5-5"/></svg></span><h2 id="hFr">Weekly review</h2><small id="frCap"></small></div>
63
65
  <div id="frBody"></div>
@@ -67,14 +69,6 @@
67
69
  <div class="revc"><p id="revTxt"></p><button id="revBtn" type="button">Look at them</button></div>
68
70
  </section>
69
71
  </div>
70
- <div>
71
- <section class="card rise" style="--d:6" id="weekCard" aria-labelledby="hWeek">
72
- <div class="ch"><span class="ic"><svg class="i" viewBox="0 0 24 24"><rect x="4" y="5" width="16" height="15" rx="3"/><path d="M4 10h16M9 3v4M15 3v4"/></svg></span><h2 id="hWeek">Calendar</h2><small id="weekCap"></small></div>
73
- <div id="weekBody"></div>
74
- <div class="tl wkday" id="wkList" role="list" aria-label="Meetings of the picked day"></div>
75
- <p class="note" id="weekNote" style="margin-top:8px"></p>
76
- </section>
77
- </div>
78
72
  </div>
79
73
  <p class="foot" id="foot">This page reads your list, the same one the Work page reads. It writes only when you press a button that says what it does, and each press uses the Work page's own route. Starting an agent from a list is not built here. The Kept and Done tabs show only your own items. Answers, ideas and reports an agent files on its own, effort figures and review timing need records PMOS does not hold yet. Jira and Slack items appear only when an agent session has read them.</p>
80
74
  </main>