create-pmos 0.736.0 → 0.738.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 (37) hide show
  1. package/package.json +39 -99
  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 +38 -0
  7. package/workspace/guide/breakdown.md +7 -1
  8. package/workspace/guide/home.md +1 -0
  9. package/workspace/guide/layout.md +10 -3
  10. package/workspace/lib/use-log.js +26 -4
  11. package/workspace/package-lock.json +2 -2
  12. package/workspace/package.json +1 -1
  13. package/workspace/public/pm/action-keys.js +1 -1
  14. package/workspace/public/pm/bd-backlog.js +4 -0
  15. package/workspace/public/pm/bd-pop-ds.css +18 -0
  16. package/workspace/public/pm/bd-pop-ds.js +33 -3
  17. package/workspace/public/pm/cozy-day-pick.css +0 -1
  18. package/workspace/public/pm/cozy-ev.css +9 -0
  19. package/workspace/public/pm/cozy-nav.js +2 -0
  20. package/workspace/public/pm/cozy-pop-work.js +52 -23
  21. package/workspace/public/pm/focus-mode.js +161 -0
  22. package/workspace/public/pm/hi-pop.js +2 -2
  23. package/workspace/public/pm/home-app.js +5 -1
  24. package/workspace/public/pm/home-ini.js +9 -5
  25. package/workspace/public/pm/ini-tasks.js +20 -22
  26. package/workspace/public/pm/live-edit.js +280 -0
  27. package/workspace/public/pm/premium-board.js +12 -6
  28. package/workspace/public/pm/range-pick.css +50 -0
  29. package/workspace/public/pm/range-pick.js +155 -0
  30. package/workspace/public/pm/task-card.css +2 -19
  31. package/workspace/public/pm/task-card.js +16 -36
  32. package/workspace/stage-card-tasks-test.js +11 -11
  33. package/workspace/task-card-test.js +17 -10
  34. package/workspace/task-views-test.js +7 -5
  35. package/workspace/test-lists/edits-show-at-once.json +9 -0
  36. package/workspace/test-lists/focus-mode.json +9 -0
  37. package/workspace/test-lists/range-pick.json +5 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.736.0",
3
+ "version": "0.738.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,44 @@
33
33
  "audit"
34
34
  ],
35
35
  "pmosChanges": [
36
+ {
37
+ "v": "0.738.0",
38
+ "at": "2026-11-23T07:20:29.240Z",
39
+ "f": 4,
40
+ "prs": [
41
+ {
42
+ "n": 1639,
43
+ "t": "Every edit shows at once, and a failed save says so",
44
+ "s": "Every edit shows at once, and a failed save says so",
45
+ "k": "fix"
46
+ }
47
+ ]
48
+ },
49
+ {
50
+ "v": "0.737.0",
51
+ "at": "2026-11-23T06:47:33.938Z",
52
+ "f": 4,
53
+ "prs": [
54
+ {
55
+ "n": 1643,
56
+ "t": "Pick a task's start and due on one calendar, like depart and return",
57
+ "s": "Pick a task's start and due on one calendar, like depart and return",
58
+ "k": "new"
59
+ },
60
+ {
61
+ "n": 1633,
62
+ "t": "Focus mode, one item and its chat (A335)",
63
+ "s": "Focus mode, one item and its chat (A335)",
64
+ "k": "new"
65
+ },
66
+ {
67
+ "n": 1636,
68
+ "t": "One Overview block on the initiative popup that folds",
69
+ "s": "One Overview block on the initiative popup that folds",
70
+ "k": "new"
71
+ }
72
+ ]
73
+ },
36
74
  {
37
75
  "v": "0.736.0",
38
76
  "at": "2026-11-23T06:36:26.214Z",
@@ -404,104 +442,6 @@
404
442
  "k": "new"
405
443
  }
406
444
  ]
407
- },
408
- {
409
- "v": "0.713.0",
410
- "at": "2026-11-22T15:29:37.584Z",
411
- "f": 4,
412
- "prs": [
413
- {
414
- "n": 1568,
415
- "t": "Undo right on the item PMOS changed, for 24 hours (A456)",
416
- "s": "Undo right on the item PMOS changed, for 24 hours (A456)",
417
- "k": "new"
418
- },
419
- {
420
- "n": 1564,
421
- "t": "Offer to hide buttons not pressed in 14 days, with Undo and Show all (A454)",
422
- "s": "Offer to hide buttons not pressed in 14 days, with Undo and Show all (A454)",
423
- "k": "new"
424
- },
425
- {
426
- "n": 1571,
427
- "t": "Back restores your place (scroll and open sections)",
428
- "s": "Back restores your place (scroll and open sections)",
429
- "k": "new"
430
- },
431
- {
432
- "n": 1567,
433
- "t": "View preferences follow the person (job #1555)",
434
- "s": "View preferences follow the person (job #1555)",
435
- "k": "new"
436
- },
437
- {
438
- "n": 1570,
439
- "t": "Product switcher row with a quiet dot on products that need you (job #1547)",
440
- "s": "Product switcher row with a quiet dot on products that need you (job #1547)",
441
- "k": "new"
442
- },
443
- {
444
- "n": 1575,
445
- "t": "Set up a routine from one typed sentence (job #1546)",
446
- "s": "Set up a routine from one typed sentence (job #1546)",
447
- "k": "new"
448
- },
449
- {
450
- "n": 1566,
451
- "t": "Work breakdown follow-ups: drag to nest, hold to select, Gantt bars by days, grouping ✦, Jira column, Source filter, Set epic",
452
- "s": "Work breakdown follow-ups: drag to nest, hold to select, Gantt bars by days, grouping ✦, Jira column, Source filter, Set epic",
453
- "k": "new"
454
- },
455
- {
456
- "n": 1572,
457
- "t": "Launch tiers set what happens at full rollout (job #1548)",
458
- "s": "Launch tiers set what happens at full rollout (job #1548)",
459
- "k": "new"
460
- },
461
- {
462
- "n": 1565,
463
- "t": "One shared empty, loading and error block; the Viewer draws every state from it (job #1553)",
464
- "s": "One shared empty, loading and error block; the Viewer draws every state from it (job #1553)",
465
- "k": "new"
466
- },
467
- {
468
- "n": 1569,
469
- "t": "Five-line strategy above each product's Board, with a gentle note on new work that doesn't fit (job #1550)",
470
- "s": "Five-line strategy above each product's Board, with a gentle note on new work that doesn't fit (job #1550)",
471
- "k": "new"
472
- },
473
- {
474
- "n": 1573,
475
- "t": "Parked work keeps a reason and a way back (job #1552)",
476
- "s": "Parked work keeps a reason and a way back (job #1552)",
477
- "k": "new"
478
- },
479
- {
480
- "n": 1574,
481
- "t": "Phone initiative ask box no longer covers the page (release check 0.711.0)",
482
- "s": "Phone initiative ask box no longer covers the page (release check 0.711.0)",
483
- "k": "fix"
484
- }
485
- ]
486
- },
487
- {
488
- "v": "0.712.0",
489
- "at": "2026-11-22T14:42:19.445Z",
490
- "f": 4,
491
- "prs": [
492
- {
493
- "n": 1543,
494
- "t": "Phone Today opens first, Ask PMOS by work, and Work on the phone (job #1540)",
495
- "s": "Phone Today opens first, Ask PMOS by work, and Work on the phone (job #1540)",
496
- "k": "new"
497
- },
498
- {
499
- "n": 1556,
500
- "t": "Phone follow-up — tap for why and Undo on proposals, Work tab names, task without cards (job 1540)",
501
- "s": "Phone follow-up — tap for why and Undo on proposals, Work tab names, task without cards (job 1540)",
502
- "k": "new"
503
- }
504
- ]
505
445
  }
506
446
  ]
507
447
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@0387a15b
1
+ kernel-source: pmos@ee1d6712
2
2
  assembled: 2026-11-23
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-23T06:36:23Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-23T07:20:25Z"}
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-23T06:36:23Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-23T07:20:25Z"}
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-23T06:36:23Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-23T07:20:25Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,4 +1,42 @@
1
1
  [
2
+ {
3
+ "v": "0.738.0",
4
+ "at": "2026-11-23T07:20:29.240Z",
5
+ "f": 4,
6
+ "prs": [
7
+ {
8
+ "n": 1639,
9
+ "t": "Every edit shows at once, and a failed save says so",
10
+ "s": "Every edit shows at once, and a failed save says so",
11
+ "k": "fix"
12
+ }
13
+ ]
14
+ },
15
+ {
16
+ "v": "0.737.0",
17
+ "at": "2026-11-23T06:47:33.938Z",
18
+ "f": 4,
19
+ "prs": [
20
+ {
21
+ "n": 1643,
22
+ "t": "Pick a task's start and due on one calendar, like depart and return",
23
+ "s": "Pick a task's start and due on one calendar, like depart and return",
24
+ "k": "new"
25
+ },
26
+ {
27
+ "n": 1633,
28
+ "t": "Focus mode, one item and its chat (A335)",
29
+ "s": "Focus mode, one item and its chat (A335)",
30
+ "k": "new"
31
+ },
32
+ {
33
+ "n": 1636,
34
+ "t": "One Overview block on the initiative popup that folds",
35
+ "s": "One Overview block on the initiative popup that folds",
36
+ "k": "new"
37
+ }
38
+ ]
39
+ },
2
40
  {
3
41
  "v": "0.736.0",
4
42
  "at": "2026-11-23T06:36:26.214Z",
@@ -2,13 +2,19 @@
2
2
  type: Guide
3
3
  title: "An initiative's tasks"
4
4
  description: "Where an initiative's tasks show in the workspace, how an agent adds tasks, and who made a change."
5
- timestamp: 2026-11-22
5
+ timestamp: 2026-11-23
6
6
  ---
7
7
 
8
8
  # An initiative's tasks
9
9
 
10
10
  An initiative owns its task breakdown. In the workspace, its tasks show under the initiative in Home's list (the 3 most urgent, then **Show N more tasks**) and on the initiative's page in the Viewer. Press **+** at the top of Home's list, then **Task**, to add one. A check box is a task: amber when it is late. [Home](home.md) explains the list.
11
11
 
12
+ ## Changes show at once
13
+
14
+ A change you make shows right away, on every page that shows the task: its status, dates, owner, priority, sprint, name, stage or parent, a new task, a deleted task, and a move of several tasks. The case lines and the summary of an initiative show right away too. You do not have to wait for the save, and you do not have to open the popup again.
15
+
16
+ If the save fails, the change goes back and a message tells you why, for example "Not saved, so it is back as it was: the start is after the due day." Select **Try again** to send it again.
17
+
12
18
  ## Subtasks
13
19
 
14
20
  A task can sit under another task, at any depth. To add a subtask, type `under <parent>: <title>` in the add box of the Work breakdown, for example `under Batch 2: TM web`. To move a task, open its **More** menu and select **Make subtask of…** or **Move out of …**. With a mouse you can also drag a task in the List:
@@ -122,6 +122,7 @@ Press an initiative's name in the list, or open `?ini=<id>`. The list stays as i
122
122
  - **Tasks** show one row (one group) for each stage of the workflow, in order. Finished stages and later stages are never merged into one row; they start folded, and the current stage and any stage with a late task start open.
123
123
  - **Change a task where it is.** In the List, press a task's name. The row opens in place: change the name (Enter saves), the status, and the dates. Only one row is open at a time. Esc closes it. The ⋯ after the dates has **Milestone** (or **Make it a plain task**), **Move to a stage**, **Open the task card** and **Delete task**. A milestone has one date: its due day. Each change shows **Undo**.
124
124
  - In the List, a task's full name always shows: a long name wraps onto more lines. A short prefix such as "Bus shelter:" stays in the name, in grey. The dates show at the right. In a narrow panel or on a phone, the dates show under the name. On a computer, the Timeline's name column wraps a long name too, and its row grows; on a phone, each title stays on one line above its bar. On the Timeline, the blue Today line is your own day, from the clock of your device. Each bar starts on its start day and ends on its due day: a task that starts today starts at the Today line, and a bar, its grid line and its date at the top always meet on the same day. A task with no dates shows no date; open the row to set them.
125
+ - **Set the dates on one calendar.** Every date press of a task opens the same calendar: in the List, the Timeline, the task card and the work popup. Press the first day for the start and a second day for the due day, as you pick depart and return for a flight. The days between show as one band. A day before the start becomes the new start. Press **Start** or **Due** first to change only that end, or type a day such as "15 Oct" in it and press Enter. A milestone has one **Date**: one press sets it. **No date** clears the dates. Each press saves and shows **Undo**. The arrow keys move a day or a week, and Page Up and Page Down move a month. On a phone the calendar opens from the bottom of the screen.
125
126
  - **Add a task to a stage.** Press **+** on an open stage. The field opens at the top of that stage, with one row of chips under it. **Stage** is the stage you pressed + on; press it to pick another stage of the workflow. **Task** can change to **Milestone**: the box becomes ◇ and **Date** takes one day. **Dates** and **Owner** are optional; with no owner, the task is yours. Enter adds the task and keeps the field open for the next one. Esc closes the field.
126
127
  - **Move a task between stages.** On a computer, drag the grip at the left of a row. On a phone, press and hold the task's name, then drag. Drop it on a stage name to put it last in that stage, or between two rows to put it there. The status and the dates do not change. The message shows **Undo**.
127
128
  - A linked Jira ticket opens in place too. Its name and status stay Jira's ("In Progress in Jira · read 4 min ago"). Its dates can change, and it can be a milestone. It has no **Delete**.
@@ -170,17 +170,21 @@ A phone keeps its own layout. A shared read-only Board has no popup.
170
170
 
171
171
  On a computer the popup is built from the parts of the PMOS design system. The top line shows **Work ›**, the initiative's name, the **Initiative** chip and one line under it: the stage, the goal it is anchored to, when it opened and its owner. Press **Work** or ← to go back to the page.
172
172
 
173
- The left column has three blocks:
173
+ **Overview** is one block across the top. Press its name to fold it, and press it again to open it. PMOS keeps your choice for every initiative, on each device you use. When it is folded, it shows one line of **Where it stands**, and **1 suggestion** (or more) when PMOS has one; press that to open it. When it is open, it shows three parts side by side:
174
174
 
175
175
  - **Where it stands.** What is happening, in a few sentences. Then **Next**: the next three dates, a milestone as a diamond and the outcome check as a circle; press a milestone to open it. Then one suggestion from PMOS with **Why**, **PMOS will** and **Based on**. The pencil opens it so you can change it first, ✓ does it and ✕ drops it. Other suggestions are one link under it.
176
+ - **The case.** **Problem**, **Goal** and **Done when** from the initiative's records. Press a line to change it. A line not written offers a PMOS draft (✦) or ✕. When no line is written yet, one suggestion offers to draft them all from what is linked: ✓ sends the request to the chat, ✕ says not this, and the pencil lets you write it yourself. When the chat saves a line, the case shows it as soon as the chat's turn ends, with no reload and no commit. It also reads its lines again when you come back to the page.
177
+ - **Details.** The facts: dates, the next milestone, product, program, workflow and what is open.
178
+
179
+ Under it, the left column has two blocks:
180
+
176
181
  - **Stages.** Each stage of the workflow, with its dates under its name or "no dates yet", on a month scale with a red line for today. A stage's bar runs from the earliest start to the latest end of its tasks; a task with no start counts from its due date. Only a stage with no dated task uses the days the workflow moved through it. To change a stage's dates, change its tasks' dates. A stage has a bar only when it has real dates. A milestone is a diamond on its stage's row.
177
182
  - **Work breakdown.** **List** or **Gantt**; PMOS keeps your choice on this computer. **List** has one box on top: type a task and press Enter. Say its stage ("… in Plan"), or it goes to the stage in progress; start with ◇ to add a milestone. Each stage with tasks is one group that says how much is done, for example "1 of 3 done". Press the group to fold it, and press it again to open it. A stage whose tasks are all done is folded until you open it. In a stage, the tasks are in date order, a late task first. A done task stays in its place, in grey with a check. Stages with no tasks fold into one line at the end. Press the box before a task to mark it done, with **Undo**. Press its name to rename it: Enter saves and Escape cancels. When you point at the row, four icons show: **Who** (You, the people on this initiative, or **PMOS does it**, which gives the task to PMOS), **Due date**, **Stage** (moves the task to another stage) and ⋯ (**Status**, **Make it a milestone** and **Open the task**). Each change has **Undo**. A Jira ticket keeps its owner and stage from Jira. **Gantt** is the table described below, with its bars.
178
183
 
179
184
  Press the rest of a row, or a milestone, to open it as a full popup in place of the work side. Its top line has ←, the path (**Work › product › initiative**), the chat button, ⋯ and ×. ← or the initiative's name goes back to the initiative, where you left it. The chat button shows **Ask PMOS** beside it. × closes the popup. A task shows its status, dates, owner, notes and what changed. A milestone also shows its date and how many days are left, the done test, **Kill if**, and the suggestion from PMOS about it when there is one.
180
185
 
181
- The right column has two blocks:
186
+ The right column has one block:
182
187
 
183
- - **The case.** **Problem**, **Goal** and **Done when** from the initiative's records, then its facts (status, dates, the next milestone, goal, product, program, workflow and what is open). Press a line to change it. A line not written offers a PMOS draft (✦) or ✕. When no line is written yet, one suggestion offers to draft them all from what is linked: ✓ sends the request to the chat, ✕ says not this, and the pencil lets you write it yourself. When the chat saves a line, the card shows it as soon as the chat's turn ends, with no reload and no commit. It also reads its lines again when you come back to the page.
184
188
  - **Artefacts.** The brief, the prototype and the documents, each with its kind and date. A document the gate needs that nobody wrote is grey and says which gate. + adds a file, a link or a new document. After a merge, the merged file stands and says how many earlier files it holds, for example "7 earlier". An old file folds under it when its frontmatter has `superseded_by:` with the merged file's path, or when it opens with the merge's "superseded by" note. The merge suggestion then goes away by itself.
185
189
 
186
190
  On a phone, in a shared read-only copy and in a breakdown given the whole popup, the work side keeps the three parts below. They use the full width of the popup: in a wide popup the timeline gets the extra width. A done task shows in grey text, never struck through.
@@ -286,10 +290,13 @@ When the words you type in Search point clearly to one thing, the first row is t
286
290
  | S | Move the item you point at to the next sprint. |
287
291
  | P | Park the item you point at (put it on hold). |
288
292
  | Z | Undo the last change. |
293
+ | F | Focus on the item you point at: everything else hides, and only the item and its chat stay. Press F again, or the button at the top right, to see the whole page again where you left it. |
289
294
  | ? | Show these keys, and which of them work on this page. Esc, ? again or × closes the list. |
290
295
 
291
296
  Y, O, S, P and Z press the item's own button, so they work only where the item has that button. Point at the item, or tab to it, then press the key. Hover a button to see its key, for example **Open (O)**. After you use a key 3 times, its buttons stop showing it. Press **?** to see every key again. PMOS counts your key presses in the Use log on this computer.
292
297
 
298
+ Focus (F) keeps the item's panel and its chat. In a popup, the popup takes the whole window. On a list, the row you point at stays with the page's chat. The item's next Yes comes into view. When you close the item, the whole page comes back by itself. Focus is not on a phone.
299
+
293
300
  A key that you type in a field, or in a terminal, goes to the field or the terminal.
294
301
 
295
302
  ## On a phone
@@ -22,7 +22,9 @@
22
22
  * keys(lines, days, now) → { used, missed, pct } PURE, the action keys (bet A477)
23
23
  * CLI: node lib/use-log.js count → the distinct days with a line in the last KEEP_DAYS days, on its last line (the health number)
24
24
  * node lib/use-log.js keys [--days 7] → [action-keys] used n, [action-keys] missed n, then the hit percent on its last line
25
- * node lib/use-log.js control <id> [--days 7] → the uses of one control on its last line (day-tint: bet A339's health number) */
25
+ * node lib/use-log.js control <id> [--days 7] → the uses of one control on its last line (day-tint: bet A339's health number)
26
+ * node lib/use-log.js focus [--days 7] → [focus-mode] entered n, [focus-mode] missed n, then the hit percent on its last line (bet A335)
27
+ * focus(lines, days, now) → { entered, missed, pct } PURE, focus mode (bet A335) */
26
28
  const fs = require('fs');
27
29
  const path = require('path');
28
30
 
@@ -135,6 +137,20 @@ function keys(lines, days = 7, now = Date.now()) {
135
137
 
136
138
  module.exports.keys = keys;
137
139
 
140
+ /** PURE: focus mode (bet A335, pm/focus-mode.js) in the last `days` days: { entered, missed, pct }. entered = presses that turned focus on
141
+ * (control focus-on), missed = presses with nothing to focus on (focus-miss), pct = entered / (entered + missed), 100 when there were none. */
142
+ function focus(lines, days = 7, now = Date.now()) {
143
+ const from = now - Math.max(1, Number(days) || 7) * DAY;
144
+ let entered = 0, missed = 0;
145
+ for (const l of lines || []) {
146
+ if (!l || l.kind !== 'use' || !(Date.parse(l.at) >= from)) continue;
147
+ if (l.control === 'focus-on') entered++; else if (l.control === 'focus-miss') missed++;
148
+ }
149
+ return { entered, missed, pct: entered + missed ? Math.round((100 * entered) / (entered + missed)) : 100 };
150
+ }
151
+
152
+ module.exports.focus = focus;
153
+
138
154
  /** PURE: the uses of one control in the last `days` days (bet A339: `day-tint` is noted once per page open with the tint on). */
139
155
  function controlCount(lines, control, days = 7, now = Date.now()) {
140
156
  const from = now - Math.max(1, Number(days) || 7) * DAY;
@@ -146,12 +162,18 @@ if (require.main === module) {
146
162
  const cmd = process.argv[2];
147
163
  const usage = 'usage: node lib/use-log.js count (the distinct days with a line in the last ' + KEEP_DAYS + ' days)\n'
148
164
  + ' node lib/use-log.js keys [--days 7] (actions taken with a key, presses with nothing to act on, and the hit percent)\n'
149
- + ' node lib/use-log.js control <id> [--days 7] (the uses of one control, on the last line)';
150
- if (cmd !== 'count' && cmd !== 'keys' && !(cmd === 'control' && CONTROL_RE.test(process.argv[3] || ''))) { console.error(usage); process.exit(2); }
165
+ + ' node lib/use-log.js control <id> [--days 7] (the uses of one control, on the last line)\n'
166
+ + ' node lib/use-log.js focus [--days 7] (times focus mode was entered, presses with nothing to focus on, and the hit percent)';
167
+ if (cmd !== 'count' && cmd !== 'keys' && cmd !== 'focus' && !(cmd === 'control' && CONTROL_RE.test(process.argv[3] || ''))) { console.error(usage); process.exit(2); }
151
168
  const dir = require('./state-root.js').defaultRoot({ env: process.env });
152
169
  if (cmd === 'count') console.log(String(summary(readLines(dir)).days));
153
170
  else if (cmd === 'control') { const i = process.argv.indexOf('--days'); console.log(String(controlCount(readLines(dir), process.argv[3], i > 0 ? process.argv[i + 1] : 7))); }
154
- else {
171
+ else if (cmd === 'focus') {
172
+ const i = process.argv.indexOf('--days'), f = focus(readLines(dir), i > 0 ? process.argv[i + 1] : 7);
173
+ console.log('[focus-mode] entered ' + f.entered);
174
+ console.log('[focus-mode] missed ' + f.missed);
175
+ console.log(String(f.pct));
176
+ } else {
155
177
  const i = process.argv.indexOf('--days'), k = keys(readLines(dir), i > 0 ? process.argv[i + 1] : 7);
156
178
  console.log('[action-keys] used ' + k.used);
157
179
  console.log('[action-keys] missed ' + k.missed);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.736.0",
3
+ "version": "0.738.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.736.0",
9
+ "version": "0.738.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@anthropic-ai/sdk": "^1.3.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.736.0",
3
+ "version": "0.738.0",
4
4
  "private": true,
5
5
  "description": "PMOS Terminal Workspace — local companion hosting real PTYs beside the library and gates (D62)",
6
6
  "license": "MIT",
@@ -165,7 +165,7 @@ export function sheetHtml(here = new Set()) {
165
165
  return `<div class="pm-row"><h2 class="pm-h-sm" id="akTitle">Keys</h2>`
166
166
  + `<button type="button" class="pm-btn" data-ak-close aria-label="Close" title="Close">${X}</button></div>`
167
167
  + '<p class="pm-meta">Point at an item, or tab to it, then press its key.</p>'
168
- + `<ul>${KEYS.map((k) => row(k.key.toUpperCase(), k.say, here.has(k.act))).join('')}${row('?', 'This list')}</ul>`;
168
+ + `<ul>${KEYS.map((k) => row(k.key.toUpperCase(), k.say, here.has(k.act))).join('')}${row('F', 'Focus on this item')}${row('?', 'This list')}</ul>`; // F: pm/focus-mode.js (bet A335)
169
169
  }
170
170
 
171
171
  let started = false;
@@ -19,6 +19,7 @@ import { productName } from './scope-chip.js'; // the product's display name (
19
19
  import * as SP from './bd-sprint.js';
20
20
  import * as WS from './work-select.js'; // the bulk move with one Undo, shared with the initiative popup and This sprint (WorkBulkDS)
21
21
  import * as IF from './inline-fields.js'; // a task's sprint and priority, set in the row (initiative inline-sprint-priority)
22
+ import * as LE from './live-edit.js'; // a task's status or days show at once in the list, before it is read again; a failed save is put back
22
23
  import * as BD from './bd-backlog-ds.js'; // the Backlog from the system's parts (WorkBacklogDS) // the sprint overview while "This sprint" is on (initiative sprint-overview)
23
24
 
24
25
  const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' })[c]);
@@ -85,10 +86,12 @@ async function readOne(s, tries = 0) {
85
86
  if (status === 202 && tries < 8) { await new Promise((f) => setTimeout(f, 1500)); return readOne(s, tries + 1); }
86
87
  return r && r.ok ? r : null;
87
88
  }
89
+ LE.source({ model: () => DATA, redraw: () => { if (host && DATA && on()) draw(); } });
88
90
  export async function load() {
89
91
  if (SC) { if (SC.api.reload) await SC.api.reload(); return; } // an embedded list reads again through its own page
90
92
  if (!A || loading) return;
91
93
  loading = true;
94
+ const since = Date.now();
92
95
  const S = A.scope();
93
96
  const got = await Promise.all(S.map((s) => readOne(s)));
94
97
  loading = false; loadedAt = Date.now();
@@ -109,6 +112,7 @@ export async function load() {
109
112
  // ticks that left the list go with them
110
113
  const ids = new Set(DATA.tasks.map(uidOf)); for (const k of [...SEL]) if (!ids.has(k)) SEL.delete(k);
111
114
  drawSwitch(); if (on()) draw();
115
+ LE.loaded({ since }); // a change still saving stays on the new read
112
116
  }
113
117
 
114
118
  /* ── the switch in Work's header ──────────────────────────────────────────────────────────────────────────────── */
@@ -22,6 +22,24 @@ span.pwd-nx { cursor: default; }
22
22
  .pwd-mk.ring { border-radius: 50%; }
23
23
  .pwd-moresug { margin: 0; }
24
24
 
25
+ /* ── Overview: Where it stands, The case and the details across the top; the head folds it ── */
26
+ .pwd-ov { grid-column: 1 / -1; }
27
+ .pwd-ov > .pm-h-sm { margin: 0; }
28
+ .pwd-ovt { display: inline-flex; align-items: center; gap: var(--space-8); border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; border-radius: var(--radius-sm); }
29
+ .pwd-ovt:focus-visible { outline: none; box-shadow: var(--glow); }
30
+ .pwd-ovt > .pm-ic:first-child { color: var(--muted); }
31
+ .pwd-ovg { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(220px, 0.8fr); gap: var(--space-24); align-items: start; }
32
+ .pwd-ovp { display: flex; flex-direction: column; gap: var(--space-12); min-width: 0; }
33
+ .pwd-ovp > h3 { margin: 0; font-weight: var(--fw-strong); }
34
+ .pwd-ovp + .pwd-ovp { border-left: 1px solid var(--line); padding-left: var(--space-24); }
35
+ .pwd-ovs { gap: var(--space-12); flex-wrap: nowrap; min-width: 0; }
36
+ .pwd-ov1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
37
+ .pwd-ovs > .pw-lk { flex: none; }
38
+ .pwd-ov .grey { color: var(--muted); }
39
+ .pwd-ov .warn { color: var(--alert); }
40
+ @container (max-width: 860px) { .pwd-ovg { grid-template-columns: minmax(0, 1fr); } .pwd-ovp + .pwd-ovp { border-left: 0; padding-left: 0; } }
41
+ @media (max-width: 1100px) { .pwd-ovg { grid-template-columns: minmax(0, 1fr); } .pwd-ovp + .pwd-ovp { border-left: 0; padding-left: 0; } }
42
+
25
43
  /* ── Stages: the name and its dates on the left, the track on the right ── */
26
44
  .pwd-st { display: flex; flex-direction: column; }
27
45
  .pwd-sr { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; min-height: 52px; }
@@ -9,6 +9,7 @@
9
9
  * listHtml(rows, W, o) → the Work breakdown's List: one capture Input, one group per stage with tasks, empty stages folded into one line
10
10
  * wbsHead(view) → the Work breakdown's head: its name and the List / Gantt tabs
11
11
  * caseHtml(W, o) → The case: its lines (each editable), the facts; no line written: one Suggestion to draft them all
12
+ * overviewHtml(W, r, o) → Overview: Where it stands, The case and its facts in one block that folds; folded, the one-line summary
12
13
  * artsHtml(arts) → Artefacts: a List with Add in the head
13
14
  * stageKeyOf(text, st) → { key, name, title } the stage a captured line names ("… in Plan"), else the stage in progress
14
15
  *
@@ -80,7 +81,8 @@ export function sugHtml(s) {
80
81
  + `<dl>${row('Why', esc(s.why))}${row('PMOS will', will.length && !(will.length === 1 && will[0] === s.say) ? `<ul>${will.map((w) => `<li>${esc(w)}</li>`).join('')}</ul>` : '')}${row('Based on', esc(src), 'src')}</dl>`
81
82
  + `<div class="ans">${ans}</div></div>`;
82
83
  }
83
- export function standsHtml(W, r, o = {}) {
84
+ /** The three parts of Where it stands: the summary, the Next line, the first Suggestion (none when read-only) and "n more". */
85
+ function standsParts(W, r, o = {}) {
84
86
  const say = (W.summary && W.summary.text) || '';
85
87
  const nx = nextOf(r, W);
86
88
  const next = nx.length ? `<p class="pm-row pwd-next"><span class="pm-meta">Next</span>${nx.map((x) => {
@@ -91,6 +93,10 @@ export function standsHtml(W, r, o = {}) {
91
93
  }).join('')}</p>` : '';
92
94
  const s = (W.suggests || [])[0], more = Math.max(0, (W.suggests || []).length - 1) + (W.more || 0);
93
95
  const sug = o.ro ? '' : sugHtml(s) + (more ? `<p class="pwd-moresug"><button type="button" class="pw-lk" data-pw-props>${esc(plural(more, 'more suggestion', 'more suggestions'))}</button></p>` : '');
96
+ return { say, next, sug, n: o.ro ? 0 : (s && s.say ? 1 : 0) + more };
97
+ }
98
+ export function standsHtml(W, r, o = {}) {
99
+ const { say, next, sug } = standsParts(W, r, o);
94
100
  if (!say && !next && !sug) return '';
95
101
  return `<section class="pm-block pwd-blk pwd-stands" aria-label="Where it stands"><h2 class="pm-h-sm pm-row">${SV(I.star).replace('pm-ic', 'pm-ic pm-star')}Where it stands</h2>`
96
102
  + (say ? `<p class="pwd-say">${esc(say)}</p>` : '') + next + sug + '</section>';
@@ -240,7 +246,7 @@ export function sourceItems(c, f = 'all') {
240
246
  /* ── the side column ── */
241
247
  /** The case: the lines PMOS read from the records, each a press that edits it in place; a line not written offers a PMOS draft. No line
242
248
  * written: one Suggestion drafts them all (✓ sends the asks to Ask PMOS), ✕ says not now, the pencil starts the first line yourself. */
243
- export function caseHtml(W, o = {}) {
249
+ function caseParts(W, o = {}) {
244
250
  const ov = W.overview || { lines: [] }, dr = o.dropped || new Set(), oid = o.oid || '';
245
251
  const L = ov.lines || [], none = L.length && L.every((x) => !x.text);
246
252
  const sid = (x) => 'ov:' + oid + ':' + x.id;
@@ -263,7 +269,31 @@ export function caseHtml(W, o = {}) {
263
269
  }).join('');
264
270
  const F = (W.facts || []).filter((f) => f && f.k !== 'Stage' && !/^no signal$/i.test(String(f.v || '').trim()));
265
271
  const facts = F.length ? `<dl class="pwd-facts">${F.map((f) => `<dt>${esc(f.k)}</dt><dd>${f.act && !f.read && !o.ro ? `<button type="button" class="pw-lk" data-pw-fact="${esc(f.act)}">${esc(f.v)}</button>` : `<span class="${f.grey ? 'grey' : ''}${f.warn && !f.note ? ' warn' : ''}">${esc(f.v)}</span>`}${f.note ? ` <span class="pm-meta${f.warn ? ' warn' : ''}">${esc(f.note)}</span>` : ''}</dd>`).join('')}</dl>` : '';
266
- return `<section class="pm-block pwd-blk pwd-case" aria-label="The case"><h2 class="pm-h-sm">The case</h2>${top}${lines}${ov.status && !W.summary ? `<p>${esc(ov.status)}</p>` : ''}${facts}</section>`;
272
+ return { top, lines, status: ov.status && !W.summary ? `<p>${esc(ov.status)}</p>` : '', facts };
273
+ }
274
+ export function caseHtml(W, o = {}) {
275
+ const c = caseParts(W, o);
276
+ return `<section class="pm-block pwd-blk pwd-case" aria-label="The case"><h2 class="pm-h-sm">The case</h2>${c.top}${c.lines}${c.status}${c.facts}</section>`;
277
+ }
278
+
279
+ /* ── Overview: Where it stands, The case and the facts in one block that folds (Wawan, 2026-11-23) ── */
280
+ /** o: { open (default true), ro, oid, dropped }. Open: the three parts side by side. Folded: the one-line Where it stands, and a press
281
+ * that opens it when PMOS has a suggestion waiting. The block's head is the fold press (data-pw-ov). Nothing to show: ''. */
282
+ export function overviewHtml(W, r, o = {}) {
283
+ const s = standsParts(W, r, o), c = caseParts(W, o), open = o.open !== false;
284
+ if (!s.say && !s.next && !s.sug && !c.top && !c.lines && !c.status && !c.facts) return '';
285
+ const head = `<h2 class="pm-h-sm"><button type="button" class="pwd-ovt" data-pw-ov aria-expanded="${open}">${SV(open ? I.down : I.right, 16)}${SV(I.star).replace('pm-ic', 'pm-ic pm-star')}Overview</button></h2>`;
286
+ if (!open) {
287
+ const line = s.say || (W.overview && W.overview.status) || '';
288
+ const one = line ? `<p class="pwd-say pwd-ov1">${esc(line)}</p>` : s.next;
289
+ const sg = s.n ? `<button type="button" class="pw-lk" data-pw-ov>${esc(plural(s.n, 'suggestion', 'suggestions'))}</button>` : '';
290
+ return `<section class="pm-block pwd-blk pwd-ov shut" aria-label="Overview">${head}${one || sg ? `<div class="pm-row pwd-ovs">${one}${sg}</div>` : ''}</section>`;
291
+ }
292
+ const part = (cls, lbl, h) => (h ? `<div class="pwd-ovp ${cls}"><h3 class="pm-meta">${lbl}</h3>${h}</div>` : '');
293
+ const stands = part('pwd-ovw', 'Where it stands', (s.say ? `<p class="pwd-say">${esc(s.say)}</p>` : '') + s.next + s.sug);
294
+ const kase = part('pwd-ovc', 'The case', c.top + c.lines + c.status);
295
+ const facts = part('pwd-ovf', 'Details', c.facts);
296
+ return `<section class="pm-block pwd-blk pwd-ov" aria-label="Overview">${head}<div class="pwd-ovg">${stands}${kase}${facts}</div></section>`;
267
297
  }
268
298
  const iconOf = (a) => (a.link || /^link/i.test(a.kind || '') ? I.link : /slide|deck/i.test(a.kind || '') ? I.deck : /proto|design/i.test((a.kindName || '') + ' ' + (a.kind || '') + ' ' + (a.akind || '')) ? I.proto : I.doc);
269
299
  /** arts: the model's artefacts, in its order (each row's press is its index, as the popup's handler reads it). o: { ro, merge (the ✦ line) } */
@@ -25,4 +25,3 @@
25
25
  .sw .sw-b:hover { background: var(--cz-well); }
26
26
  .sw .sw-b[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--cz-blue) inset; font-weight: var(--fw-strong); }
27
27
  .sw-day:not(:empty) { margin-top: var(--space-8); }
28
- .pw-dp + .pw-dp { margin-top: var(--space-8); }
@@ -547,3 +547,12 @@
547
547
  .ev-keys.pm-ds { border: 0; border-radius: var(--radius-card); background: var(--card); color: var(--ink); box-shadow: var(--lift); padding: var(--space-24); width: fit-content; max-width: calc(100% - var(--space-32)); }
548
548
  .ev-keys.pm-ds > .pm-row { justify-content: space-between; }
549
549
  .ev-keys.pm-ds > ul { list-style: none; margin: var(--space-16) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-8); }
550
+
551
+ /* ── focus mode (pm/focus-mode.js, bet A335): f hides every part of the page except the item and its chat; f again puts it back.
552
+ * A hidden part carries data-pm-focus-off (and inert). The rail gives its width back, the popup takes the whole window, and the icon-only
553
+ * Leave focus button (pm-btn) sits at the top right, above the popup. Tokens only. ── */
554
+ html body.pm-focus [data-pm-focus-off] { display: none !important; }
555
+ body.pm-focus.cz-railon { --cz-railx: var(--space-16); }
556
+ body.pm-focus .cz-pop-card { inset: 0; border-radius: 0; }
557
+ .pm-focus-bar { position: fixed; top: var(--space-8); right: var(--space-8); z-index: 1000; }
558
+ .pm-focus-bar .pm-focus-leave { background: var(--card); color: var(--ink); box-shadow: var(--lift); }
@@ -46,6 +46,7 @@ import './draft-keep.js'; // forms-keep-drafts: every text box on every page k
46
46
  import { pmPost } from './http.js'; // Adler (batch 16 item 2): every toast carries his S face; Settings > Adler is read once
47
47
  import { startUseLog } from './use-log.js'; // bet A466: every page mounts the menu, so the menu starts the local use log (this computer only)
48
48
  import { startActionKeys } from './action-keys.js'; // bet A477: y o s p z act on the item under the pointer, ? lists the keys
49
+ import { startFocusMode } from './focus-mode.js'; // bet A335: f shows only the item under the pointer and its chat; f again puts the page back
49
50
 
50
51
  /* The six places (slice 1). A place shows once it has an href: Events, Library and Routine get theirs when their slice ships. Until then
51
52
  * Today is today.html (slice 5; Home before it), Work is the Board and Goals is premium-goals.html (slice 9; Intelligence before it); the keys stay the pages' own (home, board, insights). */
@@ -204,6 +205,7 @@ export function mountNav(here, doc = document, opts = {}) {
204
205
  mountToastFaces(doc); loadPrefs();
205
206
  startUseLog(doc);
206
207
  startActionKeys(doc);
208
+ startFocusMode(doc);
207
209
  const fab = w.querySelector('#czFab'), menu = w.querySelector('#czMenu'), scrim = w.querySelector('#czScrim');
208
210
  const draw = () => {
209
211
  N.rail = railOn();