create-pmos 0.669.0 → 0.671.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 (32) hide show
  1. package/package.json +20 -14
  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/state/discoveries.md +1 -1
  6. package/workspace/changelog.json +19 -0
  7. package/workspace/guide/agent-capabilities.md +6 -6
  8. package/workspace/guide/claude-proposes.md +1 -1
  9. package/workspace/guide/cli.md +2 -2
  10. package/workspace/guide/cloud.md +2 -2
  11. package/workspace/guide/home.md +2 -2
  12. package/workspace/guide/initiatives-and-next-steps.md +12 -2
  13. package/workspace/guide/layout.md +1 -1
  14. package/workspace/guide/settings-and-switches.md +19 -14
  15. package/workspace/lib/driver-run.js +1 -1
  16. package/workspace/lib/driver.js +4 -1
  17. package/workspace/lib/routes-boards.js +115 -4
  18. package/workspace/lib/source-heal.js +1 -1
  19. package/workspace/lib/tracker-refresh-run.js +162 -0
  20. package/workspace/package-lock.json +2 -2
  21. package/workspace/package.json +1 -1
  22. package/workspace/public/pm/cozy-ev.css +18 -4
  23. package/workspace/public/pm/cozy-evmodel.js +1 -1
  24. package/workspace/public/pm/cozy-pop-work.js +23 -3
  25. package/workspace/public/pm/cozy-settings.js +108 -89
  26. package/workspace/public/pm/next-prompt-ui.js +1 -1
  27. package/workspace/public/pm/pop-work-model.js +7 -5
  28. package/workspace/public/pm/set-ds.js +54 -0
  29. package/workspace/server.js +27 -0
  30. package/workspace/skills/tracker-refresh.skill +2 -0
  31. package/workspace/test-lists/direct-plain-actions.json +11 -0
  32. package/workspace/test-lists/settings-ds-page.json +9 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.669.0",
3
+ "version": "0.671.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,25 @@
33
33
  "audit"
34
34
  ],
35
35
  "pmosChanges": [
36
+ {
37
+ "v": "0.671.0",
38
+ "at": "2026-11-22T05:13:23.112Z",
39
+ "f": 4,
40
+ "prs": [
41
+ {
42
+ "n": 1463,
43
+ "t": "Settings is built from the design system's blocks",
44
+ "s": "Settings is built from the design system's blocks",
45
+ "k": "new"
46
+ },
47
+ {
48
+ "n": 1454,
49
+ "t": "Plain ✓ actions write directly, with Undo and no agent turn",
50
+ "s": "Plain ✓ actions write directly, with Undo and no agent turn",
51
+ "k": "new"
52
+ }
53
+ ]
54
+ },
36
55
  {
37
56
  "v": "0.669.0",
38
57
  "at": "2026-11-22T04:57:48.469Z",
@@ -339,19 +358,6 @@
339
358
  "k": "new"
340
359
  }
341
360
  ]
342
- },
343
- {
344
- "v": "0.637.0",
345
- "at": "2026-11-20T00:56:06.689Z",
346
- "f": 4,
347
- "prs": [
348
- {
349
- "n": 1419,
350
- "t": "The PMOS design system family (brand, charts, ui, documents, slides)",
351
- "s": "The PMOS design system family (brand, charts, ui, documents, slides)",
352
- "k": "new"
353
- }
354
- ]
355
361
  }
356
362
  ]
357
363
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@057b0945
1
+ kernel-source: pmos@6f129580
2
2
  assembled: 2026-11-22
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-22T04:57:45Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-22T05:13:19Z"}
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-22T04:57:45Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-22T05:13:19Z"}
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-22T04:57:45Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-22T05:13:19Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,4 +1,23 @@
1
1
  [
2
+ {
3
+ "v": "0.671.0",
4
+ "at": "2026-11-22T05:13:23.112Z",
5
+ "f": 4,
6
+ "prs": [
7
+ {
8
+ "n": 1463,
9
+ "t": "Settings is built from the design system's blocks",
10
+ "s": "Settings is built from the design system's blocks",
11
+ "k": "new"
12
+ },
13
+ {
14
+ "n": 1454,
15
+ "t": "Plain ✓ actions write directly, with Undo and no agent turn",
16
+ "s": "Plain ✓ actions write directly, with Undo and no agent turn",
17
+ "k": "new"
18
+ }
19
+ ]
20
+ },
2
21
  {
3
22
  "v": "0.669.0",
4
23
  "at": "2026-11-22T04:57:48.469Z",
@@ -24,7 +24,7 @@ This page lists every job, so you know what runs and why. Each row links to the
24
24
  - **One run for each initiative.** A background run never starts on an initiative that another background run is working on. It tries again a minute later.
25
25
  - **Idle work waits for you to step away.** The idle work starts only when you have not used PMOS for 30 minutes, or in the last hour of your working day if you never stepped away. It also waits when 3 background runs are live, inside quiet hours, and at the spending limit.
26
26
  - **Your hours.** Scheduled jobs run inside your working hours and never inside your quiet hours.
27
- - **A spending limit.** PMOS's checks spend at most the monthly credit you set in Settings › PMOS › Checks ($5, $10, $20 or $50). At the limit PMOS pauses. It never spends beyond the limit.
27
+ - **A spending limit.** PMOS's checks spend at most the monthly credit you set in Settings › Checks ($5, $10, $20 or $50). At the limit PMOS pauses. It never spends beyond the limit.
28
28
  - **PMOS learns from your no.** When you give a reason with ✕, or rewrite a grill finding's next step with ✎, the next grill or task check on that initiative reads your last 3 reasons first. It still only proposes.
29
29
  - **Every run is logged.** Each job writes its own ledger in the runtime folder on this computer. Only you see it, and it never goes into a repository.
30
30
 
@@ -78,7 +78,7 @@ When the verifier is running, a change it fails counts like an Undo. Home says o
78
78
  - `pmos ai off` stops every agent job, and every change that would apply by itself. `pmos ai on` starts them again.
79
79
  - `PMOS_AUTONOMY=off` in the environment stops only what applies by itself. Proposals still come.
80
80
  - `pmos driver mode approve` makes every Driver proposal wait for you again.
81
- - The spending limit in Settings › PMOS › Checks holds.
81
+ - The spending limit in Settings › Checks holds.
82
82
 
83
83
  ### Long-running goals
84
84
 
@@ -105,7 +105,7 @@ A loop never sends a message, moves a Jira ticket, merges into a product reposit
105
105
  | [Initiative Driver](initiatives-and-next-steps.md) | An initiative is created, moved or sent back. The unblock sweep runs every 30 minutes in working hours. At most 3 runs at once. | The initiative record, its tasks and its Jira tickets | The Agent strip of the initiative, and Needs you | Board settings › Agent: Off. `PMOS_DRIVER=off` |
106
106
  | [Found elsewhere](claude-proposes.md) | You add an initiative | Drive, Docs, Sheets, Slides, Jira, the calendar, meeting notes, Gmail, Slack and Confluence | The initiative's ✦ | `PMOS_PROPOSE=off` |
107
107
  | [New dates, done and tidy names](claude-proposes.md) | Each morning, and when a date passes | The tasks of the initiative, and the evidence that work happened | The initiative's ✦ | `PMOS_PROPOSE=off` |
108
- | [Grill](claude-proposes.md) | Before an initiative leaves a stage, when a forecast turns at risk, when scope or dates move a lot, and once a month on running work with late work. Also when you write "grill this" in the initiative's chat. | The initiative, your stored research, your meeting notes and the decisions that stand | "PMOS grilled it" under the initiative's ✦ | Settings › PMOS › Checks: Off. `PMOS_GRILL=off` |
108
+ | [Grill](claude-proposes.md) | Before an initiative leaves a stage, when a forecast turns at risk, when scope or dates move a lot, and once a month on running work with late work. Also when you write "grill this" in the initiative's chat. | The initiative, your stored research, your meeting notes and the decisions that stand | "PMOS grilled it" under the initiative's ✦ | Settings › Checks: Off. `PMOS_GRILL=off` |
109
109
  | [You decided this before](claude-proposes.md) | You add an initiative that repeats an earlier decision | `DECISIONS.md`, the decision records, the PM journal, `planning/out-of-scope/` and the initiative records | The initiative's ✦ | `pmos ai off past-repeat` |
110
110
  | [Initiative descriptions](claude-proposes.md) | Once a day. At most 3 drafts a day for each product. | The PRD's first Problem or Why paragraph, or the record's own first paragraph | "Description" under the initiative's ✦ | `pmos ai off descriptions`. `PMOS_DESCRIPTIONS=off` |
111
111
  | [Expected outcomes](claude-proposes.md) | Once a day. At most 3 drafts a day for each product. When a check date passes: the verdict, from the goal's reading or one short run. | The PRD's success criteria, or the anchored key result. For a verdict: the goal's reading, or the lines the run cites | "Expected outcome" under the initiative's ✦. A verdict is recorded with Undo. Your move when PMOS cannot tell. | `pmos ai off outcomes`. `PMOS_OUTCOMES=off` |
@@ -120,7 +120,7 @@ A loop never sends a message, moves a Jira ticket, merges into a product reposit
120
120
  | [Your impact](claude-proposes.md) | PMOS reads once a day. Home shows the week after it ends. | Slack, mail, Jira, your meeting notes, your documents and your key results | Adler's sprout on Home, and your impact log | Settings › General › Your impact. `PMOS_IMPACT=off` |
121
121
  | [Morning brief and day check](proactive-engine.md) | The morning brief at 06:45, once you schedule it. The day check every 60 minutes by default (30, 60 or off). | Calendar, Wispr Flow, Slack, Jira and Confluence are on by default. Mail, GitHub, Drive, Figma and websites are off by default. Mail: subjects and senders only. | Today | Each source is a setting. `pmos proactive settings` |
122
122
  | [Day tasks](proactive-engine.md) | You press Prepare my day. At most 5 sessions at once. | The sources of the brief, read-only | Today: a draft waits for Approve or Revise | Do not press Prepare my day |
123
- | [Next prompt and Sharper](home.md) | After PMOS replies, and when you stop typing a rough prompt | The reply and your message | Cards above the chat box. Nothing is sent. | Settings › PMOS. `pmos ai off next-prompt`, `pmos ai off sharpen-prompt` |
123
+ | [Next prompt and Sharper](home.md) | After PMOS replies, and when you stop typing a rough prompt | The reply and your message | Cards above the chat box. Nothing is sent. | Settings › Your account. `pmos ai off next-prompt`, `pmos ai off sharpen-prompt` |
124
124
  | [Rehearse a plan](claude-proposes.md) | You ask PMOS to move a date or cut a task or an initiative | Task links, initiative records, goals and program charters | Your session, before PMOS makes the change | `pmos ai off rehearse` |
125
125
  | [Data refresh](settings-and-switches.md) | In working hours: the calendar every 30 minutes, and Jira, My work and your tools every hour. Tracker items on Friday 15:30. | Each tool with your own connection, read-only | Each page shows how old its data is | Settings › Data refresh |
126
126
 
@@ -195,7 +195,7 @@ Before you see a result, PMOS proves it:
195
195
  - Each claim must quote what was read: a prototype quotes the initiative's own words at `path:line`, and a scan quotes a line of a page the run read.
196
196
  - What is not proven is dropped, and the reason is logged. `pmos lab status` shows this month's runs, and `pmos ai log idle-lab` shows each drop.
197
197
 
198
- Specimens stay in the runtime folder on this computer. Nothing goes into a product repository before your ✓. The idle lab's spend counts toward the same limit as the grill in Settings › PMOS › Checks.
198
+ Specimens stay in the runtime folder on this computer. Nothing goes into a product repository before your ✓. The idle lab's spend counts toward the same limit as the grill in Settings › Checks.
199
199
 
200
200
  The run uses only the `pmos lab` commands in the [Command reference](cli.md).
201
201
 
@@ -227,7 +227,7 @@ What each part does:
227
227
  - **What the run gets.** Each run gets the PMOS design system for pages and its charts: the stylesheet and the rules (one lit thing per screen, icon-only buttons, the assistant is PMOS). A product that keeps its own copy of the system in `pmos/design-system/` gets its own brand (colours and fonts) with PMOS's parts. A product with only its own token sheet keeps its own look. The idle lab's prototypes get the same. The run also gets the initiative's name and the product's Intent, the files you attached, the element you pointed at, and your copy edits and sliders. A prototype must fit a 390 px phone screen.
228
228
  - **What the run can do.** A run can only read and write in its own folder in the runtime folder, plus the last version and the files you attached. It has no shell, no web and nothing that sends. Nothing goes into a product repository before your ✓.
229
229
  - **What the canvas can do.** The prototype runs in a sandboxed frame. It cannot reach PMOS. The canvas talks to it only to show a screen, point, pin, play and apply your edits.
230
- - **Your prototype rules.** After a version renders and before it opens, PMOS checks it against your prototype rules: no device or browser frame, no instructions on the screen, no sample copy, and each rule PMOS learns from your corrections. When a correction is true of every prototype (for example "no device frame"), the chat adds it as a rule (`pmos lab rule add`). PMOS keeps a rule only when it fails a bad example and passes a good one, so a button such as "See the week" is never read as an instruction. A change to one version ("make the alert orange") or a taste ("calmer") never becomes a rule. A version that breaks a rule gets one fix run, given only the lines that broke it. You see only the fixed version, with one quiet line: "PMOS fixed 3 things before showing you this." When the fix does not reach a rule, the version still opens and the line names the rule it breaks. When nothing was fixed, there is no line. Settings › PMOS › Prototype rules lists the rules with Undo.
230
+ - **Your prototype rules.** After a version renders and before it opens, PMOS checks it against your prototype rules: no device or browser frame, no instructions on the screen, no sample copy, and each rule PMOS learns from your corrections. When a correction is true of every prototype (for example "no device frame"), the chat adds it as a rule (`pmos lab rule add`). PMOS keeps a rule only when it fails a bad example and passes a good one, so a button such as "See the week" is never read as an instruction. A change to one version ("make the alert orange") or a taste ("calmer") never becomes a rule. A version that breaks a rule gets one fix run, given only the lines that broke it. You see only the fixed version, with one quiet line: "PMOS fixed 3 things before showing you this." When the fix does not reach a rule, the version still opens and the line names the rule it breaks. When nothing was fixed, there is no line. Settings › Prototype rules lists the rules with Undo.
231
231
  - **The design critic.** After the prototype rules, a separate read-only session reads the version's desk and phone screenshots and its page against every standing design rule of your product. Each rule is a named check: each numbered principle in your design principles and each rule in your `design-rules.json`. A finding must name the rule it breaks, so the critic reports broken rules, not taste. Its findings go into the same one fix run. After the fix it reads only those rules again, so "PMOS fixed n things" is never claimed unchecked. A critic that cannot run never holds the version. `pmos lab critic` runs it on any screenshots, and `PMOS_CRITIC=off` turns it off.
232
232
  - **No time limit.** A version takes as long as the ask needs. While PMOS makes it, the Viewer shows what it is doing now (for example "Building screen 3 of 7"), the steps done, a progress bar and the time so far, with a Stop press. A run that writes nothing for 10 minutes is stuck: PMOS stops it. A version that does not render, that is stuck or that you stop is "not made" with the reason, and the chat says so. The Viewer still opens it: it says why and shows the version it was made from. While a version is being made, a new ask on the same initiative waits: PMOS says what is running.
233
233
  - **Lessons.** Each change sentence, ✓ and ✕ is a Lessons line of the experiment (`pmos artefacts show`). Each version that rendered is a Specimens line. The one you keep is the kept specimen.
@@ -71,7 +71,7 @@ PMOS never pushes back with a decision that a later one replaced: such a finding
71
71
 
72
72
  Every run counts against a monthly credit cap. A run starts only when the cap holds its whole budget, and it stops at that budget, so the month never goes past the cap. At the cap PMOS pauses until the next month.
73
73
 
74
- Set when PMOS grills, and how much it may spend, in **Settings › PMOS › Checks** (see [Settings](settings-and-switches.md)) or with `pmos grill mode`, `pmos grill cap` and `pmos grill spend`. `PMOS_GRILL=off` turns it off on this computer. The `pmos grill` commands are in the [Command reference](cli.md).
74
+ Set when PMOS grills, and how much it may spend, in **Settings › Checks** (see [Settings](settings-and-switches.md)) or with `pmos grill mode`, `pmos grill cap` and `pmos grill spend`. `PMOS_GRILL=off` turns it off on this computer. The `pmos grill` commands are in the [Command reference](cli.md).
75
75
 
76
76
  ## The guard on every AI job
77
77
 
@@ -170,7 +170,7 @@ Every proposal carries its source. Nothing is sent.
170
170
 
171
171
  - `pmos grill decisions [--all]`: the decisions that stand, one line each with its file and line. With `--all`, also the superseded and reverted ones and what replaced them.
172
172
 
173
- Set when PMOS grills, and how much it may spend, with these commands (or in **Settings › PMOS › Checks**):
173
+ Set when PMOS grills, and how much it may spend, with these commands (or in **Settings › Checks**):
174
174
 
175
175
  - `pmos grill mode [full|exits|off]`: when PMOS grills by itself. `exits` grills only before a stage ends. `PMOS_GRILL=off` turns it off on this computer.
176
176
  - `pmos grill cap [<dollars>]`: the monthly credit cap, in US dollars (10 by default).
@@ -247,7 +247,7 @@ The idle lab run uses only the first three commands:
247
247
  - `pmos lab delete <initiative> [--file <round>/<A>/<a>.html | --version <n> [--key A]] [--ws <id>]`: delete one prototype version. Without `--file` or `--version`, PMOS deletes the prototype now. The version goes out of the Viewer and is not used for the next version. Its folder, with your edits, is kept aside, so the command prints the Undo. The Viewer's trash in the version bar does the same. A background lab run cannot use this command.
248
248
  - `pmos lab undo <batch> [--ws <id>]`: bring a deleted version back, with its edits.
249
249
  - `pmos lab rule add --json - [--again]`: add one of your prototype rules from a correction. The JSON is `{ "title", "words", "tests": [{ "in": "text" | "attr" | "source", "re", "flags"? }], "bad", "good" }`: `text` reads the screen's words without buttons and links, `attr` reads each element's class and id, and `bad` and `good` are two small HTML pages. PMOS keeps the rule only when it fails `bad` and passes `good`. `--again` adds a rule you undid, only when you say it again. The initiative chat runs it; a background lab run cannot.
250
- - `pmos lab rule list`: the rules every prototype version is checked against before it opens. The same list is in Settings › PMOS › Prototype rules.
250
+ - `pmos lab rule list`: the rules every prototype version is checked against before it opens. The same list is in Settings › Prototype rules.
251
251
  - `pmos lab critic <file…> [--ws <id>]`: the design critic reads screenshots (.png, .jpg, .webp) or HTML files, given as full paths, against every standing design rule of the product. Each rule is one named check: each numbered principle in the product's design principles, and each rule in its `design-rules.json`. A product with neither gets a short base set. Each finding names the check it breaks. Use it on a release's screenshots or a design board before anyone else sees them. The running PMOS server starts one read-only session.
252
252
  - `pmos lab critic checks [--root <dir>]`: the checks the critic uses for the product in that folder. No server is needed.
253
253
  - `pmos lab critic label <run> <n> real|noise`: your word on finding `n` of a critic run. `pmos lab critic stats` counts the runs, the findings, and how many you called real or noise.
@@ -56,7 +56,7 @@ This starts an empty PMOS for the user `pmos`. After the sign-in, add each produ
56
56
  | The PMOS state folder: chats, notes, settings, Online and the product list | `~/.local/state/pmos` | Your PMOS is the same as it was on the Mac. |
57
57
  | Every repository PMOS hosts, with its git history (no `node_modules`) | The same path as on the Mac | Paths and product ids do not change. |
58
58
  | `~/.cloudflared`: the tunnel's files | The same path | The same tunnel and DNS record answer your Online address. No DNS change is needed. |
59
- | The name and folder of the Claude profile in Settings › PMOS | An alias in `~/.bashrc` | Unattended PMOS work runs as that profile, as on the Mac. |
59
+ | The name and folder of the Claude profile in Settings › Your account | An alias in `~/.bashrc` | Unattended PMOS work runs as that profile, as on the Mac. |
60
60
  | `~/.gitconfig` | The same path | Your git name and email. The macOS keychain line is removed, and GitHub is reached over HTTPS. |
61
61
 
62
62
  The server uses the same user name and home folder as the Mac, such as `/Users/<you>`. That is why no path needs to change.
@@ -96,5 +96,5 @@ Records that both computers push to a git remote stay in step. Chats, notes and
96
96
 
97
97
  - The server must run Ubuntu or Debian. Other Linux systems need the steps done by hand.
98
98
  - A product repository with no git remote is copied once, at the move. After that, the Mac and the server do not sync it.
99
- - Claude's sign-in on the server lasts as long as a sign-in on any computer. When it expires, `pmos-cloud status` shows ✗ for Claude, and Settings › PMOS shows the sign-in prompt. Run `pmos-cloud signin` again.
99
+ - Claude's sign-in on the server lasts as long as a sign-in on any computer. When it expires, `pmos-cloud status` shows ✗ for Claude, and Settings › Your account shows the sign-in prompt. Run `pmos-cloud signin` again.
100
100
  - The two pastes download the newest create-pmos release from `unpkg.com`. If unpkg is down, copy `cloud-setup.sh` from the create-pmos package (`npm pack create-pmos`) and run it with `bash cloud-setup.sh move root@<server-ip>`.
@@ -19,7 +19,7 @@ Home, the Board, Insights and the Viewer use one typeface, Plus Jakarta Sans, wi
19
19
  - **The quarter.** One bar with all goals of the products Home reads: reached, on track, still reading, at risk and will miss, each with its count. A black tick marks your line, for example "line 18". One sentence says how many goals are on track or better, and one line says why. When no goal has a reading yet, the sentence says that instead, for example "3 goals, none read yet." **By product** opens Intelligence. With no goals, there is no bar. With no line, there is no tick, and PMOS can propose a line with ✦: press ✓ to keep it, or ✕ to not set one this quarter. A product that could not be read is named and is not counted.
20
20
  - **The left column.** PMOS's lead says it straight, for example "Straight answer: 5 calls are yours. I did the other 54." When a source such as Jira cannot be read, one quiet line under the lead says so and what it shows instead, with an icon to read it again. The source never takes the lead's place.
21
21
  - **Your move** shows only the calls that always wait for you: a verdict, a new request or a decision, a message to people, a move the team reads, a merge, and a delete or spend. Each row starts with its kind and says why, for example "Message · I drafted it. It goes to people and cannot be unsent." It also shows its due day (orange when late) and the goal it moves when a goal reads it. At most 5 show. **N more calls of yours** opens the rest. PMOS acts on everything else by itself, so there is no Can wait.
22
- - **PMOS did** lists what PMOS finished by itself, newest first. Each row has a one-line reason, for example "Did it quietly. You kept this kind 4 times before.", and Undo. Undo works for 14 days. After two Undos in a row on one kind, PMOS asks first for that kind for 7 days. A run that stopped is one amber line at the top, never a row in Your move. **N more PMOS did** opens the rest. A kind PMOS shows you comes first. **By product** opens Settings › PMOS, where you set how PMOS decides for each kind.
22
+ - **PMOS did** lists what PMOS finished by itself, newest first. Each row has a one-line reason, for example "Did it quietly. You kept this kind 4 times before.", and Undo. Undo works for 14 days. After two Undos in a row on one kind, PMOS asks first for that kind for 7 days. A run that stopped is one amber line at the top, never a row in Your move. **N more PMOS did** opens the rest. A kind PMOS shows you comes first. **By product** opens Settings › How PMOS decides, where you set how PMOS decides for each kind.
23
23
  - **Since yesterday**: up to 3 new items, then **New for you · N** to see all of them. ✓✓ marks all of them seen.
24
24
  - **The right column.** Today's agenda, not to scale: a line at the time now, each meeting with its prep note, ✦ picks in free time, and "3 h free" for a long free stretch. The meeting where your call is decided has an orange edge. Under it, **Notes since yesterday**: meeting notes with their main lines, and recordings with no initiative. When PMOS finds the initiative a recording belongs to, press the link icon to link it.
25
25
  - **In the hour before a meeting**, the meeting's prep leads: what to agree, the points, and the record icon. The quarter shows only when it moved since the morning. Past meetings fade, with their notes under them.
@@ -381,7 +381,7 @@ The sliders icon on the Sharper card sets how PMOS sharpens:
381
381
 
382
382
  The same menu has the **Sharpen as I type** switch. Off means no Sharpening… line and no Sharper card.
383
383
 
384
- ### Settings › PMOS › Sharpen prompts
384
+ ### Settings › Your account › Sharpen prompts
385
385
 
386
386
  | Row | What it does |
387
387
  |---|---|
@@ -2,7 +2,7 @@
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-12
5
+ timestamp: 2026-11-22
6
6
  ---
7
7
 
8
8
  # Initiatives: the Roadmap, next steps, the Driver and done
@@ -48,6 +48,16 @@ Each step says what you can do with it. The control sits under the step.
48
48
  | `gate` | The step is yours alone: accepting the initiative, approving the contract, answering an open item. | Words only. There is no start button. |
49
49
  | `lifecycle` | The initiative is stopped. | **reopen** |
50
50
 
51
+ ### Plain suggestions finish at once
52
+
53
+ Three suggestions on the initiative popup change the record directly, with Undo. They send nothing to Ask PMOS and start no agent run:
54
+
55
+ - **Move the plan end.** ✓ moves the due day of the open task that sets the plan end today.
56
+ - **Close them** (a closed initiative with open tasks). All its open PMOS tasks go to Done. Jira tickets stay with Jira.
57
+ - **Reopen.** An initiative in Won't do comes out of Won't do. An initiative in its last stage goes back to the stage it came from.
58
+
59
+ When PMOS cannot do the change by itself (for example, a Done task sets the plan end), it sends the words to Ask PMOS as before.
60
+
51
61
  ### Prepare, then go
52
62
 
53
63
  **Prepare** shows a plan and starts nothing. The plan names the branch and the folder, says whether the initiative's branch already exists (it is reused) or would be created, lists the sessions already running on the initiative, names the read-only sources the session may use, and shows the budget. It also shows the exact first input the session would receive. Preparing creates no branch, folder or session.
@@ -214,7 +224,7 @@ The Initiative Driver is a short background agent run for one initiative or one
214
224
  A run starts for one of four reasons:
215
225
 
216
226
  - **Created.** An initiative is created from the page, from Triage (accept), or with `pmos initiative new`. The run starts within one tick of the server (about one minute).
217
- - **Moved.** You move the initiative to another stage on the board.
227
+ - **Moved.** An agent moves the initiative to another stage. A move you press on the board starts no run: the daily sweep still asks for the documents of the new stage.
218
228
  - **Answered.** You send a proposal back with a note.
219
229
  - **Stuck.** The unblock sweep finds a blocker the agent can work on.
220
230
 
@@ -353,7 +353,7 @@ The list on the left shows your weekly meeting, the draft and your tickets from
353
353
 
354
354
  Home shows a **Claude needs attention** card only when the saved login has failed: signed out, removed, unreachable or refused. A login that was not tested since a restart shows nothing. **Test the login again** reopens setup at the login test, for the same profile. PMOS never switches accounts itself.
355
355
 
356
- Settings › PMOS has the same sign-in and test controls.
356
+ Settings › Your account has the same sign-in and test controls.
357
357
 
358
358
  ### What this was tested with
359
359
 
@@ -2,18 +2,21 @@
2
2
  type: Guide
3
3
  title: "Settings, switches and data freshness"
4
4
  description: "What each section of Settings holds, every PMOS_ environment variable, and how the workspace keeps each source up to date."
5
- timestamp: 2026-11-18
5
+ timestamp: 2026-11-22
6
6
  ---
7
7
 
8
8
  # Settings, switches and data freshness
9
9
 
10
- Press the round menu button at the bottom of any page, then the **Settings** icon. While a source is stale, Settings opens at **Connectors** with the stale source first. Settings has five sections:
10
+ Press the round menu button at the bottom of any page, then the **Settings** icon. While a source is stale, Settings opens at **Connectors** with the stale source first. The top line is the path, for example **Settings › General**, with ×. The sections are at the left, and each is made of rows: a choice is a row of tabs and an on/off is a switch.
11
11
 
12
12
  | Section | What it holds |
13
13
  |---|---|
14
14
  | General | The theme (Light, Dark or Auto), the products Home, the Board and Intelligence read, when Your day ends, the Your impact switch, and that agents write to Jira only after you press Commit. When a new PMOS is ready, a card here says so. Under **Extras**, **Adler ›** and **Jev and Laya ›** open their own settings (see below). |
15
- | PMOS | **How PMOS decides** for each kind of change, the calls that are **Always yours**, and PMOS's **Lessons**. Then the Claude profile that new sessions start with, the Anthropic API key for PMOS's own runs, Sharpen prompts, and **Checks**: when PMOS grills an initiative by itself and the monthly credit for its checks. |
15
+ | How PMOS decides | One suggestion from PMOS when it sees a pattern in what you kept, each kind of change PMOS makes by itself, the calls that are **Always yours**, and PMOS's **Lessons**. |
16
+ | Checks | When PMOS grills an initiative by itself and the monthly credit for its checks. |
17
+ | Prototype rules | What every prototype version is checked for before you see it. |
16
18
  | Connectors | Every connector your Claude session has, and a directory of services you can connect. A switch chooses only what PMOS reads on its own. PMOS reads and never posts. |
19
+ | Your account | The Claude login and profile that new sessions start with, the Anthropic API key for PMOS's own runs, and Sharpen prompts. |
17
20
  | Workspaces | The repositories PMOS works in. Remove forgets the address only; the folder is not deleted. Add one by its folder path. The **Workflows ›** row opens the stages each kind of initiative goes through, inside Settings, which then takes the whole window. See [Workflows](statuses.md). |
18
21
  | Updates | The version of the app and of each workspace's kit, the check for updates, and what changed. |
19
22
 
@@ -41,7 +44,7 @@ Under the update card, **Updates** shows what changed in the published kits. **T
41
44
  - A change published before PMOS wrote stories shows the pull request's title and its sentence instead.
42
45
  - The card in **General** that says a new PMOS is ready opens **Updates**.
43
46
 
44
- ## PMOS: how PMOS decides, and its Lessons
47
+ ## How PMOS decides, and its Lessons
45
48
 
46
49
  **How PMOS decides** lists each kind of change that PMOS made by itself, for example "Notes on where work stands" or "Task names". Each row says how many PMOS made and how many you kept. Each kind has three ways:
47
50
 
@@ -51,11 +54,13 @@ Under the update card, **Updates** shows what changed in the published kits. **T
51
54
 
52
55
  PMOS picks the way by itself. A new kind is **Show me** until you keep 3 of its changes; then it is **Quietly**. Two Undos on a kind and PMOS asks first for 7 days. Press a way to set a kind yourself. Your way wins over PMOS's, the 7 days included. Press the way PMOS would pick to give the choice back to PMOS. **By product** under PMOS did on Your day opens this section.
53
56
 
57
+ When PMOS sees a pattern, one suggestion opens the section, with **Why**, **PMOS will**, **What changes** and **Based on**. It comes only from real counts: a kind PMOS made at least 5 times and you never undid can go **Quietly**; a kind you set to **Quietly** and then undid twice can go **Ask first**. ✓ sets the way, ✕ hides that suggestion on this computer, and the pencil takes you to the kind's own row.
58
+
54
59
  **Always yours** lists the calls PMOS never makes by itself, whatever it has learned: a new request, a verdict on an outcome, a message to people, a move the team reads in Jira or on the Board, and a merge, a delete or spend.
55
60
 
56
- **Lessons** lists what PMOS got wrong and what it changed, newest first, from the Lessons of every product. The first line says what went wrong; the next says what changed.
61
+ **Lessons** lists what PMOS got wrong and what it changed, newest first, from the Lessons of every product. The list is folded: press **See the lessons** to open it. The first line says what went wrong; the next says what changed.
57
62
 
58
- ## PMOS: the profile and the API key
63
+ ## Your account: the profile, the API key and Sharpen prompts
59
64
 
60
65
  **Claude login and profile.** Choose a separate PMOS login or an existing Claude setup. Complete sign-in in that profile’s terminal. **Check and use this profile** verifies access and saves the choice for new sessions. The check can consume a small amount of Claude usage. A discovered profile is not a verified login. The same login test appears in [first-run setup](layout.md).
61
66
 
@@ -70,15 +75,15 @@ At the bottom of **General**, **Extras** has two rows. Press the arrow on a row
70
75
  - **Adler ›**: how much of Adler you see (Full, Face only or Off), motion, celebrations, Quiet after, and Dress for the day. See [Adler, PMOS's face](layout.md).
71
76
  - **Jev and Laya ›**: the TypeSafe key for Jev, the local model Laya, and the switches for each repository: whether Jev may read it, sort documents, check claims and label notes.
72
77
 
73
- ## PMOS › Checks: when PMOS grills, and what it may spend
78
+ ## Checks: when PMOS grills, and what it may spend
74
79
 
75
- PMOS grills an initiative by itself and files what it finds under the initiative's ✦ (see [PMOS proposes](claude-proposes.md)). There is no button to start it. **Checks**, under PMOS, is the only control.
80
+ PMOS grills an initiative by itself and files what it finds under the initiative's ✦ (see [PMOS proposes](claude-proposes.md)). There is no button to start it. **Checks** is the only control.
76
81
 
77
82
  **Grill by itself.** Full grills before an initiative leaves a stage, when a forecast turns at risk or will miss, when scope or dates move a lot, and once a month on running work with late work. Only at stage exits grills only before a stage ends. Off stops it. When `PMOS_GRILL=off` is set in the environment, the row says Off and cannot be changed here.
78
83
 
79
84
  **Monthly credit for checks.** The most PMOS's checks may spend in a month: $5, $10, $20 or $50. The bar under it shows what this month used. At the limit PMOS pauses and the row says so; it never spends beyond the limit. `pmos grill mode` and `pmos grill cap` change the same two settings.
80
85
 
81
- ## PMOS › Prototype rules: what every prototype version is checked for
86
+ ## Prototype rules: what every prototype version is checked for
82
87
 
83
88
  PMOS checks each prototype version against these rules after it renders and before it opens in the Viewer (see [The live round](agent-capabilities.md)). A version that breaks one gets one fix run, and you see only the fixed version. Each rule comes from your own words: the row shows the rule, what you said and the date. There is no button to run the checks and nothing to pick: PMOS adds a rule from a correction in the chat that is true of every prototype.
84
89
 
@@ -122,8 +127,8 @@ An "off" switch accepts `off`, `0`, `false` or `no` unless the row says a differ
122
127
  | `PMOS_DRIVER` | `off` starts no [Initiative Driver](initiatives-and-next-steps.md) run and no horizon scan. | on | — |
123
128
  | `PMOS_CHECKER` | `off` stops the check of the Driver's drafts. | on | — |
124
129
  | `PMOS_PROPOSE` | `off` stops the runs that file proposals under an initiative's ✦. | on | — |
125
- | `PMOS_GRILL` | `off` stops the grills that PMOS starts by itself. | on | PMOS › Checks › Grill by itself |
126
- | `PMOS_GRILL_API` | `off` stops grills on the Claude API and keeps them in a background session. | on when a key is set | PMOS › API key (Remove) |
130
+ | `PMOS_GRILL` | `off` stops the grills that PMOS starts by itself. | on | Checks › Grill by itself |
131
+ | `PMOS_GRILL_API` | `off` stops grills on the Claude API and keeps them in a background session. | on when a key is set | Your account › API key (Remove) |
127
132
  | `PMOS_DECISION_MEMORY` | `off` stops decision memory. | on | — |
128
133
  | `PMOS_DESCRIPTIONS` | `off` stops the daily [initiative descriptions](claude-proposes.md). | on | `pmos ai off descriptions` |
129
134
  | `PMOS_OUTCOMES` | `off` stops the daily read for [expected outcomes](claude-proposes.md). | on | `pmos ai off outcomes` |
@@ -327,7 +332,7 @@ The calendar-sync skill reads today and the next 14 days, read-only, and saves t
327
332
 
328
333
  The events are kept in your own runtime folder on this machine, never in a repository.
329
334
 
330
- The tracker-refresh skill reads tracker items from files already in your repository. It moves an item only when a file shows a new status, so a read can change nothing. Its last step records that the read finished, with `pmos tracker done`. It moves no item. `pmos tracker status` says when tracker items were last read for this repository.
335
+ The tracker-refresh read is a plain script, not an agent run: the schedule and the Refresh press start no session. It reads tracker items from files already in your repository and moves an item only when a newer file shows a new status, so a read can change nothing. It records that the read finished, even when nothing moved. `pmos tracker status` says when tracker items were last read for this repository.
331
336
 
332
337
  The record is kept in your own runtime folder on this machine, never in a repository. Tracker items show the time of this record, or the time the schedule last started the skill if that is later.
333
338
 
@@ -369,7 +374,7 @@ Press › on a row to open its page. A change you make there shows on the Connec
369
374
  | Waiting for your permission | A background read cannot ask you. Open the session and allow it, or stop it and read again. |
370
375
  | Waiting for your answer | Open the session and answer it, or stop it and read again. |
371
376
  | Still reading after N min | Nothing, usually. PMOS stops it at 30 min. |
372
- | Signed out | Sign in again in Settings › PMOS. PMOS ends the read at once. |
377
+ | Signed out | Sign in again in Settings › Your account. PMOS ends the read at once. |
373
378
  | The session was gone | Nothing. PMOS restarted or the computer slept, and the next read starts on time. |
374
379
 
375
380
  ↗ opens the session. ■ is **Stop and read again**: it stops the read and starts the same services again. A read of a tool that has not ended after 30 minutes is stopped by itself, and History says why. A stuck service holds back only itself: the other services keep their rhythm.
@@ -419,7 +424,7 @@ The amber row on Settings › Connectors, and the amber box on the other section
419
424
  |---|---|---|
420
425
  | The connector is not connected | after the first try | **Connect** the source in your Claude connectors (claude.ai/settings/connectors) |
421
426
  | The sign-in of the connector expired | after the same failure twice | **Reconnect** the source in your Claude connectors |
422
- | Claude is signed out on this computer | after the same failure twice | **Sign in to Claude** in Settings › PMOS (Terminal: run `claude`, type /login) |
427
+ | Claude is signed out on this computer | after the same failure twice | **Sign in to Claude** in Settings › Your account (Terminal: run `claude`, type /login) |
423
428
  | The network, a rate limit, a connector that did not start, or a skill error | after 5 tries | ↻ **Read it again** |
424
429
  | The source is read only when you press Refresh | at once | ↻ **Read it again** |
425
430
 
@@ -7,7 +7,7 @@
7
7
  * 1. writes the ledger's `epoch` on the first scan, so only events AFTER it wake a run (an old initiative is history);
8
8
  * 2. closes runs that were alive when the server stopped (`run-end`, reason "interrupted"): they still count against the day;
9
9
  * 3. finds the wakes: a `created` placement line (the page, Triage accept and `pmos initiative new` all write one), a board
10
- * `move` line, a proposal the PM sent back with a note. Each key wakes once (the ledger's `wake` line makes it idempotent);
10
+ * `move` line (one the PM pressed on the page, `pressed: true`, wakes none: bet 1f), a proposal the PM sent back with a note. Each key wakes once (the ledger's `wake` line makes it idempotent);
11
11
  * 4. every 30 minutes inside the day-check window, and outside quiet hours, runs the unblock sweep (no model, lib/driver.js);
12
12
  * 5. starts the queued runs the rules allow (mode, pause, 3 at once) through spawnSession with origin `drive:<kind>:<id>`
13
13
  * and the skill prompt, which lib/headless.js turns into a `claude -p` run with a fixed tool list.
@@ -18,7 +18,7 @@
18
18
  * plan(state, { now, running }) → { start: [{ target, board, wakes[] }], refused: [{ target, wakes[], reason }] }
19
19
  * detect(facts, state, { now, stalledDays }) → the blockers, each { key, target, board, title, code, owner, cat, text }
20
20
  * sweepLines(facts, state, { now, stalledDays }) → { blockers, lines } the lines to append (once per blocker per day)
21
- * wakesFromLedgers({ created, moved }, state, { ws, epoch }) → wake lines for creations and moves not yet woken
21
+ * wakesFromLedgers({ created, moved }, state, { ws, epoch }) → wake lines for creations and moves not yet woken (a move pressed on the page, `pressed: true`, wakes none)
22
22
  * answeredWakes(state) → wake lines for proposals the PM sent back with a note
23
23
  * localDay(ms) · targetKey(target) · wsIdOf(root)
24
24
  *
@@ -468,6 +468,9 @@ function wakesFromLedgers({ created = [], moved = [] } = {}, state, { ws, epoch,
468
468
  }
469
469
  for (const m of moved) {
470
470
  if (!m || m.kind !== 'move' || typeof m.id !== 'string' || !ID_RE.test(m.id) || !after(m.at)) continue;
471
+ // a move the PM pressed on the page (a Board drag, a direct ✓: `pressed: true`) is the PM's own word: it wakes no follow-up run (bet 1f).
472
+ // The daily sweep still asks for the new stage's due documents. A move kept from a driver proposal, or made by an agent, still wakes one.
473
+ if (m.pressed === true) continue;
471
474
  const key = `moved:${ws}:${m.id}:${m.at}`;
472
475
  if (state.wakeKeys.has(key)) continue;
473
476
  lines.push({ ev: 'wake', key, target: { kind: 'initiative', ws, id: m.id }, board: m.board || boardOf(m.id), reason: 'moved' });
@@ -32,6 +32,8 @@
32
32
  * POST /api/boards/tasks/order { ws, board, initiative, section, tasks: [id] } → { ok, from } the PM's order inside one stage (a drag in the
33
33
  * Tasks list, batch 18 item 16): a task-order line; tasks [] takes the order out; Undo sends `from` back
34
34
  * POST /api/boards/tasks/state { ws, board, task, state } → { ok, item }
35
+ * POST /api/boards/ini-plan-end { ws, board, id, to } · ini-close-open { ws, board, id } · ini-reopen { ws, board, id }
36
+ * the popup's direct ✓ presses (bet 1f): see "direct ✓ presses" below; { ask: true } sends the words to Ask PMOS
35
37
  * POST /api/boards/tasks/reschedule { ws, board, task, days } → { ok, item }
36
38
  * POST /api/boards/tasks/undo-add { ws, board, task } → { ok } takes back a task added in the last 2 minutes, still To do
37
39
  * POST /api/boards/tasks/rename { ws, board, task, title } → { ok, from, item } only the title changes
@@ -1145,7 +1147,7 @@ function moveOnWorkflow(ctx, res, body, g, p, own) {
1145
1147
  if (!before.anchor) warnings.push('No anchor');
1146
1148
  const happened = stageHappened(ctx, res, body, p.fr.folded, p.board.id);
1147
1149
  if (happened === false) return;
1148
- append(p.file, g.actor, { kind: 'move', board: p.board.id, id: body.id, from: before.wfStage.key, to: t.key, why: body.why || '', warnings, ...(happened ? { happened } : {}) });
1150
+ append(p.file, g.actor, { kind: 'move', board: p.board.id, id: body.id, from: before.wfStage.key, to: t.key, why: body.why || '', warnings, ...(happened ? { happened } : {}), ...(g.pressed ? { pressed: true } : {}) });
1149
1151
  const f1 = foldOf(ctx, p.w), row = boardRow(p.board, b0, f1);
1150
1152
  const made = stageTasks(p.file, f1, p.board, row, g.actor.by); // the new stage's To finish entries, as tasks
1151
1153
  ctx.json(res, { ok: true, row, warnings, ...(made ? { tasksMade: made } : {}) });
@@ -1266,7 +1268,7 @@ const WRITES = {
1266
1268
  const warnings = B.moveWarnings(p.board, before, before.stage, body.to, { hasSpec: b0.hasSpec });
1267
1269
  const happened = stageHappened(ctx, res, body, p.fr.folded, p.board.id);
1268
1270
  if (happened === false) return;
1269
- append(p.file, g.actor, { kind: 'move', board: p.board.id, id: body.id, from: before.stage, to: body.to, why: body.why || '', warnings, ...(happened ? { happened } : {}) });
1271
+ append(p.file, g.actor, { kind: 'move', board: p.board.id, id: body.id, from: before.stage, to: body.to, why: body.why || '', warnings, ...(happened ? { happened } : {}), ...(g.pressed ? { pressed: true } : {}) });
1270
1272
  const row = boardRow(p.board, b0, foldOf(ctx, p.w));
1271
1273
  ctx.json(res, { ok: true, row, warnings });
1272
1274
  },
@@ -1877,6 +1879,112 @@ const WRITES = {
1877
1879
  },
1878
1880
  };
1879
1881
 
1882
+ /* ── direct ✓ presses (initiative direct-plain-actions, bet 1f): three suggestions of the initiative popup (public/pm/pop-work-model.js
1883
+ * derivedOf d:plan-end and d:closed-open) used to type a sentence into Ask PMOS, and an agent session made a plain change. Each is now one
1884
+ * press that writes through the task and board routes above (writeAs: the same checks, the same ledger lines) and answers its own Undo.
1885
+ * When the plain reading does not hold, a route writes nothing and answers { ok: false, ask: true, error }: the page sends the old words
1886
+ * to Ask PMOS, as before.
1887
+ *
1888
+ * POST /api/boards/ini-plan-end { ws, board, id, to } → { ok, task, title, from: { due }, to, said } | { ok: true, same: true, said }
1889
+ * The plan end is not stored: it is the latest due day of the initiative's PMOS tasks and breakdown items. The open one that sets it
1890
+ * today gets `to` as its due day. A Done task that sets it, or no dated task at all, is { ask: true }.
1891
+ * POST /api/boards/ini-close-open { ws, board, id } → { ok, closed: [{ task, title, from }], said }
1892
+ * Every open PMOS task and breakdown item goes to Done. A Jira ticket is Jira's and is never written here. Undo: tasks/state with
1893
+ * each `from`.
1894
+ * POST /api/boards/ini-reopen { ws, board, id } → { ok, did: 'wontdo' | 'stage', to, undo: { route, body }, said }
1895
+ * Won't do: out of Won't do, back to the stage it was in. The last stage: back to the stage of the last move into it, else the stage
1896
+ * before it. Anything else is { ask: true }. */
1897
+ const OPEN_STATES = ['To do', 'In progress'];
1898
+ /** The PMOS tasks and breakdown items of one initiative, as { id, store, title, state, due }. Won't do and Archived are left out. */
1899
+ function workOfIni(p, id) {
1900
+ const out = [];
1901
+ for (const t of tasksOfIni(p.fr.folded, id)) {
1902
+ if (!t || t.initiative !== id || t.board !== p.board.id || t.state === "Won't do" || t.state === 'Archived') continue;
1903
+ out.push({ id: t.id, store: 'task', title: t.title, state: t.state, due: t.due ? String(t.due).slice(0, 10) : null });
1904
+ }
1905
+ for (const r of TI.rowsOf(p.w.root, new Set([id]), p.board.id)) out.push({ id: r.uid, store: 'item', title: r.title, state: r.status, due: r.end ? String(r.end).slice(0, 10) : null });
1906
+ return out;
1907
+ }
1908
+ /** The initiative of a direct press on this board: { p, b0, row } or null (the failure is answered). */
1909
+ function directFrame(ctx, res, body) {
1910
+ const p = postFrame(ctx, res, body);
1911
+ if (!p) return null;
1912
+ if (p.board.self) { fail(ctx, res, 409, SELF_REFUSAL); return null; }
1913
+ if (typeof body.id !== 'string' || !body.id) { fail(ctx, res, 400, 'id is required'); return null; }
1914
+ if (!p.file) { fail(ctx, res, 409, NO_STATE); return null; }
1915
+ const base = needRows(ctx, res, p.w);
1916
+ if (!base) return null;
1917
+ const b0 = base.find((r) => r.id === body.id);
1918
+ if (!b0 || boardIdOf(b0, p.fr.boards, p.fr.folded, p.w) !== p.board.id) { fail(ctx, res, 404, `no initiative ${body.id} on this board`); return null; }
1919
+ return { p, b0, row: boardRow(p.board, b0, p.fr.folded) };
1920
+ }
1921
+ const askBack = (ctx, res, error) => ctx.json(res, { ok: false, ask: true, error }, 409);
1922
+ const DAY_ONLY = /^\d{4}-\d{2}-\d{2}$/;
1923
+ Object.assign(WRITES, {
1924
+ '/api/boards/ini-plan-end': (ctx, res, body, g) => {
1925
+ if (typeof body.to !== 'string' || !DAY_ONLY.test(body.to)) return fail(ctx, res, 400, 'to is a day, YYYY-MM-DD');
1926
+ const f = directFrame(ctx, res, body);
1927
+ if (!f) return;
1928
+ const end = f.row.end ? String(f.row.end).slice(0, 10) : null;
1929
+ if (end && end >= body.to) return ctx.json(res, { ok: true, same: true, said: 'The plan already ends on ' + end + '.' });
1930
+ const work = workOfIni(f.p, body.id);
1931
+ const setter = end ? work.find((x) => x.due === end && OPEN_STATES.includes(x.state)) : null;
1932
+ if (!setter) return askBack(ctx, res, end ? 'a task that is done sets the plan end, so PMOS cannot move it by itself' : 'no dated PMOS task sets the plan end');
1933
+ const r = writeAs(ctx, '/api/boards/tasks/edit', { ws: body.ws, board: body.board, task: setter.id, due: body.to }, g);
1934
+ if (!r.body || r.body.ok === false) return ctx.json(res, r.body || { ok: false, error: 'the plan end was not moved' }, r.status);
1935
+ ctx.json(res, { ok: true, task: setter.id, title: setter.title, from: { due: end }, to: body.to, said: 'The plan end moved to ' + body.to + ': ' + setter.title + ' is due then.' });
1936
+ },
1937
+ '/api/boards/ini-close-open': (ctx, res, body, g) => {
1938
+ const f = directFrame(ctx, res, body);
1939
+ if (!f) return;
1940
+ const open = workOfIni(f.p, body.id).filter((x) => OPEN_STATES.includes(x.state));
1941
+ if (!open.length) return askBack(ctx, res, 'it has no open PMOS task: the open ones are Jira tickets, and Jira owns them');
1942
+ const closed = [], failed = [];
1943
+ for (const x of open) {
1944
+ const r = writeAs(ctx, '/api/boards/tasks/state', { ws: body.ws, board: body.board, task: x.id, state: 'Done', why: 'closed with its initiative' }, g);
1945
+ if (r.body && r.body.ok !== false) closed.push({ task: x.id, title: x.title, from: x.state }); else failed.push(x.title);
1946
+ }
1947
+ if (!closed.length) return fail(ctx, res, 500, 'no task was closed: ' + failed.join(', '));
1948
+ ctx.json(res, { ok: true, closed, said: closed.length + (closed.length === 1 ? ' task' : ' tasks') + ' closed.' + (failed.length ? ' Not closed: ' + failed.join(', ') + '.' : '') });
1949
+ },
1950
+ '/api/boards/ini-reopen': (ctx, res, body, g) => {
1951
+ const f = directFrame(ctx, res, body);
1952
+ if (!f) return;
1953
+ const { row } = f, k = B.key(f.p.board.id, body.id), stages = row.wfStages || [];
1954
+ const stageOf = (ref) => stages.find((s) => s.key === ref || s.name === ref) || null;
1955
+ const ended = f.p.fr.folded.ends ? f.p.fr.folded.ends.get(k) : null;
1956
+ const moves = (f.p.fr.folded.moves || []).filter((m) => m.board === f.p.board.id && m.id === body.id && m.via === 'move');
1957
+ if (ended) {
1958
+ const r = writeAs(ctx, '/api/boards/wontdo', { ws: body.ws, board: body.board, id: body.id, back: true }, g);
1959
+ if (!r.body || r.body.ok === false) return ctx.json(res, r.body || { ok: false, error: 'it was not reopened' }, r.status);
1960
+ // back from Won't do lands in Triage (scripts/boards.js): the stage it was in goes back too, by the name of the last move before Won't do
1961
+ const before = [...moves].reverse().find((m) => !ended.at || !m.at || m.at <= ended.at);
1962
+ const want = before ? before.to : (stageOf(ended.stage) || {}).name;
1963
+ let to = (r.body.row && r.body.row.stage) || 'Triage';
1964
+ if (want && want !== to) { const m = writeAs(ctx, '/api/boards/move', { ws: body.ws, board: body.board, id: body.id, to: want, why: 'reopened' }, g); if (m.body && m.body.ok) to = want; }
1965
+ return ctx.json(res, { ok: true, did: 'wontdo', to, undo: { route: '/api/boards/wontdo', body: { id: body.id, reason: ended.reason || 'other', note: ended.note || (ended.reason === 'other' ? 'closed again' : '') } }, said: 'Reopened in ' + to + '.' });
1966
+ }
1967
+ if (!row.closed || !row.wfStage) return askBack(ctx, res, 'it is not in Won\'t do or in its last stage, so PMOS cannot tell where it goes back to');
1968
+ const cur = row.wfStage, here = [row.stage, cur.key, cur.name].filter(Boolean);
1969
+ const into = [...moves].reverse().find((m) => here.includes(m.to));
1970
+ let back = into && into.from && !here.includes(into.from) ? into.from : null;
1971
+ if (!back) {
1972
+ // no move into it (a stage read from Jira or the files): the stage before it on the board's own list, else on the workflow's
1973
+ const cols = (row.workflow || []).map((x) => ({ name: x.name, cat: x.cat }));
1974
+ const list = cols.some((x) => x.name === row.stage) ? cols : stages.map((x) => ({ name: x.name, cat: x.cat, key: x.key }));
1975
+ const i = list.findIndex((x) => here.includes(x.name) || (x.key && here.includes(x.key)));
1976
+ const prev = list.slice(0, Math.max(0, i)).reverse().find((x) => String(x.cat || '').toLowerCase() !== 'done' && !END_RE.test(x.name || ''));
1977
+ back = prev ? prev.name : null;
1978
+ }
1979
+ if (!back) return askBack(ctx, res, 'it has no stage before its last one to go back to');
1980
+ const shut = into ? into.to : row.stage || cur.name;
1981
+ const r = writeAs(ctx, '/api/boards/move', { ws: body.ws, board: body.board, id: body.id, to: back, why: 'reopened' }, g);
1982
+ if (!r.body || r.body.ok === false) return ctx.json(res, r.body || { ok: false, error: 'it was not reopened' }, r.status);
1983
+ const to = (r.body.row && r.body.row.stage) || back;
1984
+ ctx.json(res, { ok: true, did: 'stage', to, undo: { route: '/api/boards/move', body: { id: body.id, to: shut, why: 'closed again' } }, said: 'Reopened in ' + to + '.' });
1985
+ },
1986
+ });
1987
+
1880
1988
  async function handle(req, res, url, ctx) {
1881
1989
  const p = url.pathname;
1882
1990
  if (req.method === 'GET') {
@@ -1893,8 +2001,11 @@ async function handle(req, res, url, ctx) {
1893
2001
  if (!got.ok) return fail(ctx, res, 400, 'invalid JSON body');
1894
2002
  const body = got.body;
1895
2003
  if (!isObj(body)) return fail(ctx, res, 400, 'the body must be a JSON object');
1896
- const g = guard.requirePagePress(req, body);
1897
- if (!g.ok) return fail(ctx, res, g.status, g.error);
2004
+ const g0 = guard.requirePagePress(req, body);
2005
+ if (!g0.ok) return fail(ctx, res, g0.status, g0.error);
2006
+ // pressed: the write came straight from a press on the page (not a driver Keep, which calls the same route through writeAs). A stage move
2007
+ // made this way (by the PM, not an agent session sending its header) carries `pressed: true`, and the Driver wakes no follow-up run for it (bet 1f, lib/driver.js wakesFromLedgers).
2008
+ const g = { ...g0, pressed: !!(g0.actor && /^pm:/.test(String(g0.actor.by || ''))) };
1898
2009
  fn(ctx, res, body, g);
1899
2010
  return true;
1900
2011
  }
@@ -119,7 +119,7 @@ function view(h, name = 'It') {
119
119
  const tried = n ? `PMOS read it again ${n === 1 ? 'once' : n + ' times'} since ${hm(h.attempts[0].at)}${c ? `, and ${c.why}` : ''}.` : '';
120
120
  let action = null;
121
121
  if (h.state === 'needs-you') {
122
- if (h.cause === 'claude-signin') action = { label: 'Sign in to Claude', how: require('./claude-signin.js').how(), sec: 'claude' };
122
+ if (h.cause === 'claude-signin') action = { label: 'Sign in to Claude', how: require('./claude-signin.js').how(), sec: 'account' };
123
123
  else if (h.cause === 'connector-missing') action = { label: 'Connect ' + name, how: 'Turn on its connector in your Claude connectors.', href: CONNECTORS };
124
124
  else if (h.cause === 'sign-in') action = { label: 'Reconnect ' + name, how: 'Sign in to its connector again in your Claude connectors.', href: CONNECTORS };
125
125
  else action = { label: 'Read ' + name + ' again', how: h.cause === 'manual' ? 'You chose to read it only when you press ↻.' : 'PMOS stopped after ' + n + ' tries.', read: true };