@a-company/paradigm 5.34.0 → 5.37.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 (223) hide show
  1. package/dist/{accept-orchestration-MIRBLRUJ.js → accept-orchestration-36AP7HTX.js} +1 -1
  2. package/dist/{add-P76GEMGF.js → add-FGKNJS3F.js} +1 -1
  3. package/dist/agent-E7LDKJ4O.js +33 -0
  4. package/dist/{agent-loader-5255KNM7.js → agent-loader-2HXKVL6J.js} +1 -1
  5. package/dist/{agent-loader-A5FMBAFJ.js → agent-loader-XS6LIMUG.js} +1 -1
  6. package/dist/{agent-state-KSQ3S7OB.js → agent-state-L7LCPRC3.js} +1 -1
  7. package/dist/{agents-suggest-HYTFMQD3.js → agents-suggest-Y5D6AALG.js} +1 -1
  8. package/dist/{aggregate-W66DM3GA.js → aggregate-OZJRRAQR.js} +1 -1
  9. package/dist/ambient-4NSPAQDJ.js +35 -0
  10. package/dist/{assess-UFPYEJKP.js → assess-AMPVSWK7.js} +1 -1
  11. package/dist/{auto-RHJXOZFL.js → auto-A7VUHCUC.js} +1 -1
  12. package/dist/{beacon-5QVYV5DF.js → beacon-YBLUUTYY.js} +1 -1
  13. package/dist/{calibration-OLJYB5HN.js → calibration-FQ4YVOE4.js} +1 -1
  14. package/dist/{check-THVGY4R5.js → check-46QL3KMQ.js} +1 -1
  15. package/dist/{chunk-AGSUX2GJ.js → chunk-3OMJI5TT.js} +2 -2
  16. package/dist/chunk-3QMRDN65.js +29 -0
  17. package/dist/{chunk-QNZEG7IT.js → chunk-3XGNXXCT.js} +1 -1
  18. package/dist/{chunk-VG7FN2TU.js → chunk-4W5TBL3O.js} +1 -1
  19. package/dist/{chunk-UDUHSHO4.js → chunk-5YHR77AL.js} +1 -1
  20. package/dist/chunk-6PP2RPIZ.js +3 -0
  21. package/dist/{chunk-VCKKJDLP.js → chunk-6QKCUEEY.js} +1 -1
  22. package/dist/{chunk-JBDMCRPP.js → chunk-77WX6HGV.js} +1 -1
  23. package/dist/{chunk-A7KFOJ2F.js → chunk-7PB7AXQE.js} +1 -1
  24. package/dist/chunk-7SGNNVE5.js +3 -0
  25. package/dist/{chunk-WS2N27RX.js → chunk-7YTAA6XA.js} +1 -1
  26. package/dist/chunk-BCOPNVPY.js +11 -0
  27. package/dist/chunk-BRHQJLTG.js +2 -0
  28. package/dist/{chunk-W5IWDW4Y.js → chunk-DG3VCY43.js} +1 -1
  29. package/dist/{chunk-HMQ5BHP2.js → chunk-DOCDDDTD.js} +10 -10
  30. package/dist/chunk-DSYEGRQ2.js +3 -0
  31. package/dist/chunk-EMMMBAID.js +2 -0
  32. package/dist/chunk-F5BSUC2L.js +3 -0
  33. package/dist/chunk-GE3GQALR.js +2 -0
  34. package/dist/chunk-IW5K3RNR.js +8 -0
  35. package/dist/chunk-JIF7OSGH.js +8 -0
  36. package/dist/{chunk-HPAHK4AJ.js → chunk-JUOOVKK6.js} +1 -1
  37. package/dist/chunk-NFQLONFY.js +3 -0
  38. package/dist/chunk-OVDYPOHR.js +2 -0
  39. package/dist/{chunk-33LKBMVK.js → chunk-RLJ5K3J5.js} +1 -1
  40. package/dist/{chunk-HXGYVS2N.js → chunk-RN35IVA2.js} +1 -1
  41. package/dist/{chunk-ODVKPZZ4.js → chunk-W6WVJLHO.js} +1 -1
  42. package/dist/chunk-X54WXWCX.js +111 -0
  43. package/dist/chunk-XHJ27CER.js +2 -0
  44. package/dist/{chunk-32RBX5YV.js → chunk-XNB4TZTD.js} +1 -1
  45. package/dist/chunk-YG5G5GEQ.js +456 -0
  46. package/dist/chunk-Z72SDTBJ.js +3 -0
  47. package/dist/{claude-4LR3LJQZ.js → claude-OX54QSLC.js} +1 -1
  48. package/dist/{claude-cli-UP6HGH7C.js → claude-cli-FHLJQVJC.js} +1 -1
  49. package/dist/{claude-code-RLJ4GX77.js → claude-code-GVGU3A3B.js} +1 -1
  50. package/dist/{claude-code-teams-R37HJY3Y.js → claude-code-teams-ZRHPTGPP.js} +1 -1
  51. package/dist/{compliance-Q676YALK.js → compliance-PHSPVYK2.js} +3 -3
  52. package/dist/{compliance-health-JNP3P35P.js → compliance-health-HCZTJDN7.js} +1 -1
  53. package/dist/{conductor-Y5IXELTL.js → conductor-LYBMM66Z.js} +1 -1
  54. package/dist/{config-schema-GUQY2QN7.js → config-schema-URJW6UZH.js} +1 -1
  55. package/dist/{constellation-CG7C4WFE.js → constellation-PX3ZKMWQ.js} +1 -1
  56. package/dist/{context-audit-XRPT3OU2.js → context-audit-APFKELFT.js} +2 -2
  57. package/dist/{cost-IDNVMAEV.js → cost-B5SAHPOJ.js} +1 -1
  58. package/dist/{cost-PK4KIF7R.js → cost-MMWUDGZC.js} +1 -1
  59. package/dist/{cursor-cli-QKF7Z6M2.js → cursor-cli-Q2HLQ5TE.js} +1 -1
  60. package/dist/{cursorrules-U5O4G5T4.js → cursorrules-3BW6K6D5.js} +1 -1
  61. package/dist/{decision-loader-2XPZE4EZ.js → decision-loader-4KMQVAXZ.js} +1 -1
  62. package/dist/{delete-P5VULXR4.js → delete-7PQZUERZ.js} +1 -1
  63. package/dist/{diff-QHQWLM3L.js → diff-F2HUO2H3.js} +1 -1
  64. package/dist/{discipline-H7LDI6NT.js → discipline-ARFFIXQL.js} +1 -1
  65. package/dist/{dist-W3XCATBJ.js → dist-5IUWRFG6.js} +1 -1
  66. package/dist/{dist-KGRCLBJP-2QAPFYNF.js → dist-KGRCLBJP-R5CCPPXN.js} +1 -1
  67. package/dist/{dist-3ZCH25SG.js → dist-MRZDZ5SX.js} +1 -1
  68. package/dist/{dist-VGFSP3XM.js → dist-OKM6BXTH.js} +1 -1
  69. package/dist/{dist-VXCZWVVJ.js → dist-VWC6FA46.js} +1 -1
  70. package/dist/dist-YUXXIXB3.js +3 -0
  71. package/dist/{docs-EDQ2STFK.js → docs-6WOQILZS.js} +1 -1
  72. package/dist/{docs-5BX2YWYK.js → docs-BI2DO7B2.js} +2 -2
  73. package/dist/doctor-JLTCBMS4.js +2 -0
  74. package/dist/{drift-ILZE5BFJ.js → drift-6QPDKKUO.js} +1 -1
  75. package/dist/{echo-UPTQUEDU.js → echo-3JJDKCNF.js} +1 -1
  76. package/dist/{edit-GUU3HBVW.js → edit-PLCGL5OV.js} +1 -1
  77. package/dist/{enforcement-BEGPQIUN.js → enforcement-5MHSQAXE.js} +1 -1
  78. package/dist/{enforcement-46XWPNSA.js → enforcement-IWABOHMY.js} +1 -1
  79. package/dist/{event-Y3VXC2RV.js → event-5J3GBWKT.js} +1 -1
  80. package/dist/{explain-files-3GPZUETV.js → explain-files-LPHTJL4N.js} +1 -1
  81. package/dist/{export-CV5KCTPS.js → export-NXUFTFPW.js} +1 -1
  82. package/dist/{flow-POQP27WA.js → flow-IT2IVXXT.js} +1 -1
  83. package/dist/{gap-narrator-NTXLUI7I.js → gap-narrator-DVXPWNFN.js} +1 -1
  84. package/dist/{global-C44FW4G2.js → global-J2VTYKCC.js} +1 -1
  85. package/dist/{graduate-3BBSC27A.js → graduate-N2HF4JT6.js} +1 -1
  86. package/dist/graph-VLMP6DW2.js +2 -0
  87. package/dist/{graph-server-COZR5C3Z.js → graph-server-TBHHBFOM.js} +1 -1
  88. package/dist/{habits-GICVMTJL.js → habits-JTMWGVPH.js} +3 -3
  89. package/dist/{history-UW454SDP.js → history-FHS7EC3Z.js} +1 -1
  90. package/dist/{hooks-BNWRGACA.js → hooks-BL6CXRVK.js} +1 -1
  91. package/dist/index.js +9 -9
  92. package/dist/init-ZS7RAR7L.js +2 -0
  93. package/dist/{integrity-UYDOOJDP.js → integrity-UBMZCB77.js} +1 -1
  94. package/dist/{integrity-checker-DHGMZQDG.js → integrity-checker-VSR3ITBL.js} +1 -1
  95. package/dist/journal-loader-EELDB4P2.js +2 -0
  96. package/dist/{lint-IGKE6UPS.js → lint-KQQ2RMSJ.js} +1 -1
  97. package/dist/{list-5IUGP3ZB.js → list-37UCWCOQ.js} +1 -1
  98. package/dist/{list-YKIQNKGB.js → list-6WY4CFUR.js} +1 -1
  99. package/dist/lore-loader-CP5RUJ4A.js +2 -0
  100. package/dist/{lore-loader-XY5MZRR2.js → lore-loader-PBUDKXAJ.js} +1 -1
  101. package/dist/{lore-server-FC2GMDLT.js → lore-server-A3KKZLSY.js} +1 -1
  102. package/dist/{manual-RXSPSFLL.js → manual-HKI6OXB4.js} +1 -1
  103. package/dist/mcp.js +17 -449
  104. package/dist/{migrate-YQG2FG3J.js → migrate-W3KCXLDS.js} +2 -2
  105. package/dist/{migrate-assessments-GEI5WMI2.js → migrate-assessments-D2TOBJ5V.js} +1 -1
  106. package/dist/{model-discovery-HMB3YI4L.js → model-discovery-TWX4A4YD.js} +1 -1
  107. package/dist/{nomination-engine-W6QTQX2P.js → nomination-engine-A24774W4.js} +1 -1
  108. package/dist/{notebook-PE3JSYZI.js → notebook-LXJ2LHUA.js} +1 -1
  109. package/dist/notebook-loader-CF52PNZC.js +2 -0
  110. package/dist/{orchestrate-7CJWHLBA.js → orchestrate-WFCNV2II.js} +1 -1
  111. package/dist/{peers-P2KXU7ZK.js → peers-7TPZTKH7.js} +1 -1
  112. package/dist/{persona-STQWZH5P.js → persona-UGTCFEGT.js} +1 -1
  113. package/dist/{pipeline-MZUITRVN.js → pipeline-7PZ6ILWX.js} +1 -1
  114. package/dist/{platform-server-G6MJIAJS.js → platform-server-YIBX4YDJ.js} +2 -2
  115. package/dist/{plugin-update-checker-M7PW434O.js → plugin-update-checker-2EM4K45U.js} +1 -1
  116. package/dist/{portal-check-Z3OCQEQR.js → portal-check-YSDJRZUR.js} +1 -1
  117. package/dist/{portal-compliance-4MG5F2GI.js → portal-compliance-OBPK2IR5.js} +1 -1
  118. package/dist/{probe-5L5BQDGE.js → probe-WKXR3IN4.js} +1 -1
  119. package/dist/{project-type-AGO6VUKF.js → project-type-MRBJAKC7.js} +1 -1
  120. package/dist/{promote-NJQDZBZA.js → promote-VHBA56KW.js} +2 -2
  121. package/dist/{providers-TBPOE4DI.js → providers-RX7SBLHZ.js} +1 -1
  122. package/dist/{quiz-FE5UGAY2.js → quiz-3SQNPRJ3.js} +1 -1
  123. package/dist/{record-YXPB34MY.js → record-7QJPZZP7.js} +1 -1
  124. package/dist/registry-LR5QACRK.js +20 -0
  125. package/dist/reindex-F7EV3Z34.js +2 -0
  126. package/dist/{remember-MJRNTXYS.js → remember-SFGBTTEE.js} +1 -1
  127. package/dist/{retag-N5XF3KXP.js → retag-GFXUYP7S.js} +1 -1
  128. package/dist/{review-6UAH6V3R.js → review-6KKZWV3A.js} +1 -1
  129. package/dist/{review-77QI6VOC.js → review-GEBSYOZB.js} +1 -1
  130. package/dist/{ripple-ZGDITCGB.js → ripple-4F5ZCXS4.js} +1 -1
  131. package/dist/{roster-TA2GFDR7.js → roster-RI3UC2YI.js} +1 -1
  132. package/dist/scaffold-WA4L2K7J.js +18 -0
  133. package/dist/{scopes-commands-3V5G6NYV.js → scopes-commands-5FFIUDRC.js} +1 -1
  134. package/dist/{sentinel-HYAZ3CO5.js → sentinel-37ZEEWT7.js} +2 -2
  135. package/dist/{sentinel-bridge-VR357PKL.js → sentinel-bridge-EZGFRVFH.js} +1 -1
  136. package/dist/{serve-L52ZUTU6.js → serve-2BXDL35A.js} +2 -2
  137. package/dist/{serve-ZJ3EXVA5.js → serve-2LSTQFFQ.js} +2 -2
  138. package/dist/{serve-OY6XYL7F.js → serve-5JME5QEM.js} +2 -2
  139. package/dist/{server-4YNUIK4W.js → server-AIXFROYL.js} +1 -1
  140. package/dist/{server-2MNROHF6.js → server-XLHIYDTZ.js} +1 -1
  141. package/dist/session-tracker-VSFRNFRL.js +2 -0
  142. package/dist/{session-work-log-SLAPEP3M.js → session-work-log-6GKGUQ5C.js} +1 -1
  143. package/dist/{session-work-log-5UJTJJ22.js → session-work-log-UYMIWWOX.js} +1 -1
  144. package/dist/{setup-KPIMRZ4Q.js → setup-F2N4LUR7.js} +1 -1
  145. package/dist/{setup-3F5IK7MO.js → setup-ZM4JFV5D.js} +2 -2
  146. package/dist/{shift-IKTWYSEQ.js → shift-DDYVQJ75.js} +5 -5
  147. package/dist/{show-PJ5LFLIL.js → show-CZLVYLM5.js} +1 -1
  148. package/dist/{show-BOAVWZPZ.js → show-RFOIR2GQ.js} +1 -1
  149. package/dist/{snapshot-L2G56RPL.js → snapshot-6N564OUJ.js} +1 -1
  150. package/dist/{spawn-7TCAMD6H.js → spawn-HYARN3RL.js} +1 -1
  151. package/dist/{status-A37ECYNJ.js → status-CUG3PKGC.js} +1 -1
  152. package/dist/{status-77M3SDIF.js → status-WBJ6D7BD.js} +1 -1
  153. package/dist/{summary-ZJLQ6KHB.js → summary-2AM4QVPW.js} +1 -1
  154. package/dist/{sweep-HU74OPVW.js → sweep-WHDT7ENV.js} +1 -1
  155. package/dist/{switch-CTW4PDGI.js → switch-HBGIFNF6.js} +1 -1
  156. package/dist/{symphony-IS5TYPXY.js → symphony-CWKKMFAS.js} +25 -25
  157. package/dist/symphony-VTHVTE57.js +2 -0
  158. package/dist/symphony-loader-RYFZOQJS.js +2 -0
  159. package/dist/{symphony-peers-X5NGWXFP.js → symphony-peers-ISJPKX7W.js} +1 -1
  160. package/dist/{symphony-peers-U4KHMKGI.js → symphony-peers-LWBUQ3T4.js} +1 -1
  161. package/dist/symphony-relay-L3BY6RGM.js +3 -0
  162. package/dist/sync-WIFD7UCL.js +2 -0
  163. package/dist/{sync-llms-HL5PPW3M.js → sync-llms-MZ3RQWFX.js} +1 -1
  164. package/dist/{task-loader-NZFDTUQ5.js → task-loader-EU7JLTR3.js} +1 -1
  165. package/dist/team-C3PWO7XL.js +2 -0
  166. package/dist/{test-BQJMS4Y2.js → test-6MUL4EXS.js} +1 -1
  167. package/dist/{thread-HFXK65D4.js → thread-K6UHDIUW.js} +1 -1
  168. package/dist/{timeline-K3ZFKJ3R.js → timeline-S26CQWHT.js} +1 -1
  169. package/dist/tools-4WKLLDFU.js +2 -0
  170. package/dist/{triage-FCWOZASE.js → triage-YF6WYZY4.js} +1 -1
  171. package/dist/{tutorial-UC6YQMNN.js → tutorial-UEBX7Z2G.js} +1 -1
  172. package/dist/{university-FJ7OCOA3.js → university-UMT7PAKE.js} +1 -1
  173. package/dist/university-content/courses/para-201.json +5 -5
  174. package/dist/university-content/courses/para-301.json +10 -10
  175. package/dist/university-content/courses/para-401.json +3 -3
  176. package/dist/university-content/courses/para-501.json +5 -5
  177. package/dist/university-content/courses/para-601.json +1 -1
  178. package/dist/university-content/plsat/v2.0.json +7 -7
  179. package/dist/university-content/plsat/v3.0.json +9 -9
  180. package/dist/university-content/reference.json +4 -4
  181. package/dist/university-ui/assets/{index-DmiLQehB.js → index-CecQrfSn.js} +2 -2
  182. package/dist/university-ui/assets/{index-DmiLQehB.js.map → index-CecQrfSn.js.map} +1 -1
  183. package/dist/university-ui/index.html +1 -1
  184. package/dist/{upgrade-B4IOLZYK.js → upgrade-USW7YJEX.js} +1 -1
  185. package/dist/{validate-LSCDOLBO.js → validate-2PZTNYSS.js} +1 -1
  186. package/dist/{validate-VZXTJHGO.js → validate-KW3YFGTV.js} +1 -1
  187. package/dist/{validate-C6SMKGYD.js → validate-VZGBVTPM.js} +1 -1
  188. package/dist/{watch-LRM5XD46.js → watch-HL3ZOALL.js} +1 -1
  189. package/dist/{watch-PZCCUP6K.js → watch-KQU3S7KE.js} +1 -1
  190. package/dist/{wisdom-XZ3QKPNP.js → wisdom-UU7HOE3M.js} +1 -1
  191. package/dist/{work-log-loader-DL5GZ2BQ.js → work-log-loader-J27XSFCE.js} +1 -1
  192. package/dist/workspace-CE6LNXVI.js +2 -0
  193. package/package.json +5 -1
  194. package/templates/paradigm/specs/context-tracking.md +4 -4
  195. package/dist/agent-UUTYOFTH.js +0 -33
  196. package/dist/ambient-2JZTNXUL.js +0 -35
  197. package/dist/chunk-2Q7RGCJH.js +0 -3
  198. package/dist/chunk-5TAVYPOV.js +0 -2
  199. package/dist/chunk-73R63P7K.js +0 -2
  200. package/dist/chunk-C7ZCCKJT.js +0 -3
  201. package/dist/chunk-CUOEZAVL.js +0 -8
  202. package/dist/chunk-EAZ3EMOZ.js +0 -29
  203. package/dist/chunk-LKFBDUCV.js +0 -11
  204. package/dist/chunk-QGZRM6ZB.js +0 -2
  205. package/dist/chunk-S7K7UPXL.js +0 -3
  206. package/dist/chunk-TXBSTT64.js +0 -111
  207. package/dist/chunk-TZZNHUAR.js +0 -2
  208. package/dist/chunk-UHQLYIRI.js +0 -3
  209. package/dist/chunk-VZLGBGU3.js +0 -8
  210. package/dist/doctor-R4UGMR5N.js +0 -2
  211. package/dist/graph-CNDE5TAT.js +0 -2
  212. package/dist/init-24MAQJFM.js +0 -2
  213. package/dist/journal-loader-GLH7XFTK.js +0 -2
  214. package/dist/lore-loader-RVQI5GXL.js +0 -2
  215. package/dist/notebook-loader-CENTDDUJ.js +0 -2
  216. package/dist/reindex-2MRCAIZG.js +0 -2
  217. package/dist/session-tracker-WSTRV7UP.js +0 -2
  218. package/dist/symphony-43N4R6C2.js +0 -2
  219. package/dist/symphony-loader-XJT43FOS.js +0 -2
  220. package/dist/symphony-relay-CIMRXQHI.js +0 -3
  221. package/dist/sync-QRDSFETO.js +0 -2
  222. package/dist/team-WIJVWLII.js +0 -2
  223. package/dist/workspace-2ODL5WLY.js +0 -2
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import'./chunk-5TAVYPOV.js';var d={"missing-purpose":e=>`${e.target?`"${e.target}"`:"a directory"} is missing a .purpose file. Without it, agents cannot discover what this directory contains or which components live here. The stop hook will block if source files were modified in a directory with no .purpose. Fix: run paradigm_purpose_init for this directory, then add components with paradigm_purpose_add_component.`,"stale-purpose":e=>{let t=e.target?`"${e.target}"`:"a .purpose file",n=e.context?.ageHours!=null?` (${e.context.ageHours}h old)`:"";return `The .purpose file at ${t}${n} has not been updated since the last code change in its directory. Stale purposes mislead agents about what components exist, causing incorrect context injection. Fix: update the .purpose to reflect any added, removed, or changed components, then run paradigm_reindex.`},"missing-gate":e=>`${e.target?`"${e.target}"`:"a route or endpoint"} appears to require authentication or authorization but has no gate declared in portal.yaml. Gates are how Paradigm tracks security enforcement \u2014 missing gates mean agents cannot verify that the route is protected. Fix: add the gate to portal.yaml using paradigm_portal_add_route or paradigm_purpose_add_component with the appropriate gates array.`,"orphan-signal":e=>`${e.target?`"${e.target}"`:"a signal"} is emitted in code but not declared in any .purpose file. Undeclared signals cannot be traced by agents during ripple analysis, meaning downstream effects may be missed when the signal's emitter changes. Fix: add the signal to the nearest .purpose file under its component's signals array (e.g., signals: ["!${e.target||"event-name"}"]). `,"undocumented-flow":e=>`${e.target?`"${e.target}"`:"a multi-step flow"} spans multiple components but has no $flow declaration. Flows with 3 or more steps should be documented so agents can reason about the sequence end-to-end. Without a flow record, agents may implement duplicate logic or miss ordering constraints. Fix: add a flow entry to .paradigm/flows.yaml with the steps and participants.`,"aspect-drift":e=>`${e.target?`"${e.target}"`:"an aspect anchor"} has drifted \u2014 the code at the anchored location no longer matches the fingerprint recorded when the aspect was first applied. This means the aspect may no longer be enforced correctly at that site. Drift is common after refactors that move or rewrite anchored code. Fix: re-anchor the aspect at its new location using paradigm_aspect_anchor, then delete the stale anchor.`,"portal-mismatch":e=>`${e.target?`"${e.target}"`:"a portal.yaml entry"} has a mismatch between what portal.yaml declares and what the code enforces. This could mean a gate is declared but never applied in middleware, or code enforces a check that is not tracked in portal.yaml. Both directions create audit gaps. Fix: reconcile portal.yaml with actual middleware usage \u2014 run paradigm portal check to see specifics.`,"missing-test":e=>`${e.target?`"${e.target}"`:"a component"} has no associated test file. Agents are expected to write tests alongside every implementation. Missing tests increase regression risk and reduce confidence scores for the affected component. Fix: create a test file alongside the implementation (e.g., ${e.target?e.target.replace(/\.[^.]+$/,".test$&"):"component.test.ts"}).`,"uncovered-route":e=>`${e.target?`"${e.target}"`:"a route"} appears in the codebase but is not listed in portal.yaml. All routes \u2014 protected or public \u2014 should be tracked in portal.yaml so the full API surface is visible to agents and reviewers. Uncovered routes are invisible to ripple analysis and gate audits. Fix: add the route to portal.yaml with paradigm_portal_add_route.`,"broken-reference":e=>`${e.target?`"${e.target}"`:"a symbol reference"} references a symbol or file that no longer exists. Broken references in .purpose files cause agents to load stale context and may indicate a renamed or deleted component. Fix: update the reference to the new symbol name, or remove it if the component was deleted. Run paradigm_reindex after fixing to regenerate the scan index.`,"missing-description":e=>`${e.target?`"${e.target}"`:"a component or gate"} has no description. Descriptions are required for agents to understand purpose and context during context injection. Without descriptions, agents may misapply the component or skip it when it would have been relevant. Fix: add a description field to the component or gate entry in its .purpose or portal.yaml file.`,"enforcement-level-violation":e=>{let t=e.target?`"${e.target}"`:"a data category",n=e.context?.ring,a=e.context?.boundary;return `${t} is being transmitted across a boundary (${a||"unknown boundary"}) that exceeds its trust ring${n?` (Ring: ${n})`:""}. Data policy requires project-locked content to never leave the project boundary. This gap could expose internal compliance data externally. Fix: check the data-policy.yaml configuration and ensure the content category is listed in the deny_content for the relevant stream.`},"index-stale":e=>{let t=e.target?`"${e.target}"`:"the scan index",n=e.context?.ageHours,a=n!=null?` (${n} hours old)`:"";return `${t}${a} is stale. The scan index drives context injection, navigator, and ripple analysis. When the index is out of date, agents work from stale symbol maps and may miss recently added components or references. Fix: run paradigm_reindex (or "paradigm index") to regenerate the index.`}};function g(e,t){let n=d[e];return n?n({...t,type:e}):`Unknown check type "${e}" \u2014 no narration template available.`}function h(e){let t=[],n=[],a=[];for(let r of e){let p=g(r.type,r),i=r.severity??"improvement",c={type:r.type,target:r.target,narration:p,severity:i};i==="blocking"?t.push(c):i==="note"?a.push(c):n.push(c);}let o=t.length+n.length+a.length,s=l(t,n,a);return {gapCount:o,blocking:t,improvement:n,note:a,narrative:s}}function l(e,t,n){let a=[],o=e.length+t.length+n.length;if(o===0)return "No gaps found. All enforcement checks passed.";let s=u(e,t,n);if(a.push(`Found ${o} gap${o!==1?"s":""} across ${s} check type${s!==1?"s":""}.`),a.push(""),e.length>0){a.push(`BLOCKING (${e.length})`),a.push("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");for(let r of e)a.push(`[${r.type}]${r.target?` \u2014 ${r.target}`:""}`),a.push(r.narration),a.push("");}if(t.length>0){a.push(`IMPROVEMENTS (${t.length})`),a.push("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");for(let r of t)a.push(`[${r.type}]${r.target?` \u2014 ${r.target}`:""}`),a.push(r.narration),a.push("");}if(n.length>0){a.push(`NOTES (${n.length})`),a.push("\u2500\u2500\u2500\u2500\u2500\u2500");for(let r of n)a.push(`[${r.type}]${r.target?` \u2014 ${r.target}`:""}`),a.push(r.narration),a.push("");}return a.join(`
2
+ import'./chunk-XHJ27CER.js';var d={"missing-purpose":e=>`${e.target?`"${e.target}"`:"a directory"} is missing a .purpose file. Without it, agents cannot discover what this directory contains or which components live here. The stop hook will block if source files were modified in a directory with no .purpose. Fix: run paradigm_purpose_init for this directory, then add components with paradigm_purpose_add_component.`,"stale-purpose":e=>{let t=e.target?`"${e.target}"`:"a .purpose file",n=e.context?.ageHours!=null?` (${e.context.ageHours}h old)`:"";return `The .purpose file at ${t}${n} has not been updated since the last code change in its directory. Stale purposes mislead agents about what components exist, causing incorrect context injection. Fix: update the .purpose to reflect any added, removed, or changed components, then run paradigm_reindex.`},"missing-gate":e=>`${e.target?`"${e.target}"`:"a route or endpoint"} appears to require authentication or authorization but has no gate declared in portal.yaml. Gates are how Paradigm tracks security enforcement \u2014 missing gates mean agents cannot verify that the route is protected. Fix: add the gate to portal.yaml using paradigm_portal_add_route or paradigm_purpose_add_component with the appropriate gates array.`,"orphan-signal":e=>`${e.target?`"${e.target}"`:"a signal"} is emitted in code but not declared in any .purpose file. Undeclared signals cannot be traced by agents during ripple analysis, meaning downstream effects may be missed when the signal's emitter changes. Fix: add the signal to the nearest .purpose file under its component's signals array (e.g., signals: ["!${e.target||"event-name"}"]). `,"undocumented-flow":e=>`${e.target?`"${e.target}"`:"a multi-step flow"} spans multiple components but has no $flow declaration. Flows with 3 or more steps should be documented so agents can reason about the sequence end-to-end. Without a flow record, agents may implement duplicate logic or miss ordering constraints. Fix: add a flow entry to .paradigm/flows.yaml with the steps and participants.`,"aspect-drift":e=>`${e.target?`"${e.target}"`:"an aspect anchor"} has drifted \u2014 the code at the anchored location no longer matches the fingerprint recorded when the aspect was first applied. This means the aspect may no longer be enforced correctly at that site. Drift is common after refactors that move or rewrite anchored code. Fix: re-anchor the aspect at its new location using paradigm_aspect_anchor, then delete the stale anchor.`,"portal-mismatch":e=>`${e.target?`"${e.target}"`:"a portal.yaml entry"} has a mismatch between what portal.yaml declares and what the code enforces. This could mean a gate is declared but never applied in middleware, or code enforces a check that is not tracked in portal.yaml. Both directions create audit gaps. Fix: reconcile portal.yaml with actual middleware usage \u2014 run paradigm portal check to see specifics.`,"missing-test":e=>`${e.target?`"${e.target}"`:"a component"} has no associated test file. Agents are expected to write tests alongside every implementation. Missing tests increase regression risk and reduce confidence scores for the affected component. Fix: create a test file alongside the implementation (e.g., ${e.target?e.target.replace(/\.[^.]+$/,".test$&"):"component.test.ts"}).`,"uncovered-route":e=>`${e.target?`"${e.target}"`:"a route"} appears in the codebase but is not listed in portal.yaml. All routes \u2014 protected or public \u2014 should be tracked in portal.yaml so the full API surface is visible to agents and reviewers. Uncovered routes are invisible to ripple analysis and gate audits. Fix: add the route to portal.yaml with paradigm_portal_add_route.`,"broken-reference":e=>`${e.target?`"${e.target}"`:"a symbol reference"} references a symbol or file that no longer exists. Broken references in .purpose files cause agents to load stale context and may indicate a renamed or deleted component. Fix: update the reference to the new symbol name, or remove it if the component was deleted. Run paradigm_reindex after fixing to regenerate the scan index.`,"missing-description":e=>`${e.target?`"${e.target}"`:"a component or gate"} has no description. Descriptions are required for agents to understand purpose and context during context injection. Without descriptions, agents may misapply the component or skip it when it would have been relevant. Fix: add a description field to the component or gate entry in its .purpose or portal.yaml file.`,"enforcement-level-violation":e=>{let t=e.target?`"${e.target}"`:"a data category",n=e.context?.ring,a=e.context?.boundary;return `${t} is being transmitted across a boundary (${a||"unknown boundary"}) that exceeds its trust ring${n?` (Ring: ${n})`:""}. Data policy requires project-locked content to never leave the project boundary. This gap could expose internal compliance data externally. Fix: check the data-policy.yaml configuration and ensure the content category is listed in the deny_content for the relevant stream.`},"index-stale":e=>{let t=e.target?`"${e.target}"`:"the scan index",n=e.context?.ageHours,a=n!=null?` (${n} hours old)`:"";return `${t}${a} is stale. The scan index drives context injection, navigator, and ripple analysis. When the index is out of date, agents work from stale symbol maps and may miss recently added components or references. Fix: run paradigm_reindex (or "paradigm index") to regenerate the index.`}};function g(e,t){let n=d[e];return n?n({...t,type:e}):`Unknown check type "${e}" \u2014 no narration template available.`}function h(e){let t=[],n=[],a=[];for(let r of e){let p=g(r.type,r),i=r.severity??"improvement",c={type:r.type,target:r.target,narration:p,severity:i};i==="blocking"?t.push(c):i==="note"?a.push(c):n.push(c);}let o=t.length+n.length+a.length,s=l(t,n,a);return {gapCount:o,blocking:t,improvement:n,note:a,narrative:s}}function l(e,t,n){let a=[],o=e.length+t.length+n.length;if(o===0)return "No gaps found. All enforcement checks passed.";let s=u(e,t,n);if(a.push(`Found ${o} gap${o!==1?"s":""} across ${s} check type${s!==1?"s":""}.`),a.push(""),e.length>0){a.push(`BLOCKING (${e.length})`),a.push("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");for(let r of e)a.push(`[${r.type}]${r.target?` \u2014 ${r.target}`:""}`),a.push(r.narration),a.push("");}if(t.length>0){a.push(`IMPROVEMENTS (${t.length})`),a.push("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");for(let r of t)a.push(`[${r.type}]${r.target?` \u2014 ${r.target}`:""}`),a.push(r.narration),a.push("");}if(n.length>0){a.push(`NOTES (${n.length})`),a.push("\u2500\u2500\u2500\u2500\u2500\u2500");for(let r of n)a.push(`[${r.type}]${r.target?` \u2014 ${r.target}`:""}`),a.push(r.narration),a.push("");}return a.join(`
3
3
  `).trimEnd()}function u(e,t,n){let a=new Set;for(let o of [...e,...t,...n])a.add(o.type);return a.size}export{h as narrateAllGaps,g as narrateGap};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import {a}from'./chunk-LKAT7IAK.js';import'./chunk-5TAVYPOV.js';import*as o from'fs';import*as c from'path';import l from'chalk';import b from'ora';function D(t){let a=t.match(/^(\d+)(d|h|m)$/);if(!a)return null;let[,e,s]=a,n=parseInt(e,10);switch(s){case "d":return n*24*60*60*1e3;case "h":return n*60*60*1e3;case "m":return n*60*1e3;default:return null}}function m(t,a){let e=[];if(!o.existsSync(t))return e;let s=o.readdirSync(t,{withFileTypes:true});for(let n of s){let f=c.join(t,n.name);if(n.isDirectory())e.push(...m(f,a));else if(n.isFile())try{let u=o.statSync(f),r=Date.now()-u.mtimeMs;if(r>a){let d=Math.floor(r/864e5);e.push({path:f,age:`${d}d`});}}catch{}}return e}async function v(t){let a$1=process.env.HOME||process.env.USERPROFILE||"~",e=c.join(a$1,".paradigm"),s=b();if(!o.existsSync(e)){console.log(l.yellow(`
2
+ import {a}from'./chunk-LKAT7IAK.js';import'./chunk-XHJ27CER.js';import*as o from'fs';import*as c from'path';import l from'chalk';import b from'ora';function D(t){let a=t.match(/^(\d+)(d|h|m)$/);if(!a)return null;let[,e,s]=a,n=parseInt(e,10);switch(s){case "d":return n*24*60*60*1e3;case "h":return n*60*60*1e3;case "m":return n*60*1e3;default:return null}}function m(t,a){let e=[];if(!o.existsSync(t))return e;let s=o.readdirSync(t,{withFileTypes:true});for(let n of s){let f=c.join(t,n.name);if(n.isDirectory())e.push(...m(f,a));else if(n.isFile())try{let u=o.statSync(f),r=Date.now()-u.mtimeMs;if(r>a){let d=Math.floor(r/864e5);e.push({path:f,age:`${d}d`});}}catch{}}return e}async function v(t){let a$1=process.env.HOME||process.env.USERPROFILE||"~",e=c.join(a$1,".paradigm"),s=b();if(!o.existsSync(e)){console.log(l.yellow(`
3
3
  No ~/.paradigm/ directory found.
4
4
  `));return}let n=t.olderThan||"90d",f=D(n);f||(console.log(l.red(`
5
5
  Invalid duration: ${n}`)),console.log(l.gray(`Use format: 90d, 30d, 7d, 24h, etc.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import'./chunk-5TAVYPOV.js';import*as d from'fs';import*as u from'path';import o from'chalk';import*as p from'js-yaml';function h(e){let r=u.join(e,".paradigm","graduation.yaml");if(!d.existsSync(r))return {states:{}};try{let a=d.readFileSync(r,"utf8");return p.load(a)||{states:{}}}catch{return {states:{}}}}var g={"explore-before-implement":"Explore Before Implementing","ripple-before-modify":"Ripple Before Modifying","check-fragility":"Check Fragility","wisdom-before-implement":"Check Team Wisdom","verify-before-done":"Verify Before Done","postflight-compliance":"Postflight Compliance","test-new-components":"Test New Components","purpose-coverage":"Purpose File Coverage","record-lore-for-significant":"Record Lore for Significant Changes","confidence-on-decisions":"Confidence on Decisions","gates-for-routes":"Gates for Routes","university-content-valid":"University Content Valid","university-onboarded":"University Onboarding"};({hook:o.green,habit:o.yellow,mcp:o.red});async function v(e){let r=process.cwd(),n=h(r).states||{};if(e.json){console.log(JSON.stringify({states:n},null,2));return}console.log(o.blue(`
2
+ import'./chunk-XHJ27CER.js';import*as d from'fs';import*as u from'path';import o from'chalk';import*as p from'js-yaml';function h(e){let r=u.join(e,".paradigm","graduation.yaml");if(!d.existsSync(r))return {states:{}};try{let a=d.readFileSync(r,"utf8");return p.load(a)||{states:{}}}catch{return {states:{}}}}var g={"explore-before-implement":"Explore Before Implementing","ripple-before-modify":"Ripple Before Modifying","check-fragility":"Check Fragility","wisdom-before-implement":"Check Team Wisdom","verify-before-done":"Verify Before Done","postflight-compliance":"Postflight Compliance","test-new-components":"Test New Components","purpose-coverage":"Purpose File Coverage","record-lore-for-significant":"Record Lore for Significant Changes","confidence-on-decisions":"Confidence on Decisions","gates-for-routes":"Gates for Routes","university-content-valid":"University Content Valid","university-onboarded":"University Onboarding"};({hook:o.green,habit:o.yellow,mcp:o.red});async function v(e){let r=process.cwd(),n=h(r).states||{};if(e.json){console.log(JSON.stringify({states:n},null,2));return}console.log(o.blue(`
3
3
  \u26A1 Automation Tier Status
4
4
  `)),console.log(o.gray("\u2500".repeat(60)));let t={hook:[],habit:[],mcp:[]},m=new Set([...Object.keys(g),...Object.keys(n)]);for(let s of m){let i=n[s]||{},l=i.tier||"habit";t[l]||(t[l]=[]),t[l].push({id:s,state:i});}let c=t.hook.length,f=t.habit.length,w=t.mcp.length,k=c+f+w;if(console.log(` ${o.green(`${c} hook`)} ${o.yellow(`${f} habit`)} ${o.red(`${w} mcp`)} (${k} total)
5
5
  `),t.hook.length>0){console.log(o.green.bold(" \u26A1 Hooks (zero context cost)"));for(let{id:s,state:i}of t.hook){let l=g[s]||s,y=i.graduatedAt?` \u2014 graduated ${i.graduatedAt.split("T")[0]}`:"";console.log(` ${o.green("\u25CF")} ${l} ${o.gray(`(${s})${y}`)}`);}console.log();}if(t.habit.length>0){console.log(o.yellow.bold(" \u{1F4AD} Habits (agent-reminded)"));for(let{id:s,state:i}of t.habit){let l=g[s]||s,y=i.neverGraduate?o.gray(" \u{1F512} never-graduate"):"",b=i.cooldownUntil&&new Date(i.cooldownUntil)>new Date?o.gray(` \u23F3 cooldown until ${i.cooldownUntil.split("T")[0]}`):"";console.log(` ${o.yellow("\u25CF")} ${l} ${o.gray(`(${s})`)}${y}${b}`);}console.log();}if(t.mcp.length>0){console.log(o.red.bold(" \u{1F527} MCP Tools (manual, high token cost)"));for(let{id:s,state:i}of t.mcp){let l=g[s]||s;console.log(` ${o.red("\u25CF")} ${l} ${o.gray(`(${s})`)}`);}console.log();}if(c>0){let s=c*150;console.log(o.gray(` Estimated savings: ~${s} tokens/session from ${c} graduated habit(s)`));}console.log();}function $(e,r){let a=u.join(e,".paradigm","graduation.yaml"),n=u.dirname(a);d.existsSync(n)||d.mkdirSync(n,{recursive:true});let t=p.dump(r,{lineWidth:120,noRefs:true,sortKeys:true});d.writeFileSync(a,t,"utf8");}async function G(e){let r=process.cwd(),a=h(r);a.states||(a.states={});let n=a.states[e]||{};if(n.tier==="hook"){console.log(o.yellow(`${e} is already graduated to hook tier.`));return}if(n.neverGraduate){console.log(o.red(`${e} is marked as never-graduate (requires agent cognition).`));return}a.states[e]={...n,tier:"hook",graduatedAt:new Date().toISOString(),complianceAtGraduation:100,failureCount:0},$(r,a);let t=g[e]||e;console.log(o.green(`${o.bold("\u26A1")} Graduated "${t}" to hook tier.`)),console.log(o.gray(" MCP evaluation will skip this habit. Stop hook enforces compliance."));}async function D(e,r){let a=process.cwd(),n=h(a);n.states||(n.states={});let t=n.states[e]||{};if(t.tier!=="hook"){console.log(o.yellow(`${e} is not at hook tier (currently: ${t.tier||"habit"}).`));return}let m=r.cooldown?parseInt(r.cooldown):14,c=new Date;c.setDate(c.getDate()+m),n.states[e]={...t,tier:"habit",demotedAt:new Date().toISOString(),cooldownUntil:c.toISOString()},$(a,n);let f=g[e]||e;console.log(o.yellow(`${o.bold("\u{1F4AD}")} Demoted "${f}" back to habit tier.`)),console.log(o.gray(` Cooldown: ${m} days (until ${c.toISOString().split("T")[0]}).`)),console.log(o.gray(" MCP evaluation will resume checking this habit."));}export{D as graduateDemoteCommand,G as graduatePromoteCommand,v as graduateStatusCommand};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export{b as cliBuildGraphState,a as graphCommand,c as graphGenerateCommand}from'./chunk-6QKCUEEY.js';import'./chunk-WR6D3SC6.js';import'./chunk-XHJ27CER.js';
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import {a,b}from'./chunk-Y6KXTQBG.js';import'./chunk-5TAVYPOV.js';import l from'express';import*as c from'path';import*as h from'fs';import {fileURLToPath}from'url';import a$1 from'chalk';var f=fileURLToPath(import.meta.url),d=c.dirname(f),p={component(s){let t=a$1.magenta(`#${s}`);return {info:(o,e)=>{let r=e?a$1.gray(` ${Object.entries(e).map(([n,i])=>`${n}=${i}`).join(" ")}`):"";console.log(`${a$1.blue("i")} ${t} ${o}${r}`);},success:(o,e)=>{let r=e?a$1.gray(` ${Object.entries(e).map(([n,i])=>`${n}=${i}`).join(" ")}`):"";console.log(`${a$1.green("+")} ${t} ${o}${r}`);},warn:(o,e)=>{let r=e?a$1.gray(` ${Object.entries(e).map(([n,i])=>`${n}=${i}`).join(" ")}`):"";console.log(`${a$1.yellow("!")} ${t} ${o}${r}`);},error:(o,e)=>{let r=e?a$1.gray(` ${Object.entries(e).map(([n,i])=>`${n}=${i}`).join(" ")}`):"";console.error(`${a$1.red("x")} ${t} ${o}${r}`);}}}};function y(s){let t=l();t.use(l.json()),t.use((e,r,n)=>{if(r.header("Access-Control-Allow-Origin","*"),r.header("Access-Control-Allow-Methods","GET, POST, PUT, DELETE, OPTIONS"),r.header("Access-Control-Allow-Headers","Content-Type"),e.method==="OPTIONS"){r.sendStatus(204);return}n();}),t.use("/api/symbols",a(s.projectDir)),t.use("/api/graphs",b(s.projectDir)),t.get("/api/health",(e,r)=>{r.json({status:"ok",timestamp:new Date().toISOString()});});let o=c.join(d,"..","graph-ui","dist");return h.existsSync(o)||(o=c.join(d,"..","..","graph-ui","dist")),h.existsSync(o)?(t.use(l.static(o)),t.get("{*path}",(e,r)=>{e.path.startsWith("/api")||r.sendFile(c.join(o,"index.html"));})):t.get("/",(e,r)=>{r.send(`
2
+ import {a,b}from'./chunk-Y6KXTQBG.js';import'./chunk-XHJ27CER.js';import l from'express';import*as c from'path';import*as h from'fs';import {fileURLToPath}from'url';import a$1 from'chalk';var f=fileURLToPath(import.meta.url),d=c.dirname(f),p={component(s){let t=a$1.magenta(`#${s}`);return {info:(o,e)=>{let r=e?a$1.gray(` ${Object.entries(e).map(([n,i])=>`${n}=${i}`).join(" ")}`):"";console.log(`${a$1.blue("i")} ${t} ${o}${r}`);},success:(o,e)=>{let r=e?a$1.gray(` ${Object.entries(e).map(([n,i])=>`${n}=${i}`).join(" ")}`):"";console.log(`${a$1.green("+")} ${t} ${o}${r}`);},warn:(o,e)=>{let r=e?a$1.gray(` ${Object.entries(e).map(([n,i])=>`${n}=${i}`).join(" ")}`):"";console.log(`${a$1.yellow("!")} ${t} ${o}${r}`);},error:(o,e)=>{let r=e?a$1.gray(` ${Object.entries(e).map(([n,i])=>`${n}=${i}`).join(" ")}`):"";console.error(`${a$1.red("x")} ${t} ${o}${r}`);}}}};function y(s){let t=l();t.use(l.json()),t.use((e,r,n)=>{if(r.header("Access-Control-Allow-Origin","*"),r.header("Access-Control-Allow-Methods","GET, POST, PUT, DELETE, OPTIONS"),r.header("Access-Control-Allow-Headers","Content-Type"),e.method==="OPTIONS"){r.sendStatus(204);return}n();}),t.use("/api/symbols",a(s.projectDir)),t.use("/api/graphs",b(s.projectDir)),t.get("/api/health",(e,r)=>{r.json({status:"ok",timestamp:new Date().toISOString()});});let o=c.join(d,"..","graph-ui","dist");return h.existsSync(o)||(o=c.join(d,"..","..","graph-ui","dist")),h.existsSync(o)?(t.use(l.static(o)),t.get("{*path}",(e,r)=>{e.path.startsWith("/api")||r.sendFile(c.join(o,"index.html"));})):t.get("/",(e,r)=>{r.send(`
3
3
  <html>
4
4
  <head><title>Paradigm Graph</title></head>
5
5
  <body style="background:#0a0a0f;color:#e2e8f0;font-family:system-ui;display:flex;align-items:center;justify-content:center;height:100vh;margin:0">
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import {a,b,c,e,d}from'./chunk-73R63P7K.js';import'./chunk-5TAVYPOV.js';import*as g from'fs';import*as u from'path';import {execSync}from'child_process';import o from'chalk';import*as C from'js-yaml';var $=".paradigm/habits.yaml",G=new Set(["explore-before-implement","ripple-before-modify","check-fragility","wisdom-before-implement","verify-before-done","postflight-compliance","test-new-components","purpose-coverage","record-lore-for-significant","gates-for-routes"]),x=["discovery","verification","testing","documentation","collaboration","security"],E=["preflight","postflight","on-stop","on-commit"],I=["advisory","warn","block"],P=["tool-called","file-exists","file-modified","lore-recorded","symbols-registered","gates-declared","tests-exist","git-clean"];function T(e,t){let r=u.join(e,$),i=F(r,t);if(i)return {source:"project",...i};let n=process.env.HOME||process.env.USERPROFILE||"~",l=u.join(n,".paradigm","habits.yaml"),c=F(l,t);return c?{source:"global",...c}:G.has(t)?{source:"seed",filePath:"",index:-1}:null}function F(e,t){if(!g.existsSync(e))return null;try{let r=g.readFileSync(e,"utf8"),i=C.load(r);if(!i?.habits)return null;let n=i.habits.findIndex(l=>l.id===t);return n===-1?null:{filePath:e,index:n}}catch{return null}}function D(e){let t=g.readFileSync(e,"utf8"),r=C.load(t);return r.habits||(r.habits=[]),r.overrides||(r.overrides={}),r}function w(e,t){g.writeFileSync(e,C.dump(t,{lineWidth:80,noRefs:true}),"utf8");}function L(e){let t=u.join(e,$);if(!g.existsSync(t)){let r=u.dirname(t);g.existsSync(r)||g.mkdirSync(r,{recursive:true}),w(t,{version:"1.0",habits:[],overrides:{}});}return t}async function J(e){let t=process.cwd(),r;try{r=a(t);}catch(s){console.log(o.red("Failed to load habits:"),s.message);return}if(e.trigger&&(r=r.filter(s=>s.trigger===e.trigger)),e.category&&(r=r.filter(s=>s.category===e.category)),e.json){console.log(JSON.stringify(r,null,2));return}let i=r.filter(s=>s.enabled),n=r.filter(s=>!s.enabled);console.log(o.magenta(`
2
+ import {a,b,c,e,d}from'./chunk-BRHQJLTG.js';import'./chunk-XHJ27CER.js';import*as g from'fs';import*as u from'path';import {execSync}from'child_process';import o from'chalk';import*as C from'js-yaml';var $=".paradigm/habits.yaml",G=new Set(["explore-before-implement","ripple-before-modify","check-fragility","wisdom-before-implement","verify-before-done","postflight-compliance","test-new-components","purpose-coverage","record-lore-for-significant","gates-for-routes"]),x=["discovery","verification","testing","documentation","collaboration","security"],E=["preflight","postflight","on-stop","on-commit"],I=["advisory","warn","block"],P=["tool-called","file-exists","file-modified","lore-recorded","symbols-registered","gates-declared","tests-exist","git-clean"];function T(e,t){let r=u.join(e,$),i=F(r,t);if(i)return {source:"project",...i};let n=process.env.HOME||process.env.USERPROFILE||"~",l=u.join(n,".paradigm","habits.yaml"),c=F(l,t);return c?{source:"global",...c}:G.has(t)?{source:"seed",filePath:"",index:-1}:null}function F(e,t){if(!g.existsSync(e))return null;try{let r=g.readFileSync(e,"utf8"),i=C.load(r);if(!i?.habits)return null;let n=i.habits.findIndex(l=>l.id===t);return n===-1?null:{filePath:e,index:n}}catch{return null}}function D(e){let t=g.readFileSync(e,"utf8"),r=C.load(t);return r.habits||(r.habits=[]),r.overrides||(r.overrides={}),r}function w(e,t){g.writeFileSync(e,C.dump(t,{lineWidth:80,noRefs:true}),"utf8");}function L(e){let t=u.join(e,$);if(!g.existsSync(t)){let r=u.dirname(t);g.existsSync(r)||g.mkdirSync(r,{recursive:true}),w(t,{version:"1.0",habits:[],overrides:{}});}return t}async function J(e){let t=process.cwd(),r;try{r=a(t);}catch(s){console.log(o.red("Failed to load habits:"),s.message);return}if(e.trigger&&(r=r.filter(s=>s.trigger===e.trigger)),e.category&&(r=r.filter(s=>s.category===e.category)),e.json){console.log(JSON.stringify(r,null,2));return}let i=r.filter(s=>s.enabled),n=r.filter(s=>!s.enabled);console.log(o.magenta(`
3
3
  Habits (${i.length} active, ${n.length} disabled)
4
- `));let l=["preflight","postflight","on-stop","on-commit"];for(let s of l){let y=r.filter(d=>d.trigger===s);if(y.length!==0){console.log(o.cyan(` ${s}:`));for(let d of y){let a=d.enabled?o.green("ON"):o.gray("OFF"),m=d.severity==="block"?o.red(d.severity):d.severity==="warn"?o.yellow(d.severity):o.gray(d.severity);console.log(` ${a} ${o.white(d.id)} [${m}] - ${d.name}`),console.log(o.gray(` ${d.description}`));}console.log();}}let c=u.join(t,$);g.existsSync(c)?console.log(o.gray(` Config: ${$}`)):console.log(o.gray(" Config: using seed habits only (run 'paradigm habits init' to customize)")),console.log();}async function W(e){let t=process.cwd(),r;try{r=a(t);}catch(c){console.log(o.red("Failed to load habits:"),c.message);return}let i=b(r),n=null;try{let{SentinelStorage:c}=await import('./dist-VGFSP3XM.js'),s=u.join(t,".paradigm","sentinel");if(g.existsSync(s)){let y=new c(s),d=e.period||"30d",a=parseInt(d.replace("d",""),10)||30,m=d==="all"?void 0:new Date(Date.now()-a*24*60*60*1e3).toISOString(),v=y.getComplianceRate({dateFrom:m}),f=y.getPracticeEvents({dateFrom:m,limit:500}),b=new Map;for(let h of f){let p=h.habitCategory,S=b.get(p)||{followed:0,skipped:0,partial:0};S[h.result]++,b.set(p,S);}let j=Array.from(b.entries()).map(([h,p])=>{let S=p.followed+p.skipped+p.partial,O=S>0?Math.round((p.followed+p.partial*.5)/S*100):100;return {category:h,rate:O,total:S}}).sort((h,p)=>h.rate-p.rate);n={total:v.total,followed:v.followed,skipped:v.skipped,partial:v.partial,rate:v.rate,byCategory:j};}}catch{}if(e.json){console.log(JSON.stringify({habits:{total:r.length,enabled:i.length},practice:n},null,2));return}console.log(o.magenta(`
4
+ `));let l=["preflight","postflight","on-stop","on-commit"];for(let s of l){let y=r.filter(d=>d.trigger===s);if(y.length!==0){console.log(o.cyan(` ${s}:`));for(let d of y){let a=d.enabled?o.green("ON"):o.gray("OFF"),m=d.severity==="block"?o.red(d.severity):d.severity==="warn"?o.yellow(d.severity):o.gray(d.severity);console.log(` ${a} ${o.white(d.id)} [${m}] - ${d.name}`),console.log(o.gray(` ${d.description}`));}console.log();}}let c=u.join(t,$);g.existsSync(c)?console.log(o.gray(` Config: ${$}`)):console.log(o.gray(" Config: using seed habits only (run 'paradigm habits init' to customize)")),console.log();}async function W(e){let t=process.cwd(),r;try{r=a(t);}catch(c){console.log(o.red("Failed to load habits:"),c.message);return}let i=b(r),n=null;try{let{SentinelStorage:c}=await import('./dist-OKM6BXTH.js'),s=u.join(t,".paradigm","sentinel");if(g.existsSync(s)){let y=new c(s),d=e.period||"30d",a=parseInt(d.replace("d",""),10)||30,m=d==="all"?void 0:new Date(Date.now()-a*24*60*60*1e3).toISOString(),v=y.getComplianceRate({dateFrom:m}),f=y.getPracticeEvents({dateFrom:m,limit:500}),b=new Map;for(let h of f){let p=h.habitCategory,S=b.get(p)||{followed:0,skipped:0,partial:0};S[h.result]++,b.set(p,S);}let j=Array.from(b.entries()).map(([h,p])=>{let S=p.followed+p.skipped+p.partial,O=S>0?Math.round((p.followed+p.partial*.5)/S*100):100;return {category:h,rate:O,total:S}}).sort((h,p)=>h.rate-p.rate);n={total:v.total,followed:v.followed,skipped:v.skipped,partial:v.partial,rate:v.rate,byCategory:j};}}catch{}if(e.json){console.log(JSON.stringify({habits:{total:r.length,enabled:i.length},practice:n},null,2));return}console.log(o.magenta(`
5
5
  Habits Practice Profile
6
6
  `)),console.log(o.white(` Total habits: ${r.length} (${i.length} active)`));let l=new Map;for(let c of i)l.set(c.trigger,(l.get(c.trigger)||0)+1);for(let[c,s]of l)console.log(o.gray(` ${c}: ${s} habit(s)`));if(console.log(),n&&n.total>0){let c=n.rate>=80?o.green:n.rate>=60?o.yellow:o.red;if(console.log(o.white(` Compliance Rate: ${c(`${n.rate}%`)}`)),console.log(o.gray(` Followed: ${n.followed} | Skipped: ${n.skipped} | Partial: ${n.partial}`)),console.log(o.gray(` Total events: ${n.total}
7
7
  `)),n.byCategory.length>0){console.log(o.white(" By Category:"));for(let s of n.byCategory){let y=s.rate>=80?o.green:s.rate>=60?o.yellow:o.red,d="\u2588".repeat(Math.round(s.rate/5))+"\u2591".repeat(20-Math.round(s.rate/5));console.log(` ${s.category.padEnd(15)} ${y(d)} ${y(`${s.rate}%`)} (${s.total})`);}}}else console.log(o.gray(" No practice events recorded yet.")),console.log(o.gray(` Call paradigm_habits_check via MCP to start recording.
@@ -35,7 +35,7 @@ ${C.dump({version:"1.0",habits:[],overrides:{"verify-before-done":{severity:"war
35
35
  # enabled: false # Disable this habit
36
36
  `;g.writeFileSync(r,l,"utf8"),c(t),console.log(o.green(`Created ${$}`)),console.log(o.gray(" 10 seed habits are active by default.")),console.log(o.gray(" Use overrides section to tune severity or disable habits.")),console.log(o.gray(" Run `paradigm habits list` to see all habits.\n"));}async function q(e){let t=process.cwd(),r=u.join(t,$);if(!g.existsSync(r)){console.log(o.yellow(`No ${$} found. Run 'paradigm habits init' first.`));return}if(!x.includes(e.category)){console.log(o.red(`Invalid category: ${e.category}. Valid: ${x.join(", ")}`));return}if(!E.includes(e.trigger)){console.log(o.red(`Invalid trigger: ${e.trigger}. Valid: ${E.join(", ")}`));return}if(e.severity&&!I.includes(e.severity)){console.log(o.red(`Invalid severity: ${e.severity}. Valid: ${I.join(", ")}`));return}let i=e.checkType||"tool-called";if(!P.includes(i)){console.log(o.red(`Invalid check-type: ${i}. Valid: ${P.join(", ")}`));return}let n;try{let a=g.readFileSync(r,"utf8");n=C.load(a),n.habits||(n.habits=[]);}catch(a){console.log(o.red("Failed to parse habits.yaml:"),a.message);return}if(new Set([...n.habits.map(a=>a.id),...a(t).map(a=>a.id)]).has(e.id)){console.log(o.yellow(`Habit "${e.id}" already exists.`));return}let c$1=e.tools?e.tools.split(",").map(a=>a.trim()):[],s=e.patterns?e.patterns.split(",").map(a=>a.trim()):[],y={};i==="tool-called"&&c$1.length>0&&(y.tools=c$1),(i==="file-exists"||i==="file-modified"||i==="tests-exist")&&s.length>0&&(y.patterns=s);let d={id:e.id,name:e.name,description:e.description,category:e.category,trigger:e.trigger,severity:e.severity||"advisory",check:{type:i,params:y},enabled:true};n.habits.push(d),w(r,n),c(t),console.log(o.green(`Added habit: ${e.id}`)),console.log(o.gray(` Name: ${e.name}`)),console.log(o.gray(` Category: ${e.category} | Trigger: ${e.trigger} | Severity: ${e.severity||"advisory"}`)),console.log(o.gray(` Check: ${i}`)),c$1.length>0&&console.log(o.gray(` Tools: ${c$1.join(", ")}`)),s.length>0&&console.log(o.gray(` Patterns: ${s.join(", ")}`)),console.log();}async function z(e,t){let r=process.cwd();if(t.category&&!x.includes(t.category)){console.log(o.red(`Invalid category: ${t.category}. Valid: ${x.join(", ")}`));return}if(t.trigger&&!E.includes(t.trigger)){console.log(o.red(`Invalid trigger: ${t.trigger}. Valid: ${E.join(", ")}`));return}if(t.severity&&!I.includes(t.severity)){console.log(o.red(`Invalid severity: ${t.severity}. Valid: ${I.join(", ")}`));return}if(t.checkType&&!P.includes(t.checkType)){console.log(o.red(`Invalid check-type: ${t.checkType}. Valid: ${P.join(", ")}`));return}let i=T(r,e);if(!i){console.log(o.red(`Habit not found: ${e}`));return}if(i.source==="seed"){if(["name","description","category","trigger","checkType","patterns","tools"].some(m=>t[m]!==void 0)){console.log(o.yellow(`"${e}" is a seed habit. Only --severity and --enabled can be changed.`)),console.log(o.gray(" Other fields require creating a custom habit with the same functionality."));return}if(!t.severity&&t.enabled===void 0){console.log(o.yellow("No changes specified. Use --severity or --enabled for seed habits."));return}let d=L(r),a=D(d);a.overrides||(a.overrides={}),a.overrides[e]||(a.overrides[e]={}),t.severity&&(a.overrides[e].severity=t.severity),t.enabled!==void 0&&(a.overrides[e].enabled=t.enabled==="true"),w(d,a),c(r),console.log(o.green(`Updated seed habit override: ${e}`)),t.severity&&console.log(o.gray(` Severity: ${t.severity}`)),t.enabled!==void 0&&console.log(o.gray(` Enabled: ${t.enabled}`)),console.log();return}let n=D(i.filePath),l=n.habits[i.index];t.name&&(l.name=t.name),t.description&&(l.description=t.description),t.category&&(l.category=t.category),t.trigger&&(l.trigger=t.trigger),t.severity&&(l.severity=t.severity),t.enabled!==void 0&&(l.enabled=t.enabled==="true"),t.checkType&&(l.check.type=t.checkType),t.tools&&(l.check.params.tools=t.tools.split(",").map(s=>s.trim())),t.patterns&&(l.check.params.patterns=t.patterns.split(",").map(s=>s.trim())),n.habits[i.index]=l,w(i.filePath,n),c(r);let c$1=i.source==="global"?"(global)":"(project)";console.log(o.green(`Updated habit: ${e} ${o.gray(c$1)}`)),console.log();}async function Q(e,t){let r=process.cwd(),i=T(r,e);if(!i){console.log(o.red(`Habit not found: ${e}`));return}if(i.source==="seed"){console.log(o.yellow(`"${e}" is a seed habit and cannot be removed.`)),console.log(o.gray(` Use: paradigm habits edit ${e} --enabled false`));return}let n=D(i.filePath),l=n.habits[i.index];if(!t.yes){console.log(o.yellow(`
37
37
  Will remove habit: ${l.name} (${e})`)),console.log(o.gray(` Source: ${i.source} (${i.filePath})`)),console.log(o.gray(` Use --yes to confirm.
38
- `));return}n.habits.splice(i.index,1),w(i.filePath,n),c(r),console.log(o.green(`Removed habit: ${e}`)),console.log();}async function X(e,t){let r=process.cwd(),i=t==="enable",n=T(r,e);if(!n){console.log(o.red(`Habit not found: ${e}`));return}if(n.source==="seed"){let c$1=L(r),s=D(c$1);s.overrides||(s.overrides={}),s.overrides[e]||(s.overrides[e]={}),s.overrides[e].enabled=i,w(c$1,s),c(r),console.log(o.green(`${i?"Enabled":"Disabled"} seed habit: ${e}`)),console.log();return}let l=D(n.filePath);l.habits[n.index].enabled=i,w(n.filePath,l),c(r),console.log(o.green(`${i?"Enabled":"Disabled"} habit: ${e}`)),console.log();}async function Z(e$1){let t=process.cwd(),r=e$1.trigger,i;try{i=a(t);}catch(f){console.log(o.red("Failed to load habits:"),f.message),process.exitCode=1;return}let n=e$1.files?e$1.files.split(",").map(f=>f.trim()).filter(Boolean):N(t),l=e$1.symbols?e$1.symbols.split(",").map(f=>f.trim()).filter(Boolean):[],c;try{c=execSync("git status --porcelain",{cwd:t,encoding:"utf8",timeout:5e3}).trim()==="";}catch{}let s=u.join(t,"portal.yaml"),y=false;if(g.existsSync(s))try{let f=g.readFileSync(s,"utf8"),b=C.load(f);y=b?.routes!=null&&Object.keys(b.routes).length>0;}catch{}let d$1=e({toolsCalled:[],filesModified:n,symbolsTouched:l,loreRecorded:false,hasPortalRoutes:y,taskAddsRoutes:false,gitClean:c}),a$1=d(i,r,d$1),m=0;if(e$1.record&&a$1.evaluations.length>0)try{let f=u.join(t,".paradigm","sentinel");if(g.existsSync(f)){let{SentinelStorage:b}=await import('./dist-VGFSP3XM.js'),j=new b(f);for(let h of a$1.evaluations)j.recordPracticeEvent({habitId:h.habit.id,habitCategory:h.habit.category,result:h.result,engineer:"agent",sessionId:`cli-${Date.now().toString(36)}`,symbolsTouched:l,filesModified:n,notes:h.reason}),m++;}}catch{}let v=u.join(t,".paradigm",".habits-blocking");try{if(r==="on-stop"&&a$1.blocksCompletion){let f=a$1.evaluations.filter(b=>b.result==="skipped"&&b.habit.severity==="block").map(b=>`${b.habit.name}: ${b.reason}`);g.writeFileSync(v,f.join(`
38
+ `));return}n.habits.splice(i.index,1),w(i.filePath,n),c(r),console.log(o.green(`Removed habit: ${e}`)),console.log();}async function X(e,t){let r=process.cwd(),i=t==="enable",n=T(r,e);if(!n){console.log(o.red(`Habit not found: ${e}`));return}if(n.source==="seed"){let c$1=L(r),s=D(c$1);s.overrides||(s.overrides={}),s.overrides[e]||(s.overrides[e]={}),s.overrides[e].enabled=i,w(c$1,s),c(r),console.log(o.green(`${i?"Enabled":"Disabled"} seed habit: ${e}`)),console.log();return}let l=D(n.filePath);l.habits[n.index].enabled=i,w(n.filePath,l),c(r),console.log(o.green(`${i?"Enabled":"Disabled"} habit: ${e}`)),console.log();}async function Z(e$1){let t=process.cwd(),r=e$1.trigger,i;try{i=a(t);}catch(f){console.log(o.red("Failed to load habits:"),f.message),process.exitCode=1;return}let n=e$1.files?e$1.files.split(",").map(f=>f.trim()).filter(Boolean):N(t),l=e$1.symbols?e$1.symbols.split(",").map(f=>f.trim()).filter(Boolean):[],c;try{c=execSync("git status --porcelain",{cwd:t,encoding:"utf8",timeout:5e3}).trim()==="";}catch{}let s=u.join(t,"portal.yaml"),y=false;if(g.existsSync(s))try{let f=g.readFileSync(s,"utf8"),b=C.load(f);y=b?.routes!=null&&Object.keys(b.routes).length>0;}catch{}let d$1=e({toolsCalled:[],filesModified:n,symbolsTouched:l,loreRecorded:false,hasPortalRoutes:y,taskAddsRoutes:false,gitClean:c}),a$1=d(i,r,d$1),m=0;if(e$1.record&&a$1.evaluations.length>0)try{let f=u.join(t,".paradigm","sentinel");if(g.existsSync(f)){let{SentinelStorage:b}=await import('./dist-OKM6BXTH.js'),j=new b(f);for(let h of a$1.evaluations)j.recordPracticeEvent({habitId:h.habit.id,habitCategory:h.habit.category,result:h.result,engineer:"agent",sessionId:`cli-${Date.now().toString(36)}`,symbolsTouched:l,filesModified:n,notes:h.reason}),m++;}}catch{}let v=u.join(t,".paradigm",".habits-blocking");try{if(r==="on-stop"&&a$1.blocksCompletion){let f=a$1.evaluations.filter(b=>b.result==="skipped"&&b.habit.severity==="block").map(b=>`${b.habit.name}: ${b.reason}`);g.writeFileSync(v,f.join(`
39
39
  `),"utf8");}else r==="on-stop"&&g.existsSync(v)&&g.unlinkSync(v);}catch{}e$1.json?console.log(JSON.stringify({trigger:r,evaluation:{total:a$1.summary.total,followed:a$1.summary.followed,skipped:a$1.summary.skipped,partial:a$1.summary.partial,blockingViolations:a$1.summary.blockingViolations,blocksCompletion:a$1.blocksCompletion},habits:a$1.evaluations.map(f=>({id:f.habit.id,name:f.habit.name,category:f.habit.category,severity:f.habit.severity,result:f.result,reason:f.reason,evidence:f.evidence})),recorded:m},null,2)):U(a$1,m),a$1.blocksCompletion&&(process.exitCode=1);}function N(e){try{return execSync("git diff --name-only HEAD",{cwd:e,encoding:"utf8",timeout:5e3}).trim().split(`
40
40
  `).filter(Boolean)}catch{return []}}function U(e,t){let{summary:r}=e;console.log(o.magenta(`
41
41
  Habits Check (${e.trigger})
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import'./chunk-5TAVYPOV.js';import*as s from'fs';import*as y from'path';import t from'chalk';import*as u from'js-yaml';var f=".paradigm/history";async function v(o,r={}){let n=process.cwd(),c=y.join(n,f);if(!s.existsSync(c)){console.log(t.yellow("No history directory found.")),console.log(t.gray("Run `paradigm history init` to create .paradigm/history/"));return}let e=x(y.join(c,"index.yaml")),i=w(y.join(c,"log.jsonl"));if(r.json){if(o){let l=e?.by_symbol?.[o],g=i.filter(a=>a.symbols.includes(o));console.log(JSON.stringify({symbol:o,summary:l,entries:g},null,2));}else console.log(JSON.stringify({index:e,entries:i.slice(-(r.limit||20))},null,2));return}if(console.log(t.magenta(`
2
+ import'./chunk-XHJ27CER.js';import*as s from'fs';import*as y from'path';import t from'chalk';import*as u from'js-yaml';var f=".paradigm/history";async function v(o,r={}){let n=process.cwd(),c=y.join(n,f);if(!s.existsSync(c)){console.log(t.yellow("No history directory found.")),console.log(t.gray("Run `paradigm history init` to create .paradigm/history/"));return}let e=x(y.join(c,"index.yaml")),i=w(y.join(c,"log.jsonl"));if(r.json){if(o){let l=e?.by_symbol?.[o],g=i.filter(a=>a.symbols.includes(o));console.log(JSON.stringify({symbol:o,summary:l,entries:g},null,2));}else console.log(JSON.stringify({index:e,entries:i.slice(-(r.limit||20))},null,2));return}if(console.log(t.magenta(`
3
3
  History
4
4
  `)),o){let l=e?.by_symbol?.[o],g=i.filter(a=>a.symbols.includes(o)).slice(-(r.limit||10));if(console.log(t.cyan(` Symbol: ${o}
5
5
  `)),l){let a=l.fragility==="critical"||l.fragility==="high"?t.red:l.fragility==="medium"?t.yellow:t.green;console.log(t.white(" Summary:")),console.log(t.gray(` Total changes: ${l.total_changes}`)),console.log(t.gray(` Last modified: ${l.last_modified}`)),console.log(t.gray(` Stability: ${(l.stability_score*100).toFixed(0)}%`)),console.log(a(` Fragility: ${l.fragility}`)),console.log();}g.length>0&&(console.log(t.white(" Recent changes:")),g.forEach(a=>{let p=a.type==="rollback"?t.red:a.type==="validate"?a.result==="pass"?t.green:t.red:t.blue;console.log(p(` [${a.type}] ${a.description||a.id}`)+t.gray(` - ${a.author.id} @ ${a.ts.split("T")[0]}`));}));return}let m=Object.keys(e?.by_symbol||{});console.log(t.white(` Tracked symbols: ${m.length}`)),console.log(t.white(` Total entries: ${i.length}`)),console.log();let h=e?.fragile_symbols||[];h.length>0&&(console.log(t.red(" Fragile symbols:")),h.slice(0,5).forEach(l=>{console.log(t.gray(` [${l.fragility}] ${l.symbol}`));}),console.log());let b=i.slice(-10);b.length>0&&(console.log(t.white(" Recent entries:")),b.reverse().forEach(l=>{let g=l.type==="rollback"?t.red:l.type==="validate"?l.result==="pass"?t.green:t.red:t.blue;console.log(g(` [${l.type}] ${l.symbols.join(", ")}`)+t.gray(` - ${l.ts.split("T")[0]}`));}));}async function H(o={}){let r=process.cwd(),n=y.join(r,f);if(s.existsSync(n)&&!o.force){console.log(t.yellow("History directory already exists.")),console.log(t.gray("Use --force to reinitialize"));return}s.mkdirSync(n,{recursive:true}),s.writeFileSync(y.join(n,"log.jsonl"),"");let c={version:"1.0",generated:new Date().toISOString(),by_symbol:{},co_changes:[],fragile_symbols:[]};s.writeFileSync(y.join(n,"index.yaml"),u.dump(c,{lineWidth:-1}));let e={version:"1.0",total_validations:0,pass_rate:0,by_symbol:{}};s.writeFileSync(y.join(n,"validation.yaml"),u.dump(e,{lineWidth:-1})),console.log(t.green("History directory initialized!")),console.log(t.gray(` ${n}/`)),console.log(t.gray(" log.jsonl")),console.log(t.gray(" index.yaml")),console.log(t.gray(" validation.yaml"));}async function E(o={}){let r=process.cwd(),n=y.join(r,f,"index.yaml");if(!s.existsSync(n)){console.log(t.yellow("No history index found.")),console.log(t.gray("Run `paradigm history reindex` to generate"));return}let e=x(n)?.fragile_symbols||[];if(o.json){console.log(JSON.stringify({fragile:e},null,2));return}if(console.log(t.magenta(`
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- export{a as hooksInstallCommand,c as hooksStatusCommand,b as hooksUninstallCommand}from'./chunk-SXO7NC6A.js';import'./chunk-5TAVYPOV.js';
2
+ export{a as hooksInstallCommand,c as hooksStatusCommand,b as hooksUninstallCommand}from'./chunk-SXO7NC6A.js';import'./chunk-XHJ27CER.js';