create-pmos 0.553.0 → 0.554.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/package.json +20 -14
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/workspace/briefing-premium-board-test.js +4 -4
  7. package/workspace/briefing-premium-initiative-test.js +2 -2
  8. package/workspace/briefing-premium-test.js +1 -1
  9. package/workspace/changelog.json +19 -0
  10. package/workspace/chat-asks-test.js +5 -5
  11. package/workspace/ev-everywhere-test.js +2 -2
  12. package/workspace/goals-clear-ui-test.js +1 -1
  13. package/workspace/guide/agent-capabilities.md +31 -31
  14. package/workspace/guide/claude-proposes.md +68 -68
  15. package/workspace/guide/cli.md +22 -22
  16. package/workspace/guide/cloud.md +3 -3
  17. package/workspace/guide/home.md +38 -38
  18. package/workspace/guide/index.md +5 -5
  19. package/workspace/guide/intelligence-okr-goals.md +4 -4
  20. package/workspace/guide/layout.md +23 -23
  21. package/workspace/guide/notes.md +8 -8
  22. package/workspace/guide/programs.md +17 -17
  23. package/workspace/guide/reports.md +16 -16
  24. package/workspace/guide/settings-and-switches.md +37 -37
  25. package/workspace/guide/statuses.md +3 -3
  26. package/workspace/home-other-product-test.js +8 -8
  27. package/workspace/home-pill-test.js +3 -3
  28. package/workspace/home-rows-test.js +7 -7
  29. package/workspace/intel-report-ui-test.js +1 -1
  30. package/workspace/intelligence-gaps-ui-test.js +2 -2
  31. package/workspace/lib/agent-roles.js +1 -1
  32. package/workspace/lib/autonomy.js +1 -1
  33. package/workspace/lib/bg-queue.js +1 -1
  34. package/workspace/lib/briefing-premium-agent.js +2 -2
  35. package/workspace/lib/decision-memory.js +2 -2
  36. package/workspace/lib/driver-decide.js +2 -2
  37. package/workspace/lib/driver.js +6 -2
  38. package/workspace/lib/folder-needs.js +1 -1
  39. package/workspace/lib/goal-chat.js +5 -5
  40. package/workspace/lib/goal-watch.js +1 -1
  41. package/workspace/lib/grill-runs.js +5 -5
  42. package/workspace/lib/idle-lab.js +5 -5
  43. package/workspace/lib/impact-runs.js +2 -2
  44. package/workspace/lib/job-graph.js +2 -2
  45. package/workspace/lib/metric-draft-runs.js +4 -4
  46. package/workspace/lib/metric-read-runs.js +5 -5
  47. package/workspace/lib/news-for-you.js +1 -1
  48. package/workspace/lib/proposal-runs.js +6 -6
  49. package/workspace/lib/refresh.js +1 -1
  50. package/workspace/lib/routes-board-premium.js +1 -1
  51. package/workspace/lib/routes-goal-status.js +4 -4
  52. package/workspace/lib/routes-impact.js +1 -1
  53. package/workspace/lib/routes-insight-moves.js +1 -1
  54. package/workspace/lib/routes-loose.js +2 -2
  55. package/workspace/lib/routes-mentions.js +1 -1
  56. package/workspace/lib/routes-metric-drafts.js +9 -9
  57. package/workspace/lib/routes-proposals.js +8 -8
  58. package/workspace/lib/routes-ready-reports.js +1 -1
  59. package/workspace/lib/routes-slash.js +1 -1
  60. package/workspace/lib/source-heal.js +3 -3
  61. package/workspace/lib/state-root.js +22 -1
  62. package/workspace/lib/task-items.js +1 -1
  63. package/workspace/lib/task-links.js +2 -2
  64. package/workspace/lib/today.js +2 -2
  65. package/workspace/live-pill-round-test.js +1 -1
  66. package/workspace/metric-drafts-ui-test.js +1 -1
  67. package/workspace/milestone-suggest-test.js +5 -5
  68. package/workspace/news-viewers-test.js +3 -3
  69. package/workspace/okr-goals-ui-test.js +1 -1
  70. package/workspace/package-lock.json +2 -2
  71. package/workspace/package.json +1 -1
  72. package/workspace/premium-chat-chart-tab-test.js +1 -1
  73. package/workspace/premium-chat-context-test.js +4 -4
  74. package/workspace/premium-chat-goal-setup-test.js +3 -3
  75. package/workspace/premium-chat-goal-view-test.js +1 -1
  76. package/workspace/premium-chat-line-test.js +6 -6
  77. package/workspace/premium-chat-notes-test.js +4 -4
  78. package/workspace/premium-chat-report-tab-test.js +4 -4
  79. package/workspace/premium-rec-now-test.js +2 -2
  80. package/workspace/public/pm/batch-press.js +4 -4
  81. package/workspace/public/pm/bd-fc-card.js +1 -1
  82. package/workspace/public/pm/bd-next.js +10 -10
  83. package/workspace/public/pm/bd-prog-panel.js +5 -5
  84. package/workspace/public/pm/chat-ask.js +1 -1
  85. package/workspace/public/pm/chat-context.js +3 -3
  86. package/workspace/public/pm/cozy-evmodel.js +1 -1
  87. package/workspace/public/pm/cozy-home.css +1 -1
  88. package/workspace/public/pm/cozy-lab-ins.js +4 -4
  89. package/workspace/public/pm/cozy-lab.js +1 -1
  90. package/workspace/public/pm/cozy-news.js +2 -2
  91. package/workspace/public/pm/cozy-onboard.js +2 -2
  92. package/workspace/public/pm/cozy-rec-now.js +5 -5
  93. package/workspace/public/pm/cozy-rec-present.js +1 -1
  94. package/workspace/public/pm/cozy-reveal.js +2 -2
  95. package/workspace/public/pm/cozy-settings.js +19 -19
  96. package/workspace/public/pm/cozy-steps.js +2 -2
  97. package/workspace/public/pm/cozy-viewer.js +1 -1
  98. package/workspace/public/pm/ctx-wedge.js +1 -1
  99. package/workspace/public/pm/dash-view.js +1 -1
  100. package/workspace/public/pm/goal-chat.js +6 -6
  101. package/workspace/public/pm/good-morning.js +2 -2
  102. package/workspace/public/pm/grill-words.js +1 -1
  103. package/workspace/public/pm/home-app.js +19 -19
  104. package/workspace/public/pm/home-ask.js +1 -1
  105. package/workspace/public/pm/home-chat.js +6 -6
  106. package/workspace/public/pm/home-data.js +2 -2
  107. package/workspace/public/pm/home-day.js +3 -3
  108. package/workspace/public/pm/home-drift.js +1 -1
  109. package/workspace/public/pm/home-goal.js +1 -1
  110. package/workspace/public/pm/home-impact.js +1 -1
  111. package/workspace/public/pm/home-ini.js +1 -1
  112. package/workspace/public/pm/home-line.js +5 -5
  113. package/workspace/public/pm/home-mentions.js +4 -4
  114. package/workspace/public/pm/home-moment.js +1 -1
  115. package/workspace/public/pm/home-need.js +1 -1
  116. package/workspace/public/pm/home-phone-card.js +1 -1
  117. package/workspace/public/pm/home-stage-card.js +2 -2
  118. package/workspace/public/pm/home-sweep.js +1 -1
  119. package/workspace/public/pm/home-today.js +2 -2
  120. package/workspace/public/pm/ini-about.js +2 -2
  121. package/workspace/public/pm/ini-agent.js +5 -5
  122. package/workspace/public/pm/ini-links.js +5 -5
  123. package/workspace/public/pm/ini-props.js +11 -11
  124. package/workspace/public/pm/ini-view-model.js +1 -1
  125. package/workspace/public/pm/ini-view.js +2 -2
  126. package/workspace/public/pm/intent.js +3 -3
  127. package/workspace/public/pm/loose-props.js +5 -5
  128. package/workspace/public/pm/metric-drafts.js +1 -1
  129. package/workspace/public/pm/ms-suggest.js +3 -3
  130. package/workspace/public/pm/next-prompt-ui.js +2 -2
  131. package/workspace/public/pm/okr-list.js +1 -1
  132. package/workspace/public/pm/page-chat.js +2 -2
  133. package/workspace/public/pm/premium-attach.js +1 -1
  134. package/workspace/public/pm/premium-initiative-head.js +1 -1
  135. package/workspace/public/pm/premium-insights.js +3 -3
  136. package/workspace/public/pm/premium-meeting.js +1 -1
  137. package/workspace/public/pm/premium-mtg-replay.js +1 -1
  138. package/workspace/public/pm/premium-notes.js +2 -2
  139. package/workspace/public/pm/premium-report-read.js +6 -6
  140. package/workspace/public/pm/premium-report-tab.js +7 -7
  141. package/workspace/public/pm/premium-shell.js +18 -18
  142. package/workspace/public/pm/premium-vw-ctx.js +3 -3
  143. package/workspace/public/pm/premium-vw-jira.js +1 -1
  144. package/workspace/public/pm/premium-welcome.js +1 -1
  145. package/workspace/public/pm/prog-order.js +2 -2
  146. package/workspace/public/pm/program-charter.js +3 -3
  147. package/workspace/public/pm/program-model.js +1 -1
  148. package/workspace/public/pm/ready-lib.js +4 -4
  149. package/workspace/public/pm/report-flow.js +7 -7
  150. package/workspace/public/pm/report-orders-ui.js +2 -2
  151. package/workspace/public/pm/split-merge.js +5 -5
  152. package/workspace/public/pm/story.js +1 -1
  153. package/workspace/public/pm/task-card.js +1 -1
  154. package/workspace/public/pm/tk-draft.js +1 -1
  155. package/workspace/public/pm/tk-send.js +2 -2
  156. package/workspace/public/pm/wf-page.js +2 -2
  157. package/workspace/ready-dash-ui-test.js +1 -1
  158. package/workspace/rec-present-test.js +2 -2
  159. package/workspace/server.js +12 -8
  160. package/workspace/session-names-test.js +3 -3
  161. package/workspace/skills/doc-check.skill +2 -0
  162. package/workspace/skills/idle-lab-prototype.skill +2 -0
  163. package/workspace/skills/measure.skill +2 -0
  164. package/workspace/skills/metric-read.skill +2 -0
  165. package/workspace/skills/milestone-review.skill +2 -0
  166. package/workspace/skills/report-biweekly.skill +2 -0
  167. package/workspace/skills/report-daily.skill +2 -0
  168. package/workspace/skills/report-design.skill +2 -0
  169. package/workspace/skills/report-monthly.skill +2 -0
  170. package/workspace/skills/report-weekly.skill +2 -0
  171. package/workspace/split-merge-ui-test.js +3 -3
  172. package/workspace/stage-card-test.js +4 -4
  173. package/workspace/task-links-test.js +1 -1
  174. package/workspace/task-views-test.js +7 -7
  175. package/workspace/tk-tasks-test.js +2 -2
@@ -278,7 +278,7 @@ function prodRow(m) {
278
278
  function allProductsHtml() {
279
279
  if (!PF || !PF.rows || PF.rows.length < 2) return '';
280
280
  const R = PF.rows, cell = (n) => (n ? `<b>${n}</b>` : '<span class="note">—</span>');
281
- return `<div class="ins-tbl ins-allp" role="table" aria-label="All products"><div class="ins-tr ins-th ins-pcols" role="row"><div role="columnheader">All products <span>${R.length}</span></div><div role="columnheader">North Star</div><div role="columnheader">Key results read</div><div role="columnheader">Late</div><div role="columnheader">Checks overdue</div><div role="columnheader">Next, by Claude</div></div>`
281
+ return `<div class="ins-tbl ins-allp" role="table" aria-label="All products"><div class="ins-tr ins-th ins-pcols" role="row"><div role="columnheader">All products <span>${R.length}</span></div><div role="columnheader">North Star</div><div role="columnheader">Key results read</div><div role="columnheader">Late</div><div role="columnheader">Checks overdue</div><div role="columnheader">Next, by PMOS</div></div>`
282
282
  + R.map((r) => `<div class="ins-tr ins-row ins-pcols" role="row" data-prod="${esc(r.ws)}" tabindex="0" aria-label="${esc(r.name)}"><div class="nm" role="cell"><span class="ins-pav" aria-hidden="true">${esc(r.initials)}</span><b>${esc(r.name)}</b></div>`
283
283
  + `<div role="cell" class="note">${esc(r.ns)}</div><div role="cell">${r.total === null ? '<span class="note">no OKR file</span>' : `<b>${r.read}</b> <span class="note">of ${r.total}</span>`}</div><div role="cell">${cell(r.late)}</div><div role="cell">${cell(r.over)}</div>`
284
284
  + `<div role="cell">${r.next ? `<span class="ins-dv"><span class="sp" aria-hidden="true">${SV(I.spark)}</span><span>${esc(r.next)}</span></span>` : ''}</div></div>`).join('') + '</div>';
@@ -598,7 +598,7 @@ function drEditHtml(r) {
598
598
  + (r.kind === 'chase' ? `<textarea class="ins-dri" data-drf="body" rows="3" maxlength="2000" aria-label="The message">${esc(raw.body || '')}</textarea>` : '')
599
599
  + (metric && raw.type !== 'Done or not' ? `<input class="ins-dri" data-drf="target" inputmode="decimal" value="${esc(raw.target == null ? '' : String(raw.target))}" aria-label="Target" placeholder="Target">` : '')
600
600
  + (metric ? `<input class="ins-dri" data-drf="source" value="${esc(r.source || '')}" maxlength="40" aria-label="Measured by" placeholder="Measured by">` : '') + '</div>'
601
- + `<div class="acts"><a class="cz-ib sm" href="${esc(homeAsk('insights', 'Change the draft ' + r.name + ': '))}" aria-label="Ask Claude in Home to change something else" title="Ask Claude in Home">${SV('M4 5h16v11H9l-5 4z')}</a>`
601
+ + `<div class="acts"><a class="cz-ib sm" href="${esc(homeAsk('insights', 'Change the draft ' + r.name + ': '))}" aria-label="Ask PMOS in Home to change something else" title="Ask PMOS in Home">${SV('M4 5h16v11H9l-5 4z')}</a>`
602
602
  + `<button type="button" class="cz-ib sm" data-okd="cancel" data-row="${esc(r.id)}" aria-label="Cancel the edit" title="Cancel">${SV(I.x)}</button><button type="button" class="cz-ib sm solid" data-okd="save" data-row="${esc(r.id)}" aria-label="Save ${esc(r.name)}" title="Save">${SV(I.chk)}</button></div></div>`;
603
603
  }
604
604
  const drHtml = (r) => (drEdit === r.id && r.state === 'open' ? drEditHtml(r) : OK.draftHtml(r));
@@ -708,7 +708,7 @@ function openCheck(id) {
708
708
  let el = null;
709
709
  const editHtml = (r) => `<form class="gc-ed" data-gc-ed><label class="ins-fl">Name<input class="ins-inp" name="name" maxlength="120" value="${esc(r.name)}"></label>`
710
710
  + (r.raw && r.raw.type !== 'Done or not' ? `<label class="ins-fl">Target<input class="ins-inp" name="target" inputmode="decimal" maxlength="20" value="${esc(r.raw && r.raw.target != null ? String(r.raw.target) : '')}"></label>` : '')
711
- + `<label class="ins-fl">Measured by<input class="ins-inp" name="source" maxlength="40" value="${esc(r.source || '')}"></label><div class="gc-foot"><a class="cz-ib sm" href="${esc(homeAsk('insights', 'Change how ' + r.name + ' is counted: '))}" aria-label="Ask Claude in Home to change how it is counted" title="Ask in Home">${SV('M4 5h16v11H9l-5 4z')}</a><span class="gc-sp"></span>`
711
+ + `<label class="ins-fl">Measured by<input class="ins-inp" name="source" maxlength="40" value="${esc(r.source || '')}"></label><div class="gc-foot"><a class="cz-ib sm" href="${esc(homeAsk('insights', 'Change how ' + r.name + ' is counted: '))}" aria-label="Ask PMOS in Home to change how it is counted" title="Ask in Home">${SV('M4 5h16v11H9l-5 4z')}</a><span class="gc-sp"></span>`
712
712
  + `<button type="button" class="cz-ib sm" data-gc="edit-x" aria-label="Cancel the edit" title="Cancel">${SV(I.x)}</button><button type="submit" class="cz-ib sm solid" aria-label="Save" title="Save">${SV(I.chk)}</button></div></form>`;
713
713
  const draw = () => { if (!el || !document.contains(el)) return; const r = rowOf(), top = el.scrollTop; el.innerHTML = st.edit ? editHtml(r) : GC.checkHtml(r, st); el.scrollTop = top; };
714
714
  CHK = { id, st, draw };
@@ -278,7 +278,7 @@ export const RECORD_LINE = 'Makes a note for this meeting, or uses the one it ha
278
278
  export const RESUME_LINE = 'Starts listening again on this meeting’s note. The meeting stays open for one hour after a pause.';
279
279
  export const STOP_LINE = 'A stopped meeting cannot be resumed. The final notes are written now.';
280
280
  export const CONSENT_LINE = 'Tell everyone first. Recording writes down each speaker’s name and words. Everyone on the call should know before it starts.';
281
- export const FOCUS_LINE = 'Focus reads this meeting every 3 seconds. While the note records, PMOS’s companion, a read-only Claude run that sends nothing, may read the last minutes of the talk at most every 40 seconds and writes its own notes.';
281
+ export const FOCUS_LINE = 'Focus reads this meeting every 3 seconds. While the note records, PMOS’s companion, a read-only PMOS run that sends nothing, may read the last minutes of the talk at most every 40 seconds and writes its own notes.';
282
282
  /** The mark a meeting row carries when its note records or is paused. */
283
283
  export const rowMark = (rows, row) => { const n = noteOfRow(rows, row); return n && n.state === 'recording' ? 'Recording' : n && n.state === 'paused' ? 'Paused' : ''; };
284
284
 
@@ -195,7 +195,7 @@ export function wordPopHtml(heard, sug, P) {
195
195
  const label = n > 1 ? 'Fix it in ' + n + ' places' : 'Fix it';
196
196
  return `<div class="vzr-wpop" role="dialog" aria-label="${esc('Fix “' + h + '”')}" data-w="${esc(h)}"><span class="vzr-grab" aria-hidden="true"></span><p class="vzr-wl">Heard as “${esc(h)}”</p>`
197
197
  + `<div class="vzr-wf"><input data-a="wfin" aria-label="${esc('Fix “' + h + '”')}" value="${esc(best || h)}" maxlength="60" spellcheck="false"><button type="button" class="vzr-go" data-a="wfok" aria-label="${esc(label)}" title="${esc(label)}">${ic('chk', 16)}</button></div>`
198
- + (best ? `<p class="vzr-sug"><span class="vzr-star" aria-hidden="true">✦</span><span>Claude suggests <b>${esc(best)}</b>: ${esc(why)}</span></p><div class="vzr-alt" role="group" aria-label="Other spellings">${alts.map((x, i) => `<button type="button" data-a="walt" data-v="${esc(x)}" aria-pressed="${i === 0}">${esc(x)}</button>`).join('')}</div>` : '')
198
+ + (best ? `<p class="vzr-sug"><span class="vzr-star" aria-hidden="true">✦</span><span>PMOS suggests <b>${esc(best)}</b>: ${esc(why)}</span></p><div class="vzr-alt" role="group" aria-label="Other spellings">${alts.map((x, i) => `<button type="button" data-a="walt" data-v="${esc(x)}" aria-pressed="${i === 0}">${esc(x)}</button>`).join('')}</div>` : '')
199
199
  + (n ? `<p class="vzr-scope"><b>${n === 1 ? '1 place' : n + ' places'}</b> in this meeting</p>${P.by.length > 1 || (P.by[0] && P.by[0].k !== 'summary') ? `<div class="vzr-brk">${P.by.map((x) => `<span>${esc(x.text)}</span>`).join('')}</div>` : ''}` : '')
200
200
  + '<i class="vzr-arr" aria-hidden="true"></i></div>';
201
201
  }
@@ -112,7 +112,7 @@ function draw(el) {
112
112
  + `<div class="ntd" id="ntEd" contenteditable="true" role="textbox" aria-multiline="true" aria-label="Note" spellcheck="true" data-ph="Write a note. Type # for a heading, - for a bullet, [] for a checkbox."></div>`
113
113
  + `<div class="ntf"><span class="ntw">This conversation · saved on this machine</span>`
114
114
  + `<button type="button" class="ntic" data-nt="sel" aria-label="Add selection to message" title="Add selection to message. Nothing is sent.">${I_ADD}</button>`
115
- + `<button type="button" class="ntic pri" data-nt="share" aria-label="Share with Claude" title="Share with Claude: the note goes on your message as a file">${I_SHARE}</button></div></div>`;
115
+ + `<button type="button" class="ntic pri" data-nt="share" aria-label="Share with PMOS" title="Share with PMOS: the note goes on your message as a file">${I_SHARE}</button></div></div>`;
116
116
  const ed = el.querySelector('#ntEd'); N.ed = ed;
117
117
  ed.append(...toDom(parseMd(n ? n.text || '' : ''), document, { editable: true }));
118
118
  empty();
@@ -220,7 +220,7 @@ async function share() {
220
220
  attachSaved({ name: n.title, saved: n.name, path: n.path, size: new Blob([n.text || '']).size, note: true });
221
221
  if (C.toChat) C.toChat();
222
222
  if (C.input) C.input.focus();
223
- say('The note is on your message. Claude reads it when you send.');
223
+ say('The note is on your message. PMOS reads it when you send.');
224
224
  }
225
225
  /** The dialog switched conversation: the open Notes tab belonged to the old one. */
226
226
  export function syncNotes() { const k = C && C.getKey(); if (N.key && k !== N.key) { flushNotes(); N.key = null; vwClose('notes'); } }
@@ -543,7 +543,7 @@ async function ordAct(k, v) {
543
543
  if (!r.ok) return say('The order was not applied: ' + r.error + '.', 'bad');
544
544
  R.gal = null;
545
545
  await readOrders(); if (R !== me) return;
546
- return say(r.next ? `From the next cycle this report starts in the ${r.next.name} order. Today's draft stays as agreed.` : `Claude is writing this draft again in the ${r.order.name} order. Undo puts this one back, for one day.`);
546
+ return say(r.next ? `From the next cycle this report starts in the ${r.next.name} order. Today's draft stays as agreed.` : `PMOS is writing this draft again in the ${r.order.name} order. Undo puts this one back, for one day.`);
547
547
  }
548
548
  if (k === 'undo') {
549
549
  const r = await post('undo', { path: R.row.path }); if (!r) return;
@@ -610,11 +610,11 @@ async function openChat() {
610
610
  * no indication of me having to wait"). Nothing running → ''. */
611
611
  export function waitWords(x, draft) {
612
612
  const st = x && x.structure, de = x && x.design, out = [];
613
- if (draft && draft.state === 'drafting') out.push('Claude is writing this report again with your sections. It takes a few minutes; the new draft opens here when it lands.');
613
+ if (draft && draft.state === 'drafting') out.push('PMOS is writing this report again with your sections. It takes a few minutes; the new draft opens here when it lands.');
614
614
  else if (draft && draft.state === 'held') out.push('The new draft waits for a check of ' + (draft.sources || []).join(', ') + '.');
615
- if (st && st.running) out.push('Claude is reshaping the sections to your change. It takes a minute or two. Until you keep it, this draft has the standard sections.');
616
- else if (st && st.current != null && st.current !== st.saved) out.push('New sections are ready. Open the report from your chat and press Use this; Claude then writes the draft again with them.');
617
- if (de && de.running) out.push('Claude is making the look' + ((de.samples || []).length ? ' from ' + de.samples.map((y) => y.name).join(', ') : '') + '. It takes a minute or two. Until then, the slides use the standard PMOS look.');
615
+ if (st && st.running) out.push('PMOS is reshaping the sections to your change. It takes a minute or two. Until you keep it, this draft has the standard sections.');
616
+ else if (st && st.current != null && st.current !== st.saved) out.push('New sections are ready. Open the report from your chat and press Use this; PMOS then writes the draft again with them.');
617
+ if (de && de.running) out.push('PMOS is making the look' + ((de.samples || []).length ? ' from ' + de.samples.map((y) => y.name).join(', ') : '') + '. It takes a minute or two. Until then, the slides use the standard PMOS look.');
618
618
  return out;
619
619
  }
620
620
  function waitHtml() {
@@ -1113,7 +1113,7 @@ export async function openReport(row, hand = {}) {
1113
1113
  sch: schedPick(null), schErr: '', shr: null, ord: null, gal: null, ordHide: ordHidden(), rv: null, rvHide: new Set(), rvSent: new Set(), shares: null, more: [], hand, cuts: hand.cuts ? { on: 'team', team: null, sponsors: null, err: '' } : null, cycles: (hand.cycles || []).slice(), onIssue: hand.onIssue || null, onChange: hand.onChange || null, vid: 'report:' + row.path };
1114
1114
  const head = me.head = () => ({ id: me.vid, kind: 'Report' + (me.audience ? ' · ' + me.audience : ''), title: me.name, icon: me.view === 'doc' ? 'doc' : 'report', full: true, url: viewUrl(row, me.ws), more: me.more,
1115
1115
  // the template behind one icon (batch 22 item 14, canvas RfH1): format, readers, when it goes out, and its history
1116
- presses: me.setup ? [{ act: 'chat', label: 'Talk to Claude about this report', icon: RF_ICON.chat }, { act: 'template', label: 'Template: format, readers, look, sources', icon: RF_ICON.tune }] : [],
1116
+ presses: me.setup ? [{ act: 'chat', label: 'Talk to PMOS about this report', icon: RF_ICON.chat }, { act: 'template', label: 'Template: format, readers, look, sources', icon: RF_ICON.tune }] : [],
1117
1117
  onPress: (a) => { if (R !== me) return; if (a === 'template') openTemplate(); else if (a === 'chat') openChat(); },
1118
1118
  render: (b) => { syncMore(); b.__rpHtml = b.innerHTML = panelHtml(); wire(b); }, onClose: () => { if (R === me && !me.reopen) { present(false); R = null; } } });
1119
1119
  vOpen(head());
@@ -354,7 +354,7 @@ function setupHtml(t) {
354
354
  if (!t.loaded) return '<p class="vz-empty" role="status">Reading the report.</p>';
355
355
  if (t.gone) return `<p class="vz-msg">This template (${esc(t.block.id)}) is deleted, or it is not set up in this workspace. Its issued reports are kept.</p>${cyclesHtml(t)}`;
356
356
  const cur = s.status === 'paused' ? 'off' : s.schedule;
357
- const want = t.block.schedule && !sameSched(t.block.schedule, cur) ? `<div class="vz-ask"><p>Claude proposes: <b>${esc(schedWords(t.block.schedule))}</b></p><div>${btn('sched-use', 'Change the schedule', { off: t.busy })}</div></div>` : '';
357
+ const want = t.block.schedule && !sameSched(t.block.schedule, cur) ? `<div class="vz-ask"><p>PMOS proposes: <b>${esc(schedWords(t.block.schedule))}</b></p><div>${btn('sched-use', 'Change the schedule', { off: t.busy })}</div></div>` : '';
358
358
  return `<div class="rp-brief"><p class="rp-lbl">At a glance</p>${glance(s.purpose, s.audience, schedHtml(t, cur) + (s.next_draft ? ` <span class="vz-note">next draft ${esc(s.next_draft.slice(0, 10))}</span>` : ''), OUT[s.output] || s.output)}</div>${want}`
359
359
  + `<div class="vz-sg" role="group" aria-label="Step"><button type="button" data-rt="view|structure" aria-pressed="${t.view === 'structure'}">Structure</button><button type="button" data-rt="view|design" aria-pressed="${t.view === 'design'}">Design</button></div>`
360
360
  + (t.view === 'design' ? designHtml(t) : structureHtml(t)) + cyclesHtml(t)
@@ -374,7 +374,7 @@ function structureHtml(t) {
374
374
  const L = plan && plan.outline ? plan.outline.map((x) => [x.title, x.notes || '']) : FRAME;
375
375
  const want = shapeOf(t.block);
376
376
  const ask = want && !(S && S.running) ? `<div class="vz-ask"><p>Your change: <b>“${esc(want)}”</b></p><div>${btn('s-turn', 'Make the next version', { off: t.busy })}</div></div>` : '';
377
- const working = S && S.running ? '<p class="vz-msg rp-wait" role="status">Claude is reshaping the sections to your change. It takes a minute or two; Use this shows here when it is ready.</p>' : '';
377
+ const working = S && S.running ? '<p class="vz-msg rp-wait" role="status">PMOS is reshaping the sections to your change. It takes a minute or two; Use this shows here when it is ready.</p>' : '';
378
378
  const held = t.busy || !!(S && S.running); // a running job holds only these two; Discard and Delete template stay free
379
379
  const save = shown != null && S && shown !== S.saved ? btn('s-accept', 'Use this', { off: held }) : '';
380
380
  const undo = V.some((v) => v.n < (S ? S.current : 0)) ? btn('s-undo', 'Undo', { sec: true, off: held }) : '';
@@ -387,7 +387,7 @@ function designHtml(t) {
387
387
  if (Z.err) return `<p class="vz-msg">${esc(Z.err)}</p>`;
388
388
  const V = Z.versions || [], saved = Z.saved ? Z.saved.version : null, s = t.setup || {};
389
389
  const ask = t.block.design && !Z.running ? `<div class="vz-ask"><p>Your change: <b>“${esc(t.block.design)}”</b></p><div>${btn('d-turn', 'Make the next version', { off: t.busy })}</div></div>` : '';
390
- const working = Z.running ? '<p class="vz-msg rp-wait" role="status">Claude is making the look. It takes a minute or two; Use it shows here when it is ready.</p>' : '';
390
+ const working = Z.running ? '<p class="vz-msg rp-wait" role="status">PMOS is making the look. It takes a minute or two; Use it shows here when it is ready.</p>' : '';
391
391
  const preview = t.dv != null && t.dv !== saved;
392
392
  const head = `<div class="vz-r1"><div class="rp-grow"><h2 class="rp-h2">${esc(s.name || t.block.id)}</h2><p class="vz-note">${esc([s.audience, OUT[s.output] || s.output, s.status === 'paused' ? 'not scheduled' : 'goes out ' + schedWords(s.schedule).replace(/^./, (c) => c.toLowerCase())].filter(Boolean).join(' · '))}</p></div>`
393
393
  + (preview ? '<span class="cz-pill you">Previewing new look</span>' : t.dv != null ? '<span class="cz-pill ok">Saved look</span>' : '') + '</div>';
@@ -483,7 +483,7 @@ async function press(t, e) {
483
483
  if (a === 's-accept') { await act(t, async () => { const r = await post('/api/report-structure/accept', { id, n: t.sv }); if (!r || !r.ok) return why(r, 'The structure was not saved.'); t.S = r.structure;
484
484
  // the open draft is written again with these sections, so the PM reads the report they asked for now, not next cycle (batch 22 item 13)
485
485
  const d = await post('/api/report-setups/draft', { id });
486
- return 'S' + t.sv + ' is saved. ' + (d && d.ok ? 'Claude is writing the draft again with these sections. It opens under Reports when it lands.' : 'The next cycle follows it. The draft was not written again: ' + why(d, 'no answer') + '.'); }); return; }
486
+ return 'S' + t.sv + ' is saved. ' + (d && d.ok ? 'PMOS is writing the draft again with these sections. It opens under Reports when it lands.' : 'The next cycle follows it. The draft was not written again: ' + why(d, 'no answer') + '.'); }); return; }
487
487
  if (a === 's-undo') { const V = t.S.versions.filter((x) => x.n < t.S.current); const to = V[V.length - 1].n; await act(t, async () => { const r = await post('/api/report-structure/revert', { id, n: to }); if (!r || !r.ok) return why(r, 'Undo did not go through.'); t.S = r.structure; t.sv = t.S.current; return 'Back to S' + to + '.'; }); return; }
488
488
  if (a === 'd-accept') { await act(t, async () => { const r = await post('/api/report-design/accept', { id, n: t.dv }); if (!r || !r.ok) return why(r, 'The design was not saved.'); t.Z = r.design; return 'Using the new look (D' + t.dv + '). The next cycle follows it, and every section and figure stays.'; }); return; }
489
489
  if (a === 'd-keep') {
@@ -535,7 +535,7 @@ async function startLook(t, id, look) {
535
535
  const d = await post('/api/report-design/turn', { id, text, points: [] });
536
536
  if (!d || !d.ok) { t.block = Object.assign({}, t.block, { design: text }); return ' The look did not start: ' + why(d, 'no answer') + '. Press Make the next version to try again.'; }
537
537
  t.Z = Object.assign({}, t.Z, { running: true }); poll(t, 'design');
538
- return ' Claude is making the look' + (added ? ' from ' + added : '') + ' now.';
538
+ return ' PMOS is making the look' + (added ? ' from ' + added : '') + ' now.';
539
539
  }
540
540
  /** Draft it (RfH4, RfH7): the answers set the report up, T1 and the conversation are recorded, and its current state opens (RfH1). */
541
541
  async function setUp(t) {
@@ -555,11 +555,11 @@ async function setUp(t) {
555
555
  let shaping = '';
556
556
  if (shape) {
557
557
  const s2 = await post('/api/report-structure/turn', { id: r.setup.id, text: shape });
558
- shaping = s2 && s2.ok ? ' Claude is reshaping the sections to your change.' : ' The change to its sections did not start: ' + why(s2, 'no answer') + '.';
558
+ shaping = s2 && s2.ok ? ' PMOS is reshaping the sections to your change.' : ' The change to its sections did not start: ' + why(s2, 'no answer') + '.';
559
559
  }
560
560
  // the look Claude proposed with it (batch 22 item 13): the PM's words, and the file to follow
561
561
  if (look.text || look.sample) shaping += await startLook(t, r.setup.id, look);
562
562
  const d = r.drafted || {};
563
- const first = d.drafting ? "The report's own session is drafting it." : d.path ? 'The first draft is written. Claude reads it as your readers would.' : 'The first draft was not written' + (d.error ? ': ' + d.error : '') + '.';
563
+ const first = d.drafting ? "The report's own session is drafting it." : d.path ? 'The first draft is written. PMOS reads it as your readers would.' : 'The first draft was not written' + (d.error ? ': ' + d.error : '') + '.';
564
564
  return current(t, first + (once ? ' It goes out once.' : '') + shaping);
565
565
  }
@@ -275,14 +275,14 @@ export async function openSources() {
275
275
  * opens the list. Nothing here writes: a message goes through the same ask route as every other conversation. */
276
276
  export function openChatPage(key, label) {
277
277
  const say = label
278
- ? 'Talk to Claude about ' + label + '. It works in a real Claude Code session: it can read, change files, run commands and take slash commands.'
279
- : 'Talk to Claude. It works in a real Claude Code session: it can read, change files, run commands and take slash commands. Pick another session from the list.';
280
- openDlg({ eye: label ? 'Chat · ' + label : 'Chat', title: label ? 'Ask about ' + label : 'Chat', say, stream: turnA(ptx(say)), noteKey: key, pane: `<article class="paper doc"><p class="note">${esc(label ? 'This conversation is about ' + label + '. Files Claude opens show here.' : 'Files Claude opens show here.')}</p></article>`, paneEmpty: true, label: label || 'Chat', sessions: true });
278
+ ? 'Talk to PMOS about ' + label + '. It works in a real Claude Code session: it can read, change files, run commands and take slash commands.'
279
+ : 'Talk to PMOS. It works in a real Claude Code session: it can read, change files, run commands and take slash commands. Pick another session from the list.';
280
+ openDlg({ eye: label ? 'Chat · ' + label : 'Chat', title: label ? 'Ask about ' + label : 'Chat', say, stream: turnA(ptx(say)), noteKey: key, pane: `<article class="paper doc"><p class="note">${esc(label ? 'This conversation is about ' + label + '. Files PMOS opens show here.' : 'Files PMOS opens show here.')}</p></article>`, paneEmpty: true, label: label || 'Chat', sessions: true });
281
281
  if (chatPage()) { // the held-open chat (desktop Home) leaves the page live; on a phone Home's chat is a popup and keeps openDlg's veil and inert page
282
282
  document.documentElement.style.overflow = '';
283
283
  $('#veil').classList.remove('on');
284
284
  }
285
- $('#askIn').placeholder = label ? 'Message Claude about ' + label : 'Message Claude, or type /';
285
+ $('#askIn').placeholder = label ? 'Message PMOS about ' + label : 'Message PMOS, or type /';
286
286
  if (desk()) setFull(true); else setTab('chat');
287
287
  vwShutPane(); // premium-chat-viewer V1: the conversation has the room until something opens in the viewer
288
288
  loadThread(key);
@@ -341,7 +341,7 @@ export function openDlg(o) {
341
341
  $('#oMain').innerHTML = o.pane || `<article class="paper doc">${o.html}</article>`; $('#oLab').textContent = o.label || 'Detail';
342
342
  if (o.paneEmpty) $('#oMain').dataset.empty = '1'; else delete $('#oMain').dataset.empty; // a placeholder note is not a tab (premium-chat-viewer V2)
343
343
  vwReset(); // extra viewer tabs belong to the dialog that opened them
344
- $('#dBody').innerHTML = `<div class="stream" role="log">${o.stream || turnA(ptx(o.say))}</div><form class="askbar" id="askF"><div class="slashm" id="slashM" role="listbox" aria-label="Commands" hidden></div>${attachRowMarkup()}${attachMarkup()}<textarea id="askIn" rows="1" placeholder="Message Claude, or type /" maxlength="8000" autocomplete="off" enterkeyhint="send" aria-label="A message for Claude" aria-controls="slashM"></textarea><button type="submit" data-act="ask" id="askGo" aria-label="Send to Claude" title="Send to Claude"><svg class="i" viewBox="0 0 24 24"><path d="M5 12h14M13 6l6 6-6 6"/></svg></button></form><div class="askfoot"><p class="fine2" id="askNote">${CHAT_NOTE}</p></div>`;
344
+ $('#dBody').innerHTML = `<div class="stream" role="log">${o.stream || turnA(ptx(o.say))}</div><form class="askbar" id="askF"><div class="slashm" id="slashM" role="listbox" aria-label="Commands" hidden></div>${attachRowMarkup()}${attachMarkup()}<textarea id="askIn" rows="1" placeholder="Message PMOS, or type /" maxlength="8000" autocomplete="off" enterkeyhint="send" aria-label="A message for PMOS" aria-controls="slashM"></textarea><button type="submit" data-act="ask" id="askGo" aria-label="Send to PMOS" title="Send to PMOS"><svg class="i" viewBox="0 0 24 24"><path d="M5 12h14M13 6l6 6-6 6"/></svg></button></form><div class="askfoot"><p class="fine2" id="askNote">${CHAT_NOTE}</p></div>`;
345
345
  mountNotes({ getKey: () => S.key, ws: new URLSearchParams(location.search).get('ws'), input: $('#askIn'), note: $('#askNote'), show: () => { if (!desk()) setTab('out'); }, toChat: () => { if (!desk()) setTab('chat'); } });
346
346
  mountAttach({ getKey: () => S.key, input: $('#askIn'), note: $('#askNote'), onSlash: () => { const i = $('#askIn'); if (!i.value.startsWith('/')) i.value = '/' + i.value; i.focus(); drawSlash(); growAsk(); }, onPad: () => openNotes() });
347
347
  quietNote();
@@ -485,7 +485,7 @@ const INTERRUPT = /^\[Request interrupted by user/;
485
485
  export function sessionHtml(c, goal = null, { answer = false } = {}) {
486
486
  if (!c) return '';
487
487
  if (c.state === 'ended' && !(c.messages || []).length) return turnAgent('<p class="tt" role="status">This session has ended. Your next message starts a new one.</p>');
488
- if (c.state !== 'conv' && c.state !== 'ended') return turnAgent(`<p class="tt" role="status">${esc(c.missing || 'Claude is starting.')}</p>`);
488
+ if (c.state !== 'conv' && c.state !== 'ended') return turnAgent(`<p class="tt" role="status">${esc(c.missing || 'PMOS is starting.')}</p>`);
489
489
  const msgs = c.messages || [], last = msgs.length - 1;
490
490
  const waiting = !c.ask && c.turn !== 'agent' && c.turn !== 'tool';
491
491
  const ctx = new Map(turnsOf(msgs, waiting || c.state === 'ended').filter((t) => t.done).map((t) => [t.at, t.items])); // premium-chat-viewer slice 2
@@ -500,13 +500,13 @@ export function sessionHtml(c, goal = null, { answer = false } = {}) {
500
500
  }
501
501
  const g = splitGoal(m.text), rp = splitReport(g.text); // premium-reports-from-chat: a pmos-report block becomes a chip that opens the Report tab
502
502
  const live = i === last && waiting && !!goal && goal.state === 'grilling';
503
- return turnAgent(`<p class="agtag">Claude</p>${rp.text ? mdHtml(rp.text) : ''}${goalBlockHtml(g.block, { live, state: goal && goal.state })}${reportChipHtml(rp.block, i)}${chipsHtml(ctx.get(i))}`);
503
+ return turnAgent(`<p class="agtag">PMOS</p>${rp.text ? mdHtml(rp.text) : ''}${goalBlockHtml(g.block, { live, state: goal && goal.state })}${reportChipHtml(rp.block, i)}${chipsHtml(ctx.get(i))}`);
504
504
  });
505
505
  if (goalProgressHtml(goal)) out.push(goalChipHtml(goal)); // the goal itself is in the viewer's Goal tab (goalView below)
506
506
  // item-chat-history: an ended session keeps its conversation on the item; the next message picks it up
507
507
  if (c.state === 'ended') out.push(turnAgent('<p class="tt" role="status">This session has ended. Your conversation is kept here, and your next message picks it up.</p>'));
508
- else if (c.ask) out.push(turnAgent(`<p class="agtag">Claude asks before it goes on</p><p class="tt">${esc(c.ask.question)}</p><div class="chatopts">${(c.ask.options || []).map((o) => `<button type="button" class="cta alt" data-chat-press="${esc(o.n)}">${esc(o.label)}</button>`).join('')}</div>`));
509
- else if (c.turn === 'agent' || c.turn === 'tool') out.push(turnAgent(`<p class="tt" role="status">${c.turn === 'tool' && c.openCall ? 'Running ' + esc(c.openCall) + '.' : 'Claude is working.'} <button type="button" class="cta alt" data-chat-press="esc">Stop</button></p>`));
508
+ else if (c.ask) out.push(turnAgent(`<p class="agtag">PMOS asks before it goes on</p><p class="tt">${esc(c.ask.question)}</p><div class="chatopts">${(c.ask.options || []).map((o) => `<button type="button" class="cta alt" data-chat-press="${esc(o.n)}">${esc(o.label)}</button>`).join('')}</div>`));
509
+ else if (c.turn === 'agent' || c.turn === 'tool') out.push(turnAgent(`<p class="tt" role="status">${c.turn === 'tool' && c.openCall ? 'Running ' + esc(c.openCall) + '.' : 'PMOS is working.'} <button type="button" class="cta alt" data-chat-press="esc">Stop</button></p>`));
510
510
  return out.join('');
511
511
  }
512
512
  let threadTimer = null;
@@ -588,7 +588,7 @@ export function drawThread(th, key, conv) {
588
588
  goalView(key, conv);
589
589
  reportAuto(key, conv);
590
590
  const go = $('#askGo'); if (go) go.disabled = !!th.working; // an earlier read-only run still answering
591
- const n = $('#askNote'); if (n) n.textContent = th.working ? 'The agent is answering. You can write again when it has.' : conv && conv.ask ? 'Claude is waiting for your answer above.' : CHAT_NOTE;
591
+ const n = $('#askNote'); if (n) n.textContent = th.working ? 'The agent is answering. You can write again when it has.' : conv && conv.ask ? 'PMOS is waiting for your answer above.' : CHAT_NOTE;
592
592
  if (atEnd) b.scrollTop = b.scrollHeight;
593
593
  }
594
594
  export async function loadThread(key) {
@@ -739,7 +739,7 @@ async function sendText(key, text, files) {
739
739
  const res = await chatPost('ask', files && files.length ? { key, text, files, ...ctx } : { key, text, ...ctx });
740
740
  if (go) go.disabled = false;
741
741
  if (!res || res.ok !== true) { $('#askNote').textContent = (res && res.error) || 'The message was not sent.'; return false; }
742
- $('#askNote').textContent = res.started ? 'Claude is starting a session for this.' : 'Sent.';
742
+ $('#askNote').textContent = res.started ? 'PMOS is starting a session for this.' : 'Sent.';
743
743
  const b = $('#dBody'); b.scrollTop = b.scrollHeight;
744
744
  loadThread(key);
745
745
  return true;
@@ -771,11 +771,11 @@ async function onGoalPress(e) {
771
771
  if (!S.key || (!say && !gb)) return;
772
772
  if (say) { say.disabled = true; await sendText(S.key, say.dataset.chatSay); return; }
773
773
  const act = gb.dataset.goal;
774
- if (act === 'change') { const inp = $('#askIn'); inp.placeholder = 'Tell Claude what to change'; inp.focus(); return; }
774
+ if (act === 'change') { const inp = $('#askIn'); inp.placeholder = 'Tell PMOS what to change'; inp.focus(); return; }
775
775
  if (!S.goal) return;
776
776
  gb.disabled = true;
777
777
  const r = await chatPost('goal', { key: S.key, id: S.goal.id, act, draft: S.draft });
778
- $('#askNote').textContent = r && r.ok ? ({ start: 'Claude is starting on the goal.', cancel: 'The goal is cancelled.', stop: 'The goal is stopped.' }[act]) : (r && r.error) || 'The press did not reach the session.';
778
+ $('#askNote').textContent = r && r.ok ? ({ start: 'PMOS is starting on the goal.', cancel: 'The goal is cancelled.', stop: 'The goal is stopped.' }[act]) : (r && r.error) || 'The press did not reach the session.';
779
779
  loadThread(S.key);
780
780
  }
781
781
  $('#dBody').addEventListener('click', onGoalPress);
@@ -809,7 +809,7 @@ $('#dBody').addEventListener('submit', async (e) => {
809
809
  e.preventDefault();
810
810
  const inp = $('#askIn'), text = inp.value.trim(), key = S.key;
811
811
  if (!key && S.sid) { // premium-session-list: a session the list opened that has no row of its own
812
- if (!text) { $('#askNote').textContent = 'Write a message for Claude.'; return; }
812
+ if (!text) { $('#askNote').textContent = 'Write a message for PMOS.'; return; }
813
813
  const id = S.sid, pk = 'sid:' + id, p = pendAdd(pk, text);
814
814
  inp.value = ''; drawSlash(); growAsk(); pendDraw(pk); // the turn shows at once (batch 24 item 2)
815
815
  const r = await pmPost('/api/session/say', { id, text }).catch(() => null);
@@ -824,11 +824,11 @@ $('#dBody').addEventListener('submit', async (e) => {
824
824
  if (!key) { $('#askNote').textContent = 'This row has no conversation, so the message was not sent.'; return; }
825
825
  const files = attachNames();
826
826
  if (files === null) { $('#askNote').textContent = 'A file is still saving. Send when its chip shows its size.'; return; }
827
- if (!text && !files.length) { $('#askNote').textContent = 'Write a message for Claude.'; return; }
827
+ if (!text && !files.length) { $('#askNote').textContent = 'Write a message for PMOS.'; return; }
828
828
  // the turn shows and the box empties at once (batch 24 item 2); a send that fails takes the turn away and puts the words back
829
829
  const p = pendAdd(key, text, files);
830
830
  inp.value = ''; drawSlash(); growAsk(); pendDraw(key);
831
- if (await sendText(key, text, files)) { p.sent = true; inp.placeholder = 'Message Claude, or type /'; clearAttach(); pendDraw(key); }
831
+ if (await sendText(key, text, files)) { p.sent = true; inp.placeholder = 'Message PMOS, or type /'; clearAttach(); pendDraw(key); }
832
832
  else {
833
833
  PEND.list = pendOf(key).filter((x) => x !== p); pendDraw(key);
834
834
  if (S.key === key && !inp.value) { inp.value = text; growAsk(); }
@@ -1459,7 +1459,7 @@ function pickSession(id) {
1459
1459
  $('#dlg').classList.remove('srl-open');
1460
1460
  $('#dEye').textContent = r.group === 'pmos' ? 'Started by PMOS' : r.goal ? 'Goal' : 'Session'; $('#dTitle').textContent = r.name; $('#dSub').hidden = true;
1461
1461
  const st = $('#dBody .stream'); if (st) clearHtml(st);
1462
- $('#askF').hidden = !!r.headless; $('#askIn').value = ''; $('#askIn').placeholder = r.key ? 'Message Claude, or type /' : 'Message this session';
1462
+ $('#askF').hidden = !!r.headless; $('#askIn').value = ''; $('#askIn').placeholder = r.key ? 'Message PMOS, or type /' : 'Message this session';
1463
1463
  if (r.key) { S.sid = null; S.key = r.key; loadThread(r.key); } else { S.key = null; S.sid = id; loadSid(id); }
1464
1464
  syncAttach(); syncNotes();
1465
1465
  sessionCard(r); railDraw();
@@ -1477,7 +1477,7 @@ async function loadSid(id) {
1477
1477
  const b = $('#dBody'), atEnd = b.scrollHeight - b.scrollTop - b.clientHeight < 80;
1478
1478
  if (c && c.ok) PEND.sidConv = c;
1479
1479
  putHtml(box, c && c.ok ? sessionHtml(c) + pendHtml('sid:' + id, c) : turnA(ptx('The conversation of this session could not be read.')));
1480
- $('#askNote').textContent = c && c.ask ? 'Claude is waiting for your answer above.' : 'Your message goes to this session.';
1480
+ $('#askNote').textContent = c && c.ask ? 'PMOS is waiting for your answer above.' : 'Your message goes to this session.';
1481
1481
  if (atEnd) b.scrollTop = b.scrollHeight;
1482
1482
  if (c && c.ok && c.state !== 'ended' && $('#dlg').classList.contains('on')) R.sidTimer = setTimeout(() => loadSid(id), 2000);
1483
1483
  }
@@ -34,8 +34,8 @@ export function chipsHtml(items) {
34
34
  fold = items.filter((it) => !shown.includes(it));
35
35
  }
36
36
  const id = fold.length ? foldId(fold) : '';
37
- const more = fold.length ? `<details class="ctxmore" role="listitem" data-ctx-fold="${esc(id)}"${OPEN.has(id) ? ' open' : ''}><summary aria-label="${fold.length} more files and pages Claude read">+${fold.length} read</summary><div class="ctxc">${fold.map((it) => chipHtml(it, false)).join('')}</div></details>` : '';
38
- return `<div class="ctxc" role="list" aria-label="What Claude worked with">${shown.map((it, i) => chipHtml(it, i === 0)).join('')}${more}</div>`;
37
+ const more = fold.length ? `<details class="ctxmore" role="listitem" data-ctx-fold="${esc(id)}"${OPEN.has(id) ? ' open' : ''}><summary aria-label="${fold.length} more files and pages PMOS read">+${fold.length} read</summary><div class="ctxc">${fold.map((it) => chipHtml(it, false)).join('')}</div></details>` : '';
38
+ return `<div class="ctxc" role="list" aria-label="What PMOS worked with">${shown.map((it, i) => chipHtml(it, i === 0)).join('')}${more}</div>`;
39
39
  }
40
40
  if (typeof document !== 'undefined') document.addEventListener('toggle', (e) => { const d = e.target; if (!d || !d.dataset || d.dataset.ctxFold == null) return; if (d.open) OPEN.add(d.dataset.ctxFold); else OPEN.delete(d.dataset.ctxFold); }, true);
41
41
  /** An item from a chip's data attributes. */
@@ -61,7 +61,7 @@ export function ticketHtml(key, t) {
61
61
  /** The Slack tab as HTML. Pure. */
62
62
  export function slackHtml(it) {
63
63
  const what = it.url ? 'A Slack message' : it.ts ? 'A message in a Slack channel' : 'A Slack channel';
64
- return `<div class="vwdoc"><div class="vwfnone" role="status"><b>${esc(what)}</b><p class="vwmut">Claude worked with this in Slack. PMOS keeps no copy of Slack messages, so it opens in Slack.</p>`
64
+ return `<div class="vwdoc"><div class="vwfnone" role="status"><b>${esc(what)}</b><p class="vwmut">PMOS worked with this in Slack. PMOS keeps no copy of Slack messages, so it opens in Slack.</p>`
65
65
  + `<div class="vwrow"><a class="vwbtn pri" href="${esc(slackUrl(it))}" target="_blank" rel="noopener noreferrer">Open in Slack</a></div><code>${esc(it.url || it.channel + (it.ts ? ' · ' + it.ts : ''))}</code></div></div>`;
66
66
  }
67
67
 
@@ -76,7 +76,7 @@ export async function openTicket(o) {
76
76
  const R = await TV.readTicket({ ws, board, ini: initiative, ref });
77
77
  if (!R.model.ok) {
78
78
  el.innerHTML = ticketHtml(R.model);
79
- const rd = el.querySelector('[data-jread]'); if (rd) rd.onclick = async () => { rd.disabled = true; toast(await askHere(readAsk(ref)) ? 'Claude is reading ' + ref + ' in this popup\'s chat.' : 'Open the ticket from its popup to read it.'); };
79
+ const rd = el.querySelector('[data-jread]'); if (rd) rd.onclick = async () => { rd.disabled = true; toast(await askHere(readAsk(ref)) ? 'PMOS is reading ' + ref + ' in this popup\'s chat.' : 'Open the ticket from its popup to read it.'); };
80
80
  return;
81
81
  }
82
82
  // the header names the ticket by its key and its title, not the key alone (batch 14 item 12: "MSD-4329" alone said nothing)
@@ -175,7 +175,7 @@ function viewFound() {
175
175
  }
176
176
  if (S.review !== 'sources' && (S.item || S.setup.item)) {
177
177
  const item = S.item || S.setup.item;
178
- return `<h1 id="wlH" tabindex="-1">Your first task is ready</h1><p class="wl-lede">${esc(item.title)}</p><p>${item.due ? 'Due ' + esc(item.due) : 'Added to Today'}</p><p>Open it on Home to set a date, mark it done, or brief Claude when connected.</p>${err()}${foot(btn('back', 'Add more work', { alt: true }), btn('finish', 'Open Home'))}`;
178
+ return `<h1 id="wlH" tabindex="-1">Your first task is ready</h1><p class="wl-lede">${esc(item.title)}</p><p>${item.due ? 'Due ' + esc(item.due) : 'Added to Today'}</p><p>Open it on Home to set a date, mark it done, or brief PMOS when connected.</p>${err()}${foot(btn('back', 'Add more work', { alt: true }), btn('finish', 'Open Home'))}`;
179
179
  }
180
180
  return `<h1 id="wlH" tabindex="-1">Here’s what PMOS found</h1>${readSummary()}${S.readItems.length ? '<ul class="wl-list">' + S.readItems.map(i => '<li>' + esc(i.title || i.key || 'Work item') + '</li>').join('') + '</ul>' : '<p>A completed read may contain no open items in this scope. Review your sources on Home or add a task.</p>'}${err()}${foot(btn('back', 'Add or change work', { alt: true }), btn('finish', 'Use these reads and open Home'))}`;
181
181
  }
@@ -37,7 +37,7 @@ export function sugHtml(p, st) {
37
37
  const S = suggestOrder(st, p);
38
38
  if (!S.differs) return '';
39
39
  const dot = notNow()[p.id] !== S.sig;
40
- return `<button type="button" class="po-sug" data-po-sug="${esc(p.id)}" aria-haspopup="dialog" aria-label="Claude suggests an order from the dates${dot ? '. The dates disagree with the order' : ''}" title="Claude suggests an order from the dates">${SV(SPARK, 1.8)}${dot ? '<span class="po-nd" aria-hidden="true"></span>' : ''}</button>`;
40
+ return `<button type="button" class="po-sug" data-po-sug="${esc(p.id)}" aria-haspopup="dialog" aria-label="PMOS suggests an order from the dates${dot ? '. The dates disagree with the order' : ''}" title="PMOS suggests an order from the dates">${SV(SPARK, 1.8)}${dot ? '<span class="po-nd" aria-hidden="true"></span>' : ''}</button>`;
41
41
  }
42
42
 
43
43
  let O = null;
@@ -115,7 +115,7 @@ function openPop(btn) {
115
115
  + S.rows.map((r) => `<div class="po-so${r.moved ? ' mv' : ''}${r.none ? ' nod' : ''}"><span class="n">${r.n}</span><b>${esc(r.title)}</b>`
116
116
  + (r.none ? `<button type="button" class="po-adb" data-po-dates="${esc(r.id)}" aria-label="Add dates to ${esc(r.title)}" title="Add dates">${SV(CAL, 1.8)}</button>` : `<span class="dt">${esc(r.range)}</span>`)
117
117
  + `<span class="r">${esc(r.reason)}</span></div>`).join('')
118
- + `<div class="po-acts"><button type="button" class="po-ib soft" data-po-no aria-label="Not now. Claude asks again only when a date changes" title="Not now">${SV(X, 1.8)}</button>`
118
+ + `<div class="po-acts"><button type="button" class="po-ib soft" data-po-no aria-label="Not now. PMOS asks again only when a date changes" title="Not now">${SV(X, 1.8)}</button>`
119
119
  + `<button type="button" class="po-ib ok" data-po-use aria-label="Use this order" title="Use this order">${SV(OK, 2)}</button></div>`;
120
120
  document.body.appendChild(el);
121
121
  const b = btn.getBoundingClientRect(), w = Math.min(420, window.innerWidth - 24);
@@ -198,7 +198,7 @@ function rowHtml(m, P) {
198
198
  : `<button type="button" class="pc-ib del" data-pc="del" data-m="${esc(m.id)}" aria-label="${esc('Delete ' + (m.name || 'this milestone'))}" title="Delete">${SV(I.del, 15)}</button>`;
199
199
  const late = !gone.length && lateOf(m, C.st.inis);
200
200
  // Claude's change, filled in from the pencil (canvas XmsgB): what it was, and what Save does
201
- const chg = m.sug ? `<p class="msg-chg">${SV(I.spark, 13)}<span>Claude's change${m.was ? ', was ' + esc(m.was) : ''}, ready to save. Edit it, then Save.</span></p>` : '';
201
+ const chg = m.sug ? `<p class="msg-chg">${SV(I.spark, 13)}<span>PMOS's change${m.was ? ', was ' + esc(m.was) : ''}, ready to save. Edit it, then Save.</span></p>` : '';
202
202
  const risk = m.risk && !m.done && !m.fixed ? `<p class="msg-risk"><i class="pc-wdot" aria-hidden="true"></i><span>At risk: ${esc(m.risk)}</span><button type="button" class="pc-ib" data-pc="unrisk" data-m="${esc(m.id)}" aria-label="${esc('No longer at risk: ' + (m.name || 'this milestone'))}" title="No longer at risk">${SV(I.x, 14)}</button></p>` : '';
203
203
  const warn = gone.length ? `${esc(C.o.nameOf(gone[0].ini) || gone[0].ini)} left the program. Pick another initiative, or tick it yourself.`
204
204
  : late ? `${esc(late.title)} is set to ${late.label === 'Deliver' ? 'deliver' : 'pass ' + esc(late.label)} on ${esc(shortDay(late.date))}, after this date.` : '';
@@ -222,14 +222,14 @@ function msHtml(D, P) {
222
222
  }
223
223
  h += open.map((m) => rowHtml(m, P)).join('');
224
224
  if (!full) h += `<button type="button" class="pc-ln addl" data-pc="add">${SV(I.plus, 15, 2)}Add a milestone</button>`;
225
- return `<section class="pc-ms" id="pcMs" aria-label="Milestones"><div class="pc-lbl">Milestones${lim}</div>${checkedHtml()}${C.dropped ? `<p class="msg-chg">${SV(I.spark, 13)}<span>Claude's change: ${esc(C.dropped)} is dropped. Save to keep the change, or Discard.</span></p>` : ''}<div class="pc-ml" role="list">${h}</div></section>`;
225
+ return `<section class="pc-ms" id="pcMs" aria-label="Milestones"><div class="pc-lbl">Milestones${lim}</div>${checkedHtml()}${C.dropped ? `<p class="msg-chg">${SV(I.spark, 13)}<span>PMOS's change: ${esc(C.dropped)} is dropped. Save to keep the change, or Discard.</span></p>` : ''}<div class="pc-ml" role="list">${h}</div></section>`;
226
226
  }
227
227
  /** When Claude last checked the milestones, and Check now (canvas XmsgB): the line lives here, so the PM can see the checks run. */
228
228
  function checkedHtml() {
229
229
  if (!C.o.review) return '';
230
230
  const R = C.o.review() || {}, run = !!(R.running || C.checking);
231
231
  const when = R.checked ? lastWhen(R.checked) : '';
232
- const line = run ? 'Claude is checking the milestones now.' : 'Claude checks every Monday and when a date, Jira or a meeting changes.' + (when ? ' Last checked ' + when + '.' : '');
232
+ const line = run ? 'PMOS is checking the milestones now.' : 'PMOS checks every Monday and when a date, Jira or a meeting changes.' + (when ? ' Last checked ' + when + '.' : '');
233
233
  return `<div class="msg-chk">${faceOr(run ? 'thinking' : 'handled', 's', SV('M12 7v5l3 2M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0', 14), { label: false })}<span>${esc(line)}</span>${C.o.checkNow ? `<button type="button" class="msg-ib${run ? ' on' : ''}" data-pc="checknow" aria-label="Check now" title="Check now"${run ? ' disabled' : ''}>${SV('M20 11a8 8 0 1 0-2.3 5.7M20 4v7h-7', 15)}</button>` : ''}</div>`;
234
234
  }
235
235
  /** "today, 09:12", "yesterday, 17:40" or "Oct 21". */
@@ -305,7 +305,7 @@ export function suggestOrder(st, p) {
305
305
  const { d } = x, prev = k ? seq[k - 1].i.title : '';
306
306
  const range = d.start && d.end ? shortDay(d.start) + ' – ' + shortDay(d.end) : d.start ? 'from ' + shortDay(d.start) : d.end ? 'to ' + shortDay(d.end) : d.ms ? '◆ ' + shortDay(d.ms.date) : '';
307
307
  let reason;
308
- if (!x.key) reason = 'No dates yet, so it goes last. Add dates and Claude checks again.';
308
+ if (!x.key) reason = 'No dates yet, so it goes last. Add dates and PMOS checks again.';
309
309
  else if (d.start) reason = k === 0 ? 'Starts first, on ' + shortDay(d.start) + '.' : seq[k - 1].d.start === d.start ? 'Starts the same day as ' + prev + ' and finishes later.' : 'Starts ' + shortDay(d.start) + ', after ' + prev + '.';
310
310
  else if (d.ms) reason = 'No start date. Its ◆ ' + d.ms.name + ' is ' + shortDay(d.ms.date) + '.';
311
311
  else reason = 'No start date. It finishes ' + shortDay(d.end) + '.';
@@ -27,14 +27,14 @@ export async function readLib(ws) {
27
27
  }
28
28
 
29
29
  const sw = (scope, r) => `<button type="button" class="rl-sw${r.on ? ' on' : ''}" role="switch" aria-checked="${!!r.on}" aria-label="${esc((r.on ? 'Stop drafting ' : 'Draft ') + r.name)}" data-rl="switch" data-scope="${esc(scope)}" data-kind="${esc(r.kind)}"><i></i></button>`;
30
- const row = (scope, r) => `<div class="rl-row"><span class="rl-t"><b>${r.pick ? '<span class="rl-pk" aria-label="Claude\'s pick">✦</span> ' : ''}${esc(r.name)}</b>${r.sub ? `<small>${esc(r.sub)}</small>` : ''}</span>${sw(scope, r)}</div>`;
30
+ const row = (scope, r) => `<div class="rl-row"><span class="rl-t"><b>${r.pick ? '<span class="rl-pk" aria-label="PMOS\'s pick">✦</span> ' : ''}${esc(r.name)}</b>${r.sub ? `<small>${esc(r.sub)}</small>` : ''}</span>${sw(scope, r)}</div>`;
31
31
 
32
32
  /** The library's ready-made part, as html. Zero is silence: no group draws nothing. */
33
33
  export function libHtml(L, o = {}) {
34
34
  if (!L || !(L.groups || []).length) return '';
35
35
  const open = o.open || new Set();
36
36
  const lead = L.lead && L.lead.text ? `<div class="rl-lead"><span class="rl-sp">${SV(I.spark, 16)}</span><p><b>${esc(L.lead.text)}</b>${L.lead.rest ? ' ' + esc(L.lead.rest) : ''}</p>`
37
- + `<button type="button" class="rl-ok" data-rl="picks" aria-label="Keep Claude's picks" title="Keep Claude's picks">${SV(I.chk, 18, 2.4)}</button></div>` : '';
37
+ + `<button type="button" class="rl-ok" data-rl="picks" aria-label="Keep PMOS's picks" title="Keep PMOS's picks">${SV(I.chk, 18, 2.4)}</button></div>` : '';
38
38
  const ov = L.overlap && L.overlap.lead ? `<div class="rl-lead"><span class="rl-sp">${SV(I.spark, 16)}</span><p><b>${esc(L.overlap.lead)}</b>${L.overlap.rest ? ' ' + esc(L.overlap.rest) : ''}</p>`
39
39
  + `<button type="button" class="rl-ok" data-rl="overlap" aria-label="Send one update that carries the others" title="Send one update that carries the others">${SV(I.merge, 18, 2.2)}</button></div>`
40
40
  + ((L.overlap.people || []).length ? `<h4 class="rl-h">${esc(L.overlap.title || 'Who gets what')}</h4><div class="rl-card">${L.overlap.people.map((p) => `<div class="rl-row"><span class="rl-av">${SV(I.people, 16)}</span><span class="rl-t"><b>${esc(p.who)}</b>${p.sub ? `<small>${esc(p.sub)}</small>` : ''}</span></div>`).join('')}</div>` : '') : '';
@@ -54,8 +54,8 @@ export function wireLib(el, h) {
54
54
  if (a === 'fold') { const k = b.dataset.k; if (h.open.has(k)) h.open.delete(k); else h.open.add(k); h.redraw(); return; }
55
55
  b.disabled = true;
56
56
  const done = async (r, ok) => { if (!r || r.ok === false) { b.disabled = false; h.toast((r && r.error) || 'Nothing was changed. The server did not say why.'); return; } h.toast(ok); await h.reload(); };
57
- if (a === 'switch') { const on = b.getAttribute('aria-checked') !== 'true'; return done(await Promise.resolve(pmPost('/api/ready-reports/switch', { ws: h.ws || undefined, scope: b.dataset.scope, kind: b.dataset.kind, on })).catch(() => null), on ? 'On. Claude drafts it at its moment; nothing goes out until you approve it.' : 'Off. Claude no longer drafts it.'); }
58
- if (a === 'picks') return done(await Promise.resolve(pmPost('/api/ready-reports/picks', { ws: h.ws || undefined })).catch(() => null), 'Kept. Only Claude\'s picks are scheduled; the rest draft at their moment.');
57
+ if (a === 'switch') { const on = b.getAttribute('aria-checked') !== 'true'; return done(await Promise.resolve(pmPost('/api/ready-reports/switch', { ws: h.ws || undefined, scope: b.dataset.scope, kind: b.dataset.kind, on })).catch(() => null), on ? 'On. PMOS drafts it at its moment; nothing goes out until you approve it.' : 'Off. PMOS no longer drafts it.'); }
58
+ if (a === 'picks') return done(await Promise.resolve(pmPost('/api/ready-reports/picks', { ws: h.ws || undefined })).catch(() => null), 'Kept. Only PMOS\'s picks are scheduled; the rest draft at their moment.');
59
59
  if (a === 'overlap') return done(await Promise.resolve(pmPost('/api/ready-reports/overlap', { ws: h.ws || undefined })).catch(() => null), 'One update each. The wider one carries the others as sections.');
60
60
  b.disabled = false;
61
61
  });
@@ -128,10 +128,10 @@ function goesHtml(q, ch, a) {
128
128
  + (q.cadence === 'monthly' ? sel('dom', Array.from({ length: 28 }, (_, i) => [i + 1, 'Day ' + (i + 1)]), q.dayOfMonth, 'Day of the month') : '')
129
129
  + sel('time', TIMES.concat(TIMES.includes(q.time) ? [] : [q.time]).sort().map((t) => [t, t]), q.time, 'Time') + '</div>' : '';
130
130
  return `<fieldset class="rf-q"><legend>Goes out${ch.includes('schedule') ? ' ' + tag('changed', 'ch') : ''}</legend><div class="rf-row" role="radiogroup" aria-label="Goes out">${opt(false, 'Once')}${opt(true, 'Repeats')}</div>${more}`
131
- + `<p class="vz-note">${q.repeat ? 'Claude drafts each cycle on its day. ' : ''}You approve each issue; nothing goes out by itself.</p></fieldset>`;
131
+ + `<p class="vz-note">${q.repeat ? 'PMOS drafts each cycle on its day. ' : ''}You approve each issue; nothing goes out by itself.</p></fieldset>`;
132
132
  }
133
133
  function lookHtml(o) {
134
- const words = o.look ? `<p class="vz-note">Your words: “${esc(o.look)}”. Claude makes this look after the first draft; until then it uses the standard look.</p>` : '';
134
+ const words = o.look ? `<p class="vz-note">Your words: “${esc(o.look)}”. PMOS makes this look after the first draft; until then it uses the standard look.</p>` : '';
135
135
  return `<fieldset class="rf-q"><legend>Look</legend><p class="rf-fix"><b>Standard PMOS look</b><span>Nunito, navy title slides, 16:9</span></p>${words}</fieldset>`;
136
136
  }
137
137
  /* ── the template's sections and look (canvas TplA) ── */
@@ -154,7 +154,7 @@ function tplLookHtml(T, name, o) {
154
154
  const words = next ? next.words : L.words;
155
155
  const std = next ? next.n == null : L.saved == null;
156
156
  const fol = !std && (L.follows || []).length ? `<small>Follows ${esc(L.follows.join(', '))}</small>` : std ? '<small>Nunito, navy title slides, 16:9</small>' : '';
157
- const making = o && o.making ? `<p class="vz-note" role="status">Claude is making the look you asked for: “${esc(o.making)}”. It shows here to approve when it is ready.</p>` : '';
157
+ const making = o && o.making ? `<p class="vz-note" role="status">PMOS is making the look you asked for: “${esc(o.making)}”. It shows here to approve when it is ready.</p>` : '';
158
158
  return `<fieldset class="rf-q"><legend>Look${next ? ' ' + tag('changed', 'ch') : ''}</legend><div class="rf-lk"><span class="rf-mini" data-k="${std ? 'std' : 'own'}" aria-hidden="true"><b>${esc(name || '')}</b></span>`
159
159
  + `<p class="rf-fix"><b>${esc(words || 'Standard PMOS look')}</b>${fol}</p></div>${making}</fieldset>`;
160
160
  }
@@ -186,7 +186,7 @@ function proposalHtml(T, words, a, o) {
186
186
  function sourcesHtml(o) {
187
187
  const L = (o.sources || []).filter(Boolean);
188
188
  if (!L.length) return '';
189
- return `<fieldset class="rf-q"><legend>Sources</legend><ul class="rf-src">${L.map((x) => `<li>${esc(x)}</li>`).join('')}</ul><p class="vz-note">Claude reads these for the draft. Each slide names what it read, and what it could not reach.</p></fieldset>`;
189
+ return `<fieldset class="rf-q"><legend>Sources</legend><ul class="rf-src">${L.map((x) => `<li>${esc(x)}</li>`).join('')}</ul><p class="vz-note">PMOS reads these for the draft. Each slide names what it read, and what it could not reach.</p></fieldset>`;
190
190
  }
191
191
  /** Template history (RfH3): newest first; each one that is not the current one has Go back. */
192
192
  export function historyHtml(versions = [], a = 'data-rt', o = {}) {
@@ -218,7 +218,7 @@ export function questionsHtml(q, o = {}, a = 'data-rt') {
218
218
  const words = all;
219
219
  const fx = proposalHtml(T, words, a, o);
220
220
  const note = words.length && !fx ? `<p class="rf-chg">${tag('changed', 'ch')} ${esc(words.join('; '))}. This makes a different template. The current one keeps its draft and its cycles.</p>` : '';
221
- const ask = tpl && !fx ? `<p class="vz-note">To change the look or the sections, ask in the chat. Claude proposes; you approve.</p>` : '';
221
+ const ask = tpl && !fx ? `<p class="vz-note">To change the look or the sections, ask in the chat. PMOS proposes; you approve.</p>` : '';
222
222
  return `<div class="rf-qs">${head}${body}${fx}${note}${ask}${historyHtml(T.versions, a, { pending: words.length ? words.join('; ') : '', busy: o.busy })}${msg}`
223
223
  + `<div class="rf-foot"><button type="button" class="rf-ib vz-hv" ${a}="keep" aria-label="Keep the current template" title="Keep the current template">${SV(ICON.back)}</button>`
224
224
  + `<button type="button" class="rf-ib pri vz-hv" ${a}="maketpl" aria-label="Make a different template" title="Make a different template"${o.busy || !words.length || !q.audience.trim() ? ' disabled' : ''}>${SV(ICON.check, 18)}</button></div></div>`;
@@ -229,7 +229,7 @@ export function waitHtml(F = {}, face = '') {
229
229
  const d = F.drafting;
230
230
  if (d && d.state === 'held') return `<div class="rf-wait">${face}<p><b>The draft waits for a check of ${esc((d.sources || []).join(', '))}.</b><span>It starts by itself when the check passes.</span></p></div>`;
231
231
  if (d && d.state === 'ended') return `<div class="rf-wait" data-k="bad">${face}<p><b>The drafting session ended before a draft was written.</b><span>${esc(d.reason || '')}</span></p><button type="button" class="rf-ib pri vz-hv" data-rt="redraft" aria-label="Draft it again" title="Draft it again">${SV(ICON.go)}</button></div>`;
232
- if (d && d.state === 'drafting') return `<div class="rf-wait" role="status">${face}<p><b>The report's own session is drafting it.</b><span>It opens here when it lands. Keep talking to Claude in the chat.</span></p></div>`;
232
+ if (d && d.state === 'drafting') return `<div class="rf-wait" role="status">${face}<p><b>The report's own session is drafting it.</b><span>It opens here when it lands. Keep talking to PMOS in the chat.</span></p></div>`;
233
233
  // an open session is not a draft being written (Wawan, 2026-11-04: "drafting it" stayed after the session declined): say what it is doing
234
234
  if (F.asking) return `<div class="rf-wait" role="status">${face}<p><b>Your change is with the report's session.</b><span>Its answer shows here when it is done.</span></p></div>`;
235
235
  if (F.answer) return `<div class="rf-wait">${face}<p><b>${esc(F.answer.text)}</b><span>No draft is open. Draft it now, or it drafts on its day.</span></p><button type="button" class="rf-ib pri vz-hv" data-rt="redraft" aria-label="Draft it now" title="Draft it now">${SV(ICON.go)}</button></div>`;
@@ -252,5 +252,5 @@ export function reviewHtml(rv, o = {}, a = 'data-r') {
252
252
  : `<button type="button" class="rf-ib vz-hv" ${a}="rv-no|${esc(f.id)}" aria-label="Not now" title="Not now">${SV(ICON.x)}</button><button type="button" class="rf-ib pri vz-hv" ${a}="rv-do|${esc(f.id)}" aria-label="Do it" title="Do it"${o.busy ? ' disabled' : ''}>${SV(ICON.go)}</button>`) + '</div>').join('');
253
253
  const P = rv.passed || [];
254
254
  const pass = P.length ? `<p class="rf-pass"><b>${P.length} other ${P.length === 1 ? 'check' : 'checks'} found nothing</b><span>${esc(P.join(' · '))}</span></p>` : '';
255
- return `<section class="rf-rv" aria-label="Claude's review"><div class="rf-rvh">${o.face || ''}<b>${esc(line)}</b>${all}</div>${rows}${pass}</section>`;
255
+ return `<section class="rf-rv" aria-label="PMOS's review"><div class="rf-rvh">${o.face || ''}<b>${esc(line)}</b>${all}</div>${rows}${pass}</section>`;
256
256
  }
@@ -51,7 +51,7 @@ export function assHtml(S, o) {
51
51
  if (S.pick && !h.has(keyOf(S, 'pick'))) {
52
52
  const ord = (S.orders || []).find((x) => x.id === S.pick.id);
53
53
  if (!ord) return '';
54
- return `<div class="ro-ass" role="group" aria-label="Claude's pick"><p><b class="ro-st" aria-hidden="true">✦</b> The ${e(ord.name)} order fits this report's question.</p>`
54
+ return `<div class="ro-ass" role="group" aria-label="PMOS's pick"><p><b class="ro-st" aria-hidden="true">✦</b> The ${e(ord.name)} order fits this report's question.</p>`
55
55
  + `<p class="ro-pts">${parts(o, ord.parts, S.pick.adds)}${(S.pick.drops || []).map((x) => `<span class="ro-pt cut">${e(x)}</span>`).join('')}</p>`
56
56
  + `<p class="ro-note">Blue is added${(S.pick.drops || []).length ? ', struck through is dropped' : ''}. Every reading stays.</p>`
57
57
  + `<div class="ro-acts">${btn(o, 'ord|hide|pick', 'x', 'Not now')}${btn(o, 'ord|open|' + ord.id, 'grid', 'See it with the other orders')}${btn(o, 'ord|apply|' + ord.id, 'check', 'Redraft in this order', ' rp-pri')}</div></div>`;
@@ -73,7 +73,7 @@ function pics(o, L, n = 4) {
73
73
  }
74
74
  const more = (n) => n + (n === 1 ? ' slide' : ' slides') + (n > 4 ? ' · +' + (n - 4) + ' more' : '');
75
75
  function cardHtml(S, o, c) {
76
- const e = o.esc, mark = c.now ? '<span class="ro-tag">Now</span>' : c.mine ? '<span class="ro-tag">Mine</span>' : S.pick && S.pick.id === c.id ? '<span class="ro-tag ro-star" aria-label="Claude\'s pick">✦</span>' : '';
76
+ const e = o.esc, mark = c.now ? '<span class="ro-tag">Now</span>' : c.mine ? '<span class="ro-tag">Mine</span>' : S.pick && S.pick.id === c.id ? '<span class="ro-tag ro-star" aria-label="PMOS\'s pick">✦</span>' : '';
77
77
  return `<button type="button" class="ro-card${c.now ? ' now' : ''}" data-r="ord|open|${e(c.id)}"${c.now ? ' aria-current="true"' : ''}>${pics(o, c.now ? o.now : o.pics(c.id))}`
78
78
  + `<span class="ro-cn">${mark}<b>${e(c.name)}</b></span><small>${more(c.n)}</small></button>`;
79
79
  }