create-pmos 0.669.0 → 0.670.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.669.0",
3
+ "version": "0.670.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": {
@@ -34,8 +34,8 @@
34
34
  ],
35
35
  "pmosChanges": [
36
36
  {
37
- "v": "0.669.0",
38
- "at": "2026-11-22T04:57:48.469Z",
37
+ "v": "0.670.0",
38
+ "at": "2026-11-22T05:07:36.130Z",
39
39
  "f": 4,
40
40
  "prs": [
41
41
  {
@@ -43,6 +43,12 @@
43
43
  "t": "Create-pmos picks the code profile itself; OKR template the board resolves",
44
44
  "s": "Create-pmos picks the code profile itself; OKR template the board resolves",
45
45
  "k": "new"
46
+ },
47
+ {
48
+ "n": 1463,
49
+ "t": "Settings is built from the design system's blocks",
50
+ "s": "Settings is built from the design system's blocks",
51
+ "k": "new"
46
52
  }
47
53
  ]
48
54
  },
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@057b0945
1
+ kernel-source: pmos@82978c76
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:07:32Z"}
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:07:32Z"}
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:07:32Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,7 +1,7 @@
1
1
  [
2
2
  {
3
- "v": "0.669.0",
4
- "at": "2026-11-22T04:57:48.469Z",
3
+ "v": "0.670.0",
4
+ "at": "2026-11-22T05:07:36.130Z",
5
5
  "f": 4,
6
6
  "prs": [
7
7
  {
@@ -9,6 +9,12 @@
9
9
  "t": "Create-pmos picks the code profile itself; OKR template the board resolves",
10
10
  "s": "Create-pmos picks the code profile itself; OKR template the board resolves",
11
11
  "k": "new"
12
+ },
13
+ {
14
+ "n": 1463,
15
+ "t": "Settings is built from the design system's blocks",
16
+ "s": "Settings is built from the design system's blocks",
17
+ "k": "new"
12
18
  }
13
19
  ]
14
20
  },
@@ -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
  |---|---|
@@ -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
 
@@ -7,13 +7,16 @@ timestamp: 2026-11-18
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` |
@@ -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
 
@@ -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 };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.669.0",
3
+ "version": "0.670.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.669.0",
9
+ "version": "0.670.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.669.0",
3
+ "version": "0.670.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",
@@ -371,7 +371,6 @@
371
371
  .cz .ev-gcap { flex-wrap: wrap; }
372
372
  .cz .ev-gcap .ev-small { flex: 1 1 160px; }
373
373
  .cz .ev-gbar { position: relative; flex: 1 1 200px; height: 8px; border-radius: 4px; background: var(--cz-well2, var(--cz-well)); overflow: hidden; }
374
- .cz .ev-gbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--cz-blue); }
375
374
  @media (max-width: 600px) { .cz .ev-trow:has(.ev-seg[aria-label="Grill by itself"]), .cz .ev-trow:has(.ev-seg[aria-label="Monthly credit for checks"]) { flex-wrap: wrap; } }
376
375
  /* Settings › Jev and Laya (canvas JlA1Empty–JlA4Phone): the key and Laya rows, Claude's ✦ for Laya, the repositories in one well */
377
376
  .ev-st .ev-jl-lead { margin: 0 0 8px; }
@@ -490,9 +489,6 @@
490
489
  }
491
490
  @media (min-width: 761px) and (max-height: 640px) { .pm-ds .cz-fabm.ev-menu.ev-rail a { height: 48px; } }
492
491
  /* Settings, one container (slice 1, board StSettings): each group of rows is one card with a thin border */
493
- .ev-st .ev-tcard { border-radius: 16px; background: var(--cz-card); box-shadow: inset 0 0 0 1px var(--cz-hair); overflow: hidden; margin: 6px 0 4px; flex: none; }
494
- .ev-st .ev-tcard > .ev-trow { padding-left: 18px; padding-right: 18px; margin: 0; border-radius: 0; }
495
- .ev-st .ev-tcard > .ev-trow:last-child { border-bottom: 0; }
496
492
  /* a published read-only copy (pm/readonly.js, html.ro) has no places to go to: no rail, and the page keeps its own left edge */
497
493
  @media (min-width: 761px) {
498
494
  html.ro body.cz-railon .cz-fabw { display: none !important; }
@@ -525,3 +521,21 @@
525
521
  body.cz-phmore .lb-bar, body.cz-phmore .evp-hd { padding-right: 48px; } /* so do Library and Events: their + sat under the ⋯ */
526
522
  body.cz-phmore .ev-scrim { background: rgba(42,46,53,.22); }
527
523
  }
524
+
525
+ /* Settings from the design system (settings-ds-page, board SettingsDS; pm/set-ds.js). The parts (pm-set, pm-tabs, pm-switch, pm-block,
526
+ * pm-sug, pm-badge, pm-path) come from komorebi.css; this only places them inside the dialog. */
527
+ .ev-st.pm-ds .ev-st-nav .pm-tab { height: auto; min-height: 36px; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-md); text-align: left; text-decoration: none; font-size: var(--fs-body); }
528
+ .ev-st.pm-ds .ev-st-nav .pm-tab[aria-current="page"] { background: var(--card); color: var(--ink); }
529
+ .ev-st.pm-ds .ev-st-nav .pm-tab .ev-k { margin-left: auto; }
530
+ .ev-st.pm-ds .ev-st-main { gap: 16px; }
531
+ .ev-st.pm-ds .ev-top .ev-grow { flex: 1; }
532
+ .ev-st.pm-ds .ev-trow.pm-set { padding: 8px 0; border-bottom: 0; }
533
+ .ev-st.pm-ds .pm-block > .pm-set:first-child, .ev-st.pm-ds .pm-block > .head + .pm-set { border-top: 0; }
534
+ .ev-st.pm-ds .pm-block .ev-lead { margin: 0; }
535
+ .ev-st.pm-ds .pm-block.list .ev-lead { padding: 0 16px 8px; }
536
+ .ev-st.pm-ds .pm-block.list .pm-li { min-height: 44px; }
537
+ .ev-st.pm-ds .pm-tabs { flex: none; }
538
+ .ev-st.pm-ds svg.ev-gbar { flex: 1 1 200px; height: 8px; }
539
+ .ev-st.pm-ds svg.ev-gbar .bg { fill: var(--well); }
540
+ .ev-st.pm-ds svg.ev-gbar .fg { fill: var(--leaf); }
541
+
@@ -197,7 +197,7 @@ export function connectorRows(sources, health, now = Date.now()) {
197
197
  const behind = (s.state === 'stale' || s.state === 'never') && s.id !== 'repository' && !mend && !sch.next_run;
198
198
  out.push({ id: s.id, name, trouble: 0, why: line && !mend && s.state !== 'building' ? line.text : '', when, act: behind ? read : null, ...(job ? { job } : {}) });
199
199
  }
200
- for (const i of alone) out.push({ id: 'issue:' + i.key, name: i.name || 'Background work', trouble: 3, why: i.why, when: '', act: i.key === 'signedout' ? { kind: 'sec', label: 'Open Settings › PMOS', sec: 'claude' } : null });
200
+ for (const i of alone) out.push({ id: 'issue:' + i.key, name: i.name || 'Background work', trouble: 3, why: i.why, when: '', act: i.key === 'signedout' ? { kind: 'sec', label: 'Open Settings › Your account', sec: 'account' } : null });
201
201
  return out.map((r, k) => ({ r, k })).sort((a, b) => (a.r.trouble || 9) - (b.r.trouble || 9) || a.k - b.k).map((x) => x.r);
202
202
  }
203
203
 
@@ -1,4 +1,8 @@
1
- /* pm/cozy-settings.js — Settings (initiative premium-uncovered-features, E3; canvas EvSettings). A dialog over the page, its sections on the left:
1
+ /* pm/cozy-settings.js — Settings (initiative premium-uncovered-features, E3; canvas EvSettings). A dialog over the page, its sections on the left.
2
+ * Drawn from the PMOS design system's parts since settings-ds-page (board SettingsDS; pm/set-ds.js, scope .pm-ds): the path Settings › section
3
+ * with Close on top, the section tabs at the left, each row a Settings row (pm-set) in a block, a choice as Tabs, an on/off as a switch. The
4
+ * PMOS section is now four: How PMOS decides (a Suggestion from what you kept, the kinds, Always yours, Lessons folded), Checks, Prototype
5
+ * rules and Your account (the Claude login and profile, the API key, Sharpen prompts). Each section below keeps every control it had:
2
6
  * General Theme (this device; the place menu's Theme row moved here, feedback batch 16 item 5). No "Viewer opens as": the popup is the one way (popup audit item 9)
3
7
  * (this device), Product (which products Home reads: the Products card), Your day (when the end-of-day card shows:
4
8
  * time.workEnd, POST /api/settings), Your impact (impact.on, POST /api/settings; canvas GmP1Switch, batch 16 item 7: the one switch
@@ -45,8 +49,8 @@
45
49
  * The card at the bottom of General says when an update is ready. While a source needs you (lib/source-heal.js), an amber box at the top of every other section names
46
50
  * it with its one action and what Claude tried, and the place menu opens Settings at Connectors. Every write is the PM's press (pmPost carries the launch nonce).
47
51
  * PMOS reads the sources and never posts to them.
48
- * openSettings(section?): general, claude, connectors, workspaces, updates; the old section names still land where their controls are now
49
- * (checks → Claude, scrolled to Checks; adler and jl → General's sub-panel; dress → Adler › Dress for the day; workflows → Workspaces › Workflows).
52
+ * openSettings(section?): general, claude (How PMOS decides), checks, rules, connectors, account, workspaces, updates; the old section names
53
+ * still land where their controls are now (adler and jl → General's sub-panel; dress → Adler › Dress for the day; workflows → Workspaces › Workflows).
50
54
  * openSettings('workflows', { wf, stage }) picks that workflow there and opens that stage once. */
51
55
  import { mountClaudeSetup } from './cozy-claude-setup.js';
52
56
  import * as JL from './cozy-jl.js';
@@ -58,6 +62,7 @@ import * as SW from './cozy-schedwork.js';
58
62
  import * as AD from './cozy-adler.js';
59
63
  import * as SE from './cozy-seasons.js';
60
64
  import { weeksOf, lineOf, storiesOf } from './upd-weeks.js';
65
+ import * as SD from './set-ds.js';
61
66
  import { relayState, relayLoad, relayHtml, relayClick } from './cozy-relay.js'; // event-relay (D110): Connectors › Listening
62
67
  import { extState, extLoad, extHtml, extClick } from './cozy-ext.js'; // meeting-buddy: Connectors › Google Meet, the Chrome extension set up from here
63
68
  const RL = relayState();
@@ -68,10 +73,10 @@ async function pmSend(method, path, body) {
68
73
  try { const res = await pressFetch(path, { method, ...(body === undefined ? {} : { body: JSON.stringify(body) }) }); const out = await res.json(); if (out && typeof out === 'object' && !res.ok) out.status = res.status; return out; }
69
74
  catch (e) { return { ok: false, error: 'could not reach the workspace server — ' + ((e && e.message) || String(e)) }; }
70
75
  }
71
- const SECTIONS = [['general', 'General'], ['claude', 'PMOS'], ['connectors', 'Connectors'], ['workspaces', 'Workspaces'], ['updates', 'Updates']];
76
+ const SECTIONS = SD.SECTIONS;
72
77
  const SUBS = { adler: 'Adler', jl: 'Jev and Laya', workflows: 'Workflows' }; // General › Extras and Workspaces › Workflows: each opens as a sub-panel of its section (U4, U1)
73
78
  const SRC = { calendar: 'Calendar', wispr: 'Wispr Flow', mail: 'Mail', slack: 'Slack', jira: 'Jira', confluence: 'Confluence', github: 'GitHub', drive: 'Google Drive', figma: 'Figma', website: 'Your websites' };
74
- const T = { el: null, sec: 'general', sub: '', ws: null, st: {}, src: null, con: {}, conn: [], set: null, prods: null, msg: '', busy: false, phase: '', say: '', back: null, fresh: null, reading: '', note: {}, info: false, fold: false, dir: null, q: '', cat: 'all', wait: null, dress: false, more: false, bday: false, dset: {}, wkOpen: new Set(), wkMore: new Set(), arc: false };
79
+ const T = { lsOpen: false, el: null, sec: 'general', sub: '', ws: null, st: {}, src: null, con: {}, conn: [], set: null, prods: null, msg: '', busy: false, phase: '', say: '', back: null, fresh: null, reading: '', note: {}, info: false, fold: false, dir: null, q: '', cat: 'all', wait: null, dress: false, more: false, bday: false, dset: {}, wkOpen: new Set(), wkMore: new Set(), arc: false };
75
80
  const cmpVer = (a, b) => { const x = String(a || '0').split('-')[0].split('.').map(Number), y = String(b || '0').split('-')[0].split('.').map(Number); for (let i = 0; i < 3; i++) if ((x[i] || 0) !== (y[i] || 0)) return (x[i] || 0) < (y[i] || 0) ? -1 : 1; return 0; };
76
81
  const home = () => (T.ws && T.ws[0] ? T.st[T.ws[0].id] : null);
77
82
  const latest = () => { const s = home(); return (s && (s.latest || (s.lastCheck && s.lastCheck.latest))) || null; };
@@ -90,9 +95,7 @@ function changes() {
90
95
  for (const e of [...((s.lastCheck && s.lastCheck.changes) || []), ...(s.latestChanges || []), ...(s.changes || [])]) if (e && e.v && !all.has(e.v)) all.set(e.v, e);
91
96
  return [...all.values()].sort((a, b) => cmpVer(b.v, a.v));
92
97
  }
93
- const seg = (label, key, cur, opts) => `<span class="ev-seg" role="group" aria-label="${esc(label)}">${opts.map(([k, w]) => `<button type="button" data-ev-seg="${key}" data-v="${k}" aria-pressed="${cur === k}">${esc(w)}</button>`).join('')}</span>`;
94
- const trow = (title, sub, right) => `<div class="ev-trow"><div class="ev-tx"><b>${esc(title)}</b>${sub ? `<p class="ev-small ev-mut">${esc(sub)}</p>` : ''}</div>${right}</div>`;
95
- const sw = (on, attrs, label) => `<button type="button" class="ev-sw" role="switch" aria-checked="${!!on}" aria-label="${esc(label)}" ${attrs}>${on ? 'On' : 'Off'}</button>`;
98
+ const seg = SD.seg, trow = SD.row, sw = SD.sw; // the system's Tabs, Settings row and switch (pm/set-ds.js)
96
99
 
97
100
  function general() {
98
101
  if (T.sub === 'adler') return T.dress ? dressSec() : subHead('adler') + adlerSec();
@@ -105,20 +108,20 @@ function general() {
105
108
  const pname = wsRow ? wsRow.name || wsRow.label || pageWs : !P ? 'Reading' : !P.length ? 'No product' : on.length === 1 ? on[0].name : !on.length ? (P.find((x) => x.primary) || P[0]).name : on.length + ' of ' + P.length + ' products';
106
109
  const we = T.set && Array.isArray(T.set.settings) ? T.set.settings.find((x) => x.key === 'time.workEnd') : null, end = we ? Number(we.value) : 18;
107
110
  const hours = []; for (let h = 13; h <= 23; h++) hours.push(h);
108
- const upd = ready() ? `<div class="ev-card ev-upd">${adFace('needs-you')}<span class="ev-pill y">Update</span><p><b>PMOS ${esc(latest())} is ready.</b> <span class="ev-mut">${esc(firstLine())}</span></p><button type="button" class="ev-btn sm" data-ev-go="updates">What's new</button><button type="button" class="ev-btn sm dark" data-ev-upd="update">${appBehind() ? 'Restart to update' : 'Update'}</button></div>` : '';
111
+ const upd = ready() ? `<div class="ev-card ev-upd">${adFace('needs-you')}<span class="pm-badge blue">Update</span><p><b>PMOS ${esc(latest())} is ready.</b> <span class="ev-mut">${esc(firstLine())}</span></p><button type="button" class="ev-btn sm" data-ev-go="updates">What's new</button><button type="button" class="ev-btn sm dark" data-ev-upd="update">${appBehind() ? 'Restart to update' : 'Update'}</button></div>` : '';
109
112
  return trow('Theme', 'Auto follows your computer', seg('Theme', 'theme', theme, [['light', 'Light'], ['dark', 'Dark'], ['auto', 'Auto']]))
110
113
  + trow('Product', 'Which products Today, Work and Goals read', `<button type="button" class="ev-pick" data-ev-products aria-haspopup="menu">${esc(pname)} ${svg(ICON.down, 14)}</button>`)
111
114
  + trow('Your day', 'When the end-of-day card shows', `<label class="ev-vh" for="evDay">Your day ends at</label><select id="evDay" class="ev-inp" data-ev-day>${hours.map((h) => `<option value="${h}"${h === end ? ' selected' : ''}>${pad(h)}:00</option>`).join('')}</select>`)
112
115
  + trow('Your impact', 'Adler’s sprout and your impact log. Only you see it. Nothing leaves PMOS.', sw(impactOn(), 'data-ev-impact', 'Your impact'))
113
- + trow('Agents write to Jira', 'Only after you press Commit. Never on their own.', (ready() ? '' : adFace('needs-you', 24)) + '<span class="ev-pill ok">Fixed</span>')
116
+ + trow('Agents write to Jira', 'Only after you press Commit. Never on their own.', (ready() ? '' : adFace('needs-you', 24)) + '<span class="pm-badge">Fixed</span>')
114
117
  + upd
115
- + '<h4>Extras</h4>'
118
+ + '<h4 class="pm-h-sm">Extras</h4>'
116
119
  + trow('Adler', 'How much of PMOS’s face shows, motion, celebrations, quiet hours and Dress for the day', subBtn('adler'))
117
120
  + trow('Jev and Laya', 'The TypeSafe key, Laya on this computer and the repositories it reads', subBtn('jl'));
118
121
  }
119
122
  /* General › Extras (U4): the row's › opens the sub-panel; its ‹ comes back to General */
120
- const subBtn = (k) => `<button type="button" class="ev-ib" data-ev-sub="${k}" aria-label="${esc(SUBS[k])}" title="${esc(SUBS[k])}">${svg(CHEV, 18)}</button>`;
121
- const subHead = (k) => `<div class="ev-dr-hd"><button type="button" class="ev-ib" data-ev-sub="" aria-label="Back to ${esc((SECTIONS.find((x) => x[0] === T.sec) || SECTIONS[0])[1])}" title="Back">${svg(BACK, 18)}</button><h4 class="ev-grow">${esc(SUBS[k])}</h4></div>`;
123
+ const subBtn = (k) => `<button type="button" class="ev-ib pm-btn" data-ev-sub="${k}" aria-label="${esc(SUBS[k])}" title="${esc(SUBS[k])}">${svg(CHEV, 18)}</button>`;
124
+ const subHead = (k) => `<div class="ev-dr-hd"><button type="button" class="ev-ib pm-btn" data-ev-sub="" aria-label="Back to ${esc((SECTIONS.find((x) => x[0] === T.sec) || SECTIONS[0])[1])}" title="Back">${svg(BACK, 18)}</button><h4 class="ev-grow">${esc(SUBS[k])}</h4></div>`;
122
125
  /* Your impact (GmP1Switch): on by default; off hides every impact surface and stops Claude's daily read */
123
126
  function impactOn() { const x = T.set && Array.isArray(T.set.settings) ? T.set.settings.find((y) => y.key === 'impact.on') : null; return x ? x.value !== false : true; }
124
127
  /** One Dress for the day press: POST /api/settings, keep the row, and tell the page (the event adler:dress) so Adler changes at once. */
@@ -135,12 +138,12 @@ async function saveDress(key, value, said = 'Saved.') {
135
138
  /* Settings > Adler (AdM5): four choices, each saved for this computer the moment it is pressed */
136
139
  function adlerSec() {
137
140
  const P = AD.prefs();
138
- return `<div class="ev-ad-hd">${AD.adler('handled', 48)}<p class="ev-small ev-mut">Adler is how PMOS shows its mood in PMOS. You choose how much of him you see.</p></div>`
141
+ return `<div class="ev-ad-hd">${AD.adler('handled', 48)}<p class="pm-meta">Adler is how PMOS shows its mood in PMOS. You choose how much of him you see.</p></div>`
139
142
  + trow('How much Adler', 'Face only keeps his face where PMOS speaks and drops the scenes. Off shows the plain mood dot.', seg('How much Adler', 'adler.amount', P['adler.amount'], [['full', 'Full'], ['face', 'Face only'], ['off', 'Off']]))
140
143
  + trow('Motion', 'Still stops every animation. Reduced motion on your computer always stops it.', seg('Motion', 'adler.motion', P['adler.motion'], [['system', 'Follow my computer'], ['still', 'Still']]))
141
144
  + trow('Celebrations', 'At most once a week, and only for a real event.', seg('Celebrations', 'adler.celebrate', P['adler.celebrate'], [['real', 'Real wins only'], ['never', 'Never']]))
142
145
  + trow('Quiet after', 'After this time, opening PMOS shows Adler asleep and nothing urgent.', seg('Quiet after', 'adler.quiet', P['adler.quiet'], [['22', '22:00'], ['never', 'Never']]))
143
- + trow('Dress for the day', dressLine(), `<button type="button" class="ev-ib" data-ev-dress="open" aria-label="Dress for the day" title="Dress for the day">${svg(CHEV, 18)}</button>`);
146
+ + trow('Dress for the day', dressLine(), `<button type="button" class="ev-ib pm-btn" data-ev-dress="open" aria-label="Dress for the day" title="Dress for the day">${svg(CHEV, 18)}</button>`);
144
147
  }
145
148
 
146
149
  /* ── Settings > Adler > Dress for the day (AsSet1): every switch is saved for this computer the moment it is pressed ── */
@@ -161,10 +164,10 @@ const dsw = (key, on, label) => sw(on, `data-ev-dsw="${key}"`, label);
161
164
  function dressSec() {
162
165
  const P = dp(), place = SE.placeOf(P), on = P['adler.dress.on'] !== false, full = P['adler.amount'] === 'full';
163
166
  const now = on && full ? SE.charmToday(Date.now(), P) : null, nx = on && full && !now ? SE.nextCharm(Date.now(), P) : null, c = now || nx;
164
- const head = `<div class="ev-dr-hd"><button type="button" class="ev-ib" data-ev-dress="back" aria-label="Back to Adler" title="Back">${svg(BACK, 18)}</button><h4 class="ev-grow">Dress for the day</h4>${dsw('adler.dress.on', on, 'Dress for the day')}</div>`;
165
- if (!on) return head + '<p class="ev-small ev-mut">Adler is plain every day.</p>';
166
- const banner = !full ? '<p class="ev-small ev-mut">How much Adler is not Full, so he does not dress up.</p>'
167
- : c ? `<div class="ev-dr-now">${AD.adler('handled', 48, { charm: c.key, label: false })}<p><b>${esc(now ? 'Today: ' + now.name : 'Next: ' + nx.name)}</b><span class="ev-small ev-mut">${esc(now ? 'He wears it until ' + dmy(now.until) + '.' : 'He wears it from ' + dmy(nx.from) + '.')}</span></p></div>` : '';
167
+ const head = `<div class="ev-dr-hd"><button type="button" class="ev-ib pm-btn" data-ev-dress="back" aria-label="Back to Adler" title="Back">${svg(BACK, 18)}</button><h4 class="ev-grow">Dress for the day</h4>${dsw('adler.dress.on', on, 'Dress for the day')}</div>`;
168
+ if (!on) return head + '<p class="pm-meta">Adler is plain every day.</p>';
169
+ const banner = !full ? '<p class="pm-meta">How much Adler is not Full, so he does not dress up.</p>'
170
+ : c ? `<div class="ev-dr-now">${AD.adler('handled', 48, { charm: c.key, label: false })}<p><b>${esc(now ? 'Today: ' + now.name : 'Next: ' + nx.name)}</b><span class="pm-meta">${esc(now ? 'He wears it until ' + dmy(now.until) + '.' : 'He wears it from ' + dmy(nx.from) + '.')}</span></p></div>` : '';
168
171
  const hol = SE.DAYS.filter((e) => e.group === 'holidays' && (e.where === '*' || e.where.includes(place.country)));
169
172
  const quiet = hol.filter((e) => e.kind === 'qt' && e.key !== 'seventh').map((e) => e.name);
170
173
  const sea = place.climate === 'tropics' ? (SE.DAYS.find((e) => e.key === 'monsoon').where.includes(place.country) ? 'Monsoon, Dec to early Mar' : 'None in the tropics where you are') : 'Spring, summer, autumn and winter';
@@ -173,9 +176,9 @@ function dressSec() {
173
176
  const cols = P['adler.dress.colors'] || ['blue', 'green'];
174
177
  const colSel = (i) => `<label class="ev-vh" for="evCol${i}">Colour ${i + 1}</label><select id="evCol${i}" class="ev-inp" data-ev-dcol="${i}">${SE.COLORS.map((k) => `<option value="${k}"${cols[i] === k ? ' selected' : ''}>${COLOR_NAMES[k]}</option>`).join('')}</select>`;
175
178
  const b = P['adler.dress.birthday'], bdate = b ? new Date(2000, +b.slice(0, 2) - 1, +b.slice(3)).toLocaleDateString('en-GB', { day: 'numeric', month: 'long' }) : '';
176
- const bday = b ? `<span class="ev-small">${esc(bdate)}</span><button type="button" class="ev-ib" data-ev-dress="bday-off" aria-label="Remove your birthday" title="Remove your birthday">${svg(CROSS, 16)}</button>`
179
+ const bday = b ? `<span class="ev-small">${esc(bdate)}</span><button type="button" class="ev-ib pm-btn" data-ev-dress="bday-off" aria-label="Remove your birthday" title="Remove your birthday">${svg(CROSS, 16)}</button>`
177
180
  : T.bday ? `<label class="ev-vh" for="evBday">Your birthday</label><input id="evBday" type="date" class="ev-inp" data-ev-bday>`
178
- : `<button type="button" class="ev-ib" data-ev-dress="bday" aria-label="Add your birthday" title="Add your birthday">${svg(PLUS, 18)}</button>`;
181
+ : `<button type="button" class="ev-ib pm-btn" data-ev-dress="bday" aria-label="Add your birthday" title="Add your birthday">${svg(PLUS, 18)}</button>`;
179
182
  const w = P['adler.dress.wear'], today = SE.wearNow('movie', Date.now(), P).value.day;
180
183
  const wear = (k, n) => { const worn = !!(w && w.key === k && w.day === today); return `<button type="button" class="ev-wear" data-ev-wear="${k}" aria-pressed="${worn}" aria-label="${esc((worn ? 'Take off ' : 'Wear ') + n + ' until midnight')}" title="${esc(n)}">${AD.adler('handled', 40, { charm: k, label: false })}<span class="ev-small">${esc(n)}</span></button>`; };
181
184
  const placeOpts = `<option value="">From my computer${place.auto && place.country ? ' (' + esc(SE.PLACES[place.country] || place.country) + ')' : ''}</option>` + Object.entries(SE.PLACES).map(([k, n]) => `<option value="${k}"${P['adler.dress.place'] === k ? ' selected' : ''}>${esc(n)}</option>`).join('');
@@ -186,35 +189,35 @@ function dressSec() {
186
189
  + trow('Seasons', sea, dsw('adler.dress.seasons', P['adler.dress.seasons'], 'Seasons'))
187
190
  + trow('Space and science days', 'Moon landing, Earth Day, Pi Day', dsw('adler.dress.science', P['adler.dress.science'], 'Space and science days'))
188
191
  + trow('School days', place.country === 'SG' ? "Teachers' Day, Children's Day" : "Singapore's Teachers' Day and Children's Day", dsw('adler.dress.school', P['adler.dress.school'], 'School days'))
189
- + trow('More festivals and national days', moreSub, `<button type="button" class="ev-ib" data-ev-dress="more" aria-expanded="${T.more}" aria-controls="evMore" aria-label="More festivals and national days" title="More festivals">${svg(T.more ? ICON.down : CHEV, 18)}</button>`)
192
+ + trow('More festivals and national days', moreSub, `<button type="button" class="ev-ib pm-btn" data-ev-dress="more" aria-expanded="${T.more}" aria-controls="evMore" aria-label="More festivals and national days" title="More festivals">${svg(T.more ? ICON.down : CHEV, 18)}</button>`)
190
193
  + (T.more ? `<div class="ev-dr-more" id="evMore">${more.map((x) => trow(x.name, x.here ? '' : 'Kept elsewhere', sw(x.on, `data-ev-dday="${x.key}"`, x.name))).join('')}</div>` : '')
191
194
  + trow('Big sports', (P['adler.dress.sports'] ? 'On' : 'Off') + ' · a scarf in your colours. No team marks', `<span class="ev-dr-pl">${colSel(0)}${colSel(1)}</span>${dsw('adler.dress.sports', P['adler.dress.sports'], 'Big sports')}`)
192
195
  + trow('Exam season', 'PSLE, O and A levels, late Sep to mid Nov', dsw('adler.dress.exam', P['adler.dress.exam'], 'Exam season'))
193
196
  + trow('Your PMOS day', 'A year since you started', dsw('adler.dress.pmosday', P['adler.dress.pmosday'] !== false, 'Your PMOS day'))
194
197
  + trow('Your birthday', b ? 'First in line on the day' : 'Not added', bday)
195
- + `<div class="ev-dr-wear"><div class="ev-trow"><b class="ev-grow">Wear now</b><span class="ev-small ev-mut">until midnight</span></div><div class="ev-dr-wbtns">${wear('movie', 'Movie night')}${wear('music', 'Music')}</div></div>`;
198
+ + `<div class="ev-dr-wear"><div class="ev-trow"><b class="ev-grow">Wear now</b><span class="pm-meta">until midnight</span></div><div class="ev-dr-wbtns">${wear('movie', 'Movie night')}${wear('music', 'Music')}</div></div>`;
196
199
  }
197
200
  const firstLine = () => { const c = changes().find((e) => e.v === latest()); const p = c && c.prs && c.prs[0]; return p ? (p.t || p.s || '') : ''; };
198
201
  /* each source's last read (FmA3Settings): the name, "read 09:41", the amber dot and ↻ on a stale or failed one */
199
202
  const RD = 'M20 12a8 8 0 1 1-2.3-5.7M20 4v5h-5';
200
203
  const INFO_I = 'M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18M12 11v5M12 8h.01';
201
- const readBtn = (id, label, cls = 'ev-ib') => `<button type="button" class="${cls}" data-ev-read="${esc(id)}" aria-label="${esc(label)}" title="${esc(label)}"${T.reading ? ' disabled' : ''}>${svg(RD, 18)}</button>`;
204
+ const readBtn = (id, label, cls = 'ev-ib pm-btn') => `<button type="button" class="${cls}" data-ev-read="${esc(id)}" aria-label="${esc(label)}" title="${esc(label)}"${T.reading ? ' disabled' : ''}>${svg(RD, 18)}</button>`;
202
205
  function readsHtml() {
203
206
  const s = T.fresh;
204
- if (!s) return '<p class="ev-small ev-mut">Reading when each source was last read.</p>';
205
- if (!s.ok) return `<p class="ev-small ev-mut">When each source was last read could not be read${s.error ? ': ' + esc(s.error) : ''}.</p>`;
207
+ if (!s) return '<p class="pm-meta">Reading when each source was last read.</p>';
208
+ if (!s.ok) return `<p class="pm-meta">When each source was last read could not be read${s.error ? ': ' + esc(s.error) : ''}.</p>`;
206
209
  const act = (x) => {
207
210
  const a = x.act;
208
211
  if (!a) return '<span class="ev-ib-sp" aria-hidden="true"></span>';
209
212
  if (a.kind === 'read') return readBtn(x.id, a.label);
210
213
  const at = a.kind === 'open' ? `href="${esc(a.href)}" target="_blank" rel="noopener"` : `href="#${esc(a.sec)}" data-ev-sec="${esc(a.sec)}"`;
211
- return `<a class="ev-ib" ${at} aria-label="${esc(a.label)}" title="${esc(a.label)}">${svg(ICON.open, 18)}</a>`;
214
+ return `<a class="ev-ib pm-btn" ${at} aria-label="${esc(a.label)}" title="${esc(a.label)}">${svg(ICON.open, 18)}</a>`;
212
215
  };
213
216
  // one list, trouble first (CnA): the amber dot, the one reason and the one action on a trouble row; the name and the time on a quiet one
214
217
  const rows = connectorRows(s.sources, s.health).map((x) => `<div class="ev-trow ev-fr${x.trouble ? ' ev-fr-t' : ''}" data-src="${esc(x.id)}"><span class="ev-gut">${x.trouble ? '<i class="ev-dot risk" aria-hidden="true"></i>' : ''}</span>`
215
218
  + `<div class="ev-tx ev-grow">${x.trouble ? `<b>${esc(x.name)}</b>` : `<span>${esc(x.name)}</span>`}${x.why ? `<p class="ev-small ev-why ${x.trouble ? 'ev-late' : 'ev-mut'}">${x.trouble ? '<span class="ev-vh">Needs a look: </span>' : ''}${esc(x.why)}</p>` : ''}${T.note[x.id] ? `<p class="ev-small" role="status">${esc(T.note[x.id])}</p>` : ''}</div>`
216
- + `${x.when ? `<span class="ev-small ev-mut">${esc(x.when)}</span>` : ''}${act(x)}${x.job ? `<button type="button" class="ev-ib" data-ev-sw="job:${esc(x.job)}" aria-label="${esc('Open ' + x.name + ': how often and when it runs next')}" title="How often and when it runs next">${svg(CHEV, 18)}</button>` : ''}</div>`).join('');
217
- return `<div class="ev-reads">${rows}</div>` + SW.swEntry();
219
+ + `${x.when ? `<span class="pm-meta">${esc(x.when)}</span>` : ''}${act(x)}${x.job ? `<button type="button" class="ev-ib pm-btn" data-ev-sw="job:${esc(x.job)}" aria-label="${esc('Open ' + x.name + ': how often and when it runs next')}" title="How often and when it runs next">${svg(CHEV, 18)}</button>` : ''}</div>`).join('');
220
+ return `<div class="ev-reads pm-block">${rows}</div>` + SW.swEntry();
218
221
  }
219
222
  /** The amber box at the top of Settings, only when the PM must act on a source (self-heal, feedback batch 26 item 7). While Claude
220
223
  * reads a source again by itself, or after it did, there is no box. The box names the one action and links to the exact place:
@@ -237,18 +240,18 @@ const CONNECT_URL = 'https://claude.ai/settings/connectors';
237
240
  const tile = (name) => `<span class="ev-cn-lg" aria-hidden="true">${esc(CD.letter(name))}</span>`;
238
241
  const slot = (name) => `<span class="ev-cn-slot" data-ev-listen-slot="${esc(name)}"></span>`; // the event relay's Listening (initiative event-relay)
239
242
  const plusBtn = (c) => T.wait && T.wait.id === c.id
240
- ? `<span class="ev-pill y ev-cn-wait" role="status">Waiting for ${esc(c.name)}</span>`
243
+ ? `<span class="pm-badge blue ev-cn-wait" role="status">Waiting for ${esc(c.name)}</span>`
241
244
  : `<a class="ev-ib ev-cn-add" href="${esc((T.dir && T.dir.connectUrl) || CONNECT_URL)}" target="_blank" rel="noopener" data-ev-cadd="${esc(c.id)}" aria-label="${esc('Connect ' + c.name + ' in your Claude account')}" title="${esc('Connect ' + c.name + ' in your Claude account')}">${svg(PLUS, 18)}</a>`;
242
245
  function propCards() {
243
246
  const ps = (T.dir && T.dir.proposals) || [];
244
- return ps.map((x) => `<div class="ev-cn-rec" data-ev-prop="${esc(x.name)}">${tile(x.label, x.label)}<div class="ev-grow"><b>${esc(x.label)} is connected.</b><p class="ev-small ev-mut">${svg(SPARK, 14)} PMOS proposes: ${esc(x.reads)}. Nothing reads it until you approve.</p></div>`
245
- + `<button type="button" class="ev-ib" data-ev-pno="${esc(x.name)}" aria-label="${esc('Not now: ' + x.label)}" title="Not now">${svg(CROSS, 18)}</button>`
247
+ return ps.map((x) => `<div class="ev-cn-rec" data-ev-prop="${esc(x.name)}">${tile(x.label, x.label)}<div class="ev-grow"><b>${esc(x.label)} is connected.</b><p class="pm-meta">${svg(SPARK, 14)} PMOS proposes: ${esc(x.reads)}. Nothing reads it until you approve.</p></div>`
248
+ + `<button type="button" class="ev-ib pm-btn" data-ev-pno="${esc(x.name)}" aria-label="${esc('Not now: ' + x.label)}" title="Not now">${svg(CROSS, 18)}</button>`
246
249
  + `<button type="button" class="ev-ib ev-cn-ok" data-ev-pok="${esc(x.name)}" aria-label="${esc('Approve: ' + x.reads)}" title="Approve">${svg(ICON.check, 18)}</button></div>`).join('');
247
250
  }
248
251
  function connList() {
249
252
  const D = CD.directory({ connected: (T.dir && T.dir.connected) || T.conn, signals: (T.dir && T.dir.signals) || [], q: T.q, cat: T.cat });
250
253
  const q = String(T.q || '').trim().toLowerCase(), cOk = (label) => (T.cat === 'all' || CD.catOf(label) === T.cat) && (!q || label.toLowerCase().includes(q));
251
- const row = (label, key, sub, right, name) => `<div class="ev-trow ev-cn-r">${tile(label, key)}<div class="ev-tx ev-grow"><b>${esc(label)}</b><p class="ev-small ev-mut">${esc(sub)}</p></div>${slot(name || key)}${right}</div>`;
254
+ const row = (label, key, sub, right, name) => `<div class="ev-trow ev-cn-r">${tile(label, key)}<div class="ev-tx ev-grow"><b>${esc(label)}</b><p class="pm-meta">${esc(sub)}</p></div>${slot(name || key)}${right}</div>`;
252
255
  // a connected connector that backs a brief source carries that source's switch; one that backs none, its own switch (as before)
253
256
  const list = (T.dir && T.dir.connected) || T.conn, backed = new Set(list.map((c) => c.source).filter(Boolean));
254
257
  const conRows = D.connected.map((c) => { const label = c.label || c.name;
@@ -260,24 +263,24 @@ function connList() {
260
263
  const looseRows = loose.map((k) => { const m = CD.matchOf(SRC[k]); return row(SRC[k], SRC[k], T.src[k] ? 'PMOS reads it on its own' : 'PMOS does not read it on its own', (m ? plusBtn(m) : '') + sw(T.src[k], `data-ev-src="${k}"`, SRC[k]), k); });
261
264
  const count = D.count;
262
265
  const head = `<div class="ev-cn-sec"><b class="ev-lbl ev-grow">Connected · ${count}</b>`
263
- + `<button type="button" class="ev-ib" data-ev-fold aria-expanded="${!T.fold}" aria-controls="evConMore" aria-label="${T.fold ? 'Show the connected ones' : 'Hide the connected ones'}" title="${T.fold ? 'Show the connected ones' : 'Hide the connected ones'}">${svg(T.fold ? CHEV : ICON.down, 18)}</button></div><p class="ev-small ev-mut ev-cn-note">Your sessions can use all of them. A switch chooses what PMOS reads on its own.</p>`;
264
- const conn = head + (T.fold && !q && T.cat === 'all' ? '' : `<div class="ev-cn-grp" id="evConMore">${conRows.join('') || '<p class="ev-small ev-mut ev-cn-none">None match.</p>'}</div>`)
266
+ + `<button type="button" class="ev-ib pm-btn" data-ev-fold aria-expanded="${!T.fold}" aria-controls="evConMore" aria-label="${T.fold ? 'Show the connected ones' : 'Hide the connected ones'}" title="${T.fold ? 'Show the connected ones' : 'Hide the connected ones'}">${svg(T.fold ? CHEV : ICON.down, 18)}</button></div><p class="pm-meta ev-cn-note">Your sessions can use all of them. A switch chooses what PMOS reads on its own.</p>`;
267
+ const conn = head + (T.fold && !q && T.cat === 'all' ? '' : `<div class="ev-cn-grp" id="evConMore">${conRows.join('') || '<p class="pm-meta ev-cn-none">None match.</p>'}</div>`)
265
268
  + (looseRows.length ? `<div class="ev-cn-sec"><b class="ev-lbl">More sources</b></div><div class="ev-cn-grp">${looseRows.join('')}</div>` : '');
266
- const add = (c, sub) => `<div class="ev-trow ev-cn-r">${tile(c.name, c.id)}<div class="ev-tx ev-grow"><b>${esc(c.name)}</b><p class="ev-small ev-mut">${esc(sub)}</p></div>${plusBtn(c)}</div>`;
269
+ const add = (c, sub) => `<div class="ev-trow ev-cn-r">${tile(c.name, c.id)}<div class="ev-tx ev-grow"><b>${esc(c.name)}</b><p class="pm-meta">${esc(sub)}</p></div>${plusBtn(c)}</div>`;
267
270
  D.forYou = D.forYou.filter((c) => !looseIds.has(c.id));
268
- const fy = D.forYou.length ? `<div class="ev-cn-sec"><b class="ev-lbl">For you</b></div><p class="ev-small ev-mut ev-cn-note">${svg(SPARK, 14)} PMOS suggests these from what you connected and what your initiatives link</p><div class="ev-cn-grp">${D.forYou.map((c) => add(c, c.why)).join('')}</div>` : '';
271
+ const fy = D.forYou.length ? `<div class="ev-cn-sec"><b class="ev-lbl">For you</b></div><p class="pm-meta ev-cn-note">${svg(SPARK, 14)} PMOS suggests these from what you connected and what your initiatives link</p><div class="ev-cn-grp">${D.forYou.map((c) => add(c, c.why)).join('')}</div>` : '';
269
272
  const rest = D.all.filter((c) => !looseIds.has(c.id));
270
273
  const all = rest.length ? `<div class="ev-cn-sec"><b class="ev-lbl">All connectors</b></div><div class="ev-cn-grp">${rest.map((c) => add(c, c.what)).join('')}</div>` : '';
271
274
  return conn + fy + all;
272
275
  }
273
276
  function connectors() {
274
277
  if (T.sub && T.sub.startsWith('sw:')) return SW.swBody(T.sub);
275
- const info = T.info ? `<p class="ev-small ev-mut ev-info" id="evConInfo">${esc(INFO)}</p>` : '';
276
- if (T.src === null) return info + readsHtml() + '<p class="ev-small ev-mut">Reading the connectors.</p>';
278
+ const info = T.info ? `<p class="pm-meta ev-info" id="evConInfo">${esc(INFO)}</p>` : '';
279
+ if (T.src === null) return info + readsHtml() + '<p class="pm-meta">Reading the connectors.</p>';
277
280
  const search = `<label class="ev-cn-search"><span class="ev-vh">Search connectors</span>${svg(ICON.search, 16)}<input type="search" class="ev-inp" id="evConQ" placeholder="Search connectors" value="${esc(T.q || '')}" autocomplete="off"></label>`;
278
281
  const chips = `<div class="ev-cn-chips" role="group" aria-label="Category">${CD.CATS.map(([k, l]) => `<button type="button" class="ev-chip${T.cat === k ? ' on' : ''}" data-ev-ccat="${k}" aria-pressed="${T.cat === k}">${esc(l)}</button>`).join('')}</div>`;
279
282
  return info + readsHtml() + propCards() + `<div class="ev-cn">${search}${chips}<div id="evConList">${connList()}</div>`
280
- + `<p class="ev-small ev-mut ev-cn-foot">PMOS keeps no passwords or keys. A connector is added in your Claude account: + opens that page, and PMOS notices when it is there.</p></div>`
283
+ + `<p class="pm-meta ev-cn-foot">PMOS keeps no passwords or keys. A connector is added in your Claude account: + opens that page, and PMOS notices when it is there.</p></div>`
281
284
  + extHtml(XT) + relayHtml(RL);
282
285
  }
283
286
  /** The directory's read; after a +, again every 5 s with the probe until the connector shows or 2 minutes pass. */
@@ -317,25 +320,25 @@ async function decideProp(name, ok) {
317
320
  }
318
321
  function workspaces() {
319
322
  if (T.sub === 'workflows') return subHead('workflows') + '<div class="ev-wfh" data-ev-wfhost></div>'; // pm/wf-page.js draws into it (UI grill U1)
320
- if (T.ws === null) return '<p class="ev-small ev-mut">Reading the repositories.</p>';
321
- return '<p class="ev-small ev-mut">A workspace is one repository PMOS works in. Removing one forgets the address only; the folder is not deleted.</p>'
322
- + T.ws.filter((x) => !x.linked).map((x) => trow(x.label || x.name || x.id, (x.root || '') + (x.home ? ' · home' : ''), x.home ? '<span class="ev-pill">Home</span>' : `<button type="button" class="ev-btn sm" data-ev-rm="${esc(x.id)}">Remove</button>`)).join('')
323
+ if (T.ws === null) return '<p class="pm-meta">Reading the repositories.</p>';
324
+ return '<p class="pm-meta">A workspace is one repository PMOS works in. Removing one forgets the address only; the folder is not deleted.</p>'
325
+ + T.ws.filter((x) => !x.linked).map((x) => trow(x.label || x.name || x.id, (x.root || '') + (x.home ? ' · home' : ''), x.home ? '<span class="pm-badge">Home</span>' : `<button type="button" class="ev-btn sm" data-ev-rm="${esc(x.id)}">Remove</button>`)).join('')
323
326
  + '<div class="ev-add"><label class="ev-vh" for="evRoot">Folder path of a repository</label><input id="evRoot" class="ev-inp" placeholder="Folder path of a repository"><button type="button" class="ev-btn pri" data-ev-add>Add</button></div>'
324
327
  + trow('Workflows', 'The stages each kind of initiative goes through', subBtn('workflows'));
325
328
  }
326
329
  function updates() {
327
330
  const s = home();
328
- if (!s) return '<p class="ev-small ev-mut">Reading the versions.</p>';
331
+ if (!s) return '<p class="pm-meta">Reading the versions.</p>';
329
332
  const app = (s.app && s.app.version) || '?', L = latest();
330
333
  const mood = T.phase === 'busy' || T.checking ? 'thinking' : ready() ? 'needs-you' : L ? 'handled' : '';
331
- const head = T.checking && T.phase !== 'busy' ? '<b>Checking for a new kit…</b><p class="ev-small ev-mut" role="status" aria-live="polite">Asking for the latest version.</p>' : T.phase === 'busy' ? `<b>Updating to ${esc(L)}</b><p class="ev-small ev-mut" role="status" aria-live="polite">${esc(T.say || 'Working.')}</p>`
332
- : ready() ? `<b>PMOS ${esc(L)} is ready</b><p class="ev-small ev-mut">You have ${esc(app)}.${appBehind() ? ' PMOS stops for about a minute while it installs. Open terminals keep running.' : ''}</p>`
333
- : L ? `<b>PMOS ${esc(app)} is up to date</b><p class="ev-small ev-mut">${fromGit() && s.appBehind ? esc(L) + ' is published. This PMOS runs from a checkout: update it with git pull.' : 'The newest published kit is ' + esc(L) + '.'}</p>`
334
- : `<b>PMOS ${esc(app)}</b><p class="ev-small ev-mut">Press Check now to ask for the latest version.</p>`;
334
+ const head = T.checking && T.phase !== 'busy' ? '<b>Checking for a new kit…</b><p class="pm-meta" role="status" aria-live="polite">Asking for the latest version.</p>' : T.phase === 'busy' ? `<b>Updating to ${esc(L)}</b><p class="pm-meta" role="status" aria-live="polite">${esc(T.say || 'Working.')}</p>`
335
+ : ready() ? `<b>PMOS ${esc(L)} is ready</b><p class="pm-meta">You have ${esc(app)}.${appBehind() ? ' PMOS stops for about a minute while it installs. Open terminals keep running.' : ''}</p>`
336
+ : L ? `<b>PMOS ${esc(app)} is up to date</b><p class="pm-meta">${fromGit() && s.appBehind ? esc(L) + ' is published. This PMOS runs from a checkout: update it with git pull.' : 'The newest published kit is ' + esc(L) + '.'}</p>`
337
+ : `<b>PMOS ${esc(app)}</b><p class="pm-meta">Press Check now to ask for the latest version.</p>`;
335
338
  const acts = T.phase === 'busy' ? '' : `<button type="button" class="ev-btn sm" data-ev-upd="check"${T.busy ? ' disabled' : ''}>Check now</button>${ready() ? `<button type="button" class="ev-btn sm dark" data-ev-upd="update">${appBehind() ? 'Restart to update' : 'Update'}</button>` : ''}`;
336
- const kits = (T.ws || []).filter((w) => !w.linked).map((w) => { const k = T.st[w.id], kit = k && k.kit; return trow(w.label || w.name || w.id, kit && kit.present ? 'kit ' + (kit.version || 'vendored by hand') : 'no kit in this workspace', k && k.kitBehind && L ? `<span class="ev-pill y">${esc(L)} ready</span>` : kit && kit.present && (k.lastCheck || k.latest) ? '<span class="ev-pill ok">Up to date</span>' : ''); }).join('');
339
+ const kits = (T.ws || []).filter((w) => !w.linked).map((w) => { const k = T.st[w.id], kit = k && k.kit; return trow(w.label || w.name || w.id, kit && kit.present ? 'kit ' + (kit.version || 'vendored by hand') : 'no kit in this workspace', k && k.kitBehind && L ? `<span class="pm-badge blue">${esc(L)} ready</span>` : kit && kit.present && (k.lastCheck || k.latest) ? '<span class="pm-badge">Up to date</span>' : ''); }).join('');
337
340
  const last = s.lastCheck ? 'Last checked ' + new Date(s.lastCheck.at).toLocaleString() + '. ' : '';
338
- return `<div class="ev-card ev-upd first">${mood ? adFace(mood) : ''}<div class="ev-tx ev-grow">${head}</div>${acts}</div>${kits}<p class="ev-small ev-mut">${esc(last)}${s.checkDaily ? 'PMOS checks when you open Updates and once a day while a page is open; Check now asks again.' : 'PMOS checks only when you press Check now.'}</p>${weeks()}`;
341
+ return `<div class="ev-card ev-upd first">${mood ? adFace(mood) : ''}<div class="ev-tx ev-grow">${head}</div>${acts}</div>${kits}<p class="pm-meta">${esc(last)}${s.checkDaily ? 'PMOS checks when you open Updates and once a day while a page is open; Check now asks again.' : 'PMOS checks only when you press Check now.'}</p>${weeks()}`;
339
342
  }
340
343
  /** Design E (UpE). A story line: a blue dot for New, an amber dot for Fixed, no dot for Improved; Claude's plain title, then the sentence. */
341
344
  const SPARK = 'M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8z';
@@ -357,7 +360,7 @@ function weekTop(w) {
357
360
  const { kit, latest: top, earlier } = storiesOf(w), dots = w.groups.new.length || w.groups.fix.length;
358
361
  const legend = dots ? '<div class="ev-leg" aria-hidden="true"><span><i class="ev-dot you"></i>New</span><span><i class="ev-dot risk"></i>Fixed</span><span>no dot: improved</span></div>' : '';
359
362
  const kitRow = top.length ? `<div class="ev-rel"><div class="ev-rv"><b>${esc(kit)}</b>${kit === latest() ? '<span class="ev-small">latest</span>' : ''}</div><ul class="ev-sl">${top.map(story).join('')}</ul></div>` : '';
360
- const more = earlier.length ? `<div class="ev-grp"><div class="ev-gh"><b>Earlier ${w.name === 'This week' ? 'this' : 'that'} week</b><span class="ev-small ev-mut">${earlier.length}</span></div>${storyList(earlier, w.key)}</div>` : '';
363
+ const more = earlier.length ? `<div class="ev-grp"><div class="ev-gh"><b>Earlier ${w.name === 'This week' ? 'this' : 'that'} week</b><span class="pm-meta">${earlier.length}</span></div>${storyList(earlier, w.key)}</div>` : '';
361
364
  return sumCard(w) + legend + kitRow + more;
362
365
  }
363
366
  /** An archived week: its newest kit's stories, then the rest with the highlights first. */
@@ -366,11 +369,11 @@ const archList = (x) => { const o = storiesOf(x); return [...o.latest, ...o.earl
366
369
  function weeks() {
367
370
  const s = home(), mine = s && s.app && !fromGit() ? s.app.version : null;
368
371
  const W = weeksOf(changes(), Date.now(), mine);
369
- if (!W.length) return '<p class="ev-small ev-mut">No kit summaries yet. Each kit published from now on carries one, and Check now reads the newest ones.</p>';
372
+ if (!W.length) return '<p class="pm-meta">No kit summaries yet. Each kit published from now on carries one, and Check now reads the newest ones.</p>';
370
373
  const [w, ...old] = W.slice(0, 13);
371
- const head = `<div class="ev-wkh"><b>${esc(w.name)}</b><span class="ev-small ev-mut">${esc([w.range, changesOf(w)].filter(Boolean).join(' · '))}</span>${w.newer ? '<span class="ev-pill y">Ready to install</span>' : ''}</div>`;
372
- const rows = old.map((x) => { const on = T.wkOpen.has(x.key); return `<div class="ev-wkr"><button type="button" class="ev-wkt" data-ev-wk="${esc(x.key)}" aria-expanded="${on}"><b>${esc(x.name)}</b><span class="ev-small ev-mut">${esc(x.range)}</span><span class="ev-small ev-mut ev-tl">${esc(changesOf(x))}</span>${svg(ICON.down, 14)}</button>${on ? sumCard(x) + storyList(archList(x), x.key) : ''}</div>`; }).join('');
373
- const arc = old.length ? `<div class="ev-arc"><button type="button" class="ev-arcb" data-ev-arc aria-expanded="${T.arc}"><b>Archive</b><span class="ev-small ev-mut">${old.length} earlier ${old.length === 1 ? 'week' : 'weeks'}</span>${svg(ICON.down, 14)}</button>${T.arc ? rows : ''}</div>` : '';
374
+ const head = `<div class="ev-wkh"><b>${esc(w.name)}</b><span class="pm-meta">${esc([w.range, changesOf(w)].filter(Boolean).join(' · '))}</span>${w.newer ? '<span class="pm-badge blue">Ready to install</span>' : ''}</div>`;
375
+ const rows = old.map((x) => { const on = T.wkOpen.has(x.key); return `<div class="ev-wkr"><button type="button" class="ev-wkt" data-ev-wk="${esc(x.key)}" aria-expanded="${on}"><b>${esc(x.name)}</b><span class="pm-meta">${esc(x.range)}</span><span class="pm-meta ev-tl">${esc(changesOf(x))}</span>${svg(ICON.down, 14)}</button>${on ? sumCard(x) + storyList(archList(x), x.key) : ''}</div>`; }).join('');
376
+ const arc = old.length ? `<div class="ev-arc"><button type="button" class="ev-arcb" data-ev-arc aria-expanded="${T.arc}"><b>Archive</b><span class="pm-meta">${old.length} earlier ${old.length === 1 ? 'week' : 'weeks'}</span>${svg(ICON.down, 14)}</button>${T.arc ? rows : ''}</div>` : '';
374
377
  return `<div class="ev-wk">${head}${weekTop(w)}${arc}</div>`;
375
378
  }
376
379
  /* Settings › Claude › How Claude decides (AwG): one row per kind of change Claude made by itself, with what it made and you kept and the way
@@ -387,17 +390,25 @@ const ALWAYS = [['Start a new request', 'PMOS recommends. You decide.'], ['Say i
387
390
  ['Move what the team reads', 'Stages and dates in Jira or on the Board.'], ['Merge, delete or spend', '']];
388
391
  function lessonRow(l) {
389
392
  const [wrong, ...rest] = String(l.text || '').split(/\n+/); // a lesson's first line says what went wrong, the rest what changed
390
- return `<div class="ev-trow"><div class="ev-tx ev-ls"><b>${esc([dayOf(l.at), l.product].filter(Boolean).join(' · '))}</b><p class="ev-small${rest.length ? ' ev-ms' : ''}">${esc(wrong)}</p>${rest.length ? `<p class="ev-small ev-nx">${esc(rest.join(' '))}</p>` : ''}</div></div>`;
393
+ return `<div class="pm-li"><span class="txt"><span class="t">${esc(wrong)}</span>${rest.length ? `<span class="w">${esc(rest.join(' '))}</span>` : ''}</span><span class="pm-meta">${esc([dayOf(l.at), l.product].filter(Boolean).join(' · '))}</span></div>`;
391
394
  }
395
+ const NO_KEY = 'pmos.settings.no';
396
+ const noSet = () => { try { return new Set(JSON.parse(store.get(NO_KEY) || '[]')); } catch { return new Set(); } };
392
397
  function decidesSec() {
393
398
  const K = T.ck;
394
- const kinds = !K ? '<p class="ev-small ev-mut">Reading what PMOS did by itself.</p>' : K.ok === false ? `<p class="ev-small ev-mut">What PMOS did could not be read: ${esc(K.error || 'the server did not answer')}.</p>`
395
- : !K.kinds.length ? '<p class="ev-small ev-mut">PMOS has not changed anything by itself yet. Each kind of change shows here once it has.</p>'
396
- : K.kinds.map((k) => trow(k.label, kindSub(k, K.showUntil || 3), seg(k.label, 'claude.way:' + k.kind, k.way, WAY))).join('');
399
+ const kinds = !K ? '<p class="pm-meta">Reading what PMOS did by itself.</p>' : K.ok === false ? `<p class="pm-meta">What PMOS did could not be read: ${esc(K.error || 'the server did not answer')}.</p>`
400
+ : !K.kinds.length ? '<p class="pm-meta">PMOS has not changed anything by itself yet. Each kind of change shows here once it has.</p>'
401
+ : K.kinds.map((k) => trow(k.label, SD.kindMeta(k) + ' · ' + kindSub({ ...k, made: 0 }, K.showUntil || 3), seg(k.label, 'claude.way:' + k.kind, k.way, WAY))).join('');
397
402
  const L = T.ls && T.ls.ok ? T.ls.lessons || [] : [];
398
- return '<h4>How PMOS decides</h4><p class="ev-small ev-mut ev-lead">PMOS picks for each kind of change from what you kept and undid. Two Undos on a kind and it asks first for 7 days. You can set any kind yourself.</p>'
399
- + kinds + '<h4>Always yours</h4>' + ALWAYS.map(([b, p]) => trow(b, p, '<span class="ev-pill">Always asks</span>')).join('')
400
- + (L.length ? '<h4>Lessons</h4>' + L.slice(0, 8).map(lessonRow).join('') : '');
403
+ const sug = K && K.ok !== false && K.kinds ? SD.sugHtml(SD.sugOf(K.kinds, noSet())) : '';
404
+ const lessons = L.length ? `<section class="pm-block list" aria-label="Lessons"><div class="head"><h3 class="pm-h-sm">Lessons</h3><span class="pm-meta">${L.length > 8 ? 8 : L.length}</span></div>`
405
+ + `<p class="pm-meta ev-lead">When you undo or edit what PMOS did, it writes a lesson and uses it next time.</p>`
406
+ + (T.lsOpen ? `<div class="rows">${L.slice(0, 8).map(lessonRow).join('')}</div>` : '')
407
+ + `<button type="button" class="pm-fold" data-ev-lsfold aria-expanded="${T.lsOpen}">${T.lsOpen ? 'Hide the lessons' : `See the ${L.length > 8 ? 8 : L.length} ${L.length === 1 ? 'lesson' : 'lessons'}`}</button></section>` : '';
408
+ return sug
409
+ + `<section class="pm-block" aria-label="Changes PMOS makes"><div class="head"><h3 class="pm-h">Changes PMOS makes by itself</h3></div><p class="pm-meta ev-lead">For each kind, how many PMOS made and how many you kept. Quietly: it does it and you can Undo. Show me: it does it and tells you. Ask first: it waits for your yes. Two Undos on a kind and it asks first for 7 days.</p>${kinds}</section>`
410
+ + `<section class="pm-block" aria-label="Always yours"><div class="head"><h3 class="pm-h">Always yours</h3></div><p class="pm-meta ev-lead">PMOS never does these alone, whatever you set above.</p>${ALWAYS.map(([b, p]) => trow(b, p, '<span class="pm-badge">Always asks</span>')).join('')}</section>`
411
+ + lessons;
401
412
  }
402
413
  /** A press on a kind's way: the PM's way is kept, unless it is the automatic one (then the kind follows the automatic way again). */
403
414
  async function saveWay(kind, v) {
@@ -412,9 +423,9 @@ async function saveWay(kind, v) {
412
423
  }
413
424
  /* Settings > Claude: which Claude profile PMOS starts Claude sessions with, and the API key for Claude's own runs (D101).
414
425
  * The key is typed here and goes to this computer only; the page never gets it back, only whether one is set and where from. */
415
- function claudeSec() {
426
+ function accountSec() {
416
427
  const C = T.cl;
417
- if (!C) return '<p class="ev-small ev-mut">Reading the profiles and the key.</p>';
428
+ if (!C) return '<p class="pm-meta">Reading the profiles and the key.</p>';
418
429
  const ps = C.profiles || [], pref = (C.prefs && C.prefs.claude) || '';
419
430
  const opts = `<option value=""${pref ? '' : ' selected'}>No profile</option>` + ps.map((x) => `<option value="${esc(x.id)}"${x.id === pref ? ' selected' : ''}>${esc(x.label || x.id)}${x.account ? ' · ' + esc(x.account) : ''}</option>`).join('');
420
431
  const gone = pref && !ps.some((x) => x.id === pref);
@@ -422,12 +433,10 @@ function claudeSec() {
422
433
  const k = C.key || {};
423
434
  const keySub = k.present ? (k.source === 'environment' ? 'Set in ANTHROPIC_API_KEY. A key saved here is used first.' : 'Saved on this computer only. PMOS never shows it again.') : 'Not set. PMOS\u2019s own runs, such as Grill, use a Claude session instead.';
424
435
  const keyRight = `<span class="ev-dr-pl"><label class="ev-vh" for="evKey">Anthropic API key</label><input id="evKey" class="ev-inp" type="password" autocomplete="off" spellcheck="false" placeholder="${k.present ? 'Replace the key' : 'sk-ant-\u2026'}" data-ev-key><button type="button" class="ev-btn sm pri" data-ev-keysave>Save</button>${k.source === 'settings' ? '<button type="button" class="ev-btn sm" data-ev-keyclear>Remove</button>' : ''}</span>`;
425
- return decidesSec() + '<h4>Claude login and profile</h4><div data-claude-setup></div>'
436
+ return '<h4 class="pm-h-sm">Claude login and profile</h4><div data-claude-setup></div>'
426
437
  + trow('API key', keySub, keyRight)
427
- + (k.present && C.off ? trow('Runs on the API', 'Off: PMOS_GRILL_API is off in the environment.', '<span class="ev-pill">Off</span>') : '')
428
- + sharpenRows()
429
- + '<h4 id="evChecks">Checks</h4>' + checksSec() // U4: the section Claude’s checks folded in here
430
- + '<h4 id="evProtoRules">Prototype rules</h4>' + protoRulesSec();
438
+ + (k.present && C.off ? trow('Runs on the API', 'Off: PMOS_GRILL_API is off in the environment.', '<span class="pm-badge">Off</span>') : '')
439
+ + sharpenRows();
431
440
  }
432
441
  /* Settings › PMOS › Prototype rules (initiative prototype-rules, design "Prototypes right on the first try", board FtB): each correction of
433
442
  * the PM's that is true of every prototype, as a check PMOS runs on each version before it opens (lib/prototype-rules.js). Each row is the
@@ -435,13 +444,13 @@ function claudeSec() {
435
444
  * with Bring back, and PMOS does not add it again unless the PM says it again. GET and POST /api/lab/rules. */
436
445
  function protoRulesSec() {
437
446
  const R = T.pru;
438
- if (!R) return '<p class="ev-small ev-mut">Reading your prototype rules.</p>';
439
- if (R.ok === false) return `<p class="ev-small ev-mut">Your prototype rules could not be read: ${esc(R.error || 'the server did not answer')}.</p>`;
447
+ if (!R) return '<p class="pm-meta">Reading your prototype rules.</p>';
448
+ if (R.ok === false) return `<p class="pm-meta">Your prototype rules could not be read: ${esc(R.error || 'the server did not answer')}.</p>`;
440
449
  const on = R.rules.filter((r) => r.on), off = R.rules.filter((r) => !r.on);
441
450
  const sub = (r) => [r.words ? '“' + r.words + '”' : '', dayOf(r.at)].filter(Boolean).join(' · ');
442
- return '<p class="ev-small ev-mut ev-lead">PMOS checks every prototype version against these before you see it, and fixes it once when one fails. Each comes from your own words in the chat.</p>'
451
+ return '<p class="pm-meta ev-lead">PMOS checks every prototype version against these before you see it, and fixes it once when one fails. Each comes from your own words in the chat.</p>'
443
452
  + (on.length ? on.map((r) => trow(r.title, sub(r), `<button type="button" class="ev-btn sm" data-ev-pru="undo" data-ev-pru-id="${esc(r.id)}" aria-label="${esc('Undo the rule ' + r.title)}">Undo</button>`)).join('')
444
- : '<p class="ev-small ev-mut">No rules now. Each correction you make that is true of every prototype shows here.</p>')
453
+ : '<p class="pm-meta">No rules now. Each correction you make that is true of every prototype shows here.</p>')
445
454
  + off.map((r) => trow(r.title, 'You undid it' + (r.undoneAt ? ' on ' + dayOf(r.undoneAt) : '') + '. PMOS adds it again only when you say it again.', `<button type="button" class="ev-btn sm" data-ev-pru="restore" data-ev-pru-id="${esc(r.id)}" aria-label="${esc('Bring back the rule ' + r.title)}">Bring back</button>`)).join('');
446
455
  }
447
456
  async function saveProtoRule(op, id) {
@@ -463,11 +472,11 @@ function sharpenRows() {
463
472
  const shSub = !on ? (down && down.auth ? 'Off for now: your API key was refused. Replace it under API key above.' : 'Off. No spinner and no Sharper card.')
464
473
  : 'When you pause on a rough prompt, PMOS writes a sharper version above the box. It runs in your Claude session and takes a few seconds.';
465
474
  const styleSub = style === 'polish' ? 'Clearer and shorter, your meaning kept.' : style === 'own' ? (rules.trim() ? 'Your rules below.' : 'Write your rules below first.') : 'Builds the best prompt for the job.';
466
- return '<h4>Sharpen prompts</h4>'
475
+ return '<h4 class="pm-h-sm">Sharpen prompts</h4>'
467
476
  + trow('Suggest the next prompt', 'After a reply, up to two prompts above the box. A tap puts one in the box. Nothing sends.', sw(next, 'data-ev-np="prompt.next"', 'Suggest the next prompt'))
468
477
  + trow('Sharpen as I type', shSub, sw(on, 'data-ev-np="prompt.sharpen"', 'Sharpen as I type'))
469
478
  + trow('Sharpen as', styleSub, seg('Sharpen as', 'prompt.style', style, [['polish', 'Polish'], ['engineer', 'Prompt engineer'], ['own', 'Your own']]))
470
- + `<div class="ev-trow"><div class="ev-tx"><label for="evRules"><b>Your own rules</b></label><p class="ev-small ev-mut">For Your own. For example: short, always name the initiative, ask for sources.</p>`
479
+ + `<div class="ev-trow"><div class="ev-tx"><label for="evRules"><b>Your own rules</b></label><p class="pm-meta">For Your own. For example: short, always name the initiative, ask for sources.</p>`
471
480
  + `<textarea id="evRules" class="ev-inp ev-rules" rows="3" maxlength="1000" spellcheck="true">${esc(rules)}</textarea></div><button type="button" class="ev-btn sm pri" data-ev-rulesave>Save</button></div>`;
472
481
  }
473
482
  async function savePrompt(key, value, said) {
@@ -484,31 +493,32 @@ const CAPS = [5, 10, 20, 50];
484
493
  const usd = (n) => '$' + (Math.round(Number(n) * 100) % 100 ? Number(n).toFixed(2) : String(Math.round(Number(n))));
485
494
  function checksSec() {
486
495
  const C = T.gr;
487
- if (!C) return '<p class="ev-small ev-mut">Reading PMOS’s checks.</p>';
488
- if (C.ok === false) return `<p class="ev-small ev-mut">PMOS’s checks could not be read: ${esc(C.error || 'the server did not answer')}.</p>`;
496
+ if (!C) return '<p class="pm-meta">Reading PMOS’s checks.</p>';
497
+ if (C.ok === false) return `<p class="pm-meta">PMOS’s checks could not be read: ${esc(C.error || 'the server did not answer')}.</p>`;
489
498
  const caps = [...new Set(CAPS.concat(Number.isFinite(C.cap) ? [C.cap] : []))].sort((a, b) => a - b);
490
499
  const modeSub = C.envOff ? 'Off: PMOS_GRILL is off in the environment.' : 'Before an initiative leaves a stage, when a forecast turns, when scope or dates move a lot, and once a month on running work that feels off. Findings wait under ✦.';
491
500
  const used = Number.isFinite(C.cap) && C.cap > 0 ? Math.min(100, Math.round((C.spent / C.cap) * 100)) : 0;
492
- return trow('Grill by itself', modeSub, C.envOff ? '<span class="ev-pill">Off</span>' : seg('Grill by itself', 'grill.mode', C.mode, [['full', 'Full'], ['exits', 'Only at stage exits'], ['off', 'Off']]))
501
+ return trow('Grill by itself', modeSub, C.envOff ? '<span class="pm-badge">Off</span>' : seg('Grill by itself', 'grill.mode', C.mode, [['full', 'Full'], ['exits', 'Only at stage exits'], ['off', 'Off']]))
493
502
  + trow('Monthly credit for checks', C.paused ? 'Paused at the limit this month. PMOS starts again next month, or when you raise it.' : 'At the limit PMOS pauses and says so once. It never charges beyond it.', seg('Monthly credit for checks', 'grill.cap', C.cap, caps.map((v) => [v, usd(v)])))
494
- + `<div class="ev-trow ev-gcap"><span class="ev-small"><b>${esc(usd(C.spent))}</b> of ${esc(usd(C.cap))} used this month</span><span class="ev-gbar" role="img" aria-label="${used}% of the monthly credit used"><i style="width:${used}%"></i></span></div>`;
503
+ + `<div class="ev-trow ev-gcap"><span class="ev-small"><b>${esc(usd(C.spent))}</b> of ${esc(usd(C.cap))} used this month</span><svg class="ev-gbar" viewBox="0 0 100 6" preserveAspectRatio="none" role="img" aria-label="${used}% of the monthly credit used"><rect class="bg" width="100" height="6" rx="3"/><rect class="fg" width="${used}" height="6" rx="3"/></svg></div>`;
495
504
  }
496
- const BODY = { general, claude: claudeSec, connectors, workspaces, updates };
505
+ const BODY = { general, claude: decidesSec, checks: checksSec, rules: protoRulesSec, connectors, account: accountSec, workspaces, updates };
497
506
  // the old section names (deep links, other pages' calls): where their controls are now (U4)
498
- const MOVED = { scheduled: ['connectors', 'sw:list'], checks: ['claude', ''], rules: ['claude', ''], adler: ['general', 'adler'], jl: ['general', 'jl'], dress: ['general', 'adler'], workflows: ['workspaces', 'workflows'] };
507
+ const MOVED = { scheduled: ['connectors', 'sw:list'], adler: ['general', 'adler'], jl: ['general', 'jl'], dress: ['general', 'adler'], workflows: ['workspaces', 'workflows'] };
499
508
  let disposeClaudeSetup = null;
500
509
  function draw() {
501
510
  const el = T.el; if (!el || el.hidden) return;
502
511
  // a redraw replaces the nodes: keep focus on the same control (by its data-ev-* key), else on the open section, never on the body
503
512
  const ae = document.activeElement, had = ae && el.contains(ae), key = had ? [...ae.attributes].find((a) => a.name.startsWith('data-ev-')) : null;
504
- const n = { workspaces: T.ws ? T.ws.filter((x) => !x.linked).length : '', updates: ready() ? '<span class="ev-pill y">1</span>' : '' };
513
+ const n = { workspaces: T.ws ? T.ws.filter((x) => !x.linked).length : '', updates: ready() ? 1 : '' };
505
514
  const stale = T.fresh && T.fresh.ok ? bannerOf(T.fresh.sources) : null;
506
- el.querySelector('.ev-st-nav').innerHTML = '<h2 class="ev-h2">Settings</h2>' + SECTIONS.map(([k, l]) => `<a href="#${k}" class="ev-mi" data-ev-sec="${k}"${T.sec === k ? ' aria-current="page"' : ''}>${esc(l)}${k === 'connectors' && stale ? '<i class="ev-dot risk" aria-label="A source needs you" role="img"></i>' : ''}${n[k] !== undefined && n[k] !== '' ? `<span class="ev-k">${typeof n[k] === 'number' ? n[k] : n[k]}</span>` : ''}</a>`).join('');
515
+ // the section tabs (SettingsDS): the path above says Settings once, so the column has no heading of its own
516
+ el.querySelector('.ev-st-nav').innerHTML = SECTIONS.map(([k, l]) => `<a href="#${k}" class="ev-mi pm-tab" data-ev-sec="${k}"${T.sec === k ? ' aria-current="page"' : ''}>${esc(l)}${k === 'connectors' && stale ? '<i class="ev-dot risk" aria-label="A source needs you" role="img"></i>' : ''}${n[k] !== undefined && n[k] !== '' ? `<span class="ev-k pm-meta">${n[k]}</span>` : ''}</a>`).join('');
507
517
  const label = (SECTIONS.find((x) => x[0] === T.sec) || SECTIONS[0])[1];
508
- const all = T.sec === 'connectors' ? `<button type="button" class="ev-ib" data-ev-info aria-expanded="${!!T.info}" aria-controls="evConInfo" aria-label="What PMOS reads and what it never does" title="What PMOS reads and what it never does">${svg(INFO_I, 18)}</button>`
509
- + `<button type="button" class="ev-ib" data-ev-readall aria-label="Read every source again" title="Read all again"${T.reading ? ' disabled' : ''}>${svg(RD, 18)}</button>` : '';
518
+ const all = T.sec === 'connectors' ? `<button type="button" class="ev-ib pm-btn" data-ev-info aria-expanded="${!!T.info}" aria-controls="evConInfo" aria-label="What PMOS reads and what it never does" title="What PMOS reads and what it never does">${svg(INFO_I, 18)}</button>`
519
+ + `<button type="button" class="ev-ib pm-btn" data-ev-readall aria-label="Read every source again" title="Read all again"${T.reading ? ' disabled' : ''}>${svg(RD, 18)}</button>` : '';
510
520
  // the amber box sits on top of the other sections only: on Connectors the trouble row says it (say it once, CnA)
511
- el.querySelector('.ev-st-main').innerHTML = (T.sec === 'connectors' ? '' : staleHtml()) + `<div class="ev-top"><h3 class="ev-h2" id="evStTitle">${esc(label)}</h3>${all}<button type="button" class="ev-ib" data-ev-close aria-label="Close settings" title="Close settings">${svg(ICON.close, 18)}</button></div>`
521
+ el.querySelector('.ev-st-main').innerHTML = (T.sec === 'connectors' ? '' : staleHtml()) + `<div class="ev-top pm-row"><nav class="pm-path" aria-label="Path"><b>Settings</b><span aria-hidden="true">›</span><b id="evStTitle">${esc(label)}</b></nav><span class="ev-grow"></span>${all}<button type="button" class="pm-btn" data-ev-close aria-label="Close settings" title="Close settings">${svg(ICON.close, 18)}</button></div>`
512
522
  + BODY[T.sec]() + `<p role="status"${T.msg && AD.moodOfText(T.msg) === 'honest' ? ' class="ev-say honest"' : ''}>${T.msg && AD.moodOfText(T.msg) === 'honest' ? AD.adler('honest', 24, { label: false }) : ''}${esc(T.msg)}</p>`;
513
523
  cardRows(el.querySelector('.ev-st-main')); el.querySelectorAll('.ev-st-main .sc-w').forEach(cardRows);
514
524
  if (disposeClaudeSetup) { disposeClaudeSetup(); disposeClaudeSetup = null; }
@@ -522,7 +532,7 @@ function draw() {
522
532
  function cardRows(root) {
523
533
  if (!root) return;
524
534
  let run = [];
525
- const flush = () => { if (run.length) { const c = document.createElement('div'); c.className = 'ev-tcard'; run[0].before(c); run.forEach((r) => c.appendChild(r)); run = []; } };
535
+ const flush = () => { if (run.length) { const c = document.createElement('div'); c.className = 'ev-tcard pm-block'; run[0].before(c); run.forEach((r) => c.appendChild(r)); run = []; } };
526
536
  [...root.children].forEach((k) => { if (k.classList.contains('ev-trow')) run.push(k); else flush(); });
527
537
  flush();
528
538
  }
@@ -546,10 +556,12 @@ function vwFirst() {
546
556
  function mount() {
547
557
  if (T.el && T.el.isConnected) return T.el;
548
558
  const d = document.createElement('div');
549
- d.innerHTML = '<div class="ev-st-scrim" id="evStScrim" hidden></div><div class="ev-st" id="evSettings" role="dialog" aria-modal="true" aria-label="Settings" hidden><nav class="ev-st-nav" aria-label="Settings sections"></nav><div class="ev-st-main"></div></div>';
559
+ d.innerHTML = '<div class="ev-st-scrim" id="evStScrim" hidden></div><div class="ev-st pm-ds" id="evSettings" role="dialog" aria-modal="true" aria-label="Settings" hidden><nav class="ev-st-nav" aria-label="Settings sections"></nav><div class="ev-st-main"></div></div>';
550
560
  // first in the body: while Workflows shows, the Viewer's host inside the dialog is the first data-cz-viewer-host (pm/cozy-viewer.js place)
551
561
  document.body.prepend(...d.childNodes);
552
562
  T.el = document.getElementById('evSettings');
563
+ const K = new URL('./komorebi.css', import.meta.url).href; // the system's parts inside (scope .pm-ds)
564
+ if (!document.querySelector(`link[href="${K}"], link[href$="/komorebi.css"]`)) { const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = K; document.head.appendChild(l); }
553
565
  document.getElementById('evStScrim').addEventListener('click', closeSettings);
554
566
  T.el.addEventListener('keydown', (e) => {
555
567
  if (e.target.closest('.cs-term')) return;
@@ -591,6 +603,14 @@ async function press(e) {
591
603
  if (t.dataset.evPok || t.dataset.evPno) { if (T.busy) return; T.busy = true; try { await decideProp(t.dataset.evPok || t.dataset.evPno, !!t.dataset.evPok); } finally { T.busy = false; } return; }
592
604
  if (t.dataset.evSec) { e.preventDefault(); const m = MOVED[t.dataset.evSec]; T.sec = m ? m[0] : t.dataset.evSec; T.sub = m ? m[1] : ''; T.msg = ''; T.dress = false; draw(); const f = T.el.querySelector(`[data-ev-sec="${T.sec}"]`); if (f) f.focus(); openCheck(); return; }
593
605
  if ('evClose' in t.dataset) { closeSettings(); return; }
606
+ if ('evLsfold' in t.dataset) { T.lsOpen = !T.lsOpen; draw(); return; }
607
+ if (t.dataset.evSug) { // the Suggestion on How PMOS decides: ✓ sets the kind's way, ✕ hides it here, the pencil goes to the kind's own Tabs
608
+ const kind = t.dataset.kind, to = t.dataset.to;
609
+ if (t.dataset.evSug === 'yes') { await saveWay(kind, to); return; }
610
+ if (t.dataset.evSug === 'no') { const no = noSet(); no.add(kind + ':' + to); store.set(NO_KEY, JSON.stringify([...no])); T.msg = 'Not now. PMOS keeps it as it is.'; draw(); return; }
611
+ const f = T.el.querySelector(`[data-ev-seg="claude.way:${CSS.escape(kind)}"][data-v="${CSS.escape(to)}"]`); if (f) { f.scrollIntoView({ block: 'center' }); f.focus(); }
612
+ return;
613
+ }
594
614
  if (await relayClick(e, RL, draw, toast)) return;
595
615
  if (await extClick(e, XT, draw, toast)) return;
596
616
  if (t.dataset.evWk) { const k = t.dataset.evWk; if (T.wkOpen.has(k)) T.wkOpen.delete(k); else T.wkOpen.add(k); draw(); return; }
@@ -767,7 +787,6 @@ export function openSettings(section, o = {}) {
767
787
  el.hidden = false; document.getElementById('evStScrim').hidden = false; el.setAttribute('data-esc-layer', '');
768
788
  draw();
769
789
  const f = el.querySelector('[aria-current="page"]'); if (f) f.focus();
770
- if (section === 'checks' || section === 'rules') { const h = el.querySelector(section === 'rules' ? '#evProtoRules' : '#evChecks'); if (h && h.scrollIntoView) h.scrollIntoView({ block: 'start' }); }
771
790
  load();
772
791
  return el;
773
792
  }
@@ -108,7 +108,7 @@ export function nextPromptUi({ el, host, box, redrawFoot }) {
108
108
  if ('npMenu' in b.dataset) { N.menu = !N.menu; draw(); if (N.menu) { const f = wrap.querySelector('.np-mi'); if (f) f.focus(); } return true; }
109
109
  if (b.dataset.npVoice) {
110
110
  const k = b.dataset.npVoice;
111
- if (k === 'own' && !(N.prefs && N.prefs.rules)) { N.menu = false; draw(); import('./cozy-settings.js').then((M) => M.openSettings('claude')).catch(() => {}); return true; }
111
+ if (k === 'own' && !(N.prefs && N.prefs.rules)) { N.menu = false; draw(); import('./cozy-settings.js').then((M) => M.openSettings('account')).catch(() => {}); return true; }
112
112
  N.menu = false; save('style', k).then(() => { const ta = box(); if (ta && roughText(ta.value)) sharpen(ta.value); });
113
113
  return true;
114
114
  }
@@ -0,0 +1,54 @@
1
+ /* pm/set-ds.js — the parts Settings is drawn from (initiative settings-ds-page; Exploring 3 page "pages", board SettingsDS; brief
2
+ * design-system/pages-rebuild/brief.md, Settings). Built only from PMOS Komorebi parts (workspace/design-system/ui): Settings rows (pm-set),
3
+ * Tabs as the way picker (pm-tabs, role radiogroup), the switch (pm-switch), the expanded Suggestion (pm-sug x, from bd-stands.js).
4
+ * PURE: no DOM, no fetch. pm/cozy-settings.js draws them and wires the presses by their data-ev- attributes (unchanged).
5
+ *
6
+ * SECTIONS the sections at the left, in the board's order, then Workspaces and Updates (nothing dropped)
7
+ * row(title, sub, right) one Settings row
8
+ * seg(label, key, cur, opts) Tabs that pick one value
9
+ * sw(on, attrs, label) a switch
10
+ * kindMeta(k) "31 made · 29 kept"
11
+ * sugOf(kinds, no) the one Suggestion on How PMOS decides, from what you kept and undid, or null
12
+ * sugHtml(s) its expanded form: Why, PMOS will, What changes, Based on; Change it first, Yes, No
13
+ *
14
+ * NOTHING HERE MAKES A FACT UP: a Suggestion needs at least MIN changes of one kind, and says the counts it rests on. */
15
+ import { sugHtml as sugBlock } from './bd-stands.js';
16
+
17
+ export const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' })[c]);
18
+ export const SECTIONS = [['general', 'General'], ['claude', 'How PMOS decides'], ['checks', 'Checks'], ['rules', 'Prototype rules'], ['connectors', 'Connectors'],
19
+ ['account', 'Your account'], ['workspaces', 'Workspaces'], ['updates', 'Updates']];
20
+ export const MIN = 5;
21
+ export const WAYS = { quiet: 'Quietly', show: 'Show me', ask: 'Ask first' };
22
+
23
+ export const row = (title, sub, right) => `<div class="ev-trow pm-set"><div class="ev-tx"><b>${esc(title)}</b>${sub ? `<p class="pm-meta">${esc(sub)}</p>` : ''}</div>${right}</div>`;
24
+ export const seg = (label, key, cur, opts) => `<span class="pm-tabs" role="radiogroup" aria-label="${esc(label)}">${opts.map(([k, w]) => {
25
+ const on = String(cur) === String(k);
26
+ return `<button type="button" class="pm-tab" role="radio" data-ev-seg="${esc(key)}" data-v="${esc(k)}" aria-checked="${on}" aria-selected="${on}">${esc(w)}</button>`;
27
+ }).join('')}</span>`;
28
+ export const sw = (on, attrs, label) => `<button type="button" class="pm-switch" role="switch" aria-checked="${!!on}" aria-label="${esc(label)}" ${attrs}></button>`;
29
+ export const kindMeta = (k) => `${k.made || 0} made · ${k.kept || 0} kept`;
30
+
31
+ const low = (s) => String(s || '').charAt(0).toLowerCase() + String(s || '').slice(1);
32
+ /** The one Suggestion. First a kind PMOS made at least MIN times that you never undid and that still shows or asks: Quietly. Else a kind you
33
+ * set to Quietly yourself and undid at least twice: Ask first. `no`: the "kind:way" pairs you said No to. → s | null */
34
+ export function sugOf(kinds, no = new Set()) {
35
+ const K = Array.isArray(kinds) ? kinds : [];
36
+ const up = K.find((k) => k.made >= MIN && !k.undone && k.kept === k.made && k.way !== 'quiet' && !no.has(k.kind + ':quiet'));
37
+ if (up) return {
38
+ kind: up.kind, to: 'quiet', title: `Let PMOS ${low(up.label)} quietly`,
39
+ why: `PMOS made ${up.made} of these by itself and you kept all ${up.made}. You undid none.`,
40
+ will: [`Set ${up.label} to Quietly`, 'Keep Undo on each one'],
41
+ changes: `These no longer wait in PMOS did; each one still has Undo.`,
42
+ basis: `The ${up.made} changes of this kind and your Undos`,
43
+ };
44
+ const down = K.find((k) => k.set === 'quiet' && k.undone >= 2 && !no.has(k.kind + ':ask'));
45
+ if (down) return {
46
+ kind: down.kind, to: 'ask', title: `Let PMOS ask first before it does ${low(down.label)}`,
47
+ why: `You set it to Quietly and then undid ${down.undone} of ${down.made}.`,
48
+ will: [`Set ${down.label} to Ask first`],
49
+ changes: 'PMOS waits for your yes before each one.',
50
+ basis: `The ${down.made} changes of this kind and your ${down.undone} Undos`,
51
+ };
52
+ return null;
53
+ }
54
+ export const sugHtml = (s) => (s ? sugBlock(s, `data-kind="${esc(s.kind)}" data-to="${esc(s.to)}"`, 'data-ev-sug') : '');
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "Settings rebuilt from design system blocks (initiative settings-ds-page, done test C1-C6): pm/set-ds.js, pm/cozy-settings.js sections and rows. Pure, node.",
3
+ "modules": [
4
+ "set-ds.test.js"
5
+ ],
6
+ "seconds": {
7
+ "set-ds.test.js": 2
8
+ }
9
+ }