create-pmos 0.761.0 → 0.762.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 (38) hide show
  1. package/package.json +26 -20
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/workspace/changelog.json +25 -0
  7. package/workspace/guide/cli.md +6 -0
  8. package/workspace/guide/home.md +1 -1
  9. package/workspace/guide/notes.md +15 -0
  10. package/workspace/lib/actor.js +8 -3
  11. package/workspace/lib/contradictions.js +137 -0
  12. package/workspace/lib/meeting-focus.js +14 -1
  13. package/workspace/lib/open-questions.js +23 -5
  14. package/workspace/lib/outcome-judge.js +1 -1
  15. package/workspace/lib/outcome-props.js +51 -5
  16. package/workspace/lib/outcomes-cli.js +49 -3
  17. package/workspace/lib/plan-baseline.js +106 -0
  18. package/workspace/lib/proposal-runs.js +1 -1
  19. package/workspace/lib/proposals.js +1 -1
  20. package/workspace/lib/propose-cli.js +16 -7
  21. package/workspace/lib/routes-drift.js +30 -0
  22. package/workspace/lib/routes-meeting-focus.js +6 -1
  23. package/workspace/lib/routes-open-questions.js +9 -2
  24. package/workspace/lib/week-moves.js +8 -2
  25. package/workspace/package-lock.json +2 -2
  26. package/workspace/package.json +1 -1
  27. package/workspace/premium-rec-tab-test.js +2 -1
  28. package/workspace/public/pm/buddy-core.js +162 -0
  29. package/workspace/public/pm/buddy-float.js +63 -0
  30. package/workspace/public/pm/cozy-buddy.css +26 -0
  31. package/workspace/public/pm/cozy-buddy.js +59 -7
  32. package/workspace/public/pm/cozy-rec-tab.js +10 -2
  33. package/workspace/public/pm/moves-view.js +11 -1
  34. package/workspace/public/pm/open-questions-view.js +1 -0
  35. package/workspace/public/premium-buddy.html +4 -0
  36. package/workspace/skills/initiative-propose.skill +2 -2
  37. package/workspace/test-lists/outcome-checks-finish.json +9 -0
  38. package/workspace/test-lists/slip-baseline-contradictions.json +9 -0
@@ -0,0 +1,63 @@
1
+ /* pm/buddy-float.js — the meeting buddy as a window that stays on top of the call app (initiative meeting-float; Exploring 3, page
2
+ * "Meeting companion floats over the call", boards Float starts here, Three sizes).
3
+ *
4
+ * Chrome's Document Picture-in-Picture: a small window the operating system keeps above every other window, Zoom and Teams desktop
5
+ * included. No install and no permission. The window frames the buddy page (/premium-buddy.html?float=1…), so every press is the
6
+ * buddy's own. The page that opens it must stay open (the recording tab, which never navigates away while it records).
7
+ *
8
+ * SIZES · sizeOf(name) → { w, h } pill 300 × 72, card 360 × 480, open 780 × 720; anything else is the card
9
+ * floatUrl({ event, date, note, ws }) → the framed page's address
10
+ * floatable(win) → bool the browser can float a page (Chrome or Edge on a computer)
11
+ * openFloat({ url, size, win }) → Promise<Window | null> opens it, or brings an open one forward; null when it cannot
12
+ * The framed page asks for another size with postMessage({ pmosFloat: 'size', size }); the window remembers the last size in this browser.
13
+ * Every open is one use-log line (control meetFloatOpen): local only, the health number of meeting-float. */
14
+ export const SIZES = Object.freeze({ pill: Object.freeze({ w: 300, h: 72 }), card: Object.freeze({ w: 360, h: 480 }), open: Object.freeze({ w: 780, h: 720 }) });
15
+ export const sizeOf = (name) => SIZES[Object.prototype.hasOwnProperty.call(SIZES, name) ? name : 'card'];
16
+ const KEY = 'pmos.float.size';
17
+ export function floatUrl({ event = '', date = '', note = '', ws = '' } = {}) {
18
+ const q = new URLSearchParams({ float: '1' });
19
+ if (event) q.set('event', event);
20
+ if (date) q.set('date', date);
21
+ if (note) q.set('note', note);
22
+ if (ws) q.set('ws', ws);
23
+ return '/premium-buddy.html?' + q.toString();
24
+ }
25
+ export function floatable(win = typeof window !== 'undefined' ? window : null) {
26
+ if (!win || !win.documentPictureInPicture || typeof win.documentPictureInPicture.requestWindow !== 'function') return false;
27
+ try { if (typeof win.matchMedia === 'function' && win.matchMedia('(max-width: 760px)').matches) return false; } catch { /* no media query: a computer */ }
28
+ return true;
29
+ }
30
+ const lastSize = (win) => { try { const s = win.localStorage.getItem(KEY); return SIZES[s] ? s : 'card'; } catch { return 'card'; } };
31
+ const keepSize = (win, s) => { try { win.localStorage.setItem(KEY, s); } catch { /* a blocked store: the next float opens as a card */ } };
32
+
33
+ export async function openFloat({ url, size, win = window } = {}) {
34
+ if (!floatable(win)) return null;
35
+ const D = win.documentPictureInPicture;
36
+ if (D.window && !D.window.closed) {
37
+ const fr = D.window.document.querySelector('iframe');
38
+ if (fr && url && fr.dataset.src !== url) { fr.src = url; fr.dataset.src = url; }
39
+ try { D.window.focus(); } catch { /* the system keeps the focus */ }
40
+ return D.window;
41
+ }
42
+ const name = size || lastSize(win);
43
+ const s = sizeOf(name);
44
+ let pip = null;
45
+ try { pip = await D.requestWindow({ width: s.w, height: s.h }); } catch { return null; }
46
+ const doc = pip.document;
47
+ doc.title = 'PMOS';
48
+ const st = doc.createElement('style');
49
+ st.textContent = 'html,body{margin:0;height:100%;overflow:hidden}iframe{border:0;width:100%;height:100%;display:block}';
50
+ doc.head.appendChild(st);
51
+ const fr = doc.createElement('iframe');
52
+ fr.title = 'PMOS'; fr.src = url; fr.dataset.src = url; fr.allow = 'clipboard-write';
53
+ doc.body.appendChild(fr);
54
+ pip.addEventListener('message', (e) => {
55
+ const d = e && e.data;
56
+ if (!d || d.pmosFloat !== 'size' || !SIZES[d.size] || e.source !== fr.contentWindow) return;
57
+ const z = sizeOf(d.size);
58
+ try { pip.resizeTo(z.w, z.h); } catch { /* the window keeps its size; the page still lays out for the new one */ }
59
+ keepSize(win, d.size);
60
+ });
61
+ try { const U = await import('./use-log.js'); if (U && typeof U.noteUse === 'function') U.noteUse('meetFloatOpen'); } catch { /* the log is optional */ }
62
+ return pip;
63
+ }
@@ -49,3 +49,29 @@ body.pm-ds.mb-page { margin: 0; height: 100vh; overflow: hidden; background: var
49
49
  .mb-card { border-radius: var(--radius-card); background: var(--card); border: 1px solid var(--line); box-shadow: var(--raise); overflow: hidden; }
50
50
  .mb-card > :last-child { border-bottom: 0; }
51
51
  .mb-clip { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }
52
+
53
+ /* the float (initiative meeting-float): the same page in a window on top of the call app. pill · card · open; room view to share */
54
+ .mb-fl[hidden] { display: none; }
55
+ .mb-fl.on { color: var(--blue); }
56
+ body.mb-pill .mb-b, body.mb-pill .mb-msg, body.mb-pill .mb-ask { display: none; }
57
+ body.mb-pill .mb-h { border-bottom: 0; }
58
+ .mb-wide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
59
+ .mb-wide > .mb-col + .mb-col { border-left: 1px solid var(--line); }
60
+ .mb-col > :last-child { border-bottom: 0; }
61
+ .mb-sec { display: flex; align-items: center; gap: 6px; padding: 10px 14px 2px; font-size: var(--fs-meta); font-weight: var(--fw-strong); color: var(--muted); }
62
+ .mb-sec span { font-weight: var(--fw-regular); }
63
+ .mb-sec .mb-spark { padding-top: 0; }
64
+ .mb-tag { display: inline-block; padding: 0 6px; border-radius: var(--radius-sm); background: var(--alert-tint); color: var(--alert); font-size: var(--fs-meta); }
65
+ .mb-person { align-items: center; }
66
+ .mb-av { width: 28px; height: 28px; border-radius: var(--radius-pill); background: var(--well); color: var(--muted); font-size: var(--fs-meta); font-weight: var(--fw-strong); display: inline-flex; align-items: center; justify-content: center; flex: none; }
67
+ .mb-heard { background: var(--leaf-tint); }
68
+ .mb-room .mb-r { font-size: var(--fs-body); }
69
+ .mb-quiet { border-bottom: 0; }
70
+ /* the walk-in card: 2 minutes before the meeting */
71
+ .mb-walk { border-bottom: 1px solid var(--line); }
72
+ .mb-wh { padding: 12px 14px 4px; }
73
+ .mb-wh small { display: block; font-size: var(--fs-meta); color: var(--muted); }
74
+ .mb-wh b { font-size: var(--fs-body); }
75
+ .mb-walk .mb-r:last-child { border-bottom: 0; }
76
+ .mb-settle { background: var(--blue-tint); }
77
+ @media (max-width: 560px) { .mb-wide { grid-template-columns: minmax(0, 1fr); } .mb-wide > .mb-col + .mb-col { border-left: 0; border-top: 1px solid var(--line); } }
@@ -11,9 +11,17 @@
11
11
  * Writes, each on a press: POST /api/notes/bullet (Undo: drop the filed bullet; Undo again: take it back), POST /api/meeting-focus/raise
12
12
  * (a chat draft copied or put away), POST /api/meeting-focus/ask (a question). Copy puts a line on the clipboard; nothing here posts to the
13
13
  * call or its chat. The consent line's copy and the nudge's dismiss are kept in this browser only (buddy-core.js marksOf, per meeting).
14
- * Fold sends { pmosFocus: 'fold' | 'open' } to the panel, which shrinks to a pill. */
14
+ * Fold sends { pmosFocus: 'fold' | 'open' } to the panel, which shrinks to a pill.
15
+ *
16
+ * The float (initiative meeting-float, ?float=1): the page in a window on top of the call app (pm/buddy-float.js frames it). Fold makes a
17
+ * pill, Open wide shows two columns (For this topic · People, Filed), Room view is what the user shares on screen: answers to what the
18
+ * room asked, what is on the table and what was agreed, with no private row. Each size change asks the window for its size
19
+ * ({ pmosFloat: 'size', size }). From 2 minutes before the meeting until PMOS listens, the walk-in card leads the page (buddy-core.js
20
+ * walkInModel); a pill opens to a card for it once per meeting. A float that named no meeting finds the next one when this one is over.
21
+ * Opened in a tab of its own (not framed), the page offers the Float icon itself. */
15
22
  import { pmGet, pmPost } from './http.js';
16
- import { buddyModel, buddyHtml, headOf, marksOf } from './buddy-core.js';
23
+ import { buddyModel, buddyHtml, headOf, marksOf, walkInModel, walkInHtml, openModel, openHtml, roomModel, roomHtml } from './buddy-core.js';
24
+ import { floatable, openFloat, floatUrl, SIZES } from './buddy-float.js';
17
25
  import { press, newMem, mergeMarks } from './buddy-press.js';
18
26
  import { recCore } from './premium-meeting.js';
19
27
 
@@ -21,7 +29,10 @@ const q = new URLSearchParams(location.search);
21
29
  const $ = (id) => document.getElementById(id);
22
30
  const esc = (v) => String(v == null ? '' : v).replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' })[c]);
23
31
  const READ_MS = 10000, ASK_MS = 3000;
24
- const S = { ev: null, date: '', F: null, html: '', folded: false, timer: null, busy: false };
32
+ const S = { ev: null, date: '', F: null, html: '', folded: false, timer: null, busy: false, size: 'card', room: false, popped: new Set() };
33
+ const FLOAT = q.get('float') === '1';
34
+ const FRAMED = window.parent !== window;
35
+ const useLog = (c) => { import('./use-log.js').then((U) => { if (U.startUseLog) U.startUseLog(); if (U.noteUse) U.noteUse(c); }).catch(() => {}); }; // meeting-float's health number, local only
25
36
 
26
37
  const ls = () => { try { return window.localStorage; } catch { return null; } };
27
38
  const MEM = newMem(); // the PM's marks when the store is blocked: this view only
@@ -33,22 +44,29 @@ function draw() {
33
44
  const m = buddyModel(S.F, L);
34
45
  const h = headOf(m);
35
46
  $('mbDot').className = 'mb-dot ' + h.tone;
36
- $('mbHead').textContent = (S.ev ? h.text : 'Looking for the meeting');
37
- let body = buddyHtml(m);
47
+ $('mbHead').textContent = !S.ev ? 'Looking for the meeting' : FLOAT && S.room ? (m.listening ? 'Room view · listening to the room' : 'Room view') : h.text;
48
+ const w = walkInModel(S.F, { now: Date.now() });
49
+ // the walk-in card opens a pill once per meeting (meeting-float, board Walk-in card)
50
+ if (w && FLOAT && S.size === 'pill' && m.eventId && !S.popped.has(m.eventId)) { S.popped.add(m.eventId); setSize('card'); }
51
+ let body = FLOAT && S.room ? roomHtml(m, roomModel(S.F, m)) : FLOAT && S.size === 'open' ? openHtml(m, openModel(S.F, m)) : buddyHtml(m);
38
52
  if (!m.listening && !m.paused && S.ev) {
39
53
  body = `<div class="mb-r mb-start"><span class="t"><small>${esc(m.title)}</small>PMOS is not listening to this meeting.</span>`
40
54
  + `<button type="button" class="mb-ib pm-btn go primary" data-mb="listen" aria-label="Start listening in PMOS" title="Start listening in PMOS"><svg aria-hidden="true" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M8 5v14l11-7z"/></svg></button></div>` + body;
41
55
  }
56
+ if (w && !(FLOAT && S.room)) body = walkInHtml(w) + body; // the walk-in card leads, above the play icon
42
57
  if (body !== S.html) { S.html = body; $('mbBody').innerHTML = body; }
43
- $('mbAsk').hidden = !S.ev || S.folded;
58
+ $('mbAsk').hidden = !S.ev || S.folded || (FLOAT && S.room);
44
59
  const working = m.answer && m.answer.state === 'working';
45
60
  clearTimeout(S.timer); S.timer = setTimeout(read, working ? ASK_MS : READ_MS);
46
61
  }
47
62
 
48
63
  async function read() {
49
64
  if (!S.ev) return;
50
- const F = await pmGet('/api/meeting-focus?event=' + encodeURIComponent(S.ev.id) + '&date=' + encodeURIComponent(S.date));
65
+ const F = await pmGet('/api/meeting-focus?event=' + encodeURIComponent(S.ev.id) + '&date=' + encodeURIComponent(S.date) + (q.get('ws') ? '&ws=' + encodeURIComponent(q.get('ws')) : ''));
51
66
  if (F && F.ok) { S.F = F; say(''); } else if (!S.F) say((F && F.error) || 'PMOS did not answer.');
67
+ // a float that named no meeting moves on to the next one 10 minutes after this one ends
68
+ const end = F && F.ok && F.event ? Date.parse(F.event.end || '') : NaN;
69
+ if (FLOAT && !q.get('event') && Number.isFinite(end) && Date.now() > end + 600000 && !(F.note && F.note.state === 'recording')) { S.ev = null; S.F = null; S.html = ''; return find(); }
52
70
  draw();
53
71
  }
54
72
 
@@ -82,6 +100,7 @@ document.addEventListener('click', async (e) => {
82
100
  const b = e.target.closest('[data-mb]'); if (!b || b.disabled) return;
83
101
  const act = b.dataset.mb;
84
102
  if (act === 'pick') { const c = S.choices[+b.dataset.i]; if (c) { S.ev = c; S.date = String(c.at || '').slice(0, 10); read(); } return; }
103
+ if (FLOAT) useLog('meetFloatAct');
85
104
  if (act === 'listen') { b.disabled = true; try { await listen(); } finally { b.disabled = false; } return; }
86
105
  b.disabled = true;
87
106
  let r = null;
@@ -104,7 +123,40 @@ $('mbAsk').addEventListener('submit', async (e) => {
104
123
  read();
105
124
  });
106
125
 
126
+ /* the float's sizes (meeting-float): the window takes the size; the page lays out for it */
127
+ function setSize(size) {
128
+ if (!SIZES[size]) return;
129
+ S.size = size; S.folded = size === 'pill';
130
+ document.body.classList.toggle('mb-pill', size === 'pill'); document.body.classList.toggle('mb-open', size === 'open');
131
+ const g = $('mbGrow'); const wide = size === 'open';
132
+ g.setAttribute('aria-label', wide ? 'Back to a card' : 'Open wide'); g.title = g.getAttribute('aria-label');
133
+ g.innerHTML = g.innerHTML.replace(/d="[^"]*"/, wide ? 'd="M10 4v6H4M14 20v-6h6M4 10l6-6M20 14l-6 6"' : 'd="M4 14v6h6M20 10V4h-6M4 20l7-7M20 4l-7 7"');
134
+ const f = $('mbFold'); f.setAttribute('aria-expanded', String(size !== 'pill'));
135
+ f.setAttribute('aria-label', size === 'pill' ? 'Open PMOS' : 'Fold to a pill'); f.title = f.getAttribute('aria-label');
136
+ if (FRAMED) window.parent.postMessage({ pmosFloat: 'size', size }, location.origin);
137
+ S.html = ''; draw();
138
+ }
139
+ if (FLOAT) {
140
+ document.body.classList.add('mb-float');
141
+ $('mbGrow').hidden = false; $('mbRoom').hidden = false;
142
+ let s0 = 'card'; try { const s = localStorage.getItem('pmos.float.size'); if (SIZES[s]) s0 = s; } catch { /* a card */ }
143
+ if (s0 !== 'card') setSize(s0);
144
+ useLog('meetFloatShown');
145
+ $('mbGrow').addEventListener('click', () => setSize(S.size === 'open' ? 'card' : 'open'));
146
+ $('mbRoom').addEventListener('click', () => {
147
+ S.room = !S.room; const r = $('mbRoom'); r.classList.toggle('on', S.room); r.setAttribute('aria-pressed', String(S.room));
148
+ r.setAttribute('aria-label', S.room ? 'Back to your own view' : 'Room view: share this window in the call'); r.title = r.getAttribute('aria-label');
149
+ document.body.classList.toggle('mb-roomview', S.room);
150
+ if (S.room && S.size !== 'open') setSize('open'); else { S.html = ''; draw(); }
151
+ });
152
+ } else if (!FRAMED && floatable()) {
153
+ // a buddy tab of its own: it can float itself (it stays open, so the float lives as long as this tab)
154
+ $('mbFloat').hidden = false;
155
+ $('mbFloat').addEventListener('click', () => { openFloat({ url: floatUrl({ event: S.ev ? S.ev.id : '', date: S.date }) }); });
156
+ }
157
+
107
158
  $('mbFold').addEventListener('click', () => {
159
+ if (FLOAT) { setSize(S.size === 'pill' ? 'card' : 'pill'); return; }
108
160
  S.folded = !S.folded;
109
161
  document.body.classList.toggle('folded', S.folded);
110
162
  const b = $('mbFold'); b.setAttribute('aria-expanded', String(!S.folded));
@@ -11,7 +11,8 @@
11
11
  * (microphone only) there is no dark stage: the light page, which slice S2 (cozy-rec-now.js) fills. Paused and not yet
12
12
  * started each say so, with the one press that goes on.
13
13
  * line the meeting so far, with a mark for each highlight; hover or focus a mark for the moment: its time, the line, the shot.
14
- * bar icon only: Highlight, Pause or Resume, Pause the screenshots (only with a screen), the slots, and the red Stop.
14
+ * bar icon only: Highlight, Pause or Resume, Pause the screenshots (only with a screen), Float PMOS over the call (meeting-float:
15
+ * the meeting buddy in a window on top of the call app, where the browser can), the slots, and the red Stop.
15
16
  * alert amber "Not hearing the meeting" with Share again, when the microphone is heard and the meeting is not.
16
17
  * ask Stop asks first. Record on the next meeting, pressed on another page, asks here once: "Stop X and record Y?".
17
18
  * Stop ends the meeting, and the tab then shows its notes (the Viewer, /premium-viewer.html?open=meeting).
@@ -31,6 +32,7 @@ import { recCore, STOP_LINE } from './premium-meeting.js';
31
32
  import { post, listen, tabUrl, clockOf, modeOf, endOf, marksOf } from './rec-tab-core.js';
32
33
  import { adler } from './cozy-adler.js';
33
34
  import { recall, remember } from './listen-sources.js';
35
+ import { floatable, openFloat, floatUrl } from './buddy-float.js';
34
36
 
35
37
  const q = new URLSearchParams(location.search);
36
38
  const ID = q.get('note') || '', WS = q.get('ws') || '';
@@ -44,7 +46,7 @@ const wall = (ms) => { const d = new Date(ms); return pad(d.getHours()) + ':' +
44
46
  const P = { star: '<path d="M12 3.8l2.5 5.2 5.7.8-4.1 4 1 5.7L12 16.8l-5.1 2.7 1-5.7-4.1-4 5.7-.8z"/>', pause: '<path d="M9 6v12M15 6v12"/>', play: '<path d="M8 5v14l11-7z"/>',
45
47
  stop: '<rect x="7" y="7" width="10" height="10" rx="2"/>', eyeoff: '<path d="M3 3l18 18M10.6 6.1A9.8 9.8 0 0 1 12 6c5 0 9 6 9 6a15 15 0 0 1-3 3.5M6.6 6.7C4.3 8.2 3 12 3 12s4 6 9 6a8.6 8.6 0 0 0 4.3-1.1M9.9 9.9a3 3 0 0 0 4.2 4.2"/>',
46
48
  eye: '<path d="M3 12s4-6 9-6 9 6 9 6-4 6-9 6-9-6-9-6z"/><circle cx="12" cy="12" r="3"/>', share: '<rect x="3" y="4" width="18" height="12" rx="2"/><path d="M12 13V7M9 10l3-3 3 3M8 20h8"/>',
47
- rec: '<circle cx="12" cy="12" r="6"/>' };
49
+ rec: '<circle cx="12" cy="12" r="6"/>', float: '<rect x="4" y="5" width="16" height="11" rx="1.5"/><rect x="12" y="11" width="6" height="5" rx="1"/>' };
48
50
  const svg = (k, w = 18) => `<svg aria-hidden="true" width="${w}" height="${w}" viewBox="0 0 24 24">${P[k]}</svg>`;
49
51
  const btn = (a, label, icon, cls = '') => `<button type="button" class="rt-b${cls ? ' ' + cls : ''}" data-a="${a}" aria-label="${esc(label)}" title="${esc(label)}">${svg(icon, a === 'stop' ? 20 : 18)}</button>`;
50
52
 
@@ -93,6 +95,7 @@ function drawBar() {
93
95
  const parts = [];
94
96
  if (live) parts.push(btn('hl', 'Highlight the last 30 seconds', 'star'), btn('pause', 'Pause', 'pause'));
95
97
  else if (S.mode === 'paused') parts.push(btn('resume', 'Resume', 'play', 'dark'));
98
+ if ((live || S.mode === 'paused') && floatable()) parts.push(btn('float', 'Float PMOS over the call', 'float'));
96
99
  if (S.mode === 'screen') parts.push(scr.paused ? btn('shots', 'Keep screenshots again', 'eye', 'on') : btn('shots', 'Pause the screenshots (the sound goes on)', 'eyeoff'));
97
100
  bar.innerHTML = parts.join('');
98
101
  for (const k of ['now', 'present']) { const s = keep[k] || Object.assign(document.createElement('span'), { className: 'rt-slot' }); s.dataset.slot = k; bar.appendChild(s); }
@@ -203,6 +206,11 @@ async function act(a, t) {
203
206
  case 'resume': case 'start': return run(async () => { const r = await C.resume(ID); S.msg = r.ok ? '' : r.error; });
204
207
  case 'share': return run(async () => { await C.pause(); const r = await C.resume(ID); S.msg = r.ok ? '' : r.error; });
205
208
  case 'shots': { C.shots(!C.screen().paused); return draw(); }
209
+ case 'float': { // meeting-float: requestWindow needs this press, so nothing is awaited before it
210
+ const e = eventOf();
211
+ openFloat({ url: floatUrl({ event: e && e.id ? e.id : '', date: e ? e.date : '', ws: WS }) }).then((w) => { if (!w) { S.msg = 'This browser cannot float PMOS. Use Chrome or Edge on a computer.'; draw(); } });
212
+ return;
213
+ }
206
214
  case 'stop': S.ask = { kind: 'stop' }; return drawAsk();
207
215
  case 'askno': S.ask = null; drawAsk(); return draw();
208
216
  case 'stopgo': S.ask = null; drawAsk(); return run(async () => { const r = await C.stop(ID); S.msg = r.ok ? '' : r.error; if (r.ok) post({ id: ID, state: 'ended', title: title(), elapsedMs: elapsed(), silent: false }); });
@@ -3,6 +3,7 @@
3
3
  *
4
4
  * rowOf(lists, { looked }) → the Your move row ({ key, go, title, sub }) or null: null in a quiet week (zero is silence) and once the
5
5
  * PM opened this week's list. lists: each product's GET /api/drift/moves answer.
6
+ * behindWords(row) → "40 days behind the first plan (due 5 Nov)" on a date row behind its baseline, else ''
6
7
  * listHtml(lists, { esc }) → the list, one section per product, the moves with no source first; each says its source, or
7
8
  * "No source · ask <owner>"
8
9
  * openMoves(lists, H) the list in the Viewer. H: { toast }
@@ -32,10 +33,19 @@ export function rowOf(lists, { looked = '' } = {}) {
32
33
  sub: unsourced ? unsourced + ' with no source. See who to ask.' : 'Each one has a source.' };
33
34
  }
34
35
 
36
+ const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
37
+ const dayWords = (s) => { const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(s || '')); return m ? +m[3] + ' ' + MON[+m[2] - 1] + (+m[1] !== new Date().getFullYear() ? ' ' + m[1] : '') : ''; };
38
+ /** How far a moved date is from the task's first plan (initiative slip-baseline-contradictions), or '' when it is not behind. */
39
+ export function behindWords(m) {
40
+ if (!m || m.kind !== 'date' || !(Number(m.behind) > 0) || !m.baseline) return '';
41
+ return plural(Number(m.behind), 'day', 'days') + ' behind the first plan (due ' + dayWords(m.baseline) + ')';
42
+ }
43
+
35
44
  function moveHtml(m, esc) {
36
45
  const what = m.n > 1 ? m.titles.join(', ') + (m.n > m.titles.length ? ', …' : '') : m.title;
37
46
  const src = m.sourced ? esc(m.source) : `<strong>No source</strong> · ${m.toPm ? 'yours to check' : 'ask ' + esc(m.owner)}`;
38
- return `<li class="mv-row${m.sourced ? '' : ' mv-flag'}"><span class="mv-say">${esc(m.say)}</span> · ${esc(what)}`
47
+ const behind = behindWords(m);
48
+ return `<li class="mv-row${m.sourced ? '' : ' mv-flag'}"><span class="mv-say">${esc(m.say)}</span> · ${esc(what)}${behind ? ' · ' + esc(behind) : ''}`
39
49
  + `<br><span class="yd-exp">${esc(m.iniTitle)} · ${src}${m.by && m.by !== 'you' && m.sourced ? ' · by ' + esc(m.by) : ''}</span></li>`;
40
50
  }
41
51
 
@@ -36,6 +36,7 @@ function kindWords(l) {
36
36
  if (k.change) out.push(k.change === 1 ? 'PMOS holds a change with no source' : 'PMOS holds ' + k.change + ' changes with no source');
37
37
  if (k.ask) out.push(k.ask === 1 ? 'a sign-off or a ticket question' : k.ask + ' sign-offs or ticket questions');
38
38
  if (k.draft) out.push(k.draft === 1 ? 'PMOS drafted it' : 'PMOS drafted them');
39
+ if (k.record) out.push('the records disagree');
39
40
  return out.join(', ');
40
41
  }
41
42
  const underOf = (l) => (l.default && l.default.say ? l.default.say : 'No default: ' + String(l.waits || 'it waits for an answer.').replace(/^./, (c) => c.toLowerCase()));
@@ -8,6 +8,7 @@
8
8
  <title>PMOS · Meeting buddy</title>
9
9
  <!-- The meeting buddy (initiative meeting-buddy; Exploring 2, "Meeting buddy and one-press start", boards 1, 2 and 4). The PMOS extension frames
10
10
  it over a Google Meet call: /premium-buddy.html?meet=<abc-defg-hij>&mtitle=<tab title>. It can also name its meeting: ?event=<id>&date=YYYY-MM-DD.
11
+ ?float=1: the same page in a window on top of the call app (initiative meeting-float, pm/buddy-float.js): Fold, Open wide and Room view.
11
12
  Only the PM sees it. Its links open in a new tab, so the call never navigates away. pm/cozy-buddy.js draws it. It is on the PMOS design system (design-system-meeting-pages): pm-ds, the Summary block
12
13
  in a single column, pm-btn buttons and a pm-input ask line. -->
13
14
  <base target="_blank" />
@@ -22,6 +23,9 @@
22
23
  <body class="cz pm-ds mb-page">
23
24
  <main class="mb" id="mb">
24
25
  <header class="mb-h"><i class="mb-dot" id="mbDot" aria-hidden="true"></i><b>PMOS</b><span class="mb-sm" id="mbHead">Looking for the meeting</span>
26
+ <button type="button" class="mb-ib pm-btn mb-fl" id="mbRoom" hidden aria-pressed="false" aria-label="Room view: share this window in the call" title="Room view: share this window in the call"><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" stroke-linejoin="round"><path d="M3 12s4-6 9-6 9 6 9 6-4 6-9 6-9-6-9-6zM12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6"/></svg></button>
27
+ <button type="button" class="mb-ib pm-btn mb-fl" id="mbGrow" hidden aria-label="Open wide" title="Open wide"><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" stroke-linejoin="round"><path d="M4 14v6h6M20 10V4h-6M4 20l7-7M20 4l-7 7"/></svg></button>
28
+ <button type="button" class="mb-ib pm-btn mb-fl" id="mbFloat" hidden aria-label="Float PMOS over the call" title="Float PMOS over the call"><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" stroke-linejoin="round"><path d="M4 5h16v11H4zM12 11h6v5h-6z"/></svg></button>
25
29
  <button type="button" class="mb-ib pm-btn" id="mbFold" aria-expanded="true" aria-label="Fold PMOS" title="Fold PMOS"><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" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg></button></header>
26
30
  <section class="mb-b" id="mbBody" aria-live="polite"></section>
27
31
  <p class="mb-msg" id="mbMsg" role="status" hidden></p>
@@ -41,8 +41,8 @@ Procedure when the run is `check` (the morning check: tasks are late or at risk)
41
41
 
42
42
  Procedure when the run is `outcome` (the check date of its expected outcome has passed, and its goal's own reading did not decide it):
43
43
  1. Read the lines below: the expected outcome, the check date, the anchor, the record and why the reading did not decide it. Read the record, its PRD and done test if it names them, and the product's own ledgers and files the outcome is about (for example a ledger that should keep filling, a bench that should have run, a feedback ledger with or without a repeat complaint). Read the stored reads first (`pmos source show <source>`).
44
- 2. Decide only from what you read: `worked` when the evidence shows the expected outcome happened, `didnt-work` when it shows it did not. "Nobody complained" is not evidence it worked. When you cannot tell, file `{ "disposition": "cant-tell" }`: the PM is asked, and that is the right answer.
45
- 3. File once with `pmos propose verdict --json -`: `{ "disposition": "worked" | "didnt-work" | "cant-tell", "evidence": "<one line: what you found, with the number>", "claims": [{ "text": "<one fact>", "sources": [{ "label": "<what it is>", "ref": "<path:line, from the repository root>", "quote": "<the text on that line, at least 12 characters>" }] }] }`. Each quote is checked against its line; a claim that does not match is refused, and so is the verdict.
44
+ 2. Decide only from what you read: `worked` when the evidence shows the expected outcome happened, `didnt-work` when it shows it did not. "Nobody complained" is not evidence it worked. When you cannot tell, file `cant-tell` with evidence that says what you read and what was missing (for example "Read IDPF-3113 and IDPF-3115 (both Done) and 4 docs; no number for sign-in errors after 10 Aug"). PMOS records it with Undo, and that is the right answer: it is never a guess.
45
+ 3. File once with `pmos propose verdict --json -`: `{ "disposition": "worked" | "didnt-work" | "cant-tell", "evidence": "<one line: what you found, with the number>", "claims": [{ "text": "<one fact>", "sources": [{ "label": "<what it is>", "ref": "<path:line, from the repository root>", "quote": "<the text on that line, at least 12 characters>" }] }] }`. Each quote is checked against its line; a claim that does not match is refused, and so is the verdict. Claims are optional for `cant-tell`. When `worked` or `didnt-work` is refused because the evidence is only in a connector (not on a line in the repository), file `cant-tell` and name that evidence: do not end the run with nothing filed.
46
46
  4. Do not record the check yourself: the server records your verdict with Undo.
47
47
 
48
48
  Output contract: produce EXACTLY these sections in your final message:
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "Outcome checks finish by themselves (initiative outcome-checks-finish, done test F1-F6): the auto apply's actor writes records, can't tell is a verdict, a silent run still ends in one, and pmos outcomes rate. No connector, model or network.",
3
+ "modules": [
4
+ "outcome-checks-finish.test.js"
5
+ ],
6
+ "seconds": {
7
+ "outcome-checks-finish.test.js": 3
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "Every slip against a baseline, and records that disagree (initiative slip-baseline-contradictions, done test B1-B4, C1-C5): pure checks, ledger files in a scratch folder and the drift routes in process. No connector, model or network.",
3
+ "modules": [
4
+ "plan-truth.test.js"
5
+ ],
6
+ "seconds": {
7
+ "plan-truth.test.js": 5
8
+ }
9
+ }