create-pmos 0.462.0 → 0.464.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.462.0",
3
+ "version": "0.464.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,32 @@
32
32
  "audit"
33
33
  ],
34
34
  "pmosChanges": [
35
+ {
36
+ "v": "0.464.0",
37
+ "at": "2026-10-31T02:53:30.027Z",
38
+ "f": 3,
39
+ "prs": [
40
+ {
41
+ "n": 1116,
42
+ "t": "No folder per initiative in a document repository, finished worktrees clean up, one plain notice (D102)",
43
+ "s": "No folder per initiative in a document repository, finished worktrees clean up, one plain notice",
44
+ "k": "new"
45
+ }
46
+ ]
47
+ },
48
+ {
49
+ "v": "0.463.0",
50
+ "at": "2026-10-31T02:36:24.736Z",
51
+ "f": 3,
52
+ "prs": [
53
+ {
54
+ "n": 1114,
55
+ "t": "Records are saved on the default branch only, and a document folder is put back on it by itself (D70)",
56
+ "s": "Records are saved on the default branch only, and a document folder is put back on it by itself",
57
+ "k": "fix"
58
+ }
59
+ ]
60
+ },
35
61
  {
36
62
  "v": "0.462.0",
37
63
  "at": "2026-10-31T02:08:48.803Z",
@@ -271,32 +297,6 @@
271
297
  "k": "new"
272
298
  }
273
299
  ]
274
- },
275
- {
276
- "v": "0.444.0",
277
- "at": "2026-10-28T16:30:50.265Z",
278
- "f": 3,
279
- "prs": [
280
- {
281
- "n": 1088,
282
- "t": "Arrange panels, manage tasks in the stage card, goals dashboard (batch 18 items 15, 16, 11 gap)",
283
- "s": "Arrange panels, manage tasks in the stage card, goals dashboard (batch 18 items 15, 16, 11 gap)",
284
- "k": "new"
285
- }
286
- ]
287
- },
288
- {
289
- "v": "0.443.0",
290
- "at": "2026-10-28T14:25:24.275Z",
291
- "f": 3,
292
- "prs": [
293
- {
294
- "n": 1087,
295
- "t": "0.442.0 hotfix, goals made clear, folded list card, task ticket linking (batch 18)",
296
- "s": "0.442.0 hotfix, goals made clear, folded list card, task ticket linking (batch 18)",
297
- "k": "new"
298
- }
299
- ]
300
300
  }
301
301
  ]
302
302
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@437061ea
1
+ kernel-source: pmos@ac4e7733
2
2
  assembled: 2026-10-31
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-31T02:08:45Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-31T02:53:26Z"}
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-31T02:08:45Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-31T02:53:26Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -95,6 +95,9 @@ function krBullet(line) {
95
95
  const m = RE_KR_BULLET.exec(line);
96
96
  if (!m) return null;
97
97
  let rest = m[3];
98
+ // a bullet that lists KRs in a sentence ("KR-A2, KR-B1 and KR-C3 have no initiative.") declares none of them: a KR is declared by an id
99
+ // followed by its name, so a comma or "and" after the id is prose
100
+ if (/^\s*(\*\*)?\s*(,|;|&|(and|or)\b)/i.test(rest)) return null;
98
101
  const sep = /^\s*[—–:.-]?\s*/;
99
102
  let name;
100
103
  if (m[1] && /^\s*\*\*/.test(rest)) name = rest.replace(/^\s*\*\*/, '').replace(sep, ''); // **KR1.2** — name
@@ -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-31T02:08:45Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-31T02:53:26Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,4 +1,30 @@
1
1
  [
2
+ {
3
+ "v": "0.464.0",
4
+ "at": "2026-10-31T02:53:30.027Z",
5
+ "f": 3,
6
+ "prs": [
7
+ {
8
+ "n": 1116,
9
+ "t": "No folder per initiative in a document repository, finished worktrees clean up, one plain notice (D102)",
10
+ "s": "No folder per initiative in a document repository, finished worktrees clean up, one plain notice",
11
+ "k": "new"
12
+ }
13
+ ]
14
+ },
15
+ {
16
+ "v": "0.463.0",
17
+ "at": "2026-10-31T02:36:24.736Z",
18
+ "f": 3,
19
+ "prs": [
20
+ {
21
+ "n": 1114,
22
+ "t": "Records are saved on the default branch only, and a document folder is put back on it by itself (D70)",
23
+ "s": "Records are saved on the default branch only, and a document folder is put back on it by itself",
24
+ "k": "fix"
25
+ }
26
+ ]
27
+ },
2
28
  {
3
29
  "v": "0.462.0",
4
30
  "at": "2026-10-31T02:08:48.803Z",
@@ -2,7 +2,7 @@
2
2
  type: Guide
3
3
  title: "Guide: layout"
4
4
  description: "The frame: one top bar, the place on screen, the detail and the agent dock; the phone tabs and lists; the keys; and the older layout."
5
- timestamp: 2026-10-23
5
+ timestamp: 2026-10-31
6
6
  ---
7
7
 
8
8
  # Guide: layout
@@ -22,7 +22,8 @@ The top bar has these parts, from left to right:
22
22
  - **Agenda, My work, Initiatives, Board, Reports, Docs and People** are the places. Each has an icon before its name, the same icon as on the phone. Press one to show it. The Agenda count shows how many items need you. Docs shows whether each document is the same as its Google Docs and Confluence copy. People shows the people you work with in the repository ([People](people.md)).
23
23
  - **Search or capture ⌘K** opens the command palette. Type to find an initiative, a repository, an open tab or a command.
24
24
  - **Sync** shows only when the current repository is not in sync with its remote. Press it to fetch, bring in the work of the other machine, record your changes and push. If the repository has not fetched in the last 10 minutes, Sync also shows, because a push from another machine is not visible until a fetch. When the repository fetched recently and is in sync, Sync is not shown. When two machines add lines to the same ledger (a `.jsonl` file under `pmos/` or `planning/`), Sync keeps the lines from both machines. If Sync stops, the message names the step that stopped. If both machines changed the same lines of another file, Sync changes nothing and names the files. Then choose **Push this machine’s version** or **Pull the other machine’s version**. Sync keeps that version of those files, keeps all other changes from both machines, and finishes. It never overwrites the remote history.
25
- - **Sync on its own.** If you forget to press Sync, the workspace syncs for you. It syncs each repository once when the workspace starts. It also syncs a repository that has records not yet pushed when no record changed for 5 minutes. In a document repository it syncs every changed file on any branch. In a code repository it syncs only on the default branch (for example `main`), and only when every commit not yet pushed changes records and no code. If you close the tab while records are not yet pushed, the browser asks you first. To turn automatic sync off, start the workspace with `PMOS_AUTO_SYNC=0`.
25
+ - **Sync on its own.** If you forget to press Sync, the workspace syncs for you. It syncs each repository once when the workspace starts. It also syncs a repository that has records not yet pushed when no record changed for 5 minutes. It syncs only on the default branch (for example `main`). In a document repository it syncs every changed file. In a code repository it also needs every commit not yet pushed to change records and no code. If a document folder has been left on another branch, the workspace puts it back on the default branch for you, with your records saved, when that loses nothing. It tells you only when it cannot do this safely, for example when two saved versions of one page do not match. If you close the tab while records are not yet pushed, the browser asks you first. To turn automatic sync off, start the workspace with `PMOS_AUTO_SYNC=0`.
26
+ - **Old work folders clean up on their own.** When a piece of work has been merged and its extra folder has been untouched for 14 days, with nothing unsaved in it and no session using it, the workspace removes the folder. The work itself is kept. To turn this off, start the workspace with `PMOS_AUTO_CLEAN=0`.
26
27
  - **Settings** opens the settings of the workspace.
27
28
 
28
29
  Each place is drawn when its run is built. Until then the place says which run brings it, for example "Board arrives in Run 4."
@@ -8,16 +8,24 @@
8
8
  * Before either, a repository must pass every rule below. A rule that cannot be read is a no.
9
9
  * - auto-sync is on for this server (see enabledFor);
10
10
  * - the branch has an upstream;
11
- * - in a CODE repository only (profile product-code, D68): the branch is the remote's default branch, and every commit
12
- * not yet pushed touches record paths only, so a feature branch and code are never auto-pushed. A DOCUMENT
13
- * repository (profile pm-artifacts) holds only the PM's documents: any branch, every file;
11
+ * - the branch is the remote's default branch, in every repository (D70 as amended 2026-10-31: a record committed on a
12
+ * feature branch never reaches the default branch, so the PM's records seemed to vanish from the product they belong to);
13
+ * - in a CODE repository only (profile product-code, D68): every commit not yet pushed touches record paths only, so
14
+ * code is never auto-pushed. A DOCUMENT repository (profile pm-artifacts) holds only the PM's documents: every file;
14
15
  * - no record file changed in the last QUIET_MS: a document being written is left alone;
15
16
  * - no sync is running for the repository, and the last auto-sync did not fail within RETRY_MS.
16
17
  */
17
18
  const syncLib = require('./sync');
19
+ const folderRepair = require('./folder-repair');
20
+ const attention = require('./folder-attention');
21
+ const worktreeGc = require('./worktree-gc');
18
22
 
23
+ const BRANCH_WHY = /not the default branch|cannot tell the default branch/;
19
24
  const QUIET_MS = 5 * 60 * 1000;
20
25
  const RETRY_MS = 30 * 60 * 1000;
26
+ const ASK_AGAIN_MS = 30 * 60 * 1000; // a repair that needs the PM is not tried again for this long
27
+ const WAIT_AGAIN_MS = 10 * 60 * 1000; // one that only waited (no network, a refused push) is tried again sooner
28
+ const GC_EVERY_MS = 6 * 60 * 60 * 1000; // finished worktrees are looked for this often per repository (lib/worktree-gc.js)
21
29
 
22
30
  // On for a real server start. A server given its own state directory (every suite does, through test-run.js) is a
23
31
  // scratch server and does not auto-sync unless asked. PMOS_AUTO_SYNC=0 turns it off; =1 turns it on.
@@ -37,8 +45,9 @@ async function blocker(root, moment, { now = Date.now(), lastFail = 0 } = {}) {
37
45
  if (st.state === 'mid-operation') return 'a merge, rebase or cherry-pick is in progress';
38
46
  const docs = syncLib.profileOf(root) === 'pm-artifacts';
39
47
  const remote = st.upstream.split('/')[0];
40
- const def = docs ? null : await syncLib.defaultBranchOf(root, remote);
41
- if (!docs && (!def || st.branch !== def)) return `'${st.branch}' is not the default branch of ${remote}`;
48
+ const def = await syncLib.defaultBranchOf(root, remote);
49
+ if (!def) return `PMOS cannot tell the default branch of ${remote}, so it does not save your records on its own`;
50
+ if (st.branch !== def) return `'${st.branch}' is not the default branch of ${remote}, so PMOS is not saving your records. Switch this folder back to '${def}'`;
42
51
  if (st.ahead && !docs) {
43
52
  const paths = await syncLib.unpushedPaths(root, st.upstream);
44
53
  if (!paths) return 'the unpushed commits cannot be read';
@@ -57,24 +66,81 @@ async function blocker(root, moment, { now = Date.now(), lastFail = 0 } = {}) {
57
66
  * roots() the repository roots the server holds
58
67
  * busy a Set of roots with a sync running (shared with the press route)
59
68
  * onDone(root, result) called after each auto-sync that ran (to refresh caches) */
60
- function createAutoSync({ roots, busy, onDone = () => {}, env = process.env, label = 'auto-sync' } = {}) {
61
- const last = new Map(); // root -> { at, moment, ok, message, skipped? }
69
+ function createAutoSync({ roots, busy, onDone = () => {}, env = process.env, label = 'auto-sync', repair = folderRepair.repair, gc = worktreeGc.collect, gcHooks = {} } = {}) {
70
+ const last = new Map(); // root -> { at, moment, ok, message, skipped?, blocked?, needs?, repaired? }
71
+ const tried = new Map(); // root -> { at, result } the last repair attempt
72
+ const repairOn = String(env.PMOS_AUTO_REPAIR || '').trim() !== '0';
73
+ const cleanOn = String(env.PMOS_AUTO_CLEAN || '').trim() !== '0';
74
+ const gcAt = new Map(); // root -> when finished worktrees were last looked for
75
+
76
+ // A document repository whose folder is off its default branch is put back by itself (lib/folder-repair.js). It is tried again
77
+ // after a pause, so a state that needs the PM does not run git on every tick.
78
+ async function tryRepair(root) {
79
+ const prev = tried.get(root);
80
+ const pause = prev && prev.result && (prev.result.action === 'ask' ? ASK_AGAIN_MS : WAIT_AGAIN_MS);
81
+ if (prev && prev.result && prev.result.action !== 'repaired' && Date.now() - prev.at < pause) return prev.result;
82
+ busy.add(root);
83
+ try {
84
+ const result = await repair(root, { label });
85
+ tried.set(root, { at: Date.now(), result });
86
+ return result;
87
+ } catch (e) {
88
+ const result = { action: 'wait', why: String((e && e.message) || e).slice(0, 160) };
89
+ tried.set(root, { at: Date.now(), result });
90
+ return result;
91
+ } finally { busy.delete(root); }
92
+ }
93
+
62
94
  async function runFor(root, moment) {
63
95
  if (!enabledFor(env) || busy.has(root)) return null;
64
96
  const prev = last.get(root);
65
- const why = await blocker(root, moment, { lastFail: prev && prev.ok === false ? prev.at : 0 });
66
- if (why) return null;
97
+ const opts = () => ({ lastFail: prev && prev.ok === false ? prev.at : 0 });
98
+ let why = await blocker(root, moment, opts());
99
+ let repaired = null;
100
+ if (!why || !BRANCH_WHY.test(why)) attention.clear(root); // the folder is right (or is not a document folder): nothing to tell
101
+ if (why && BRANCH_WHY.test(why)) {
102
+ // only a document repository is repaired and only one is the PM's to be told about: a developer on a feature branch is normal
103
+ if (syncLib.profileOf(root) !== 'pm-artifacts') return null;
104
+ const r = repairOn ? await tryRepair(root) : null;
105
+ if (r && r.action === 'repaired') { repaired = { from: r.from, to: r.to, at: Date.now() }; why = await blocker(root, moment, opts()); }
106
+ else {
107
+ // the technical reason stays in `detail`; `message` is the plain sentence, and only when the PM has to decide something
108
+ const ask = r && r.action === 'ask';
109
+ last.set(root, { at: Date.now(), moment, ok: null, skipped: true, blocked: 'branch', needs: ask ? 'choice' : 'wait',
110
+ message: ask ? folderRepair.plain(r) : '', detail: why, files: (r && r.files) || [] });
111
+ if (ask) attention.set(root, { message: folderRepair.plain(r), files: (r && r.files) || [] }); else attention.clear(root);
112
+ return null;
113
+ }
114
+ }
115
+ if (why) {
116
+ // repaired, and nothing is left to send: the status still says it happened, so the PM's screen can say it once
117
+ if (repaired) last.set(root, { at: Date.now(), moment, ok: true, message: '', repaired });
118
+ else if (prev && prev.blocked === 'branch') last.delete(root);
119
+ return null;
120
+ }
67
121
  busy.add(root);
68
122
  try {
69
123
  const out = await syncLib.sync(root, { label });
70
- last.set(root, { at: Date.now(), moment, ok: !!out.ok, message: out.message, stopped_at: out.stopped_at || null });
124
+ last.set(root, { at: Date.now(), moment, ok: !!out.ok, message: out.message, stopped_at: out.stopped_at || null, ...(repaired ? { repaired } : {}) });
71
125
  try { onDone(root, out); } catch { /* a cache refresh is not the sync's business */ }
72
126
  return out;
73
127
  } finally { busy.delete(root); }
74
128
  }
129
+ // The folders of finished work are removed by lib/worktree-gc.js, which keeps every one a person could miss. Rarely, and never while a
130
+ // sync or repair holds the repository.
131
+ async function cleanFor(root) {
132
+ if (!cleanOn || !enabledFor(env) || busy.has(root)) return;
133
+ if (Date.now() - (gcAt.get(root) || 0) < GC_EVERY_MS) return;
134
+ gcAt.set(root, Date.now());
135
+ busy.add(root);
136
+ try { await gc(root, gcHooks); } catch { /* the next round tries again */ } finally { busy.delete(root); }
137
+ }
75
138
  async function each(moment) {
76
139
  const out = [];
77
- for (const r of roots()) { try { out.push(await runFor(r, moment)); } catch { /* one repository never stops the others */ } }
140
+ for (const r of roots()) {
141
+ try { out.push(await runFor(r, moment)); } catch { /* one repository never stops the others */ }
142
+ try { await cleanFor(r); } catch { /* nor does a cleanup */ }
143
+ }
78
144
  return out;
79
145
  }
80
146
  return { startup: () => each('startup'), tick: () => each('idle'), lastOf: (root) => last.get(root) || null };
@@ -95,6 +95,9 @@ function krBullet(line) {
95
95
  const m = RE_KR_BULLET.exec(line);
96
96
  if (!m) return null;
97
97
  let rest = m[3];
98
+ // a bullet that lists KRs in a sentence ("KR-A2, KR-B1 and KR-C3 have no initiative.") declares none of them: a KR is declared by an id
99
+ // followed by its name, so a comma or "and" after the id is prose
100
+ if (/^\s*(\*\*)?\s*(,|;|&|(and|or)\b)/i.test(rest)) return null;
98
101
  const sep = /^\s*[—–:.-]?\s*/;
99
102
  let name;
100
103
  if (m[1] && /^\s*\*\*/.test(rest)) name = rest.replace(/^\s*\*\*/, '').replace(sep, ''); // **KR1.2** — name
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+ /* lib/folder-attention.js — what the PM has to be told about a repository's folder, as one small registry in the server process.
3
+ *
4
+ * set(root, { message, files }) a folder PMOS could not put right alone (lib/auto-sync.js)
5
+ * clear(root) it is right again, or was never wrong
6
+ * get(root) → { message, files } | null
7
+ *
8
+ * lib/folder-needs.js reads it and makes the one needs row the Briefing, My work and the phone already show. `message` is one plain
9
+ * sentence with no git words (lib/folder-repair.js plain()). Nothing here writes a file: the registry is rebuilt by the next sync tick. */
10
+ const path = require('path');
11
+
12
+ const held = new Map(); // resolved root -> { message, files, at }
13
+ const key = (root) => path.resolve(String(root || ''));
14
+
15
+ function set(root, { message, files } = {}) {
16
+ if (!root || !message) return;
17
+ held.set(key(root), { message: String(message), files: Array.isArray(files) ? files.slice(0, 8).map(String) : [], at: Date.now() });
18
+ }
19
+ function clear(root) { if (root) held.delete(key(root)); }
20
+ function get(root) { return root ? held.get(key(root)) || null : null; }
21
+
22
+ module.exports = { set, clear, get };
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+ /* folder-needs.js — the needs provider of the folder repair (D70 as amended 2026-10-31). lib/needs-providers.js folds these rows into
3
+ * server.js deriveNeeds, and from there into /api/needs, the Briefing and My work.
4
+ *
5
+ * kinds: folder-attention
6
+ * rowsFor(w, { lead }) → rows · sig(w) → string
7
+ *
8
+ * folder-attention one row for a repository whose folder PMOS could not put back on its default branch alone: two saved versions of
9
+ * one page that do not match, or another copy of the folder that holds work not yet saved. The question is one plain
10
+ * sentence with no git words. Kind 8 (needs repair). The row goes when the next sync tick finds the folder right.
11
+ *
12
+ * The row is repository-wide, so a tree that is not the lead returns []. Nothing here writes. */
13
+ const attention = require('./folder-attention.js');
14
+
15
+ const NAME = 'folder-needs';
16
+
17
+ function rowsFor(w, { lead } = {}) {
18
+ if (!lead || !w || !w.root) return [];
19
+ const a = attention.get(w.root);
20
+ if (!a) return [];
21
+ const evidence = a.files.length ? a.files.join(', ') : '';
22
+ return [{
23
+ run_id: `${NAME}:${w.id}`, kind: 'folder-attention', initiative_id: null, question: a.message, doc: null, ws: w.id,
24
+ today: { kind: 8, source: NAME, cause: a.message, evidence, act: { label: 'Ask Claude to sort it out', cli: null } },
25
+ }];
26
+ }
27
+ function sig(w) {
28
+ const a = w && w.root ? attention.get(w.root) : null;
29
+ return a ? `${a.at}:${a.message}:${a.files.join(',')}` : '';
30
+ }
31
+
32
+ module.exports = { kinds: ['folder-attention'], rowsFor, sig };
@@ -0,0 +1,150 @@
1
+ 'use strict';
2
+ /* lib/folder-repair.js — put a document repository's folder back on its default branch, by itself, when that loses nothing
3
+ * (D70 as amended 2026-10-31). The PM: "if PMOS can fix it, it should just do it".
4
+ *
5
+ * WHY. A product folder left on a feature branch collects every record there, and the product looks empty on its default
6
+ * branch: Project Ascent's program and initiatives could not be found. The PM should not have to know what a branch is.
7
+ *
8
+ * WHAT. In a DOCUMENT repository (profile pm-artifacts: every file is a record) whose own folder is not on the remote's
9
+ * default branch, repair() does, in this order, and stops at the first step that cannot be made safe:
10
+ * 1. fetch;
11
+ * 2. commit the records pending in the folder, on the branch it is on (the same staging Sync uses);
12
+ * 3. check, without touching anything, that the branch merges into the default branch with no conflict;
13
+ * 4. merge the branch into the default branch (in the folder that already holds it, or in this one after switching);
14
+ * 5. push the default branch (no force);
15
+ * 6. free the default branch if another clean folder held it, and switch this folder onto it.
16
+ * The feature branch is never deleted, never rewritten and never force-pushed. A code repository is never touched: a developer
17
+ * on a feature branch is normal there. A linked worktree is never touched: only a repository's own folder is a product.
18
+ *
19
+ * ANSWERS. { action, from, to, why, files? }
20
+ * none nothing to do (already on the default branch, a code repository, a linked worktree)
21
+ * repaired the folder is on the default branch and its records are merged into it
22
+ * ask it cannot be made safe alone: 'conflict' (two versions of one file, `files` names them), 'work' (another copy of the
23
+ * folder holds work that is not saved), 'diverged' (the default branch differs from the remote's)
24
+ * wait try again later: no network, a push the remote refused, a git too old for the check, an operation in progress
25
+ * Every step that fails after a change is undone first (a merge is aborted, the folder is switched back), so `ask` and `wait`
26
+ * leave the folder as it was found, plus the records committed in step 2. Running it again after `repaired` answers `none`. */
27
+ const os = require('os');
28
+ const path = require('path');
29
+ const syncLib = require('./sync');
30
+
31
+ const { run } = syncLib;
32
+ const same = (a, b) => path.resolve(String(a)) === path.resolve(String(b));
33
+
34
+ /** The working trees of the repository: [{ dir, branch|null }], the main one first. */
35
+ async function worktrees(root) {
36
+ const r = await run(root, ['worktree', 'list', '--porcelain']);
37
+ if (!r.ok || !r.out) return [];
38
+ const out = []; let cur = null;
39
+ for (const line of r.out.split('\n')) {
40
+ if (line.startsWith('worktree ')) { cur = { dir: line.slice(9).trim(), branch: null }; out.push(cur); }
41
+ else if (cur && line.startsWith('branch ')) cur.branch = line.slice(7).trim().replace(/^refs\/heads\//, '');
42
+ }
43
+ return out;
44
+ }
45
+
46
+ /** Is `root` a repository's own folder (not a linked worktree)? */
47
+ async function isMainTree(root) {
48
+ const r = await run(root, ['rev-parse', '--path-format=absolute', '--git-dir', '--git-common-dir']);
49
+ if (!r.ok) return false;
50
+ const [dir, common] = r.out.split('\n').map((x) => x.trim());
51
+ return !!dir && !!common && same(dir, common);
52
+ }
53
+
54
+ async function repair(root, { label } = {}) {
55
+ const none = (why) => ({ action: 'none', why });
56
+ if (syncLib.profileOf(root) !== 'pm-artifacts') return none('a code repository');
57
+ if (!(await isMainTree(root))) return none('a linked worktree');
58
+ const s0 = await syncLib.status(root);
59
+ if (!s0.ok || !s0.branch) return none('no branch');
60
+ if (s0.state === 'mid-operation') return { action: 'wait', why: 'a merge, rebase or cherry-pick is in progress here' };
61
+ const remote = s0.upstream ? s0.upstream.split('/')[0] : 'origin';
62
+ if (!(await run(root, ['remote', 'get-url', remote])).ok) return none('no remote');
63
+ const def = await syncLib.defaultBranchOf(root, remote);
64
+ if (!def) return none('the default branch is not known');
65
+ const from = s0.branch;
66
+ if (from === def) return none('already on the default branch');
67
+ const out = (action, why, extra) => ({ action, from, to: def, why, ...(extra || {}) });
68
+
69
+ // 1. fetch
70
+ if (!(await run(root, ['fetch', '--quiet', remote], { net: true })).ok) return out('wait', 'the remote could not be reached');
71
+
72
+ // 2. the records pending in this folder are committed on the branch it is on, so nothing the PM wrote can be lost by what follows
73
+ const added = syncLib.ensureUnionAttribute(root);
74
+ const s1 = await syncLib.status(root);
75
+ if (s1.dirty_records || s1.dirty_other || added) {
76
+ if (!(await run(root, ['add', '-A'])).ok) return out('wait', 'the records could not be staged');
77
+ const staged = await run(root, ['diff', '--cached', '--name-only']);
78
+ if (staged.out) {
79
+ const c = await run(root, ['commit', '-m', `chore(pmos): sync records from ${label || os.hostname()}`, '--no-verify']);
80
+ if (!c.ok) return out('wait', /identity unknown|empty ident/i.test(c.err) ? 'git has no author name or email on this machine' : 'the records could not be committed');
81
+ }
82
+ }
83
+
84
+ // the default branch here must be the remote's, or ahead of it: a local default branch behind it moves up, a diverged one is not ours to fix
85
+ const trees = await worktrees(root);
86
+ const holder = trees.find((t) => t.branch === def && !same(t.dir, root)) || null;
87
+ const haveLocal = (await run(root, ['rev-parse', '--verify', '--quiet', `refs/heads/${def}`])).ok;
88
+ const remoteDef = `refs/remotes/${remote}/${def}`;
89
+ if (!(await run(root, ['rev-parse', '--verify', '--quiet', remoteDef])).ok) return out('wait', 'the remote has no default branch yet');
90
+ if (haveLocal) {
91
+ const behind = (await run(root, ['merge-base', '--is-ancestor', `refs/heads/${def}`, remoteDef])).ok;
92
+ const ahead = (await run(root, ['merge-base', '--is-ancestor', remoteDef, `refs/heads/${def}`])).ok;
93
+ if (!behind && !ahead) return out('ask', 'diverged');
94
+ if (behind && !holder) { if (!(await run(root, ['branch', '-f', def, remoteDef])).ok) return out('wait', 'the default branch could not be updated'); }
95
+ } else if (!(await run(root, ['branch', def, remoteDef])).ok) return out('wait', 'the default branch could not be created');
96
+
97
+ // another folder holds the default branch: it must hold no unsaved work, and is brought up to date
98
+ if (holder) {
99
+ const dirty = await run(holder.dir, ['status', '--porcelain', '--untracked-files=all']);
100
+ if (!dirty.ok || dirty.out) return out('ask', 'work', { where: holder.dir });
101
+ if (haveLocal && !(await run(holder.dir, ['merge', '--ff-only', remoteDef])).ok) {
102
+ const ahead = (await run(root, ['merge-base', '--is-ancestor', remoteDef, `refs/heads/${def}`])).ok;
103
+ if (!ahead) return out('wait', 'the default branch could not be brought up to date');
104
+ }
105
+ }
106
+
107
+ // 3. a merge that conflicts is not made: the dry run touches no file and no branch
108
+ const attrs = syncLib.unionAttributesFor(root);
109
+ const cfg = attrs ? ['-c', `core.attributesFile=${attrs}`] : [];
110
+ const probe = await run(root, [...cfg, 'merge-tree', '--write-tree', '--name-only', def, from]);
111
+ if (!probe.ok) {
112
+ // `--name-only` prints the tree id and the conflicted files, then a blank line, then git's notes about each
113
+ const files = probe.out.split(/\n\s*\n/)[0].split('\n').slice(1).map((l) => l.trim()).filter(Boolean).slice(0, 8);
114
+ if (/conflict/i.test(probe.out) || files.length) return out('ask', 'conflict', { files });
115
+ return out('wait', 'this git cannot check a merge first');
116
+ }
117
+
118
+ // 4. the merge, where the default branch already is, or here after switching onto it
119
+ let cwd = holder ? holder.dir : root;
120
+ let switched = false;
121
+ if (!holder) {
122
+ if (!(await run(root, ['switch', '--quiet', def])).ok) return out('wait', 'the folder could not be switched');
123
+ switched = true;
124
+ }
125
+ const back = async () => { if (switched) await run(root, ['switch', '--quiet', from]); };
126
+ const m = await run(cwd, [...cfg, 'merge', '--no-ff', '-m', `chore(pmos): bring the records from ${from} onto ${def}`, '--no-verify', from]);
127
+ if (!m.ok) { await run(cwd, ['merge', '--abort']); await back(); return out('ask', 'conflict'); }
128
+
129
+ // 5. push, never forced; a refusal keeps the local merge. Folder still on the branch: the next run pushes it. Folder already on the
130
+ // default branch: Sync pushes it, being then an ordinary unpushed record commit
131
+ if (!(await run(cwd, ['push', '--quiet', remote, def], { net: true })).ok) return out('wait', 'the remote did not take the push');
132
+
133
+ // 6. free the default branch and switch this folder onto it
134
+ if (holder) {
135
+ if (!(await run(root, ['worktree', 'remove', holder.dir])).ok) return out('wait', 'the other folder could not be removed');
136
+ if (!(await run(root, ['switch', '--quiet', def])).ok) return out('wait', 'the folder could not be switched');
137
+ }
138
+ return out('repaired', 'the records are merged and the folder is back on the default branch');
139
+ }
140
+
141
+ /** The sentence a person reads when repair cannot be made safe alone. Plain words: no branch, merge or worktree. */
142
+ function plain(r) {
143
+ if (!r) return '';
144
+ if (r.action === 'ask' && r.why === 'conflict') return 'Two saved versions of the same page do not match, and PMOS cannot tell which one is newer.';
145
+ if (r.action === 'ask' && r.why === 'work') return 'Another copy of this folder holds work that is not saved yet, so PMOS has not moved your records.';
146
+ if (r.action === 'ask') return 'Your records are in two versions that do not match, so PMOS has not moved them.';
147
+ return '';
148
+ }
149
+
150
+ module.exports = { repair, plain, worktrees, isMainTree };
@@ -36,6 +36,7 @@ const PROVIDERS = Object.freeze([
36
36
  'driver-needs', // initiative-driver: drafts the agent filed (kind 7), a target the PM is blocking (kind 7)
37
37
  'core-docs-needs', // core-documents: one row per scope with core document drafts waiting for the PM (kind 1)
38
38
  'report-structure-needs', // report-structure: a Chrome or computer source that failed its check while a draft waits for it (kind 8)
39
+ 'folder-needs', // folder repair: a folder PMOS could not put back on its default branch alone, in one plain sentence (kind 8)
39
40
  ]);
40
41
  /** Kinds that already mean something in the needs queue. A provider may not reuse one. */
41
42
  const RESERVED_KINDS = Object.freeze(['question', 'accept', 'outcome', 'keep', 'evidence', 'plan-flag', 'provider-error']);
@@ -34,6 +34,7 @@ const pmItems = require('./pm-items.js');
34
34
  const P = require('./programs.js');
35
35
  const MS = require('./milestone-suggest.js');
36
36
  const gitInfo = require('./git-info.js');
37
+ const deletedIds = require('./ini-deleted.js');
37
38
 
38
39
  const str = (v, n) => String(v == null ? '' : v).replace(/[\u0000-\u001f]+/g, ' ').trim().slice(0, n);
39
40
  const DAY_RE = /^\d{4}-\d{2}-\d{2}$/;
@@ -78,6 +79,10 @@ function all(ctx, now = Date.now()) {
78
79
  const of = (w) => foldedInto(list, w);
79
80
  const perWs = list.map((w) => ({ ws: (of(w) || w).id, lines: read(fileOf(ctx, w, false)), tree: of(w) ? 0 : 1 })).sort((a, b) => a.tree - b.tree);
80
81
  const progs = P.merge(perWs);
82
+ // an initiative the PM deleted on the board (lib/ini-deleted.js) is no longer a member: the ledger line stays, so a restore brings it back,
83
+ // and the program does not keep naming what no list shows (Project Ascent kept `decommission` after it was deleted)
84
+ const rootOf = new Map(list.map((w) => [w.id, w.root]));
85
+ for (const p of progs) p.members = (p.members || []).filter((m) => { const r = rootOf.get(m.ws); return !(r && deletedIds.ids(r).has(m.initiative)); });
81
86
  const R = new Map();
82
87
  for (const p of progs) {
83
88
  if (!R.has(p.home)) { const w = list.find((x) => x.id === p.home), d = w ? stateDir(ctx, w, false) : null; R.set(p.home, MS.fold(read(d ? MS.fileOf(d) : null))); }
@@ -64,6 +64,7 @@ function mainTreeOf(trees) {
64
64
  /* Resolve one "start work here" request to a plan.
65
65
  *
66
66
  * trees — the registered workspaces of ONE repository: { id, root, repo_key, branch }
67
+ * profile — the repository's profile: 'pm-artifacts' (documents only, D68) or 'product-code' (the default)
67
68
  * initiative — an initiative id, or null/'' for "just give me a terminal"
68
69
  * branches — branch names known to the repo (branchInfo().branches), or null when unread
69
70
  *
@@ -71,7 +72,7 @@ function mainTreeOf(trees) {
71
72
  * there is nothing to act on. `wsId` is the workspace the session is spawned against; `branch`
72
73
  * non-null means a git operation is required first, and `isolate` says which kind.
73
74
  */
74
- function resolveStart({ initiative, trees, branches } = {}) {
75
+ function resolveStart({ initiative, trees, branches, profile } = {}) {
75
76
  const list = (trees || []).filter(Boolean);
76
77
  if (!list.length) return { ok: false, error: 'no working tree is registered for this repository' };
77
78
  const main = mainTreeOf(list);
@@ -103,6 +104,16 @@ function resolveStart({ initiative, trees, branches } = {}) {
103
104
  why: `this repository is already on ${branch} — the session runs here, and no second folder is made`,
104
105
  };
105
106
  }
107
+ // A DOCUMENT repository (profile pm-artifacts) holds only the PM's documents and every file is a record. There is no code to keep
108
+ // from a parallel session, and a branch and a folder per initiative is how a product folder was once left off its default branch with
109
+ // its records on the wrong one (D70 as amended 2026-10-31, D102). The session runs in the repository's own folder, with no git
110
+ // operation. A folder an earlier version already made for the initiative is still reused above.
111
+ if (profile === 'pm-artifacts') {
112
+ return {
113
+ ok: true, plan: 'main-tree', wsId: main.id, branch: null, createBranch: false, isolate: false,
114
+ why: `runs in ${main.name || 'the main working tree'} — this repository holds documents only, so no second folder is made`,
115
+ };
116
+ }
106
117
  // Otherwise: a new worktree, off the main tree, which stays exactly where it is.
107
118
  // `create` is DERIVED. A null `branches` means the branch list was never read — assuming the
108
119
  // branch is new would make `git worktree add -b` fail on every existing branch, so the honest
@@ -246,5 +246,5 @@ async function defaultBranchOf(root, remote) {
246
246
  return null;
247
247
  }
248
248
 
249
- module.exports = { status, sync, ensureUnionAttribute, unionAttributesFor, RECORD_PATHS, isRecord, REMOTE_FRESH_MS,
249
+ module.exports = { run, status, sync, ensureUnionAttribute, unionAttributesFor, RECORD_PATHS, isRecord, REMOTE_FRESH_MS,
250
250
  unpushedPaths, newestDirtyRecordMs, defaultBranchOf, profileOf };
@@ -95,6 +95,9 @@ function krBullet(line) {
95
95
  const m = RE_KR_BULLET.exec(line);
96
96
  if (!m) return null;
97
97
  let rest = m[3];
98
+ // a bullet that lists KRs in a sentence ("KR-A2, KR-B1 and KR-C3 have no initiative.") declares none of them: a KR is declared by an id
99
+ // followed by its name, so a comma or "and" after the id is prose
100
+ if (/^\s*(\*\*)?\s*(,|;|&|(and|or)\b)/i.test(rest)) return null;
98
101
  const sep = /^\s*[—–:.-]?\s*/;
99
102
  let name;
100
103
  if (m[1] && /^\s*\*\*/.test(rest)) name = rest.replace(/^\s*\*\*/, '').replace(sep, ''); // **KR1.2** — name
@@ -0,0 +1,86 @@
1
+ 'use strict';
2
+ /* lib/worktree-gc.js — remove the folders of finished work, so they do not pile up (D102; the PM: "a worktree should be invisible").
3
+ *
4
+ * A linked worktree is an extra folder of a repository. IDPF had six under pmos-idpf-worktrees/ and three under pmos-microsites-worktrees/,
5
+ * each left behind after its branch was merged. collect(root) removes a worktree only when ALL of these hold, so nothing a person
6
+ * could miss is ever removed:
7
+ * - root is the repository's own folder, and the worktree is another one on a named branch that is not the default branch;
8
+ * - its branch is fully merged: a commit of the default branch (the remote's when there is a remote) contains the branch tip;
9
+ * - the folder holds nothing unsaved: no modified, staged or untracked file;
10
+ * - it has been idle for IDLE_MS: neither its HEAD nor its index has changed in that time (a fresh branch with no commit is "merged"
11
+ * too, and must never be removed the minute it is made);
12
+ * - it is not locked, and inUse(dir) says no session or registered workspace uses it.
13
+ * It runs `git worktree remove` WITHOUT --force, so git itself refuses a dirty folder as a last check. The branch is never deleted. A
14
+ * worktree whose folder is already gone is pruned. Nothing is pushed or merged here.
15
+ *
16
+ * collect(root, { inUse, onRemoved, now, idleMs }) → { removed: [{ dir, branch }], kept: [{ dir, branch, why }] } */
17
+ const fs = require('fs');
18
+ const path = require('path');
19
+ const syncLib = require('./sync');
20
+ const repairLib = require('./folder-repair');
21
+
22
+ const { run } = syncLib;
23
+ const IDLE_MS = 14 * 24 * 60 * 60 * 1000;
24
+ const same = (a, b) => path.resolve(String(a)) === path.resolve(String(b));
25
+
26
+ /** `git worktree list --porcelain` with the flags the plain list drops: [{ dir, branch|null, locked, prunable }]. */
27
+ async function list(root) {
28
+ const r = await run(root, ['worktree', 'list', '--porcelain']);
29
+ if (!r.ok || !r.out) return [];
30
+ const out = []; let cur = null;
31
+ for (const line of r.out.split('\n')) {
32
+ if (line.startsWith('worktree ')) { cur = { dir: line.slice(9).trim(), branch: null, locked: false, prunable: false }; out.push(cur); }
33
+ else if (!cur) continue;
34
+ else if (line.startsWith('branch ')) cur.branch = line.slice(7).trim().replace(/^refs\/heads\//, '');
35
+ else if (line === 'locked' || line.startsWith('locked ')) cur.locked = true;
36
+ else if (line === 'prunable' || line.startsWith('prunable ')) cur.prunable = true;
37
+ }
38
+ return out;
39
+ }
40
+
41
+ /** When a worktree was last used: the newest change of its HEAD or index file, in ms; null when it cannot be read. */
42
+ async function lastUsed(dir) {
43
+ const g = await run(dir, ['rev-parse', '--path-format=absolute', '--git-dir']);
44
+ if (!g.ok || !g.out) return null;
45
+ let newest = null;
46
+ for (const f of ['HEAD', 'index']) { try { const t = fs.statSync(path.join(g.out, f)).mtimeMs; if (newest == null || t > newest) newest = t; } catch { /* a missing file says nothing */ } }
47
+ return newest;
48
+ }
49
+
50
+ async function collect(root, { inUse = () => false, onRemoved = () => {}, now = Date.now(), idleMs = IDLE_MS } = {}) {
51
+ const res = { removed: [], kept: [] };
52
+ if (!(await repairLib.isMainTree(root))) return res;
53
+ const s = await syncLib.status(root);
54
+ const remote = s.ok && s.upstream ? s.upstream.split('/')[0] : 'origin';
55
+ const hasRemote = (await run(root, ['remote', 'get-url', remote])).ok;
56
+ const def = hasRemote ? await syncLib.defaultBranchOf(root, remote) : null;
57
+ if (!def) return res;
58
+
59
+ // a worktree whose folder is gone is only a record in the repository: pruning it removes no file
60
+ const trees = await list(root);
61
+ if (trees.some((t) => t.prunable)) await run(root, ['worktree', 'prune']);
62
+
63
+ const mergedInto = (await run(root, ['rev-parse', '--verify', '--quiet', `refs/remotes/${remote}/${def}`])).ok ? `refs/remotes/${remote}/${def}` : `refs/heads/${def}`;
64
+ for (const t of trees) {
65
+ if (same(t.dir, root) || t.prunable) continue;
66
+ const keep = (why) => res.kept.push({ dir: t.dir, branch: t.branch, why });
67
+ if (!t.branch) { keep('no branch'); continue; }
68
+ if (t.branch === def) { keep('the default branch'); continue; }
69
+ if (t.locked) { keep('locked'); continue; }
70
+ if ((await run(root, ['merge-base', '--is-ancestor', `refs/heads/${t.branch}`, mergedInto])).ok !== true) { keep('not merged'); continue; }
71
+ // read the idle time first, and look at the folder without taking an index lock: a status that refreshed the index would reset the clock
72
+ const used = await lastUsed(t.dir);
73
+ const st = await run(t.dir, ['--no-optional-locks', 'status', '--porcelain', '--untracked-files=all']);
74
+ if (!st.ok) { keep('unreadable'); continue; }
75
+ if (st.out) { keep('holds unsaved files'); continue; }
76
+ if (used == null || now - used < idleMs) { keep('used recently'); continue; }
77
+ let busy = false; try { busy = !!inUse(t.dir); } catch { busy = true; }
78
+ if (busy) { keep('in use'); continue; }
79
+ if (!(await run(root, ['worktree', 'remove', t.dir])).ok) { keep('git refused'); continue; }
80
+ res.removed.push({ dir: t.dir, branch: t.branch });
81
+ try { onRemoved(t.dir); } catch { /* the caller's tidy-up is not the removal's business */ }
82
+ }
83
+ return res;
84
+ }
85
+
86
+ module.exports = { collect, list, IDLE_MS };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.462.0",
3
+ "version": "0.464.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.462.0",
9
+ "version": "0.464.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.462.0",
3
+ "version": "0.464.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",
@@ -2073,6 +2073,11 @@ const autoSync = require('./lib/auto-sync').createAutoSync({
2073
2073
  busy: syncing,
2074
2074
  onDone: (root, out) => { boardCache.invalidate(root); try { if (refreshRun) refreshRun.codeRun('sync', { trigger: 'change', result: out && out.ok ? 'done' : 'failed', got: out && out.ok ? (out.message || 'synced') : null, error: out && !out.ok ? out.message || 'the sync failed' : null }); } catch { /* the log is not the sync's business */ } },
2075
2075
  label: `${os.hostname()} (auto-sync)`,
2076
+ // finished worktrees are removed (lib/worktree-gc.js) only when no registered workspace owns sessions there; a registered one is forgotten with its folder
2077
+ gcHooks: {
2078
+ inUse: (dir) => { const w = [...workspaces.values()].find((x) => path.resolve(x.root) === path.resolve(dir)); return !!w && !!forgetBlocker(w.id); },
2079
+ onRemoved: (dir) => { const w = [...workspaces.values()].find((x) => path.resolve(x.root) === path.resolve(dir)); if (w) forgetWorkspace(w.id); },
2080
+ },
2076
2081
  });
2077
2082
  // workspace-data-freshness (R2 to R4): the facts cache is kept in the runtime state folder, and ONE change detector per
2078
2083
  // workspace starts the board and facts rebuilds when the repository changes, so nothing is re-read on a clock. The board
@@ -4835,7 +4840,7 @@ function startPreview({ initiative, repoKey, ws }) {
4835
4840
  if (initiative && main) {
4836
4841
  try { const bi = gitInfo.branchInfo(main.root); if (bi.ok) branches = bi.branches; } catch {}
4837
4842
  }
4838
- const plan = startPolicy.resolveStart({ initiative, trees, branches });
4843
+ const plan = startPolicy.resolveStart({ initiative, trees, branches, profile: main ? syncLib.profileOf(main.root) : undefined });
4839
4844
  if (!plan.ok) return plan;
4840
4845
  // The literal directory, so the sentence in the UI is checkable rather than a promise.
4841
4846
  let dir = null;
@@ -4855,7 +4860,7 @@ function startWork({ initiative, repoKey, ws, agent, name, profile, origin, init
4855
4860
  if (initiative && main) {
4856
4861
  try { const bi = gitInfo.branchInfo(main.root); if (bi.ok) branches = bi.branches; } catch {}
4857
4862
  }
4858
- const plan = startPolicy.resolveStart({ initiative, trees, branches });
4863
+ const plan = startPolicy.resolveStart({ initiative, trees, branches, profile: main ? syncLib.profileOf(main.root) : undefined });
4859
4864
  if (!plan.ok) return plan;
4860
4865
  const r = spawnWithBranch({
4861
4866
  name: name || initiative || agent || 'shell',
@@ -10,6 +10,7 @@
10
10
  "modules": [
11
11
  "find-browser.test.js",
12
12
  "program-worktree.test.js",
13
+ "program-deleted.test.js",
13
14
  "own-profile.test.js",
14
15
  "stage-tools.test.js",
15
16
  "report-template-cadence.test.js",
@@ -79,6 +80,9 @@
79
80
  "state-isolation.test.js",
80
81
  "sync.test.js",
81
82
  "auto-sync.test.js",
83
+ "folder-repair.test.js",
84
+ "folder-needs.test.js",
85
+ "worktree-gc.test.js",
82
86
  "schedule-cli.test.js",
83
87
  "initiative-surface.test.js",
84
88
  "guide.test.js",
@@ -191,6 +195,10 @@
191
195
  "state-isolation.test.js": 4,
192
196
  "sync.test.js": 4,
193
197
  "auto-sync.test.js": 4,
198
+ "folder-repair.test.js": 4,
199
+ "folder-needs.test.js": 1,
200
+ "worktree-gc.test.js": 3,
201
+ "program-deleted.test.js": 1,
194
202
  "schedule-cli.test.js": 3,
195
203
  "initiative-surface.test.js": 3,
196
204
  "guide.test.js": 1,