create-pmos 0.763.0 → 0.765.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 (46) hide show
  1. package/package.json +51 -45
  2. package/payload/AGENTS.md +1 -1
  3. package/payload/KIT-VERSION +1 -1
  4. package/payload/planning/evals/eval-calibration.md +1 -1
  5. package/payload/planning/okrs/health-budgets.md +1 -1
  6. package/payload/state/discoveries.md +1 -1
  7. package/workspace/changelog.json +50 -0
  8. package/workspace/chat-asks-test.js +1 -1
  9. package/workspace/guide/breakdown.md +1 -1
  10. package/workspace/guide/cli.md +8 -0
  11. package/workspace/guide/home.md +1 -1
  12. package/workspace/guide/initiatives-and-next-steps.md +2 -2
  13. package/workspace/lib/briefing-premium-agent.js +4 -1
  14. package/workspace/lib/cos-chat.js +1 -1
  15. package/workspace/lib/engine/boards.js +9 -2
  16. package/workspace/lib/initiative-chat.js +1 -1
  17. package/workspace/lib/pmos-verbs.js +1 -1
  18. package/workspace/lib/program-chat.js +11 -6
  19. package/workspace/lib/program-cli.js +150 -2
  20. package/workspace/lib/programs.js +2 -1
  21. package/workspace/lib/question-batch.js +6 -2
  22. package/workspace/lib/routes-boards.js +62 -5
  23. package/workspace/lib/routes-proposals.js +15 -1
  24. package/workspace/lib/source-guard.js +10 -1
  25. package/workspace/lib/task-cli.js +45 -12
  26. package/workspace/lib/task-describe.js +228 -0
  27. package/workspace/lib/task-store.js +2 -2
  28. package/workspace/package-lock.json +2 -2
  29. package/workspace/package.json +1 -1
  30. package/workspace/premium-chat-viewer-test.js +3 -0
  31. package/workspace/premium-vw-jira-test.js +1 -1
  32. package/workspace/public/pm/bd-prog-panel.js +2 -0
  33. package/workspace/public/pm/cozy-home.css +1 -0
  34. package/workspace/public/pm/cozy-popup.js +2 -2
  35. package/workspace/public/pm/cozy-task-pop.css +10 -0
  36. package/workspace/public/pm/cozy-task-pop.js +46 -2
  37. package/workspace/public/pm/home-app.js +1 -1
  38. package/workspace/public/pm/home-chat.js +16 -6
  39. package/workspace/public/pm/home-ini.js +2 -1
  40. package/workspace/public/pm/library-open.js +1 -0
  41. package/workspace/public/pm/page-chat.js +7 -2
  42. package/workspace/public/pm/premium-board.js +2 -1
  43. package/workspace/public/pm/task-card.js +2 -0
  44. package/workspace/public/pm/vw-ds.js +38 -0
  45. package/workspace/test-lists/chat-subtasks.json +9 -0
  46. package/workspace/test-lists/task-descriptions.json +9 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.763.0",
3
+ "version": "0.765.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": {
@@ -33,6 +33,56 @@
33
33
  "audit"
34
34
  ],
35
35
  "pmosChanges": [
36
+ {
37
+ "v": "0.765.0",
38
+ "at": "2026-11-24T07:12:50.601Z",
39
+ "f": 4,
40
+ "prs": [
41
+ {
42
+ "n": 1726,
43
+ "t": "Chat creates subtasks — pmos task add/set take --parent with an Undo line",
44
+ "s": "Chat creates subtasks — pmos task add/set take --parent with an Undo line",
45
+ "k": "fix"
46
+ },
47
+ {
48
+ "n": 1721,
49
+ "t": "A document's chat sends, and a send that fails says why",
50
+ "s": "A document's chat sends, and a send that fails says why",
51
+ "k": "fix"
52
+ },
53
+ {
54
+ "n": 1724,
55
+ "t": "A chat saves program changes, and the Board shows them at once",
56
+ "s": "A chat saves program changes, and the Board shows them at once",
57
+ "k": "fix"
58
+ },
59
+ {
60
+ "n": 1725,
61
+ "t": "An initiative opened from Today opens in the full popup again",
62
+ "s": "An initiative opened from Today opens in the full popup again",
63
+ "k": "fix"
64
+ },
65
+ {
66
+ "n": 1722,
67
+ "t": "Every task has a description PMOS writes",
68
+ "s": "Every task has a description PMOS writes",
69
+ "k": "new"
70
+ }
71
+ ]
72
+ },
73
+ {
74
+ "v": "0.764.0",
75
+ "at": "2026-11-24T06:08:25.279Z",
76
+ "f": 4,
77
+ "prs": [
78
+ {
79
+ "n": 1720,
80
+ "t": "A risky change on shared text only asks the owner",
81
+ "s": "A risky change on shared text only asks the owner",
82
+ "k": "new"
83
+ }
84
+ ]
85
+ },
36
86
  {
37
87
  "v": "0.763.0",
38
88
  "at": "2026-11-24T05:36:34.102Z",
@@ -326,50 +376,6 @@
326
376
  "k": "new"
327
377
  }
328
378
  ]
329
- },
330
- {
331
- "v": "0.745.0",
332
- "at": "2026-11-23T10:30:13.712Z",
333
- "f": 4,
334
- "prs": [
335
- {
336
- "n": 1659,
337
- "t": "Start a chat about a product from Work, and a program's chat answers its first message",
338
- "s": "Start a chat about a product from Work, and a program's chat answers its first message",
339
- "k": "fix"
340
- },
341
- {
342
- "n": 1669,
343
- "t": "A date suggestion names the days it moves work to",
344
- "s": "A date suggestion names the days it moves work to",
345
- "k": "fix"
346
- }
347
- ]
348
- },
349
- {
350
- "v": "0.744.0",
351
- "at": "2026-11-23T10:01:07.752Z",
352
- "f": 4,
353
- "prs": [
354
- {
355
- "n": 1664,
356
- "t": "Approvals, card picks, drops and parks write the decision journal, with Undo (A475)",
357
- "s": "Approvals, card picks, drops and parks write the decision journal, with Undo (A475)",
358
- "k": "new"
359
- },
360
- {
361
- "n": 1665,
362
- "t": "Every merged job keeps a PR and a cost; the verifier reaches every run; Library keys tested by pressing them (A484, A9, A437)",
363
- "s": "Every merged job keeps a PR and a cost; the verifier reaches every run; Library keys tested by pressing them (A484, A9, A437)",
364
- "k": "fix"
365
- },
366
- {
367
- "n": 1659,
368
- "t": "Start a chat about a product from Work, and a program's chat answers its first message",
369
- "s": "Start a chat about a product from Work, and a program's chat answers its first message",
370
- "k": "fix"
371
- }
372
- ]
373
379
  }
374
380
  ]
375
381
  }
package/payload/AGENTS.md CHANGED
@@ -48,7 +48,7 @@ It refuses frontmatter, fenced and indented code, table rows, headings, delibera
48
48
  | `log_friction` / `log_discovery` | append to `pmos/state/discoveries.md` (ISO date, `#friction` tag where applicable) |
49
49
  | `get_agent_runs` / `get_friction` | read those same files (your episodic memory — consult before contracting) |
50
50
 
51
- **Programs** (the level above initiatives, across products) are not an initiative key. A program is a line in `pmos/state/programs.jsonl`: `{"kind":"program",…}` is the charter and `{"kind":"member","program":"<id>","initiative":"<id>"}` puts an initiative in it. Never add `kind`, `program`, `programme`, `parent_program` or `parent_programme` to an initiative record: nothing reads them. You do not write `programs.jsonl`: the PM makes a program on the Board (an initiative's ⋯ → **Turn into a program**, or + → **New program**).
51
+ **Programs** (the level above initiatives, across products) are not an initiative key. A program is a line in `pmos/state/programs.jsonl`: `{"kind":"program",…}` is the charter and `{"kind":"member","program":"<id>","initiative":"<id>"}` puts an initiative in it. Never add `kind`, `program`, `programme`, `parent_program` or `parent_programme` to an initiative record: nothing reads them. Never write `programs.jsonl` by hand. When the PM asks for a program change, or says yes to one you drafted, make it with `pmos program` (`new`, `charter`, `join`, `leave`, `milestone`, `check`, `task`, `order`, `archive`; `pmos program help`) and give the Undo it prints. The Board shows it when your turn ends.
52
52
 
53
53
  State files are **append-only**: never rewrite or delete an existing line or initiative record; correct by appending. When a vendored skill names a hosted tool, apply this table — the skill bodies are single-sourced from the PMOS kernel and are not forked for file mode.
54
54
 
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@ba67a30c
1
+ kernel-source: pmos@5bf77c3b
2
2
  assembled: 2026-11-24
3
3
  mode: vendor
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Eval calibration log"
4
4
  description: "Append-only record of every PM override of an evaluator verdict."
5
- generated: {by: process:create-pmos, at: "2026-11-24T05:36:30Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-24T07:12:47Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Health budgets"
4
4
  description: "Closed registry of health-budget anchors (D59), edited only by the PM."
5
- generated: {by: process:create-pmos, at: "2026-11-24T05:36:30Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-24T07:12:47Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Discoveries and friction log"
4
4
  description: "Append-only record of what runs discovered and where the process rubbed."
5
- generated: {by: process:create-pmos, at: "2026-11-24T05:36:30Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-24T07:12:47Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,4 +1,54 @@
1
1
  [
2
+ {
3
+ "v": "0.765.0",
4
+ "at": "2026-11-24T07:12:50.601Z",
5
+ "f": 4,
6
+ "prs": [
7
+ {
8
+ "n": 1726,
9
+ "t": "Chat creates subtasks — pmos task add/set take --parent with an Undo line",
10
+ "s": "Chat creates subtasks — pmos task add/set take --parent with an Undo line",
11
+ "k": "fix"
12
+ },
13
+ {
14
+ "n": 1721,
15
+ "t": "A document's chat sends, and a send that fails says why",
16
+ "s": "A document's chat sends, and a send that fails says why",
17
+ "k": "fix"
18
+ },
19
+ {
20
+ "n": 1724,
21
+ "t": "A chat saves program changes, and the Board shows them at once",
22
+ "s": "A chat saves program changes, and the Board shows them at once",
23
+ "k": "fix"
24
+ },
25
+ {
26
+ "n": 1725,
27
+ "t": "An initiative opened from Today opens in the full popup again",
28
+ "s": "An initiative opened from Today opens in the full popup again",
29
+ "k": "fix"
30
+ },
31
+ {
32
+ "n": 1722,
33
+ "t": "Every task has a description PMOS writes",
34
+ "s": "Every task has a description PMOS writes",
35
+ "k": "new"
36
+ }
37
+ ]
38
+ },
39
+ {
40
+ "v": "0.764.0",
41
+ "at": "2026-11-24T06:08:25.279Z",
42
+ "f": 4,
43
+ "prs": [
44
+ {
45
+ "n": 1720,
46
+ "t": "A risky change on shared text only asks the owner",
47
+ "s": "A risky change on shared text only asks the owner",
48
+ "k": "new"
49
+ }
50
+ ]
51
+ },
2
52
  {
3
53
  "v": "0.763.0",
4
54
  "at": "2026-11-24T05:36:34.102Z",
@@ -51,7 +51,7 @@ const STEPS = [{ text: 'Calendar', state: 'done' }, { text: 'Mail', state: 'done
51
51
  await page.route('**/api/briefing-premium/**', (r) => { const rq = r.request(); if (rq.method() !== 'GET') posts.push({ path: new URL(rq.url()).pathname, body: JSON.parse(rq.postData() || '{}') }); r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, turns: [], working: false, session: 's-asks' }) }); });
52
52
  await page.route('**/api/sessions/conversation**', (r) => r.fulfill({ json: { ok: true, ...st.conv } }));
53
53
  await page.goto(BASE + '/premium-chat.html?about=' + encodeURIComponent(KEY), { waitUntil: 'domcontentloaded' });
54
- await page.waitForFunction(() => { const i = document.querySelector('#hmIn'); return !!i && !!i.offsetParent; }, null, { timeout: 15000 }); // on a desktop the chat is the popup's: wait until it shows
54
+ await page.waitForFunction(() => { const i = document.querySelector('#hmIn'); return !!i && !!i.offsetParent; }, null, { timeout: 45000 }); // on a desktop the chat is the popup's: wait until it shows (a cold CI runner took over 15 s on the first open, #1715 and #1720)
55
55
  return { page, ctx, errors, posts, st };
56
56
  };
57
57
  const card = (page, kind) => until(async () => page.evaluate((k) => { const c = document.querySelector(`#hmLog .hm-askk[data-ask-kind="${k}"]`); if (!c) return null; const w = c.closest('.hm-askw, .hm-askc');
@@ -30,7 +30,7 @@ When a stage has 8 or more tasks and several of them share a go-live date, PMOS
30
30
 
31
31
  A parent shows a fold arrow and "n of m done". Its dates are the earliest start and the latest end of the tasks under it. A parent with more than five subtasks is folded until you open it. When you tick a parent that has open subtasks, PMOS asks once if it must tick them too.
32
32
 
33
- In the terminal, `pmos task set <task> --parent <task>` sets the parent, and `--parent none` moves the task back to the top level. `pmos task list` shows each subtask under its parent.
33
+ In the terminal or the initiative chat, `pmos task set <task> [<task> …] --parent <task>` puts one or more tasks under a parent, and `--parent none` moves them back to the top level. The answer prints an `Undo:` line that puts each task back under the parent it had. `pmos task add <initiative> "<title>" --parent <task>` adds a new subtask. `pmos task list` shows each subtask under its parent. Ask the chat to group a long stage into task and subtask, and it makes the parent tasks and moves the tasks under them; every task keeps its state.
34
34
 
35
35
  ## Sprint and priority
36
36
 
@@ -559,7 +559,9 @@ An agent adds and closes tasks when you ask, so you do not have to find the task
559
559
  - `pmos task list <initiative>` lists the initiative's open tasks (To do and In progress) with their ids. `--all` adds the Done, Won't do and Archived tasks.
560
560
  - `pmos task state <task> [<task> …] --to <state>` sets the state of one or more tasks: To do, In progress, Done, Won't do or Archived. `--why` adds the reason, and for Done it is the evidence you read. Each change writes the same line as the page's press, under the agent's name. Won't do on a breakdown item withdraws it, and it cannot come back.
561
561
  - `pmos task set <task> [<task> …] --stage <stage>` puts one or more tasks under a stage of the initiative's workflow, by the stage's key or name. `--stage none` takes them out of every stage. The Tasks section groups the tasks by these stages. A task's stage is its place in the plan: it does not change the task's state, and it does not move the initiative. `set` also takes `--due`, `--start`, `--owner` and `--notes`; `--due none` and `--start none` clear a day.
562
+ - `pmos task set <task> [<task> …] --parent <task>` puts tasks under a parent task as subtasks; `--parent none` moves them back to the top level. A loop or a parent that does not exist is refused. The answer prints an `Undo:` line, one command per old parent. `pmos task add … --parent <task>` adds a new task as a subtask.
562
563
  - `pmos task remove <task> [<task> …]` deletes a task that was added by mistake, such as a placeholder or a duplicate. The task goes from every list, and the Undo on the page brings it back. For work that stopped, use Archived or Won't do instead. A breakdown item cannot be deleted: set it to Won't do.
564
+ - `pmos task describe <task>` prints the task's description and its sources. `pmos task describe <task> "<text>"` writes it: what the task is, why it matters, and when it is done. `none` clears it. The task page shows it at once, with Undo. When a task has no description, PMOS writes one by itself from the initiative's record, PRD and plan documents, and names its sources. A Jira ticket keeps its description in Jira.
563
565
  - `pmos task link <from> <to>` makes `<to>` wait on `<from>`. `--type` sets how they wait: `fs` (start after it finishes, the default), `ss` (start when it starts), `ff` (finish when it finishes) or `sf` (finish when it starts). `--lag` adds days, or takes them away with a negative number. Make a link only when the PM asks for it. To suggest a link, add `--propose --why "<reason>"`: the link shows under the blue ✦ in the Tasks header, and the PM approves it or drops it. A link that loops back to a task is refused.
564
566
  - `pmos task unlink <from> <to>` removes the link. The dates stay as they are.
565
567
 
@@ -626,6 +628,12 @@ The program line moves a program through four stations. Each station has an exit
626
628
 
627
629
  An initiative with no plan end is "can't tell". PMOS never guesses its date.
628
630
 
631
+ - `pmos program new "<title>"` makes a program in this repository. `--from <initiative>` turns that initiative into the program, and it joins. `--goal` and `--target` set the card.
632
+ - `pmos program join <id> <initiative>` puts an initiative of this repository in a program. It leaves any other program. `pmos program leave <id> <initiative>` takes it out, and off the milestones that waited on it.
633
+ - `pmos program milestone <id> add "<name>" --date YYYY-MM-DD` adds a milestone (`--waits <initiative>,…` for the initiatives it waits on). `move <milestone> --date`, `rename <milestone> "<name>"` and `drop <milestone>` change one. `pmos program check <id> <milestone>` marks a milestone that waits on no initiative as done.
634
+ - `pmos program task <id> "<title>"` adds a program task (`--owner`, `--due`, `--key` to change one). `pmos program task-done <id> <key>` marks it done.
635
+ - `pmos program archive <id>` takes a program off the Board. `pmos program unarchive <id>` puts it back.
636
+ - Each of these writes the line the Board's own press writes, prints the command that undoes it, and shows on the Board when the chat turn ends.
629
637
  - `pmos program line [<id>]` shows each open program: its station, what is missing, the next move and the forecast against the target. A program across several products gets one forecast from all of them. When two products need one team in Build and the team has no free place, PMOS shows one decision row with a recommendation: the initiative whose program has the earlier target goes first. It reads every product on this computer and writes nothing. Add `--json` for the whole answer.
630
638
  - `pmos program draft <id>` files PMOS's milestone drafts as suggestions. The program shows them with Keep and Decline. Nothing changes until you keep one.
631
639
  - `pmos program order <id> [<id>,<id>,…]` saves the order of the program's initiatives. With no list, it saves the order PMOS proposes. `--clear` goes back to A to Z. It prints the command that undoes it.
@@ -220,7 +220,7 @@ There is no My work page. The list on Home is your list:
220
220
  - **Recording.** Record a note now, with no calendar event.
221
221
  - **Initiative.** The Board opens with **New initiative**, in the open product.
222
222
  - **Sessions.** A session row names its agent. The coloured dot beside it is its state: blue waits on you, amber may be blocked, green is running. A session PMOS started itself (a skill or a background job) shows on Home only while it works or asks you something. Once it finishes its prompt, it leaves the list. On an initiative's page, a session that waits on you shows once, under **Needs you**, not again under **Sessions**. **Finished sessions** does not list an old run of a chat that is open again.
223
- - **One chat box.** Every conversation has the same box: **+** (attach a file, notes, the terminal, and **Link to an initiative** for a loose chat), **/** for commands, **@** inside an initiative, the To or In chip, the mic, and Send. A chat opens at its newest message.
223
+ - **One chat box.** Every conversation has the same box: **+** (attach a file, notes, the terminal, and **Link to an initiative** for a loose chat), **/** for commands, **@** inside an initiative, the To or In chip, the mic, and Send. A chat opens at its newest message. If a message cannot be sent, a red **Not sent:** line under the box says why, and your words and files stay in the box. The chat beside a document (Library, an initiative's artefacts) is about that document and reads its file.
224
224
  - **While PMOS works.** A line at the top of the chat shows what PMOS is trying to do. If PMOS keeps a to-do list, the line shows the to-do in progress and how many are done, for example **2 of 5 done**. Tap the line to see the full list. If PMOS has no to-do list, the line shows PMOS's newest one-line status and the time since your message. The line never shows raw commands. To see the commands, tap the terminal icon.
225
225
  - **A session's terminal.** **Watch its terminal** in **+**, or a session row such as **Claude sign-in**, opens the session's terminal in the Viewer. While the session runs, it is a real terminal: type in it to answer PMOS or paste a code. It fills the Viewer and fits its lines again when you resize the Viewer or the window. The chat goes on showing every answer while the terminal is open and after you close it: the terminal is a second view of the same session. When the session has ended, the Viewer shows it read only and says so.
226
226
  - **Setting up your first project opens by itself** until a registered folder holds an initiative or setup has finished. The `PMOS` folder that the one-line installer makes holds no initiative yet, so a new user who opens PMOS from the Start menu or the Dock still gets the setup conversation, not an empty Home.
@@ -2,12 +2,12 @@
2
2
  type: Guide
3
3
  title: "Initiatives: the Roadmap, next steps, the Driver and done"
4
4
  description: "The ranked list of initiatives, how PMOS works out the next steps, the Initiative Driver, and integrated work."
5
- timestamp: 2026-11-23
5
+ timestamp: 2026-11-24
6
6
  ---
7
7
 
8
8
  # Initiatives: the Roadmap, next steps, the Driver and done
9
9
 
10
- Open an initiative from Home's list. It opens as a page in the Viewer. Its stage card shows the stage, how many of its steps are done, and the steps still open: yours first, then a running agent, then late or blocked steps, then the ones waiting on someone. The last node is the next stage. [Home](home.md) explains the initiative's page.
10
+ Open an initiative from Home's list. It opens as a page in the Viewer. On a computer, an initiative that you open from Today, Work or a link always opens in the full popup (Overview, The case, Stages, Work breakdown). The older page with the stage card and the Experiment is ⋯ › **Every part**. Its stage card shows the stage, how many of its steps are done, and the steps still open: yours first, then a running agent, then late or blocked steps, then the ones waiting on someone. The last node is the next stage. [Home](home.md) explains the initiative's page.
11
11
 
12
12
  This page explains the rules behind those steps: where they come from, who owns each one, and what an agent session started on a step may do. The console drew a **prepare** and **go** control under each step, and it was removed. The same plan can still be prepared, approved and started with `pmos proactive prepare`, under the same rules (see [Today and the proactive engine](proactive-engine.md)).
13
13
 
@@ -108,8 +108,11 @@ function popRow(c) {
108
108
  /** A chat that may start from what the page says it is about, when the server's model has no row for it: an initiative (init:), and a
109
109
  * program or a whole product (board:, bug 2026-11-23: the Board model holds initiatives only, so a program's or a product's chat answered
110
110
  * 404 and the first message went nowhere). A board: chat needs the page's words; with none it still needs a row. */
111
+ /** A chat the server's models have no row for, that still starts: an initiative's (it reads its own record), a program's or a product's with the
112
+ * page's words, and a document's (bug 2026-11-24: a Library or artefact document's chat, doc:doc:<ws>:<path>, matched no row, so its first
113
+ * message failed with "that row is not on the page" and the popup's chat did nothing). The page's words, when it sends them, name the file. */
111
114
  function scopedByContext(key, context) {
112
- return /^init:/.test(String(key)) || (/^board:/.test(String(key)) && typeof context === 'string' && !!context.trim());
115
+ return /^(init|doc):/.test(String(key)) || (/^board:/.test(String(key)) && typeof context === 'string' && !!context.trim());
113
116
  }
114
117
  function contextRow(key, context) {
115
118
  const say = typeof context === 'string' ? clip(context, 600) : '';
@@ -54,7 +54,7 @@ const RULE = [
54
54
  'You are the PM\'s chief of staff in PMOS. This chat has no scope: it reads everything the PM works on.',
55
55
  'Read with the `pmos` commands (pmos today, pmos board, pmos jira, pmos calendar, pmos past, pmos mention, pmos outcomes, pmos metrics, pmos people, pmos docs, pmos report list), never by opening PMOS record files (*.jsonl, planning/ records) yourself: the commands apply the same rules the pages do. Run `pmos <verb> help` when unsure.',
56
56
  'End every answer that rests on a read with one fenced code block with the language tag pmos-src holding one JSON array: [{"name":"Board","fresh":"read now"},{"name":"Jira","fresh":"read 4 min ago"}]. Name each source and how fresh it is; say "not read" for one you could not reach. The page shows it under your answer.',
57
- 'Five kinds of work, one rule each. A read runs at once and asks nothing. Upkeep with one right answer (repair a record, close an ask a decision retired, refresh a stale read) you finish, and say it once. A change inside PMOS (move a date, add a task, set a state, draft a report) is a proposal the PM keeps with ✓: file it with `pmos propose` or `pmos task`, never write it yourself. Anything that leaves PMOS (email, Slack, a Jira comment, an invite) is a draft in the outbox that the PM sends: never send it. A longer job (a report, a grill, an update, a clean-up) runs to its end; stop only for a call that is the PM\'s, and save those for one proposal.',
57
+ 'Five kinds of work, one rule each. A read runs at once and asks nothing. Upkeep with one right answer (repair a record, close an ask a decision retired, refresh a stale read) you finish, and say it once. A change inside PMOS (move a date, add a task, set a state, a program\'s goal) that the PM asked for in their own words, or said yes to, you make at once with its `pmos` command and give the Undo it prints: the page shows it when your turn ends (Wawan 2026-11-23: a chat write always lands). A change the PM did not ask for is a proposal the PM keeps with ✓: file it with `pmos propose` or `pmos task`. Never write a record file by hand. Anything that leaves PMOS (email, Slack, a Jira comment, an invite) is a draft in the outbox that the PM sends: never send it. A longer job (a report, a grill, an update, a clean-up) runs to its end; stop only for a call that is the PM\'s, and save those for one proposal.',
58
58
  'Never from this chat: accept a run, anchor or dispose an initiative, approve a contract, merge a pull request. These stay on the PM-only pages. Say where each one waits and stop.',
59
59
  'You are the chief: the one live session over every Program, Product and Project. Each unit has one owner, a record with a daily brief, never a session; an initiative in a program is the program\'s, else its product\'s. Never ask another session; read the records. `pmos units` lists the units and their briefs. You may run these yourself: `pmos owner brief [<unit>]` (a fresh brief now), `pmos team dispatch --unit <unit>` (the roles for the unit\'s first open initiative), `pmos team pause|resume --unit <unit>` (stop or restart the role runs on a unit). When the same lesson shows in two units, file it with `pmos propose` as a workspace rule the PM keeps or drops.',
60
60
  'Answer in plain sentences, the answer first. Never start with "I can help with".',
@@ -38,6 +38,7 @@
38
38
  * task { task, type: Task|Epic, initiative, title, epic, owner, state, start, due } a PMOS task (or PMOS epic) on the board
39
39
  * task-update { task, state?, start?, due?, title?, owner?, notes?, initiative?, why } a status move, a reschedule, a rename or an edit in the Viewer
40
40
  * ticket-note { ref, notes } the PM's own notes on a Jira ticket (Jira keeps its fields)
41
+ * task-description { task, description, sources? } a task's description (task-descriptions): '' clears; sources [{ path, line, title }]
41
42
  * task-section { task, section } a task's place in the breakdown (one view, feedback batch 6 item 1): the key
42
43
  * of a stage of its initiative's workflow, '' for "Not in a stage". It is the task's place, never its state, and moving a task
43
44
  * never moves the initiative. `task` is a Board task or a breakdown item; the last line wins.
@@ -192,7 +193,9 @@ const KINDS = new Set(['board', 'workflow', 'move', 'assign', 'ask', 'ask-accept
192
193
  // Delete an initiative with its tasks, and its Undo (feedback batch 16 item 5d)
193
194
  'ini-delete', 'ini-restore',
194
195
  // a task's priority, set in the row (initiative inline-sprint-priority): P1, P2 or P3; '' takes it out
195
- 'task-priority']);
196
+ 'task-priority',
197
+ // a task's description (initiative task-descriptions): what it is, why, and when it is done; '' clears it
198
+ 'task-description']);
196
199
  // A task's state is its only stage (Wawan, 2026-10-25): the same five every workflow ends in. An old 'In review' reads as In progress (taskState).
197
200
  const TASK_STATES = Object.freeze(['To do', 'In progress', 'Done', "Won't do", 'Archived']);
198
201
  const taskState = (s) => (s === 'In review' ? 'In progress' : TASK_STATES.includes(s) ? s : null);
@@ -226,6 +229,7 @@ function fold(events) {
226
229
  const parents = new Map(); // task id (or Jira key) → the id of its parent task (subtasks, initiative work-subtasks); the last task-parent line wins
227
230
  const orders = new Map(); // key(initiative, section) → the task ids in the PM's order inside that stage; the last task-order line wins
228
231
  const pins = new Map(); // task id (or Jira key) → true | false: the PM's pin on a milestone; a null line takes it out (the rule again)
232
+ const descriptions = new Map(); // task id → { text, by, at, sources }: the task's description (task-descriptions); the last line wins, '' clears
229
233
  const priorities = new Map(); // task id → 'P1' | 'P2' | 'P3': the PM's priority (inline-sprint-priority); a '' line takes it out, the last line wins
230
234
  const removed = new Map(); // task id → the task a task-remove took out, so a task-restore (Delete's Undo) puts it back
231
235
  const ticketNotes = new Map(); // key(board, Jira key) → the PM's notes on that ticket (the last ticket-note line wins)
@@ -332,6 +336,9 @@ function fold(events) {
332
336
  } else if (e.kind === 'task-order' && typeof e.initiative === 'string' && e.initiative && typeof e.section === 'string' && Array.isArray(e.tasks)) {
333
337
  const ids = e.tasks.filter((x) => typeof x === 'string' && x);
334
338
  if (ids.length) orders.set(key(e.initiative, e.section), ids); else orders.delete(key(e.initiative, e.section));
339
+ } else if (e.kind === 'task-description' && typeof e.task === 'string' && e.task && typeof e.description === 'string') {
340
+ if (e.description) descriptions.set(e.task, { text: e.description, by: e.by || null, at: e.at || null, sources: Array.isArray(e.sources) ? e.sources.filter((x) => x && typeof x.path === 'string').slice(0, 8) : [] });
341
+ else descriptions.delete(e.task);
335
342
  } else if (e.kind === 'task-priority' && typeof e.task === 'string' && e.task && typeof e.priority === 'string' && /^(P[1-3])?$/.test(e.priority)) {
336
343
  if (e.priority) priorities.set(e.task, e.priority); else priorities.delete(e.task);
337
344
  } else if (e.kind === 'task-pin' && typeof e.task === 'string' && e.task && (typeof e.pinned === 'boolean' || e.pinned === null)) {
@@ -415,7 +422,7 @@ function fold(events) {
415
422
  suggestNo.set(e.id, { kind: e.of === 'merge' ? 'merge' : 'split', fp: e.fp, at: e.at || null });
416
423
  }
417
424
  }
418
- return { boards, moves, assigns, asks, stages, iniWorkflows, tasks, removed, sections, parents, orders, milestones, pins, priorities, ticketNotes, ticketDates, epics, archives, deleted, notDup, iniWf, ends, judged, autoOver, ticketMoves, backlogRank, smOps, smUndone, suggestNo, events: list };
425
+ return { boards, moves, assigns, asks, stages, iniWorkflows, tasks, removed, sections, parents, orders, milestones, pins, priorities, descriptions, ticketNotes, ticketDates, epics, archives, deleted, notDup, iniWf, ends, judged, autoOver, ticketMoves, backlogRank, smOps, smUndone, suggestNo, events: list };
419
426
  }
420
427
 
421
428
  /** The stages an initiative runs on a board: its own workflow when one is recorded, else the board's. */
@@ -55,7 +55,7 @@ function rule(info, id) {
55
55
  `The workflow stage is on the initiative: the stage card and the Board show it. \`pmos workflow of ${ini}\` reads it. When the PM asks to move the initiative, run \`pmos workflow move ${ini} --stage <key> --why "<reason>"\`. When the PM asks to change its workflow, run \`pmos workflow switch ${ini} --to <workflow id>\`. Both write what the page's press writes, under your name.`,
56
56
  'There is one kind of task: the ones the PM sees in the initiative\'s Tasks section. The stage card\'s To finish entries and the older breakdown items are tasks too. '
57
57
  + 'A task\'s state is To do, In progress, Done, Won\'t do or Archived. The Tasks section groups the tasks under the stages of this initiative\'s workflow: a task\'s group is its place in the breakdown, never its state. When the PM asks to add, close, group or change a task, '
58
- + `do it yourself, never send the PM to the Board: \`pmos task add ${ini} "<title>" [--stage <stage>] [--due YYYY-MM-DD]\` adds one, \`pmos task list ${ini}\` names them all, \`pmos task state <task> [<task> …] --to "<state>" --why "<what shows it>"\` sets their state and \`pmos task set <task> [<task> …] --stage <stage>|none\` groups them (it also takes --due, --start, --owner, --notes; none clears a date). \`pmos task remove <task> [<task> …]\` deletes a task added by mistake when the PM asks; work that stopped is Archived instead. Never use \`pmos item add\` for new work, and never change tasks to move the initiative.`,
58
+ + `do it yourself, never send the PM to the Board: \`pmos task add ${ini} "<title>" [--stage <stage>] [--due YYYY-MM-DD] [--parent <task>]\` adds one, \`pmos task list ${ini}\` names them all, \`pmos task state <task> [<task> …] --to "<state>" --why "<what shows it>"\` sets their state and \`pmos task set <task> [<task> …] --stage <stage>|none\` groups them (it also takes --due, --start, --owner, --notes; none clears a date). Tasks nest: \`pmos task set <task> [<task> …] --parent <task>|none\` puts tasks under a parent task as subtasks, or back at the top level with none, and \`--parent\` on add makes a new subtask. When the PM asks to group tasks into task and subtask, make the parent tasks and move the tasks under them, keeping each task and its state; never close tasks as Won't do to group them. Tell the PM the Undo line the command prints. \`pmos task describe <task> "<text>"\` writes a task's description (What, Why, Done when) and \`pmos task describe <task>\` reads it. \`pmos task remove <task> [<task> …]\` deletes a task added by mistake when the PM asks; work that stopped is Archived instead. Never use \`pmos item add\` for new work, and never change tasks to move the initiative.`,
59
59
  // batch 31 (Wawan 2026-11-18): the chat offered to rewrite a closed initiative's dates to clear "145 days over"; the count was the page's bug
60
60
  'The "N days over" badge counts from the planned finish (the latest due of its tasks). While the initiative is open it counts to today. Once it is in its workflow\'s last stage (Closed, Done) it counts to when the work really finished: the end of its last Done task, else the day it moved into that stage. On time, the badge goes away and the card says Done with that date; late, it reads "Finished N days late" and that number never grows. '
61
61
  + 'Never change a date, a task or the stage to clear or shorten the badge: the dates are the record. When the PM asks why it shows, explain this rule.',
@@ -92,7 +92,7 @@ const VERBS = Object.freeze({
92
92
  blueprint: Object.freeze({ module: 'blueprint-cli.js', run: null, guide: 'cli.md',
93
93
  help: 'pmos blueprint [list|show|unplaced|check] — every feature of the product with a status worked out from its evidence (pmos blueprint help)' }),
94
94
  program: Object.freeze({ module: 'program-cli.js', run: null, guide: 'cli.md',
95
- help: 'pmos program line|draft|order|capacity|decide|outcome|charter|suggest — the program line (Charter, Sequence, Track, Land) and the milestone suggestions for a program (pmos program help)' }),
95
+ help: 'pmos program new|charter|join|leave|milestone|check|task|archive|line|draft|order|capacity|decide|outcome|suggest — make and change programs from the chat, the program line (Charter, Sequence, Track, Land) and the milestone suggestions (pmos program help)' }),
96
96
  // Not a pm-os-absorb verb (run: null): c3-meet-extension added it through the same table.
97
97
  extension: Object.freeze({ module: 'extension-cli.js', run: null, guide: 'cli.md',
98
98
  help: 'pmos extension — the folder of the Chrome extension for Google Meet, and the three steps to load it' }),
@@ -4,7 +4,8 @@
4
4
  * <state>/programs.jsonl (lib/programs.js), not a key on an initiative record. Without this rule a chat looked for "a program marker", found
5
5
  * none, and invented one (`kind: programme` in the initiative's front matter, children linked by `parent_programme`). Nothing reads those keys.
6
6
  * When a message is about a program, the chat route types it into the session with this rule first, as lib/report-chat.js does for reports.
7
- * Every program write is a page press (lib/routes-programs.js, pm-guard requirePagePress): the chat points the PM at the press and makes none. */
7
+ * The Board's presses go through lib/routes-programs.js (a page press). The chat makes the same writes with `pmos program` (lib/program-cli.js)
8
+ * once the PM asked or said yes, and gives the Undo (initiative chat-saves-to-cards, bug 2026-11-24: "Yes, save it" was refused). */
8
9
 
9
10
  // The first line of every message PMOS wraps. The page reads it to show the PM's turn as typed (public/pm/goal-chat.js shownUser).
10
11
  const MARK = '[PMOS program]';
@@ -18,11 +19,15 @@ const RULE = [
18
19
  'PMOS has programs. A program is the level above initiatives (Program > Initiative > Epic) and can span products. It has no stages of its own: its state, products and stage spread come from its initiatives.',
19
20
  'A program is a record in programs.jsonl in a workspace state folder (pmos/state/ or the workspace state folder), one JSON line each: {"kind":"program",…} is the charter, {"kind":"member","program":"<id>","initiative":"<id>"} puts an initiative in it, and "leave", "task", "check", "order" (the PM\'s sequence of its initiatives) and "archive" lines follow the same pattern. A program id is its title in lower case with dashes, for example project-horizon.',
20
21
  'A program is NOT a key on an initiative. Never add kind, program, programme, parent_program or parent_programme to an initiative record or any front matter: nothing reads them.',
21
- 'You never make, change, join, leave or archive a program yourself, and you never write programs.jsonl: the routes refuse an agent session, and the PM presses on the Board.',
22
- 'Tell the PM which press does what they asked:',
23
- '- An initiative becomes a program (for example "set X as a program"): on the Board, open the initiative, press ⋯, then Turn into a program. The initiative joins the new program, and the program panel opens with a card to sort its tasks.',
24
- '- A new, empty program: on the Board, press + (New), then New program.',
25
- '- To see a program: press its name on the Board, or open /premium-board.html?program=<id>.',
22
+ 'When the PM asks for a program change, or says yes to one you drafted, make it at once with the `pmos program` command below, run in the repository where the program was made (join and leave: where the initiative is). Never write programs.jsonl by hand. Each command prints an Undo: tell the PM the change is saved and give the Undo in one line. The Board shows the change when your turn ends.',
23
+ '- The card\'s Goal, For, target date or owner: pmos program charter <id> --goal "<text>" | --why "<text>" | --target YYYY-MM-DD | --owner "<name>"',
24
+ '- A new program: pmos program new "<title>" [--goal "<text>"] [--target YYYY-MM-DD]. An initiative becomes a program ("set X as a program"): pmos program new "<title>" --from <initiative id>.',
25
+ '- An initiative joins or leaves: pmos program join <id> <initiative> · pmos program leave <id> <initiative>',
26
+ '- Milestones: pmos program milestone <id> add "<name>" --date YYYY-MM-DD [--waits <initiative>,…] · move <milestone id> --date YYYY-MM-DD · rename <milestone id> "<name>" · drop <milestone id>. A milestone that waits on no initiative is marked done with pmos program check <id> <milestone id>.',
27
+ '- Program tasks: pmos program task <id> "<title>" [--owner "<name>"] [--due YYYY-MM-DD] · pmos program task-done <id> <key>',
28
+ '- The order of its initiatives: pmos program order <id> <id>,<id>,… · Archive it: pmos program archive <id> (Undo: pmos program unarchive <id>).',
29
+ 'Run `pmos program help` when unsure. If a command refuses, say what it printed and what would let it through; never send the PM to the Board for a change a command makes.',
30
+ 'To see a program: press its name on the Board, or open /premium-board.html?program=<id>.',
26
31
  'You can read programs.jsonl to answer a question about a program. If the PM asks you to sort a turned program\'s tasks into program, initiative or epic, propose a level for each task in a list and let the PM decide.',
27
32
  ].join('\n');
28
33