create-pmos 0.560.0 → 0.562.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 (95) hide show
  1. package/cloud-setup.sh +18 -0
  2. package/package.json +33 -33
  3. package/payload/KIT-VERSION +1 -1
  4. package/payload/okf/core/templates/done-test-template.md +47 -0
  5. package/payload/okf/core/templates/experiment-record-template.md +62 -0
  6. package/payload/okf/core/templates/index.md +2 -0
  7. package/payload/planning/evals/eval-calibration.md +1 -1
  8. package/payload/planning/okrs/health-budgets.md +1 -1
  9. package/payload/state/discoveries.md +1 -1
  10. package/workspace/changelog.json +32 -0
  11. package/workspace/guide/agent-capabilities.md +1 -1
  12. package/workspace/guide/home.md +1 -1
  13. package/workspace/guide/jira.md +2 -2
  14. package/workspace/guide/reports.md +1 -1
  15. package/workspace/guide/settings-and-switches.md +1 -0
  16. package/workspace/lib/actor.js +2 -2
  17. package/workspace/lib/artefacts.js +1 -1
  18. package/workspace/lib/autonomy.js +1 -1
  19. package/workspace/lib/board-goals.js +1 -1
  20. package/workspace/lib/chat-file-locate.js +2 -2
  21. package/workspace/lib/corrections-memory.js +1 -1
  22. package/workspace/lib/drive-guard.js +5 -5
  23. package/workspace/lib/driver.js +1 -1
  24. package/workspace/lib/first-input.js +1 -1
  25. package/workspace/lib/folder-repair.js +1 -1
  26. package/workspace/lib/git-identity.js +1 -1
  27. package/workspace/lib/goal-loop.js +1 -1
  28. package/workspace/lib/goal-source.js +1 -1
  29. package/workspace/lib/harness-parse.js +1 -1
  30. package/workspace/lib/impact-cli.js +1 -1
  31. package/workspace/lib/impact.js +1 -1
  32. package/workspace/lib/initiative-chat.js +1 -1
  33. package/workspace/lib/item-cli.js +1 -1
  34. package/workspace/lib/meeting-suggest.js +3 -3
  35. package/workspace/lib/meeting-terms.js +2 -2
  36. package/workspace/lib/notes.js +1 -1
  37. package/workspace/lib/okr-goals.js +2 -2
  38. package/workspace/lib/one-stage.js +1 -1
  39. package/workspace/lib/plan-items.js +3 -3
  40. package/workspace/lib/pm-slug.js +51 -0
  41. package/workspace/lib/profile-default.js +1 -1
  42. package/workspace/lib/program-chat.js +2 -2
  43. package/workspace/lib/programs.js +1 -1
  44. package/workspace/lib/ready-reports.js +1 -1
  45. package/workspace/lib/remote-access.js +14 -1
  46. package/workspace/lib/report-acts.js +3 -3
  47. package/workspace/lib/report-cli.js +1 -1
  48. package/workspace/lib/report-draft.js +1 -1
  49. package/workspace/lib/routes-autonomy.js +1 -1
  50. package/workspace/lib/routes-boards.js +3 -3
  51. package/workspace/lib/routes-insights-premium.js +1 -1
  52. package/workspace/lib/routes-programs.js +2 -2
  53. package/workspace/lib/session-name.js +1 -1
  54. package/workspace/lib/skill-store.js +4 -4
  55. package/workspace/lib/skills-registry.js +5 -2
  56. package/workspace/lib/state-backup.js +5 -1
  57. package/workspace/lib/transcript-read.js +1 -1
  58. package/workspace/lib/typesafe-settings.js +1 -1
  59. package/workspace/lib/worktree-gc.js +1 -1
  60. package/workspace/package-lock.json +2 -2
  61. package/workspace/package.json +1 -1
  62. package/workspace/public/pm/bd-asks.js +1 -1
  63. package/workspace/public/pm/bd-prog-panel.js +2 -2
  64. package/workspace/public/pm/bd-prog.js +1 -1
  65. package/workspace/public/pm/bd-span.js +1 -1
  66. package/workspace/public/pm/c3-ini-ui.js +1 -1
  67. package/workspace/public/pm/cozy-pick.js +1 -1
  68. package/workspace/public/pm/cozy-viewer.js +1 -1
  69. package/workspace/public/pm/goals-clear.js +1 -1
  70. package/workspace/public/pm/home-app.js +1 -1
  71. package/workspace/public/pm/home-ini-model.js +1 -1
  72. package/workspace/public/pm/ini-view.js +1 -1
  73. package/workspace/public/pm/loose-props.js +1 -1
  74. package/workspace/public/pm/premium-board.js +1 -1
  75. package/workspace/public/pm/premium-insights.js +1 -1
  76. package/workspace/public/pm/premium-report-read.js +1 -1
  77. package/workspace/public/pm/premium-shell.js +1 -1
  78. package/workspace/public/pm/prog-move.js +2 -2
  79. package/workspace/public/pm/stage-chip.js +1 -1
  80. package/workspace/public/pm/state.js +10 -10
  81. package/workspace/public/pm/tk-send.js +1 -1
  82. package/workspace/run-tests.js +5 -1
  83. package/workspace/server.js +19 -16
  84. package/workspace/skills/gather-requirements.skill +1 -1
  85. package/workspace/skills/impact-detect.skill +1 -1
  86. package/workspace/skills/live-notes.skill +1 -1
  87. package/workspace/skills/loose-propose.skill +1 -1
  88. package/workspace/skills/measure.skill +1 -1
  89. package/workspace/skills/metric-draft.skill +1 -1
  90. package/workspace/skills/report-design.skill +1 -1
  91. package/workspace/skills/report-setup.skill +1 -1
  92. package/workspace/skills/report-weekly.skill +1 -1
  93. package/workspace/skills/report-write.skill +1 -1
  94. package/workspace/skills/story-first.skill +1 -1
  95. package/workspace/test-lists/pm-slug.json +9 -0
@@ -163,7 +163,7 @@ const taskRenameOf = (t) => taskRename({ pmPost, ws: t.ws || boardWs(), board: t
163
163
  toastUndo('Renamed', async () => { const u = await o.undo(); if (u.ok) { renamedHere('task', t.uid, u.title); t.title = u.title; { const c = VW.current(); if (c && String(c.id).endsWith(t.uid)) VW.retitle(c.id, u.title); } load(); } return u; });
164
164
  load();
165
165
  } });
166
- // another product's initiative renames in ITS workspace, not Home's (batch 11 item 9: "no initiative psle-microsite-revamp")
166
+ // another product's initiative renames in ITS workspace, not Home's (batch 11 item 9: "no initiative spring-sale-landing")
167
167
  const iniWsOf = (id) => { const o = otherIni(id); return (o && o.ws) || WS || undefined; };
168
168
  const iniRenameOf = (id, prefix) => initiativeRename({ pmPost, ws: iniWsOf(id), id, epics: ((iniRowOf(id) || {}).epics) || [],
169
169
  onSaved: (o) => {
@@ -56,7 +56,7 @@ export function moveModel(h, M, L, now = Date.now()) {
56
56
  now,
57
57
  };
58
58
  }
59
- /** Whether a move by itself fires now (bug 2026-11-08: opening Tender new CIAM moved it Discover → Plan → Prioritize → Build over three
59
+ /** Whether a move by itself fires now (bug 2026-11-08: opening an initiative moved it Discover → Plan → Prioritize → Build over three
60
60
  * opens). Opening or redrawing an initiative is a read, and a read never writes a stage. A stage moves by itself only on a change this page
61
61
  * saw: an earlier draw of the SAME stage had an open exit item, and now every one is done. A stage that is already all done when the page
62
62
  * first draws it waits for the PM. This also covers Product feature, whose exit items are the engine's checks and do not change when the
@@ -136,7 +136,7 @@ const pipsOf = (st, cls) => {
136
136
  const d = Math.min(n, st.nDone || 0), l = Math.min(n - d, st.nLate || 0);
137
137
  return `<span class="iv-pips${cls ? ' ' + cls : ''}" aria-hidden="true">${Array.from({ length: n }, (_, i) => `<i class="${i < d ? 'd' : i < d + l ? 'l' : 'o'}"></i>`).join('')}</span>`;
138
138
  };
139
- /** W1: under the stage, what set it ("Jira IDPF-2815 · Design Discovery · read 07:16") and the gate line ("Gate to Build · PRD ✓ · contract not
139
+ /** W1: under the stage, what set it ("Jira SHOP-2815 · Design Discovery · read 07:16") and the gate line ("Gate to Build · PRD ✓ · contract not
140
140
  * approved"): the spec ladder no longer sets the stage. '' when neither is known. */
141
141
  function srcGateHtml(st) {
142
142
  const g = st.gate && Array.isArray(st.gate.parts) && st.gate.parts.length ? `<p class="hm-gate iv-gate"><span class="lbl">${esc(st.gate.label)}</span>${st.gate.parts.map((x) => `<span class="g${x.ok ? '' : ' no'}"${x.ok ? ` aria-label="${esc(x.text + ' done')}"` : ''}${x.note ? ` title="${esc(x.note)}"` : ''}>${esc(x.text)}${x.ok ? '<svg class="cz-ck" viewBox="0 0 24 24" aria-hidden="true"><path d="M5 12l4.5 4.5L19 7"/></svg>' : ''}</span>`).join('')}</p>` : '';
@@ -38,7 +38,7 @@ const ago = (iso, today) => {
38
38
  const n = Math.max(0, Math.round((b - a) / 864e5));
39
39
  return n === 0 ? 'today' : n + ' d ago';
40
40
  };
41
- /** Two letters for an initiative's tile ("IDPF data fixes" → ID, "Tender new CIAM" → TC). */
41
+ /** Two letters for an initiative's tile ("Shop data fixes" → SD, "Checkout redesign" → CR). */
42
42
  export const tileOf = (title) => { const w = String(title || '').trim().split(/[\s_-]+/).filter(Boolean); return (w.length > 1 && w[0].length < 4 ? w[0][0] + w[1][0] : String(w[0] || '?').slice(0, 2)).toUpperCase(); };
43
43
  const SHOW = 5; // an open proposal shows 5 rows, then "+N more" (the grill's legacy pile)
44
44
 
@@ -207,7 +207,7 @@ function say(msg, undo) {
207
207
  clearTimeout(toastT); toastT = setTimeout(() => { t.hidden = true; }, undo ? 10000 : 5000);
208
208
  }
209
209
 
210
- /* ── the product chip (batch 12 item 5, canvas XhpA5Pages): the same chip and list as Home's; it replaces "pmos-idpf +1" ── */
210
+ /* ── the product chip (batch 12 item 5, canvas XhpA5Pages): the same chip and list as Home's; it replaces "acme-shop +1" ── */
211
211
  /** The pick as this page shows it: the saved one, or for a one-off link the products on screen. */
212
212
  function shownPick() {
213
213
  if (!PKP) return null;
@@ -136,7 +136,7 @@ function periods() {
136
136
  const d = new Date(today()), y = d.getUTCFullYear(), q = Math.floor(d.getUTCMonth() / 3), h = d.getUTCMonth() < 6 ? 0 : 1;
137
137
  const span = (y0, m0, y1, m1) => ({ from: Date.UTC(y0, m0, 1), to: Date.UTC(y1, m1, 0) });
138
138
  const lq = q ? { y, q: q - 1 } : { y: y - 1, q: 3 };
139
- const F = M && M.okrFile && M.okrFile.period; // Intelligence redesign A: the OKR file's own period opens first (H2 2026 for IDPF)
139
+ const F = M && M.okrFile && M.okrFile.period; // Intelligence redesign A: the OKR file's own period opens first (for example H2 2026)
140
140
  return (F ? [{ key: 'okr', label: F.label, short: F.short, name: 'The OKR period', said: 'this OKR period', from: F.from, to: F.to }] : []).concat([
141
141
  Object.assign({ key: 'q', label: 'Q' + (q + 1) + ' ' + y, short: 'Q' + (q + 1), name: 'This quarter', said: 'this quarter' }, span(y, q * 3, y, q * 3 + 3)),
142
142
  Object.assign({ key: 'lq', label: 'Q' + (lq.q + 1) + ' ' + lq.y, short: 'Q' + (lq.q + 1), name: 'Last quarter', said: 'last quarter' }, span(lq.y, lq.q * 3, lq.y, lq.q * 3 + 3)),
@@ -213,7 +213,7 @@ function titleSlide(w) {
213
213
  const f = headFigure(w), t = [R.row.slot ? 'As of ' + longSlot(R.row.slot) : '', f && f.data ? 'Data: ' + f.data : ''].filter(Boolean).join(' · ');
214
214
  // A long audience (a list of people) stays in At a glance: on the slide it would fill the eyebrow and repeat as the accent line (Wawan, 2026-11-01).
215
215
  const aud = R.audience && R.audience.length <= AUD_MAX ? R.audience : '';
216
- // an older draft is titled from the report's id ("Scarlet-assessment-report report 2026-11-02"): show the report's name instead
216
+ // an older draft is titled from the report's id ("Pricing-review-report report 2026-11-02"): show the report's name instead
217
217
  const idTitle = R.name && /^[A-Za-z][a-z0-9]*(?:-[a-z0-9]+)+ report \d{4}-\d{2}-\d{2}$/.test(w.title || '');
218
218
  return { k: 'title', h: 'Title', title: idTitle ? R.name : w.title, eye: aud || 'Report', acc: aud ? aud.toLowerCase() : '', sub: (!INTERNAL_RE.test(w.sub || '') && w.sub) || list, t,
219
219
  fig: f ? { v: f.v, cap: f.cap } : null };
@@ -314,7 +314,7 @@ document.addEventListener('click', (e) => {
314
314
  /* ── the standard dialog: detail first, the conversation beside it (Detail tab first on a phone) ─────────── */
315
315
  export const kv = (rows) => `<div class="kv2">${rows.filter((r) => r && r[1]).map(([k, v]) => `<span>${esc(k)}</span><span>${esc(v)}</span>`).join('')}</div>`;
316
316
  export const H = (t) => `<h3 class="h2">${esc(t)}</h3>`;
317
- /* premium-popup-context P1: a popup with no row in a server model still gets its own conversation. Its key names the thing (pop:task:IDPF-2611),
317
+ /* premium-popup-context P1: a popup with no row in a server model still gets its own conversation. Its key names the thing (pop:task:SHOP-2611),
318
318
  * and the first message carries what the popup shows (title, sub line, Claude's first line, its facts), so Claude starts from the same view. */
319
319
  export function popKey(...parts) {
320
320
  const k = parts.map((p) => String(p == null ? '' : p).replace(/[^A-Za-z0-9._-]+/g, '-').replace(/^-+|-+$/g, '')).filter(Boolean).join(':').replace(/^[^A-Za-z0-9]+/, '').slice(0, 100);
@@ -11,8 +11,8 @@
11
11
  * programItem(o) the ONE "Program" entry of the short initiative ⋯ (feedback batch 16 item 5c, canvas FmI1Menu): its note is the program
12
12
  * it is in; a press opens one picker with the open programs (the current one marked), "No program" (the move out) and,
13
13
  * in no program, "Make it a program" (o.turn()). A press on another program moves it there, or joins it. Every move has Undo.
14
- * outText(program, product, n, phone) the toast: "Moved out of Project Ascent · now under IDPF · off 1 milestone"; a phone says only
15
- * "Now under IDPF · off 1 milestone". Zero milestones is silence.
14
+ * outText(program, product, n, phone) the toast: "Moved out of Project Horizon · now under Acme Shop · off 1 milestone"; a phone says only
15
+ * "Now under Acme Shop · off 1 milestone". Zero milestones is silence.
16
16
  *
17
17
  * The leave also takes the initiative off the charter's milestones that wait on it (lib/routes-programs.js answers `off`): a milestone that waits
18
18
  * on an initiative that left could never be done. Undo rejoins the old program with `back` = that list, so the milestones wait on it again; the
@@ -3,7 +3,7 @@
3
3
  * so the Board row, the Timeline, the page header, Documents, the chat opener and the program page say the same stage.
4
4
  *
5
5
  * stageName(r) → 'Discover' | 'Shipped' | 'On hold' | … the words; a row on its own workflow names its own stage
6
- * stageSource(r) → 'Jira IDPF-2815 · Design Discovery · read 4 Nov 07:16' | '' what set it, and when it was read
6
+ * stageSource(r) → 'Jira SHOP-2815 · Design Discovery · read 4 Nov 07:16' | '' what set it, and when it was read
7
7
  * stageChip(r, opts?) → '<span class="cz-pill cz-stg …">…</span>' the chip; opts.ms adds the milestone mark (cz-ms)
8
8
  *
9
9
  * A row from an older model (no oneStage) falls back to what it carried: its workflow stage, its track, its stage name.
@@ -29,22 +29,22 @@ export const FIXTURE_COCKPIT = FIXTURE_KIND === 'cockpit';
29
29
  /** What the cockpit fixture starts with beyond its seed data: the derived statuses (so the list can group), the open tabs. */
30
30
  const COCKPIT_START = {
31
31
  statuses: {
32
- microsites: {
33
- 'ooh-weather-expansion': { status: 'blocked' }, 'psle-paywall-revamp': { status: 'delivered' }, 'smrt-news-feed': { status: 'building' },
34
- 'lightbox-ga-tagging': { status: 'accepted' }, 'login-metric-tagging': { status: 'accepted' }, 'shortlink-redirects': { status: 'accepted' },
32
+ web: {
33
+ 'weather-widget': { status: 'blocked' }, 'paywall-revamp': { status: 'delivered' }, 'transit-news-feed': { status: 'building' },
34
+ 'gallery-ga-tagging': { status: 'accepted' }, 'login-metric-tagging': { status: 'accepted' }, 'shortlink-redirects': { status: 'accepted' },
35
35
  },
36
- // five things wait on the person, as the mockup's "Today 5" says: two here, three in pmos (the tile with the dot), none in scarlet
36
+ // five things wait on the person, as the mockup's "Today 5" says: two here, three in pmos (the tile with the dot), none in atlas
37
37
  pmos: { 'cockpit-terminal-mod': { status: 'blocked' }, 'workspace-cockpit-nav': { status: 'blocked' }, 'kit-publish': { status: 'delivered' } },
38
38
  // the mockup's third tile carries no dot: nothing in that repository is waiting on the person
39
- scarlet: { 'scarlet-onboarding': { status: 'building' } },
39
+ atlas: { 'atlas-onboarding': { status: 'building' } },
40
40
  },
41
- product: 'microsites', sel: 'ooh-weather-expansion',
41
+ product: 'web', sel: 'weather-widget',
42
42
  tabs: [
43
- { id: 'term:ooh-weather-expansion:claude · merge PR 41', kind: 'term', title: 'claude · merge PR 41', slug: 'ooh-weather-expansion', repo: 'microsites', sess: 'claude · merge PR 41', state: 'working', role: 'TERM' },
44
- { id: 'doc:planning/prd/ooh-weather-expansion-prd.md', kind: 'doc', title: '…-prd.md', slug: 'ooh-weather-expansion', path: 'planning/prd/ooh-weather-expansion-prd.md', role: 'DOC' },
45
- { id: 'view:validate:microsites', kind: 'view', view: 'validate', title: 'tool · validate', slug: 'microsites', repo: 'microsites' },
43
+ { id: 'term:weather-widget:claude · merge PR 41', kind: 'term', title: 'claude · merge PR 41', slug: 'weather-widget', repo: 'web', sess: 'claude · merge PR 41', state: 'working', role: 'TERM' },
44
+ { id: 'doc:planning/prd/weather-widget-prd.md', kind: 'doc', title: '…-prd.md', slug: 'weather-widget', path: 'planning/prd/weather-widget-prd.md', role: 'DOC' },
45
+ { id: 'view:validate:web', kind: 'view', view: 'validate', title: 'tool · validate', slug: 'web', repo: 'web' },
46
46
  ],
47
- active: 'term:ooh-weather-expansion:claude · merge PR 41',
47
+ active: 'term:weather-widget:claude · merge PR 41',
48
48
  };
49
49
 
50
50
  const STORE_KEY = 'pmos.workspace.pm.v1';
@@ -102,7 +102,7 @@ export async function openSend(o = {}) {
102
102
  if (d.tkTick) { if (b.getAttribute('aria-disabled') === 'true') return; if (st.on.has(d.tkTick)) st.on.delete(d.tkTick); else st.on.add(d.tkTick); draw(); const n = el.querySelector(`[data-tk-tick="${CSS.escape(d.tkTick)}"]`); if (n) n.focus(); return; }
103
103
  if (d.tkChange != null) { st.change = st.change === d.tkChange ? null : d.tkChange; draw(); const n = el.querySelector('[data-tk-key]'); if (n) n.focus(); return; }
104
104
  if (d.tkNew != null) { await setEpic(d.tkNew, { mode: 'new' }); return; }
105
- if (d.tkUse != null) { const inp = el.querySelector(`[data-tk-key="${CSS.escape(d.tkUse)}"]`); const key = inp ? inp.value.trim() : ''; if (!key) { st.msg = 'Paste the epic\'s Jira link or key, such as IDPF-400.'; draw(); return; } await setEpic(d.tkUse, { mode: 'existing', key }); return; }
105
+ if (d.tkUse != null) { const inp = el.querySelector(`[data-tk-key="${CSS.escape(d.tkUse)}"]`); const key = inp ? inp.value.trim() : ''; if (!key) { st.msg = 'Paste the epic\'s Jira link or key, such as SHOP-400.'; draw(); return; } await setEpic(d.tkUse, { mode: 'existing', key }); return; }
106
106
  if ('tkGo' in d) {
107
107
  const ids = [...st.on]; if (!ids.length) return;
108
108
  st.busy = true; st.msg = ''; draw();
@@ -748,11 +748,15 @@ function check() {
748
748
  console.log(`✓ ${listed.size} suites listed, each once, each on disk; ${onDisk.filter((f) => !ELSEWHERE[f]).length} suites on disk, all listed; shards partition every group; ${frags} fragment(s) in test-lists/.`);
749
749
  }
750
750
 
751
+ // The suites' fixtures name the PM `wawan` (pm:wawan, human:wawan). The workspace now derives its PM's name (lib/pm-slug.js), so a
752
+ // suite gets that name through PMOS_PM, whoever runs it. A PMOS_PM already set wins.
753
+ const SUITE_ENV = { ...process.env, PMOS_PM: process.env.PMOS_PM || 'wawan' };
754
+
751
755
  function runOne(file, verbose) {
752
756
  return new Promise((resolve) => {
753
757
  const t0 = Date.now();
754
758
  const chunks = [];
755
- const child = spawn(process.execPath, [file], { cwd: DIR, env: process.env, stdio: ['ignore', 'pipe', 'pipe'] });
759
+ const child = spawn(process.execPath, [file], { cwd: DIR, env: SUITE_ENV, stdio: ['ignore', 'pipe', 'pipe'] });
756
760
  child.stdout.on('data', (d) => chunks.push(d));
757
761
  child.stderr.on('data', (d) => chunks.push(d));
758
762
  let timedOut = false;
@@ -987,7 +987,7 @@ function insideRoot(root, p) {
987
987
  return r === root || r.startsWith(root + path.sep);
988
988
  }
989
989
  // Find sub-directories with a given basename, at any depth up to maxDepth (skipping junk dirs).
990
- // This is how a PMOS bundle is located whether it sits at the repo root OR nested — e.g. IDPF
990
+ // This is how a PMOS bundle is located whether it sits at the repo root OR nested — e.g. a product repo
991
991
  // keeps its whole bundle under `pmos/`, so `pmos/planning/prd/*` are real initiatives too.
992
992
  function findDirsNamed(root, name, maxDepth) {
993
993
  const found = [];
@@ -1767,7 +1767,7 @@ function looseRecordMetas(root, proots) {
1767
1767
  }
1768
1768
 
1769
1769
  function initiativeIndex(root) {
1770
- const proots = planningRoots(root); // planning/ at the root OR nested (e.g. IDPF/pmos/planning)
1770
+ const proots = planningRoots(root); // planning/ at the root OR nested (e.g. acme-shop/pmos/planning)
1771
1771
  const specimens = specimenMetas(root); // prototype/<id>/ — outside planning/, grouped by dir
1772
1772
  const records = looseRecordMetas(root, proots); // pmos/state/initiatives/ — outside planning/ too
1773
1773
  if (!proots.length && !specimens.length && !records.length) return { initiatives: [], ungrouped: [] };
@@ -1797,8 +1797,8 @@ function initiativeIndex(root) {
1797
1797
  // PREFIX ATTACHMENT, and the three constraints that keep it from becoming a similarity score.
1798
1798
  //
1799
1799
  // The join above is stem EQUALITY, and equality is the wrong shape for how PMs name files. An
1800
- // initiative `ooh-zbsg-ast1` carries `ooh-zbsg-ast1-design-prd.md`, `ooh-zbsg-ast1-user-stories.md`
1801
- // and `ooh-zbsg-ast1-comms-brief.md`; after the role suffix is sliced those are three DIFFERENT
1800
+ // initiative `web-ast1` carries `web-ast1-design-prd.md`, `web-ast1-user-stories.md`
1801
+ // and `web-ast1-comms-brief.md`; after the role suffix is sliced those are three DIFFERENT
1802
1802
  // stems, so the initiative's own PRD was attributed to no initiative and never reached panel 3.
1803
1803
  // Measured on this repository one initiative ago: 148 documents attributed to nothing, 31 of them
1804
1804
  // beginning with a declared id.
@@ -1872,7 +1872,7 @@ function stampEdit(text, at) {
1872
1872
  const fm = m[1];
1873
1873
  const re = /^generated:[ \t]*\{[^\n}]*\}[ \t]*$/m;
1874
1874
  if (!re.test(fm)) return text;
1875
- const next = fm.replace(re, `generated: {by: human:wawan, at: "${at}"}`);
1875
+ const next = fm.replace(re, `generated: {by: human:${actorLib.PM_SLUG}, at: "${at}"}`);
1876
1876
  return next === fm ? text : text.replace(fm, () => next);
1877
1877
  }
1878
1878
  // ── Document category (jev-doc-categorizer Run 1) ───────────────────────────────────────────────────
@@ -2497,7 +2497,7 @@ function userSkillsDir() { return skillsStore().path; }
2497
2497
  // reader uses, so the two can only agree.
2498
2498
  //
2499
2499
  // `legacy` names where the runtime state USED to live — this application directory's own `state/`.
2500
- // The retarget needs it because the PM's nine idpf-* skills spell the old location ABSOLUTELY
2500
+ // The retarget needs it because the PM's nine shop-* skills spell the old location ABSOLUTELY
2501
2501
  // (`/Users/…/pmos/workspace/state/deliverables/<run-id>.md`), so there is no leading quote or space
2502
2502
  // to anchor a match on; the only question that can be answered reliably is "is this path's parent
2503
2503
  // the old state root", and only the caller knows where that was. Derived from __dirname, never
@@ -7785,7 +7785,7 @@ async function handleRequest(req, res) {
7785
7785
  const row = c.core.candidates(w.root).rows.find((r) => r.id === String(body.id || '') && r.sha.startsWith(String(body.sha || 'x')));
7786
7786
  if (!row) return json(res, { ok: false, error: 'no such candidate' }, 404);
7787
7787
  const key = skillsReg.rootKey(w.root); const at = nowISO();
7788
- const by = 'human:wawan'; const eid = 'a-' + Date.now().toString(36) + '-' + crypto.randomBytes(3).toString('hex');
7788
+ const by = 'human:' + actorLib.PM_SLUG; const eid = 'a-' + Date.now().toString(36) + '-' + crypto.randomBytes(3).toString('hex');
7789
7789
  try {
7790
7790
  if (body.op === 'read') {
7791
7791
  const t = c.core.textOf(w.root, row);
@@ -8264,7 +8264,7 @@ async function handleRequest(req, res) {
8264
8264
  s.model = { ...(s.model || {}), state: 'applied', switched: { model: r.model, tier: r.tier, at } };
8265
8265
  persist(s); pushSessions();
8266
8266
  const mc = modelLib.core();
8267
- if (mc.ok) mc.core.logDecision(s.root, { kind: 'switch', session: s.id, agent: s.agent, tier: r.tier, model: r.model, by: 'human:wawan' });
8267
+ if (mc.ok) mc.core.logDecision(s.root, { kind: 'switch', session: s.id, agent: s.agent, tier: r.tier, model: r.model, by: 'human:' + actorLib.PM_SLUG });
8268
8268
  return json(res, { ok: true, model: r.model, tier: r.tier, note: 'typed /model into the pane; effort is unchanged' });
8269
8269
  }
8270
8270
  // `version` lets the launcher notice a server still running OLD code after an upgrade: files on disk
@@ -9364,7 +9364,7 @@ async function handleRequest(req, res) {
9364
9364
  const c = memoryLib.core();
9365
9365
  if (!c.ok) return json(res, { ok: false, error: c.error });
9366
9366
  const out = c.core.write(w.root, { op: body.op, target: body.target, text: body.text, old: body.old, ref: body.ref,
9367
- confidence: body.confidence, source: body.source, stale_after: body.stale_after, by: 'human:wawan' });
9367
+ confidence: body.confidence, source: body.source, stale_after: body.stale_after, by: 'human:' + actorLib.PM_SLUG });
9368
9368
  return json(res, out, out.ok ? 200 : 400);
9369
9369
  }
9370
9370
  if (p === '/api/memory/config' && req.method === 'POST') {
@@ -9504,7 +9504,7 @@ async function handleRequest(req, res) {
9504
9504
  }
9505
9505
  /* ── pm-os-absorb Run 1 — an initiative's breakdown (plan-items.jsonl) ──────────────────────────────────────────
9506
9506
  * GET is the Breakdown layout: derived stages with their owed rows, the items, the Board columns, the Keep batches.
9507
- * POST writes through the ONE writer as the PM (`pm:wawan`, `via: ui`). Every POST needs an Origin header: the
9507
+ * POST writes through the ONE writer as the PM (`pm:<slug>`, `via: ui`). Every POST needs an Origin header: the
9508
9508
  * global guard already refuses a foreign one, and a request with none did not come from the page. Header values
9509
9509
  * are never logged (D08). `ladder=0` skips the ladder (about 800 ms here) when only the items changed. */
9510
9510
  if (p === '/api/plan-items' && req.method === 'GET') {
@@ -9607,7 +9607,7 @@ async function handleRequest(req, res) {
9607
9607
  if (!run) return json(res, { ok: false, error: 'that session was not started from a next step' }, 404);
9608
9608
  const live = sessions.get(sid);
9609
9609
  if (live && live.state !== 'exited') return json(res, { ok: false, error: 'the session is still running — review it when it has ended' }, 409);
9610
- const rec = { at: nowISO(), initiative_id: run.initiative_id, item_id: run.item_id, key: run.key, session_id: sid, verdict, note, pm: g.actor.by.startsWith('pm:') ? 'wawan' : null, by: g.actor.by, via: g.actor.via }; // D98: an agent's verdict names the agent
9610
+ const rec = { at: nowISO(), initiative_id: run.initiative_id, item_id: run.item_id, key: run.key, session_id: sid, verdict, note, pm: g.actor.by.startsWith('pm:') ? actorLib.PM_SLUG : null, by: g.actor.by, via: g.actor.via }; // D98: an agent's verdict names the agent
9611
9611
  const wrote = nsAppend(NS_REVIEWS(), rec, 'step review');
9612
9612
  if (!wrote.ok) return json(res, { ok: false, error: wrote.error }, 500);
9613
9613
  return json(res, { ok: true, recorded: rec });
@@ -10273,7 +10273,7 @@ async function handleRequest(req, res) {
10273
10273
  let body = {}; try { body = JSON.parse((await readBody(req)) || '{}'); } catch { return json(res, { ok: false, error: 'invalid JSON body' }, 400); }
10274
10274
  const v = proactiveLib.validateFeedback(body);
10275
10275
  if (!v.ok) return json(res, { ok: false, error: v.error }, 400);
10276
- const rec = { at: nowISO(), id: 'pf-' + Date.now().toString(36) + Math.random().toString(36).slice(2, 5), pm: 'wawan', ...v.record };
10276
+ const rec = { at: nowISO(), id: 'pf-' + Date.now().toString(36) + Math.random().toString(36).slice(2, 5), pm: actorLib.PM_SLUG, ...v.record };
10277
10277
  const w = nsAppend(PRO_FEEDBACK(), rec, 'proactive feedback');
10278
10278
  if (!w.ok) return json(res, { ok: false, error: w.error }, 500);
10279
10279
  return json(res, { ok: true, recorded: rec });
@@ -10371,7 +10371,7 @@ async function handleRequest(req, res) {
10371
10371
  const why = learnLib.decideLesson(lessons, c.req);
10372
10372
  if (why) return json(res, { ok: false, error: why }, why === 'no such lesson' ? 404 : 409);
10373
10373
  const ev = { approve: 'approved', reject: 'rejected', retire: 'retired' }[c.req.decision];
10374
- const w = nsAppend(PRO_LESSONS(), { event: ev, id: c.req.id, at: nowISO(), pm: 'wawan' }, 'lesson');
10374
+ const w = nsAppend(PRO_LESSONS(), { event: ev, id: c.req.id, at: nowISO(), pm: actorLib.PM_SLUG }, 'lesson');
10375
10375
  if (!w.ok) return json(res, { ok: false, error: w.error }, 500);
10376
10376
  return json(res, { ok: true, id: c.req.id, status: ev });
10377
10377
  }
@@ -10380,14 +10380,14 @@ async function handleRequest(req, res) {
10380
10380
  if (body.confirm !== true) return json(res, { ok: false, error: 'confirm is required' }, 400);
10381
10381
  const L = learnState(Date.now());
10382
10382
  if (!L.narrowed.some((n) => n.kind === body.kind)) return json(res, { ok: false, error: `${String(body.kind || '').slice(0, 20) || 'that trigger'} is not narrowed — nothing to restore` }, 409);
10383
- const w = nsAppend(PRO_LEARN_EVENTS(), { event: 'restore', kind: body.kind, at: nowISO(), pm: 'wawan' }, 'learn event');
10383
+ const w = nsAppend(PRO_LEARN_EVENTS(), { event: 'restore', kind: body.kind, at: nowISO(), pm: actorLib.PM_SLUG }, 'learn event');
10384
10384
  if (!w.ok) return json(res, { ok: false, error: w.error }, 500);
10385
10385
  return json(res, { ok: true, kind: body.kind });
10386
10386
  }
10387
10387
  if (p === '/api/proactive/learn/reset' && req.method === 'POST') {
10388
10388
  let body = {}; try { body = JSON.parse((await readBody(req)) || '{}'); } catch { return json(res, { ok: false, error: 'invalid JSON body' }, 400); }
10389
10389
  if (body.confirm !== true) return json(res, { ok: false, error: 'confirm is required: this makes the engine ignore all earlier feedback' }, 400);
10390
- const w = nsAppend(PRO_LEARN_EVENTS(), { event: 'reset', at: nowISO(), pm: 'wawan' }, 'learn event');
10390
+ const w = nsAppend(PRO_LEARN_EVENTS(), { event: 'reset', at: nowISO(), pm: actorLib.PM_SLUG }, 'learn event');
10391
10391
  if (!w.ok) return json(res, { ok: false, error: w.error }, 500);
10392
10392
  return json(res, { ok: true });
10393
10393
  }
@@ -10430,7 +10430,7 @@ async function handleRequest(req, res) {
10430
10430
  grant = m.grant_id;
10431
10431
  }
10432
10432
  const at = nowISO();
10433
- const recs = ids.map((x) => ({ initiative_id: x, state: body.state, reason, ...(body.back ? { back: String(body.back) } : {}), pm: 'wawan', by: g.actor.by, via: g.actor.via, at, ...(grant ? { grant } : {}) }));
10433
+ const recs = ids.map((x) => ({ initiative_id: x, state: body.state, reason, ...(body.back ? { back: String(body.back) } : {}), pm: actorLib.PM_SLUG, by: g.actor.by, via: g.actor.via, at, ...(grant ? { grant } : {}) }));
10434
10434
  const rec = recs[0];
10435
10435
  // The ledger the ENGINE reads for this repository's layout (scripts/workflow-state.js#layout): a repository
10436
10436
  // with planning/initiatives/ keeps its ledgers in planning/runs/, a kit in pmos/state/. Writing anywhere else
@@ -10927,6 +10927,9 @@ function httpGuard(req, res) {
10927
10927
  res.end(JSON.stringify({ ok: false, error: 'the public host is only reachable through Cloudflare Access' }));
10928
10928
  return;
10929
10929
  }
10930
+ // Browser hardening headers on every answer to the public hostname (HSTS, framing, nosniff, referrer). Routes may still set their own.
10931
+ const hardening = remoteAccess.publicHeaders({ headers: req.headers, publicHost: publicHost() });
10932
+ if (hardening) for (const [k, v] of Object.entries(hardening)) res.setHeader(k, v);
10930
10933
  // workspace-online-mode (D89): on the Online switch's hostname the verified Access assertion is the whole check.
10931
10934
  // It replaces the token, so neither the sign-in form nor the token cookie is reachable there.
10932
10935
  if (viaOnlineHost(req.headers)) {
@@ -5,7 +5,7 @@ description: "Read what changed in the PM's mail, chat, Jira, Confluence, calend
5
5
  run: agent
6
6
  agent: claude
7
7
  version: 1.3.0
8
- owner: wawan
8
+ owner: pmos
9
9
  risk: low
10
10
  scope: read:connectors, read:state, write:state/requirements, write:state/people
11
11
  output:
@@ -37,7 +37,7 @@ Procedure:
37
37
  5. File each item: `pmos impact add --json -` with `{ "kind", "text", "who", "at", "source": { "url", "type", "label" } }`.
38
38
  - who is the person's name, or "" for a system (a KR).
39
39
  - at is when the reaction happened (ISO 8601), not when you read it.
40
- - source.type is one of slack, mail, jira, doc, meeting, kr, board, initiative. label says where it is: "Slack · #idpf-data", "Jira IDPF-212 moved to In progress".
40
+ - source.type is one of slack, mail, jira, doc, meeting, kr, board, initiative. label says where it is: "Slack · #shop-data", "Jira SHOP-212 moved to In progress".
41
41
  6. Run `pmos impact end`. If you could not finish, run `pmos impact end --error "<why>"`.
42
42
 
43
43
  Output contract: produce EXACTLY these sections in your final message:
@@ -6,7 +6,7 @@ run: agent
6
6
  agent: claude
7
7
  tier: balanced
8
8
  version: 1.2.0
9
- owner: wawan
9
+ owner: pmos
10
10
  risk: low
11
11
  scope: read:connectors, read:state, write:state/live-notes
12
12
  output:
@@ -26,7 +26,7 @@ Rules that always hold:
26
26
 
27
27
  Procedure:
28
28
  1. Read the rows and the open initiatives below. For a chat, read its last words; for more, `pmos initiative list` and `pmos initiative export <id>`.
29
- 2. Link: for each open initiative that some rows belong to, file one `pmos propose loose link --json -` with `{ "initiative": "<id>", "title": "<its title>", "why": "<one line: what the rows share with it>", "items": [{ "row": "<row id>" }] }`. Why names the evidence in plain words: "They name IDPF and the MoEngage sync; the DSU has the same people."
29
+ 2. Link: for each open initiative that some rows belong to, file one `pmos propose loose link --json -` with `{ "initiative": "<id>", "title": "<its title>", "why": "<one line: what the rows share with it>", "items": [{ "row": "<row id>" }] }`. Why names the evidence in plain words: "They name the shop and the CRM sync; the stand-up has the same people."
30
30
  3. Merge: when a chat has the same name or the same ask as one of the PM's own items, file `pmos propose loose merge --json -` with `{ "into": "w:<item>", "why": "Your item stays; the chat with the same name joins it.", "items": [{ "row": "c:<chat>" }] }`.
31
31
  4. Finish: chats whose own last message closed the work: one `pmos propose loose finish --json -` with `{ "why": "Their last message closed the work. The chat is kept.", "items": [{ "row", "quote": "Deck sent to the TSC", "at": "YYYY-MM-DD" }] }`.
32
32
  5. Start: when 3 or more leftovers are about one new thing that is not an open initiative, file `pmos propose loose start --json -` with `{ "title": "<short name>", "intent": "<its Why, one line>", "anchor": "<a KR or health:<id> from planning/okrs>", "why": "<what they share>", "items": [...] }`. No anchor you can point at: do not file it.
@@ -5,7 +5,7 @@ description: "Read the current value of a KR or a health budget from a committed
5
5
  run: agent
6
6
  agent: claude
7
7
  version: 1.0.0
8
- owner: wawan
8
+ owner: pmos
9
9
  risk: low
10
10
  scope: read:state, write:state/measurements
11
11
  output:
@@ -39,7 +39,7 @@ Procedure:
39
39
  - a key result carries `"pillar"`: the objective it serves.
40
40
  3. Run `pmos metrics draft step measure`. Read the last 8 weeks for each row and file the row again with its "now" and its source (rule 5), or with the ticket (rule 6).
41
41
  4. Run `pmos metrics draft step target`. File each row again with its target and its why (rule 7).
42
- 5. Run `pmos metrics draft end --head "<one line>" --sub "<one line>" --src "<source · source · source>"`. The head says what you drafted, for example "I drafted a North Star, 3 inputs and 2 guardrails for pmos-idpf." The sub says where it comes from, for example "From your product brief, Q4 key results and 8 weeks of Amplitude."
42
+ 5. Run `pmos metrics draft end --head "<one line>" --sub "<one line>" --src "<source · source · source>"`. The head says what you drafted, for example "I drafted a North Star, 3 inputs and 2 guardrails for acme-shop." The sub says where it comes from, for example "From your product brief, Q4 key results and 8 weeks of Amplitude."
43
43
 
44
44
  Read before you draft: [activation](/okf/products/pmos/references/metrics/activation.md), a worked metric with a primary measure and a guardrail.
45
45
 
@@ -27,7 +27,7 @@ The HTML contract:
27
27
  - The kind says what the slide is: title, headline, list, chart, table, initiative, decisions, risks, sources, or a short word of your own.
28
28
  - All styles in ONE <style> block. No <link>, no @import, no web font.
29
29
  - Interactivity only by these data attributes (the page wires them; the render has no script):
30
- - data-src="<kind>:<id>" on a source chip, for example data-src="jira:IDPF-31" or data-src="initiative:checkout-redesign".
30
+ - data-src="<kind>:<id>" on a source chip, for example data-src="jira:SHOP-31" or data-src="initiative:checkout-redesign".
31
31
  - data-value="<detail>" on a value: the detail shows when the reader hovers it.
32
32
  - data-more on a container: its children with class "pmos-more" stay hidden until the reader opens it. A <details data-more> also works.
33
33
  - data-initiative="<id>" on an element that links to an initiative.
@@ -46,7 +46,7 @@ Procedure:
46
46
  The shape of the proposal. Every text is one line:
47
47
 
48
48
  {
49
- "name": "IDPF biweekly",
49
+ "name": "Shop biweekly",
50
50
  "purpose": "One sentence: what the readers use it for.",
51
51
  "audience": "The attendees of the Thursday progress session",
52
52
  "source": "work",
@@ -50,7 +50,7 @@ Procedure:
50
50
  `definition` says whether the definition used is confirmed (`stable`) or only proposed (`draft`). Do not add a `timestamp` or `verified`.
51
51
  5. Under the frontmatter: a Headline (one or two sentences: what the reader most needs to know), then the sections the definition names in its order, then "Needs your call" (decisions or answers only the PM can give), then "Sources reached and not reached" (each source kind: reached or not reached and why; private items skipped).
52
52
  6. If the definition was a draft, say so in the first line of the Headline so the PM sees it.
53
- 7. Keep the product's story current (D107 Narrative; the product page shows it as "The story so far", and the weekly update leads with it). Write 3 to 6 short sentences, one per line, on where the product stands now: what was settled, what waits, what is late, what has no verdict yet. Give one `--source` per line, in the same order, each pointing at the record that holds that sentence: `pmos artefacts set portfolio narrative now --text "<line 1>"$'\n'"<line 2>"… --source "<label>=<ref>" --source …`. A label is short ("Jira IDPF-3326 · 30 Oct"). Bold a few words with **two stars** when they are the point. A sentence with no record is left out. The story goes to people only when the PM sends it.
53
+ 7. Keep the product's story current (D107 Narrative; the product page shows it as "The story so far", and the weekly update leads with it). Write 3 to 6 short sentences, one per line, on where the product stands now: what was settled, what waits, what is late, what has no verdict yet. Give one `--source` per line, in the same order, each pointing at the record that holds that sentence: `pmos artefacts set portfolio narrative now --text "<line 1>"$'\n'"<line 2>"… --source "<label>=<ref>" --source …`. A label is short ("Jira SHOP-3326 · 30 Oct"). Bold a few words with **two stars** when they are the point. A sentence with no record is left out. The story goes to people only when the PM sends it.
54
54
  8. Finish by saying in one line where the draft is. Do not commit; the PM's Sync carries the file.
55
55
 
56
56
  Default shape, used ONLY when proposing a definition: a weekly report: progress against initiatives, decisions made, risks, what is next. Use the report frame of D78: a Headline, then What moved, Risks and Metrics, then Needs your call and Sources reached and not reached.
@@ -9,7 +9,7 @@ output:
9
9
  - "<state>/reports/<id>/<slot>.md and the deck, rendered by PMOS from it"
10
10
  ---
11
11
 
12
- /report-write — write one report for THIS repository as a draft, with the report engine (design E). The args are the report id, and for an ad hoc report the question, for example `scarlet-assessment "Do we keep Scarlet, or move small RSVP events to a SaaS?"`.
12
+ /report-write — write one report for THIS repository as a draft, with the report engine (design E). The args are the report id, and for an ad hoc report the question, for example `pricing-review "Do we keep our own billing, or move small plans to a SaaS?"`.
13
13
 
14
14
  There is no template and no fixed frame. You choose the outline of this report from its readers and their question. What never changes is the discipline below.
15
15
 
@@ -19,5 +19,5 @@ Rules that always hold:
19
19
  Procedure:
20
20
  1. Read where the product stands: `pmos initiative list` (stage, owner, dates), and `node scripts/workflow-state.js` if the repository has it. Read `pmos artefacts show portfolio` for an Intent or a Goal to lead with.
21
21
  2. Write 3 to 6 short sentences, one per line, on where the product stands now: what was settled, what waits, what is late, what has no verdict yet. Plain words. Bold a few words with **two stars** only when they are the point.
22
- 3. Run once: `pmos artefacts set portfolio narrative now --text "<line 1>"$'\n'"<line 2>"… --source "<label>=<ref>" --source …` with one `--source` per line, in the same order. A label is short ("Initiative scarlet · 30 Oct"); a ref is an initiative id, a path or a link.
22
+ 3. Run once: `pmos artefacts set portfolio narrative now --text "<line 1>"$'\n'"<line 2>"… --source "<label>=<ref>" --source …` with one `--source` per line, in the same order. A label is short ("Initiative checkout-redesign · 30 Oct"); a ref is an initiative id, a path or a link.
23
23
  4. End with one line: how many sentences you wrote. If the records hold nothing to say, write nothing and say so in one line.
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "Remove work-specific names from the kit: the PM's name comes from PMOS_PM, the git name or the computer user (lib/pm-slug.js), never a fixed person. Pure.",
3
+ "modules": [
4
+ "pm-slug.test.js"
5
+ ],
6
+ "seconds": {
7
+ "pm-slug.test.js": 1
8
+ }
9
+ }