create-pmos 0.399.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 (421) hide show
  1. package/package.json +18 -13
  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 +2 -2
  7. package/workspace/briefing-premium-board-test.js +2 -2
  8. package/workspace/briefing-premium-doc-edit-test.js +2 -8
  9. package/workspace/briefing-premium-test.js +3 -2
  10. package/workspace/briefing-premium-work-test.js +9 -4
  11. package/workspace/c3-capture-test.js +0 -17
  12. package/workspace/changelog.json +17 -0
  13. package/workspace/guide/briefing-premium.md +2 -2
  14. package/workspace/guide/home.md +20 -2
  15. package/workspace/guide/layout.md +2 -2
  16. package/workspace/guide/notes.md +2 -2
  17. package/workspace/guide/phone-companion.md +1 -1
  18. package/workspace/lib/route-modules.js +1 -9
  19. package/workspace/lib/routes-phone-day.js +18 -9
  20. package/workspace/lib/routes-slash.js +95 -0
  21. package/workspace/package-lock.json +2 -2
  22. package/workspace/package.json +1 -2
  23. package/workspace/premium-chat-goal-view-test.js +1 -1
  24. package/workspace/premium-chat-term-test.js +0 -10
  25. package/workspace/premium-menu-rows-test.js +1 -1
  26. package/workspace/premium-phone-card-test.js +2 -2
  27. package/workspace/premium-vw-doc-test.js +1 -8
  28. package/workspace/premium-work-depth-test.js +2 -3
  29. package/workspace/public/capture.html +23 -0
  30. package/workspace/public/pm/c3-base.js +47 -0
  31. package/workspace/public/pm/c3-capture.js +1 -1
  32. package/workspace/public/pm/c3-ini-ui.js +1 -1
  33. package/workspace/public/pm/c3-sheet.js +1 -1
  34. package/workspace/public/pm/c3-toast.js +1 -1
  35. package/workspace/public/pm/console3.css +3 -0
  36. package/workspace/public/pm/cozy-home.css +20 -5
  37. package/workspace/public/pm/cozy-today.css +5 -2
  38. package/workspace/public/pm/cozy-viewer.js +4 -2
  39. package/workspace/public/pm/cozy.css +9 -0
  40. package/workspace/public/pm/goal-chat.js +5 -1
  41. package/workspace/public/pm/home-app.js +47 -26
  42. package/workspace/public/pm/home-chat.js +10 -4
  43. package/workspace/public/pm/home-data.js +3 -1
  44. package/workspace/public/pm/home-dictate.js +7 -4
  45. package/workspace/public/pm/home-ini.js +12 -2
  46. package/workspace/public/pm/home-list.js +20 -7
  47. package/workspace/public/pm/home-more.js +2 -2
  48. package/workspace/public/pm/home-phone-card.js +9 -4
  49. package/workspace/public/pm/home-review.js +2 -3
  50. package/workspace/public/pm/home-today.js +10 -6
  51. package/workspace/public/pm/home-work.js +15 -8
  52. package/workspace/public/pm/note-dock.js +1 -2
  53. package/workspace/public/pm/notes-links.js +1 -2
  54. package/workspace/public/pm/notes-task.js +3 -4
  55. package/workspace/public/pm/premium-board.js +1 -1
  56. package/workspace/public/pm/premium-initiative-head.js +3 -3
  57. package/workspace/public/pm/premium-vw-doc.css +20 -2
  58. package/workspace/public/pm/premium-vw-doc.js +22 -7
  59. package/workspace/public/pm/view-notes.js +2 -2
  60. package/workspace/replaced-tests.json +435 -0
  61. package/workspace/run-tests.js +323 -28
  62. package/workspace/server.js +15 -10
  63. package/workspace/test-files.json +3 -140
  64. package/workspace/test-lists/base.json +1 -2
  65. package/workspace/test-lists/c3-desktop-light-load.json +1 -2
  66. package/workspace/test-lists/c3-initiative-boards.json +1 -2
  67. package/workspace/test-lists/c3-meeting-focus.json +2 -12
  68. package/workspace/test-lists/c3-work-agent.json +1 -2
  69. package/workspace/test-lists/calendar-tidy-up.json +1 -2
  70. package/workspace/test-lists/console3-reports.json +1 -2
  71. package/workspace/test-lists/docs-three-way-sync.json +1 -2
  72. package/workspace/test-lists/extension-capture.json +5 -0
  73. package/workspace/test-lists/jira-wbs.json +1 -2
  74. package/workspace/test-lists/legacy-cleanup-a.json +9 -0
  75. package/workspace/test-lists/meeting-material.json +1 -2
  76. package/workspace/test-lists/meeting-notes.json +2 -36
  77. package/workspace/test-lists/meeting-replay.json +1 -2
  78. package/workspace/test-lists/mm-capture.json +2 -12
  79. package/workspace/test-lists/my-work.json +2 -10
  80. package/workspace/test-lists/onboarding-firstrun.json +2 -12
  81. package/workspace/test-lists/people-directory.json +1 -2
  82. package/workspace/test-lists/run2-a.json +1 -2
  83. package/workspace/test-lists/run2-d.json +2 -19
  84. package/workspace/test-lists/run3-b.json +1 -2
  85. package/workspace/test-lists/run3-c.json +2 -12
  86. package/workspace/test-lists/run4-b.json +1 -2
  87. package/workspace/test-lists/run4-d.json +1 -5
  88. package/workspace/test-lists/run5-c.json +1 -11
  89. package/workspace/test-lists/run6.json +1 -5
  90. package/workspace/test-lists/workspace-launch-flags.json +2 -12
  91. package/workspace/test-lists/workspace-profile-detection.json +2 -10
  92. package/workspace/test-timings.json +242 -123
  93. package/workspace/c3-briefing-test.js +0 -136
  94. package/workspace/c3-core-docs-test.js +0 -170
  95. package/workspace/c3-driver-fixture.js +0 -64
  96. package/workspace/c3-driver-test.js +0 -169
  97. package/workspace/c3-foundation-test.js +0 -163
  98. package/workspace/c3-ib-items-test.js +0 -114
  99. package/workspace/c3-ib-more-test.js +0 -146
  100. package/workspace/c3-ib-triage-backlog-test.js +0 -128
  101. package/workspace/c3-ini-harness.js +0 -66
  102. package/workspace/c3-ini-life-test.js +0 -167
  103. package/workspace/c3-initiatives-test.js +0 -186
  104. package/workspace/c3-light-load-test.js +0 -112
  105. package/workspace/c3-one-home-test.js +0 -149
  106. package/workspace/c3-phone-test.js +0 -289
  107. package/workspace/c3-quiet-test.js +0 -157
  108. package/workspace/c3-report-design-real-test.js +0 -264
  109. package/workspace/c3-report-design-test.js +0 -442
  110. package/workspace/c3-report-setup-test.js +0 -192
  111. package/workspace/c3-report-structure-real-test.js +0 -248
  112. package/workspace/c3-report-structure-test.js +0 -397
  113. package/workspace/c3-reports-test.js +0 -288
  114. package/workspace/c3-scan-test.js +0 -517
  115. package/workspace/c3-sessions-panel-test.js +0 -365
  116. package/workspace/c3-settings-test.js +0 -204
  117. package/workspace/c3-updates-test.js +0 -131
  118. package/workspace/c3-work-test.js +0 -260
  119. package/workspace/cut-stub.js +0 -40
  120. package/workspace/first-paint-audit.js +0 -160
  121. package/workspace/lib/c3-full-console.js +0 -15
  122. package/workspace/lib/engine/derived/trust.js +0 -3
  123. package/workspace/lib/engine/plan-forecast.js +0 -342
  124. package/workspace/lib/engine/report-families.js +0 -175
  125. package/workspace/lib/engine/truth-table.js +0 -57
  126. package/workspace/lib/routes-c3-init.js +0 -54
  127. package/workspace/lib/routes-c3-life.js +0 -120
  128. package/workspace/lib/routes-c3-timeline.js +0 -192
  129. package/workspace/lib/routes-forecast.js +0 -86
  130. package/workspace/lib/routes-releases.js +0 -130
  131. package/workspace/lib/routes-report-facts.js +0 -85
  132. package/workspace/lib/routes-report-families.js +0 -33
  133. package/workspace/lib/routes-signals.js +0 -51
  134. package/workspace/lib/routes-timeline.js +0 -197
  135. package/workspace/public/c3.html +0 -35
  136. package/workspace/public/index.html +0 -156
  137. package/workspace/public/pm/app.js +0 -831
  138. package/workspace/public/pm/bd-board.js +0 -159
  139. package/workspace/public/pm/bd-drag.js +0 -59
  140. package/workspace/public/pm/bd-model.js +0 -152
  141. package/workspace/public/pm/bd-timeline.js +0 -233
  142. package/workspace/public/pm/bd-tree.js +0 -244
  143. package/workspace/public/pm/board-copy.js +0 -59
  144. package/workspace/public/pm/board-read.js +0 -38
  145. package/workspace/public/pm/branches-sheet.js +0 -56
  146. package/workspace/public/pm/breakdown-api.js +0 -58
  147. package/workspace/public/pm/breakdown-copy.js +0 -138
  148. package/workspace/public/pm/briefing-deck.js +0 -441
  149. package/workspace/public/pm/briefing-model.js +0 -251
  150. package/workspace/public/pm/c3-ambient.js +0 -100
  151. package/workspace/public/pm/c3-audience-link.js +0 -21
  152. package/workspace/public/pm/c3-audience.js +0 -46
  153. package/workspace/public/pm/c3-boot.js +0 -13
  154. package/workspace/public/pm/c3-breakdown.js +0 -240
  155. package/workspace/public/pm/c3-brief-data.js +0 -11
  156. package/workspace/public/pm/c3-brief-mentions.js +0 -137
  157. package/workspace/public/pm/c3-brief-needs.js +0 -288
  158. package/workspace/public/pm/c3-brief-pulse.js +0 -112
  159. package/workspace/public/pm/c3-brief-summary.js +0 -139
  160. package/workspace/public/pm/c3-brief-today.js +0 -79
  161. package/workspace/public/pm/c3-brief.js +0 -279
  162. package/workspace/public/pm/c3-cal-strategy.js +0 -529
  163. package/workspace/public/pm/c3-calendar.js +0 -965
  164. package/workspace/public/pm/c3-calpop.js +0 -111
  165. package/workspace/public/pm/c3-case.js +0 -196
  166. package/workspace/public/pm/c3-core-docs.css +0 -18
  167. package/workspace/public/pm/c3-core-docs.js +0 -236
  168. package/workspace/public/pm/c3-daypart.js +0 -176
  169. package/workspace/public/pm/c3-demo-boards.js +0 -764
  170. package/workspace/public/pm/c3-demo-brief-ix.js +0 -350
  171. package/workspace/public/pm/c3-demo-brief-page.js +0 -70
  172. package/workspace/public/pm/c3-demo-cal-ix.js +0 -74
  173. package/workspace/public/pm/c3-demo-cal2.js +0 -66
  174. package/workspace/public/pm/c3-demo-cal3.js +0 -173
  175. package/workspace/public/pm/c3-demo-cal4.js +0 -169
  176. package/workspace/public/pm/c3-demo-cal5.js +0 -52
  177. package/workspace/public/pm/c3-demo-coredocs.js +0 -221
  178. package/workspace/public/pm/c3-demo-data.js +0 -552
  179. package/workspace/public/pm/c3-demo-focus.js +0 -181
  180. package/workspace/public/pm/c3-demo-init.js +0 -430
  181. package/workspace/public/pm/c3-demo-life.js +0 -77
  182. package/workspace/public/pm/c3-demo-material.js +0 -58
  183. package/workspace/public/pm/c3-demo-misc2.js +0 -34
  184. package/workspace/public/pm/c3-demo-phone.js +0 -48
  185. package/workspace/public/pm/c3-demo-plan2.js +0 -30
  186. package/workspace/public/pm/c3-demo-rd.js +0 -432
  187. package/workspace/public/pm/c3-demo-rep-ix.js +0 -126
  188. package/workspace/public/pm/c3-demo-rep2.js +0 -130
  189. package/workspace/public/pm/c3-demo-rep3.js +0 -138
  190. package/workspace/public/pm/c3-demo-rs.js +0 -287
  191. package/workspace/public/pm/c3-demo-term.js +0 -153
  192. package/workspace/public/pm/c3-demo-time.js +0 -49
  193. package/workspace/public/pm/c3-demo-work-ix.js +0 -32
  194. package/workspace/public/pm/c3-demo.js +0 -131
  195. package/workspace/public/pm/c3-design-studio.js +0 -369
  196. package/workspace/public/pm/c3-doc-formats.js +0 -153
  197. package/workspace/public/pm/c3-doc-sheet.js +0 -1230
  198. package/workspace/public/pm/c3-dock.js +0 -206
  199. package/workspace/public/pm/c3-docs.js +0 -291
  200. package/workspace/public/pm/c3-driver-work.js +0 -110
  201. package/workspace/public/pm/c3-driver.css +0 -18
  202. package/workspace/public/pm/c3-driver.js +0 -298
  203. package/workspace/public/pm/c3-focus.css +0 -304
  204. package/workspace/public/pm/c3-focus.js +0 -983
  205. package/workspace/public/pm/c3-ib-docs.js +0 -92
  206. package/workspace/public/pm/c3-ib-initiatives.js +0 -201
  207. package/workspace/public/pm/c3-ib-items.js +0 -210
  208. package/workspace/public/pm/c3-ib-releases.js +0 -48
  209. package/workspace/public/pm/c3-ib-sprints.js +0 -201
  210. package/workspace/public/pm/c3-ib-triage.js +0 -177
  211. package/workspace/public/pm/c3-ii-tabs.js +0 -252
  212. package/workspace/public/pm/c3-ini-life.css +0 -34
  213. package/workspace/public/pm/c3-ini-life.js +0 -379
  214. package/workspace/public/pm/c3-ini-records.js +0 -197
  215. package/workspace/public/pm/c3-ini-timeline.js +0 -278
  216. package/workspace/public/pm/c3-ini-work.js +0 -139
  217. package/workspace/public/pm/c3-init-extras.js +0 -170
  218. package/workspace/public/pm/c3-initiatives.js +0 -852
  219. package/workspace/public/pm/c3-lifecycle-panels.js +0 -479
  220. package/workspace/public/pm/c3-look.js +0 -27
  221. package/workspace/public/pm/c3-material.css +0 -22
  222. package/workspace/public/pm/c3-material.js +0 -321
  223. package/workspace/public/pm/c3-md.js +0 -3
  224. package/workspace/public/pm/c3-misc-panels.js +0 -89
  225. package/workspace/public/pm/c3-new-session.js +0 -110
  226. package/workspace/public/pm/c3-notes.js +0 -751
  227. package/workspace/public/pm/c3-phone-boot.js +0 -47
  228. package/workspace/public/pm/c3-phone-detail.js +0 -97
  229. package/workspace/public/pm/c3-phone-model.js +0 -3
  230. package/workspace/public/pm/c3-phone.css +0 -66
  231. package/workspace/public/pm/c3-phone.js +0 -444
  232. package/workspace/public/pm/c3-plan-panels.js +0 -163
  233. package/workspace/public/pm/c3-plan.js +0 -193
  234. package/workspace/public/pm/c3-quiet.css +0 -113
  235. package/workspace/public/pm/c3-quiet.js +0 -177
  236. package/workspace/public/pm/c3-replay.css +0 -133
  237. package/workspace/public/pm/c3-replay.js +0 -429
  238. package/workspace/public/pm/c3-report-deck.css +0 -163
  239. package/workspace/public/pm/c3-report-deck.js +0 -598
  240. package/workspace/public/pm/c3-report-frame.css +0 -20
  241. package/workspace/public/pm/c3-report-print.css +0 -20
  242. package/workspace/public/pm/c3-report-setup.css +0 -67
  243. package/workspace/public/pm/c3-report-setup.js +0 -298
  244. package/workspace/public/pm/c3-report-store.js +0 -244
  245. package/workspace/public/pm/c3-report-structure.css +0 -44
  246. package/workspace/public/pm/c3-report-structure.js +0 -473
  247. package/workspace/public/pm/c3-reports.css +0 -68
  248. package/workspace/public/pm/c3-reports.js +0 -377
  249. package/workspace/public/pm/c3-roadmap.js +0 -249
  250. package/workspace/public/pm/c3-scan-api.js +0 -167
  251. package/workspace/public/pm/c3-scan-next.js +0 -248
  252. package/workspace/public/pm/c3-scan-setup.js +0 -313
  253. package/workspace/public/pm/c3-scan-words.js +0 -41
  254. package/workspace/public/pm/c3-scan.css +0 -74
  255. package/workspace/public/pm/c3-scan.js +0 -93
  256. package/workspace/public/pm/c3-session-chat.js +0 -103
  257. package/workspace/public/pm/c3-session-conv.js +0 -165
  258. package/workspace/public/pm/c3-session-term.js +0 -216
  259. package/workspace/public/pm/c3-settings.css +0 -85
  260. package/workspace/public/pm/c3-settings.js +0 -1045
  261. package/workspace/public/pm/c3-shell.js +0 -628
  262. package/workspace/public/pm/c3-signals.js +0 -196
  263. package/workspace/public/pm/c3-strategy-panels.js +0 -45
  264. package/workspace/public/pm/c3-swipe.js +0 -230
  265. package/workspace/public/pm/c3-terminal-data.js +0 -48
  266. package/workspace/public/pm/c3-terminal-edge.js +0 -91
  267. package/workspace/public/pm/c3-terminal-icons.js +0 -40
  268. package/workspace/public/pm/c3-terminal-results.js +0 -141
  269. package/workspace/public/pm/c3-terminal.js +0 -52
  270. package/workspace/public/pm/c3-tickets.js +0 -163
  271. package/workspace/public/pm/c3-timeline.js +0 -201
  272. package/workspace/public/pm/calendar-views.js +0 -1049
  273. package/workspace/public/pm/console3-lift.md +0 -220
  274. package/workspace/public/pm/cozy-home.js +0 -172
  275. package/workspace/public/pm/cozy-initiative.css +0 -138
  276. package/workspace/public/pm/cycle-review.js +0 -125
  277. package/workspace/public/pm/data.js +0 -1577
  278. package/workspace/public/pm/dest-board.js +0 -444
  279. package/workspace/public/pm/dest-docs.js +0 -530
  280. package/workspace/public/pm/dest-initiatives.js +0 -162
  281. package/workspace/public/pm/dest-mywork.js +0 -307
  282. package/workspace/public/pm/dest-notes.js +0 -537
  283. package/workspace/public/pm/dest-people.js +0 -449
  284. package/workspace/public/pm/dest-reports.js +0 -383
  285. package/workspace/public/pm/dest-settings.js +0 -601
  286. package/workspace/public/pm/dest-today.js +0 -267
  287. package/workspace/public/pm/display-word.js +0 -56
  288. package/workspace/public/pm/doc-editor.js +0 -473
  289. package/workspace/public/pm/doc-graph.js +0 -272
  290. package/workspace/public/pm/doc-health-panel.js +0 -110
  291. package/workspace/public/pm/doc-rail.js +0 -167
  292. package/workspace/public/pm/doc-remote.js +0 -180
  293. package/workspace/public/pm/dock-sessions.js +0 -472
  294. package/workspace/public/pm/dock.js +0 -216
  295. package/workspace/public/pm/fixture.js +0 -821
  296. package/workspace/public/pm/flag-picker.js +0 -104
  297. package/workspace/public/pm/frame-copy.js +0 -278
  298. package/workspace/public/pm/freshness-line.js +0 -149
  299. package/workspace/public/pm/handoff-box.js +0 -82
  300. package/workspace/public/pm/initiative-list.js +0 -235
  301. package/workspace/public/pm/initiative-sheet.js +0 -331
  302. package/workspace/public/pm/initiatives-api.js +0 -95
  303. package/workspace/public/pm/initiatives-copy.js +0 -287
  304. package/workspace/public/pm/initiatives-timeline-copy.js +0 -59
  305. package/workspace/public/pm/initiatives-timeline.js +0 -410
  306. package/workspace/public/pm/initiatives-ui.js +0 -291
  307. package/workspace/public/pm/item-sheet.js +0 -268
  308. package/workspace/public/pm/keep-card.js +0 -204
  309. package/workspace/public/pm/lifecycle-lens-model.js +0 -246
  310. package/workspace/public/pm/lifecycle-lens.js +0 -276
  311. package/workspace/public/pm/lifecycle.js +0 -111
  312. package/workspace/public/pm/mobile.css +0 -366
  313. package/workspace/public/pm/mobile.js +0 -581
  314. package/workspace/public/pm/modes-live.js +0 -453
  315. package/workspace/public/pm/modes.js +0 -147
  316. package/workspace/public/pm/my-work-card.js +0 -51
  317. package/workspace/public/pm/my-work-data.js +0 -36
  318. package/workspace/public/pm/new-initiative-sheet.js +0 -169
  319. package/workspace/public/pm/next-step-ui.js +0 -190
  320. package/workspace/public/pm/outbox-panel.js +0 -125
  321. package/workspace/public/pm/palette-copy.js +0 -55
  322. package/workspace/public/pm/palette.js +0 -343
  323. package/workspace/public/pm/panel-breakdown.js +0 -702
  324. package/workspace/public/pm/panel-cockpit.js +0 -425
  325. package/workspace/public/pm/panel-detail.js +0 -1513
  326. package/workspace/public/pm/panel-initiatives.js +0 -929
  327. package/workspace/public/pm/panel-newsess.js +0 -709
  328. package/workspace/public/pm/panel-repos.js +0 -741
  329. package/workspace/public/pm/panel-tabs.js +0 -1506
  330. package/workspace/public/pm/panel-trees.js +0 -204
  331. package/workspace/public/pm/people-link.js +0 -106
  332. package/workspace/public/pm/phone-deck.js +0 -167
  333. package/workspace/public/pm/pm-work-view.js +0 -1533
  334. package/workspace/public/pm/portfolio-report.js +0 -61
  335. package/workspace/public/pm/premium-acts.js +0 -280
  336. package/workspace/public/pm/premium-brief.js +0 -111
  337. package/workspace/public/pm/premium-chat.js +0 -22
  338. package/workspace/public/pm/premium-doc-sheet.js +0 -312
  339. package/workspace/public/pm/premium-initiative.js +0 -324
  340. package/workspace/public/pm/premium-insights.css +0 -228
  341. package/workspace/public/pm/premium-metric-tiles.js +0 -68
  342. package/workspace/public/pm/premium-report-brief.js +0 -132
  343. package/workspace/public/pm/premium-vw-rec.js +0 -67
  344. package/workspace/public/pm/premium-wide.css +0 -30
  345. package/workspace/public/pm/print.css +0 -44
  346. package/workspace/public/pm/provider-cards.js +0 -136
  347. package/workspace/public/pm/registry.js +0 -203
  348. package/workspace/public/pm/release-card.js +0 -110
  349. package/workspace/public/pm/releases-view.js +0 -248
  350. package/workspace/public/pm/report-families-view.js +0 -505
  351. package/workspace/public/pm/report-slides.js +0 -438
  352. package/workspace/public/pm/report-tab.js +0 -33
  353. package/workspace/public/pm/report-view.js +0 -337
  354. package/workspace/public/pm/reports-copy.js +0 -134
  355. package/workspace/public/pm/roadmap.js +0 -294
  356. package/workspace/public/pm/run-card.js +0 -260
  357. package/workspace/public/pm/sessions-panel.js +0 -219
  358. package/workspace/public/pm/sheet-jira.js +0 -353
  359. package/workspace/public/pm/shell-bell.js +0 -163
  360. package/workspace/public/pm/shell-model.js +0 -83
  361. package/workspace/public/pm/shell-phone.js +0 -124
  362. package/workspace/public/pm/shell-readaloud.js +0 -53
  363. package/workspace/public/pm/shell-recording.js +0 -274
  364. package/workspace/public/pm/shell-ticker.js +0 -90
  365. package/workspace/public/pm/sig-watch.js +0 -41
  366. package/workspace/public/pm/slide-confirm.js +0 -163
  367. package/workspace/public/pm/slides-copy.js +0 -52
  368. package/workspace/public/pm/status-banner.js +0 -95
  369. package/workspace/public/pm/tab-doc.js +0 -859
  370. package/workspace/public/pm/tab-gone.js +0 -21
  371. package/workspace/public/pm/tab-term.js +0 -1210
  372. package/workspace/public/pm/tab-web.js +0 -90
  373. package/workspace/public/pm/timeline-copy.js +0 -48
  374. package/workspace/public/pm/timeline-forecast-view.js +0 -164
  375. package/workspace/public/pm/today-agenda.js +0 -331
  376. package/workspace/public/pm/today-cards.js +0 -244
  377. package/workspace/public/pm/today-copy.js +0 -506
  378. package/workspace/public/pm/today-day.js +0 -1371
  379. package/workspace/public/pm/today-goals.js +0 -297
  380. package/workspace/public/pm/today-jobs.js +0 -84
  381. package/workspace/public/pm/today-mentions.js +0 -50
  382. package/workspace/public/pm/topbar.js +0 -202
  383. package/workspace/public/pm/triage-card.js +0 -60
  384. package/workspace/public/pm/undo-hold.js +0 -103
  385. package/workspace/public/pm/view-addrepo.js +0 -208
  386. package/workspace/public/pm/view-files.js +0 -197
  387. package/workspace/public/pm/view-livenotes.js +0 -399
  388. package/workspace/public/pm/view-today.js +0 -13
  389. package/workspace/public/pm/view-validate.js +0 -171
  390. package/workspace/public/pm/welcome.js +0 -391
  391. package/workspace/public/pm/work-place.js +0 -68
  392. package/workspace/public/pm/xlsx-read.js +0 -117
  393. package/workspace/public/welcome.html +0 -22
  394. package/workspace/test-lists/browser-suites-green.json +0 -5
  395. package/workspace/test-lists/c3-core-docs.json +0 -9
  396. package/workspace/test-lists/c3-doc-sheet-rich.json +0 -6
  397. package/workspace/test-lists/c3-doc-sheet-size.json +0 -6
  398. package/workspace/test-lists/c3-doc-sheet-v2.json +0 -6
  399. package/workspace/test-lists/c3-ib-items.json +0 -9
  400. package/workspace/test-lists/c3-ib-more.json +0 -9
  401. package/workspace/test-lists/c3-ib-triage-backlog.json +0 -9
  402. package/workspace/test-lists/c3-ini-life.json +0 -9
  403. package/workspace/test-lists/c3-meeting-board.json +0 -5
  404. package/workspace/test-lists/c3-meeting-card.json +0 -5
  405. package/workspace/test-lists/c3-notes-place.json +0 -5
  406. package/workspace/test-lists/c3-notes-series.json +0 -5
  407. package/workspace/test-lists/calendar-time-page.json +0 -5
  408. package/workspace/test-lists/calpop.json +0 -4
  409. package/workspace/test-lists/console3-briefing.json +0 -9
  410. package/workspace/test-lists/console3-foundation.json +0 -9
  411. package/workspace/test-lists/console3-work-page.json +0 -9
  412. package/workspace/test-lists/premium-brief-parity.json +0 -9
  413. package/workspace/test-lists/report-design-studio-ui.json +0 -5
  414. package/workspace/test-lists/report-structure-ui.json +0 -11
  415. package/workspace/test-lists/report-workspace-ui.json +0 -5
  416. package/workspace/test-lists/run3-a.json +0 -5
  417. package/workspace/test-lists/run3-d.json +0 -6
  418. package/workspace/test-lists/run4-c.json +0 -13
  419. package/workspace/test-lists/today-goals-jobs-ui.json +0 -5
  420. package/workspace/test-lists/today-mentions-cards.json +0 -5
  421. package/workspace/test-lists/workspace-tabs-declutter.json +0 -13
@@ -1,479 +0,0 @@
1
- /* pm/c3-lifecycle-panels.js — the panels the Lifecycle lens draws for each stage, as the console3 mockup draws them (console3.html: iniInfo 3577, iniLeft 3582, iniRight 3592,
2
- * ideaRow 3563, hypRow 3565, gateCard 3573, evMatrix 3572, scoreCard 3574, lessonsCard 3575, scatter 3455, hRubric 3487, c3needs 4713, the Build lens 4760 to 4768).
3
- *
4
- * lensPanels(V, lens, scope) -> { head: { icon, h, s, ring } | null, left: [nodes], after: [nodes], right: [nodes] }
5
- * left goes under the initiative's lifecycle line and above "What <stage> needs"; after goes below it (the Build lens); right is the second column.
6
- * ensureLife(V) starts the reads once and draws again when they land. V.life holds what came back.
7
- *
8
- * DATA, all real, all read-only until a PM press:
9
- * ideas, hypotheses, decisions GET /api/records/<kind> (scripts/records; add forms POST /api/records/<kind>/add through pmPost)
10
- * gates GET /api/console?name=ladder&id= (the engine's steps; one initiative per call, so only the ones shown are asked for)
11
- * evaluations, corrections GET /api/c3-life (workspace/lib/routes-c3-life.js)
12
- * calibration GET /api/console?name=radar (the evaluator's kappa against PM labels, D40)
13
- * capacity, work items, tickets GET /api/c3-init/roadmap, /api/c3-init/breakdown, /api/forecast
14
- * Where a record does not exist the panel says what is missing and how to add it. No number is invented: an idea with a missing figure has no score, a gate the engine does not
15
- * claim is drawn as unknown, a rubric with no recorded weights is unweighted. The maths is lifecycle-lens-model.js (ports of scripts/trust/reader.js 11 to 16).
16
- * The demo (/c3.html?demo=1) answers the same routes from c3-demo-life.js, in the same shapes. Built with el(); every string from data is a text node. */
17
- import { el } from './dom.js';
18
- import { pmGet, pmPost } from './http.js';
19
- import { c3ic } from './pm-work-view.js';
20
- import { openSheet } from './c3-sheet.js';
21
- import { renderCase } from './c3-case.js';
22
- import { card, hBars, rowShell, caseNode, markDone, say, short, dayLabel } from './c3-init-extras.js';
23
- import { progressCard } from './c3-plan-panels.js';
24
- import { releasePanels } from './releases-view.js';
25
- import { ideaScore, normIdea, rankIdeas, capacityUsed, normHyp, hypStatus, HYP_LABEL, GATES, gateLadder, gateCell, normEval, evalVerdict, correctionRate, nineOf, stageBucket } from './lifecycle-lens-model.js';
26
- import { startAgent, startedLine } from './page-agent.js';
27
-
28
- const isDemo = () => !!window.__c3demo;
29
- const SVGNS = 'http://www.w3.org/2000/svg';
30
- const sv = (tag, attrs, ...kids) => { const n = document.createElementNS(SVGNS, tag); for (const k of Object.keys(attrs || {})) if (attrs[k] != null) n.setAttribute(k, attrs[k]); for (const c of kids) if (c) n.appendChild(c); return n; };
31
- const svt = (x, y, t, a) => { const n = sv('text', { x, y, ...(a || {}) }); n.textContent = t; return n; };
32
- const ST_COLOR = { new: ['var(--acc)', 'new'], short: ['var(--acc)', 'shortlisted'], committed: ['var(--success)', 'committed'], parked: ['var(--muted-foreground)', 'parked'] };
33
- const HYP_COLOR = { supported: 'var(--success)', mixed: 'var(--warning)', untested: 'var(--ring)', refuted: 'var(--destructive)', open: 'var(--ring)' };
34
- const DIM = 'text-transform:none;letter-spacing:0';
35
- const pct = (n) => Math.round(n * 100);
36
-
37
- /* ── the reads ── */
38
- const rdOk = (r) => !!(r && r.ok);
39
- const nameOf = (V, id) => { const r = (V.ctx.rows || []).find((x) => x.id === id); return r ? r.title : id || ''; };
40
-
41
- /** Start the reads once. V.life: { state: 'idle'|'loading'|'ready', ideas, hyps, decisions, evals, corr, sources, calib, capacity, items, ladders, tickets, err }. */
42
- export function ensureLife(V) {
43
- const L = V.life || (V.life = { state: 'idle', st: {}, ladders: {}, tickets: {}, err: {} });
44
- if (L.state === 'idle') { L.state = 'loading'; load(V, L); }
45
- return L;
46
- }
47
- export function reloadLife(V) { if (V.life) V.life.state = 'idle'; if (!V.disposed) V.render(); }
48
-
49
- async function load(V, L) {
50
- const ws = V.ctx.ws ? '&ws=' + encodeURIComponent(V.ctx.ws) : '';
51
- const [ideas, hyps, decs, life, radar, rm, bd] = await Promise.all([
52
- pmGet('/api/records/ideas'), pmGet('/api/records/hypotheses'), pmGet('/api/records/decisions'), pmGet('/api/c3-life'),
53
- pmGet('/api/console?name=radar' + ws), pmGet('/api/c3-init/roadmap'), pmGet('/api/c3-init/breakdown'),
54
- ]);
55
- if (V.disposed) return;
56
- L.err = {};
57
- L.ideas = rdOk(ideas) ? (ideas.records || []).map(normIdea) : null; if (!rdOk(ideas)) L.err.ideas = (ideas && ideas.error) || 'The ideas could not be read.';
58
- L.hyps = rdOk(hyps) ? (hyps.records || []).map(normHyp) : null; if (!rdOk(hyps)) L.err.hyps = (hyps && hyps.error) || 'The hypotheses could not be read.';
59
- L.decisions = rdOk(decs) ? decs.records || [] : null;
60
- L.life = rdOk(life) ? life : null; if (!L.life) L.err.life = 'The evaluations and the corrections are not served by this server yet (GET /api/c3-life). Restart the workspace to load the route.';
61
- L.calib = rdOk(radar) && radar.data ? { ...(radar.data.calibration || {}), source: radar.source || '' } : null; if (L.calib && !radar.data.calibration) L.calib = { none: true, source: radar.source || '' };
62
- L.bets = rdOk(rm) ? rm.bets || [] : null;
63
- L.capacity = rdOk(rm) ? rm.capacity || null : null; L.people = rdOk(rm) ? rm.people || [] : [];
64
- L.items = rdOk(bd) ? bd.items || [] : null;
65
- L.state = 'ready';
66
- V.render();
67
- }
68
-
69
- /** One initiative's ladder (GET /api/console?name=ladder). Asked for once, only for the initiatives a panel shows. */
70
- function ensureLadder(V, id) {
71
- const L = V.life; const cur = L.ladders[id];
72
- if (cur) return cur;
73
- const ws = V.ctx.ws ? '&ws=' + encodeURIComponent(V.ctx.ws) : '';
74
- const slot = L.ladders[id] = { state: 'loading', row: null };
75
- pmGet('/api/console?name=ladder&id=' + encodeURIComponent(id) + ws).then((r) => {
76
- if (V.disposed) return;
77
- slot.state = rdOk(r) && !r.empty && r.row ? 'ready' : 'none'; slot.row = rdOk(r) && r.row ? r.row : null; slot.err = rdOk(r) ? '' : (r && r.error) || 'The ladder could not be read.';
78
- V.render();
79
- });
80
- return slot;
81
- }
82
- /** Jira-side tickets of one initiative (GET /api/forecast?initiative=): the Build lens. */
83
- function ensureTickets(V, id) {
84
- const L = V.life; if (L.tickets[id]) return L.tickets[id];
85
- const slot = L.tickets[id] = { state: 'loading', items: [] };
86
- pmGet('/api/forecast?initiative=' + encodeURIComponent(id)).then((r) => {
87
- if (V.disposed) return;
88
- slot.state = rdOk(r) ? 'ready' : 'none'; slot.items = rdOk(r) ? r.items || [] : []; slot.err = rdOk(r) ? '' : (r && r.error) || '';
89
- V.render();
90
- });
91
- return slot;
92
- }
93
-
94
- /* ── pieces ── */
95
- const inScope = (scope) => (x) => !scope || x.init === scope;
96
- const loading = (what) => el('li', { class: 'fold', 'data-life-loading': '' }, c3ic('clock', 'sm'), 'Reading ' + what + '…');
97
- const note = (icon, text, attr) => el('li', { class: 'fold', ...(attr || {}) }, c3ic(icon, 'sm'), text);
98
- const chip2 = (icon, text, color, title) => el('span', { class: 'chip2', style: color ? 'color:' + color : null, title: title || null }, icon ? c3ic(icon, 'sm') : null, text);
99
- const section = (icon, title, count, sub, rows, attrs) => el('section', { class: 'card sect', ...(attrs || {}) },
100
- el('div', { class: 'sh2' }, el('h2', null, c3ic(icon, 'sm'), title, count == null ? null : [' ', el('span', { class: 'bdg g' }, String(count))]), sub ? el('span', { class: 'dim', style: 'font-size:var(--fs-2)' }, sub) : null),
101
- el('ul', { class: 'list' }, rows));
102
-
103
- /** The mockup's hNum: a number, a delta line and the trend against a target. arr = the series, target = the line. */
104
- function numCard(big, unit, delta, tone, arr, target) {
105
- const W = 340; const H = 60; const all = target == null ? arr : arr.concat([target]); const mn = Math.min(...all); const mx = Math.max(...all);
106
- const X = (i) => 4 + i * (W - 8) / Math.max(1, arr.length - 1); const Y = (v) => H - 6 - (v - mn) / (mx - mn || 1) * (H - 26);
107
- const p = arr.map((v, i) => X(i) + ',' + Y(v)).join(' ');
108
- const s = sv('svg', { viewBox: `0 0 ${W} ${H}`, role: 'img', 'aria-label': 'Trend: ' + arr.join(', ') });
109
- if (target != null) s.append(sv('line', { x1: 4, x2: W - 4, y1: Y(target), y2: Y(target), stroke: 'var(--ring)', 'stroke-dasharray': '4 4' }), svt(W - 4, Y(target) - 4, 'target ' + target + unit, { 'text-anchor': 'end' }));
110
- s.append(sv('polygon', { points: `4,${H - 4} ${p} ${W - 4},${H - 4}`, fill: tone, 'fill-opacity': '.1' }), sv('polyline', { class: 'draw', pathLength: 1, points: p, fill: 'none', stroke: tone, 'stroke-width': 3, 'stroke-linecap': 'round', 'stroke-linejoin': 'round' }),
111
- sv('circle', { cx: X(arr.length - 1), cy: Y(arr[arr.length - 1]), r: 4.5, fill: tone, stroke: 'var(--card)', 'stroke-width': 2 }));
112
- return el('div', { class: 'hn' }, el('div', { class: 'a' }, el('b', null, big), el('span', null, unit)), el('div', { class: 'd', style: 'color:' + tone }, delta), s);
113
- }
114
-
115
- /** The mockup's hSegs: a row of coloured blocks with a value and a label. a = [[label, value, colour]]. */
116
- function segs(a, unit) {
117
- const W = 340; const H = 84; const tot = a.reduce((t, r) => t + r[1], 0) || 1; let x = 0;
118
- const s = sv('svg', { viewBox: `0 0 ${W} ${H}`, role: 'img', 'aria-label': a.map((r) => r[0] + ' ' + r[1]).join(', ') });
119
- a.forEach((r, i) => { const w = (W - (a.length - 1) * 4) * (r[1] / tot);
120
- s.append(sv('rect', { class: 'grow', style: 'animation-delay:' + (i * 90) + 'ms', x, y: 20, width: w, height: 30, rx: 9, fill: r[2], opacity: '.92' }), svt(x + w / 2, 39, r[1] + (unit || ''), { 'text-anchor': 'middle', style: 'fill:#fff;font-weight:500' }), svt(x + w / 2, 68, short(r[0], Math.max(5, Math.floor(w / 6.5))), { 'text-anchor': 'middle' }));
121
- x += w + 4; });
122
- s.append(svt(0, 12, 'total ' + tot + (unit || ''), {}));
123
- return s;
124
- }
125
-
126
- /** The mockup's scatter (line 3455): impact up, effort across, a bubble per idea sized by confidence. Pressing a dot opens that idea's row. */
127
- function scatter(V, list) {
128
- const W = 560; const H = 250; const x0 = 40; const x1 = W - 16; const y0 = 14; const y1 = H - 34;
129
- const X = (v) => x0 + (v - 1) / 9 * (x1 - x0); const Y = (v) => y1 - (v - 1) / 9 * (y1 - y0);
130
- const s = sv('svg', { class: 'sct', viewBox: `0 0 ${W} ${H}`, role: 'img', 'aria-label': 'Ideas by impact and effort' });
131
- s.append(sv('rect', { x: x0, y: y0, width: X(5.5) - x0, height: Y(5.5) - y0, fill: 'var(--success)', 'fill-opacity': '.08' }),
132
- svt(x0 + 6, y0 + 14, 'quick wins'), svt(x1 - 6, y0 + 14, 'big bets', { 'text-anchor': 'end' }), svt(x0 + 6, y1 - 8, 'fill-ins'), svt(x1 - 6, y1 - 8, 'money pits', { 'text-anchor': 'end' }),
133
- sv('line', { x1: X(5.5), x2: X(5.5), y1: y0, y2: y1, stroke: 'var(--border)' }), sv('line', { x1: x0, x2: x1, y1: Y(5.5), y2: Y(5.5), stroke: 'var(--border)' }),
134
- sv('line', { x1: x0, x2: x1, y1: y1, y2: y1, stroke: 'var(--ring)' }), sv('line', { x1: x0, x2: x0, y1: y0, y2: y1, stroke: 'var(--ring)' }),
135
- svt((x0 + x1) / 2, H - 8, 'effort, low to high', { 'text-anchor': 'middle' }), svt(12, (y0 + y1) / 2, 'impact', { transform: `rotate(-90 12 ${(y0 + y1) / 2})`, 'text-anchor': 'middle' }));
136
- list.filter((x) => ideaScore(x) != null).forEach((x, i) => {
137
- const c = x.st === 'parked' ? 'var(--ring)' : x.st === 'committed' ? 'var(--success)' : x.st === 'short' ? 'var(--acc)' : x.src === 'agent' ? 'var(--purple)' : 'var(--muted-foreground)';
138
- const t = sv('title'); t.textContent = x.n + ': impact ' + x.imp + ', effort ' + x.eff + ', confidence ' + pct(x.conf) + '%';
139
- const dot = sv('circle', { class: 'pop', style: 'animation-delay:' + (i * 50) + 'ms', cx: X(Math.min(10, Math.max(1, x.eff))), cy: Y(Math.min(10, Math.max(1, x.imp))), r: 7 + x.conf * 9, fill: c, 'fill-opacity': '.65', stroke: 'var(--card)', 'stroke-width': 2, 'data-idea-dot': x.id }, t); // a convenience as in the mockup, not a control: the idea's row is the control (44px, keys, swipe)
140
- const go = () => { V.open = V.open || {}; V.open['idea' + x.id] = true; V.render(); const row = V.root.querySelector('[data-idea="' + (window.CSS && CSS.escape ? CSS.escape(x.id) : x.id) + '"]'); if (row && row.scrollIntoView) row.scrollIntoView({ block: 'center' }); };
141
- dot.addEventListener('click', go);
142
- s.append(dot);
143
- });
144
- return el('div', null, s, el('div', { class: 'pgl' }, el('span', { style: 'color:var(--acc)' }, '● shortlisted'), el('span', { style: 'color:var(--success)' }, '● committed'), el('span', { style: 'color:var(--purple)' }, '● from the agent'), el('span', null, '● yours or customers\''), el('span', null, 'bubble size = confidence')));
145
- }
146
-
147
- /* ── writes: a record edit through pmPost, with the page's undo ── */
148
- async function patch(V, kind, rid, fields, why) {
149
- const r = await pmPost('/api/records/' + kind + '/edit', { rid, fields, why });
150
- return r && r.ok ? { ok: true } : { ok: false, error: (r && r.error) || 'Not recorded.' };
151
- }
152
- /** Set an idea's status. The page shows it at once (V.life.st); a real record is read again after the write; the demo keeps the local one. */
153
- async function setIdeaStatus(V, x, status, msg) {
154
- const L = V.life; const prev = L.st[x.id] || x.st;
155
- const r = await patch(V, 'ideas', x.id, { status }, 'Set from the lifecycle lens');
156
- if (!r.ok) { say(r.error); return false; }
157
- L.st[x.id] = status; if (!isDemo()) { x.st = status; }
158
- const undo = async () => { const u = await patch(V, 'ideas', x.id, { status: prev }, 'Undone from the lifecycle lens'); if (u.ok) { L.st[x.id] = prev; if (!isDemo()) x.st = prev; V.render(); } };
159
- say(msg, undo); V.render();
160
- return undo;
161
- }
162
- const withSt = (V, list) => list.map((x) => (V.life.st[x.id] ? { ...x, st: V.life.st[x.id] } : x));
163
-
164
- /* ── the add forms of the empty states: one record through pmPost ── */
165
- function field(label, input) { return el('label', null, label, input); }
166
- function addForm(V, kind, spec) {
167
- const open = !!(V.addOpen && V.addOpen[kind]);
168
- const err = el('div', { class: 'err', role: 'alert' });
169
- const inputs = {};
170
- const mk = (name, type, attrs) => { const i = el('input', { type, name, 'aria-label': name, ...(attrs || {}) }); inputs[name] = i; return i; };
171
- const rowsIni = (V.ctx.rows || []).slice(0, 12);
172
- const sel = el('select', { name: 'initiative', 'aria-label': 'initiative' }, el('option', { value: '' }, 'No initiative'), ...rowsIni.map((r) => el('option', { value: r.id }, short(r.title, 40))));
173
- const body = spec.fields(mk, field);
174
- const form = el('form', { class: 'lfm', 'data-life-form': kind, onSubmit: async (e) => {
175
- e.preventDefault(); err.textContent = '';
176
- const f = spec.collect(inputs); if (f.error) { err.textContent = f.error; return; }
177
- if (sel.value) f.fields.initiative = sel.value;
178
- const r = await pmPost('/api/records/' + kind + '/add', { fields: f.fields, why: 'Added from the lifecycle lens' });
179
- if (!r || !r.ok) { err.textContent = (r && r.error) || 'Not recorded.'; return; }
180
- say(isDemo() ? spec.done + ' (demo: nothing is saved)' : spec.done);
181
- if (isDemo()) { V.life[spec.key] = (V.life[spec.key] || []).concat([spec.local({ ...f.fields, rid: 'demo-' + Date.now() })]); V.addOpen[kind] = false; V.render(); } else { V.addOpen[kind] = false; reloadLife(V); }
182
- } }, ...body, field('Initiative', sel), err, el('button', { type: 'submit', class: 'pill', style: 'min-height:44px' }, spec.button));
183
- V.addOpen = V.addOpen || {};
184
- return el('li', { class: 'fold', 'data-life-add': kind, style: 'display:grid;gap:8px' },
185
- el('div', { style: 'display:flex;gap:8px;align-items:center;flex-wrap:wrap' }, c3ic('plus', 'sm'), el('button', { type: 'button', class: 'pill', style: 'min-height:44px', 'aria-expanded': String(open), 'data-life-add-btn': kind, onClick: () => { V.addOpen[kind] = !V.addOpen[kind]; V.render(); } }, spec.open), el('span', { class: 'dim', style: 'font-size:var(--fs-2)' }, spec.how)),
186
- open ? form : null);
187
- }
188
- const num = (v) => (v === '' || v == null ? NaN : Number(v));
189
- const IDEA_FORM = { key: 'ideas', open: 'Add an idea', button: 'Save the idea', done: 'Idea added.', how: 'Needs a title, impact, effort and confidence. It is written to planning/records/ideas.jsonl.', local: normIdea,
190
- fields: (mk, f) => [f('Title', mk('title', 'text', { required: '', placeholder: 'What would we do?' })), el('div', { class: 'row2' }, f('Impact (1 to 10)', mk('impact', 'number', { min: 1, max: 10, step: 'any', required: '' })), f('Effort (above 0)', mk('effort', 'number', { min: 0.1, step: 'any', required: '' })), f('Confidence (0 to 1)', mk('confidence', 'number', { min: 0, max: 1, step: 'any', required: '' })))],
191
- collect: (i) => { const t = i.title.value.trim(); const impact = num(i.impact.value); const effort = num(i.effort.value); const confidence = num(i.confidence.value);
192
- if (!t) return { error: 'A title is needed.' }; if (!Number.isFinite(impact) || !Number.isFinite(effort) || effort <= 0 || !Number.isFinite(confidence) || confidence < 0 || confidence > 1) return { error: 'Impact, effort (above 0) and confidence (0 to 1) must be numbers.' };
193
- return { fields: { title: t, impact, effort, confidence, status: 'new', source: 'you' } }; } };
194
- const HYP_FORM = { key: 'hyps', open: 'Add a hypothesis', button: 'Save the hypothesis', done: 'Hypothesis added.', how: 'Needs a statement, what would prove it wrong, and a review date. Evidence is added to the record as it comes in.', local: normHyp,
195
- fields: (mk, f) => [f('Statement', mk('title', 'text', { required: '' })), f('What result would prove it wrong?', mk('falsifier', 'text', { required: '' })), f('Review by', mk('review_by', 'date', { required: '' }))],
196
- collect: (i) => { const t = i.title.value.trim(); const fa = i.falsifier.value.trim(); const d = i.review_by.value;
197
- if (!t || !fa || !/^\d{4}-\d{2}-\d{2}$/.test(d)) return { error: 'A statement, a falsifier and a review date are needed.' };
198
- return { fields: { title: t, falsifier: fa, review_by: d, evidence: [] } }; } };
199
- const LESSON_FORM = { key: 'decisions', open: 'Add a lesson', button: 'Save the lesson', done: 'Lesson added.', how: 'Written to planning/records/decisions.jsonl as a decision with a lesson.', local: (f) => ({ ...f }),
200
- fields: (mk, f) => [f('What we learned', mk('lesson', 'text', { required: '' }))],
201
- collect: (i) => { const t = i.lesson.value.trim(); if (!t) return { error: 'Say what was learned.' }; return { fields: { case: 'Lesson', chose: 'recorded', why: t, lesson: t, tone: '' } }; } };
202
-
203
- /* ── DISCOVER: Hypotheses, the evidence matrix, Interviews ── */
204
- const dayName = (v) => { const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(v || '')); if (!m) return ''; const d = new Date(Date.UTC(+m[1], +m[2] - 1, +m[3])); return ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][d.getUTCDay()] + ' ' + (+m[3]); };
205
- const baseName = (s) => String(s || '').split('/').pop().replace(/\.[a-z]+$/i, '');
206
-
207
- function hypCase(V, h, hs) {
208
- const n = hs.supports; const tot = h.ev.length;
209
- const chg = [['notes', n + ' supporting source' + (n === 1 ? '' : 's') + (hs.refutes ? ', ' + hs.refutes + ' against' : ''), 'sources', n ? 'ok' : ''], ['target', 'Status: ' + HYP_LABEL[hs.shown], 'now'], ['alert', 'Falsifier: ' + (h.falsifier || 'none recorded'), 'falsifier', h.falsifier ? '' : 'bad']];
210
- if (hs.untraced.length) chg.push(['alert', 'Untraced: ' + hs.untraced.slice(0, 3).join(', ') + (hs.untraced.length > 3 ? ' and ' + (hs.untraced.length - 3) + ' more' : '') + '. These sources are not files in the repository.', 'untraced', 'warn']);
211
- if (h.review_by) chg.push(['clock', 'Review by ' + dayLabel(h.review_by), 'review']);
212
- return { sit: 'Evidence so far: ' + n + ' of ' + tot + ' sources support it.' + (hs.status !== hs.shown && hs.status === 'open' ? ' The bar for supported is a net weight of 3.' : ''), conf: hs.shown === 'untested' ? 60 : 80, chg, cta: 'Slide to confirm',
213
- opts: [{ id: 't', l: 'Add a question to the next interview', rec: hs.shown === 'untested', outward: !isDemo(), fx: [['check', 'Tests it this week', 'ok']] },
214
- { id: 's', l: 'Mark it supported', fx: [['check', 'Recorded as your call; the derived status stays as the evidence says', 'ok']] },
215
- { id: 'r', l: 'Mark it refuted', fx: [['x', 'Closes the question', 'warn']] }],
216
- outboxReason: 'Adding a question goes to the interview guide, and this page has no route to the calendar yet. Nothing is written.' };
217
- }
218
- function hypRow(V, h, known, ncols) {
219
- const hs = hypStatus(h, known); const col = HYP_COLOR[hs.shown]; const key = 'hyp' + h.id; const call = (V.life.call || {})[h.id];
220
- const decide = async (o) => {
221
- if (o.id === 't') { say('Question added to the next interview guide.'); markDone(V, 'hyp:' + h.id, 'Question added.'); return; }
222
- const v = o.id === 's' ? 'supported' : 'refuted';
223
- const r = await patch(V, 'hypotheses', h.id, { pm_call: v }, 'Marked ' + v + ' from the lifecycle lens');
224
- if (!r.ok) { say(r.error); return; }
225
- (V.life.call = V.life.call || {})[h.id] = v; say('Marked ' + v + '.', async () => { const u = await patch(V, 'hypotheses', h.id, { pm_call: '' }, 'Undone'); if (u.ok) { delete V.life.call[h.id]; V.render(); } }); markDone(V, 'hyp:' + h.id, 'Marked ' + v + '. Recorded as your call.');
226
- };
227
- return rowShell(V, { key, attrs: { 'data-hyp': h.id, 'data-id': h.id }, icon: hs.shown === 'supported' ? 'check' : hs.shown === 'mixed' ? 'alert' : hs.shown === 'refuted' ? 'x' : 'info', iconColor: col, title: h.t, hint: false,
228
- chips: [chip2(null, HYP_LABEL[hs.shown], col), el('span', { class: 'chip2' }, hs.supports + ' of ' + Math.max(h.ev.length, ncols) + ' sources'), hs.untraced.length ? el('span', { class: 'st warn', 'data-untraced': '', title: hs.untraced.join(', ') }, c3ic('alert', 'sm'), hs.untraced.length + ' untraced') : null,
229
- call ? chip2('user', 'you: ' + call) : null, h.init ? el('span', { class: 'tag' }, nameOf(V, h.init)) : null],
230
- xpContent: caseNode(V, 'hyp:' + h.id, hypCase(V, h, hs), { onConfirm: decide }) });
231
- }
232
- function hypothesesCard(V, L, scope) {
233
- if (!L.hyps) return section('target', 'Hypotheses', null, null, [note('alert', L.err.hyps || 'The hypotheses could not be read.', { 'data-life-error': '' })], { 'data-life-panel': 'hypotheses' });
234
- const list = L.hyps.filter(inScope(scope)); const known = L.life ? L.life.sources || {} : {};
235
- const ncols = Math.min(3, sourceCols(list).length);
236
- const rows = list.map((h) => hypRow(V, h, known, ncols));
237
- return section('target', 'Hypotheses', list.length, null, [...rows, !list.length ? note('target', L.hyps.length ? 'No hypothesis is recorded for this initiative.' : 'No hypotheses are recorded yet. A hypothesis is a statement plus the result that would prove it wrong; adding evidence moves it to supported or refuted.', { 'data-life-empty': 'hypotheses' }) : null, addForm(V, 'hypotheses', HYP_FORM)], { 'data-life-panel': 'hypotheses' });
238
- }
239
- /** The sources the evidence matrix columns stand for: the last three distinct sources named by the hypotheses of the scope, in the order they were recorded. */
240
- const sourceCols = (hyps) => { const at = {}; const cols = []; hyps.forEach((h) => h.ev.forEach((e) => { if (!cols.includes(e.src)) { cols.push(e.src); at[e.src] = e.at || ''; } })); return cols.map((c, i) => [c, i]).sort((a, b) => (at[a[0]] < at[b[0]] ? -1 : at[a[0]] > at[b[0]] ? 1 : a[1] - b[1])).map((x) => x[0]); };
241
- function evidenceMatrix(V, L, scope) {
242
- const H = (L.hyps || []).filter(inScope(scope));
243
- const cols = sourceCols(H);
244
- if (!cols.length) return card('notes', 'Evidence matrix', 'which source supports which hypothesis', el('p', { class: 'dim', 'data-life-empty': 'evidence' }, 'No evidence is recorded yet. Evidence is a list on the hypothesis: { src, dir: supports or refutes, w }.'));
245
- const shown = cols.slice(-3);
246
- const today = new Date().toISOString().slice(0, 10);
247
- const head = (s) => { const at = ((L.hyps || []).flatMap((h) => h.ev).find((e) => e.src === s) || {}).at; return at && at.slice(0, 10) === today ? 'Today' : dayName(at) || short(baseName(s), 10); };
248
- const grid = el('div', { class: 'evm', role: 'table', 'aria-label': 'Evidence matrix', style: 'grid-template-columns:minmax(0,1.6fr) repeat(' + shown.length + ',minmax(0,.5fr))' }, el('span'), ...shown.map((s) => el('span', { class: 'h', title: s }, head(s))),
249
- H.map((h) => [el('span', null, short(h.t, 40)), ...shown.map((s) => { const e = h.ev.find((x) => x.src === s); return el('span', { class: 'c' }, el('i', { class: e ? (e.dir === 'refutes' ? 'x' : '') : 'o', title: e ? e.dir : 'no signal' })); })]));
250
- return card('notes', 'Evidence matrix', 'which source supports which hypothesis', grid, el('div', { class: 'pgl' }, el('span', { style: 'color:var(--success)' }, '● supports'), H.some((h) => h.ev.some((e) => e.dir === 'refutes' && shown.includes(e.src))) ? el('span', { style: 'color:var(--destructive)' }, '● refutes') : null, el('span', null, '◌ no signal'), cols.length > shown.length ? el('span', null, 'last ' + shown.length + ' of ' + cols.length + ' sources') : null));
251
- }
252
- function interviewsCard(V, L) {
253
- const iv = L.life && Array.isArray(L.life.interviews) ? L.life.interviews : null;
254
- if (!iv || !iv.length) return card('cal', 'Interviews', '', el('p', { class: 'dim', 'data-life-empty': 'interviews' }, 'No interviews are tied to this initiative. Interviews are calendar events: add them in the Calendar, tagged to the initiative.'));
255
- const col = { done: 'var(--success)', now: 'var(--acc)', next: 'var(--ring)' };
256
- return card('cal', 'Interviews', '', segs(iv.map((x) => [x.label, 1, col[x.state] || col.next])));
257
- }
258
-
259
- /* ── IDEATE and PRIORITIZE: Ideas, Ranked by score, the scatter, Capacity ── */
260
- function ideaCase(V, x, ranked) {
261
- const sc = ideaScore(x); const top = ranked.slice(0, 3).some((r) => r.id === x.id);
262
- const chg = [['target', 'Impact ' + x.imp + ' of 10, effort ' + x.eff + ' of 10', sc == null ? 'no score' : 'score ' + sc], ['user', 'From ' + x.src, 'source'], ['spark', 'Confidence ' + pct(x.conf) + '%', 'agent']];
263
- const spike = x.conf < 0.6 && x.imp >= 7;
264
- return { sit: x.why || 'No reason is recorded for this idea.', conf: pct(x.conf), chg, cta: 'Slide to confirm',
265
- opts: [{ id: 'sh', l: 'Shortlist it', rec: top, fx: [['check', 'Joins the prioritization', 'ok']] }, { id: 'cm', l: 'Commit it to the plan', fx: [['flag', 'Gets scope and an owner', 'ok']] },
266
- { id: 'sp', l: 'Run a 1-day spike first', rec: spike, fx: [['clock', 'Cheap test of the assumption', 'ok'], ['spark', isDemo() ? 'An agent scopes it' : 'Starts an agent session that scopes it', '']] }, { id: 'pk', l: 'Park it', rec: !top && x.conf < 0.5 && x.imp < 6, fx: [['moon', 'Out of the way', 'warn']] }] };
267
- }
268
- function ideaRow(V, x, ranked, lens) {
269
- const sc = ideaScore(x); const st = ST_COLOR[x.st] || ST_COLOR.new;
270
- const decide = (o) => { const to = { sh: ['short', 'Shortlisted.'], cm: ['committed', 'Committed. It appears in Plan as work to break down.'], pk: ['parked', 'Parked.'] }[o.id];
271
- if (!to && !isDemo()) { startAgent({ ws: V.ctx.ws, task: 'spike', initiative: x.init || '', what: x.n }).then((r) => { say(startedLine(r, 'the spike')); if (r.ok) markDone(V, 'idea:' + x.id, 'Spike started in Sessions'); }); return; }
272
- if (!to) { say('Spike scoped as a draft.'); markDone(V, 'idea:' + x.id, 'Spike scoped as a draft.'); return; }
273
- setIdeaStatus(V, x, to[0], to[1]).then((u) => { if (u) markDone(V, 'idea:' + x.id, to[1], async () => { await u(); }); }); };
274
- const swipe = (status, msg) => () => { setIdeaStatus(V, x, status, msg); };
275
- return rowShell(V, { key: 'idea' + x.id, attrs: { 'data-idea': x.id, 'data-id': x.id }, icon: x.src === 'agent' ? 'spark' : x.src === 'customer' ? 'user' : 'notes', iconColor: x.src === 'agent' ? 'var(--purple)' : null, title: x.n,
276
- sw: { labelRight: lens === 'prioritize' ? 'commit it' : 'shortlist it', labelLeft: 'park it', iconRight: 'check', iconLeft: 'moon', onRight: swipe(lens === 'prioritize' ? 'committed' : 'short', lens === 'prioritize' ? 'Committed to the plan.' : 'Shortlisted.'), onLeft: swipe('parked', 'Parked.') },
277
- chips: [el('span', { class: 'chip2', title: 'Score: impact x confidence / effort' }, c3ic('scale', 'sm'), sc == null ? 'no score' : String(sc)), el('span', { class: 'chip2' }, 'impact ' + x.imp), el('span', { class: 'chip2' }, 'effort ' + x.eff), chip2(null, st[1], st[0]), x.init ? el('span', { class: 'tag' }, nameOf(V, x.init)) : null],
278
- xpContent: caseNode(V, 'idea:' + x.id, ideaCase(V, x, ranked), { onConfirm: decide }) });
279
- }
280
- function ideasCard(V, L, scope, lens) {
281
- if (!L.ideas) return section('spark', lens === 'prioritize' ? 'Ranked by score' : 'Ideas', null, null, [note('alert', L.err.ideas || 'The ideas could not be read.', { 'data-life-error': '' })], { 'data-life-panel': lens });
282
- const all = withSt(V, L.ideas).filter(inScope(scope)); const ranked = rankIdeas(all);
283
- const list = lens === 'prioritize' ? ranked : all.slice().sort((a, b) => (ideaScore(b) ?? -1) - (ideaScore(a) ?? -1));
284
- const empty = !list.length ? note('spark', L.ideas.length ? 'No idea is recorded for this initiative.' : 'No ideas are recorded yet. An idea is a title with impact, effort and confidence; the score is impact x confidence / effort.', { 'data-life-empty': 'ideas' }) : null;
285
- return section(lens === 'prioritize' ? 'scale' : 'spark', lens === 'prioritize' ? 'Ranked by score' : 'Ideas', list.length, lens === 'prioritize' ? 'impact x confidence / effort' : null, [...list.map((x) => ideaRow(V, x, ranked, lens)), empty, addForm(V, 'ideas', IDEA_FORM)], { 'data-life-panel': lens });
286
- }
287
- function scatterCard(V, L, scope, lens) {
288
- if (!L.ideas) return null;
289
- const all = withSt(V, L.ideas).filter(inScope(scope)); const list = lens === 'prioritize' ? rankIdeas(all) : all;
290
- if (!list.filter((x) => ideaScore(x) != null).length) return card('spark', 'Impact and effort', '', el('p', { class: 'dim', 'data-life-empty': 'scatter' }, 'Nothing to plot yet. Each idea is a dot once it has impact and effort.'));
291
- return card(lens === 'prioritize' ? 'scale' : 'spark', 'Impact and effort', lens === 'prioritize' ? '' : 'tap a dot to open it', scatter(V, list));
292
- }
293
- const CAP_COLORS = ['var(--acc)', 'var(--success)', 'var(--purple)', 'var(--warning)'];
294
- function capacityOf(L) { const c = L.life && L.life.capacity; return c && Number.isFinite(c.points) ? c : null; }
295
- function capacityCard(V, L, scope) {
296
- const all = withSt(V, L.ideas || []).filter(inScope(scope)); const held = rankIdeas(all).filter((x) => x.st === 'short' || x.st === 'committed'); const cap = capacityOf(L);
297
- const body = [];
298
- if (held.length) body.push(segs(held.map((x, i) => [x.n, x.eff, CAP_COLORS[i % 4]]), ' pts'));
299
- else body.push(el('p', { class: 'dim', 'data-life-empty': 'capacity-held' }, 'No idea is shortlisted or committed yet.'));
300
- body.push(cap ? el('div', { class: 'dim', style: 'font-size:var(--fs-2)' }, 'Capacity is ' + cap.points + ' effort points' + (cap.basis ? ': ' + cap.basis.charAt(0).toLowerCase() + cap.basis.slice(1) : '') + '.')
301
- : el('div', { class: 'dim', style: 'font-size:var(--fs-2)', 'data-life-empty': 'capacity' }, 'No capacity is recorded, so none is assumed. Add the people and their points a week in the Roadmap view.'));
302
- return card('user', 'Capacity', '', ...body);
303
- }
304
-
305
- /* ── MONITOR: Quality gates ── */
306
- function gateCase(V, id, lad) {
307
- const nm = nameOf(V, id); const nx = lad.next;
308
- const chg = lad.gates.map((g) => [g.state === 'done' ? 'check' : g.state === 'na' ? 'moon' : g.state === 'unknown' ? 'info' : 'clock', g.name + ': ' + (g.state === 'done' ? 'passed' : g.state === 'next' ? 'next' : g.state === 'na' ? 'not required' : g.state === 'unknown' ? 'not claimed by the engine' : 'not yet') + (g.evidence ? '. ' + g.evidence : ''), g.key, g.state === 'done' ? 'ok' : g.state === 'next' ? 'warn' : '']);
309
- lad.violations.forEach((v) => chg.push(['alert', 'Order violation: ' + v, 'order', 'bad']));
310
- return { sit: nx ? (lad.done ? lad.done + ' gate' + (lad.done === 1 ? '' : 's') + ' passed, so ' + nx.name + ' is next. ' : '') + 'Asking for the ' + nx.name + ' gate early surfaces problems while they are cheap.' : 'Every gate that applies is passed.', conf: 72, chg, cta: 'Slide to request',
311
- opts: nx ? [{ id: 'r', l: 'Request an early ' + nx.name, rec: 1, fx: [['check', 'Finds problems early', 'ok'], ['spark', isDemo() ? 'An agent reviews it' : 'Starts an agent session that reviews it', '']] }, { id: 'w', l: 'Wait for ' + (lad.gates.find((g) => g.key === 'build' && g.state === 'next') ? 'build to finish' : 'the work to reach it'), fx: [['clock', 'Later feedback', 'warn']] }] : [],
312
- go: ['open', id, 'Open ' + nm] };
313
- }
314
- function gateRow(V, id, slot) {
315
- const nm = nameOf(V, id);
316
- if (slot.state === 'loading') return el('div', { class: 'gtr', 'data-life-gate': id }, el('b', null, nm), el('span', { class: 'dim' }, c3ic('clock', 'sm'), 'Reading the gates…'), el('span'));
317
- if (!slot.row) return el('div', { class: 'gtr', 'data-life-gate': id }, el('b', null, nm), el('span', { class: 'dim' }, c3ic('alert', 'sm'), slot.err || 'No record for this initiative, so no gate is claimed.'), el('span', { class: 'chip-s', style: '--c:var(--muted-foreground)' }, 'unknown'));
318
- const lad = gateLadder(slot.row);
319
- const open = () => { const model = gateCase(V, id, lad); const sh = openSheet({ title: nm + ': gates', icon: 'shield', body: () => renderCase({ ...model, id: 'gate:' + id }, { outbox: false, onConfirm: (r) => {
320
- if (r.option.id === 'r' && !isDemo() && lad.next) { startAgent({ ws: V.ctx.ws, task: 'gate', initiative: id, what: lad.next.name }).then((x) => say(startedLine(x, 'the early ' + lad.next.name + ' review'))); sh.close(); return; }
321
- say(r.option.id === 'r' ? 'Early review requested.' : 'Waiting.'); sh.close(); }, onGo: () => { sh.close(); if (V.ctx.openInitiative) V.ctx.openInitiative(V.ctx.repo, id); } }) }); };
322
- const bar = el('div', { class: 'hbs', style: 'gap:2px' }, el('div', { class: 'gt', role: 'img', 'aria-label': 'Quality gates', 'aria-description': lad.gates.map((g) => g.name + ' ' + g.state).join(', ') }, lad.gates.map((g) => el('i', { class: gateCell(g), title: g.name + ': ' + g.state + (g.evidence ? '. ' + g.evidence : '') }))),
323
- el('div', { class: 'gtl' }, GATES.map(([n]) => el('span', null, n))));
324
- return el('div', { class: 'gtr', 'data-life-gate': id, role: 'button', tabindex: '0', style: 'cursor:pointer;min-height:44px', title: 'Open the case', onClick: open, onKeydown: (e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); open(); } } },
325
- el('b', null, nm), bar, el('span', { class: 'chip-s', style: '--c:' + (lad.violations.length ? 'var(--destructive)' : 'var(--muted-foreground)') }, lad.done + ' of ' + lad.counted));
326
- }
327
- function gatesCard(V, L, scope, rows) {
328
- const ids = scope ? [scope] : pickGateRows(rows).map((r) => r.id);
329
- if (!ids.length) return card('shield', 'Quality gates', 'enforced in order', el('p', { class: 'dim', 'data-life-empty': 'gates' }, 'No initiative to show gates for.'));
330
- const slots = ids.map((id) => ensureLadder(V, id));
331
- const extra = [];
332
- ids.forEach((id, i) => { const s = slots[i]; if (!s.row) return; const lad = gateLadder(s.row);
333
- lad.violations.forEach((v) => extra.push(el('li', { class: 'bad' }, c3ic('alert', 'sm'), el('span', null, nameOf(V, id) + ': ' + v + '.'))));
334
- if (lad.next) extra.push(el('li', null, c3ic('next', 'sm'), el('span', null, nameOf(V, id) + ': next gate is ' + lad.next.name + (lad.nextAction && lad.nextAction.action ? '. ' + short(lad.nextAction.action.charAt(0).toUpperCase() + lad.nextAction.action.slice(1), 140) : '') + '.')));
335
- else extra.push(el('li', { class: 'ok' }, c3ic('check', 'sm'), el('span', null, nameOf(V, id) + ': every gate that applies is passed.')));
336
- });
337
- return card('shield', 'Quality gates', 'enforced in order', ...ids.map((id, i) => gateRow(V, id, slots[i])),
338
- el('div', { class: 'pgl' }, el('span', { style: 'color:var(--success)' }, '▮ passed'), el('span', null, '◐ next'), el('span', null, '▯ not yet'), el('span', null, '┅ not required'), el('span', null, '▨ the engine does not claim it')),
339
- extra.length ? el('ul', { class: 'chgl', 'data-life-gate-notes': '' }, extra) : null);
340
- }
341
- /** The initiatives the gates card shows when no initiative is chosen: the ones in flight (Build to Evaluate) first, then the rest in row order. At most four: each is one engine run. */
342
- function pickGateRows(rows) {
343
- const inFlight = (r) => ['build', 'deliver', 'monitor', 'evaluate'].includes(stageBucket(nineOf(r)));
344
- return rows.filter(inFlight).concat(rows.filter((r) => !inFlight(r))).slice(0, 4);
345
- }
346
-
347
- /* ── EVALUATE: the scorecard, What we learned, the correction rate ── */
348
- function rubricBars(ev) {
349
- const thr = ev.threshold;
350
- return el('div', { class: 'sc' }, ev.dims.map((d) => { const c = d.score >= 0.8 ? 'var(--success)' : d.score >= 0.65 ? 'var(--warning)' : 'var(--destructive)';
351
- return el('div', { class: 'scr', style: '--c:' + c }, el('div', { class: 'l' }, el('span', null, d.name + (d.w != null ? ' · ' + pct(d.w) + '%' : '')), el('i', { class: 'mono', style: 'font-style:normal' }, String(pct(d.score)))),
352
- el('div', { class: 'tk' }, el('u', { style: 'width:' + d.score * 100 + '%' }), thr != null ? el('s', { style: 'left:' + thr * 100 + '%' }) : null)); }));
353
- }
354
- function calibrationLine(L) {
355
- const c = L.calib;
356
- if (!c) return el('li', { 'data-life-calib': 'none' }, c3ic('info', 'sm'), el('span', null, 'Calibration is not read: the radar surface did not answer. The Review gate stays advisory until Cohen\'s kappa is at least 0.60 over 10 or more labeled pairs (D40).'));
357
- if (c.none || c.kappa == null) return el('li', { 'data-life-calib': 'none' }, c3ic('info', 'sm'), el('span', null, 'No calibration figure is recorded. The Review gate stays advisory until kappa is at least 0.60 over 10 or more PM-labeled pairs (D40); your acceptance is the binding call.'));
358
- const ok = !!c.meets_d40;
359
- return el('li', { class: ok ? 'ok' : 'warn', 'data-life-calib': ok ? 'calibrated' : 'advisory' }, c3ic(ok ? 'check' : 'alert', 'sm'),
360
- el('span', null, 'Evaluator against your labels: kappa ' + c.kappa + (c.n != null ? ' over ' + c.n + ' pairs' : '') + (c.tnr != null ? ', TNR ' + c.tnr : '') + '. ' + (ok ? 'Meets the D40 standard.' : 'Below the D40 standard (kappa at least 0.60, n at least 10, healthy TNR): the verdict is advisory.') + (c.source ? ' Source: ' + c.source + '.' : '')));
361
- }
362
- function scoreCard(V, L, scope, rows) {
363
- if (!L.life) return card('check', 'Evaluation scorecard', 'weighted, against a threshold', el('p', { class: 'dim', 'data-life-error': '' }, L.err.life || 'The evaluations could not be read.'));
364
- const evals = L.life.evals || {};
365
- const cand = (scope ? rows.filter((r) => r.id === scope) : rows.slice().sort((a, b) => (stageBucket(nineOf(b)) === 'evaluate') - (stageBucket(nineOf(a)) === 'evaluate'))).filter((r) => evals[r.id]);
366
- if (!cand.length) return card('check', 'Evaluation scorecard', 'weighted, against a threshold', el('p', { class: 'dim', 'data-life-empty': 'scorecard' }, (scope ? nameOf(V, scope) + ' has no evaluation recorded.' : 'No evaluation is recorded for these initiatives.') + ' The evaluator writes one row per run to planning/runs/evals.jsonl: a score, a threshold and a score for each dimension.'));
367
- return cand.slice(0, scope ? 1 : 2).map((r) => {
368
- const ev = normEval(evals[r.id]); const vd = evalVerdict(ev);
369
- if (!ev || !vd) return card('check', 'Evaluation scorecard', r.title, el('p', { class: 'dim' }, 'The latest evaluation has no usable score.'));
370
- const ok = vd.passes; const flags = [];
371
- if (vd.watermelon) flags.push(el('li', { class: 'warn', 'data-life-watermelon': '' }, c3ic('alert', 'sm'), el('span', null, 'Watermelon guard: it passes at ' + pct(ev.score) + '%, but ' + vd.weakest.name + ' scores ' + pct(vd.weakest.score) + '%. Read that dimension before accepting.')));
372
- flags.push(el('li', { class: vd.weakest && vd.weakest.score < 0.7 ? 'warn' : '' }, c3ic(vd.weakest && vd.weakest.score < 0.7 ? 'alert' : 'info', 'sm'), el('span', null, vd.weakest ? 'Weakest dimension: ' + vd.weakest.name + ' at ' + pct(vd.weakest.score) + '.' : 'No dimension scores are recorded.')));
373
- if (!ev.weighted && ev.dims.length) flags.push(el('li', null, c3ic('info', 'sm'), el('span', null, 'No weights are recorded for this rubric, so the dimensions are shown unweighted; the score is the evaluator\'s own.')));
374
- flags.push(calibrationLine(L));
375
- return el('section', { class: 'card', 'data-life-panel': 'scorecard', 'data-life-eval': r.id }, el('h3', null, c3ic('check'), 'Evaluation scorecard ', el('span', { class: 'dim', style: DIM }, short(r.title, 34) + ' · weighted, against a threshold')),
376
- ev.dims.length ? rubricBars(ev) : null,
377
- el('div', { class: 'chips2', style: 'justify-content:space-between' }, el('b', { style: 'font-size:var(--fs-4)' }, pct(ev.score) + '%'), el('span', { class: 'st ' + (ok ? 'ok' : 'warn') }, c3ic(ok ? 'check' : 'alert', 'sm'), (ok === null ? 'No threshold recorded' : ok ? (ev.verdict && /FINDING/i.test(ev.verdict) ? 'Passes with findings' : 'Passes') : 'Below threshold') + (ev.threshold != null ? ' · threshold ' + pct(ev.threshold) + '%' : ''))),
378
- el('ul', { class: 'chgl' }, flags), ev.model ? el('div', { class: 'dim mono', style: 'font-size:var(--fs-2)' }, 'Evaluator ' + ev.model + (ev.at ? ' · ' + ev.at.slice(0, 10) : '')) : null);
379
- });
380
- }
381
- function lessonsCard(V, L, scope, rows) {
382
- const out = [];
383
- (L.decisions || []).filter((d) => d.lesson && (!scope || d.initiative === scope)).forEach((d) => out.push([d.tone === 'warn' ? 'warn' : d.tone === 'ok' ? 'ok' : '', d.tone === 'warn' ? 'alert' : d.tone === 'ok' ? 'check' : 'info', String(d.lesson)]));
384
- const evals = (L.life && L.life.evals) || {};
385
- rows.filter((r) => !scope || r.id === scope).forEach((r) => ((evals[r.id] && evals[r.id].findings) || []).forEach((f) => out.push([/should|block|must/i.test(f.severity) ? 'warn' : '', /should|block|must/i.test(f.severity) ? 'alert' : 'info', (scope ? '' : r.title + ': ') + f.text])));
386
- return el('section', { class: 'card', 'data-life-panel': 'learned' }, el('h3', null, c3ic('spark'), 'What we learned'),
387
- out.length ? el('ul', { class: 'chgl' }, out.slice(0, 6).map((l) => el('li', { class: l[0] }, c3ic(l[1], 'sm'), el('span', null, short(l[2], 260))))) : el('p', { class: 'dim', 'data-life-empty': 'learned' }, 'Nothing is recorded yet. A lesson comes from the evaluation findings or from a decision recorded with a lesson.'),
388
- el('ul', { class: 'list', style: 'margin-top:8px' }, addForm(V, 'decisions', LESSON_FORM)));
389
- }
390
- function correctionCard(V, L) {
391
- if (!L.life) return card('up', 'Human correction rate', '', el('p', { class: 'dim', 'data-life-error': '' }, L.err.life || 'The corrections could not be read.'));
392
- const c = correctionRate(L.life.corrections && L.life.corrections.series);
393
- if (!c) return card('up', 'Human correction rate', '', el('p', { class: 'dim', 'data-life-empty': 'corrections' }, 'No run records a human correction count yet. Each run in planning/runs/agent-runs.jsonl carries human_corrections.'));
394
- const tone = c.improved ? 'var(--success)' : 'var(--warning)';
395
- const per100 = c.vals.map((v) => Math.round(v * 100)); const first = per100[0]; const last = per100[per100.length - 1];
396
- return card('up', 'Human correction rate', 'corrections per 100 agent runs, lower is better', numCard(String(last), ' per 100 runs', per100.length > 1 ? (c.improved ? 'down from ' : 'up from ') + first + ' at the start' : 'one period of runs so far', tone, per100.length > 1 ? per100 : [last, last], null),
397
- el('div', { class: 'dim', style: 'font-size:var(--fs-2)' }, L.life.corrections.runs + ' runs, ' + L.life.corrections.corrections + ' corrections in all. Each point is a week of runs.'));
398
- }
399
-
400
- /* ── PLAN: Work breakdown, who holds the work ── */
401
- function wbsCard(V, L, scope) {
402
- if (!L.items) return section('tree', 'Work breakdown', null, null, [note('alert', 'The breakdown could not be read.', { 'data-life-error': '' })], { 'data-life-panel': 'wbs' });
403
- const list = L.items.filter((x) => !scope || x.initiative === scope);
404
- const rows = list.map((c) => { const done = !!c.done; const col = done ? 'var(--success)' : 'var(--muted-foreground)';
405
- return el('li', { class: 'nrow', 'data-row': '', tabindex: '0', 'data-wbs': c.rid }, el('span', { class: 'ki', style: 'color:' + col }, c3ic(done ? 'check' : 'moon')),
406
- el('div', { class: 'nb' }, el('span', { class: 'tt' }, c.title), el('div', { class: 'chips' }, chip2(null, done ? 'done' : 'to do', col), c.owner ? el('span', { class: 'chip2' }, c.owner) : el('span', { class: 'st warn' }, c3ic('alert', 'sm'), 'no owner'), c.points ? el('span', { class: 'chip2' }, c.points + ' pts') : null, c.initiative ? el('span', { class: 'tag' }, nameOf(V, c.initiative)) : null))); });
407
- return section('tree', 'Work breakdown', list.length, 'from the Breakdown view', [...rows, !rows.length ? note('tree', 'No work items yet. Add them in the Breakdown view; each gets an owner and points.', { 'data-life-empty': 'wbs' }) : null], { 'data-life-panel': 'wbs' });
408
- }
409
- function whoCard(V, L, scope) {
410
- const list = (L.items || []).filter((x) => !scope || x.initiative === scope);
411
- if (!list.length) return card('org', 'Who does what', 'owner of each work item', el('p', { class: 'dim', 'data-life-empty': 'who' }, 'No work items, so no owners. Roles beyond the owner (accountable, consulted, informed) are not recorded anywhere yet.'));
412
- const people = []; list.forEach((x) => { if (x.owner && !people.includes(x.owner)) people.push(x.owner); });
413
- const shown = people.slice(0, 5);
414
- const grid = el('div', { class: 'rcg', style: 'grid-template-columns:minmax(0,1.6fr) repeat(' + shown.length + ',minmax(0,.5fr))' }, el('span'), ...shown.map((p) => el('span', { class: 'h', title: p }, p.slice(0, 3))),
415
- list.slice(0, 8).map((x) => [el('span', null, short(x.title, 34)), ...shown.map((p) => el('span', { class: 'c ' + (x.owner === p ? 'R' : '') }, x.owner === p ? 'R' : ''))]));
416
- const gaps = list.filter((x) => !x.owner);
417
- return card('org', 'Who does what', 'the owner of each work item (R)', grid, el('ul', { class: 'chgl' }, gaps.length ? gaps.slice(0, 4).map((x) => el('li', { class: 'bad' }, c3ic('alert', 'sm'), el('span', null, x.title + ' has nobody responsible.'))) : el('li', { class: 'ok' }, c3ic('check', 'sm'), el('span', null, 'Every work item has an owner.'))));
418
- }
419
-
420
- /* ── BUILD: tickets, merged by initiative, the factory boundary ── */
421
- function buildPanels(V, L, scope, rows) {
422
- const ids = scope ? [scope] : rows.slice(0, 6).map((r) => r.id);
423
- const slots = ids.map((id) => ensureTickets(V, id));
424
- const tix = []; ids.forEach((id, i) => slots[i].items.forEach((t) => tix.push({ ...t, ini: id })));
425
- const pending = slots.some((s) => s.state === 'loading');
426
- const merged = (it) => it.state === 'done';
427
- const tickets = section('branch', 'Build tickets', tix.length, 'Jira, read-only here', [...tix.map((t) => el('li', { class: 'nrow', 'data-row': '', tabindex: '0', 'data-ticket': t.id }, el('span', { class: 'ki', style: 'color:' + (merged(t) ? 'var(--success)' : 'var(--muted-foreground)') }, c3ic(merged(t) ? 'check' : t.state === 'doing' ? 'clock' : 'moon')),
428
- el('div', { class: 'nb' }, el('span', { class: 'tt' }, t.title), el('div', { class: 'chips' }, el('span', { class: 'chip2 mono' }, t.id), chip2(null, t.state === 'done' ? 'done' : t.state === 'doing' ? 'doing' : 'to do'), t.forecast && t.forecast.slip_days ? el('span', { class: 'st warn' }, c3ic('alert', 'sm'), t.forecast.slip_days + ' d late') : null, el('span', { class: 'tag' }, nameOf(V, t.ini)))))),
429
- pending ? loading('the tickets') : null, !tix.length && !pending ? note('check', 'No tickets are read for these initiatives. Tickets come from Jira; connect it in Settings.', { 'data-life-empty': 'tickets' }) : null], { 'data-life-panel': 'tickets' });
430
- const bars = ids.map((id, i) => { const its = slots[i].items; const d = its.filter(merged).length; return its.length ? [short(nameOf(V, id), 24), d / its.length || 0.03, CAP_COLORS[i % 4], d + ' of ' + its.length] : null; }).filter(Boolean);
431
- const right = [card('branch', 'Merged by initiative', '', bars.length ? hBars(bars) : el('p', { class: 'dim', 'data-life-empty': 'merged' }, pending ? 'Reading the tickets…' : 'No tickets to count.'), el('div', { class: 'dim', style: 'font-size:var(--fs-2)' }, 'A ticket counts when it is done in Jira. Merging needs required CI to be green.')),
432
- el('section', { class: 'card' }, el('h3', null, c3ic('shield'), 'Factory boundary'), el('ul', { class: 'chgl' }, el('li', { class: 'ok' }, c3ic('check', 'sm'), el('span', null, 'Opens pull requests only')), el('li', { class: 'ok' }, c3ic('check', 'sm'), el('span', null, 'Never writes a control-graph record')), el('li', { class: 'warn' }, c3ic('alert', 'sm'), el('span', null, 'A failed rubric review sends the work back, not forward'))))];
433
- const total = tix.length; const done = tix.filter(merged).length;
434
- return { after: [tickets], right, head: { icon: 'branch', h: pending && !total ? 'Reading the build tickets' : done + ' of ' + total + ' build tickets are done' + (scope ? ' for ' + nameOf(V, scope) : ' across the initiatives'), s: 'The factory opens pull requests and holds no merge rights. CI and review decide.', ring: [done, Math.max(1, total)] } };
435
- }
436
-
437
- /* ── the header of each lens (iniInfo, line 3577) and the panels per lens ── */
438
- export function lensPanels(V, lens, scope) {
439
- const L = ensureLife(V); const rows = V.ctx.rows || [];
440
- const out = { head: null, left: [], after: [], right: [] };
441
- const wait = L.state !== 'ready';
442
- if (wait) { out.left = [section('info', 'Reading the records', null, null, [loading('ideas, hypotheses, evaluations')])]; return out; }
443
- const ideas = withSt(V, L.ideas || []).filter(inScope(scope)); const hyps = (L.hyps || []).filter(inScope(scope));
444
- if (lens === 'discover') {
445
- const hs = hyps.map((h) => hypStatus(h, L.life ? L.life.sources || {} : {}));
446
- out.head = { icon: 'search', h: hyps.length ? hyps.length + ' hypothes' + (hyps.length === 1 ? 'is' : 'es') + ': ' + hs.filter((s) => s.shown === 'supported').length + ' supported, ' + hs.filter((s) => s.shown === 'untested').length + ' untested' : 'No hypotheses are recorded yet', s: hyps.length ? 'A hypothesis is supported at a net evidence weight of 3 and refuted at -2. Evidence that points to a missing source is flagged untraced.' : 'Add a hypothesis with what would prove it wrong. Evidence moves it to supported or refuted.', ring: [hs.filter((s) => s.shown === 'supported').length, Math.max(1, hyps.length)] };
447
- out.left = [hypothesesCard(V, L, scope)]; out.right = [evidenceMatrix(V, L, scope), interviewsCard(V, L)];
448
- } else if (lens === 'ideate') {
449
- out.head = { icon: 'spark', h: ideas.length ? ideas.length + ' ideas, ' + ideas.filter((x) => x.src === 'agent').length + ' proposed by the agent' : 'No ideas are recorded yet', s: 'Score by impact, confidence and effort, then shortlist.', ring: [ideas.filter((x) => x.st === 'short' || x.st === 'committed').length, Math.max(1, ideas.length)] };
450
- out.left = [ideasCard(V, L, scope, 'ideate')]; out.right = [scatterCard(V, L, scope, 'ideate')];
451
- } else if (lens === 'prioritize') {
452
- const cap = capacityOf(L); const r = rankIdeas(ideas); const used = capacityUsed(ideas, cap && cap.points);
453
- out.head = { icon: 'scale', h: r.length + ' ranked ideas' + (cap ? ' against capacity of ' + cap.points : ', no capacity recorded'), s: used.cap != null && used.over ? 'You hold ' + used.used + ' effort points, ' + used.over + ' over capacity. Commit the top three and park the rest.' : 'Commit the top three and park the rest.', ring: [ideas.filter((x) => x.st === 'committed').length, 3] };
454
- out.left = [ideasCard(V, L, scope, 'prioritize')]; out.right = [scatterCard(V, L, scope, 'prioritize'), capacityCard(V, L, scope)];
455
- } else if (lens === 'plan') {
456
- const items = (L.items || []).filter((x) => !scope || x.initiative === scope);
457
- const owned = items.filter((x) => x.owner).length;
458
- out.head = { icon: 'tree', h: items.length ? items.length + ' work items, ' + items.filter((x) => x.done).length + ' done' : 'No work items yet', s: items.length ? (items.length - owned ? (items.length - owned) + ' work item' + (items.length - owned === 1 ? ' lacks' : 's lack') + ' an owner.' : 'Every work item has an owner.') : 'Add work items in the Breakdown view.', ring: [items.filter((x) => x.done).length, Math.max(1, items.length)] };
459
- out.left = [wbsCard(V, L, scope)]; out.right = [whoCard(V, L, scope), progressCard(V, 'Path and dates', '', { cap: 6, uid: 'plan', onOpen: (id) => V.ctx.openInitiative && V.ctx.openInitiative(V.ctx.repo, id) })];
460
- } else if (lens === 'monitor') {
461
- const ids = scope ? [scope] : pickGateRows(rows).map((r) => r.id);
462
- const lads = ids.map((id) => L.ladders[id]).filter((s) => s && s.row).map((s) => gateLadder(s.row));
463
- out.head = lads.length ? { icon: 'report', h: lads.reduce((a, l) => a + l.done, 0) + ' of ' + lads.reduce((a, l) => a + l.counted, 0) + ' gates passed across ' + lads.length + ' initiative' + (lads.length === 1 ? '' : 's'), s: lads.some((l) => l.violations.length) ? 'Order violations: ' + lads.flatMap((l) => l.violations).slice(0, 2).join('; ') + '.' : 'Gates are enforced in order: spec and rubric before build.', ring: [lads.reduce((a, l) => a + l.done, 0), Math.max(1, lads.reduce((a, l) => a + l.counted, 0))] }
464
- : { icon: 'report', h: 'Reading the quality gates', s: 'Each initiative\'s gates come from the workflow engine.', ring: [0, 1] };
465
- out.left = [gatesCard(V, L, scope, rows)]; out.right = [progressCard(V, 'Progress and timing', '', { cap: 8, uid: 'monitor', onOpen: (id) => V.ctx.openInitiative && V.ctx.openInitiative(V.ctx.repo, id) })];
466
- } else if (lens === 'evaluate') {
467
- const evals = (L.life && L.life.evals) || {}; const cand = (scope ? rows.filter((r) => r.id === scope) : rows).filter((r) => evals[r.id]);
468
- const first = cand[0] ? normEval(evals[cand[0].id]) : null; const vd = first ? evalVerdict(first) : null;
469
- out.head = first && vd ? { icon: 'check', h: cand[0].title + (vd.passes ? ' passes' + (/FINDING/i.test(first.verdict) ? ' with findings' : '') : ' is below its threshold') + ' at ' + pct(first.score) + '%', s: (vd.weakest ? vd.weakest.name + ' is weakest. ' : '') + 'Decide whether to scale, iterate or stop.', ring: [pct(first.score), 100] }
470
- : { icon: 'check', h: 'No evaluation is recorded' + (scope ? ' for ' + nameOf(V, scope) : ''), s: 'The evaluator writes one row per run to planning/runs/evals.jsonl.', ring: [0, 100] };
471
- out.left = [...[].concat(scoreCard(V, L, scope, rows)), lessonsCard(V, L, scope, rows)]; out.right = [correctionCard(V, L)];
472
- } else if (lens === 'deliver') {
473
- const rp = releasePanels(V, scope); out.left = rp.left; out.right = rp.right;
474
- } else if (lens === 'build') {
475
- const b = buildPanels(V, L, scope, rows); out.head = b.head; out.after = b.after; out.right = b.right;
476
- }
477
- out.right = out.right.filter(Boolean);
478
- return out;
479
- }
@@ -1,27 +0,0 @@
1
- /* pm/c3-look.js — the two parts of Settings the console needs before Settings is opened (c3-desktop-light-load): the gear icon of the
2
- * header and applyLook, which sets the time-of-day tint and the daylight strip from the saved settings. They live here so the
3
- * shell can start without loading c3-settings.js; c3-settings.js re-exports both. */
4
-
5
- /* c3-settings.css holds the tint and strip rules. The same link attribute as c3-settings.js, so the sheet is added once. */
6
- function ensureCss() {
7
- if (typeof document === 'undefined' || document.querySelector('link[data-c3-settings]')) return;
8
- const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = new URL('./c3-settings.css', import.meta.url).href; l.setAttribute('data-c3-settings', ''); document.head.appendChild(l);
9
- }
10
-
11
- /** A gear, drawn here: the console's sprite has none. */
12
- export function gearIcon(cls) {
13
- const NS = 'http://www.w3.org/2000/svg';
14
- const s = document.createElementNS(NS, 'svg');
15
- s.setAttribute('class', 'ic' + (cls ? ' ' + cls : '')); s.setAttribute('aria-hidden', 'true'); s.setAttribute('viewBox', '0 0 24 24');
16
- s.innerHTML = '<circle cx="12" cy="12" r="3"/><path d="M19 12a7 7 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7 7 0 0 0-2-1.2L14 3h-4l-.5 2.6a7 7 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7 7 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7 7 0 0 0 2 1.2L10 21h4l.5-2.6a7 7 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6c.1-.4.1-.8.1-1.2"/>';
17
- return s;
18
- }
19
-
20
- /** Apply the settings the console itself draws: the start tab is read by the shell; tint and the daylight strip are attributes on the root. */
21
- export function applyLook(root, settings) {
22
- if (!root || !settings) return;
23
- ensureCss();
24
- const v = (k) => { const s = settings.find((x) => x.key === k); return s ? s.value : undefined; };
25
- root.setAttribute('data-c3-tint', v('time.tint') === false ? 'off' : 'on');
26
- root.setAttribute('data-c3-strip', v('time.strip') === false ? 'off' : 'on');
27
- }
@@ -1,22 +0,0 @@
1
- /* pm/c3-material.css — meeting material (initiative meeting-material-replay, part 1): the Material part of the Calendar's meeting card, the Add material sheet
2
- * and the PMOS deck on the Focus stage. Tokens only. Classes are .mm- under .c3; the sheet and the card are drawn with the console3 classes they already use. */
3
- .c3 .mm h4 .bdg { margin-left: 4px; }
4
- .c3 .mm-row { align-items: center; }
5
- .c3 .mm-row .cal3-ct { display: grid; gap: 2px; min-width: 0; }
6
- .c3 .mm-meta { font-size: var(--fs-1); }
7
- .c3 .mm-row .ib.sm { width: 24px; height: 24px; }
8
- .c3 .mm .mm-foot { align-items: center; margin-top: 6px; }
9
- .c3 .mm-sheet { display: grid; gap: var(--sp-3); }
10
- .c3 .mm-in { width: 100%; box-sizing: border-box; height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--background); color: var(--foreground); font: inherit; font-size: var(--fs-3); }
11
- .c3 .mm-in:focus-visible { outline: 2px solid color-mix(in oklab, var(--ring) 50%, var(--foreground)); outline-offset: 1px; }
12
- .c3 .mm-opt.on { background: color-mix(in srgb, var(--acc) 7%, transparent); border-radius: 8px; }
13
- .c3 .mm-why, .c3 .mm-sel { color: var(--acc); }
14
- .c3 .mm-opt .nb { min-width: 0; }
15
- .c3 .mm-opt .chips { flex-wrap: wrap; min-width: 0; }
16
- .c3 .mm-opt .tag { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
17
- .c3 .mm-set { border-color: color-mix(in srgb, var(--acc) 40%, var(--border)); }
18
- .c3 .mm-f { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; align-items: center; padding: 4px 0; }
19
- .c3 .mm-f .mk-lbl { padding: 0; }
20
- .c3 .mm-wrap { flex-wrap: wrap; height: auto; }
21
- @media (max-width: 640px) { .c3 .mm-f { grid-template-columns: minmax(0, 1fr); } }
22
- @media (pointer: coarse) { .c3 .mm-in { min-height: 44px; } }