create-pmos 0.398.0 → 0.400.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 (515) hide show
  1. package/package.json +30 -25
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/workspace/briefing-premium-adddoc-test.js +19 -15
  7. package/workspace/briefing-premium-board-test.js +82 -50
  8. package/workspace/briefing-premium-calendar-2-test.js +36 -36
  9. package/workspace/briefing-premium-calendar-3-test.js +39 -39
  10. package/workspace/briefing-premium-calendar-test.js +23 -24
  11. package/workspace/briefing-premium-doc-edit-test.js +8 -10
  12. package/workspace/briefing-premium-initiative-test.js +38 -16
  13. package/workspace/briefing-premium-insights-test.js +114 -37
  14. package/workspace/briefing-premium-metrics-test.js +6 -4
  15. package/workspace/briefing-premium-products-test.js +10 -7
  16. package/workspace/briefing-premium-sources-test.js +25 -22
  17. package/workspace/briefing-premium-test.js +48 -43
  18. package/workspace/briefing-premium-work-test.js +16 -11
  19. package/workspace/c3-capture-test.js +0 -17
  20. package/workspace/changelog.json +29 -0
  21. package/workspace/ev-everywhere-test.js +210 -0
  22. package/workspace/fixtures/premium-viewer-fixtures.js +11 -6
  23. package/workspace/guide/briefing-premium.md +2 -2
  24. package/workspace/guide/home.md +58 -19
  25. package/workspace/guide/index.md +1 -1
  26. package/workspace/guide/layout.md +2 -2
  27. package/workspace/guide/notes.md +2 -2
  28. package/workspace/guide/phone-companion.md +1 -1
  29. package/workspace/lib/board-grill.js +63 -0
  30. package/workspace/lib/board-premium.js +36 -5
  31. package/workspace/lib/initiative-layout.js +77 -0
  32. package/workspace/lib/insights-premium.js +3 -2
  33. package/workspace/lib/insights-records.js +21 -7
  34. package/workspace/lib/meeting-points.js +52 -0
  35. package/workspace/lib/news-for-you.js +88 -0
  36. package/workspace/lib/notes-series.js +29 -6
  37. package/workspace/lib/report-confirm.js +48 -0
  38. package/workspace/lib/route-modules.js +9 -9
  39. package/workspace/lib/routes-board-docs.js +46 -0
  40. package/workspace/lib/routes-board-grill.js +90 -0
  41. package/workspace/lib/routes-home-review.js +108 -0
  42. package/workspace/lib/routes-initiative-layout.js +57 -0
  43. package/workspace/lib/routes-insights-premium.js +4 -1
  44. package/workspace/lib/routes-insights-records.js +8 -4
  45. package/workspace/lib/routes-meeting-points.js +37 -0
  46. package/workspace/lib/routes-news.js +57 -0
  47. package/workspace/lib/routes-notes.js +2 -1
  48. package/workspace/lib/routes-phone-day.js +18 -9
  49. package/workspace/lib/routes-report-confirm.js +31 -0
  50. package/workspace/lib/routes-search.js +38 -0
  51. package/workspace/lib/routes-slash.js +95 -0
  52. package/workspace/lib/search-index.js +176 -0
  53. package/workspace/package-lock.json +2 -2
  54. package/workspace/package.json +1 -2
  55. package/workspace/premium-board-actions-test.js +86 -50
  56. package/workspace/premium-briefing-depth-test.js +55 -54
  57. package/workspace/premium-chat-chart-tab-test.js +4 -2
  58. package/workspace/premium-chat-goal-view-test.js +1 -1
  59. package/workspace/premium-chat-report-tab-test.js +16 -2
  60. package/workspace/premium-chat-term-test.js +0 -10
  61. package/workspace/premium-core-doc-issue-test.js +15 -13
  62. package/workspace/premium-menu-rows-test.js +1 -1
  63. package/workspace/premium-phone-card-test.js +7 -5
  64. package/workspace/premium-report-read-test.js +55 -18
  65. package/workspace/premium-vw-backlog-test.js +2 -2
  66. package/workspace/premium-vw-cal-test.js +50 -35
  67. package/workspace/premium-vw-doc-test.js +10 -11
  68. package/workspace/premium-vw-item-test.js +1 -1
  69. package/workspace/premium-vw-jira-test.js +2 -2
  70. package/workspace/premium-vw-meet-test.js +37 -40
  71. package/workspace/premium-vw-notes-test.js +21 -19
  72. package/workspace/premium-vw-rec-test.js +11 -12
  73. package/workspace/premium-welcome-test.js +3 -3
  74. package/workspace/premium-work-depth-test.js +5 -6
  75. package/workspace/public/capture.html +23 -0
  76. package/workspace/public/pm/bd-acts.js +303 -225
  77. package/workspace/public/pm/bd-asks.js +261 -0
  78. package/workspace/public/pm/bd-pop.js +59 -0
  79. package/workspace/public/pm/bd-span.js +49 -13
  80. package/workspace/public/pm/bd-views.js +169 -0
  81. package/workspace/public/pm/c3-base.js +47 -0
  82. package/workspace/public/pm/c3-capture.js +1 -1
  83. package/workspace/public/pm/c3-ini-ui.js +1 -1
  84. package/workspace/public/pm/c3-sheet.js +1 -1
  85. package/workspace/public/pm/c3-toast.js +1 -1
  86. package/workspace/public/pm/console3.css +3 -0
  87. package/workspace/public/pm/cozy-board.css +301 -0
  88. package/workspace/public/pm/cozy-ev.css +228 -0
  89. package/workspace/public/pm/cozy-evmodel.js +106 -0
  90. package/workspace/public/pm/cozy-evui.js +47 -0
  91. package/workspace/public/pm/cozy-home.css +20 -5
  92. package/workspace/public/pm/cozy-insights.css +148 -10
  93. package/workspace/public/pm/cozy-nav.js +103 -39
  94. package/workspace/public/pm/cozy-news.js +140 -0
  95. package/workspace/public/pm/cozy-search.js +203 -0
  96. package/workspace/public/pm/cozy-settings.js +198 -0
  97. package/workspace/public/pm/cozy-sources.js +89 -0
  98. package/workspace/public/pm/cozy-today.css +220 -0
  99. package/workspace/public/pm/cozy-viewer.js +5 -2
  100. package/workspace/public/pm/cozy-vw-mtg.css +350 -0
  101. package/workspace/public/pm/cozy-vw-rp.css +152 -0
  102. package/workspace/public/pm/cozy.css +9 -0
  103. package/workspace/public/pm/goal-chat.js +5 -1
  104. package/workspace/public/pm/home-adddoc.js +5 -5
  105. package/workspace/public/pm/home-app.js +365 -70
  106. package/workspace/public/pm/home-around.js +24 -126
  107. package/workspace/public/pm/home-chat.js +77 -18
  108. package/workspace/public/pm/home-data.js +9 -7
  109. package/workspace/public/pm/home-dictate.js +57 -0
  110. package/workspace/public/pm/home-draft.js +6 -6
  111. package/workspace/public/pm/home-ini-model.js +190 -0
  112. package/workspace/public/pm/home-ini.css +171 -0
  113. package/workspace/public/pm/home-ini.js +466 -0
  114. package/workspace/public/pm/home-list.js +289 -0
  115. package/workspace/public/pm/home-more.js +18 -135
  116. package/workspace/public/pm/home-phone-card.js +13 -8
  117. package/workspace/public/pm/home-review.js +103 -0
  118. package/workspace/public/pm/home-task.js +67 -0
  119. package/workspace/public/pm/home-today.js +148 -0
  120. package/workspace/public/pm/home-work.js +63 -28
  121. package/workspace/public/pm/note-dock.js +1 -2
  122. package/workspace/public/pm/notes-links.js +1 -2
  123. package/workspace/public/pm/notes-task.js +3 -4
  124. package/workspace/public/pm/premium-board.js +164 -40
  125. package/workspace/public/pm/premium-chart-tab.js +4 -5
  126. package/workspace/public/pm/premium-first.js +5 -7
  127. package/workspace/public/pm/premium-initiative-head.js +3 -3
  128. package/workspace/public/pm/premium-insights.js +499 -202
  129. package/workspace/public/pm/premium-mtg-present.js +138 -0
  130. package/workspace/public/pm/premium-mtg-replay.js +142 -0
  131. package/workspace/public/pm/premium-report-read.js +216 -52
  132. package/workspace/public/pm/premium-report-tab.js +44 -19
  133. package/workspace/public/pm/premium-shell.js +7 -7
  134. package/workspace/public/pm/premium-vw-cal.js +150 -60
  135. package/workspace/public/pm/premium-vw-doc.css +20 -2
  136. package/workspace/public/pm/premium-vw-doc.js +22 -7
  137. package/workspace/public/pm/premium-vw-mtg.js +488 -261
  138. package/workspace/public/pm/premium-vw-notes.js +61 -0
  139. package/workspace/public/pm/rp-parts.js +269 -0
  140. package/workspace/public/pm/view-notes.js +2 -2
  141. package/workspace/public/premium-board.html +4 -3
  142. package/workspace/public/premium-insights.html +10 -10
  143. package/workspace/public/premium.html +3 -1
  144. package/workspace/r/m1.png +0 -0
  145. package/workspace/r/m2.png +0 -0
  146. package/workspace/r/m3.png +0 -0
  147. package/workspace/r/nl.png +0 -0
  148. package/workspace/replaced-tests.json +435 -0
  149. package/workspace/run-tests.js +323 -28
  150. package/workspace/server.js +15 -10
  151. package/workspace/test-files.json +3 -140
  152. package/workspace/test-lists/base.json +1 -2
  153. package/workspace/test-lists/c3-desktop-light-load.json +1 -2
  154. package/workspace/test-lists/c3-initiative-boards.json +1 -2
  155. package/workspace/test-lists/c3-meeting-focus.json +2 -12
  156. package/workspace/test-lists/c3-work-agent.json +1 -2
  157. package/workspace/test-lists/calendar-tidy-up.json +1 -2
  158. package/workspace/test-lists/console3-reports.json +1 -2
  159. package/workspace/test-lists/docs-three-way-sync.json +1 -2
  160. package/workspace/test-lists/extension-capture.json +5 -0
  161. package/workspace/test-lists/initiative-layout.json +9 -0
  162. package/workspace/test-lists/jira-wbs.json +1 -2
  163. package/workspace/test-lists/legacy-cleanup-a.json +9 -0
  164. package/workspace/test-lists/meeting-material.json +1 -2
  165. package/workspace/test-lists/meeting-notes.json +2 -36
  166. package/workspace/test-lists/meeting-replay.json +1 -2
  167. package/workspace/test-lists/mm-capture.json +2 -12
  168. package/workspace/test-lists/my-work.json +2 -10
  169. package/workspace/test-lists/onboarding-firstrun.json +2 -12
  170. package/workspace/test-lists/people-directory.json +1 -2
  171. package/workspace/test-lists/premium-uncovered-meetings.json +9 -0
  172. package/workspace/test-lists/premium-uncovered-reports.json +9 -0
  173. package/workspace/test-lists/run2-a.json +1 -2
  174. package/workspace/test-lists/run2-d.json +2 -19
  175. package/workspace/test-lists/run3-b.json +1 -2
  176. package/workspace/test-lists/run3-c.json +2 -12
  177. package/workspace/test-lists/run4-b.json +1 -2
  178. package/workspace/test-lists/run4-d.json +1 -5
  179. package/workspace/test-lists/run5-c.json +1 -11
  180. package/workspace/test-lists/run6.json +1 -5
  181. package/workspace/test-lists/uf-everywhere.json +15 -0
  182. package/workspace/test-lists/uf-home.json +9 -0
  183. package/workspace/test-lists/uncovered-board.json +9 -0
  184. package/workspace/test-lists/workspace-launch-flags.json +2 -12
  185. package/workspace/test-lists/workspace-profile-detection.json +2 -10
  186. package/workspace/test-timings.json +242 -123
  187. package/workspace/c3-briefing-test.js +0 -136
  188. package/workspace/c3-core-docs-test.js +0 -170
  189. package/workspace/c3-driver-fixture.js +0 -64
  190. package/workspace/c3-driver-test.js +0 -169
  191. package/workspace/c3-foundation-test.js +0 -163
  192. package/workspace/c3-ib-items-test.js +0 -114
  193. package/workspace/c3-ib-more-test.js +0 -146
  194. package/workspace/c3-ib-triage-backlog-test.js +0 -128
  195. package/workspace/c3-ini-harness.js +0 -66
  196. package/workspace/c3-ini-life-test.js +0 -167
  197. package/workspace/c3-initiatives-test.js +0 -186
  198. package/workspace/c3-light-load-test.js +0 -112
  199. package/workspace/c3-one-home-test.js +0 -149
  200. package/workspace/c3-phone-test.js +0 -289
  201. package/workspace/c3-quiet-test.js +0 -157
  202. package/workspace/c3-report-design-real-test.js +0 -264
  203. package/workspace/c3-report-design-test.js +0 -442
  204. package/workspace/c3-report-setup-test.js +0 -192
  205. package/workspace/c3-report-structure-real-test.js +0 -248
  206. package/workspace/c3-report-structure-test.js +0 -397
  207. package/workspace/c3-reports-test.js +0 -288
  208. package/workspace/c3-scan-test.js +0 -517
  209. package/workspace/c3-sessions-panel-test.js +0 -365
  210. package/workspace/c3-settings-test.js +0 -204
  211. package/workspace/c3-updates-test.js +0 -131
  212. package/workspace/c3-work-test.js +0 -260
  213. package/workspace/cut-stub.js +0 -40
  214. package/workspace/first-paint-audit.js +0 -160
  215. package/workspace/lib/c3-full-console.js +0 -15
  216. package/workspace/lib/engine/derived/trust.js +0 -3
  217. package/workspace/lib/engine/plan-forecast.js +0 -342
  218. package/workspace/lib/engine/report-families.js +0 -175
  219. package/workspace/lib/engine/truth-table.js +0 -57
  220. package/workspace/lib/routes-c3-init.js +0 -54
  221. package/workspace/lib/routes-c3-life.js +0 -120
  222. package/workspace/lib/routes-c3-timeline.js +0 -192
  223. package/workspace/lib/routes-forecast.js +0 -86
  224. package/workspace/lib/routes-releases.js +0 -130
  225. package/workspace/lib/routes-report-facts.js +0 -85
  226. package/workspace/lib/routes-report-families.js +0 -33
  227. package/workspace/lib/routes-signals.js +0 -51
  228. package/workspace/lib/routes-timeline.js +0 -197
  229. package/workspace/public/c3.html +0 -35
  230. package/workspace/public/index.html +0 -156
  231. package/workspace/public/pm/app.js +0 -831
  232. package/workspace/public/pm/bd-board.js +0 -159
  233. package/workspace/public/pm/bd-drag.js +0 -59
  234. package/workspace/public/pm/bd-model.js +0 -152
  235. package/workspace/public/pm/bd-timeline.js +0 -233
  236. package/workspace/public/pm/bd-tree.js +0 -244
  237. package/workspace/public/pm/board-copy.js +0 -59
  238. package/workspace/public/pm/board-read.js +0 -38
  239. package/workspace/public/pm/branches-sheet.js +0 -56
  240. package/workspace/public/pm/breakdown-api.js +0 -58
  241. package/workspace/public/pm/breakdown-copy.js +0 -138
  242. package/workspace/public/pm/briefing-deck.js +0 -441
  243. package/workspace/public/pm/briefing-model.js +0 -251
  244. package/workspace/public/pm/c3-ambient.js +0 -100
  245. package/workspace/public/pm/c3-audience-link.js +0 -21
  246. package/workspace/public/pm/c3-audience.js +0 -46
  247. package/workspace/public/pm/c3-boot.js +0 -13
  248. package/workspace/public/pm/c3-breakdown.js +0 -240
  249. package/workspace/public/pm/c3-brief-data.js +0 -11
  250. package/workspace/public/pm/c3-brief-mentions.js +0 -137
  251. package/workspace/public/pm/c3-brief-needs.js +0 -288
  252. package/workspace/public/pm/c3-brief-pulse.js +0 -112
  253. package/workspace/public/pm/c3-brief-summary.js +0 -139
  254. package/workspace/public/pm/c3-brief-today.js +0 -79
  255. package/workspace/public/pm/c3-brief.js +0 -279
  256. package/workspace/public/pm/c3-cal-strategy.js +0 -529
  257. package/workspace/public/pm/c3-calendar.js +0 -965
  258. package/workspace/public/pm/c3-calpop.js +0 -111
  259. package/workspace/public/pm/c3-case.js +0 -196
  260. package/workspace/public/pm/c3-core-docs.css +0 -18
  261. package/workspace/public/pm/c3-core-docs.js +0 -236
  262. package/workspace/public/pm/c3-daypart.js +0 -176
  263. package/workspace/public/pm/c3-demo-boards.js +0 -764
  264. package/workspace/public/pm/c3-demo-brief-ix.js +0 -350
  265. package/workspace/public/pm/c3-demo-brief-page.js +0 -70
  266. package/workspace/public/pm/c3-demo-cal-ix.js +0 -74
  267. package/workspace/public/pm/c3-demo-cal2.js +0 -66
  268. package/workspace/public/pm/c3-demo-cal3.js +0 -173
  269. package/workspace/public/pm/c3-demo-cal4.js +0 -169
  270. package/workspace/public/pm/c3-demo-cal5.js +0 -52
  271. package/workspace/public/pm/c3-demo-coredocs.js +0 -221
  272. package/workspace/public/pm/c3-demo-data.js +0 -552
  273. package/workspace/public/pm/c3-demo-focus.js +0 -181
  274. package/workspace/public/pm/c3-demo-init.js +0 -430
  275. package/workspace/public/pm/c3-demo-life.js +0 -77
  276. package/workspace/public/pm/c3-demo-material.js +0 -58
  277. package/workspace/public/pm/c3-demo-misc2.js +0 -34
  278. package/workspace/public/pm/c3-demo-phone.js +0 -48
  279. package/workspace/public/pm/c3-demo-plan2.js +0 -30
  280. package/workspace/public/pm/c3-demo-rd.js +0 -432
  281. package/workspace/public/pm/c3-demo-rep-ix.js +0 -126
  282. package/workspace/public/pm/c3-demo-rep2.js +0 -130
  283. package/workspace/public/pm/c3-demo-rep3.js +0 -138
  284. package/workspace/public/pm/c3-demo-rs.js +0 -287
  285. package/workspace/public/pm/c3-demo-term.js +0 -153
  286. package/workspace/public/pm/c3-demo-time.js +0 -49
  287. package/workspace/public/pm/c3-demo-work-ix.js +0 -32
  288. package/workspace/public/pm/c3-demo.js +0 -131
  289. package/workspace/public/pm/c3-design-studio.js +0 -369
  290. package/workspace/public/pm/c3-doc-formats.js +0 -153
  291. package/workspace/public/pm/c3-doc-sheet.js +0 -1230
  292. package/workspace/public/pm/c3-dock.js +0 -206
  293. package/workspace/public/pm/c3-docs.js +0 -291
  294. package/workspace/public/pm/c3-driver-work.js +0 -110
  295. package/workspace/public/pm/c3-driver.css +0 -18
  296. package/workspace/public/pm/c3-driver.js +0 -298
  297. package/workspace/public/pm/c3-focus.css +0 -304
  298. package/workspace/public/pm/c3-focus.js +0 -983
  299. package/workspace/public/pm/c3-ib-docs.js +0 -92
  300. package/workspace/public/pm/c3-ib-initiatives.js +0 -201
  301. package/workspace/public/pm/c3-ib-items.js +0 -210
  302. package/workspace/public/pm/c3-ib-releases.js +0 -48
  303. package/workspace/public/pm/c3-ib-sprints.js +0 -201
  304. package/workspace/public/pm/c3-ib-triage.js +0 -177
  305. package/workspace/public/pm/c3-ii-tabs.js +0 -252
  306. package/workspace/public/pm/c3-ini-life.css +0 -34
  307. package/workspace/public/pm/c3-ini-life.js +0 -379
  308. package/workspace/public/pm/c3-ini-records.js +0 -197
  309. package/workspace/public/pm/c3-ini-timeline.js +0 -278
  310. package/workspace/public/pm/c3-ini-work.js +0 -139
  311. package/workspace/public/pm/c3-init-extras.js +0 -170
  312. package/workspace/public/pm/c3-initiatives.js +0 -852
  313. package/workspace/public/pm/c3-lifecycle-panels.js +0 -479
  314. package/workspace/public/pm/c3-look.js +0 -27
  315. package/workspace/public/pm/c3-material.css +0 -22
  316. package/workspace/public/pm/c3-material.js +0 -321
  317. package/workspace/public/pm/c3-md.js +0 -3
  318. package/workspace/public/pm/c3-misc-panels.js +0 -89
  319. package/workspace/public/pm/c3-new-session.js +0 -110
  320. package/workspace/public/pm/c3-notes.js +0 -751
  321. package/workspace/public/pm/c3-phone-boot.js +0 -47
  322. package/workspace/public/pm/c3-phone-detail.js +0 -97
  323. package/workspace/public/pm/c3-phone-model.js +0 -3
  324. package/workspace/public/pm/c3-phone.css +0 -66
  325. package/workspace/public/pm/c3-phone.js +0 -444
  326. package/workspace/public/pm/c3-plan-panels.js +0 -163
  327. package/workspace/public/pm/c3-plan.js +0 -193
  328. package/workspace/public/pm/c3-quiet.css +0 -113
  329. package/workspace/public/pm/c3-quiet.js +0 -177
  330. package/workspace/public/pm/c3-replay.css +0 -133
  331. package/workspace/public/pm/c3-replay.js +0 -429
  332. package/workspace/public/pm/c3-report-deck.css +0 -163
  333. package/workspace/public/pm/c3-report-deck.js +0 -598
  334. package/workspace/public/pm/c3-report-frame.css +0 -20
  335. package/workspace/public/pm/c3-report-print.css +0 -20
  336. package/workspace/public/pm/c3-report-setup.css +0 -67
  337. package/workspace/public/pm/c3-report-setup.js +0 -298
  338. package/workspace/public/pm/c3-report-store.js +0 -244
  339. package/workspace/public/pm/c3-report-structure.css +0 -44
  340. package/workspace/public/pm/c3-report-structure.js +0 -473
  341. package/workspace/public/pm/c3-reports.css +0 -68
  342. package/workspace/public/pm/c3-reports.js +0 -377
  343. package/workspace/public/pm/c3-roadmap.js +0 -249
  344. package/workspace/public/pm/c3-scan-api.js +0 -167
  345. package/workspace/public/pm/c3-scan-next.js +0 -248
  346. package/workspace/public/pm/c3-scan-setup.js +0 -313
  347. package/workspace/public/pm/c3-scan-words.js +0 -41
  348. package/workspace/public/pm/c3-scan.css +0 -74
  349. package/workspace/public/pm/c3-scan.js +0 -93
  350. package/workspace/public/pm/c3-session-chat.js +0 -103
  351. package/workspace/public/pm/c3-session-conv.js +0 -165
  352. package/workspace/public/pm/c3-session-term.js +0 -216
  353. package/workspace/public/pm/c3-settings.css +0 -85
  354. package/workspace/public/pm/c3-settings.js +0 -1045
  355. package/workspace/public/pm/c3-shell.js +0 -628
  356. package/workspace/public/pm/c3-signals.js +0 -196
  357. package/workspace/public/pm/c3-strategy-panels.js +0 -45
  358. package/workspace/public/pm/c3-swipe.js +0 -230
  359. package/workspace/public/pm/c3-terminal-data.js +0 -48
  360. package/workspace/public/pm/c3-terminal-edge.js +0 -91
  361. package/workspace/public/pm/c3-terminal-icons.js +0 -40
  362. package/workspace/public/pm/c3-terminal-results.js +0 -141
  363. package/workspace/public/pm/c3-terminal.js +0 -52
  364. package/workspace/public/pm/c3-tickets.js +0 -163
  365. package/workspace/public/pm/c3-timeline.js +0 -201
  366. package/workspace/public/pm/calendar-views.js +0 -1049
  367. package/workspace/public/pm/console3-lift.md +0 -220
  368. package/workspace/public/pm/cozy-home.js +0 -172
  369. package/workspace/public/pm/cozy-initiative.css +0 -138
  370. package/workspace/public/pm/cycle-review.js +0 -125
  371. package/workspace/public/pm/data.js +0 -1577
  372. package/workspace/public/pm/dest-board.js +0 -444
  373. package/workspace/public/pm/dest-docs.js +0 -530
  374. package/workspace/public/pm/dest-initiatives.js +0 -162
  375. package/workspace/public/pm/dest-mywork.js +0 -307
  376. package/workspace/public/pm/dest-notes.js +0 -537
  377. package/workspace/public/pm/dest-people.js +0 -449
  378. package/workspace/public/pm/dest-reports.js +0 -383
  379. package/workspace/public/pm/dest-settings.js +0 -601
  380. package/workspace/public/pm/dest-today.js +0 -267
  381. package/workspace/public/pm/display-word.js +0 -56
  382. package/workspace/public/pm/doc-editor.js +0 -473
  383. package/workspace/public/pm/doc-graph.js +0 -272
  384. package/workspace/public/pm/doc-health-panel.js +0 -110
  385. package/workspace/public/pm/doc-rail.js +0 -167
  386. package/workspace/public/pm/doc-remote.js +0 -180
  387. package/workspace/public/pm/dock-sessions.js +0 -472
  388. package/workspace/public/pm/dock.js +0 -216
  389. package/workspace/public/pm/fixture.js +0 -821
  390. package/workspace/public/pm/flag-picker.js +0 -104
  391. package/workspace/public/pm/frame-copy.js +0 -278
  392. package/workspace/public/pm/freshness-line.js +0 -149
  393. package/workspace/public/pm/handoff-box.js +0 -82
  394. package/workspace/public/pm/initiative-list.js +0 -235
  395. package/workspace/public/pm/initiative-sheet.js +0 -331
  396. package/workspace/public/pm/initiatives-api.js +0 -95
  397. package/workspace/public/pm/initiatives-copy.js +0 -287
  398. package/workspace/public/pm/initiatives-timeline-copy.js +0 -59
  399. package/workspace/public/pm/initiatives-timeline.js +0 -410
  400. package/workspace/public/pm/initiatives-ui.js +0 -291
  401. package/workspace/public/pm/item-sheet.js +0 -268
  402. package/workspace/public/pm/keep-card.js +0 -204
  403. package/workspace/public/pm/lifecycle-lens-model.js +0 -246
  404. package/workspace/public/pm/lifecycle-lens.js +0 -276
  405. package/workspace/public/pm/lifecycle.js +0 -111
  406. package/workspace/public/pm/mobile.css +0 -366
  407. package/workspace/public/pm/mobile.js +0 -581
  408. package/workspace/public/pm/modes-live.js +0 -453
  409. package/workspace/public/pm/modes.js +0 -147
  410. package/workspace/public/pm/my-work-card.js +0 -51
  411. package/workspace/public/pm/my-work-data.js +0 -36
  412. package/workspace/public/pm/new-initiative-sheet.js +0 -169
  413. package/workspace/public/pm/next-step-ui.js +0 -190
  414. package/workspace/public/pm/outbox-panel.js +0 -125
  415. package/workspace/public/pm/palette-copy.js +0 -55
  416. package/workspace/public/pm/palette.js +0 -343
  417. package/workspace/public/pm/panel-breakdown.js +0 -702
  418. package/workspace/public/pm/panel-cockpit.js +0 -425
  419. package/workspace/public/pm/panel-detail.js +0 -1513
  420. package/workspace/public/pm/panel-initiatives.js +0 -929
  421. package/workspace/public/pm/panel-newsess.js +0 -709
  422. package/workspace/public/pm/panel-repos.js +0 -741
  423. package/workspace/public/pm/panel-tabs.js +0 -1506
  424. package/workspace/public/pm/panel-trees.js +0 -204
  425. package/workspace/public/pm/people-link.js +0 -106
  426. package/workspace/public/pm/phone-deck.js +0 -167
  427. package/workspace/public/pm/pm-work-view.js +0 -1533
  428. package/workspace/public/pm/portfolio-report.js +0 -61
  429. package/workspace/public/pm/premium-acts.js +0 -280
  430. package/workspace/public/pm/premium-brief.js +0 -111
  431. package/workspace/public/pm/premium-chat.js +0 -22
  432. package/workspace/public/pm/premium-doc-sheet.js +0 -312
  433. package/workspace/public/pm/premium-initiative.js +0 -324
  434. package/workspace/public/pm/premium-insights.css +0 -228
  435. package/workspace/public/pm/premium-metric-tiles.js +0 -68
  436. package/workspace/public/pm/premium-report-brief.js +0 -132
  437. package/workspace/public/pm/premium-vw-rec.js +0 -67
  438. package/workspace/public/pm/premium-wide.css +0 -30
  439. package/workspace/public/pm/print.css +0 -44
  440. package/workspace/public/pm/provider-cards.js +0 -136
  441. package/workspace/public/pm/registry.js +0 -203
  442. package/workspace/public/pm/release-card.js +0 -110
  443. package/workspace/public/pm/releases-view.js +0 -248
  444. package/workspace/public/pm/report-families-view.js +0 -505
  445. package/workspace/public/pm/report-slides.js +0 -438
  446. package/workspace/public/pm/report-tab.js +0 -33
  447. package/workspace/public/pm/report-view.js +0 -337
  448. package/workspace/public/pm/reports-copy.js +0 -134
  449. package/workspace/public/pm/roadmap.js +0 -294
  450. package/workspace/public/pm/run-card.js +0 -260
  451. package/workspace/public/pm/sessions-panel.js +0 -219
  452. package/workspace/public/pm/sheet-jira.js +0 -353
  453. package/workspace/public/pm/shell-bell.js +0 -163
  454. package/workspace/public/pm/shell-model.js +0 -83
  455. package/workspace/public/pm/shell-phone.js +0 -124
  456. package/workspace/public/pm/shell-readaloud.js +0 -53
  457. package/workspace/public/pm/shell-recording.js +0 -274
  458. package/workspace/public/pm/shell-ticker.js +0 -90
  459. package/workspace/public/pm/sig-watch.js +0 -41
  460. package/workspace/public/pm/slide-confirm.js +0 -163
  461. package/workspace/public/pm/slides-copy.js +0 -52
  462. package/workspace/public/pm/status-banner.js +0 -95
  463. package/workspace/public/pm/tab-doc.js +0 -859
  464. package/workspace/public/pm/tab-gone.js +0 -21
  465. package/workspace/public/pm/tab-term.js +0 -1210
  466. package/workspace/public/pm/tab-web.js +0 -90
  467. package/workspace/public/pm/timeline-copy.js +0 -48
  468. package/workspace/public/pm/timeline-forecast-view.js +0 -164
  469. package/workspace/public/pm/today-agenda.js +0 -331
  470. package/workspace/public/pm/today-cards.js +0 -244
  471. package/workspace/public/pm/today-copy.js +0 -506
  472. package/workspace/public/pm/today-day.js +0 -1371
  473. package/workspace/public/pm/today-goals.js +0 -297
  474. package/workspace/public/pm/today-jobs.js +0 -84
  475. package/workspace/public/pm/today-mentions.js +0 -50
  476. package/workspace/public/pm/topbar.js +0 -202
  477. package/workspace/public/pm/triage-card.js +0 -60
  478. package/workspace/public/pm/undo-hold.js +0 -103
  479. package/workspace/public/pm/view-addrepo.js +0 -208
  480. package/workspace/public/pm/view-files.js +0 -197
  481. package/workspace/public/pm/view-livenotes.js +0 -399
  482. package/workspace/public/pm/view-today.js +0 -13
  483. package/workspace/public/pm/view-validate.js +0 -171
  484. package/workspace/public/pm/welcome.js +0 -391
  485. package/workspace/public/pm/work-place.js +0 -68
  486. package/workspace/public/pm/xlsx-read.js +0 -117
  487. package/workspace/public/welcome.html +0 -22
  488. package/workspace/test-lists/browser-suites-green.json +0 -5
  489. package/workspace/test-lists/c3-core-docs.json +0 -9
  490. package/workspace/test-lists/c3-doc-sheet-rich.json +0 -6
  491. package/workspace/test-lists/c3-doc-sheet-size.json +0 -6
  492. package/workspace/test-lists/c3-doc-sheet-v2.json +0 -6
  493. package/workspace/test-lists/c3-ib-items.json +0 -9
  494. package/workspace/test-lists/c3-ib-more.json +0 -9
  495. package/workspace/test-lists/c3-ib-triage-backlog.json +0 -9
  496. package/workspace/test-lists/c3-ini-life.json +0 -9
  497. package/workspace/test-lists/c3-meeting-board.json +0 -5
  498. package/workspace/test-lists/c3-meeting-card.json +0 -5
  499. package/workspace/test-lists/c3-notes-place.json +0 -5
  500. package/workspace/test-lists/c3-notes-series.json +0 -5
  501. package/workspace/test-lists/calendar-time-page.json +0 -5
  502. package/workspace/test-lists/calpop.json +0 -4
  503. package/workspace/test-lists/console3-briefing.json +0 -9
  504. package/workspace/test-lists/console3-foundation.json +0 -9
  505. package/workspace/test-lists/console3-work-page.json +0 -9
  506. package/workspace/test-lists/premium-brief-parity.json +0 -9
  507. package/workspace/test-lists/report-design-studio-ui.json +0 -5
  508. package/workspace/test-lists/report-structure-ui.json +0 -11
  509. package/workspace/test-lists/report-workspace-ui.json +0 -5
  510. package/workspace/test-lists/run3-a.json +0 -5
  511. package/workspace/test-lists/run3-d.json +0 -6
  512. package/workspace/test-lists/run4-c.json +0 -13
  513. package/workspace/test-lists/today-goals-jobs-ui.json +0 -5
  514. package/workspace/test-lists/today-mentions-cards.json +0 -5
  515. package/workspace/test-lists/workspace-tabs-declutter.json +0 -13
@@ -1,204 +0,0 @@
1
- /* pm/keep-card.js — the Keep card, and the breakdown rows of Today's needs-you list (pm-os-absorb Run 1, PRD R21/R23).
2
- *
3
- * An agent's items arrive PROPOSED: they show in the Tree and on the Board but count in no progress until the PM keeps
4
- * them. One card per batch (everything one agent session proposed on one initiative) offers Keep or Withdraw all.
5
- * Tree "Agent · sess-3 proposed 9 items on 5 Oct." [Keep] [Withdraw all]
6
- * Today • <initiative> · 9 items · agent · sess-3 [Keep] [Withdraw all]
7
- * The batch is named by the session label the rows already show, so two batches on one initiative read apart.
8
- * Keep writes one `kept` line, and only from this page (the server refuses `kept` from anywhere else). Withdraw all goes
9
- * through the Undo hold and then writes one `withdrawn` per item in one request. The card reads the batch as the server
10
- * last sent it, so an item proposed after the read stays proposed and appears on the next refresh as a new count.
11
- *
12
- * Today's other two breakdown rows — an agent Done with no evidence, and a ledger line that has no effect (a forged Keep) —
13
- * render as plain cards that open the initiative. All three come from the existing GET /api/needs.
14
- */
15
-
16
- import { el } from './dom.js';
17
- import { button, toast, ensureComponentsCss } from './primitives.js';
18
- import { COPY, dayOf } from './breakdown-copy.js';
19
- import { postEvents, getNeeds } from './breakdown-api.js';
20
- import { hold, isHeld } from './undo-hold.js';
21
- import { wsOf } from './data.js';
22
- import { state, setState, FIXTURE } from './state.js';
23
- import { registerTodaySource } from './registry.js';
24
- import { records } from './board-read.js';
25
- import { COPY as TODAY } from './today-copy.js';
26
- import { todayCard, ensureFeed, onFeed } from './today-cards.js';
27
-
28
- export const keepKey = (ws, initiative, by) => 'batch:' + ws + ':' + initiative + ':' + by;
29
-
30
- /**
31
- * keepCard({ ws, initiative, initiativeTitle, batch, place: 'tree'|'today', onChanged(what), onHoldApply(layout) })
32
- * `onChanged` runs after Keep is written, when Withdraw all is held, undone or written. `onHoldApply` is the overlay the
33
- * hold applies to a fetched layout (the Tree passes one; Today hides the card while the hold runs).
34
- */
35
- export function keepCard({ ws, initiative, initiativeTitle, batch, place = 'tree', repo, cardId, onChanged, onHoldApply, onKeepApply }) {
36
- const n = batch.count || (batch.items || []).length;
37
- const key = keepKey(ws, initiative, batch.by);
38
- const doKeep = async (btn) => {
39
- btn.disabled = true;
40
- if (onKeepApply) onKeepApply();
41
- const out = await postEvents(ws, [{ ev: 'kept', initiative, batch: batch.by, items: batch.items }]);
42
- if (!out || out.ok === false) { toast({ text: (out && out.error) || 'nothing was saved', tone: 'error' }); btn.disabled = false; }
43
- else toast({ text: COPY.kept(n) });
44
- if (onChanged) onChanged({ kept: true, ok: !!(out && out.ok !== false) });
45
- };
46
- const doWithdrawAll = () => {
47
- hold({
48
- key, ws, text: COPY.withdrewN(n),
49
- events: (batch.items || []).map((id) => ({ ev: 'withdrawn', item: id })),
50
- apply: onHoldApply || null,
51
- onDone: () => { if (onChanged) onChanged({ withdrawn: true }); },
52
- onUndo: () => { if (onChanged) onChanged({ undone: true }); },
53
- });
54
- if (onChanged) onChanged({ held: true });
55
- };
56
- const attrs = { 'data-bd-keep-card': place, 'data-batch': batch.by, 'data-initiative': initiative, 'data-count': String(n) };
57
- if (place === 'today') {
58
- // R12: a Today card has ONE button. Keep is it; Withdraw all is in the ⋯ menu and is said on the card.
59
- return todayCard({
60
- kind: 5, id: cardId || key, repo, ws, initiative, cause: (initiativeTitle || initiative) + ' · ' + COPY.keepToday(n, batch.byLabel),
61
- evidence: TODAY.keepHint, act: { label: COPY.keep }, actAttrs: { 'data-bd-keep': '' },
62
- menuExtra: [{ label: TODAY.withdrawAll, onSelect: doWithdrawAll }], attrs: { ...attrs, 'data-today-row': 'keep' },
63
- onAct: (e) => doKeep(e.currentTarget),
64
- });
65
- }
66
- const keep = button({ label: COPY.keep, variant: 'outline', size: 'sm', attrs: { 'data-bd-keep': '' }, onClick: () => doKeep(keep) });
67
- const withdrawAll = button({ label: COPY.withdrawAll, variant: 'ghost', size: 'sm', attrs: { 'data-bd-withdraw-all': '' }, onClick: doWithdrawAll });
68
- const text = [el('span', null, COPY.keepTree(n, dayOf(batch.firstAt || batch.lastAt), batch.byLabel))];
69
- return el('div', { class: 'bd-keep', ...attrs }, el('div', { class: 'bd-keep__text' }, text), el('div', { class: 'bd-keep__actions' }, keep, withdrawAll));
70
- }
71
-
72
- /* ── Today ─────────────────────────────────────────────────────────────────────────────────────────────────────────── */
73
-
74
- const KINDS = ['keep', 'evidence', 'plan-flag'];
75
- const cache = new Map(); // ws -> { rows, loading, stale }
76
- let rerender = null;
77
- let hooked = false;
78
-
79
- function load(ws) {
80
- const c = cache.get(ws) || { rows: [], loading: false, stale: true };
81
- cache.set(ws, c);
82
- // A change that arrives while a read is in flight is not dropped: that read may have started before the change, so
83
- // it is read once more when the read ends.
84
- if (c.loading) { c.again = true; return; }
85
- c.loading = true; c.again = false;
86
- getNeeds(ws).then((out) => {
87
- c.loading = false; c.stale = false;
88
- c.rows = out && Array.isArray(out.needs) ? out.needs.filter((r) => r && KINDS.includes(r.kind) && r.run_id !== 'plan-items:unreadable') : [];
89
- if (c.again) load(ws);
90
- if (rerender) rerender(); else setState({});
91
- });
92
- }
93
-
94
- function hook() {
95
- if (hooked || typeof window === 'undefined') return;
96
- hooked = true;
97
- window.addEventListener('pmos:ledgers', (e) => {
98
- const changed = (e && e.detail && e.detail.changed) || [];
99
- let any = false;
100
- for (const ws of changed) { const c = cache.get(ws); if (c) { c.stale = true; any = true; load(ws); } }
101
- if (any && rerender) rerender();
102
- });
103
- }
104
-
105
- /**
106
- * Read the breakdown rows of every repository once, so the nav's Today count includes them before Today has rendered.
107
- * The nav calls it on each render. It starts a request only for a workspace that is not in the cache yet, and only after
108
- * the first sessions poll has answered (`state.sessions` is set), so the page's startup makes no extra request. After
109
- * that, a workspace is read again only on a `pmos:ledgers` change, as for Today. Fixture mode reads nothing.
110
- */
111
- export function primePlanNeeds(repos) {
112
- if (FIXTURE || !Array.isArray(state.sessions)) return;
113
- hook();
114
- for (const repo of repos || []) {
115
- const ws = wsOf(repo);
116
- if (ws && !cache.has(ws)) load(ws);
117
- }
118
- }
119
-
120
- /**
121
- * How many breakdown rows need the PM, over every workspace read so far (Keep batches not held for Undo, evidence and
122
- * check rows). The nav's Today count adds it, so the badge and Today's header count the same rows. Reads the cache that
123
- * primePlanNeeds() and Today fill; it fetches nothing itself. 0 in fixture mode.
124
- */
125
- function planCount(repos) {
126
- let n = 0;
127
- for (const repo of repos || []) {
128
- const ws = wsOf(repo);
129
- if (!ws) continue;
130
- primePlanNeeds([repo]);
131
- ensureFeed(ws);
132
- for (const row of (cache.get(ws) || { rows: [] }).rows) {
133
- if (row.kind === 'keep' && row.batch && isHeld(keepKey(ws, row.initiative_id, row.batch.by))) continue;
134
- n++;
135
- }
136
- }
137
- return n;
138
- }
139
-
140
- export function planNeedsCount() {
141
- let n = 0;
142
- for (const [ws, c] of cache) {
143
- for (const row of c.rows || []) {
144
- if (row.kind === 'keep' && row.batch && isHeld(keepKey(ws, row.initiative_id, row.batch.by))) continue;
145
- n++;
146
- }
147
- }
148
- return n;
149
- }
150
-
151
- /**
152
- * The breakdown cards for Today's needs-you column: Keep cards, then evidence and check cards, for the given
153
- * repositories. `open(repo, slug)` opens the initiative; `titleOf(slug)` names it; `onRender` is called when new rows
154
- * arrive. Reads /api/needs once per workspace and again when that workspace's ledger changes. Fixture mode reads nothing.
155
- * Every card is a Today card (today-cards.js): a cause, its evidence, one button and the ⋯ menu, with the id the server
156
- * ranks by (`<ws>|<run id>`).
157
- */
158
- export function planNeedsCards({ repos, fixture, onRender, open, titleOf }) {
159
- if (fixture) return [];
160
- rerender = onRender || rerender;
161
- hook();
162
- const out = [];
163
- for (const repo of repos || []) {
164
- const ws = wsOf(repo);
165
- if (!ws) continue;
166
- ensureFeed(ws);
167
- const c = cache.get(ws);
168
- if (!c || (c.stale && !c.loading)) load(ws);
169
- for (const row of (c && c.rows) || []) {
170
- const slug = row.initiative_id;
171
- const cardId = ws + '|' + row.run_id;
172
- if (row.kind === 'keep' && row.batch) {
173
- if (isHeld(keepKey(ws, slug, row.batch.by))) continue;
174
- out.push(keepCard({
175
- ws, repo, cardId, initiative: slug, initiativeTitle: titleOf ? titleOf(slug) : slug, batch: row.batch, place: 'today',
176
- onChanged: () => { const cc = cache.get(ws); if (cc) { cc.stale = true; load(ws); } if (rerender) rerender(); },
177
- }));
178
- } else {
179
- const evidence = row.kind === 'evidence';
180
- out.push(todayCard({
181
- kind: evidence ? 4 : 8, id: cardId, repo, ws, initiative: slug, cause: row.question,
182
- evidence: [titleOf ? titleOf(slug) : slug, evidence ? COPY.needs.evidence : COPY.needs.flag, COPY.derived].filter(Boolean).join(' · '),
183
- act: { label: COPY.needs.open }, onAct: () => { if (open) open(repo, slug); },
184
- attrs: { 'data-bd-need': row.kind, 'data-item': row.item || null, 'data-today-row': row.kind },
185
- }));
186
- }
187
- }
188
- }
189
- if (out.length) ensureComponentsCss();
190
- return out;
191
- }
192
-
193
- /* The Today source: the breakdown's rows as cards of kinds 4, 5 and 8, counted once with every other source. */
194
- if (!FIXTURE) {
195
- onFeed((ws) => { const c = cache.get(ws); if (c) { c.stale = true; load(ws); } });
196
- registerTodaySource({
197
- id: 'plan-rows', kind: null, rank: 30,
198
- count: (ctx) => planCount(ctx.repos),
199
- cards: (ctx) => planNeedsCards({
200
- repos: ctx.repos, fixture: false, onRender: () => (ctx.setState ? ctx.setState({}) : setState({})),
201
- open: (r, slug) => (ctx.open ? ctx.open(r, slug) : null), titleOf: (slug) => (records()[slug] && records()[slug].tag) || slug,
202
- }),
203
- });
204
- }
@@ -1,246 +0,0 @@
1
- /* pm/lifecycle-lens-model.js — the pure half of the Lifecycle lens (console3 wave B1). No DOM, so node can import it.
2
- *
3
- * Stage is DERIVED, never set. The lens reads each initiative's `nine_stages` (scripts/nine-stages.js: one of
4
- * done | current | pending | no-signal | skipped per stage). The roadmap payload does not carry `nine_stages` yet, so
5
- * `nineOf` falls back to a small MIRROR of scripts/nine-stages.js (STAGES, LANE_STAGES, SIGNALLED and the status rule),
6
- * fed by the rung the row's `stage.id` names. The mirror is approximate: the row's stage is the plan-tree group, not the
7
- * engine's raw rung, so an accepted initiative cannot be told apart from one in Evaluate. When the server sends
8
- * `nine_stages`, that wins and the mirror is not used.
9
- */
10
-
11
- // Six stages and two milestones (premium-agreed-design L1): Ideate folded into Discover, Strategize into Prioritize.
12
- export const STAGES = ['triage', 'discover', 'plan', 'prioritize', 'build', 'deliver', 'monitor', 'evaluate'];
13
- export const LABELS = { triage: 'Triage', discover: 'Discover', plan: 'Plan', prioritize: 'Prioritize', build: 'Build', deliver: 'Deliver', monitor: 'Monitor', evaluate: 'Evaluate' };
14
- /** Deliver and Evaluate are milestones (a diamond), not stages with duration. */
15
- export const MILESTONES = new Set(['deliver', 'evaluate']);
16
- /** A removed stage key read from anywhere (a stored payload, a URL) maps to its new key. Read-time only. */
17
- const LEGACY = { ideate: 'discover', strategize: 'prioritize' };
18
- export const stageKey = (k) => (k == null ? k : LEGACY[k] || k);
19
- // Mirror of scripts/nine-stages.js LANE_STAGES and SIGNALLED.
20
- const LANE_STAGES = {
21
- feature: STAGES,
22
- discovery: ['triage', 'discover', 'prioritize', 'evaluate'],
23
- chore: ['plan', 'build', 'deliver', 'evaluate'],
24
- incident: ['build', 'deliver', 'monitor', 'evaluate'],
25
- content: ['discover', 'plan', 'build', 'deliver'],
26
- prototype: ['triage', 'discover', 'evaluate'],
27
- };
28
- const SIGNALLED = new Set(['triage', 'discover', 'plan', 'build', 'evaluate']);
29
- // The plan-tree group id of a row's stage, as an engine rung rank (nine-stages.js RANK). Unknown groups read intake.
30
- const GROUP_RANK = { intake: 0, spec: 1, brief: 1, draft: 1, contract: 2, build: 3, evaluate: 4, handoff: 4 };
31
-
32
- /** The stage statuses of one row: its own `nine_stages` when the server sent them (an old payload's removed keys mapped, a repeated key
33
- * kept once), else the mirror. */
34
- export function nineOf(row) {
35
- if (row && Array.isArray(row.nine_stages) && row.nine_stages.length) {
36
- const seen = new Set(); const out = [];
37
- for (const s of row.nine_stages) {
38
- const key = stageKey(s && s.key);
39
- if (!key || seen.has(key)) continue;
40
- seen.add(key);
41
- out.push(key === (s && s.key) ? s : { ...s, key, label: LABELS[key] || s.label });
42
- }
43
- return out;
44
- }
45
- const lane = row && row.lane;
46
- const laneSet = new Set(LANE_STAGES[lane] || STAGES);
47
- const gid = row && row.stage && row.stage.id;
48
- const rank = GROUP_RANK[gid] ?? 0;
49
- const done = { triage: rank >= 1, discover: rank >= 1, plan: rank >= 2, build: rank >= 3, evaluate: rank >= 4 };
50
- let cur = false;
51
- return STAGES.map((key) => {
52
- let status;
53
- if (!laneSet.has(key)) status = 'skipped';
54
- else if (!SIGNALLED.has(key)) status = 'no-signal';
55
- else if (done[key]) status = 'done';
56
- else status = 'pending';
57
- if (status === 'pending' && !cur) { status = 'current'; cur = true; }
58
- return MILESTONES.has(key) ? { key, label: LABELS[key], status, milestone: true } : { key, label: LABELS[key], status };
59
- });
60
- }
61
-
62
- /** The stage an initiative sits in: the first `current`; else the last `done`; else null (nothing shows a stage yet). */
63
- export function stageBucket(nine) {
64
- const list = Array.isArray(nine) ? nine : [];
65
- const cur = list.find((s) => s.status === 'current');
66
- if (cur) return cur.key;
67
- let last = null;
68
- for (const s of list) if (s.status === 'done') last = s.key;
69
- return last;
70
- }
71
-
72
- /** Group rows by stage: { buckets: { discover: [row…], … }, unplaced: [row…] }. `scope` is an initiative id or null for all. */
73
- export function bucketRows(rows, scope) {
74
- const buckets = Object.fromEntries(STAGES.map((k) => [k, []]));
75
- const unplaced = [];
76
- for (const r of rows || []) {
77
- if (scope && r.id !== scope) continue;
78
- const k = stageBucket(nineOf(r));
79
- if (k && buckets[k]) buckets[k].push(r); else unplaced.push(r);
80
- }
81
- return { buckets, unplaced };
82
- }
83
-
84
- /** How one stage reads across the scoped rows: 'no-signal' when every row that uses it has no signal, 'skipped' when every row skips it. */
85
- export function stageNote(key, rows, scope) {
86
- const sts = (rows || []).filter((r) => !scope || r.id === scope).map((r) => (nineOf(r).find((s) => s.key === key) || {}).status);
87
- if (!sts.length) return null;
88
- if (sts.every((s) => s === 'skipped')) return 'skipped';
89
- if (sts.every((s) => s === 'skipped' || s === 'no-signal')) return 'no-signal';
90
- return null;
91
- }
92
-
93
- /* ── what each stage needs (console3.html C3.REQ, line 4687): the requirement rows of the lens, each with who does it ── */
94
- // Eight steps (premium-agreed-design L1). Ideate's options moved to Discover; Strategize's bet moved to Prioritize; the Commit gate is in Plan
95
- // (it pushes the tickets to Jira). Engineers build outside PMOS: Build reads the Jira tickets, never a PMOS builder.
96
- export const REQ = {
97
- triage: [['brief', 'BRD: the problem, who has it, the anchor', 'agent'], ['cont', 'Take it on or park it', 'pm']],
98
- discover: [['evidence', 'Evidence from 3 or more sources', 'agent'], ['opts', 'Two or more options, one recommended', 'agent'], ['prd', 'PRD with done criteria', 'agent']],
99
- plan: [['rub', 'Rubric and pre-run contract', 'agent'], ['plan', 'Scope, timeline and work breakdown reviewed', 'pm'], ['commit', 'Commit: the tickets go to Jira', 'pm']],
100
- prioritize: [['bet', 'Bet statement tied to the anchor', 'agent'], ['rank', 'Ranked on the roadmap', 'pm']],
101
- build: [['tix', 'Features delivered: the Jira tickets are done', 'jira'], ['rev', 'Review against the rubric', 'agent']],
102
- deliver: [['rel', 'Release shipped, your sign-off', 'pm']],
103
- monitor: [['out', 'Outcome report after 2 weeks', 'agent']],
104
- evaluate: [['verd', 'Verdict: keep, iterate or stop', 'pm']],
105
- };
106
- /** Who does a requirement: [icon, word]. Build work is the engineers', tracked in Jira. */
107
- export const reqWho = (w) => (w === 'pm' ? ['user', 'you'] : w === 'jira' || w === 'factory' ? ['branch', 'engineers (Jira)'] : ['spark', 'agent']);
108
- /** The agent's or factory's requirements of the same stage that are not done yet: a PM decision waits for them (c3prevPending). `isDone(key)` says what is done. */
109
- export const prevPending = (stage, key, isDone) => (REQ[stage] || []).filter((r) => r[2] !== 'pm' && r[0] !== key && !isDone(r[0]));
110
- /** What the agent is asked to draft, per requirement: [the offer, what it is]. */
111
- export const DRAFT_TEXT = {
112
- brief: ['Draft the BRD', 'A one-page business requirement with a stop rule'], evidence: ['Gather the evidence', 'Three or more sources, each cited'], opts: ['Draft the options', 'Two or more, one recommended, with the cost of each'],
113
- bet: ['Draft the bet statement', 'Tied to the anchor'], prd: ['Draft the PRD', 'Done criteria first'], rub: ['Draft the rubric and pre-run contract', 'The rubric is the spec; the contract is agreed before any build'],
114
- rev: ['Review the build against the rubric', 'Outcome only, weighted, against the threshold'], out: ['Run the outcome check', 'Two weeks after release, from the data'],
115
- };
116
- /** The PM's decision per requirement: [yes label, yes effect], [no label, no effect], the sentence. */
117
- export const DECIDE_TEXT = {
118
- cont: [['Take it on', 'It moves to Discover; the stop rule stays in force'], ['Park it, reason recorded', 'Frees the discovery slot'], 'The stop rule is the test. Read the BRD and decide: a close call is a reason to ask for more, not to guess.'],
119
- commit: [['Commit the plan', 'The tickets go to Jira'], ['Keep it in Plan', 'Nothing goes to Jira yet'], 'Commit pushes the work breakdown to Jira as tickets. Check scope and dates first.'],
120
- rank: [['Rank it on the roadmap', 'It takes its place in Now, Next or Later'], ['Keep it unranked', 'Waits for capacity'], 'Now has a limit. The least sure bet goes back if it fills.'],
121
- plan: [['Approve the plan', 'Breakdown, owners and dates are agreed'], ['Send the breakdown back', 'The agent revises it'], 'Check that every work item has an owner before you approve.'],
122
- rel: [['Sign off the release', 'The release is recorded as shipped by your slide'], ['Hold it', 'The date moves; promises are re-told'], 'Release needs its readiness checks and an outside change in Jira, which needs its own slide.'],
123
- verd: [['Record the verdict: iterate', 'The next bet is seeded from the lesson'], ['Record the verdict: stop', 'Frees the capacity'], 'Keep, iterate or stop is a human judgement; the agent only drafts the evidence.'],
124
- };
125
- /** The stages a lane uses, in order (the lane's own list). */
126
- export const laneStages = (lane) => LANE_STAGES[lane] || STAGES;
127
-
128
- /* ── the derived panels of the lens (console3 wave L1). Ports of scripts/trust/reader.js (the PM's sample), sections 11 to 16:
129
- * 11 PRIORITIZE score = impact x confidence / effort, capacity in bets
130
- * 12 DISCOVER hypothesis status from weighted evidence; evidence whose source is not a known file is untraced
131
- * 14 GATE LADDER the six gates in order, the next gate, order violations
132
- * 15 RUBRIC the weighted score against the threshold, the weakest dimension, the watermelon guard
133
- * 16 NORTH STAR corrections per agent run, lower is better
134
- * Pure: no DOM, no fetch. Real records feed them; nothing here invents a number. ── */
135
- const isNum = (v) => typeof v === 'number' && Number.isFinite(v);
136
-
137
- /** The score of an idea (reader.js section 11: impact x confidence / effort, two decimals). null when a figure is missing. */
138
- export function ideaScore(x) {
139
- if (!x || !isNum(x.imp) || !isNum(x.conf) || !isNum(x.eff) || x.eff <= 0) return null;
140
- return Math.round(x.imp * x.conf / x.eff * 100) / 100;
141
- }
142
- /** An ideas record (scripts/records: title, impact, effort, confidence; optional initiative, source, status, why) as the lens draws it. */
143
- export function normIdea(r) {
144
- const o = r || {};
145
- const st = ['new', 'short', 'committed', 'parked'].includes(o.status) ? o.status : o.status === 'shortlisted' ? 'short' : 'new';
146
- return { id: String(o.rid || o.id || ''), n: String(o.title || ''), init: String(o.initiative || ''), imp: Number(o.impact), eff: Number(o.effort), conf: Number(o.confidence),
147
- src: ['agent', 'customer', 'you'].includes(o.source) ? o.source : 'you', st, why: String(o.why || '') };
148
- }
149
- /** The ideas that are ranked: not parked, best score first (reader.js 11). */
150
- export const rankIdeas = (ideas) => (ideas || []).filter((x) => x.st !== 'parked' && ideaScore(x) != null).sort((a, b) => ideaScore(b) - ideaScore(a));
151
- /** Capacity: the effort the PM holds (shortlisted and committed) against the capacity figure. cap = null when none is recorded. */
152
- export function capacityUsed(ideas, cap) {
153
- const used = (ideas || []).filter((x) => x.st === 'short' || x.st === 'committed').reduce((a, x) => a + (isNum(x.eff) ? x.eff : 0), 0);
154
- return { used, cap: isNum(cap) ? cap : null, over: isNum(cap) ? Math.max(0, used - cap) : null };
155
- }
156
-
157
- /** A hypotheses record as the lens draws it. `evidence` is [{ src, dir: 'supports'|'refutes', w }]. */
158
- export function normHyp(r) {
159
- const o = r || {};
160
- const ev = (Array.isArray(o.evidence) ? o.evidence : []).filter((e) => e && typeof e === 'object').map((e) => ({ src: String(e.src || ''), dir: e.dir === 'refutes' ? 'refutes' : 'supports', w: isNum(Number(e.w)) ? Number(e.w) : 1, at: e.at ? String(e.at) : '' }));
161
- return { id: String(o.rid || o.id || ''), t: String(o.title || ''), init: String(o.initiative || ''), falsifier: String(o.falsifier || ''), review_by: String(o.review_by || ''), ev };
162
- }
163
- /** The status of a hypothesis, as reader.js section 12 derives it: net = sum of the weights (supports plus, refutes minus); net >= 3 is supported,
164
- * net <= -2 is refuted, anything between is open. `known` is a Set (or object) of the sources that exist; a source outside it is untraced.
165
- * The reader has three statuses. The page splits "open" for display only, so the PM can tell an empty hypothesis from a contested one:
166
- * `shown` is untested (no evidence), mixed (evidence both ways), or open (one-sided but below the bar). `status` stays the reader's. */
167
- export function hypStatus(h, known) {
168
- const ev = (h && h.ev) || [];
169
- const net = ev.reduce((a, e) => a + (e.dir === 'supports' ? e.w : -e.w), 0);
170
- const status = net >= 3 ? 'supported' : net <= -2 ? 'refuted' : 'open';
171
- const has = known instanceof Set ? (s) => known.has(s) : known ? (s) => !!known[s] : () => false;
172
- const untraced = ev.filter((e) => !has(e.src)).map((e) => e.src || '(no source)');
173
- const sup = ev.filter((e) => e.dir === 'supports').length; const ref = ev.length - sup;
174
- const shown = status !== 'open' ? status : !ev.length ? 'untested' : sup && ref ? 'mixed' : 'open';
175
- return { status, shown, net, untraced, supports: sup, refutes: ref };
176
- }
177
- export const HYP_LABEL = { supported: 'Supported', refuted: 'Refuted', mixed: 'Mixed', untested: 'Untested', open: 'Open' };
178
-
179
- /** The six gates the mockup draws, and the engine step each reads (scripts/workflow-state.js steps; the rule text of each step is its `basis.rule`):
180
- * Spec = spec, Rubric = contract (done criteria and test method agreed, D13), Build = build, Quality = quality, Review = review, Acceptance = accept. */
181
- export const GATES = [['Spec', 'spec'], ['Rubric', 'contract'], ['Build', 'build'], ['Quality', 'quality'], ['Review', 'review'], ['Acceptance', 'accept']];
182
- const dayOf = (v) => { const m = /^(\d{4}-\d{2}-\d{2})/.exec(String(v || '')); return m ? m[1] : ''; };
183
- /** The gate ladder from one initiative's ladder row (the steps of `GET /api/console?name=ladder`). Each gate: { name, key, state, evidence, rule, date }.
184
- * state is done | next (the first gate not done, the one in progress) | open (not yet) | na (cut by the PM or not required) | unknown (the engine does not claim it, e.g. CI decides).
185
- * A violation is a gate done before an earlier gate that is not done (reader.js 14 `viol`): "Build before Rubric"; with first-seen dates, also a gate done on an earlier day than the gate before it. */
186
- export function gateLadder(row) {
187
- const steps = (row && Array.isArray(row.steps)) ? row.steps : [];
188
- const by = Object.fromEntries(steps.map((s) => [s.key, s]));
189
- let nextAt = -1;
190
- const gates = GATES.map(([name, key], i) => {
191
- const s = by[key] || null;
192
- let state = !s ? 'unknown' : s.status === 'done' ? 'done' : s.status === 'na' ? 'na' : s.status === 'unknown' ? 'unknown' : 'open';
193
- if (state === 'open' && nextAt < 0) { nextAt = i; state = 'next'; }
194
- return { name, key, state, evidence: s ? String(s.evidence || '') : 'the engine returned no step for this gate', rule: s && s.basis ? String(s.basis.rule || '') : '', date: s && s.basis ? dayOf(s.basis.first_seen) : '', blocking: !!(s && s.blocking) };
195
- });
196
- const viol = [];
197
- gates.forEach((g, i) => {
198
- if (g.state !== 'done') return;
199
- gates.slice(0, i).forEach((p) => {
200
- if (p.state === 'na' || p.state === 'unknown') return;
201
- if (p.state !== 'done') viol.push(g.name + ' before ' + p.name);
202
- else if (g.date && p.date && g.date < p.date) viol.push(g.name + ' before ' + p.name + ' (' + g.date + ' against ' + p.date + ')');
203
- });
204
- });
205
- const next = gates.find((g) => g.state === 'next') || null;
206
- return { gates, next, violations: viol, done: gates.filter((g) => g.state === 'done').length, counted: gates.filter((g) => g.state !== 'na').length, nextAction: row && row.next ? row.next : null, blockers: (row && row.blockers) || [], failures: (row && row.gate_failures) || [] };
207
- }
208
- /** The cells of the mockup's `.gt` bar: 'd' done, 'h' next (half), '' open, 'na', 'u' (unknown). */
209
- export const gateCell = (g) => (g.state === 'done' ? 'd' : g.state === 'next' ? 'h' : g.state === 'na' ? 'na' : g.state === 'unknown' ? 'u' : '');
210
-
211
- /** An evaluation row (planning/runs/evals.jsonl: score, threshold or pass_threshold, dimensions as { name: score }, verdict, evaluator_model) as the scorecard.
212
- * The recorded score is shown as recorded. A weight is used only when a row carries one (`dims` as [{ dim, w, score }], the sample's form); otherwise the
213
- * dimensions are unweighted and the page says so. Dimensions that are not numbers are dropped. */
214
- export function normEval(e) {
215
- if (!e || typeof e !== 'object') return null;
216
- let dims = [];
217
- if (Array.isArray(e.dims)) dims = e.dims.filter((d) => d && isNum(d.score)).map((d) => ({ name: String(d.dim || d.name || ''), w: isNum(d.w) ? d.w : null, score: d.score }));
218
- else if (e.dimensions && typeof e.dimensions === 'object') dims = Object.entries(e.dimensions).filter(([, v]) => isNum(v)).map(([k, v]) => ({ name: k, w: null, score: v }));
219
- const weighted = dims.length && dims.every((d) => d.w != null);
220
- const computed = weighted ? dims.reduce((a, d) => a + d.w * d.score, 0) : dims.length ? dims.reduce((a, d) => a + d.score, 0) / dims.length : null;
221
- const score = isNum(e.score) ? e.score : computed;
222
- const thr = isNum(e.threshold) ? e.threshold : isNum(e.pass_threshold) ? e.pass_threshold : null;
223
- return { score, threshold: thr, dims, weighted: !!weighted, verdict: String(e.verdict || ''), model: String(e.evaluator_model || ''), at: String(e.recorded_at || e.at || ''), run: String(e.run_id || e.run || '') };
224
- }
225
- /** The verdict of a scorecard: passes (score at or over the threshold), the weakest dimension, and the watermelon guard (reader.js 15: a pass while a dimension scores under 0.6). */
226
- export function evalVerdict(ev) {
227
- if (!ev || ev.score == null) return null;
228
- const weakest = ev.dims.slice().sort((a, b) => a.score - b.score)[0] || null;
229
- const passes = ev.threshold != null ? ev.score >= ev.threshold : null;
230
- const watermelon = !!(passes && weakest && weakest.score < 0.6);
231
- return { passes, weakest, watermelon, below: ev.threshold != null && !passes };
232
- }
233
- /** The newest evaluation per initiative from a list of rows (recorded_at, then file order). */
234
- export function latestEvals(rows) {
235
- const out = {};
236
- (rows || []).forEach((r, i) => { const id = r && r.initiative_id; if (!id) return; const at = String(r.recorded_at || r.at || ''); const p = out[id]; if (!p || at >= p.at) out[id] = { at, i, row: r }; });
237
- return Object.fromEntries(Object.entries(out).map(([k, v]) => [k, v.row]));
238
- }
239
- /** Corrections per run (reader.js 16, lower is better), two decimals, for each bucket and the change from the first to the last. */
240
- export function correctionRate(series) {
241
- const s = (series || []).filter((x) => x && x.runs > 0);
242
- if (!s.length) return null;
243
- const rate = (x) => Math.round(x.corrections / x.runs * 100) / 100;
244
- const vals = s.map(rate);
245
- return { now: vals[vals.length - 1], from: vals[0], vals, improved: vals[vals.length - 1] < vals[0] };
246
- }