create-pmos 0.305.0 → 0.307.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.305.0",
3
+ "version": "0.307.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@63f4202
1
+ kernel-source: pmos@c5579b0
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-19T08:44:50Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-19T12:27: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-19T08:44:50Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-19T12:27: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-19T08:44:50Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-19T12:27:52Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -187,7 +187,7 @@ The Start button on a blocked row stays off. Starting an agent that writes needs
187
187
 
188
188
  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.
189
189
 
190
- **This week.** A card at the top of the right column shows Monday to Friday. Each day has a bar for its meeting time, from your calendar, and counts of items done and items due that day, from your list. If PMOS cannot read the calendar, the card says so and draws no bars. It makes no "will not fit" note, because no item has a size and PMOS holds no working hours.
190
+ **This week.** A card at the top of the right column 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.
191
191
 
192
192
  **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 also has one button: Today, Tomorrow, Review, or Give to agent. Give to agent opens the item, where you start the agent. A row from Jira shows its Jira key.
193
193
 
@@ -110,7 +110,7 @@ function weekOf({ today, items, events }) {
110
110
  const tot = (k) => days.reduce((a, d) => a + d[k], 0);
111
111
  const bits = [read ? tot('meetings') + ' ' + plural(tot('meetings'), 'meeting', 'meetings') : null, tot('done') + ' done', tot('due') + ' due'].filter(Boolean);
112
112
  return { title: 'This week', cap: bits.join(' · '), days, calendar: read,
113
- note: (read ? 'Bars are meeting time from your calendar. ' : 'The calendar could not be read, so there are no bars. ') + 'Done and due counts come from your list. PMOS holds no estimate or working hours, so it does not say what will not fit.' };
113
+ 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.' };
114
114
  }
115
115
 
116
116
  /** 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. */
@@ -8,7 +8,7 @@
8
8
  * gate.mayStart({ running }) → the governor's answer { allowed, mode, cap, reason }, with the day's count and the stop switch read in
9
9
  * gate.granted(at?) a start was made: it counts toward today's cap
10
10
  * gate.status({ running }) → { stopped, mode, cap, allowed, reason, running, startedToday, settings, lastActivityAt }
11
- * gate.settings() · gate.backupDir() → the governor's settings (defaults for what the file leaves out) · the nightly backup destination or null
11
+ * gate.settings() · gate.backupDir() → the governor's settings (defaults for what the file leaves out) · the nightly backup destination (the PM's choice, else `defaultBackupDir`, else null)
12
12
  * gate.setStopped(stopped, actor) the stop switch
13
13
  *
14
14
  * STATE: <dir>/orchestrator.json the PM's settings, written by the PM only: { v: 1, settings: {…governor keys}, backupDir? }
@@ -24,15 +24,16 @@ const L = require('./orchestrator-ledger.js');
24
24
  const localDay = (ms) => { const d = new Date(ms); return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`; };
25
25
  const readJson = (f) => { try { return JSON.parse(fs.readFileSync(f, 'utf8')); } catch { return null; } };
26
26
 
27
- function create({ dir, now = Date.now, load = () => ({ memFreeFrac: G.memFreeFrac(), cpuPerCore: G.cpuPerCore() }), quota = () => null, bootAt } = {}) {
27
+ function create({ dir, defaultBackupDir = null, now = Date.now, load = () => ({ memFreeFrac: G.memFreeFrac(), cpuPerCore: G.cpuPerCore() }), quota = () => null, bootAt } = {}) {
28
28
  let lastActivityAt = Number.isFinite(bootAt) ? bootAt : now(); // a restart counts as the PM being here: the safer mode
29
29
  const cfgFile = path.join(dir, 'orchestrator.json'), dayFile = path.join(dir, 'orchestrator-day.json');
30
30
 
31
31
  function config() {
32
32
  const raw = readJson(cfgFile);
33
- if (raw === null) return { settings: { ...G.DEFAULTS }, backupDir: null, problem: null };
33
+ if (raw === null) return { settings: { ...G.DEFAULTS }, backupDir: defaultBackupDir, backupIsDefault: !!defaultBackupDir, problem: null };
34
34
  const n = G.normalize(raw && raw.settings);
35
- return { settings: n.ok ? n.settings : { ...G.DEFAULTS }, backupDir: raw && typeof raw.backupDir === 'string' && raw.backupDir.trim() ? raw.backupDir.trim() : null,
35
+ const chosen = raw && typeof raw.backupDir === 'string' && raw.backupDir.trim() ? raw.backupDir.trim() : null;
36
+ return { settings: n.ok ? n.settings : { ...G.DEFAULTS }, backupDir: chosen || defaultBackupDir, backupIsDefault: !chosen && !!defaultBackupDir,
36
37
  problem: n.ok ? null : `orchestrator.json is not valid (${n.error}); the defaults apply` };
37
38
  }
38
39
  function startedToday(t) { const d = readJson(dayFile); return d && d.day === localDay(t) && Number.isInteger(d.count) ? d.count : 0; }
@@ -49,12 +50,12 @@ function create({ dir, now = Date.now, load = () => ({ memFreeFrac: G.memFreeFra
49
50
  function status({ running = 0 } = {}) {
50
51
  const t = now(), c = config(), d = mayStart({ running });
51
52
  return { stopped: L.isStopped(dir), mode: d.mode, cap: d.cap, allowed: d.allowed, reason: d.reason, running, startedToday: startedToday(t), settings: c.settings,
52
- settingsProblem: c.problem, backupDir: c.backupDir, lastActivityAt };
53
+ settingsProblem: c.problem, backupDir: c.backupDir, backupIsDefault: c.backupIsDefault, lastActivityAt };
53
54
  }
54
55
  return {
55
56
  touch: (at = now()) => { lastActivityAt = at; },
56
57
  mayStart, granted, status,
57
- settings: () => config().settings, backupDir: () => config().backupDir,
58
+ settings: () => config().settings, backupDir: () => config().backupDir, backupIsDefault: () => config().backupIsDefault,
58
59
  setStopped: (stopped, actor) => L.setStopped(dir, stopped, actor, now()),
59
60
  };
60
61
  }
@@ -25,6 +25,7 @@ function rows({ now = Date.now(), stopped = false, lastTickAt = null, tickMs = 6
25
25
  if (!backup.configured) out.push({ id: 'backup', level: 'warn', text: 'The nightly backup has no destination yet. Choose a folder outside this one (an external disk or a synced folder).' });
26
26
  else if (backup.lastError) out.push({ id: 'backup', level: 'bad', text: `The last backup failed: ${backup.lastError}` });
27
27
  else if (!Number.isFinite(backup.lastOkAt) || now - backup.lastOkAt > 36 * HOUR) out.push({ id: 'backup', level: 'bad', text: 'There has been no good backup in over 36 hours.' });
28
+ else if (backup.isDefault) out.push({ id: 'backup', level: 'warn', text: `Backups go to ${backup.dir || 'a folder'} on this machine's own disk. If the disk fails, the state and the backups are lost together. Set backupDir in orchestrator.json to an external disk or a synced folder.` });
28
29
  }
29
30
  return out;
30
31
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.305.0",
3
+ "version": "0.307.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.305.0",
9
+ "version": "0.307.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.305.0",
3
+ "version": "0.307.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",
@@ -116,11 +116,12 @@ function drawWeek() {
116
116
  const W = M.week; if (!W) return;
117
117
  $('#weekCap').textContent = W.cap;
118
118
  const top = Math.max(60, ...W.days.map((d) => d.meet_min));
119
+ const blk = (n, c) => Array.from({ length: Math.min(n, 3) }, () => `<i class="${c}"></i>`).join('');
119
120
  $('#weekBody').innerHTML = `<div class="wkd" role="list">${W.days.map((d) => {
120
- const h = d.meet_min ? Math.max(8, Math.round(d.meet_min / top * 100)) : 0;
121
+ const h = d.meet_min ? Math.max(8, Math.round(d.meet_min / top * 40)) : 0;
121
122
  const hrs = d.meet_min ? (Math.round(d.meet_min / 6) / 10) + ' h' : '';
122
- return `<div class="wkc${d.today ? ' now' : ''}${d.past ? ' past' : ''}" role="listitem" aria-label="${esc(d.dow + ' ' + d.n + ': ' + (W.calendar ? (d.meet_min ? hrs + ' of meetings, ' : 'no meetings, ') : '') + d.done + ' done, ' + d.due + ' due')}"><span class="wkl">${d.dow}</span><b>${d.n}</b><span class="wkb">${h ? `<i style="height:${h}%"></i>` : ''}</span><span class="wkt">${W.calendar ? (hrs || 'free') : '·'}</span><span class="wkn">${d.done} done${d.due ? ' · ' + d.due + ' due' : ''}</span></div>`;
123
- }).join('')}</div><p class="note" style="margin-top:12px">${esc(W.note)}</p>`;
123
+ return `<div class="wkc${d.today ? ' now' : ''}${d.past ? ' past' : ''}" role="listitem" aria-label="${esc(d.dow + ' ' + d.n + ': ' + (W.calendar ? (d.meet_min ? hrs + ' of meetings, ' : 'no meetings, ') : '') + d.done + ' done, ' + d.due + ' due')}"><span class="wkl">${d.dow}</span><b>${d.n}</b><span class="wkb">${h ? `<i class="wkm" style="height:${h}%"></i>` : ''}${blk(d.done, 'wkx')}${blk(d.due, 'wkp')}</span><span class="wkt">${W.calendar ? (hrs || '·') : '·'}</span><span class="wkn">${d.done} done${d.due ? ' · ' + d.due + ' due' : ''}</span></div>`;
124
+ }).join('')}</div><p class="wkg" aria-hidden="true"><span><i class="wkm"></i>Meetings</span><span><i class="wkx"></i>Done</span><span><i class="wkp"></i>Due</span></p><p class="note" style="margin-top:8px">${esc(W.note)}</p>`;
124
125
  }
125
126
  function draw() { drawHero(); drawWeek(); drawFriday(); drawFocus(); drawPlate(); drawTray(); drawAgents(); drawWaiting(); drawReview(); drawDock(); onScroll(); backFocus(); }
126
127
  const rowOf = (key) => (M && M.rows || []).find((r) => r.key === key) || null;
@@ -1974,3 +1974,11 @@ button.wl-row[aria-pressed="true"] .wl-tog{background:var(--solid);color:var(--o
1974
1974
  .dzcg{display:grid;grid-template-columns:1fr 1fr;gap:12px}
1975
1975
  @media (max-width:700px){.dzcg{grid-template-columns:1fr}}
1976
1976
  .dzch{margin-bottom:6px}
1977
+ .wkd .wkc{font:400 12px var(--sans);letter-spacing:0;text-transform:none;padding:12px 4px 10px}
1978
+ .wkc .wkl{font:500 11px var(--mono);letter-spacing:.08em}
1979
+ .wkc .wkb{flex-direction:column-reverse;gap:3px;width:36px;height:100px;border-radius:12px;padding:0}.wkb i{flex:none;border-radius:4px}
1980
+ .wkb .wkm,.wkg .wkm{background:color-mix(in oklab,var(--ink) 22%,var(--well))}
1981
+ .wkb .wkx,.wkg .wkx{background:var(--ink)}.wkb .wkx,.wkb .wkp{height:12%}
1982
+ .wkb .wkp,.wkg .wkp{background:repeating-linear-gradient(135deg,var(--ember) 0 3px,color-mix(in oklab,var(--ember) 35%,var(--well)) 3px 6px)}
1983
+ .wkc .wkt{font-weight:600;color:var(--ink-2)}
1984
+ .wkg{display:flex;gap:14px;margin:12px 0 0;font-size:12px;color:var(--ink-3)}.wkg span{display:inline-flex;align-items:center;gap:6px}.wkg i{width:10px;height:10px;border-radius:50%;display:inline-block}
@@ -2583,7 +2583,7 @@ const dashboardScheduleTick = () => {
2583
2583
  // window, and starts its short headless runs. Everything it decides is in lib/driver.js; this only hands it the server's parts.
2584
2584
  // agent-orchestrator: the capacity governor in front of every run the orchestrator may start. The Driver asks it before each start; the status route reads it.
2585
2585
  // PMOS_TICK_MS is the suites' fast clock: a suite runs beside forty others, so the machine-load check is skipped there (the rest of the gate applies).
2586
- const orchGate = require('./lib/orchestrator-gate.js').create({ dir: STATE, ...(process.env.PMOS_TICK_MS ? { load: () => null } : {}) });
2586
+ const orchGate = require('./lib/orchestrator-gate.js').create({ dir: STATE, ...(process.env.PMOS_TICK_MS ? { load: () => null } : { defaultBackupDir: path.join(require('os').homedir(), 'pmos-backups') }) });
2587
2587
  const driver = driverRunLib.create({
2588
2588
  mayStart: ({ running }) => orchGate.mayStart({ running }),
2589
2589
  started: () => orchGate.granted(),
@@ -2612,7 +2612,7 @@ const orchHealth = () => {
2612
2612
  const backupLib = require('./lib/state-backup.js'), log = backupLib.readLog(STATE);
2613
2613
  return require('./lib/orchestrator-health.js').rows({ now: Date.now(), stopped: orchGate.status({}).stopped, lastTickAt: orchLastTickAt, tickMs: TICK_MS,
2614
2614
  diskFreeFrac: require('./lib/orchestrator-health.js').diskFreeFrac(STATE), loginHeld: driver.loginHeld(),
2615
- backup: { configured: !!orchGate.backupDir(), lastOkAt: log.lastOkAt, lastError: log.lastError } });
2615
+ backup: { configured: !!orchGate.backupDir(), lastOkAt: log.lastOkAt, lastError: log.lastError, isDefault: orchGate.backupIsDefault(), dir: orchGate.backupDir() } });
2616
2616
  };
2617
2617
  const orchTick = () => {
2618
2618
  orchLastTickAt = Date.now();