create-pmos 0.711.0 → 0.713.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 (118) hide show
  1. package/package.json +88 -40
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/design-system/ui/README.md +1 -1
  4. package/payload/design-system/ui/components/State/README.md +21 -0
  5. package/payload/design-system/ui/components/State/preview.html +8 -0
  6. package/payload/design-system/ui/components/bundle.css +12 -0
  7. package/payload/design-system/ui/interactions.md +2 -0
  8. package/payload/planning/evals/eval-calibration.md +1 -1
  9. package/payload/planning/okrs/health-budgets.md +1 -1
  10. package/payload/state/discoveries.md +1 -1
  11. package/workspace/bin/back-place-health.js +70 -0
  12. package/workspace/changelog.json +87 -2
  13. package/workspace/design-system/ui/README.md +1 -1
  14. package/workspace/design-system/ui/components/State/README.md +21 -0
  15. package/workspace/design-system/ui/components/State/preview.html +8 -0
  16. package/workspace/design-system/ui/components/bundle.css +12 -0
  17. package/workspace/design-system/ui/interactions.md +2 -0
  18. package/workspace/guide/breakdown.md +20 -1
  19. package/workspace/guide/claude-proposes.md +5 -1
  20. package/workspace/guide/cli.md +10 -1
  21. package/workspace/guide/home.md +1 -0
  22. package/workspace/guide/initiatives-and-next-steps.md +13 -0
  23. package/workspace/guide/layout.md +10 -3
  24. package/workspace/guide/routine.md +10 -2
  25. package/workspace/guide/settings-and-switches.md +4 -0
  26. package/workspace/lib/briefing-premium-products.js +16 -2
  27. package/workspace/lib/changed-mark.js +34 -0
  28. package/workspace/lib/launch-cli.js +43 -5
  29. package/workspace/lib/launch-tiers.js +143 -0
  30. package/workspace/lib/needs-providers.js +1 -0
  31. package/workspace/lib/parked-cli.js +105 -0
  32. package/workspace/lib/parked-reasons.js +245 -0
  33. package/workspace/lib/pmos-verbs.js +4 -1
  34. package/workspace/lib/prefs-sync.js +138 -0
  35. package/workspace/lib/product-dots.js +60 -0
  36. package/workspace/lib/route-modules.js +2 -0
  37. package/workspace/lib/routes-briefing-premium.js +11 -1
  38. package/workspace/lib/routes-prefs.js +56 -0
  39. package/workspace/lib/routes-strategy-card.js +53 -0
  40. package/workspace/lib/routes-use-log.js +24 -3
  41. package/workspace/lib/routine-sentence.js +250 -0
  42. package/workspace/lib/strategy-card.js +133 -0
  43. package/workspace/lib/unused-controls.js +178 -0
  44. package/workspace/package-lock.json +2 -2
  45. package/workspace/package.json +1 -1
  46. package/workspace/public/pm/back-place.js +87 -0
  47. package/workspace/public/pm/bd-backlog.css +1 -1
  48. package/workspace/public/pm/bd-backlog.js +9 -3
  49. package/workspace/public/pm/bd-pop-ds.css +10 -0
  50. package/workspace/public/pm/bd-pop-ds.js +27 -3
  51. package/workspace/public/pm/bd-strategy.js +85 -0
  52. package/workspace/public/pm/bd-views.js +2 -1
  53. package/workspace/public/pm/changed-mark.css +7 -0
  54. package/workspace/public/pm/changed-mark.js +117 -0
  55. package/workspace/public/pm/cozy-home.css +7 -0
  56. package/workspace/public/pm/cozy-pick.css +12 -0
  57. package/workspace/public/pm/cozy-pop-work.css +10 -1
  58. package/workspace/public/pm/cozy-pop-work.js +201 -17
  59. package/workspace/public/pm/cozy-routine-job.js +50 -7
  60. package/workspace/public/pm/cozy-routine.css +2 -0
  61. package/workspace/public/pm/cozy-settings.js +21 -3
  62. package/workspace/public/pm/cozy-task-pop.css +7 -0
  63. package/workspace/public/pm/cozy-today-page.css +1 -0
  64. package/workspace/public/pm/cozy-viewer.css +1 -1
  65. package/workspace/public/pm/cozy-viewer.js +14 -2
  66. package/workspace/public/pm/cozy-vw-mtg.css +0 -2
  67. package/workspace/public/pm/cozy-vw.css +0 -1
  68. package/workspace/public/pm/home-app.js +21 -1
  69. package/workspace/public/pm/home-ask.js +19 -1
  70. package/workspace/public/pm/home-chat.js +16 -3
  71. package/workspace/public/pm/home-today.js +2 -0
  72. package/workspace/public/pm/ini-tasks.js +4 -1
  73. package/workspace/public/pm/komorebi.css +11 -0
  74. package/workspace/public/pm/prefs-sync.js +111 -0
  75. package/workspace/public/pm/premium-board.js +20 -2
  76. package/workspace/public/pm/premium-chart-tab.js +2 -1
  77. package/workspace/public/pm/premium-mtg-replay.js +4 -3
  78. package/workspace/public/pm/premium-report-read.js +5 -4
  79. package/workspace/public/pm/premium-report-tab.js +4 -3
  80. package/workspace/public/pm/premium-vw-backlog.css +2 -1
  81. package/workspace/public/pm/premium-vw-backlog.js +4 -3
  82. package/workspace/public/pm/premium-vw-cal.css +1 -2
  83. package/workspace/public/pm/premium-vw-cal.js +14 -13
  84. package/workspace/public/pm/premium-vw-copies.js +3 -2
  85. package/workspace/public/pm/premium-vw-copy.css +0 -3
  86. package/workspace/public/pm/premium-vw-mtg.js +12 -11
  87. package/workspace/public/pm/product-switcher.js +41 -0
  88. package/workspace/public/pm/report-orders-ui.js +2 -1
  89. package/workspace/public/pm/rp-parts.js +3 -2
  90. package/workspace/public/pm/state-blocks.js +36 -0
  91. package/workspace/public/pm/use-log.js +118 -1
  92. package/workspace/public/pm/work-select.js +92 -2
  93. package/workspace/public/pm/work-tree.js +70 -0
  94. package/workspace/public/premium-aud.html +1 -0
  95. package/workspace/public/premium-board.html +5 -0
  96. package/workspace/public/premium-buddy.html +1 -0
  97. package/workspace/public/premium-events.html +1 -0
  98. package/workspace/public/premium-goals.html +1 -0
  99. package/workspace/public/premium-intelligence.html +1 -0
  100. package/workspace/public/premium-library.html +1 -0
  101. package/workspace/public/premium-present.html +1 -0
  102. package/workspace/public/premium-rec.html +1 -0
  103. package/workspace/public/premium-routine.html +1 -0
  104. package/workspace/public/premium-viewer.html +1 -0
  105. package/workspace/public/premium-workflows.html +1 -0
  106. package/workspace/public/today.html +1 -0
  107. package/workspace/server.js +20 -0
  108. package/workspace/test-lists/back-place.json +9 -0
  109. package/workspace/test-lists/changed-mark.json +9 -0
  110. package/workspace/test-lists/launch-tiers.json +9 -0
  111. package/workspace/test-lists/parked-reasons.json +9 -0
  112. package/workspace/test-lists/prefs-follow-person.json +9 -0
  113. package/workspace/test-lists/product-switcher-dots.json +9 -0
  114. package/workspace/test-lists/routine-sentence.json +9 -0
  115. package/workspace/test-lists/shared-empty-states.json +9 -0
  116. package/workspace/test-lists/strategy-card.json +9 -0
  117. package/workspace/test-lists/unused-controls.json +9 -0
  118. package/workspace/test-lists/work-subtasks-followups.json +9 -0
@@ -10,6 +10,15 @@
10
10
  * shiftOf(text) → a whole number of days from "+3", "-7", "1w", "2 weeks", or null
11
11
  * bulk(post, at, ids, op, value, h) → runs POST /api/boards/tasks/bulk for each board and offers one Undo (POST …/bulk-undo) for all of it.
12
12
  * at: { ws, board } or a function uid → { ws, board, id }. h: { say(text, undo), reload() }
13
+ * dropPlan(rows, ids, to) → { steps: [{ op, value, ids }], label } | null PURE (initiative work-subtasks-followups). What a drag does:
14
+ * to: { zone: 'on', uid } nests under that task; { zone: 'between', uid } makes them that row's siblings (its
15
+ * parent, its stage); { zone: 'stage', key, name } moves them to that stage at the top level; { zone: 'left' } takes
16
+ * each one level up. A drop onto a dragged row or a row under one, or a drop that changes nothing: null.
17
+ * dragIds(sel, uid) → the rows a drag carries: every picked row when the dragged one is picked, else that row alone
18
+ * daysOf(dx, width, days) → the whole days a Gantt bar dragged dx pixels moves, on a timeline width px wide spanning `days` days
19
+ * shiftIds(sel, uid, rows) → the tasks a bar drag shifts: every picked row when the bar's row is picked; a parent's bar shifts the tasks
20
+ * under it; else the row itself
21
+ * bulkSteps(post, at, steps, h, label) → several bulk writes (a drop that changes parent and stage), one message and one Undo for all
13
22
  *
14
23
  * The UI says PMOS, never Claude. Buttons are icons with aria-label where the design shows an icon. */
15
24
  export const OPS = Object.freeze([['parent', 'Under a parent'], ['section', 'Stage'], ['owner', 'Who'], ['shift', 'Move dates'], ['done', 'Done']]);
@@ -28,7 +37,8 @@ const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&':
28
37
  const X = '<svg class="pm-ic" aria-hidden="true" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><path d="M6 6l12 12M18 6L6 18"/></svg>';
29
38
  export function barHtml(n, o = {}) {
30
39
  if (!n) return '';
31
- const ops = OPS.filter(([k]) => o[k] !== false);
40
+ // "Set epic…" joins the bar when every picked row is a Jira ticket (WorkJiraDS; o.epic)
41
+ const ops = OPS.filter(([k]) => o[k] !== false).concat(o.epic ? [['epic', 'Set epic…']] : []);
32
42
  return `<div class="pm-row ws-bar" role="toolbar" aria-label="${esc(n + ' selected')}"><b class="ws-n">${esc(n)} selected</b>`
33
43
  + ops.map(([k, l]) => `<button type="button" class="pm-btn${k === 'done' ? '' : ' outline'}" data-ws-op="${k}"${k === 'done' ? '' : ' aria-haspopup="menu"'}>${esc(l)}</button>`).join('')
34
44
  + `<button type="button" class="pm-btn ws-x" data-ws-op="clear" aria-label="Clear the selection" title="Clear (Esc)">${X}</button></div>`;
@@ -41,7 +51,7 @@ export function shiftOf(text) {
41
51
  return n && Math.abs(n) <= 730 ? n : null;
42
52
  }
43
53
 
44
- const WORDS = { parent: 'moved under', section: 'moved to', owner: 'given to', shift: 'moved by', done: 'marked done' };
54
+ const WORDS = { epic: 'set under', parent: 'moved under', section: 'moved to', owner: 'given to', shift: 'moved by', done: 'marked done' };
45
55
  /** One write per board, one Undo for all. → { moved, skipped } */
46
56
  export async function bulk(post, at, ids, op, value, h = {}, label = '') {
47
57
  const groups = new Map();
@@ -69,5 +79,85 @@ export async function bulk(post, at, ids, op, value, h = {}, label = '') {
69
79
  } : null;
70
80
  if (h.say) h.say(text, undo);
71
81
  if (h.reload) await h.reload();
82
+ return { moved: n, skipped, runs: done };
83
+ }
84
+
85
+ /* ── drag (initiative work-subtasks-followups; WorkSubtasksDS "Drag a task onto another to nest it; drag it left to take it out", WorkBulkDS) ── */
86
+ export function dragIds(sel, uid) {
87
+ const S = new Set([...(sel || [])].map(String)), u = String(uid);
88
+ return S.has(u) ? [...S] : [u];
89
+ }
90
+ export function dropPlan(rows, ids, to) {
91
+ if (!to || !ids || !ids.length) return null;
92
+ const T = (rows || []).filter((x) => x && x.kind === 'task'), by = new Map(T.map((x) => [String(x.uid), x]));
93
+ const I = ids.map(String).filter((u) => by.has(u) && !by.get(u).jsub);
94
+ if (!I.length) return null;
95
+ const upOf = (u) => { const x = by.get(u); return x && x.up ? String(x.up) : ''; };
96
+ // a row under a dragged one cannot take it (a loop)
97
+ const under = new Set(I);
98
+ let grew = true;
99
+ while (grew) { grew = false; for (const x of T) if (x.up && under.has(String(x.up)) && !under.has(String(x.uid))) { under.add(String(x.uid)); grew = true; } }
100
+ const steps = [], add = (op, value, list) => { const L = list.filter(Boolean); if (L.length) steps.push({ op, value, ids: L }); };
101
+ let label = '';
102
+ if (to.zone === 'on' || to.zone === 'between') {
103
+ const tg = by.get(String(to.uid)); if (!tg || under.has(String(tg.uid))) return null;
104
+ if (to.zone === 'on') {
105
+ if (tg.jsub) return null;
106
+ add('parent', String(tg.uid), I.filter((u) => upOf(u) !== String(tg.uid)));
107
+ label = tg.title || '';
108
+ } else {
109
+ const p = tg.up ? String(tg.up) : '';
110
+ if (p && under.has(p)) return null;
111
+ add('parent', p, I.filter((u) => upOf(u) !== p));
112
+ if (!p && tg.sec != null) add('section', String(tg.sec), I.filter((u) => String((by.get(u) || {}).sec || '') !== String(tg.sec) && !(by.get(u) || {}).jira));
113
+ label = p ? ((by.get(p) || {}).title || '') : 'the top level';
114
+ }
115
+ } else if (to.zone === 'stage') {
116
+ if (to.key == null || to.key === '') return null;
117
+ add('parent', '', I.filter((u) => upOf(u)));
118
+ add('section', String(to.key), I.filter((u) => String((by.get(u) || {}).sec || '') !== String(to.key) && !(by.get(u) || {}).jira));
119
+ label = to.name || '';
120
+ } else if (to.zone === 'left') {
121
+ const g = new Map();
122
+ for (const u of I) { const p = upOf(u); if (!p) continue; const gp = upOf(p); if (!g.has(gp)) g.set(gp, []); g.get(gp).push(u); }
123
+ for (const [gp, L] of g) add('parent', gp, L);
124
+ label = g.size === 1 && [...g.keys()][0] ? ((by.get([...g.keys()][0]) || {}).title || '') : 'the top level';
125
+ } else return null;
126
+ return steps.length ? { steps, label } : null;
127
+ }
128
+ export function daysOf(dx, width, days) {
129
+ if (!(width > 0) || !(days > 0)) return 0;
130
+ const n = Math.round((Number(dx) || 0) / width * days);
131
+ return Math.abs(n) > 730 ? Math.sign(n) * 730 : n || 0;
132
+ }
133
+ export function shiftIds(sel, uid, rows) {
134
+ const S = new Set([...(sel || [])].map(String)), u = String(uid);
135
+ if (S.has(u)) return [...S];
136
+ const T = (rows || []).filter((x) => x && x.kind === 'task'), me = T.find((x) => String(x.uid) === u);
137
+ if (me && me.kids) {
138
+ const out = [], walk = (p) => { for (const x of T) if (String(x.up || '') === p) { if (x.kids) walk(String(x.uid)); else if (!x.jsub) out.push(String(x.uid)); } };
139
+ walk(u); return out;
140
+ }
141
+ return [u];
142
+ }
143
+ /** A drop that changes parent and stage: each step is a bulk write; one message and one Undo put every step back, the last first. */
144
+ export async function bulkSteps(post, at, steps, h = {}, label = '') {
145
+ const done = [], skipped = [];
146
+ for (const s of steps || []) {
147
+ const r = await bulk(post, at, s.ids, s.op, s.value, {}, label).catch(() => null);
148
+ if (r && r.runs) done.push(...r.runs);
149
+ if (r) skipped.push(...(r.skipped || []));
150
+ }
151
+ const ids = new Set(done.flatMap((d) => d.undo.map((x) => x.task)));
152
+ const n = ids.size;
153
+ const text = n ? `${n === 1 ? '1 task' : n + ' tasks'} moved${label ? (label === 'the top level' ? ' to the top level' : ' to ' + label) : ''}.${skipped.length ? ' ' + skipped.length + ' not moved: ' + skipped[0].why + '.' : ''}`
154
+ : (skipped[0] && skipped[0].why ? 'Nothing moved: ' + skipped[0].why + '.' : 'Nothing moved.');
155
+ const undo = n ? async () => {
156
+ for (const d of done.slice().reverse()) await post('/api/boards/tasks/bulk-undo', { ws: d.ws, board: d.board, undo: d.undo }).catch(() => null);
157
+ if (h.say) h.say('Put back.');
158
+ if (h.reload) await h.reload();
159
+ } : null;
160
+ if (h.say) h.say(text, undo);
161
+ if (h.reload) await h.reload();
72
162
  return { moved: n, skipped };
73
163
  }
@@ -109,3 +109,73 @@ export function parseUnder(text, rows) {
109
109
  const hit = T.find((x) => norm(x.title) === want) || T.find((x) => norm(x.title).startsWith(want));
110
110
  return hit ? { parent: hit.uid, parentTitle: hit.title, title: m[2].trim() } : null;
111
111
  }
112
+
113
+ /* ── the follow-ups (initiative work-subtasks-followups; WorkSubtasksDS, WorkJiraDS) ──
114
+ * groupPlan(rows, o) → [{ stage, say, why, will, groups: [{ name, date, uids }] }] the ✦ grouping proposal: a stage with GROUP_MIN or more
115
+ * top-level tasks where at least two go-live dates are each shared by two or more tasks. PMOS only proposes;
116
+ * o.dropped (Set of 'group:<stage>') hides one. A task that is a parent, a child, a Jira sub-task or done stays out.
117
+ * sourceOf(row) → 'jira' | 'pmos'
118
+ * sourceCounts(rows, epics) → { all, jira, pmos, epic } the Source filter's counts (top-level and nested tasks, not Jira sub-tasks)
119
+ * sourceKeep(rows, f, epics) → the rows the filter keeps: every stage row, each matching task and the parents above it. f: all|jira|pmos|epic
120
+ * allJira(rows, uids) → true when every picked row is a Jira ticket that is not a sub-task ("Set epic…" in the bulk bar) */
121
+ export const GROUP_MIN = 8;
122
+ const MONS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
123
+ const dm = (iso) => { const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(iso || '')); return m ? +m[3] + ' ' + MONS[+m[2] - 1] : ''; };
124
+ export function groupPlan(rows, o = {}) {
125
+ const dr = o.dropped || new Set(), out = [];
126
+ const stages = [];
127
+ let cur = null;
128
+ for (const x of rows || []) {
129
+ if (x && x.kind === 'stage') { cur = x.key ? { s: x, tasks: [] } : null; if (cur) stages.push(cur); continue; }
130
+ if (cur && x && x.kind === 'task') cur.tasks.push(x);
131
+ }
132
+ for (const G of stages) {
133
+ if (dr.has('group:' + G.s.key)) continue;
134
+ const top = G.tasks.filter((x) => !x.up && !x.depth);
135
+ if (top.length < GROUP_MIN || top.some((x) => x.kids)) continue;
136
+ const by = new Map();
137
+ for (const x of top) {
138
+ if (x.kids || x.jsub || x.done || x.ms) continue;
139
+ const d = String(x.end || '').slice(0, 10); if (!d) continue;
140
+ if (!by.has(d)) by.set(d, []); by.get(d).push(x);
141
+ }
142
+ const groups = [...by.entries()].filter(([, L]) => L.length >= 2).sort((a, b) => a[0].localeCompare(b[0]))
143
+ .map(([d, L], i) => ({ name: 'Batch ' + (i + 1) + ' (' + dm(d) + ')', date: d, uids: L.map((x) => String(x.uid)), titles: L.map((x) => x.title) }));
144
+ if (groups.length < 2) continue;
145
+ const n = groups.reduce((k, g) => k + g.uids.length, 0), after = top.length - n + groups.length;
146
+ out.push({
147
+ stage: G.s.key, stageName: G.s.name,
148
+ say: 'Group the ' + n + ' tasks of ' + G.s.name + ' into ' + groups.length + ' batches?',
149
+ why: 'They share ' + groups.length + ' go-live dates (' + groups.map((g) => dm(g.date)).join(', ') + '). The stage is ' + top.length + ' rows long; grouped it is ' + after + '.',
150
+ will: ['Make ' + groups.length + ' parent tasks: ' + groups.map((g) => g.name).join(', '), 'Put each task under the batch with its go-live date; nothing else changes (owners, dates, Jira keys stay)'],
151
+ groups,
152
+ });
153
+ }
154
+ return out;
155
+ }
156
+ export const sourceOf = (row) => (row && (row.jira || keyOf(row)) ? 'jira' : 'pmos');
157
+ const isTask = (x) => x && x.kind === 'task' && !x.jsub;
158
+ export function sourceCounts(rows, epics) {
159
+ const T = (rows || []).filter(isTask);
160
+ const jira = T.filter((x) => sourceOf(x) === 'jira').length;
161
+ return { all: T.length, jira, pmos: T.length - jira, epic: T.filter((x) => epicFlag(x, epics)).length };
162
+ }
163
+ export function sourceKeep(rows, f, epics) {
164
+ if (!f || f === 'all') return rows || [];
165
+ const L = rows || [], by = new Map(L.filter((x) => x && x.kind === 'task').map((x) => [String(x.uid), x]));
166
+ const hit = (x) => (f === 'jira' ? sourceOf(x) === 'jira' : f === 'pmos' ? sourceOf(x) === 'pmos' : f === 'epic' ? !!epicFlag(x, epics) : true);
167
+ const keep = new Set();
168
+ for (const x of L) {
169
+ if (!isTask(x) || !hit(x)) continue;
170
+ let u = String(x.uid), seen = 0;
171
+ while (u && !keep.has(u) && seen++ < 50) { keep.add(u); const p = by.get(u); u = p && p.up ? String(p.up) : ''; }
172
+ }
173
+ // a kept ticket keeps its Jira sub-tasks
174
+ for (const x of L) if (x && x.kind === 'task' && x.jsub && x.up && keep.has(String(x.up))) keep.add(String(x.uid));
175
+ return L.filter((x) => !x || x.kind !== 'task' || keep.has(String(x.uid)));
176
+ }
177
+ export function allJira(rows, uids) {
178
+ const by = new Map((rows || []).filter((x) => x && x.kind === 'task').map((x) => [String(x.uid), x]));
179
+ const L = [...(uids || [])];
180
+ return L.length > 0 && L.every((u) => { const x = by.get(String(u)); return !!(x && keyOf(x) && !x.jsub); });
181
+ }
@@ -3,6 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="pmos-nonce" content="" />
6
+ <script src="/api/view-prefs/boot.js"></script>
6
7
  <meta name="viewport" content="width=device-width, initial-scale=1" />
7
8
  <title>Audience · PMOS</title>
8
9
  <!-- The audience tab (batch 12 item 1, S3; canvas XrtA9Present): what the call sees while the PM presents from the recording tab. It shows
@@ -3,6 +3,8 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="pmos-nonce" content="" />
6
+ <!-- view preferences (bet A461): a published board (?pack=) is read from its pack alone, so it asks the workspace for nothing (board-readonly Part B h) -->
7
+ <script>if (!/[?&]pack=/.test(location.search)) document.write('<script src="/api/view-prefs/boot.js"><\/script>');</script>
6
8
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
7
9
  <title>PMOS · Board</title>
8
10
  <!-- The premium Board in the Agreed design (initiative premium-agreed-design, B1 B2 B3 N1 N2). One toolbar and no page header; each initiative is a row
@@ -19,6 +21,7 @@
19
21
  <link rel="stylesheet" href="/pm/ds-bridge.css" />
20
22
  <link rel="stylesheet" href="/pm/cozy-pick.css" />
21
23
  <link rel="stylesheet" href="/pm/cozy-board.css" />
24
+ <link rel="stylesheet" href="/pm/changed-mark.css" />
22
25
  <link rel="stylesheet" href="/pm/load-shapes.css" />
23
26
  <link rel="stylesheet" href="/pm/bd-pin-card.css" />
24
27
  <link rel="stylesheet" href="/pm/cozy-panel.css" />
@@ -54,6 +57,8 @@
54
57
  </div>
55
58
  </div>
56
59
 
60
+ <!-- the product's strategy in five lines (pm/bd-strategy.js, bet A458): above the initiatives on a Board that shows one product -->
61
+ <section class="bd-sec" id="cStrat" aria-label="Strategy" hidden></section>
57
62
  <section class="bd-sec" id="cIni" aria-labelledby="hIni">
58
63
  <h2 class="vh" id="hIni">Initiatives</h2>
59
64
  <div id="bdShowing" hidden></div>
@@ -3,6 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="pmos-nonce" content="" />
6
+ <script src="/api/view-prefs/boot.js"></script>
6
7
  <meta name="viewport" content="width=device-width, initial-scale=1" />
7
8
  <title>PMOS · Meeting buddy</title>
8
9
  <!-- The meeting buddy (initiative meeting-buddy; Exploring 2, "Meeting buddy and one-press start", boards 1, 2 and 4). The PMOS extension frames
@@ -3,6 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="pmos-nonce" content="" />
6
+ <script src="/api/view-prefs/boot.js"></script>
6
7
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
7
8
  <title>PMOS · Events</title>
8
9
  <!-- Events (initiative events-place; rebuilt from the design system's blocks by events-ds-page, board EventsDS on Exploring 3): everything
@@ -3,6 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="pmos-nonce" content="" />
6
+ <script src="/api/view-prefs/boot.js"></script>
6
7
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
7
8
  <title>PMOS · Goals</title>
8
9
  <!-- Goals, rebuilt from design system blocks (initiative goals-ds-page; board GoalsDS on Exploring 3, page "pages"): the path with the product
@@ -3,6 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="pmos-nonce" content="" />
6
+ <script src="/api/view-prefs/boot.js"></script>
6
7
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
7
8
  <title>PMOS · Intelligence</title>
8
9
  <!-- Intelligence (batch 15 item 1; it was Insights, and /premium-insights.html still serves it): ONE column of Komorebi blocks, drawn to the board
@@ -3,6 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="pmos-nonce" content="" />
6
+ <script src="/api/view-prefs/boot.js"></script>
6
7
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
7
8
  <title>PMOS · Library</title>
8
9
  <!-- Library (initiative library-place; slice 7 of the six-place navigation; rebuilt from Komorebi blocks in library-ds-page). Everything
@@ -3,6 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="pmos-nonce" content="" />
6
+ <script src="/api/view-prefs/boot.js"></script>
6
7
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
7
8
  <title>Present · PMOS</title>
8
9
  <!-- Present mode (live round W3, initiative live-round-present): GET /pm/present?ws&board&id. A prototype round's frames on a shared
@@ -3,6 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="pmos-nonce" content="" />
6
+ <script src="/api/view-prefs/boot.js"></script>
6
7
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
7
8
  <title>PMOS · Recording</title>
8
9
  <!-- The recording tab (batch 12 item 1): ?note=<id>[&ws=][&go=1]. It holds the recorder and never navigates away, so its links open
@@ -3,6 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="pmos-nonce" content="" />
6
+ <script src="/api/view-prefs/boot.js"></script>
6
7
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
7
8
  <title>PMOS · Routine</title>
8
9
  <!-- Routine (initiative routine-place, slice 8 of the six-place navigation; rebuilt from the design system's blocks by initiative
@@ -3,6 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="pmos-nonce" content="" />
6
+ <script src="/api/view-prefs/boot.js"></script>
6
7
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
7
8
  <title>PMOS · Viewer</title>
8
9
  <!-- The Viewer on its own page (initiative premium-agreed-design, area viewer). It is the address "Open in a new tab" gives an item:
@@ -3,6 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="pmos-nonce" content="" />
6
+ <script src="/api/view-prefs/boot.js"></script>
6
7
  <meta name="viewport" content="width=device-width, initial-scale=1" />
7
8
  <title>PMOS · Workflows</title>
8
9
  <!-- UI grill U1: Workflows is a sub-panel of Settings (Workspaces › Workflows), not a page. This address opens Home with Settings on it;
@@ -3,6 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="pmos-nonce" content="" />
6
+ <script src="/api/view-prefs/boot.js"></script>
6
7
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
7
8
  <title>PMOS · Today</title>
8
9
  <!-- Today (slice 5 of the six-place navigation, initiative today-log-page; board 1 on Exploring 2): the place the app lands on. On a desk it is
@@ -8320,6 +8320,26 @@ async function handleRequest(req, res) {
8320
8320
  const list = readSchedules(); list.unshift(sched); writeSchedules(list);
8321
8321
  return json(res, { ok: true, schedule: sched });
8322
8322
  }
8323
+ if (p === '/api/routine-sentence' && req.method === 'POST') {
8324
+ // routine-from-sentence (bet A144): one typed sentence → a routine. Without `set` it only reads and writes nothing; `set: true` is the
8325
+ // PM's one press, and the routine runs report-special, which writes a draft and sends nothing (lib/routine-sentence.js).
8326
+ let body = {}; try { body = JSON.parse((await readBody(req)) || '{}'); } catch { return json(res, { ok: false, error: 'invalid JSON' }, 400); }
8327
+ const RS = require('./lib/routine-sentence.js');
8328
+ const got = RS.read(body.text);
8329
+ if (!got.ok) return json(res, { ok: false, ask: got.ask, error: got.ask }, body.set ? 400 : 200);
8330
+ const w = getWs(body.ws);
8331
+ const next = scheduleLogic.nextRun({ ...got.schedule, day: got.schedule.day || 'Mon', dayOfMonth: got.schedule.dayOfMonth || 1 });
8332
+ if (!body.set) return json(res, { ok: true, read: got, next });
8333
+ if (!taskById(RS.SKILL, w ? w.root : null)) return json(res, { ok: false, error: 'the draft skill is not installed' }, 400);
8334
+ const norm = scheduleLogic.normalizeSchedule({ ...got.schedule, skill: RS.SKILL, task: RS.SKILL });
8335
+ if (!norm.ok) return json(res, { ok: false, error: norm.error }, 400);
8336
+ const sched = { id: 'sc-' + Date.now().toString(36), ws: w ? w.id : wsId(SELF_ROOT), ...norm.schedule,
8337
+ profile: null, lastRun: null, lastStatus: null, made: 'sentence', madeAt: nowISO(), said: String(body.text).replace(/\s+/g, ' ').trim().slice(0, 600) };
8338
+ sched.nextRun = scheduleLogic.nextRun(sched);
8339
+ const list = readSchedules(); list.unshift(sched); writeSchedules(list);
8340
+ console.log(`${RS.TAG} set ${sched.id} ${sched.cadence} next ${sched.nextRun}`);
8341
+ return json(res, { ok: true, schedule: sched, read: got });
8342
+ }
8323
8343
  if (p === '/api/schedules/seed' && req.method === 'POST') {
8324
8344
  // D71 — one press creates the recommended schedules for a repository. Idempotent: a schedule for
8325
8345
  // the same skill in the same repository is never created twice. Never reached by anything but the
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "Back restores your place (back-restores-place, done test B1-B7): the pure place module public/pm/back-place.js over a stand-in body, the Viewer's wiring in cozy-viewer.js, and the health replay bin/back-place-health.js. No browser.",
3
+ "modules": [
4
+ "back-place.test.js"
5
+ ],
6
+ "seconds": {
7
+ "back-place.test.js": 1
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "Undo right on the item PMOS changed (bet A456, done test planning/done-tests/undo-on-changed-item.md C1-C6): the pure mark model and HTML, the Board wiring read from the files, the health CLI over a scratch use log. No connector, model or network.",
3
+ "modules": [
4
+ "changed-mark.test.js"
5
+ ],
6
+ "seconds": {
7
+ "changed-mark.test.js": 2
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "Launch tiers (initiative launch-tiers, done test T1-T11): the tier from launch_tier or reach and risk, its launch steps, and pmos launch tier/check/list on a scratch product. No server, connector, model or network.",
3
+ "modules": [
4
+ "launch-tiers.test.js"
5
+ ],
6
+ "seconds": {
7
+ "launch-tiers.test.js": 15
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "Parked work keeps a reason and a way back (initiative parked-reason-way-back, bet A446, done test P1-P9): the parked list, the way-back check, the hold and bring-back writers, the Today card's needs rows and the pmos parked verb. Temp repositories in both layouts. No server, network or browser.",
3
+ "modules": [
4
+ "parked-reasons.test.js"
5
+ ],
6
+ "seconds": {
7
+ "parked-reasons.test.js": 3
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "View preferences that follow the person (bet A461, done test planning/done-tests/prefs-follow-person.md C1-C9): the store in the runtime folder, the page script in a vm with a fake storage, the routes in process, and the page tags. No browser, connector, model or network.",
3
+ "modules": [
4
+ "prefs-sync.test.js"
5
+ ],
6
+ "seconds": {
7
+ "prefs-sync.test.js": 2
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "The product switcher row with a quiet dot (bet A381, done test planning/done-tests/product-switcher-dots.md C1-C7): each product's needs count, the products route with ?needs=1, the row's pure HTML and press rule, and the use-log count. No connector, model or network.",
3
+ "modules": [
4
+ "product-switcher-dots.test.js"
5
+ ],
6
+ "seconds": {
7
+ "product-switcher-dots.test.js": 3
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "A routine from one typed sentence (bet A144, done test planning/done-tests/routine-from-sentence.md C1-C6): the pure reader on a fixed clock, POST /api/schedules/sentence on a scratch server, the New routine popup html and the health count. No browser, connector, model or network.",
3
+ "modules": [
4
+ "routine-sentence.test.js"
5
+ ],
6
+ "seconds": {
7
+ "routine-sentence.test.js": 6
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "One shared empty, loading and error block (initiative shared-empty-states, done test S1-S6): the Komorebi State part, state-blocks.js, and the Viewer scripts that call it. Pure: reads files and calls the module.",
3
+ "modules": [
4
+ "state-blocks.test.js"
5
+ ],
6
+ "seconds": {
7
+ "state-blocks.test.js": 2
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "The five-line strategy above each product's Board and the gentle \"doesn't fit\" note (bet A458, done test planning/done-tests/strategy-five-lines.md C1-C7). Pure checks and the routes in process. No connector, model or network.",
3
+ "modules": [
4
+ "strategy-card.test.js"
5
+ ],
6
+ "seconds": {
7
+ "strategy-card.test.js": 2
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "Hide the buttons nobody presses (idea A454, done test planning/done-tests/hide-unused-controls.md H1-H7): the rule, the store on this computer, the routes in process, the page side's pure helpers and the Settings list. No connector, model or network.",
3
+ "modules": [
4
+ "unused-controls.test.js"
5
+ ],
6
+ "seconds": {
7
+ "unused-controls.test.js": 3
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "Work breakdown follow-ups: drag to nest, hold to select, Gantt group shift, the grouping proposal, the Jira column, the Source filter and Set epic (initiative work-subtasks-followups, done test F1-F9). Pure checks; no browser, server, connector, model or network.",
3
+ "modules": [
4
+ "work-followups.test.js"
5
+ ],
6
+ "seconds": {
7
+ "work-followups.test.js": 2
8
+ }
9
+ }