create-principles-disciple 1.93.0 → 1.95.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 (526) hide show
  1. package/console/dist/server/config/WorkspaceConfigStore.js +2 -1
  2. package/console/dist/server/config/pd-config-store.d.ts +40 -1
  3. package/console/dist/server/config/pd-config-store.js +170 -1
  4. package/console/dist/server/index.js +28 -10
  5. package/console/dist/server/models/ApprovalsConsoleModel.js +4 -12
  6. package/console/dist/server/models/EvidenceChainConsoleModel.d.ts +0 -2
  7. package/console/dist/server/models/EvidenceChainConsoleModel.js +36 -2
  8. package/console/dist/server/models/HealthCheckModel.js +5 -3
  9. package/console/dist/server/models/IntentDecisionModel.d.ts +66 -0
  10. package/console/dist/server/models/IntentDecisionModel.js +207 -0
  11. package/console/dist/server/models/IntentPageModel.d.ts +18 -0
  12. package/console/dist/server/models/IntentPageModel.js +90 -0
  13. package/console/dist/server/models/PrinciplesConsoleModel.d.ts +2 -0
  14. package/console/dist/server/models/PrinciplesConsoleModel.js +37 -1
  15. package/console/dist/server/models/WorkspaceService.d.ts +0 -28
  16. package/console/dist/server/models/WorkspaceService.js +0 -115
  17. package/console/dist/server/routes/config.js +55 -1
  18. package/console/dist/server/routes/feedback-reports.js +1 -1
  19. package/console/dist/server/routes/intent-decisions.d.ts +33 -0
  20. package/console/dist/server/routes/intent-decisions.js +499 -0
  21. package/console/dist/server/routes/intent.d.ts +3 -0
  22. package/console/dist/server/routes/intent.js +35 -0
  23. package/console/dist/server/routes/principles.js +67 -1
  24. package/console/dist/server/routes/update.d.ts +0 -1
  25. package/console/dist/server/routes/update.js +14 -11
  26. package/console/dist/ui/App.js +2 -7
  27. package/console/dist/ui/api.d.ts +44 -18
  28. package/console/dist/ui/api.js +44 -5
  29. package/console/dist/ui/components/layout/app-sidebar.js +2 -1
  30. package/console/dist/ui/components/ui/badge.d.ts +1 -1
  31. package/console/dist/ui/components/ui/button.d.ts +1 -1
  32. package/console/dist/ui/components/ui/shiny-text.d.ts +28 -0
  33. package/console/dist/ui/components/ui/shiny-text.js +46 -0
  34. package/console/dist/ui/i18n/en.json +167 -3
  35. package/console/dist/ui/i18n/zh-CN.json +167 -3
  36. package/console/dist/ui/pages/activation/ActivationPage.js +2 -1
  37. package/console/dist/ui/pages/control-center/ControlCenterPage.js +28 -2
  38. package/console/dist/ui/pages/control-center/EmpathyObserverCostHint.d.ts +28 -0
  39. package/console/dist/ui/pages/control-center/EmpathyObserverCostHint.js +38 -0
  40. package/console/dist/ui/pages/debt/DebtPage.js +219 -2
  41. package/console/dist/ui/pages/focus/FocusPage.js +2 -1
  42. package/console/dist/ui/pages/intent/IntentPage.d.ts +1 -0
  43. package/console/dist/ui/pages/intent/IntentPage.js +147 -0
  44. package/console/dist/ui/pages/pain/PainPage.js +234 -4
  45. package/console/dist/ui/pages/pain/pain-card-helpers.d.ts +75 -0
  46. package/console/dist/ui/pages/pain/pain-card-helpers.js +78 -0
  47. package/console/dist/ui/pages/principles/PrinciplesPage.js +2 -1
  48. package/console/dist/ui/utils/validators.d.ts +163 -0
  49. package/console/dist/ui/utils/validators.js +433 -0
  50. package/console/dist/web/assets/app.css +138 -0
  51. package/console/dist/web/assets/app.js +3124 -1288
  52. package/console/package.json +3 -0
  53. package/core/dist/index.d.ts +2 -2
  54. package/core/dist/index.d.ts.map +1 -1
  55. package/core/dist/index.js +1 -1
  56. package/core/dist/index.js.map +1 -1
  57. package/core/dist/principle-tree-ledger.d.ts +55 -4
  58. package/core/dist/principle-tree-ledger.d.ts.map +1 -1
  59. package/core/dist/principle-tree-ledger.js +472 -13
  60. package/core/dist/principle-tree-ledger.js.map +1 -1
  61. package/core/dist/prompt-builder/__tests__/model-config.test.d.ts +2 -0
  62. package/core/dist/prompt-builder/__tests__/model-config.test.d.ts.map +1 -0
  63. package/core/dist/prompt-builder/__tests__/model-config.test.js +158 -0
  64. package/core/dist/prompt-builder/__tests__/model-config.test.js.map +1 -0
  65. package/core/dist/prompt-builder/__tests__/prompt-builder-core.test.js +58 -0
  66. package/core/dist/prompt-builder/__tests__/prompt-builder-core.test.js.map +1 -1
  67. package/core/dist/prompt-builder/__tests__/xml-escape.test.d.ts +2 -0
  68. package/core/dist/prompt-builder/__tests__/xml-escape.test.d.ts.map +1 -0
  69. package/core/dist/prompt-builder/__tests__/xml-escape.test.js +42 -0
  70. package/core/dist/prompt-builder/__tests__/xml-escape.test.js.map +1 -0
  71. package/core/dist/prompt-builder/empathy-keyword-matching.d.ts.map +1 -1
  72. package/core/dist/prompt-builder/empathy-keyword-matching.js +9 -6
  73. package/core/dist/prompt-builder/empathy-keyword-matching.js.map +1 -1
  74. package/core/dist/prompt-builder/index.d.ts +3 -0
  75. package/core/dist/prompt-builder/index.d.ts.map +1 -1
  76. package/core/dist/prompt-builder/index.js +2 -0
  77. package/core/dist/prompt-builder/index.js.map +1 -1
  78. package/core/dist/prompt-builder/model-config.d.ts +42 -0
  79. package/core/dist/prompt-builder/model-config.d.ts.map +1 -0
  80. package/core/dist/prompt-builder/model-config.js +84 -0
  81. package/core/dist/prompt-builder/model-config.js.map +1 -0
  82. package/core/dist/prompt-builder/size-guard.d.ts +1 -0
  83. package/core/dist/prompt-builder/size-guard.d.ts.map +1 -1
  84. package/core/dist/prompt-builder/size-guard.js +21 -0
  85. package/core/dist/prompt-builder/size-guard.js.map +1 -1
  86. package/core/dist/prompt-builder/types.d.ts +2 -0
  87. package/core/dist/prompt-builder/types.d.ts.map +1 -1
  88. package/core/dist/prompt-builder/xml-escape.d.ts +12 -0
  89. package/core/dist/prompt-builder/xml-escape.d.ts.map +1 -0
  90. package/core/dist/prompt-builder/xml-escape.js +19 -0
  91. package/core/dist/prompt-builder/xml-escape.js.map +1 -0
  92. package/core/dist/runtime-v2/__tests__/architecture-regression.test.js +205 -48
  93. package/core/dist/runtime-v2/__tests__/architecture-regression.test.js.map +1 -1
  94. package/core/dist/runtime-v2/__tests__/evidence-chain-intent-tension.test.d.ts +2 -0
  95. package/core/dist/runtime-v2/__tests__/evidence-chain-intent-tension.test.d.ts.map +1 -0
  96. package/core/dist/runtime-v2/__tests__/evidence-chain-intent-tension.test.js +284 -0
  97. package/core/dist/runtime-v2/__tests__/evidence-chain-intent-tension.test.js.map +1 -0
  98. package/core/dist/runtime-v2/__tests__/pain-signal-bridge-result-shaping.test.d.ts +2 -0
  99. package/core/dist/runtime-v2/__tests__/pain-signal-bridge-result-shaping.test.d.ts.map +1 -0
  100. package/core/dist/runtime-v2/__tests__/pain-signal-bridge-result-shaping.test.js +500 -0
  101. package/core/dist/runtime-v2/__tests__/pain-signal-bridge-result-shaping.test.js.map +1 -0
  102. package/core/dist/runtime-v2/__tests__/pain-signal-observability.test.js +7 -5
  103. package/core/dist/runtime-v2/__tests__/pain-signal-observability.test.js.map +1 -1
  104. package/core/dist/runtime-v2/__tests__/pi-artifact-store.test.js +11 -0
  105. package/core/dist/runtime-v2/__tests__/pi-artifact-store.test.js.map +1 -1
  106. package/core/dist/runtime-v2/__tests__/proven-channel-baseline.test.js +15 -2
  107. package/core/dist/runtime-v2/__tests__/proven-channel-baseline.test.js.map +1 -1
  108. package/core/dist/runtime-v2/__tests__/schema-float-precision.test.d.ts +2 -0
  109. package/core/dist/runtime-v2/__tests__/schema-float-precision.test.d.ts.map +1 -0
  110. package/core/dist/runtime-v2/__tests__/schema-float-precision.test.js +290 -0
  111. package/core/dist/runtime-v2/__tests__/schema-float-precision.test.js.map +1 -0
  112. package/core/dist/runtime-v2/__tests__/schema-orphan-detection.test.d.ts +2 -0
  113. package/core/dist/runtime-v2/__tests__/schema-orphan-detection.test.d.ts.map +1 -0
  114. package/core/dist/runtime-v2/__tests__/schema-orphan-detection.test.js +158 -0
  115. package/core/dist/runtime-v2/__tests__/schema-orphan-detection.test.js.map +1 -0
  116. package/core/dist/runtime-v2/activation/__tests__/approval-store-extended.test.js +15 -1
  117. package/core/dist/runtime-v2/activation/__tests__/approval-store-extended.test.js.map +1 -1
  118. package/core/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store-fk.test.d.ts +2 -0
  119. package/core/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store-fk.test.d.ts.map +1 -0
  120. package/core/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store-fk.test.js +62 -0
  121. package/core/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store-fk.test.js.map +1 -0
  122. package/core/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store.test.js +12 -2
  123. package/core/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store.test.js.map +1 -1
  124. package/core/dist/runtime-v2/activation/__tests__/sqlite-approval-store-fk.test.d.ts +2 -0
  125. package/core/dist/runtime-v2/activation/__tests__/sqlite-approval-store-fk.test.d.ts.map +1 -0
  126. package/core/dist/runtime-v2/activation/__tests__/sqlite-approval-store-fk.test.js +56 -0
  127. package/core/dist/runtime-v2/activation/__tests__/sqlite-approval-store-fk.test.js.map +1 -0
  128. package/core/dist/runtime-v2/activation/__tests__/sqlite-approval-store.test.js +8 -0
  129. package/core/dist/runtime-v2/activation/__tests__/sqlite-approval-store.test.js.map +1 -1
  130. package/core/dist/runtime-v2/activation/__tests__/story-a-acceptance.test.js +20 -0
  131. package/core/dist/runtime-v2/activation/__tests__/story-a-acceptance.test.js.map +1 -1
  132. package/core/dist/runtime-v2/activation/sqlite-activation-state-store.d.ts.map +1 -1
  133. package/core/dist/runtime-v2/activation/sqlite-activation-state-store.js +6 -0
  134. package/core/dist/runtime-v2/activation/sqlite-activation-state-store.js.map +1 -1
  135. package/core/dist/runtime-v2/activation/sqlite-approval-store.d.ts.map +1 -1
  136. package/core/dist/runtime-v2/activation/sqlite-approval-store.js +86 -32
  137. package/core/dist/runtime-v2/activation/sqlite-approval-store.js.map +1 -1
  138. package/core/dist/runtime-v2/activation/writers/__tests__/rule-host-writer.test.js +65 -1
  139. package/core/dist/runtime-v2/activation/writers/__tests__/rule-host-writer.test.js.map +1 -1
  140. package/core/dist/runtime-v2/activation/writers/rule-host-writer.d.ts.map +1 -1
  141. package/core/dist/runtime-v2/activation/writers/rule-host-writer.js +33 -11
  142. package/core/dist/runtime-v2/activation/writers/rule-host-writer.js.map +1 -1
  143. package/core/dist/runtime-v2/bridge-result-shaper.d.ts +53 -0
  144. package/core/dist/runtime-v2/bridge-result-shaper.d.ts.map +1 -0
  145. package/core/dist/runtime-v2/bridge-result-shaper.js +117 -0
  146. package/core/dist/runtime-v2/bridge-result-shaper.js.map +1 -0
  147. package/core/dist/runtime-v2/detection/__tests__/detection-funnel-policy.test.d.ts +13 -0
  148. package/core/dist/runtime-v2/detection/__tests__/detection-funnel-policy.test.d.ts.map +1 -0
  149. package/core/dist/runtime-v2/detection/__tests__/detection-funnel-policy.test.js +111 -0
  150. package/core/dist/runtime-v2/detection/__tests__/detection-funnel-policy.test.js.map +1 -0
  151. package/core/dist/runtime-v2/detection/detection-funnel-policy.d.ts +103 -0
  152. package/core/dist/runtime-v2/detection/detection-funnel-policy.d.ts.map +1 -0
  153. package/core/dist/runtime-v2/detection/detection-funnel-policy.js +135 -0
  154. package/core/dist/runtime-v2/detection/detection-funnel-policy.js.map +1 -0
  155. package/core/dist/runtime-v2/detection/index.d.ts +10 -0
  156. package/core/dist/runtime-v2/detection/index.d.ts.map +1 -0
  157. package/core/dist/runtime-v2/detection/index.js +9 -0
  158. package/core/dist/runtime-v2/detection/index.js.map +1 -0
  159. package/core/dist/runtime-v2/diagnostician/__tests__/diag-rootcause-output.test.js +134 -15
  160. package/core/dist/runtime-v2/diagnostician/__tests__/diag-rootcause-output.test.js.map +1 -1
  161. package/core/dist/runtime-v2/diagnostician/__tests__/intent-tension-schema.test.d.ts +18 -0
  162. package/core/dist/runtime-v2/diagnostician/__tests__/intent-tension-schema.test.d.ts.map +1 -0
  163. package/core/dist/runtime-v2/diagnostician/__tests__/intent-tension-schema.test.js +251 -0
  164. package/core/dist/runtime-v2/diagnostician/__tests__/intent-tension-schema.test.js.map +1 -0
  165. package/core/dist/runtime-v2/diagnostician/__tests__/rootcause-prompt-builder.test.js +73 -0
  166. package/core/dist/runtime-v2/diagnostician/__tests__/rootcause-prompt-builder.test.js.map +1 -1
  167. package/core/dist/runtime-v2/diagnostician/diag-rootcause-output.d.ts +98 -0
  168. package/core/dist/runtime-v2/diagnostician/diag-rootcause-output.d.ts.map +1 -1
  169. package/core/dist/runtime-v2/diagnostician/diag-rootcause-output.js +131 -0
  170. package/core/dist/runtime-v2/diagnostician/diag-rootcause-output.js.map +1 -1
  171. package/core/dist/runtime-v2/diagnostician/rootcause-prompt-builder.d.ts +8 -0
  172. package/core/dist/runtime-v2/diagnostician/rootcause-prompt-builder.d.ts.map +1 -1
  173. package/core/dist/runtime-v2/diagnostician/rootcause-prompt-builder.js +66 -3
  174. package/core/dist/runtime-v2/diagnostician/rootcause-prompt-builder.js.map +1 -1
  175. package/core/dist/runtime-v2/diagnostician-output.d.ts +23 -0
  176. package/core/dist/runtime-v2/diagnostician-output.d.ts.map +1 -1
  177. package/core/dist/runtime-v2/diagnostician-output.js +16 -0
  178. package/core/dist/runtime-v2/diagnostician-output.js.map +1 -1
  179. package/core/dist/runtime-v2/diagnostician-prompt-builder.d.ts +32 -0
  180. package/core/dist/runtime-v2/diagnostician-prompt-builder.d.ts.map +1 -1
  181. package/core/dist/runtime-v2/diagnostician-prompt-builder.js.map +1 -1
  182. package/core/dist/runtime-v2/evidence-triage/__tests__/observation-resolver.test.d.ts +12 -0
  183. package/core/dist/runtime-v2/evidence-triage/__tests__/observation-resolver.test.d.ts.map +1 -0
  184. package/core/dist/runtime-v2/evidence-triage/__tests__/observation-resolver.test.js +181 -0
  185. package/core/dist/runtime-v2/evidence-triage/__tests__/observation-resolver.test.js.map +1 -0
  186. package/core/dist/runtime-v2/evidence-triage/__tests__/triage-policy.test.js +104 -1
  187. package/core/dist/runtime-v2/evidence-triage/__tests__/triage-policy.test.js.map +1 -1
  188. package/core/dist/runtime-v2/evidence-triage/index.d.ts +3 -0
  189. package/core/dist/runtime-v2/evidence-triage/index.d.ts.map +1 -1
  190. package/core/dist/runtime-v2/evidence-triage/index.js +3 -0
  191. package/core/dist/runtime-v2/evidence-triage/index.js.map +1 -1
  192. package/core/dist/runtime-v2/evidence-triage/observation-resolver.d.ts +128 -0
  193. package/core/dist/runtime-v2/evidence-triage/observation-resolver.d.ts.map +1 -0
  194. package/core/dist/runtime-v2/evidence-triage/observation-resolver.js +203 -0
  195. package/core/dist/runtime-v2/evidence-triage/observation-resolver.js.map +1 -0
  196. package/core/dist/runtime-v2/evidence-triage/source-descriptors.d.ts +1 -1
  197. package/core/dist/runtime-v2/evidence-triage/source-descriptors.js +1 -1
  198. package/core/dist/runtime-v2/evidence-triage/triage-policy.d.ts +4 -0
  199. package/core/dist/runtime-v2/evidence-triage/triage-policy.d.ts.map +1 -1
  200. package/core/dist/runtime-v2/evidence-triage/triage-policy.js +66 -9
  201. package/core/dist/runtime-v2/evidence-triage/triage-policy.js.map +1 -1
  202. package/core/dist/runtime-v2/evidence-triage/types.d.ts +14 -0
  203. package/core/dist/runtime-v2/evidence-triage/types.d.ts.map +1 -1
  204. package/core/dist/runtime-v2/evidence-triage/types.js.map +1 -1
  205. package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.js +56 -4
  206. package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.js.map +1 -1
  207. package/core/dist/runtime-v2/feature-flags/__tests__/intent-engineering-flag.test.d.ts +2 -0
  208. package/core/dist/runtime-v2/feature-flags/__tests__/intent-engineering-flag.test.d.ts.map +1 -0
  209. package/core/dist/runtime-v2/feature-flags/__tests__/intent-engineering-flag.test.js +30 -0
  210. package/core/dist/runtime-v2/feature-flags/__tests__/intent-engineering-flag.test.js.map +1 -0
  211. package/core/dist/runtime-v2/feature-flags/feature-flag-contract.d.ts.map +1 -1
  212. package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js +11 -2
  213. package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js.map +1 -1
  214. package/core/dist/runtime-v2/feature-flags/plugin-surface-registry.d.ts.map +1 -1
  215. package/core/dist/runtime-v2/feature-flags/plugin-surface-registry.js +0 -9
  216. package/core/dist/runtime-v2/feature-flags/plugin-surface-registry.js.map +1 -1
  217. package/core/dist/runtime-v2/feedback/__tests__/redact-sensitive.test.d.ts +15 -0
  218. package/core/dist/runtime-v2/feedback/__tests__/redact-sensitive.test.d.ts.map +1 -0
  219. package/core/dist/runtime-v2/feedback/__tests__/redact-sensitive.test.js +450 -0
  220. package/core/dist/runtime-v2/feedback/__tests__/redact-sensitive.test.js.map +1 -0
  221. package/core/dist/runtime-v2/feedback/__tests__/render-github-url.test.d.ts +13 -0
  222. package/core/dist/runtime-v2/feedback/__tests__/render-github-url.test.d.ts.map +1 -0
  223. package/core/dist/runtime-v2/feedback/__tests__/render-github-url.test.js +243 -0
  224. package/core/dist/runtime-v2/feedback/__tests__/render-github-url.test.js.map +1 -0
  225. package/core/dist/runtime-v2/feedback/__tests__/safe-stringify.test.d.ts +12 -0
  226. package/core/dist/runtime-v2/feedback/__tests__/safe-stringify.test.d.ts.map +1 -0
  227. package/core/dist/runtime-v2/feedback/__tests__/safe-stringify.test.js +172 -0
  228. package/core/dist/runtime-v2/feedback/__tests__/safe-stringify.test.js.map +1 -0
  229. package/core/dist/runtime-v2/index.d.ts +15 -6
  230. package/core/dist/runtime-v2/index.d.ts.map +1 -1
  231. package/core/dist/runtime-v2/index.js +15 -4
  232. package/core/dist/runtime-v2/index.js.map +1 -1
  233. package/core/dist/runtime-v2/intent/__tests__/intent-decision-record.test.d.ts +2 -0
  234. package/core/dist/runtime-v2/intent/__tests__/intent-decision-record.test.d.ts.map +1 -0
  235. package/core/dist/runtime-v2/intent/__tests__/intent-decision-record.test.js +185 -0
  236. package/core/dist/runtime-v2/intent/__tests__/intent-decision-record.test.js.map +1 -0
  237. package/core/dist/runtime-v2/intent/__tests__/intent-doc.test.d.ts +2 -0
  238. package/core/dist/runtime-v2/intent/__tests__/intent-doc.test.d.ts.map +1 -0
  239. package/core/dist/runtime-v2/intent/__tests__/intent-doc.test.js +91 -0
  240. package/core/dist/runtime-v2/intent/__tests__/intent-doc.test.js.map +1 -0
  241. package/core/dist/runtime-v2/intent/__tests__/intent-friction-block.test.d.ts +2 -0
  242. package/core/dist/runtime-v2/intent/__tests__/intent-friction-block.test.d.ts.map +1 -0
  243. package/core/dist/runtime-v2/intent/__tests__/intent-friction-block.test.js +168 -0
  244. package/core/dist/runtime-v2/intent/__tests__/intent-friction-block.test.js.map +1 -0
  245. package/core/dist/runtime-v2/intent/__tests__/intent-patch-proposal.test.d.ts +2 -0
  246. package/core/dist/runtime-v2/intent/__tests__/intent-patch-proposal.test.d.ts.map +1 -0
  247. package/core/dist/runtime-v2/intent/__tests__/intent-patch-proposal.test.js +121 -0
  248. package/core/dist/runtime-v2/intent/__tests__/intent-patch-proposal.test.js.map +1 -0
  249. package/core/dist/runtime-v2/intent/index.d.ts +6 -0
  250. package/core/dist/runtime-v2/intent/index.d.ts.map +1 -0
  251. package/core/dist/runtime-v2/intent/index.js +6 -0
  252. package/core/dist/runtime-v2/intent/index.js.map +1 -0
  253. package/core/dist/runtime-v2/intent/intent-decision-record.d.ts +125 -0
  254. package/core/dist/runtime-v2/intent/intent-decision-record.d.ts.map +1 -0
  255. package/core/dist/runtime-v2/intent/intent-decision-record.js +21 -0
  256. package/core/dist/runtime-v2/intent/intent-decision-record.js.map +1 -0
  257. package/core/dist/runtime-v2/intent/intent-doc-reader-port.d.ts +95 -0
  258. package/core/dist/runtime-v2/intent/intent-doc-reader-port.d.ts.map +1 -0
  259. package/core/dist/runtime-v2/intent/intent-doc-reader-port.js +43 -0
  260. package/core/dist/runtime-v2/intent/intent-doc-reader-port.js.map +1 -0
  261. package/core/dist/runtime-v2/intent/intent-doc.d.ts +19 -0
  262. package/core/dist/runtime-v2/intent/intent-doc.d.ts.map +1 -0
  263. package/core/dist/runtime-v2/intent/intent-doc.js +70 -0
  264. package/core/dist/runtime-v2/intent/intent-doc.js.map +1 -0
  265. package/core/dist/runtime-v2/intent/intent-friction-block.d.ts +63 -0
  266. package/core/dist/runtime-v2/intent/intent-friction-block.d.ts.map +1 -0
  267. package/core/dist/runtime-v2/intent/intent-friction-block.js +129 -0
  268. package/core/dist/runtime-v2/intent/intent-friction-block.js.map +1 -0
  269. package/core/dist/runtime-v2/intent/intent-patch-proposal.d.ts +42 -0
  270. package/core/dist/runtime-v2/intent/intent-patch-proposal.d.ts.map +1 -0
  271. package/core/dist/runtime-v2/intent/intent-patch-proposal.js +81 -0
  272. package/core/dist/runtime-v2/intent/intent-patch-proposal.js.map +1 -0
  273. package/core/dist/runtime-v2/internalization/__tests__/__fixtures__/intent-tension-cases.d.ts +54 -0
  274. package/core/dist/runtime-v2/internalization/__tests__/__fixtures__/intent-tension-cases.d.ts.map +1 -0
  275. package/core/dist/runtime-v2/internalization/__tests__/__fixtures__/intent-tension-cases.js +219 -0
  276. package/core/dist/runtime-v2/internalization/__tests__/__fixtures__/intent-tension-cases.js.map +1 -0
  277. package/core/dist/runtime-v2/internalization/__tests__/c2-live-runner-chain.test.d.ts +2 -0
  278. package/core/dist/runtime-v2/internalization/__tests__/c2-live-runner-chain.test.d.ts.map +1 -0
  279. package/core/dist/runtime-v2/internalization/__tests__/c2-live-runner-chain.test.js +306 -0
  280. package/core/dist/runtime-v2/internalization/__tests__/c2-live-runner-chain.test.js.map +1 -0
  281. package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-intent-tension.test.d.ts +2 -0
  282. package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-intent-tension.test.d.ts.map +1 -0
  283. package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-intent-tension.test.js +360 -0
  284. package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-intent-tension.test.js.map +1 -0
  285. package/core/dist/runtime-v2/internalization/__tests__/diag-router-intent-tension.test.d.ts +2 -0
  286. package/core/dist/runtime-v2/internalization/__tests__/diag-router-intent-tension.test.d.ts.map +1 -0
  287. package/core/dist/runtime-v2/internalization/__tests__/diag-router-intent-tension.test.js +333 -0
  288. package/core/dist/runtime-v2/internalization/__tests__/diag-router-intent-tension.test.js.map +1 -0
  289. package/core/dist/runtime-v2/internalization/__tests__/intent-tension-cases.test.d.ts +2 -0
  290. package/core/dist/runtime-v2/internalization/__tests__/intent-tension-cases.test.d.ts.map +1 -0
  291. package/core/dist/runtime-v2/internalization/__tests__/intent-tension-cases.test.js +113 -0
  292. package/core/dist/runtime-v2/internalization/__tests__/intent-tension-cases.test.js.map +1 -0
  293. package/core/dist/runtime-v2/internalization/diag-rootcause-runner.d.ts +13 -0
  294. package/core/dist/runtime-v2/internalization/diag-rootcause-runner.d.ts.map +1 -1
  295. package/core/dist/runtime-v2/internalization/diag-rootcause-runner.js +42 -0
  296. package/core/dist/runtime-v2/internalization/diag-rootcause-runner.js.map +1 -1
  297. package/core/dist/runtime-v2/internalization/diag-router-runner.d.ts.map +1 -1
  298. package/core/dist/runtime-v2/internalization/diag-router-runner.js +27 -0
  299. package/core/dist/runtime-v2/internalization/diag-router-runner.js.map +1 -1
  300. package/core/dist/runtime-v2/internalization/index.d.ts +0 -16
  301. package/core/dist/runtime-v2/internalization/index.d.ts.map +1 -1
  302. package/core/dist/runtime-v2/internalization/index.js +0 -8
  303. package/core/dist/runtime-v2/internalization/index.js.map +1 -1
  304. package/core/dist/runtime-v2/pain-gate/__tests__/pain-diagnostic-gate-policy.test.d.ts +15 -0
  305. package/core/dist/runtime-v2/pain-gate/__tests__/pain-diagnostic-gate-policy.test.d.ts.map +1 -0
  306. package/core/dist/runtime-v2/pain-gate/__tests__/pain-diagnostic-gate-policy.test.js +179 -0
  307. package/core/dist/runtime-v2/pain-gate/__tests__/pain-diagnostic-gate-policy.test.js.map +1 -0
  308. package/core/dist/runtime-v2/pain-gate/index.d.ts +10 -0
  309. package/core/dist/runtime-v2/pain-gate/index.d.ts.map +1 -0
  310. package/core/dist/runtime-v2/pain-gate/index.js +9 -0
  311. package/core/dist/runtime-v2/pain-gate/index.js.map +1 -0
  312. package/core/dist/runtime-v2/pain-gate/pain-diagnostic-gate-policy.d.ts +121 -0
  313. package/core/dist/runtime-v2/pain-gate/pain-diagnostic-gate-policy.d.ts.map +1 -0
  314. package/core/dist/runtime-v2/pain-gate/pain-diagnostic-gate-policy.js +157 -0
  315. package/core/dist/runtime-v2/pain-gate/pain-diagnostic-gate-policy.js.map +1 -0
  316. package/core/dist/runtime-v2/pain-signal-bridge.d.ts.map +1 -1
  317. package/core/dist/runtime-v2/pain-signal-bridge.js +14 -88
  318. package/core/dist/runtime-v2/pain-signal-bridge.js.map +1 -1
  319. package/core/dist/runtime-v2/pain-signal-observability.d.ts.map +1 -1
  320. package/core/dist/runtime-v2/pain-signal-observability.js +272 -61
  321. package/core/dist/runtime-v2/pain-signal-observability.js.map +1 -1
  322. package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts +12 -0
  323. package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts.map +1 -1
  324. package/core/dist/runtime-v2/pain-signal-runtime-factory.js +1 -1
  325. package/core/dist/runtime-v2/pain-signal-runtime-factory.js.map +1 -1
  326. package/core/dist/runtime-v2/pain-to-principle-service.d.ts +6 -0
  327. package/core/dist/runtime-v2/pain-to-principle-service.d.ts.map +1 -1
  328. package/core/dist/runtime-v2/pain-to-principle-service.js +2 -0
  329. package/core/dist/runtime-v2/pain-to-principle-service.js.map +1 -1
  330. package/core/dist/runtime-v2/principle-tree/ledger-codec.js.map +1 -1
  331. package/core/dist/runtime-v2/proven-channel-baseline.js +1 -1
  332. package/core/dist/runtime-v2/proven-channel-baseline.js.map +1 -1
  333. package/core/dist/runtime-v2/store/artifact/__tests__/sqlite-pi-artifact-store-fk.test.d.ts +2 -0
  334. package/core/dist/runtime-v2/store/artifact/__tests__/sqlite-pi-artifact-store-fk.test.d.ts.map +1 -0
  335. package/core/dist/runtime-v2/store/artifact/__tests__/sqlite-pi-artifact-store-fk.test.js +55 -0
  336. package/core/dist/runtime-v2/store/artifact/__tests__/sqlite-pi-artifact-store-fk.test.js.map +1 -0
  337. package/core/dist/runtime-v2/store/artifact/sqlite-pi-artifact-store.d.ts.map +1 -1
  338. package/core/dist/runtime-v2/store/artifact/sqlite-pi-artifact-store.js +6 -0
  339. package/core/dist/runtime-v2/store/artifact/sqlite-pi-artifact-store.js.map +1 -1
  340. package/core/dist/runtime-v2/store/intent/__tests__/sqlite-intent-decision-store.test.d.ts +2 -0
  341. package/core/dist/runtime-v2/store/intent/__tests__/sqlite-intent-decision-store.test.d.ts.map +1 -0
  342. package/core/dist/runtime-v2/store/intent/__tests__/sqlite-intent-decision-store.test.js +272 -0
  343. package/core/dist/runtime-v2/store/intent/__tests__/sqlite-intent-decision-store.test.js.map +1 -0
  344. package/core/dist/runtime-v2/store/intent/index.d.ts +6 -0
  345. package/core/dist/runtime-v2/store/intent/index.d.ts.map +1 -0
  346. package/core/dist/runtime-v2/store/intent/index.js +5 -0
  347. package/core/dist/runtime-v2/store/intent/index.js.map +1 -0
  348. package/core/dist/runtime-v2/store/intent/sqlite-intent-decision-store.d.ts +51 -0
  349. package/core/dist/runtime-v2/store/intent/sqlite-intent-decision-store.d.ts.map +1 -0
  350. package/core/dist/runtime-v2/store/intent/sqlite-intent-decision-store.js +306 -0
  351. package/core/dist/runtime-v2/store/intent/sqlite-intent-decision-store.js.map +1 -0
  352. package/core/dist/runtime-v2/store/sqlite-connection-pragma.test.js +14 -3
  353. package/core/dist/runtime-v2/store/sqlite-connection-pragma.test.js.map +1 -1
  354. package/core/dist/runtime-v2/store/sqlite-connection-schema-version.test.d.ts +2 -0
  355. package/core/dist/runtime-v2/store/sqlite-connection-schema-version.test.d.ts.map +1 -0
  356. package/core/dist/runtime-v2/store/sqlite-connection-schema-version.test.js +72 -0
  357. package/core/dist/runtime-v2/store/sqlite-connection-schema-version.test.js.map +1 -0
  358. package/core/dist/runtime-v2/store/sqlite-connection.d.ts +27 -0
  359. package/core/dist/runtime-v2/store/sqlite-connection.d.ts.map +1 -1
  360. package/core/dist/runtime-v2/store/sqlite-connection.js +124 -12
  361. package/core/dist/runtime-v2/store/sqlite-connection.js.map +1 -1
  362. package/core/dist/runtime-v2/types/event-payload.d.ts +1 -20
  363. package/core/dist/runtime-v2/types/event-payload.d.ts.map +1 -1
  364. package/core/dist/runtime-v2/types/event-payload.js +0 -12
  365. package/core/dist/runtime-v2/types/event-payload.js.map +1 -1
  366. package/core/dist/runtime-v2/types/event-types.d.ts +5 -61
  367. package/core/dist/runtime-v2/types/event-types.d.ts.map +1 -1
  368. package/core/dist/runtime-v2/types/event-types.js +2 -36
  369. package/core/dist/runtime-v2/types/event-types.js.map +1 -1
  370. package/core/dist/runtime-v2/types/evidence-chain-contract.d.ts +63 -0
  371. package/core/dist/runtime-v2/types/evidence-chain-contract.d.ts.map +1 -1
  372. package/core/dist/runtime-v2/types/evidence-chain-contract.js +234 -9
  373. package/core/dist/runtime-v2/types/evidence-chain-contract.js.map +1 -1
  374. package/core/dist/runtime-v2/types/index.d.ts +5 -5
  375. package/core/dist/runtime-v2/types/index.d.ts.map +1 -1
  376. package/core/dist/runtime-v2/types/index.js +7 -3
  377. package/core/dist/runtime-v2/types/index.js.map +1 -1
  378. package/core/dist/runtime-v2/types/ledger-store.d.ts +30 -30
  379. package/core/dist/runtime-v2/types/ledger-store.d.ts.map +1 -1
  380. package/core/dist/runtime-v2/types/ledger-store.js +10 -5
  381. package/core/dist/runtime-v2/types/ledger-store.js.map +1 -1
  382. package/core/dist/runtime-v2/types/pain-signal.d.ts +2 -2
  383. package/core/dist/runtime-v2/types/pain-signal.js +2 -2
  384. package/core/dist/workflow-funnel-loader.d.ts +2 -2
  385. package/core/dist/workflow-funnel-loader.d.ts.map +1 -1
  386. package/dist/installer.d.ts.map +1 -1
  387. package/dist/installer.js +16 -0
  388. package/dist/installer.js.map +1 -1
  389. package/dist/mvp-config.d.ts +0 -10
  390. package/dist/mvp-config.d.ts.map +1 -1
  391. package/dist/mvp-config.js +0 -65
  392. package/dist/mvp-config.js.map +1 -1
  393. package/package.json +1 -1
  394. package/pd-cli/dist/commands/__tests__/intent-flag-wiring.test.d.ts +9 -0
  395. package/pd-cli/dist/commands/__tests__/intent-flag-wiring.test.d.ts.map +1 -0
  396. package/pd-cli/dist/commands/__tests__/intent-flag-wiring.test.js +166 -0
  397. package/pd-cli/dist/commands/__tests__/intent-flag-wiring.test.js.map +1 -0
  398. package/pd-cli/dist/commands/intent.d.ts +59 -0
  399. package/pd-cli/dist/commands/intent.d.ts.map +1 -0
  400. package/pd-cli/dist/commands/intent.js +350 -0
  401. package/pd-cli/dist/commands/intent.js.map +1 -0
  402. package/pd-cli/dist/commands/mvp-smoke.js +1 -1
  403. package/pd-cli/dist/commands/mvp-smoke.js.map +1 -1
  404. package/pd-cli/dist/commands/rulecode.js +1 -1
  405. package/pd-cli/dist/commands/rulecode.js.map +1 -1
  406. package/pd-cli/dist/commands/runtime-canary.d.ts.map +1 -1
  407. package/pd-cli/dist/commands/runtime-canary.js +10 -11
  408. package/pd-cli/dist/commands/runtime-canary.js.map +1 -1
  409. package/pd-cli/dist/commands/runtime-init.d.ts +43 -0
  410. package/pd-cli/dist/commands/runtime-init.d.ts.map +1 -0
  411. package/pd-cli/dist/commands/runtime-init.js +264 -0
  412. package/pd-cli/dist/commands/runtime-init.js.map +1 -0
  413. package/pd-cli/dist/commands/runtime-internalization-queue.d.ts.map +1 -1
  414. package/pd-cli/dist/commands/runtime-internalization-queue.js +13 -16
  415. package/pd-cli/dist/commands/runtime-internalization-queue.js.map +1 -1
  416. package/pd-cli/dist/commands/runtime-internalization-run-once.d.ts.map +1 -1
  417. package/pd-cli/dist/commands/runtime-internalization-run-once.js +3 -0
  418. package/pd-cli/dist/commands/runtime-internalization-run-once.js.map +1 -1
  419. package/pd-cli/dist/commands/runtime-internalization-run-rulehost.d.ts.map +1 -1
  420. package/pd-cli/dist/commands/runtime-internalization-run-rulehost.js +61 -7
  421. package/pd-cli/dist/commands/runtime-internalization-run-rulehost.js.map +1 -1
  422. package/pd-cli/dist/commands/runtime.js +1 -1
  423. package/pd-cli/dist/commands/runtime.js.map +1 -1
  424. package/pd-cli/dist/index.js +92 -34
  425. package/pd-cli/dist/index.js.map +1 -1
  426. package/pd-cli/dist/services/__tests__/rulehost-readiness.test.d.ts +2 -0
  427. package/pd-cli/dist/services/__tests__/rulehost-readiness.test.d.ts.map +1 -0
  428. package/pd-cli/dist/services/__tests__/rulehost-readiness.test.js +314 -0
  429. package/pd-cli/dist/services/__tests__/rulehost-readiness.test.js.map +1 -0
  430. package/pd-cli/dist/services/__tests__/runtime-adapter-resolver.test.js +20 -12
  431. package/pd-cli/dist/services/__tests__/runtime-adapter-resolver.test.js.map +1 -1
  432. package/pd-cli/dist/services/demo-story-a-runner.d.ts.map +1 -1
  433. package/pd-cli/dist/services/demo-story-a-runner.js +6 -0
  434. package/pd-cli/dist/services/demo-story-a-runner.js.map +1 -1
  435. package/pd-cli/dist/services/rulehost-readiness.d.ts +62 -0
  436. package/pd-cli/dist/services/rulehost-readiness.d.ts.map +1 -0
  437. package/pd-cli/dist/services/rulehost-readiness.js +214 -0
  438. package/pd-cli/dist/services/rulehost-readiness.js.map +1 -0
  439. package/pd-cli/dist/services/runtime-adapter-resolver.d.ts +1 -1
  440. package/pd-cli/dist/services/runtime-adapter-resolver.js +3 -3
  441. package/pd-cli/dist/services/runtime-adapter-resolver.js.map +1 -1
  442. package/pd-cli/package.json +1 -0
  443. package/plugin/dist/commands/evolution-status.js +0 -2
  444. package/plugin/dist/commands/pain.js +2 -0
  445. package/plugin/dist/core/control-ui-db.d.ts +11 -0
  446. package/plugin/dist/core/control-ui-db.js +40 -16
  447. package/plugin/dist/core/detection-funnel.d.ts +25 -11
  448. package/plugin/dist/core/detection-funnel.js +32 -80
  449. package/plugin/dist/core/event-log.d.ts +1 -3
  450. package/plugin/dist/core/event-log.js +5 -21
  451. package/plugin/dist/core/evolution-reducer.d.ts +0 -8
  452. package/plugin/dist/core/evolution-reducer.js +9 -19
  453. package/plugin/dist/core/intent-doc-reader-adapter.d.ts +28 -0
  454. package/plugin/dist/core/intent-doc-reader-adapter.js +56 -0
  455. package/plugin/dist/core/intent-doc-reader.d.ts +80 -0
  456. package/plugin/dist/core/intent-doc-reader.js +189 -0
  457. package/plugin/dist/core/pain-diagnostic-gate.d.ts +37 -28
  458. package/plugin/dist/core/pain-diagnostic-gate.js +53 -89
  459. package/plugin/dist/core/pain.d.ts +0 -63
  460. package/plugin/dist/core/pain.js +0 -167
  461. package/plugin/dist/core/paths.d.ts +0 -1
  462. package/plugin/dist/core/paths.js +2 -1
  463. package/plugin/dist/core/principle-tree-ledger.d.ts +27 -79
  464. package/plugin/dist/core/principle-tree-ledger.js +39 -524
  465. package/plugin/dist/core/reflection/reflection-context.d.ts +2 -2
  466. package/plugin/dist/core/schema/migrations/001-init-trajectory.js +3 -6
  467. package/plugin/dist/core/schema/schema-definitions.js +4 -9
  468. package/plugin/dist/core/trajectory.d.ts +16 -16
  469. package/plugin/dist/core/trajectory.js +338 -311
  470. package/plugin/dist/core/workspace-context.d.ts +2 -3
  471. package/plugin/dist/hooks/after-tool-call-helpers.d.ts +4 -1
  472. package/plugin/dist/hooks/after-tool-call-helpers.js +13 -17
  473. package/plugin/dist/hooks/gate-block-helper.js +57 -17
  474. package/plugin/dist/hooks/lifecycle.js +3 -6
  475. package/plugin/dist/hooks/llm.js +66 -26
  476. package/plugin/dist/hooks/pain.d.ts +3 -1
  477. package/plugin/dist/hooks/pain.js +124 -49
  478. package/plugin/dist/hooks/prompt-helpers.d.ts +105 -0
  479. package/plugin/dist/hooks/prompt-helpers.js +288 -0
  480. package/plugin/dist/hooks/prompt-types.d.ts +74 -0
  481. package/plugin/dist/hooks/prompt-types.js +12 -0
  482. package/plugin/dist/hooks/prompt.d.ts +7 -38
  483. package/plugin/dist/hooks/prompt.js +433 -338
  484. package/plugin/dist/hooks/raw-observation-adapter.d.ts +9 -50
  485. package/plugin/dist/hooks/raw-observation-adapter.js +9 -164
  486. package/plugin/dist/hooks/raw-observation-types.d.ts +6 -57
  487. package/plugin/dist/hooks/raw-observation-types.js +5 -9
  488. package/plugin/dist/hooks/triage-adapter.js +6 -26
  489. package/plugin/dist/hooks/trigger-cooldown-tracker.d.ts +12 -0
  490. package/plugin/dist/hooks/trigger-cooldown-tracker.js +25 -0
  491. package/plugin/dist/index.d.ts +3 -1
  492. package/plugin/dist/index.js +9 -5
  493. package/plugin/dist/service/evolution-worker.js +6 -64
  494. package/plugin/dist/service/runtime-summary-service.d.ts +0 -2
  495. package/plugin/dist/service/runtime-summary-service.js +1 -5
  496. package/plugin/dist/service/subagent-workflow/workflow-store.d.ts +14 -0
  497. package/plugin/dist/service/subagent-workflow/workflow-store.js +91 -2
  498. package/plugin/dist/types/event-types.d.ts +1 -1
  499. package/plugin/package.json +6 -3
  500. package/plugin/scripts/acceptance-test.mjs +3 -3
  501. package/plugin/scripts/sync-plugin.mjs +33 -22
  502. package/plugin/templates/langs/en/skills/pd-cli-operator/SKILL.md +20 -11
  503. package/plugin/templates/langs/en/skills/pd-runtime-v2/SKILL.md +10 -0
  504. package/plugin/templates/langs/zh/skills/pd-cli-operator/SKILL.md +20 -11
  505. package/plugin/templates/langs/zh/skills/pd-runtime-v2/SKILL.md +10 -0
  506. package/console/dist/server/config/feature-flags.d.ts +0 -25
  507. package/console/dist/server/config/feature-flags.js +0 -101
  508. package/pd-cli/dist/commands/central-sync.d.ts +0 -10
  509. package/pd-cli/dist/commands/central-sync.d.ts.map +0 -1
  510. package/pd-cli/dist/commands/central-sync.js +0 -32
  511. package/pd-cli/dist/commands/central-sync.js.map +0 -1
  512. package/pd-cli/dist/services/feature-flag-loader.d.ts +0 -6
  513. package/pd-cli/dist/services/feature-flag-loader.d.ts.map +0 -1
  514. package/pd-cli/dist/services/feature-flag-loader.js +0 -53
  515. package/pd-cli/dist/services/feature-flag-loader.js.map +0 -1
  516. package/plugin/dist/core/observability.d.ts +0 -40
  517. package/plugin/dist/core/observability.js +0 -164
  518. package/plugin/dist/core/principle-tree-ledger-adapter.d.ts +0 -32
  519. package/plugin/dist/core/principle-tree-ledger-adapter.js +0 -125
  520. package/plugin/dist/hooks/subagent.d.ts +0 -9
  521. package/plugin/dist/hooks/subagent.js +0 -122
  522. package/plugin/dist/service/central-database.d.ts +0 -138
  523. package/plugin/dist/service/central-database.js +0 -731
  524. package/plugin/dist/service/central-sync-service.d.ts +0 -8
  525. package/plugin/dist/service/central-sync-service.js +0 -71
  526. package/plugin/scripts/validate-live-path.ts +0 -480
@@ -0,0 +1,219 @@
1
+ // ── §23.6 Positive cases (4) ────────────────────────────────────────────────
2
+ // Expect: source = action_drift | healthy_tension; evidenceStrength ≥ moderate
3
+ const POSITIVE_CASE_1 = {
4
+ id: 'pos-01-heavy-dashboard-in-mvp',
5
+ category: 'positive',
6
+ scenario: 'Agent builds a heavy analytics dashboard during MVP stage.',
7
+ flagOffDiagnosis: {
8
+ summary: 'Agent over-engineered a dashboard feature.',
9
+ rootCause: 'Design: Agent expanded scope beyond the minimal viable loop.',
10
+ intentTension: undefined,
11
+ },
12
+ flagOnExpectedIntentTension: {
13
+ source: 'action_drift',
14
+ evidenceStrength: 'moderate',
15
+ relatedIntentFields: ['current_strategic_focus', 'non_negotiables'],
16
+ evidence: [
17
+ 'INTENT says current focus is validating the smallest Pain → Principle loop.',
18
+ 'Agent designed a heavy dashboard with multiple chart types.',
19
+ 'Owner correction says the result increased review burden.',
20
+ ],
21
+ explanation: 'The work may be useful later, but it optimized presentation completeness before validating the current learning loop.',
22
+ suggestedOwnerAction: 'confirm_drift',
23
+ intentDocHash: 'sha256:fixture-pos-01',
24
+ },
25
+ ownerExpectedJudgment: 'Confirm drift — pause dashboard expansion, refocus on the minimal loop.',
26
+ };
27
+ const POSITIVE_CASE_2 = {
28
+ id: 'pos-02-large-scope-expansion',
29
+ category: 'positive',
30
+ scenario: 'Agent greatly expands task scope beyond the Owner-stated boundary.',
31
+ flagOffDiagnosis: {
32
+ summary: 'Agent expanded scope without approval.',
33
+ rootCause: 'People: Agent did not check scope boundaries before acting.',
34
+ intentTension: undefined,
35
+ },
36
+ flagOnExpectedIntentTension: {
37
+ source: 'action_drift',
38
+ evidenceStrength: 'strong',
39
+ relatedIntentFields: ['non_negotiables', 'stop_escalation'],
40
+ evidence: [
41
+ 'INTENT non_negotiables explicitly forbids autonomous scope expansion.',
42
+ 'Agent added three unrelated modules in one PR.',
43
+ 'The escalation crossed the stop_escalation boundary.',
44
+ ],
45
+ explanation: 'The action directly violated a non-negotiable boundary and crossed the stop_escalation threshold.',
46
+ suggestedOwnerAction: 'confirm_drift',
47
+ intentDocHash: 'sha256:fixture-pos-02',
48
+ },
49
+ ownerExpectedJudgment: 'Confirm drift — revert the out-of-scope modules, re-state the boundary.',
50
+ };
51
+ const POSITIVE_CASE_3 = {
52
+ id: 'pos-03-too-many-candidate-principles',
53
+ category: 'positive',
54
+ scenario: 'Agent generates an excessive number of candidate principles, increasing Owner attention load.',
55
+ flagOffDiagnosis: {
56
+ summary: 'Agent produced too many candidate principles.',
57
+ rootCause: 'Design: Principle generation lacked prioritization against Owner attention budget.',
58
+ intentTension: undefined,
59
+ },
60
+ flagOnExpectedIntentTension: {
61
+ source: 'action_drift',
62
+ evidenceStrength: 'moderate',
63
+ relatedIntentFields: ['current_strategic_focus'],
64
+ evidence: [
65
+ 'INTENT current_strategic_focus prioritizes a single validated principle.',
66
+ 'Agent emitted 7 candidate principles in one run.',
67
+ 'Owner has corrected this pattern twice before.',
68
+ ],
69
+ explanation: 'Flooding the review queue conflicts with the focus on a single validated principle.',
70
+ suggestedOwnerAction: 'confirm_drift',
71
+ intentDocHash: 'sha256:fixture-pos-03',
72
+ },
73
+ ownerExpectedJudgment: 'Confirm drift — collapse candidates into one, defer the rest.',
74
+ };
75
+ const POSITIVE_CASE_4 = {
76
+ id: 'pos-04-correct-but-wrong-stage-refactor',
77
+ category: 'positive',
78
+ scenario: 'Agent performs a technically correct but stage-inappropriate large refactor.',
79
+ flagOffDiagnosis: {
80
+ summary: 'Agent did a large refactor.',
81
+ rootCause: 'Design: Refactor was technically sound but mistimed.',
82
+ intentTension: undefined,
83
+ },
84
+ flagOnExpectedIntentTension: {
85
+ source: 'healthy_tension',
86
+ evidenceStrength: 'moderate',
87
+ relatedIntentFields: ['current_strategic_focus', 'why'],
88
+ evidence: [
89
+ 'INTENT why states the current stage is finding product-market fit, not hardening.',
90
+ 'The refactor improves code quality but does not advance the current focus.',
91
+ 'Owner acknowledged the value but deferred it.',
92
+ ],
93
+ explanation: 'Genuine strategic trade-off: the work is valuable but optimizing for the wrong stage.',
94
+ suggestedOwnerAction: 'observe',
95
+ intentDocHash: 'sha256:fixture-pos-04',
96
+ },
97
+ ownerExpectedJudgment: 'Observe — acknowledge value, defer until the focus shifts to hardening.',
98
+ };
99
+ // ── §23.7 Negative cases (4) ────────────────────────────────────────────────
100
+ // Expect: source = none; no intent_suspect; no revise_intent
101
+ const NEGATIVE_CASE_1 = {
102
+ id: 'neg-01-ordinary-test-failure',
103
+ category: 'negative',
104
+ scenario: 'An ordinary unit test failure with no INTENT relevance.',
105
+ flagOffDiagnosis: {
106
+ summary: 'A unit test failed due to a stale mock.',
107
+ rootCause: 'Tooling: Test mock was not updated after API change.',
108
+ intentTension: undefined,
109
+ },
110
+ flagOnExpectedIntentTension: null,
111
+ ownerExpectedJudgment: 'No intent tension — fix the mock and move on.',
112
+ };
113
+ const NEGATIVE_CASE_2 = {
114
+ id: 'neg-02-small-code-cleanup',
115
+ category: 'negative',
116
+ scenario: 'Small-scope code cleanup that does not touch INTENT boundaries.',
117
+ flagOffDiagnosis: {
118
+ summary: 'Agent renamed a few local variables for clarity.',
119
+ rootCause: 'Design: Minor readability improvement.',
120
+ intentTension: undefined,
121
+ },
122
+ flagOnExpectedIntentTension: null,
123
+ ownerExpectedJudgment: 'No intent tension — accept the cleanup.',
124
+ };
125
+ const NEGATIVE_CASE_3 = {
126
+ id: 'neg-03-on-focus-feature-progress',
127
+ category: 'negative',
128
+ scenario: 'Feature progress that aligns with the INTENT current focus.',
129
+ flagOffDiagnosis: {
130
+ summary: 'Agent implemented the next step of the focus feature.',
131
+ rootCause: 'Design: Aligned incremental progress.',
132
+ intentTension: undefined,
133
+ },
134
+ flagOnExpectedIntentTension: null,
135
+ ownerExpectedJudgment: 'No intent tension — continue.',
136
+ };
137
+ const NEGATIVE_CASE_4 = {
138
+ id: 'neg-04-alternative-proposal-no-intent-evidence',
139
+ category: 'negative',
140
+ scenario: 'Agent proposes an alternative approach, but there is no evidence the INTENT is stale.',
141
+ flagOffDiagnosis: {
142
+ summary: 'Agent proposed an alternative implementation.',
143
+ rootCause: 'Design: Alternative considered and rejected.',
144
+ intentTension: undefined,
145
+ },
146
+ flagOnExpectedIntentTension: null,
147
+ ownerExpectedJudgment: 'No intent tension — the proposal is valid exploration, not drift evidence.',
148
+ };
149
+ // ── §23.8 intent_suspect special cases (2) ──────────────────────────────────
150
+ // Expect: source = intent_suspect; suggestedOwnerAction = revise_intent
151
+ const INTENT_SUSPECT_CASE_1 = {
152
+ id: 'suspect-01-vague-desired-outcome',
153
+ category: 'intent_suspect',
154
+ scenario: 'INTENT Desired Outcome is too vague ("Make product better").',
155
+ flagOffDiagnosis: {
156
+ summary: 'Diagnosis could not anchor on a concrete outcome.',
157
+ rootCause: 'Assumption: Outcome statement lacked testable criteria.',
158
+ intentTension: undefined,
159
+ },
160
+ flagOnExpectedIntentTension: {
161
+ source: 'intent_suspect',
162
+ evidenceStrength: 'moderate',
163
+ relatedIntentFields: ['desired_outcome'],
164
+ evidence: [
165
+ 'INTENT desired_outcome is "Make product better".',
166
+ 'This statement admits any action as aligned.',
167
+ 'Two recent Pain signals conflicted on whether scope expansion was drift.',
168
+ ],
169
+ explanation: 'The Desired Outcome is too vague to distinguish drift from healthy exploration — the INTENT itself needs revision.',
170
+ suggestedOwnerAction: 'revise_intent',
171
+ intentDocHash: 'sha256:fixture-suspect-01',
172
+ },
173
+ ownerExpectedJudgment: 'Revise INTENT — make the desired outcome concrete and testable.',
174
+ };
175
+ const INTENT_SUSPECT_CASE_2 = {
176
+ id: 'suspect-02-intent-conflicts-with-confirmed-pain-patterns',
177
+ category: 'intent_suspect',
178
+ scenario: 'INTENT conflicts with multiple confirmed Pain patterns.',
179
+ flagOffDiagnosis: {
180
+ summary: 'Diagnosis found repeated friction with the stated focus.',
181
+ rootCause: 'Assumption: Stated focus may be outdated.',
182
+ intentTension: undefined,
183
+ },
184
+ flagOnExpectedIntentTension: {
185
+ source: 'intent_suspect',
186
+ evidenceStrength: 'strong',
187
+ relatedIntentFields: ['current_strategic_focus', 'non_negotiables'],
188
+ evidence: [
189
+ 'INTENT current_strategic_focus says "ship the minimal loop".',
190
+ 'Three confirmed Pain patterns show the minimal loop cannot unblock users.',
191
+ 'Owner has twice manually redirected around the stated focus.',
192
+ ],
193
+ explanation: 'The stated focus conflicts with confirmed field evidence — the INTENT is likely stale and should be revised.',
194
+ suggestedOwnerAction: 'revise_intent',
195
+ intentDocHash: 'sha256:fixture-suspect-02',
196
+ },
197
+ ownerExpectedJudgment: 'Revise INTENT — update the current focus to reflect field evidence.',
198
+ };
199
+ // ── Exported dataset ─────────────────────────────────────────────────────────
200
+ export const INTENT_TENSION_CASES = [
201
+ POSITIVE_CASE_1,
202
+ POSITIVE_CASE_2,
203
+ POSITIVE_CASE_3,
204
+ POSITIVE_CASE_4,
205
+ NEGATIVE_CASE_1,
206
+ NEGATIVE_CASE_2,
207
+ NEGATIVE_CASE_3,
208
+ NEGATIVE_CASE_4,
209
+ INTENT_SUSPECT_CASE_1,
210
+ INTENT_SUSPECT_CASE_2,
211
+ ];
212
+ /** Count assertions for SPEC §23.5 composition (used by the fixtures test). */
213
+ export const INTENT_TENSION_CASE_COUNTS = {
214
+ total: INTENT_TENSION_CASES.length,
215
+ positive: INTENT_TENSION_CASES.filter((c) => c.category === 'positive').length,
216
+ negative: INTENT_TENSION_CASES.filter((c) => c.category === 'negative').length,
217
+ intent_suspect: INTENT_TENSION_CASES.filter((c) => c.category === 'intent_suspect').length,
218
+ };
219
+ //# sourceMappingURL=intent-tension-cases.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intent-tension-cases.js","sourceRoot":"","sources":["../../../../../src/runtime-v2/internalization/__tests__/__fixtures__/intent-tension-cases.ts"],"names":[],"mappings":"AA+CA,+EAA+E;AAC/E,+EAA+E;AAE/E,MAAM,eAAe,GAAsB;IACzC,EAAE,EAAE,+BAA+B;IACnC,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,4DAA4D;IACtE,gBAAgB,EAAE;QAChB,OAAO,EAAE,4CAA4C;QACrD,SAAS,EAAE,8DAA8D;QACzE,aAAa,EAAE,SAAS;KACzB;IACD,2BAA2B,EAAE;QAC3B,MAAM,EAAE,cAAc;QACtB,gBAAgB,EAAE,UAAU;QAC5B,mBAAmB,EAAE,CAAC,yBAAyB,EAAE,iBAAiB,CAAC;QACnE,QAAQ,EAAE;YACR,6EAA6E;YAC7E,6DAA6D;YAC7D,2DAA2D;SAC5D;QACD,WAAW,EACT,uHAAuH;QACzH,oBAAoB,EAAE,eAAe;QACrC,aAAa,EAAE,uBAAuB;KACvC;IACD,qBAAqB,EAAE,yEAAyE;CACjG,CAAC;AAEF,MAAM,eAAe,GAAsB;IACzC,EAAE,EAAE,8BAA8B;IAClC,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,oEAAoE;IAC9E,gBAAgB,EAAE;QAChB,OAAO,EAAE,wCAAwC;QACjD,SAAS,EAAE,6DAA6D;QACxE,aAAa,EAAE,SAAS;KACzB;IACD,2BAA2B,EAAE;QAC3B,MAAM,EAAE,cAAc;QACtB,gBAAgB,EAAE,QAAQ;QAC1B,mBAAmB,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;QAC3D,QAAQ,EAAE;YACR,uEAAuE;YACvE,gDAAgD;YAChD,sDAAsD;SACvD;QACD,WAAW,EACT,mGAAmG;QACrG,oBAAoB,EAAE,eAAe;QACrC,aAAa,EAAE,uBAAuB;KACvC;IACD,qBAAqB,EAAE,y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IAC9E,QAAQ,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC,MAAM;IAC9E,cAAc,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,gBAAgB,CAAC,CAAC,MAAM;CAClF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=c2-live-runner-chain.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"c2-live-runner-chain.test.d.ts","sourceRoot":"","sources":["../../../../src/runtime-v2/internalization/__tests__/c2-live-runner-chain.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,306 @@
1
+ /**
2
+ * C2-P0 Pinning Test: Live MVP Runner Chain (PRI-457)
3
+ *
4
+ * Asserts the actual successor task chain created in the real store matches
5
+ * the documented live runner chain for each MVP activation channel.
6
+ *
7
+ * ERR Gate:
8
+ * - ERR-004 / ERR-008 / EP-07: successor task kinds are read from the real
9
+ * store after commitNextTaskProposal, not inferred from ALLOWED_EDGES.
10
+ * - EP-09: uses real InternalizationOrchestrator + RuntimeStateManager (SQLite),
11
+ * not a hand-written expected-edge list.
12
+ *
13
+ * This test is the regression guard for C2-P2 (de-surface Quiet runners).
14
+ * If the live chain ever diverges from the documented MVP chain, CI fails.
15
+ */
16
+ import { describe, it, expect, beforeEach, afterEach } from 'vitest';
17
+ import * as fs from 'fs';
18
+ import * as path from 'path';
19
+ import * as os from 'os';
20
+ import { RuntimeStateManager } from '../../store/runtime-state-manager.js';
21
+ import { InternalizationOrchestrator } from '../internalization-orchestrator.js';
22
+ import { buildDreamerTaskSeed, computeBridgeDecision, } from '../intake-to-internalization-bridge.js';
23
+ // ── Test constants ───────────────────────────────────────────────────────────
24
+ const OWNER = 'test-c2-p0';
25
+ const RUNTIME_KIND = 'test-double';
26
+ /**
27
+ * The expected live runner chain under default config, per channel.
28
+ *
29
+ * This is the ASSERTION target — the test verifies that the real store
30
+ * contains these successor task kinds after each commitNextTaskProposal call.
31
+ *
32
+ * Source: docs/plans/2026-06-mvp-slimming-candidates-1-2/c2-live-runner-chain.md
33
+ */
34
+ const EXPECTED_CHAIN = [
35
+ 'dreamer',
36
+ 'philosopher',
37
+ 'scribe',
38
+ 'artificer',
39
+ 'evaluator',
40
+ 'rollout_reviewer',
41
+ ];
42
+ /**
43
+ * Seed a dreamer task through the real intake bridge path.
44
+ *
45
+ * Uses buildDreamerTaskSeed (the same function the production intake bridge
46
+ * calls) to generate the diagnosticJson, then creates the task in the real
47
+ * store. This is the real seeding path — not a hand-built task record.
48
+ */
49
+ async function seedDreamerTask(stateManager, options) {
50
+ const { candidateId, channel, sourceTaskId } = options;
51
+ const bridgeInput = {
52
+ candidateId,
53
+ recommendationKind: channel === 'code_tool_hook' ? 'rule' : 'principle',
54
+ route: channel === 'code_tool_hook' ? 'rule-candidate' : 'principle-ledger',
55
+ ready: true,
56
+ sourceTaskId,
57
+ sourceArtifactId: sourceTaskId ? `art-${sourceTaskId}` : undefined,
58
+ sourceRunId: sourceTaskId ? `run-${sourceTaskId}` : undefined,
59
+ };
60
+ const seed = buildDreamerTaskSeed(bridgeInput);
61
+ if ('decision' in seed) {
62
+ // BridgeDecision has 4 variants; only not_internalizable/invalid_candidate carry reason.
63
+ const reason = 'reason' in seed ? seed.reason : seed.decision;
64
+ throw new Error(`Failed to seed dreamer task: ${reason}`);
65
+ }
66
+ await stateManager.createTask({
67
+ taskId: seed.taskId,
68
+ taskKind: seed.taskKind,
69
+ status: seed.status,
70
+ attemptCount: seed.attemptCount,
71
+ maxAttempts: seed.maxAttempts,
72
+ diagnosticJson: seed.diagnosticJson,
73
+ inputRef: undefined,
74
+ resultRef: undefined,
75
+ lastError: undefined,
76
+ leaseOwner: undefined,
77
+ leaseExpiresAt: undefined,
78
+ });
79
+ return seed.taskId;
80
+ }
81
+ /**
82
+ * Transition a task from pending → leased → succeeded.
83
+ *
84
+ * This simulates what the auto-consumer / CLI does when a runner completes
85
+ * successfully. The orchestrator's commitNextTaskProposal requires the source
86
+ * task to be in 'succeeded' status.
87
+ */
88
+ async function simulateTaskSuccess(stateManager, taskId) {
89
+ await stateManager.acquireLease({
90
+ taskId,
91
+ owner: OWNER,
92
+ runtimeKind: RUNTIME_KIND,
93
+ });
94
+ await stateManager.markTaskSucceeded(taskId);
95
+ }
96
+ /**
97
+ * Read the actual successor task from the store after commitNextTaskProposal.
98
+ *
99
+ * EP-07 compliance: reads the REAL successor record from the store, not a
100
+ * hand-written expected value. The assertion compares the actual taskKind
101
+ * from the store against the expected chain.
102
+ */
103
+ async function readActualSuccessor(stateManager, successorTaskId) {
104
+ const task = await stateManager.getTask(successorTaskId);
105
+ if (!task) {
106
+ throw new Error(`Successor task ${successorTaskId} not found in store`);
107
+ }
108
+ return {
109
+ taskId: task.taskId,
110
+ taskKind: task.taskKind,
111
+ status: task.status,
112
+ };
113
+ }
114
+ /**
115
+ * Walk the full successor chain from a seeded dreamer task, returning the
116
+ * actual task kinds observed in the store.
117
+ *
118
+ * EP-07: every successor is read from the real store via readActualSuccessor.
119
+ */
120
+ async function walkFullChain(stateManager, orchestrator, dreamerTaskId) {
121
+ let currentTaskId = dreamerTaskId;
122
+ const actualChain = ['dreamer'];
123
+ for (let i = 0; i < EXPECTED_CHAIN.length - 1; i++) {
124
+ const expectedNextKind = EXPECTED_CHAIN[i + 1];
125
+ if (!expectedNextKind) {
126
+ throw new Error(`EXPECTED_CHAIN[${i + 1}] is undefined`);
127
+ }
128
+ await simulateTaskSuccess(stateManager, currentTaskId);
129
+ const commitResult = await orchestrator.commitNextTaskProposal(currentTaskId);
130
+ if (commitResult.decision !== 'successor_created') {
131
+ throw new Error(`Expected successor_created at chain step ${i}, got ${commitResult.decision}`);
132
+ }
133
+ expect(commitResult.successorKind).toBe(expectedNextKind);
134
+ const actualSuccessor = await readActualSuccessor(stateManager, commitResult.successorTaskId);
135
+ expect(actualSuccessor.taskKind).toBe(expectedNextKind);
136
+ expect(actualSuccessor.status).toBe('pending');
137
+ actualChain.push(actualSuccessor.taskKind);
138
+ currentTaskId = commitResult.successorTaskId;
139
+ }
140
+ // Terminal runner has no successor
141
+ await simulateTaskSuccess(stateManager, currentTaskId);
142
+ const terminalCommit = await orchestrator.commitNextTaskProposal(currentTaskId);
143
+ expect(terminalCommit.decision).toBe('no_successor');
144
+ return actualChain;
145
+ }
146
+ // ── Tests ────────────────────────────────────────────────────────────────────
147
+ describe('PRI-457 C2-P0: Live MVP runner chain pinning test', () => {
148
+ let tmpDir;
149
+ let stateManager;
150
+ let orchestrator;
151
+ beforeEach(async () => {
152
+ tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'pd-c2-p0-chain-'));
153
+ stateManager = new RuntimeStateManager({ workspaceDir: tmpDir });
154
+ await stateManager.initialize();
155
+ orchestrator = new InternalizationOrchestrator({ stateManager }, { owner: OWNER, runtimeKind: RUNTIME_KIND, dryRun: true });
156
+ });
157
+ afterEach(async () => {
158
+ await stateManager.close();
159
+ fs.rmSync(tmpDir, { recursive: true, force: true });
160
+ });
161
+ // ── Channel: prompt ──────────────────────────────────────────────────────
162
+ it('prompt channel: full successor chain dreamer→philosopher→scribe→artificer→evaluator→rollout_reviewer', async () => {
163
+ const dreamerTaskId = await seedDreamerTask(stateManager, {
164
+ candidateId: `cand-prompt-${Date.now()}`,
165
+ channel: 'prompt',
166
+ });
167
+ const dreamerTask = await stateManager.getTask(dreamerTaskId);
168
+ expect(dreamerTask).not.toBeNull();
169
+ if (!dreamerTask) {
170
+ throw new Error('Dreamer task not found after seeding');
171
+ }
172
+ expect(dreamerTask.taskKind).toBe('dreamer');
173
+ const actualChain = await walkFullChain(stateManager, orchestrator, dreamerTaskId);
174
+ expect(actualChain).toEqual(EXPECTED_CHAIN);
175
+ });
176
+ // ── Channel: code_tool_hook ──────────────────────────────────────────────
177
+ it('code_tool_hook channel: full successor chain dreamer→philosopher→scribe→artificer→evaluator→rollout_reviewer', async () => {
178
+ const dreamerTaskId = await seedDreamerTask(stateManager, {
179
+ candidateId: `cand-hook-${Date.now()}`,
180
+ channel: 'code_tool_hook',
181
+ });
182
+ const dreamerTask = await stateManager.getTask(dreamerTaskId);
183
+ expect(dreamerTask).not.toBeNull();
184
+ if (!dreamerTask) {
185
+ throw new Error('Dreamer task not found after seeding');
186
+ }
187
+ expect(dreamerTask.taskKind).toBe('dreamer');
188
+ const actualChain = await walkFullChain(stateManager, orchestrator, dreamerTaskId);
189
+ expect(actualChain).toEqual(EXPECTED_CHAIN);
190
+ });
191
+ // ── Channel: defer_archive ───────────────────────────────────────────────
192
+ it('defer_archive channel: no route maps to defer_archive — no dreamer task seeded', async () => {
193
+ // The intake bridge has NO route that maps to the defer_archive channel.
194
+ // defer recommendations return 'not_internalizable' at computeBridgeDecision.
195
+ // Use ready: true so the code reaches the route check (not the !ready early exit).
196
+ const bridgeInput = {
197
+ candidateId: `cand-defer-${Date.now()}`,
198
+ recommendationKind: 'defer',
199
+ route: 'deferred',
200
+ ready: true,
201
+ };
202
+ const decision = computeBridgeDecision(bridgeInput);
203
+ expect(decision.decision).toBe('not_internalizable');
204
+ // Verify the rejection is specifically because the route is deferred,
205
+ // not because of a missing ready flag or unknown route.
206
+ if (!('reason' in decision)) {
207
+ throw new Error('Expected not_internalizable decision to have a reason field');
208
+ }
209
+ expect(decision.reason).toContain('deferred');
210
+ // No dreamer task is seeded — no runners run for defer_archive
211
+ // through the internalization pipeline.
212
+ });
213
+ // ── Cross-channel: successor inherits channel from parent ─────────────────
214
+ it('successor tasks inherit the channel from the parent task', async () => {
215
+ for (const channel of ['prompt', 'code_tool_hook']) {
216
+ const dreamerTaskId = await seedDreamerTask(stateManager, {
217
+ candidateId: `cand-${channel}-inherit-${Date.now()}`,
218
+ channel,
219
+ });
220
+ await simulateTaskSuccess(stateManager, dreamerTaskId);
221
+ const commitResult = await orchestrator.commitNextTaskProposal(dreamerTaskId);
222
+ if (commitResult.decision !== 'successor_created') {
223
+ throw new Error(`Expected successor_created, got ${commitResult.decision}`);
224
+ }
225
+ expect(commitResult.successorKind).toBe('philosopher');
226
+ // Read the actual successor and verify its channel via hydrated metadata
227
+ const successorTask = await stateManager.getTask(commitResult.successorTaskId);
228
+ expect(successorTask).not.toBeNull();
229
+ if (!successorTask) {
230
+ throw new Error(`Successor task ${commitResult.successorTaskId} not found`);
231
+ }
232
+ expect(successorTask.diagnosticJson).toBeDefined();
233
+ // Parse the PI metadata to verify channel inheritance
234
+ // Runtime Contract #2/#5: no `as` on untrusted data; use typeof + Object.hasOwn
235
+ const diagJson = successorTask.diagnosticJson;
236
+ if (!diagJson) {
237
+ throw new Error('Successor task diagnosticJson is empty');
238
+ }
239
+ const parsed = JSON.parse(diagJson);
240
+ if (typeof parsed !== 'object' || parsed === null) {
241
+ throw new Error('diagnosticJson is not an object');
242
+ }
243
+ if (!Object.hasOwn(parsed, 'pi_metadata')) {
244
+ throw new Error('pi_metadata key not found in successor diagnosticJson');
245
+ }
246
+ const piMeta = parsed.pi_metadata;
247
+ if (typeof piMeta !== 'object' || piMeta === null) {
248
+ throw new Error('pi_metadata is not an object');
249
+ }
250
+ if (!Object.hasOwn(piMeta, 'channel')) {
251
+ throw new Error('pi_metadata.channel is missing');
252
+ }
253
+ const channelValue = piMeta.channel;
254
+ expect(channelValue).toBe(channel);
255
+ }
256
+ });
257
+ // ── Edge validation: validateEdge does not filter by channel ──────────────
258
+ it('validateEdge returns true for all peer runner edges regardless of channel', async () => {
259
+ // This documents that the job graph does NOT filter by channel.
260
+ // The _channel parameter in validateEdge is unused.
261
+ // This is a key finding for C2-P2: channel-based runner skipping does NOT
262
+ // happen at the job graph level.
263
+ const { validateEdge } = await import('../internalization-job-graph.js');
264
+ const edges = [
265
+ ['dreamer', 'philosopher'],
266
+ ['philosopher', 'scribe'],
267
+ ['scribe', 'artificer'],
268
+ ['artificer', 'evaluator'],
269
+ ['evaluator', 'rollout_reviewer'],
270
+ ];
271
+ for (const [from, to] of edges) {
272
+ expect(validateEdge(from, to, 'prompt')).toBe(true);
273
+ expect(validateEdge(from, to, 'code_tool_hook')).toBe(true);
274
+ expect(validateEdge(from, to, 'defer_archive')).toBe(true);
275
+ }
276
+ });
277
+ // ── Config defaults: document the DEFAULT_AGENT_ENABLED values ────────────
278
+ it('DEFAULT_AGENT_ENABLED: dreamer+scribe+artificer on; philosopher+evaluator+rolloutReviewer off', async () => {
279
+ // This pins the config defaults that the trace doc relies on.
280
+ // If these defaults change, the Core/Quiet classification must be re-evaluated.
281
+ const { getDefaultInternalAgents } = await import('../../config/pd-config-defaults.js');
282
+ const agents = getDefaultInternalAgents();
283
+ expect(agents.agents.dreamer.enabled).toBe(true);
284
+ expect(agents.agents.philosopher.enabled).toBe(false);
285
+ expect(agents.agents.scribe.enabled).toBe(true);
286
+ expect(agents.agents.artificer.enabled).toBe(true);
287
+ expect(agents.agents.evaluator.enabled).toBe(false);
288
+ expect(agents.agents.rolloutReviewer.enabled).toBe(false);
289
+ });
290
+ // ── MVP_CORE_TASK_KINDS excludes rollout_reviewer ─────────────────────────
291
+ it('MVP_CORE_TASK_KINDS excludes rollout_reviewer', async () => {
292
+ const { MVP_CORE_TASK_KINDS } = await import('../queue-actionability.js');
293
+ expect(MVP_CORE_TASK_KINDS).toContain('dreamer');
294
+ expect(MVP_CORE_TASK_KINDS).toContain('philosopher');
295
+ expect(MVP_CORE_TASK_KINDS).toContain('scribe');
296
+ expect(MVP_CORE_TASK_KINDS).toContain('artificer');
297
+ expect(MVP_CORE_TASK_KINDS).toContain('evaluator');
298
+ expect(MVP_CORE_TASK_KINDS).not.toContain('rollout_reviewer');
299
+ });
300
+ // ── DEFAULT_CONSUMER_RUNNER_KINDS is dreamer-only ────────────────────────
301
+ it('DEFAULT_CONSUMER_RUNNER_KINDS is dreamer-only', async () => {
302
+ const { DEFAULT_CONSUMER_RUNNER_KINDS } = await import('../internalization-consumer-decision.js');
303
+ expect(DEFAULT_CONSUMER_RUNNER_KINDS).toEqual(['dreamer']);
304
+ });
305
+ });
306
+ //# sourceMappingURL=c2-live-runner-chain.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"c2-live-runner-chain.test.js","sourceRoot":"","sources":["../../../../src/runtime-v2/internalization/__tests__/c2-live-runner-chain.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACrE,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EACL,oBAAoB,EACpB,qBAAqB,GAEtB,MAAM,wCAAwC,CAAC;AAGhD,gFAAgF;AAEhF,MAAM,KAAK,GAAG,YAAY,CAAC;AAC3B,MAAM,YAAY,GAAG,aAAa,CAAC;AAEnC;;;;;;;GAOG;AACH,MAAM,cAAc,GAAqB;IACvC,SAAS;IACT,aAAa;IACb,QAAQ;IACR,WAAW;IACX,WAAW;IACX,kBAAkB;CACnB,CAAC;AAWF;;;;;;GAMG;AACH,KAAK,UAAU,eAAe,CAC5B,YAAiC,EACjC,OAA2B;IAE3B,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;IACvD,MAAM,WAAW,GAAuC;QACtD,WAAW;QACX,kBAAkB,EAAE,OAAO,KAAK,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW;QACvE,KAAK,EAAE,OAAO,KAAK,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,kBAAkB;QAC3E,KAAK,EAAE,IAAI;Q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mBAAmB,EAAE,GAAG,MAAM,MAAM,CAAC,2BAA2B,CAAC,CAAC;QAC1E,MAAM,CAAC,mBAAmB,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QACjD,MAAM,CAAC,mBAAmB,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;QACrD,MAAM,CAAC,mBAAmB,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QAChD,MAAM,CAAC,mBAAmB,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QACnD,MAAM,CAAC,mBAAmB,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QACnD,MAAM,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;IAEH,4EAA4E;IAE5E,EAAE,CAAC,+CAA+C,EAAE,KAAK,IAAI,EAAE;QAC7D,MAAM,EAAE,6BAA6B,EAAE,GAAG,MAAM,MAAM,CAAC,yCAAyC,CAAC,CAAC;QAClG,MAAM,CAAC,6BAA6B,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=diag-rootcause-intent-tension.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diag-rootcause-intent-tension.test.d.ts","sourceRoot":"","sources":["../../../../src/runtime-v2/internalization/__tests__/diag-rootcause-intent-tension.test.ts"],"names":[],"mappings":""}