create-pmos 0.411.0 → 0.413.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.
Files changed (113) hide show
  1. package/package.json +25 -25
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/scripts/pmos-log.sh +6 -3
  6. package/payload/state/discoveries.md +1 -1
  7. package/workspace/board-programs-test.js +2 -2
  8. package/workspace/briefing-premium-adddoc-test.js +1 -1
  9. package/workspace/briefing-premium-insights-test.js +2 -2
  10. package/workspace/briefing-premium-test.js +3 -3
  11. package/workspace/changelog.json +24 -0
  12. package/workspace/core-docs-workflow-test.js +144 -0
  13. package/workspace/guide/board.md +1 -1
  14. package/workspace/guide/breakdown.md +6 -13
  15. package/workspace/guide/index.md +1 -1
  16. package/workspace/guide/initiative-driver.md +1 -1
  17. package/workspace/guide/initiatives-screen.md +1 -1
  18. package/workspace/guide/pm-only-acts.md +23 -24
  19. package/workspace/guide/today.md +1 -1
  20. package/workspace/guide/workflows.md +8 -1
  21. package/workspace/lib/board-premium.js +7 -2
  22. package/workspace/lib/briefing-premium-agent.js +16 -4
  23. package/workspace/lib/briefing-premium-writes.js +5 -4
  24. package/workspace/lib/core-docs.js +79 -14
  25. package/workspace/lib/coredoc-cli.js +1 -1
  26. package/workspace/lib/driver-cli.js +2 -1
  27. package/workspace/lib/driver-decide.js +3 -2
  28. package/workspace/lib/driver.js +2 -1
  29. package/workspace/lib/engine/boards.js +20 -12
  30. package/workspace/lib/grant-mint.js +3 -2
  31. package/workspace/lib/initiative-chat.js +49 -0
  32. package/workspace/lib/initiative-cli.js +9 -9
  33. package/workspace/lib/initiative-premium.js +17 -7
  34. package/workspace/lib/issues.js +5 -4
  35. package/workspace/lib/item-cli.js +7 -2
  36. package/workspace/lib/people-store.js +1 -1
  37. package/workspace/lib/people.js +3 -1
  38. package/workspace/lib/placements.js +13 -15
  39. package/workspace/lib/plan-items.js +18 -49
  40. package/workspace/lib/pm-guard.js +18 -5
  41. package/workspace/lib/pm-lines-needs.js +9 -5
  42. package/workspace/lib/pmos-verbs.js +1 -1
  43. package/workspace/lib/program-chat.js +1 -1
  44. package/workspace/lib/programs.js +21 -5
  45. package/workspace/lib/report-cli.js +2 -2
  46. package/workspace/lib/routes-board-metric-targets.js +0 -1
  47. package/workspace/lib/routes-boards.js +75 -13
  48. package/workspace/lib/routes-briefing-premium.js +20 -6
  49. package/workspace/lib/routes-core-docs.js +3 -2
  50. package/workspace/lib/routes-custom-docs.js +0 -1
  51. package/workspace/lib/routes-driver.js +0 -1
  52. package/workspace/lib/routes-home-desk.js +1 -1
  53. package/workspace/lib/routes-home-review.js +1 -1
  54. package/workspace/lib/routes-initiative-layout.js +1 -1
  55. package/workspace/lib/routes-insights-records.js +0 -1
  56. package/workspace/lib/routes-meeting-material.js +0 -1
  57. package/workspace/lib/routes-onboarding.js +3 -1
  58. package/workspace/lib/routes-orchestrator.js +0 -1
  59. package/workspace/lib/routes-premium-charts.js +0 -1
  60. package/workspace/lib/routes-premium-dashboards.js +0 -1
  61. package/workspace/lib/routes-programs.js +13 -2
  62. package/workspace/lib/routes-records.js +1 -1
  63. package/workspace/lib/routes-report-design.js +7 -3
  64. package/workspace/lib/routes-report-setups.js +0 -1
  65. package/workspace/lib/routes-report-structure.js +0 -1
  66. package/workspace/lib/routes-runs.js +2 -5
  67. package/workspace/lib/routes-scan.js +0 -1
  68. package/workspace/lib/routes-sources.js +1 -1
  69. package/workspace/lib/run-answers.js +14 -5
  70. package/workspace/lib/scan-cli.js +2 -1
  71. package/workspace/lib/scan.js +2 -1
  72. package/workspace/lib/vendor/scripts/onboarding/proposals.js +7 -3
  73. package/workspace/lib/workflow-chat.js +1 -0
  74. package/workspace/lib/workflow-cli.js +91 -6
  75. package/workspace/package-lock.json +2 -2
  76. package/workspace/package.json +1 -1
  77. package/workspace/premium-chat-line-test.js +9 -0
  78. package/workspace/premium-core-doc-issue-test.js +1 -1
  79. package/workspace/premium-viewer-share-test.js +5 -2
  80. package/workspace/premium-vw-item-test.js +3 -3
  81. package/workspace/premium-vw-jira-test.js +2 -1
  82. package/workspace/program-order-test.js +180 -0
  83. package/workspace/public/pm/bd-prog.js +3 -3
  84. package/workspace/public/pm/cozy-viewer.js +8 -3
  85. package/workspace/public/pm/goal-chat.js +1 -1
  86. package/workspace/public/pm/home-app.js +22 -8
  87. package/workspace/public/pm/home-chat.js +6 -1
  88. package/workspace/public/pm/home-ini-model.js +42 -29
  89. package/workspace/public/pm/home-ini.css +1 -0
  90. package/workspace/public/pm/home-ini.js +26 -34
  91. package/workspace/public/pm/home-list.js +2 -1
  92. package/workspace/public/pm/home-stage-card.js +3 -1
  93. package/workspace/public/pm/home-task.js +41 -65
  94. package/workspace/public/pm/home-today.js +7 -5
  95. package/workspace/public/pm/premium-board.js +12 -6
  96. package/workspace/public/pm/premium-initiative-head.js +21 -11
  97. package/workspace/public/pm/premium-viewer.js +1 -0
  98. package/workspace/public/pm/premium-vw-item-model.js +13 -7
  99. package/workspace/public/pm/premium-vw-item.js +49 -5
  100. package/workspace/public/pm/prog-order.css +47 -0
  101. package/workspace/public/pm/prog-order.js +188 -0
  102. package/workspace/public/pm/program-model.js +75 -0
  103. package/workspace/public/pm/task-card.css +108 -0
  104. package/workspace/public/pm/task-card.js +271 -0
  105. package/workspace/replaced-tests.json +101 -0
  106. package/workspace/server.js +8 -9
  107. package/workspace/skills/workflow-setup.skill +14 -5
  108. package/workspace/stage-card-test.js +11 -0
  109. package/workspace/task-card-test.js +248 -0
  110. package/workspace/test-lists/core-documents-backend.json +15 -3
  111. package/workspace/test-lists/program-order.json +6 -0
  112. package/workspace/test-lists/task-card.json +6 -0
  113. package/workspace/test-lists/workflow-stage.json +5 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.411.0",
3
+ "version": "0.413.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,30 @@
32
32
  "audit"
33
33
  ],
34
34
  "pmosChanges": [
35
+ {
36
+ "v": "0.413.0",
37
+ "at": "2026-10-25T08:05:44.632Z",
38
+ "f": 2,
39
+ "prs": [
40
+ {
41
+ "n": 1044,
42
+ "t": "Third testing feedback batch (items 1–10)",
43
+ "s": "Third testing feedback batch (items 1–10)"
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "v": "0.412.0",
49
+ "at": "2026-10-25T06:20:40.812Z",
50
+ "f": 2,
51
+ "prs": [
52
+ {
53
+ "n": 1041,
54
+ "t": "Agents finish the work they were asked to do (D98)",
55
+ "s": "Agents finish the work they were asked to do"
56
+ }
57
+ ]
58
+ },
35
59
  {
36
60
  "v": "0.411.0",
37
61
  "at": "2026-10-25T04:42:12.945Z",
@@ -252,30 +276,6 @@
252
276
  "s": "Open in terminal icon in the chat header"
253
277
  }
254
278
  ]
255
- },
256
- {
257
- "v": "0.393.0",
258
- "at": "2026-10-22T04:08:26.227Z",
259
- "f": 2,
260
- "prs": [
261
- {
262
- "n": 1007,
263
- "t": "Show Claude's questions in the chat as a card, not a picker the panel cannot show",
264
- "s": "Show Claude's questions in the chat as a card, not a picker the panel cannot show"
265
- }
266
- ]
267
- },
268
- {
269
- "v": "0.392.0",
270
- "at": "2026-10-22T04:00:27.581Z",
271
- "f": 2,
272
- "prs": [
273
- {
274
- "n": 1006,
275
- "t": "Files Claude wrote in a git worktree open in the chat viewer",
276
- "s": "Files Claude wrote in a git worktree open in the chat viewer"
277
- }
278
- ]
279
279
  }
280
280
  ]
281
281
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@e87cb4f8
1
+ kernel-source: pmos@96c2db49
2
2
  assembled: 2026-10-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-10-25T04:42:10Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-25T08:05:42Z"}
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-25T04:42:10Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-25T08:05:42Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -171,14 +171,16 @@ case "$cmd" in
171
171
  grant)
172
172
  [ $# -ge 3 ] || fail "usage: grant <merge:<PR or branch>|publish:<artifact>|release:<initiative>:<batch-id>|lifecycle-bulk:<state>:<id>,…> <pm> <instruction> [ttl_minutes] [initiative_id]"
173
173
  nonempty pm "$2"; nonempty instruction "$3"
174
- row="$(python3 - "$1" "$2" "$3" "${4:-120}" "${5:-}" "$STATE" <<'PY'
174
+ # The heredoc sits in a function, never inside "$( )": macOS /bin/bash 3.2 reads quotes in a heredoc that is inside a command
175
+ # substitution, so one apostrophe in the Python below made the whole script a syntax error there.
176
+ grant_row() { python3 - "$@" <<'PY'
175
177
  import datetime, json, os, re, secrets, sys
176
178
  scope, pm, instruction, ttl, initiative, state = sys.argv[1:7]
177
179
  def die(m):
178
180
  sys.stderr.write("pmos-log: ERROR — %s\n" % m); sys.exit(1)
179
181
  if re.match(r"^(docs-sync|outward)(:|$)", scope):
180
182
  die('"%s" is a standing scope. Standing grants are not allowed in this release (D81). Mint one single-use grant per action.' % scope)
181
- # The same scopes and target patterns as scripts/record-grant.js and the cockpit mod's grants.mjs (D81;
183
+ # The same scopes and target patterns as scripts/record-grant.js and the grants.mjs of the cockpit mod (D81;
182
184
  # D86 point 2 added release and lifecycle-bulk). scripts/tests/record-grant.test.js runs one table through all three.
183
185
  SLUG = r"[a-z0-9][a-z0-9._-]{0,99}"
184
186
  PATS = {
@@ -210,7 +212,8 @@ if initiative:
210
212
  row["initiative"] = initiative
211
213
  print(json.dumps(row, separators=(",", ":")))
212
214
  PY
213
- )" || exit 1
215
+ }
216
+ row="$(grant_row "$1" "$2" "$3" "${4:-120}" "${5:-}" "$STATE")" || exit 1
214
217
  append grants.jsonl "$row"
215
218
  ;;
216
219
  grant-use)
@@ -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-25T04:42:10Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-25T08:05:42Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -77,7 +77,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
77
77
  ok('G the program comes first: its band row is the first row under the head, with its title and the products it spans', /bt-pg/.test(tr.first) && /Project Ascent/.test(tr.band) && /2 products/.test(tr.band), JSON.stringify(tr));
78
78
  ok('G the band says its initiatives and their stage spread, read from every product (2 here, 1 in Microsites)', tr.spread === '3 initiatives, Triage to Plan', tr.spread);
79
79
  ok('G the next milestone shows with its date and its readiness, one diamond per initiative it waits on', /Pilot live/.test(tr.next) && /Nov 18/.test(tr.next) && tr.ready === '00', JSON.stringify(tr));
80
- ok('G its initiatives on this board sit under it; the rest of the product follows under the product head', tr.kids.join() === 'Legacy IdP sunset,Descope feature parity' && tr.prods.join() === 'IDPF' && tr.after.length === 2 && !tr.after.some((t) => tr.kids.includes(t)), JSON.stringify(tr));
80
+ ok('G its initiatives on this board sit under it, A to Z while the program has no order (option A); the rest of the product follows under the product head', tr.kids.join() === 'Descope feature parity,Legacy IdP sunset' && tr.prods.join() === 'IDPF' && tr.after.length === 2 && !tr.after.some((t) => tr.kids.includes(t)), JSON.stringify(tr));
81
81
  ok('G there is no "Not in a program" group, and Programs first draws no grouping chip (the choice lives in Filter)', !/Not in a program/.test(tr.text) && tr.grp);
82
82
 
83
83
  await p.click('#ibBody .bt-pg [data-prog]');
@@ -158,7 +158,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
158
158
  }));
159
159
  ok('T the program row comes first, with its title and products and a thin span over its initiatives\' dates', /tg-pg/.test(t.first) && /Project Ascent/.test(t.title) && /2 products/.test(t.title) && t.span, JSON.stringify(t));
160
160
  ok('T three milestones within a week merge into one counted diamond labelled "Pilot live +2 · Nov 18–21"', t.clu.length === 1 && /^3\|3 program milestones from Nov 18 to 21: Pilot live, Pilot users invited, Support ready/.test(t.clu[0]) && t.lab.join() === 'Pilot live +2 · Nov 18–21', JSON.stringify(t));
161
- ok('T the program\'s initiatives sit under it as one-line rows: a status dot and the name', t.kids.join() === 'Legacy IdP sunset,Descope feature parity' && t.oneLine, JSON.stringify(t));
161
+ ok('T the program\'s initiatives sit under it as one-line rows: a status dot and the name', t.kids.join() === 'Descope feature parity,Legacy IdP sunset' && t.oneLine, JSON.stringify(t));
162
162
  ok('T a legend in the chip row names done, planned, the program milestone, Deliver or Evaluate and today', /Done in Jira/.test(t.lgd) && /Planned/.test(t.lgd) && /Program milestone/.test(t.lgd) && /Deliver or Evaluate/.test(t.lgd) && /Today/.test(t.lgd), t.lgd);
163
163
  await p.click('#ibBody .tg-pg .tg-pgo');
164
164
  // the program opens in the floating Viewer (shell A), which sits over the right of the timeline; close it before the next press
@@ -176,7 +176,7 @@ const PAGES = {
176
176
  const noNonce = await send({ scope: 'board:nope', title: 'A' }, { 'Content-Type': 'application/json' });
177
177
  ok('A3 a request without the page headers is refused with 403', noNonce.status === 403, JSON.stringify(noNonce));
178
178
  const agent = await send({ scope: 'board:nope', title: 'A' }, Object.assign({}, H, { 'x-pmos-session': 'abc' }));
179
- ok('A3 an agent session is refused with 403', agent.status === 403, JSON.stringify(agent));
179
+ ok('A3 D98: an agent session is not refused as an agent: its press is checked like the PM\'s (an unknown board is 404)', agent.status === 404, JSON.stringify(agent));
180
180
  const empty = await send({ scope: 'board:nope', title: ' ' }, H);
181
181
  ok('A4 an empty title is refused with 400 and a reason', empty.status === 400 && /title/.test(empty.body.error), JSON.stringify(empty));
182
182
  const orphan = await send({ scope: 'board:no-such-board-xyz', title: 'A' }, H);
@@ -487,7 +487,7 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
487
487
  const asAgent = await fetch(base2 + '/api/premium-dashboards/save', { method: 'POST', headers: { ...H, 'x-pmos-session': 's1' }, body }).then((x) => x.status);
488
488
  const noNonce = await fetch(base2 + '/api/premium-dashboards/save', { method: 'POST', headers: { 'Content-Type': 'application/json', Origin: base2 }, body }).then((x) => x.status);
489
489
  const unknown = await fetch(base2 + '/api/premium-dashboards/save', { method: 'POST', headers: H, body: JSON.stringify({ ws: m.board.ws, board: m.board.id, name: 'Other', purpose: 'x', charts: ['krm-none'] }) }).then((x) => x.status);
490
- ok('E9 the real save route refuses an agent session (403), a press without the nonce (403) and a chart no record holds (400)', asAgent === 403 && noNonce === 403 && unknown === 400, [asAgent, noNonce, unknown].join());
490
+ ok('E9 the real save route refuses a press without the nonce (403) and a chart no record holds (400); an agent session saves (D98)', asAgent === 200 && noNonce === 403 && unknown === 400, [asAgent, noNonce, unknown].join());
491
491
  /* New goal against the real route: the record lands in the scratch repository with every field the page sent */
492
492
  await pg.click('#newB'); await pg.click('#newMenu [data-new="goal"]'); await pg.fill('#ngName', 'Weekly partners'); await pg.fill('#ngBase', '5'); await pg.fill('#ngTgt', '9');
493
493
  await pg.click('#sideBody [data-seg="Type"] [data-v="Count"]'); await pg.fill('#ngOwner', 'Lee'); await pg.click('#sideBody [data-src="file"]'); await pg.click('#sideGo');
@@ -508,7 +508,7 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
508
508
  const tg = await post('target', { key: 'scope', target: 3 });
509
509
  const asAgent2 = await post('verdict', { ini: 'x', verdict: 'Keep', learned: 'y' }, { ...H, 'x-pmos-session': 's1' });
510
510
  const j3 = await (await fetch(base2 + '/api/insights-premium')).json(), m3 = j3.model;
511
- ok('E12 describe reads the goals and writes nothing; the dashboard, its chart settings, the pin, a verdict and a tile target land in the ledger and come back in the model', dsc.status === 200 && dsc.body.goals.join() === 'krm-a' && dsh.status === 200 && dsh.body.pinned === dsh.body.id && chs.status === 200 && vd.status === 200 && tg.status === 200 && asAgent2.status === 403
511
+ ok('E12 describe reads the goals and writes nothing; the dashboard, its chart settings, the pin, a verdict and a tile target land in the ledger and come back in the model', dsc.status === 200 && dsc.body.goals.join() === 'krm-a' && dsh.status === 200 && dsh.body.pinned === dsh.body.id && chs.status === 200 && vd.status === 200 && tg.status === 200 && asAgent2.status === 200
512
512
  && m3.pinned === dsh.body.id && m3.chartSet[dsh.body.id]['krm-a'].form === 'Number' && m3.chartSet[dsh.body.id]['krm-a'].note === 'After the kit' && m3.trends.targets.scope === 3, JSON.stringify([dsc.body, dsh.status, chs.body, vd.status, tg.body, asAgent2.status, m3.chartSet]));
513
513
  const csv = await fetch(base2 + '/api/insights-records/export?ws=' + m.board.ws).then(async (x) => ({ status: x.status, type: x.headers.get('content-type'), text: await x.text() }));
514
514
  ok('E13 Export answers the goals as CSV, one row each', csv.status === 200 && /^text\/csv/.test(csv.type) && /^id,goal,objective,type/.test(csv.text) && /krm-a,Partner activation,Growth,Percentage/.test(csv.text) && /Weekly partners/.test(csv.text), csv.text.slice(0, 200));
@@ -195,7 +195,7 @@ const vw = () => { const v = document.querySelector('#czViewer:not([hidden])');
195
195
  const nonce = await T.nonce(BASE);
196
196
  ok('W5 a press without the launch nonce is refused', !nonce || noN.s === 403, JSON.stringify(noN));
197
197
  const ag = await send({ ...hdr, 'x-pmos-session': 'sess-1' }, good);
198
- ok('W5 an agent session is refused with 403', ag.s === 403, JSON.stringify(ag));
198
+ ok('W5 D98: an agent session is not refused as an agent: its press is checked like the PM\'s (an unknown prototype is 404)', ag.s === 404, JSON.stringify(ag));
199
199
  const wf = await send(hdr, { ...good, by: 'pm' });
200
200
  ok('W5 a body with a writer field is refused with 400', wf.s === 400, JSON.stringify(wf));
201
201
  const before = fs.readFileSync(path.join(__dirname, '..', 'pm-decisions.md'), 'utf8');
@@ -204,10 +204,10 @@ const vw = () => { const v = document.querySelector('#czViewer:not([hidden])');
204
204
  const after = fs.readFileSync(path.join(__dirname, '..', 'pm-decisions.md'), 'utf8');
205
205
  ok('W6 a bad key and an unknown prototype are refused and pm-decisions.md is unchanged', bad.s === 400 && none.s === 404 && before === after, JSON.stringify([bad, none]));
206
206
  const askBad = await send(hdr, { key: '../x', text: 'q' }, 'ask');
207
- const askAgent = await send({ ...hdr, 'x-pmos-session': 'sess-1' }, { key: 'decision:KC5', text: 'q' }, 'ask');
207
+ const askAgent = await send({ ...hdr, 'x-pmos-session': 'sess-1' }, { key: '../x', text: 'q' }, 'ask');
208
208
  const askNoNonce = await send({ 'Content-Type': 'application/json', Origin: BASE }, { key: 'decision:KC5', text: 'q' }, 'ask');
209
209
  const askWriter = await send(hdr, { key: 'decision:KC5', text: 'q', by: 'pm' }, 'ask');
210
- ok('A7 the ask route refuses an agent session (403), a missing nonce (403), a writer field (400) and a bad key (400), and starts nothing', askAgent.s === 403 && (!nonce || askNoNonce.s === 403) && askWriter.s === 400 && askBad.s === 400, JSON.stringify([askAgent, askNoNonce, askWriter, askBad]));
210
+ ok('A7 the ask route refuses a missing nonce (403), a writer field (400) and a bad key (400), for an agent session too (D98: checked, not refused as an agent), and starts nothing', askAgent.s === 400 && (!nonce || askNoNonce.s === 403) && askWriter.s === 400 && askBad.s === 400, JSON.stringify([askAgent, askNoNonce, askWriter, askBad]));
211
211
  const thr = await fetch(BASE + '/api/briefing-premium/thread?key=../x').then((r) => r.status);
212
212
  const thrGet = await fetch(BASE + '/api/briefing-premium/ask').then((r) => r.status);
213
213
  ok('A7 the thread route refuses a bad key and the ask route refuses GET', thr === 400 && thrGet === 405, JSON.stringify([thr, thrGet]));
@@ -1,4 +1,28 @@
1
1
  [
2
+ {
3
+ "v": "0.413.0",
4
+ "at": "2026-10-25T08:05:44.632Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 1044,
9
+ "t": "Third testing feedback batch (items 1–10)",
10
+ "s": "Third testing feedback batch (items 1–10)"
11
+ }
12
+ ]
13
+ },
14
+ {
15
+ "v": "0.412.0",
16
+ "at": "2026-10-25T06:20:40.812Z",
17
+ "f": 2,
18
+ "prs": [
19
+ {
20
+ "n": 1041,
21
+ "t": "Agents finish the work they were asked to do (D98)",
22
+ "s": "Agents finish the work they were asked to do"
23
+ }
24
+ ]
25
+ },
2
26
  {
3
27
  "v": "0.411.0",
4
28
  "at": "2026-10-25T04:42:12.945Z",
@@ -0,0 +1,144 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ /* core-docs-workflow-test.js — the Documents view of an initiative on a library workflow, in Home's Viewer (D99; third testing feedback
4
+ * batch, item 8). The pure half is core-docs-workflow.test.js. Serves the real page from the real server; GET /api/initiative-premium
5
+ * answers lib/initiative-premium.js's fixture model with the documents lib/core-docs.js gives an initiative on Tender at Requirements.
6
+ * D1 the groups are Tender's stages (Requirements · now, Triage, Ahead), never Discover / Plan / Build / Evaluate
7
+ * D2 no Product feature document (PRD, Risks, Problem statement) is listed; the primary drafts the stage's own document
8
+ * D3 a document issued before the switch sits under Other documents · D4 phone and dark. SHOTS=<dir> writes the screenshots. */
9
+ const fs = require('fs');
10
+ const os = require('os');
11
+ const path = require('path');
12
+ const { spawn } = require('child_process');
13
+ const { findBrowser } = require('./lib/find-browser');
14
+ const T = require('./test-run').configure({ name: 'core-docs-workflow' });
15
+ const CD = require('./lib/core-docs.js');
16
+ const IP = require('./lib/initiative-premium.js');
17
+ const F = require('./fixtures/initiative-premium-facts.js');
18
+ const BP = require('./lib/board-premium.js');
19
+ const BF = require('./fixtures/board-premium-facts.js');
20
+ const BRP = require('./lib/briefing-premium.js');
21
+ const BRF = require('./fixtures/briefing-premium-facts.js');
22
+ const WF = require('../scripts/workflows.js');
23
+
24
+ const BASE = T.BASE;
25
+ const SHOTS = process.env.SHOTS || '';
26
+ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
27
+ const until = async (fn, ms = 10000, step = 100) => { const t0 = Date.now(); for (;;) { const v = await fn(); if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
28
+ const results = [];
29
+ const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 600) : ''}`); };
30
+ let srv = null; let browser = null;
31
+ const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'pmos-cdwf-'));
32
+ const finish = async (code) => {
33
+ if (browser) await browser.close().catch(() => {});
34
+ if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
35
+ T.killTmux();
36
+ try { fs.rmSync(tmp, { recursive: true, force: true }); } catch { /* best effort */ }
37
+ const bad = results.filter((x) => !x.cond).length;
38
+ console.log(`\n${results.length - bad}/${results.length} core-docs-workflow assertions passed`);
39
+ process.exit(code !== undefined ? code : (bad ? 1 : 0));
40
+ };
41
+ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
42
+
43
+ const TENDER = WF.check({ id: 'tender', name: 'Tender', icon: 'doc', stages: [
44
+ { name: 'Triage', cat: 'todo', output: { name: 'BRD', kind: 'doc', template: 'BRD' } },
45
+ { name: 'Requirements', cat: 'doing', output: { name: 'Requirements spec', kind: 'doc' } },
46
+ { name: 'RFP out', cat: 'doing', output: { name: 'RFP', kind: 'doc', template: 'RFP' }, milestone: true },
47
+ { name: 'Bids', cat: 'doing', output: { name: 'Bids in', kind: 'checklist' } },
48
+ { name: 'Award', cat: 'done', output: { name: 'Award sign-off', kind: 'signoff' }, milestone: true },
49
+ ] }).workflow;
50
+ const LIB = WF.fold([{ kind: 'wf-save', wf: TENDER }]);
51
+ const ID = 'self-serve-v2';
52
+ const st = WF.stagesOf(TENDER, { current: 'requirements' });
53
+ const s = st.find((x) => x.key === 'requirements');
54
+ const ROW = { id: ID, title: 'Office network tender', stage: s.name, cat: null, template: null, wf: { id: 'tender', name: 'Tender', icon: 'doc' },
55
+ wfStage: { key: s.key, name: s.name, cat: s.cat, milestone: s.milestone, n: s.n, of: s.of },
56
+ wfStages: st.map((x) => ({ key: x.key, name: x.name, cat: x.cat, milestone: x.milestone, auto: x.auto, when: x.when, status: x.status, reading: x.reading })) };
57
+ /** The GET /api/core-docs body lib/core-docs.js gives this initiative; `store` holds what it already issued. */
58
+ function docsBody(store = new Map()) {
59
+ const list = CD.initiativeSet({ root: tmp }, { row: ROW, base: { id: ID, record: null }, board: { build: true }, folded: { moves: [], wfLib: LIB }, store,
60
+ extra: { tools: new Map(), artifacts: new Map(), accepted: new Set(), reportCache: {} }, now: Date.now(), ctx: {} });
61
+ return CD.answer({ level: 'initiative', scope: 'initiative:' + ID, row: ROW, board: { build: true }, list, plan: list.plan });
62
+ }
63
+ function model(store) {
64
+ const f = F.facts();
65
+ f.docs = docsBody(store);
66
+ return IP.build(f);
67
+ }
68
+ function board() {
69
+ const B = BP.build(BF.facts());
70
+ const patch = (r) => (r.id !== ID ? r : { ...r, ...ROW });
71
+ B.rows = B.rows.map(patch);
72
+ if (B.initiatives && B.initiatives.list) B.initiatives.list.rows = B.initiatives.list.rows.map(patch);
73
+ return B;
74
+ }
75
+ const BRIEF = BRP.build(BRF.facts());
76
+ const OLD = new Map([['initiative:' + ID + '|risks', { drafts: [], issued: { at: new Date(Date.now() - 86400000).toISOString(), path: 'planning/core-docs/initiative-x/risks/a.md', slot: 'a' }, draft: null, dropped: [] }]]);
77
+
78
+ (async () => {
79
+ const exe = findBrowser();
80
+ if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
81
+ let chromium;
82
+ try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
83
+ srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT), PMOS_SELF_ROOT: path.resolve(__dirname, '..') }) });
84
+ await T.waitForServer(BASE);
85
+ browser = await chromium.launch({ executablePath: exe });
86
+ if (SHOTS) fs.mkdirSync(SHOTS, { recursive: true });
87
+ const shot = async (p, name) => { if (SHOTS) await p.screenshot({ path: path.join(SHOTS, name + '.png'), fullPage: true }); };
88
+
89
+ const open = async ({ w = 1440, h = 900, theme = 'light', store } = {}) => {
90
+ const ctx = await browser.newContext({ viewport: { width: w, height: h } });
91
+ const page = await ctx.newPage();
92
+ const errors = [];
93
+ page.on('pageerror', (e) => errors.push(String((e && e.message) || e)));
94
+ const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'application/json', body: JSON.stringify(b) });
95
+ const M = model(store), B = board();
96
+ await page.route('**/api/initiative-premium*', (r) => json(r, { ok: true, state: 'ready', model: M, as_of: Date.now() }));
97
+ await page.route(/\/api\/board-premium(\?.*)?$/, (r) => json(r, { ok: true, state: 'ready', model: B, as_of: Date.now() }));
98
+ await page.route(/\/api\/briefing-premium(\?.*)?$/, (r) => json(r, { ok: true, state: 'ready', model: BRIEF, as_of: Date.now() }));
99
+ await page.route('**/api/briefing-premium/**', (r) => json(r, { ok: true, turns: [], working: false }));
100
+ await page.route(/\/api\/workflows(\?.*)?$/, (r) => json(r, { ok: true, workflows: WF.list(LIB) }));
101
+ await page.addInitScript(() => { try { localStorage.setItem('pmos.wf.seen', JSON.stringify({ 'self-serve-v2|tender': 1 })); } catch { /* none */ } });
102
+ await page.goto(BASE + '/premium.html?ini=' + ID + '&ws=w1&board=w1&theme=' + theme);
103
+ let up = await until(() => page.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v]')), 30000);
104
+ if (up) {
105
+ if (await page.$('#czViewer [data-hi-v="page"] [data-hi-open="docs"]')) await page.click('#czViewer [data-hi-open="docs"]');
106
+ else { await page.click('#czViewer [data-cz-vw="more"]'); await until(() => page.evaluate(() => !!document.querySelector('#czViewer .cz-vw-menu'))); await page.click('#czViewer .cz-vw-menu [role="menuitem"]:has(> span:first-child:text-is("Documents"))'); }
107
+ up = await until(() => page.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v="docs"] .czs-secs')), 15000);
108
+ }
109
+ return { ctx, page, errors, up };
110
+ };
111
+ const V = '#czViewer:not([hidden]) [data-hi-v="docs"]';
112
+ const view = (p) => p.evaluate((v) => {
113
+ const el = document.querySelector(v);
114
+ return el ? { groups: [...el.querySelectorAll('.czs-sec > .czs-row > b')].map((b) => b.textContent), titles: [...el.querySelectorAll('[data-ov-doc] .w')].map((x) => x.firstChild.textContent),
115
+ text: el.textContent.replace(/\s+/g, ' '), primary: ((el.querySelector('.czs-sum button, button.cz-pri, [data-cz-act]') || {}).textContent || '').trim() } : null;
116
+ }, V);
117
+
118
+ const A = await open(), p = A.page;
119
+ ok('D0 the Documents view opens', A.up);
120
+ if (!A.up) return finish(1);
121
+ const v = await view(p);
122
+ ok('D1 the groups are Tender\'s own stages: Requirements · now, Triage, Ahead', v && v.groups.join('|') === 'Requirements · now|Triage|Ahead', JSON.stringify(v && v.groups));
123
+ ok('D1 no Discover, Plan, Build or Evaluate group', v && !v.groups.some((g) => /^(Discover|Plan|Build|Evaluate)\b/.test(g)));
124
+ ok('D2 the documents are the stages\' own (Requirements spec, BRD, RFP) and the status update; no PRD, Risks or Problem statement',
125
+ v && ['Requirements spec', 'BRD', 'RFP', 'Status update'].every((t) => v.text.includes(t)) && !/\bPRD\b|Risks|Problem statement|Priority \(RICE\)/.test(v.text), v && v.text);
126
+ ok('D2 the primary drafts a stage document, not a Product feature one', v && /^Draft the (BRD|Requirements spec)$/.test(v.primary), v && v.primary);
127
+ ok('D2 no page error', A.errors.length === 0, A.errors.join(' | '));
128
+ await shot(p, 'docs-tender-1440');
129
+ await A.ctx.close();
130
+
131
+ const O = await open({ store: OLD });
132
+ const vo = O.up ? await view(O.page) : null;
133
+ ok('D3 a Risks issued before the switch is kept, under Other documents', vo && vo.groups.includes('Other documents') && /Risks/.test(vo.text), JSON.stringify(vo && vo.groups));
134
+ await shot(O.page, 'docs-tender-other-1440');
135
+ await O.ctx.close();
136
+
137
+ const N = await open({ w: 390, h: 844, theme: 'dark' });
138
+ const vn = N.up ? await view(N.page) : null;
139
+ const over = N.up ? await N.page.evaluate(() => document.documentElement.scrollWidth > innerWidth + 1) : true;
140
+ ok('D4 at 390 px in dark the same stage groups, no sideways scroll', vn && vn.groups[0] === 'Requirements · now' && !over, JSON.stringify(vn && vn.groups));
141
+ await shot(N.page, 'docs-tender-390-dark');
142
+ await N.ctx.close();
143
+ return finish();
144
+ })();
@@ -65,7 +65,7 @@ Today shows three things from the Board:
65
65
  | no evidence | an agent marked the item Done and gave no evidence |
66
66
  | late | the due date passed and the item is not Done |
67
67
  | moved by you | you moved a card that an agent owns |
68
- | Proposed | an agent proposed the item and you did not keep it |
68
+ | Proposed | an item an agent added before D98 that was never kept (since D98 an agent's item is live at once) |
69
69
 
70
70
  ## From a terminal
71
71
 
@@ -38,7 +38,7 @@ The Tree shows the stages of the initiative in order, for example Intake, Spec,
38
38
  | late | The due date is in the past and the item is not Done. |
39
39
  | Doing, Review | The state of the item, in the Tree only. On the Board, the column shows the state. |
40
40
  | moved by you | You moved an item that an agent owns. The agent sees the same signal. |
41
- | Proposed | An agent added the item and you did not keep it yet. A proposed item does not count in the progress. |
41
+ | Proposed | Only on an item an agent added before D98 that was never kept. Since D98 an agent's item is live at once. |
42
42
 
43
43
  ### Keys in the Tree
44
44
 
@@ -72,7 +72,7 @@ If you move an item that an agent owns, the item shows "moved by you". The agent
72
72
  The sheet shows every field of one item, from top to bottom:
73
73
 
74
74
  1. The state: Todo, Doing, Review or Done. Under it, two lines show only when they apply:
75
- - "Proposed by agent · sess-3 on 5 Oct." with **Keep all**, for an item that an agent proposed. Keep all keeps every item of that agent's card.
75
+ - "Added by agent · sess-3 on 5 Oct." for an item that an agent added. It is live; withdraw it if you do not want it.
76
76
  - **Add evidence**, for an item that reads Done with no evidence. Type `commit:<sha>`, `pr:<number>`, `file:<path>` or `note:<text>` and press Enter. If the workspace refuses the reference, a message tells you why and your text stays in the field to correct.
77
77
  2. Title.
78
78
  3. Owner: You, Agent, a person (type the name) or a tracker (type the reference).
@@ -93,18 +93,11 @@ Done and Withdraw wait 8 seconds before they are saved. A message shows at the b
93
93
 
94
94
  A tick back from Done to Todo is saved at once.
95
95
 
96
- ## Items an agent proposes
96
+ ## Items an agent adds
97
97
 
98
- An agent can add items with `pmos item add`. Its items arrive as proposed. They show in the Tree and on the Board, but they do not count in the progress until you keep them.
98
+ An agent can add items with `pmos item add`. Since D98 its items are live at once: they show in the Tree and on the Board and count in the progress, with no Keep card. Each item names the agent that added it, so you can withdraw it if you do not want it. A Keep line from before D98 has no effect any more and is not flagged.
99
99
 
100
- The Tree shows one card for each agent session, named by the session: "Agent · sess-3 proposed 9 items on 5 Oct." Today shows the same card in its needs-you list, and the Today count in the navigation counts it.
101
-
102
- - **Keep** keeps all the items of the card. Only you can keep items, and only from the workspace page. There is no command for it.
103
- - **Withdraw all** withdraws all the items of the card, with Undo.
104
-
105
- If the agent adds more items after the card shows, they stay proposed. The card shows the new count when it refreshes.
106
-
107
- Today also shows two other breakdown cards:
100
+ Today shows two breakdown cards:
108
101
 
109
102
  - **no evidence**: an agent marked an item Done without evidence, such as a commit or a pull request. Open the item and add the evidence, or ask the agent to run its move again with `--evidence`.
110
103
  - **check**: a line in `plan-items.jsonl` that has no effect, for example a Keep that the workspace page did not write.
@@ -133,7 +126,7 @@ Each line in the file names who wrote it. The workspace shows it as:
133
126
 
134
127
  The file records an agent with its full session token, for example `agent:sess-3.0a1b2c3d`. The workspace page gets only `agent:sess-3` and shows "agent · sess-3".
135
128
 
136
- An agent cannot keep its own items. An agent can withdraw only the items that it added; the items you added, only you can withdraw.
129
+ An agent can change, move and withdraw any item, the items you added included. Each of those lines names the agent, so the history of the item shows who did what.
137
130
 
138
131
  A terminal that the workspace starts for an agent is marked as that agent's, so its commands are recorded as the agent even when they run at a terminal. Your own shell terminals are not marked, so their commands are recorded as you.
139
132
 
@@ -67,7 +67,7 @@ On a desktop the workspace is one frame. [Layout](layout.md) explains each part.
67
67
  - [The Initiative Driver: drafts the agent files for you](initiative-driver.md): when the driver runs, the unblock sweep, the limits, Keep, Send back and Drop, the board modes, and `pmos driver`.
68
68
  - [Core documents: what each level keeps](core-documents.md): the core documents of the portfolio, a board and an initiative, their states, how PMOS drafts them, Issue it, and `pmos coredoc write`.
69
69
  - [The Horizon scan: the agent looks outside your initiatives](horizon-scan.md): how often it runs, the watch list you keep, what a scan does, where findings land, what it cannot do, and `pmos scan`.
70
- - [PM-only acts: what only you can do](pm-only-acts.md): which acts are yours, how the workspace checks that a press comes from your page or your terminal, and what to do when one is refused.
70
+ - [PM-only acts: what you and your agents can do](pm-only-acts.md): the acts that were yours alone, how the workspace checks that a press comes from your page, your terminal or an agent session, how an agent's act is logged under its name (D98), and what to do when a press is refused.
71
71
  - [PM-only lines: how the workspace checks your acts](pm-only-lines.md): how each act is recorded, what the Today card "A PM-only line is not attested" means, and the grants for a bulk lifecycle change and a Release.
72
72
  - [Breakdown › Timeline](timeline.md): an initiative's items on a time axis, split by stage, with milestones, today, and the at-risk flag when an item starts before its predecessor ends.
73
73
  - [Initiatives › Timeline](initiatives-timeline.md): when each initiative runs, one row per initiative, and how to reorder rows by their grip.
@@ -66,7 +66,7 @@ Open proposals appear in Needs you as one row for each initiative or task: "Agen
66
66
  - **Send back** needs a note. The note starts a new run. It counts as a correction.
67
67
  - **Drop** closes the proposal. It counts as a correction.
68
68
 
69
- The agent cannot keep, send back, drop, pause or change the mode. Those acts need your page or your terminal.
69
+ An agent session can keep, send back, drop, pause or change the mode too, with no typed confirmation (D98). Each line names the agent, so you see who decided.
70
70
 
71
71
  ## Board modes
72
72
 
@@ -75,7 +75,7 @@ Only you can move an initiative into Now. The workspace writes the line as yours
75
75
  ### Unconfirmed, proposed and dormant
76
76
 
77
77
  - **unconfirmed.** An initiative that reads Now only because it is active, with no line from you. Confirm it in the Cycle review.
78
- - **proposed.** An agent proposed a move. It changes nothing until you keep it in the Cycle review.
78
+ - **proposed.** A move an agent proposed before D98. It changes nothing until you or an agent keep it in the Cycle review. Since D98 an agent's move applies at once and names the agent.
79
79
  - **Dormant.** An initiative with no activity for a long time. Press the dormant line under Later to show them.
80
80
  - **No record yet.** A PRD, rubric or prototype folder that no initiative record points at. Press the "with no record" line under Later to show them. In List they are the last group. Press one to open its PRD. Only a record can be placed, so these have no menu.
81
81
 
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  type: Guide
3
- title: "PM-only acts: what only you can do"
4
- description: "Which acts only the PM can do, how the workspace checks that a press comes from your page or your terminal, what to do when a press is refused, and what an agent can and cannot write."
5
- timestamp: 2026-10-05
3
+ title: "PM-only acts: what you and your agents can do"
4
+ description: "The acts that were only the PM's, how the workspace checks that a press comes from your page, your terminal or an agent session, what to do when a press is refused, and how every agent act is logged under the agent's name (D98)."
5
+ timestamp: 2026-10-24
6
6
  ---
7
7
 
8
- # PM-only acts: what only you can do
8
+ # PM-only acts: what you and your agents can do
9
9
 
10
- Some acts decide what the work is and when it is done. Only you, the PM, can do them. An agent cannot do them, even when you ask it to in a chat.
10
+ Some acts decide what the work is and when it is done. Since [D98](/okf/products/pmos/adr/d98-agents-finish-asked-work.md), an agent that you asked to do a piece of work does these acts too, so it can finish the work without stopping to ask you. It does not ask you to type anything. Every line it writes names the agent (`by: agent:sess-…`, or `agent:unknown`), so you see who acted, and you can move it back, withdraw it or return the run.
11
11
 
12
12
  ## The acts
13
13
 
@@ -18,14 +18,15 @@ Some acts decide what the work is and when it is done. Only you, the PM, can do
18
18
  | Approve a contract | Not on the page yet. In your own terminal, run `node scripts/log-run.js` with `PM_approved: true` in the contract. |
19
19
  | Record a D60 disposition of a prototype | Not on the page yet. A later run adds it. |
20
20
  | Hold, close, cancel or reopen an initiative | The initiative's lifecycle menu |
21
- | Keep the items an agent proposed | The Keep card in the Breakdown or on Today |
22
- | Move an initiative to Now, or adopt an agent's proposal to move it | Initiatives (arrives with the Initiatives screen) |
21
+ | Move an initiative to Now, or adopt an open proposal to move it | Initiatives (arrives with the Initiatives screen) |
23
22
  | Change the anchor (`parent_kr`) of an initiative | The document editor, or the confirm step of Add a repository |
24
23
  | Bind a session to an initiative | The session's initiative menu, or + session on an initiative |
25
24
  | Issue a report | Reports (arrives in Run 5) |
26
25
  | Release a batch of factory work | The Board (arrives in Run 4) |
27
26
 
28
- Each line that the workspace server writes for one of these acts says who wrote it (`by: pm:wawan`) and how (`via: ui` from the page, `via: cli` from a terminal).
27
+ Each line that the workspace server writes for one of these acts says who wrote it (`by: pm:wawan`, or the agent's `by`) and how (`via: ui` from the page, `via: cli` from a terminal).
28
+
29
+ An agent's items in the Breakdown are live as soon as it adds them, so there is no Keep card any more.
29
30
 
30
31
  ## How the workspace checks a press
31
32
 
@@ -35,6 +36,9 @@ Each press from the page sends three things: the page's own address (the Origin)
35
36
 
36
37
  - the request has no Origin, or the Origin is a different site or a different port;
37
38
  - the launch value is missing or wrong.
39
+
40
+ A press that carries an agent session's `x-pmos-session` value passes these checks like yours, and its line names that agent, never you.
41
+
38
42
  The server also refuses a request that sets a field that only the server sets, for example `by`, `via`, `at` or `grant`.
39
43
 
40
44
  A press that is refused writes nothing.
@@ -49,14 +53,9 @@ If a press shows "the workspace restarted, so reload the page, then try again",
49
53
 
50
54
  ## Acts from a terminal
51
55
 
52
- A command that does a PM-only act asks you to type a word first, usually the initiative id. Type the id exactly, then press Enter. If the text does not match, the command writes nothing.
53
-
54
- The command refuses the act when:
55
-
56
- - it runs inside an agent session (the session has a `PMOS_SESSION` value);
57
- - it does not run in an interactive terminal, for example in a pipe or a script.
56
+ A command that does one of these acts asks you, at your own terminal, to type a word first, usually the initiative id. Type the id exactly, then press Enter. If the text does not match, the command writes nothing.
58
57
 
59
- Any other command that runs without a terminal is recorded as `agent:unknown`, not as you.
58
+ Inside an agent session (the session has a `PMOS_SESSION` value) the command does the act without asking, and records the session as `by`. A command that runs without a terminal, for example in a pipe or a script, is recorded as `agent:unknown`, not as you.
60
59
 
61
60
  ## Change many initiatives at once
62
61
 
@@ -66,18 +65,17 @@ You cannot move initiatives to Now or change an anchor in one press for many ini
66
65
 
67
66
  ## What an agent can write
68
67
 
69
- An agent can:
68
+ An agent can do every act in the table above, and it can:
70
69
 
71
- - add items, and order, date, start and finish the items of its session (with evidence);
72
- - move an item that you handed to that session with Hand to agent. It cannot move any other item that you own;
70
+ - add items, which are live at once, and change, move, block and withdraw any item, yours included;
73
71
  - create an initiative (it lands in Later), write report text, and record a measurement with a source;
74
- - propose a change for you to keep or drop.
72
+ - place an initiative in Now, Next or Later; the placement applies at once.
75
73
 
76
- An agent cannot:
74
+ Every line it writes names the agent. Some things stay yours:
77
75
 
78
- - do any act in the table above;
79
- - change the title, stage, dates or owner of an item that you own (owner "you"), or mark it blocked. It asks you instead;
80
- - withdraw an item that it did not add.
76
+ - An agent's acceptance is not marked as yours and carries no `pm_label`; that label is your calibration answer.
77
+ - A run does not answer its own permission request.
78
+ - Merging and publishing follow their own rules (D93, D94), and the factory's propose-only rule (D65) is unchanged.
81
79
 
82
80
  ## What this does not prevent
83
81
 
@@ -86,4 +84,5 @@ A program that runs as your own user can read the page, as your browser does, an
86
84
  Some paths are still open:
87
85
 
88
86
  - A program can connect to the terminal socket without the launch value. It cannot bind a session to an initiative, but it can start a session and type into any terminal, including your own shell. A `pmos` command that it types in your shell runs as you.
89
- - An agent's `pmos item` commands are not yet checked against the initiative that its session is bound to, and a session value that names no session is not refused. The repository's checks find the other lines later, when they reach a pull request. See [Breakdown](breakdown.md) for the items and the Keep card.
87
+ - An agent's `pmos item` commands are not yet checked against the initiative that its session is bound to, and a session value that names no session is recorded as `agent:unknown`.
88
+ - An undo is not automatic. You undo an agent's act with an ordinary act of your own: move the item back, withdraw it, or return the run. See [Breakdown](breakdown.md) for the items and the Keep card.
@@ -155,7 +155,7 @@ Today puts the cards in this order. Within a kind, the cards keep a fixed order,
155
155
  | 2. A session is waiting | A session in a terminal asked you a question and waits for the answer. | Open |
156
156
  | 3. A step you returned | You returned an acceptance and the initiative has not been accepted since. | Open |
157
157
  | 4. Work to check | An item is in Review, or an item is Done with no evidence. | Open |
158
- | 5. Keep an agent breakdown | An agent proposed items. They count in no progress until you keep them. | Keep |
158
+ | 5. Keep an agent breakdown | Retired by D98: an agent's items are live at once, so this card no longer shows. | — |
159
159
  | 6. A triaged capture | A capture was triaged and waits for you to add it or dismiss it. | Open |
160
160
  | 7. Cycle review | The cycle review is due. You confirm what is in Now, or move it. | Open |
161
161
  | 8. Needs repair | A schedule left no output, a line from the PM has no attestation, or a record has no anchor. Today shows the card until it is fixed. | Open |