create-pmos 0.815.0 → 0.816.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.815.0",
3
+ "version": "0.816.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": {
@@ -34,8 +34,8 @@
34
34
  ],
35
35
  "pmosChanges": [
36
36
  {
37
- "v": "0.815.0",
38
- "at": "2026-11-25T07:43:14.274Z",
37
+ "v": "0.816.0",
38
+ "at": "2026-11-25T07:54:58.764Z",
39
39
  "f": 4,
40
40
  "prs": [
41
41
  {
@@ -54,6 +54,20 @@
54
54
  "open": "/today.html"
55
55
  },
56
56
  "i": "capture-to-initiative"
57
+ },
58
+ {
59
+ "n": 1856,
60
+ "t": "Away days, a handover note drafted in the Library, and what moved while you were away (job #1841, A152)",
61
+ "s": "Away days, a handover note drafted in the Library, and what moved while you were away (job #1841, A152)",
62
+ "k": "new",
63
+ "i": "away-handover"
64
+ },
65
+ {
66
+ "n": 1865,
67
+ "t": "Unblock CI on main — answer cache watches folders one by one on Linux; pmos commands wait for a busy server",
68
+ "s": "Unblock CI on main — answer cache watches folders one by one on Linux; pmos commands wait for a busy server",
69
+ "k": "fix",
70
+ "i": "ci-main-unblock"
57
71
  }
58
72
  ]
59
73
  },
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@3ff578222
1
+ kernel-source: pmos@429d3abde
2
2
  assembled: 2026-11-25
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-11-25T07:43:11Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-25T07:54:55Z"}
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-11-25T07:43:11Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-25T07:54:55Z"}
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-11-25T07:43:11Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-25T07:54:55Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -82,11 +82,15 @@ function probe(port, ms = PROBE_MS) {
82
82
  req.on('timeout', () => { req.destroy(); res(null); });
83
83
  });
84
84
  }
85
+ // How long a `pmos` command waits for the workspace server to answer. A server that is not running refuses at once, so this only
86
+ // matters when it is busy: while several agent sessions start in tmux at once, a request on a 2-CPU machine took over 5 s, and the
87
+ // old 5 s limit made `pmos proactive day show` say the server was not running (day-run D8b, 2026-11-25).
88
+ const API_TIMEOUT_MS = 30000;
85
89
  function api(port, method, pathname, body, extraHeaders) {
86
90
  return new Promise((res) => {
87
91
  const data = body ? JSON.stringify(body) : null;
88
92
  const req = http.request(`${urlOf(port)}${pathname}`, {
89
- method, timeout: 5000,
93
+ method, timeout: API_TIMEOUT_MS,
90
94
  headers: { ...(data ? { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(data) } : {}), ...(extraHeaders || {}) },
91
95
  }, (r) => { let b = ''; r.on('data', (c) => (b += c)); r.on('end', () => { try { res(JSON.parse(b)); } catch { res(null); } }); });
92
96
  req.on('error', () => res(null));
@@ -1,7 +1,7 @@
1
1
  [
2
2
  {
3
- "v": "0.815.0",
4
- "at": "2026-11-25T07:43:14.274Z",
3
+ "v": "0.816.0",
4
+ "at": "2026-11-25T07:54:58.764Z",
5
5
  "f": 4,
6
6
  "prs": [
7
7
  {
@@ -20,6 +20,20 @@
20
20
  "open": "/today.html"
21
21
  },
22
22
  "i": "capture-to-initiative"
23
+ },
24
+ {
25
+ "n": 1856,
26
+ "t": "Away days, a handover note drafted in the Library, and what moved while you were away (job #1841, A152)",
27
+ "s": "Away days, a handover note drafted in the Library, and what moved while you were away (job #1841, A152)",
28
+ "k": "new",
29
+ "i": "away-handover"
30
+ },
31
+ {
32
+ "n": 1865,
33
+ "t": "Unblock CI on main — answer cache watches folders one by one on Linux; pmos commands wait for a busy server",
34
+ "s": "Unblock CI on main — answer cache watches folders one by one on Linux; pmos commands wait for a busy server",
35
+ "k": "fix",
36
+ "i": "ci-main-unblock"
23
37
  }
24
38
  ]
25
39
  },
@@ -288,6 +288,14 @@ The idle lab run uses only the first three commands:
288
288
  - `pmos lab critic checks [--root <dir>]`: the checks the critic uses for the product in that folder. No server is needed.
289
289
  - `pmos lab critic label <run> <n> real|noise`: your word on finding `n` of a critic run. `pmos lab critic stats` counts the runs, the findings, and how many you called real or noise.
290
290
 
291
+ ### pmos away: away days and the handover note
292
+
293
+ - `pmos away set <YYYY-MM-DD> [--cover "<name>"]` sets you as away from today until that day. PMOS drafts a handover note as `planning/handovers/away-<from>.md` (kind Handover). The Library lists it once you commit it. PMOS runs no git command for it. The note has who covers, the open asks, and the dates that fall while you are away. It is a draft: read it, change it and share it yourself. PMOS sends nothing.
294
+ - `pmos away note` drafts the note again when there is none. A note you edited is kept as it is.
295
+ - `pmos away` (or `pmos away status`) says whether you are set as away, until when and who covers.
296
+ - `pmos away back` ends the away days and lists what moved while you were away: each date and scope change of those days, with its source or the person to ask. `pmos away while` lists it again.
297
+ - Ask for any of these in the chat, and PMOS runs them.
298
+
291
299
  ### pmos try: try what your updates brought
292
300
 
293
301
  On a computer that follows the beta line, each update brings a short list of changes to try. Today shows one row for it, and Settings › Updates shows the list.
@@ -90,21 +90,32 @@ function idle() { lastReq = Date.now(); }
90
90
  * the server. The folders the records live in are watched: planning/ and pmos/ of each workspace, each with every folder under it, and
91
91
  * the workspace folder itself (so a planning/ or pmos/ made later is watched from then on). .git and node_modules are never watched. */
92
92
  const SKIP = /(^|[\\/])(\.git|node_modules)([\\/]|$)/;
93
+ // Linux has no native recursive watch: Node 20 emulates `recursive: true` in JavaScript by watching every FILE under the folder, which
94
+ // on a checkout with thousands of records took hundreds of MB and ran CI's 2-CPU runners out of memory (kind-workflows.test.js died in
95
+ // V8's RegExpCompiler, day-run's server reset its connections, Home's chat box never showed: ci-dynamic-shards, 2026-11-25). There each
96
+ // folder is watched on its own, without `recursive`, and a folder made later is watched when it appears. macOS and Windows watch natively.
97
+ const NATIVE_RECURSIVE = process.platform === 'darwin' || process.platform === 'win32';
93
98
  const watched = new Map(); // folder → FSWatcher | 'none' (not there) | 'blind' (there, but it cannot be watched)
94
99
  let blind = false;
95
100
  function watchDir(dir, recursive) {
96
101
  if (watched.has(dir) && watched.get(dir) !== 'none') return;
97
102
  let there = false; try { there = fs.statSync(dir).isDirectory(); } catch { there = false; }
98
- if (!there) { watched.set(dir, 'none'); return; }
103
+ if (!there) { if (!recursive) watched.set(dir, 'none'); return; }
104
+ const tree = recursive && !NATIVE_RECURSIVE; // one folder of a tree: its sub-folders get their own watchers
99
105
  try {
100
- const w = fs.watch(dir, { recursive, persistent: false }, (ev, f) => {
106
+ const w = fs.watch(dir, { recursive: recursive && !tree, persistent: false }, (ev, f) => {
101
107
  if (f && SKIP.test(String(f))) return;
102
108
  n.outside++; drop();
103
109
  if (!recursive && (f === 'planning' || f === 'pmos')) watchDir(path.join(dir, f), true);
110
+ else if (tree && f) watchDir(path.join(dir, String(f)), true); // a new sub-folder (a file is not a folder: it is skipped)
104
111
  });
105
112
  w.on('error', () => { try { w.close(); } catch { /* closed */ } watched.set(dir, 'blind'); blind = true; drop(); });
106
113
  watched.set(dir, w);
107
- } catch { watched.set(dir, 'blind'); blind = true; }
114
+ } catch { watched.set(dir, 'blind'); blind = true; return; }
115
+ if (tree) {
116
+ let subs = []; try { subs = fs.readdirSync(dir, { withFileTypes: true }); } catch { /* read again on the next event */ }
117
+ for (const d of subs) if (d.isDirectory() && !SKIP.test(d.name)) watchDir(path.join(dir, d.name), true);
118
+ }
108
119
  }
109
120
  function watch(roots) {
110
121
  for (const root of roots || []) {
@@ -0,0 +1,202 @@
1
+ 'use strict';
2
+ /* away-handover.js — away and back (away-handover, job #1841, idea A152). `pmos away …`.
3
+ *
4
+ * Before the PM is away, PMOS drafts a handover note: the open asks that wait on the PM, the dates that fall while the PM is away, and who
5
+ * covers. The note is a DRAFT in the Library (a Handover document the PM reads, edits and shares by hand). Nothing is sent, and nobody is
6
+ * told. When the PM is back, PMOS shows one "while you were away" list: the date and scope moves of the away days (lib/week-moves.js).
7
+ * No model call; every line comes from a record.
8
+ *
9
+ * THE LEDGER. <state>/away.jsonl, append-only, one line per press: { at, kind: 'away', from, until, cover? } | { at, kind: 'back' }.
10
+ * stateOf(lines, today) PURE → { away: { from, until, cover } | null, back: { from, until } | null }
11
+ * away the latest away line not ended by a back line, while today ≤ until
12
+ * back the latest away that ended (a back line, or today past until): the window "while you were away" reads
13
+ * noteOf({ from, until, cover, asks, tasks, today }) PURE → Markdown, the handover note (frontmatter type: Handover)
14
+ * asks open-questions register lines (lib/open-questions.js read): one row per person and initiative, the PM's first
15
+ * tasks [{ id, title, due, owner, initiative, done }]: the open ones due from `from` to `until` (and the late ones), by date
16
+ * whileAway(root, { from, until }) → the week-moves rows of the away days (lib/week-moves.js movesOf)
17
+ * set(dir, { until, cover }, { now }) · back(dir, { now }) · draft(root, dir, { now, sources }) → { ok, file }
18
+ * CLI: pmos away [status] | pmos away set <YYYY-MM-DD> [--cover "<name>"] | pmos away note | pmos away back | pmos away while
19
+ * The note is a plain file: PMOS runs no git command and leaves the git index alone. The Library lists it once the PM commits it.
20
+ * Each command records one use-log line (control awayHandover), the count the kill reads. */
21
+ const fs = require('fs');
22
+ const path = require('path');
23
+
24
+ const TAG = '[away]';
25
+ const DAY_RE = /^\d{4}-\d{2}-\d{2}$/;
26
+ const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
27
+ const short = (d) => (DAY_RE.test(String(d || '')) ? (+d.slice(8, 10)) + ' ' + MON[+d.slice(5, 7) - 1] : '');
28
+ const one = (s, n = 200) => String(s == null ? '' : s).replace(/\s+/g, ' ').trim().slice(0, n);
29
+ const localDay = (t = Date.now()) => { const d = new Date(t); return new Date(d.getTime() - d.getTimezoneOffset() * 60000).toISOString().slice(0, 10); };
30
+ const ledgerFile = (dir) => path.join(String(dir || ''), 'away.jsonl');
31
+
32
+ function readLines(dir) {
33
+ try { return fs.readFileSync(ledgerFile(dir), 'utf8').split('\n').filter(Boolean).map((l) => { try { return JSON.parse(l); } catch { return null; } }).filter(Boolean); }
34
+ catch { return []; }
35
+ }
36
+ function append(dir, line) {
37
+ fs.mkdirSync(dir, { recursive: true });
38
+ fs.appendFileSync(ledgerFile(dir), JSON.stringify(line) + '\n');
39
+ }
40
+
41
+ function stateOf(lines, today) {
42
+ let cur = null, last = null;
43
+ for (const l of lines || []) {
44
+ if (!l || typeof l !== 'object') continue;
45
+ if (l.kind === 'away' && DAY_RE.test(String(l.from || '')) && DAY_RE.test(String(l.until || ''))) cur = { from: l.from, until: l.until, cover: one(l.cover, 80) };
46
+ else if (l.kind === 'back' && cur) { last = { from: cur.from, until: String(l.at || '').slice(0, 10) || cur.until }; cur = null; }
47
+ }
48
+ if (cur && today > cur.until) { last = { from: cur.from, until: cur.until }; cur = null; }
49
+ return { away: cur, back: cur ? null : last };
50
+ }
51
+
52
+ function set(dir, { until, cover } = {}, { now = Date.now() } = {}) {
53
+ if (!dir) return { ok: false, error: 'this computer has no PMOS state folder' };
54
+ const from = localDay(now);
55
+ if (!DAY_RE.test(String(until || '')) || until < from) return { ok: false, error: 'until is a day from today on, YYYY-MM-DD' };
56
+ const line = { at: new Date(now).toISOString(), kind: 'away', from, until, ...(one(cover, 80) ? { cover: one(cover, 80) } : {}) };
57
+ append(dir, line);
58
+ console.log(`${TAG} away ${from}..${until}`);
59
+ return { ok: true, line };
60
+ }
61
+ function back(dir, { now = Date.now() } = {}) {
62
+ if (!dir) return { ok: false, error: 'this computer has no PMOS state folder' };
63
+ const S = stateOf(readLines(dir), localDay(now));
64
+ if (!S.away) return { ok: false, error: 'you are not set as away' };
65
+ const line = { at: new Date(now).toISOString(), kind: 'back' };
66
+ append(dir, line);
67
+ console.log(`${TAG} back`);
68
+ return { ok: true, line, window: { from: S.away.from, until: localDay(now) } };
69
+ }
70
+
71
+ /** The tasks of the PM's products as the records say now: the last due, owner and state of each. */
72
+ function tasksNow(root) {
73
+ try {
74
+ const Facts = require('./drift-facts.js');
75
+ const stateDir = require('./driver.js').stateDirOf(root);
76
+ let storeFile = null; try { const s = require('./task-store.js').storeFor(root); storeFile = s && s.file; } catch { storeFile = null; }
77
+ const T = Facts.tasksOf(root, stateDir ? path.join(stateDir, 'boards.jsonl') : null, storeFile, []).tasks;
78
+ const out = [];
79
+ for (const t of (T instanceof Map ? T.values() : T || [])) {
80
+ let due, owner, state, gone = false;
81
+ for (const l of t.lines || []) {
82
+ if (l.kind === 'task-remove') gone = true; else if (l.kind === 'task-restore') gone = false;
83
+ if (l.due !== undefined) due = l.due; if (l.owner !== undefined) owner = l.owner; if (l.state !== undefined) state = l.state;
84
+ }
85
+ if (!gone) out.push({ id: t.id, title: t.title, initiative: t.initiative, due: due || '', owner: owner || '', done: /^done$/i.test(String(state || '')) });
86
+ }
87
+ return out;
88
+ } catch { return []; }
89
+ }
90
+
91
+ function noteOf({ from, until, cover = '', asks = [], tasks = [], today = from } = {}) {
92
+ const T = (tasks || []).filter((t) => t && !t.done && DAY_RE.test(String(t.due || '')) && t.due <= until)
93
+ .sort((a, b) => a.due.localeCompare(b.due) || String(a.title).localeCompare(String(b.title)));
94
+ const A = (asks || []).filter((l) => l && (l.n || (l.ids || []).length || (l.parts || []).length)).sort((a, b) => (b.toPm ? 1 : 0) - (a.toPm ? 1 : 0));
95
+ const out = ['---', 'type: Handover', `title: "Handover: away ${short(from)} to ${short(until)}"`, `timestamp: ${today}`, '---', '',
96
+ `# Handover: away ${short(from)} to ${short(until)}`, '',
97
+ `PMOS drafted this note from the records on ${short(today)}. It is a draft: read it, change it, and share it yourself. PMOS sends nothing.`, '',
98
+ '## Who covers', '', cover ? `${cover} covers while I am away.` : 'Nobody is named yet. Write who covers here.', '',
99
+ '## Open asks', ''];
100
+ if (A.length) for (const l of A.slice(0, 20)) out.push(`- **${one(l.title || l.ini, 100)}**: ${l.toPm ? 'waits on me' : 'waits on ' + one(l.owner, 60)}${(l.parts || []).length ? ': ' + one(l.parts[0], 160) : ''}.`);
101
+ else out.push('Nothing waits on an answer.');
102
+ out.push('', '## Dates while I am away', '');
103
+ if (T.length) for (const t of T.slice(0, 30)) out.push(`- ${t.due < from ? '**Late**, was ' : ''}${short(t.due)}: ${one(t.title, 120)}${t.owner ? ' (' + one(t.owner, 60) + ')' : ''}${t.initiative ? ', ' + t.initiative : ''}.`);
104
+ else out.push('No task is due while I am away.');
105
+ return out.join('\n') + '\n';
106
+ }
107
+
108
+ /** The handover note's file: planning/handovers/away-<from>.md (a kit layout: pmos/planning/…), where the Library reads documents. */
109
+ function noteFile(root, from) {
110
+ const kit = fs.existsSync(path.join(root, 'pmos', 'state'));
111
+ return path.join(root, ...(kit ? ['pmos', 'planning'] : ['planning']), 'handovers', `away-${from}.md`);
112
+ }
113
+ function draft(root, dir, { now = Date.now(), sources = {} } = {}) {
114
+ const S = stateOf(readLines(dir), localDay(now));
115
+ if (!S.away) return { ok: false, error: 'set the away days first: pmos away set <YYYY-MM-DD>' };
116
+ let asks = sources.asks; if (!Array.isArray(asks)) { try { asks = require('./open-questions.js').read(root, { now }).lines; } catch { asks = []; } }
117
+ const tasks = Array.isArray(sources.tasks) ? sources.tasks : tasksNow(root);
118
+ const file = noteFile(root, S.away.from);
119
+ if (fs.existsSync(file)) return { ok: true, file, kept: true }; // the PM may have edited it: a draft is never written over
120
+ fs.mkdirSync(path.dirname(file), { recursive: true });
121
+ fs.writeFileSync(file, noteOf({ ...S.away, asks, tasks, today: localDay(now) }));
122
+ // the Library lists tracked markdown (lib/kg-cli.js loadFiles), so the note shows there once the PM commits it; PMOS leaves the git index alone
123
+ console.log(`${TAG} note drafted ${path.basename(file)}`);
124
+ return { ok: true, file };
125
+ }
126
+
127
+ function whileAway(root, { from, until }, { facts } = {}) {
128
+ const WM = require('./week-moves.js');
129
+ const F = facts || (() => { const Dr = require('./driver.js'); return require('./drift-facts.js').factsOf({ id: Dr.wsIdOf(root), name: path.basename(root), root }, { stateDir: Dr.stateDirOf(root) }); })();
130
+ const ms = (d) => { const [y, m, dd] = d.split('-').map(Number); return new Date(y, m - 1, dd).getTime(); };
131
+ return WM.movesOf(F, { from: ms(from), to: ms(until) + 864e5 });
132
+ }
133
+
134
+ /* ── pmos away ─────────────────────────────────────────────────────────────────────────────────────────── */
135
+ const COMMANDS = { away: ['status', 'set', 'note', 'back', 'while'] };
136
+ const USAGE = [
137
+ 'usage: pmos away [status|set|note|back|while] — away days, the handover note and what moved while you were away',
138
+ ' pmos away whether you are set as away, until when and who covers',
139
+ ' pmos away set <YYYY-MM-DD> [--cover "<name>"] you are away from today until that day; PMOS drafts the handover note',
140
+ ' pmos away note draft the handover note again into the Library (an edited note is kept as it is)',
141
+ ' pmos away back you are back: the list of what moved while you were away',
142
+ ' pmos away while that list again, for the last away days',
143
+ 'The note is a draft for you to read and share. Nothing is sent.',
144
+ ];
145
+ function stateDirOf(o) { return o.stateDir || require('./state-root.js').defaultRoot({ env: o.env || process.env }); }
146
+ /** The nearest folder up from cwd that has a .git entry (a folder, or a worktree's file); cwd when there is none. No git command runs. */
147
+ function repoOf(cwd) {
148
+ let d = path.resolve(cwd);
149
+ for (;;) { try { if (fs.existsSync(path.join(d, '.git'))) return d; } catch { /* unreadable: look further up */ } const up = path.dirname(d); if (up === d) return path.resolve(cwd); d = up; }
150
+ }
151
+ function used(dir, now) { try { require('./use-log.js').record(dir, [{ kind: 'use', page: 'today', control: 'awayHandover', device: 'desk' }], now); } catch { /* a count, never a reason to fail */ } }
152
+ function sayMoves(say, M, w) {
153
+ if (!M.moves.length) { say(`Nothing moved while you were away (${short(w.from)} to ${short(w.until)}).`); return; }
154
+ say(`While you were away (${short(w.from)} to ${short(w.until)}): ${M.total} ${M.total === 1 ? 'change' : 'changes'}${M.unsourced ? `, ${M.unsourced} with no source` : ''}.`);
155
+ for (const m of M.moves.slice(0, 20)) say(`- ${m.say || m.title}${m.sourced ? '' : ' · No source: ask ' + (m.owner || 'the owner')}`);
156
+ }
157
+
158
+ function run(argv, o = {}) {
159
+ const say = o.say || ((s) => console.log(s)), now = o.now || Date.now();
160
+ const args = argv[0] === 'away' ? argv.slice(1) : argv.slice();
161
+ const pos = [], flags = {};
162
+ for (let i = 0; i < args.length; i++) { const a = args[i]; if (a === '--cover' || a === '--root') flags[a.slice(2)] = args[++i]; else if (a === '--json') flags.json = true; else pos.push(a); }
163
+ const [cmd = 'status', arg] = pos;
164
+ if (cmd === 'help' || cmd === '--help') { USAGE.forEach((l) => say(l)); return 0; }
165
+ if (!COMMANDS.away.includes(cmd)) { say(`✗ ${cmd} is not a command of pmos away`); USAGE.forEach((l) => say(l)); return 2; }
166
+ const dir = stateDirOf(o), root = path.resolve(flags.root || o.root || repoOf(o.cwd || process.cwd())), today = localDay(now);
167
+ used(dir, now);
168
+ const S = stateOf(readLines(dir), today);
169
+ if (cmd === 'status') {
170
+ say(S.away ? `Away from ${short(S.away.from)} until ${short(S.away.until)}${S.away.cover ? '; ' + S.away.cover + ' covers' : ''}.` : 'You are not set as away.');
171
+ return 0;
172
+ }
173
+ if (cmd === 'set') {
174
+ const r = set(dir, { until: arg, cover: flags.cover }, { now });
175
+ if (!r.ok) { say('✗ ' + r.error); return arg ? 1 : 2; }
176
+ const d = draft(root, dir, { now, sources: o.sources || {} });
177
+ say(`✓ Away until ${short(arg)}${flags.cover ? '; ' + flags.cover + ' covers' : ''}. Undo: pmos away back`);
178
+ if (d.ok) say(`The handover note is a draft: ${path.relative(root, d.file)}. The Library lists it once you commit it. Read it and share it yourself; PMOS sends nothing.`);
179
+ return 0;
180
+ }
181
+ if (cmd === 'note') {
182
+ const d = draft(root, dir, { now, sources: o.sources || {} });
183
+ if (!d.ok) { say('✗ ' + d.error); return 1; }
184
+ say(d.kept ? `The handover note is already there, and PMOS keeps your edits: ${path.relative(root, d.file)}.` : `The handover note is a draft: ${path.relative(root, d.file)}. The Library lists it once you commit it.`);
185
+ return 0;
186
+ }
187
+ if (cmd === 'back') {
188
+ const r = back(dir, { now });
189
+ if (!r.ok) { say('✗ ' + r.error); return 1; }
190
+ say('✓ Welcome back.');
191
+ const M = whileAway(root, r.window, { facts: o.facts });
192
+ flags.json ? say(JSON.stringify({ ok: true, window: r.window, ...M })) : sayMoves(say, M, r.window);
193
+ return 0;
194
+ }
195
+ const w = S.back;
196
+ if (!w) { say(S.away ? 'You are still away. pmos away back ends the away days.' : 'No away days yet.'); return 0; }
197
+ const M = whileAway(root, w, { facts: o.facts });
198
+ flags.json ? say(JSON.stringify({ ok: true, window: w, ...M })) : sayMoves(say, M, w);
199
+ return 0;
200
+ }
201
+
202
+ module.exports = { TAG, COMMANDS, USAGE, ledgerFile, readLines, stateOf, set, back, noteOf, noteFile, draft, tasksNow, whileAway, run };
@@ -92,7 +92,7 @@ const VERBS = Object.freeze({
92
92
  blueprint: Object.freeze({ module: 'blueprint-cli.js', run: null, guide: 'cli.md',
93
93
  help: 'pmos blueprint [list|show|unplaced|check] — every feature of the product with a status worked out from its evidence (pmos blueprint help)' }),
94
94
  program: Object.freeze({ module: 'program-cli.js', run: null, guide: 'cli.md',
95
- help: 'pmos program new|charter|join|leave|milestone|check|task|archive|line|draft|order|capacity|decide|outcome|suggest — make and change programs from the chat, the program line (Charter, Sequence, Track, Land) and the milestone suggestions (pmos program help)' }),
95
+ help: 'pmos program new|charter|join|leave|milestone|check|task|archive|line|draft|order|capacity|decide|outcome|steering|suggest — make and change programs from the chat, the program line (Charter, Sequence, Track, Land), the steering pack and the milestone suggestions (pmos program help)' }),
96
96
  // Not a pm-os-absorb verb (run: null): c3-meet-extension added it through the same table.
97
97
  extension: Object.freeze({ module: 'extension-cli.js', run: null, guide: 'cli.md',
98
98
  help: 'pmos extension — the folder of the Chrome extension for Google Meet, and the three steps to load it' }),
@@ -139,6 +139,9 @@ const VERBS = Object.freeze({
139
139
  // Not a pm-os-absorb verb (run: null): initiative open-questions-register (bet A420) added it through the same table.
140
140
  questions: Object.freeze({ module: 'questions-cli.js', run: null, guide: 'cli.md',
141
141
  help: 'pmos questions [age] — every unanswered question across initiatives, oldest first, with who can answer, its age and its default (pmos questions help)' }),
142
+ // Not a pm-os-absorb verb (run: null): initiative away-handover (job #1841, A152) added it through the same table.
143
+ away: Object.freeze({ module: 'away-handover.js', run: null, guide: 'cli.md',
144
+ help: 'pmos away [set|note|back|while] — your away days, the handover note PMOS drafts in the Library, and what moved while you were away (pmos away help)' }),
142
145
  // Not a pm-os-absorb verb (run: null): initiative try-what-shipped added it through the same table.
143
146
  try: Object.freeze({ module: 'try-it.js', run: null, guide: 'cli.md',
144
147
  help: 'pmos try [works|broken|note|undo|later|count] — the changes your recent updates brought, how to try each, and your answer (beta only; pmos try help)' }),
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.815.0",
3
+ "version": "0.816.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.815.0",
9
+ "version": "0.816.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@anthropic-ai/sdk": "^1.3.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.815.0",
3
+ "version": "0.816.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",
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "away-handover (job #1841, A152): away days, the handover note PMOS drafts in the Library, and what moved while the PM was away. No browser, no network.",
3
+ "modules": [
4
+ "away-handover.test.js"
5
+ ],
6
+ "seconds": {
7
+ "away-handover.test.js": 3
8
+ }
9
+ }