@a-company/paradigm 5.11.0 → 5.21.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 (408) hide show
  1. package/dist/accept-orchestration-IUAWQZUN.js +18 -0
  2. package/dist/add-P76GEMGF.js +8 -0
  3. package/dist/agent-UUTYOFTH.js +33 -0
  4. package/dist/agent-loader-EPXURMO7.js +2 -0
  5. package/dist/agent-loader-PYGPX6D2.js +2 -0
  6. package/dist/agent-state-KSQ3S7OB.js +2 -0
  7. package/dist/agents-suggest-HYTFMQD3.js +10 -0
  8. package/dist/aggregate-W66DM3GA.js +10 -0
  9. package/dist/ambient-HYZR42NX.js +35 -0
  10. package/dist/assess-UFPYEJKP.js +9 -0
  11. package/dist/auto-RHJXOZFL.js +14 -0
  12. package/dist/beacon-5QVYV5DF.js +13 -0
  13. package/dist/calibration-OLJYB5HN.js +7 -0
  14. package/dist/check-THVGY4R5.js +14 -0
  15. package/dist/chunk-22ISTMKI.js +31 -0
  16. package/dist/chunk-2QO33NYK.js +3 -0
  17. package/dist/chunk-33LKBMVK.js +134 -0
  18. package/dist/chunk-4QADCWPU.js +7 -0
  19. package/dist/chunk-4TXOVRWD.js +3 -0
  20. package/dist/chunk-4UJ4NIEQ.js +4 -0
  21. package/dist/chunk-4ZGGWZ32.js +3 -0
  22. package/dist/chunk-5TAVYPOV.js +2 -0
  23. package/dist/chunk-6EX37L4Q.js +8 -0
  24. package/dist/chunk-AD5TAD2A.js +5 -0
  25. package/dist/chunk-AGVAHVUA.js +2 -0
  26. package/dist/chunk-AO7ZSRME.js +13 -0
  27. package/dist/chunk-BFD3GFRK.js +2 -0
  28. package/dist/chunk-D34YFK4M.js +6 -0
  29. package/dist/chunk-DVZWCXB6.js +2 -0
  30. package/dist/chunk-EKZDFEJW.js +2 -0
  31. package/dist/chunk-ET5XJTSX.js +2 -0
  32. package/dist/chunk-FYDRENK7.js +3 -0
  33. package/dist/chunk-HMQ5BHP2.js +743 -0
  34. package/dist/chunk-HXKWL3VK.js +29 -0
  35. package/dist/chunk-IZSBGW6E.js +2 -0
  36. package/dist/chunk-J32OPJEX.js +2 -0
  37. package/dist/chunk-JBDMCRPP.js +7 -0
  38. package/dist/chunk-JIXHEBGK.js +7 -0
  39. package/dist/chunk-JNSJVCTU.js +2 -0
  40. package/dist/chunk-JQKKVAAN.js +2 -0
  41. package/dist/chunk-KLBH26PA.js +429 -0
  42. package/dist/chunk-L6K5HNDL.js +24 -0
  43. package/dist/chunk-LKAT7IAK.js +2 -0
  44. package/dist/chunk-M4UMM6DC.js +5 -0
  45. package/dist/chunk-NKYNHSA5.js +424 -0
  46. package/dist/chunk-NW6OKHE6.js +5 -0
  47. package/dist/chunk-NXRVR37G.js +60 -0
  48. package/dist/chunk-ODVKPZZ4.js +2 -0
  49. package/dist/chunk-PUBB7LIT.js +5 -0
  50. package/dist/chunk-Q2J542ST.js +2 -0
  51. package/dist/chunk-QGZRM6ZB.js +2 -0
  52. package/dist/chunk-QNZEG7IT.js +13 -0
  53. package/dist/chunk-QT2LKB3P.js +7 -0
  54. package/dist/chunk-RVRARWSY.js +9 -0
  55. package/dist/chunk-T6IDXUUA.js +2 -0
  56. package/dist/chunk-TYWB5IQJ.js +3 -0
  57. package/dist/chunk-UIKLE3WD.js +2 -0
  58. package/dist/chunk-V7K6CQVX.js +111 -0
  59. package/dist/chunk-VCKKJDLP.js +8 -0
  60. package/dist/chunk-VG7FN2TU.js +4 -0
  61. package/dist/chunk-W5IWDW4Y.js +16 -0
  62. package/dist/chunk-W7C6FFMO.js +8 -0
  63. package/dist/chunk-WESTEMIM.js +10 -0
  64. package/dist/chunk-WR6D3SC6.js +5 -0
  65. package/dist/chunk-WS2N27RX.js +3 -0
  66. package/dist/chunk-XMAV5AG6.js +2 -0
  67. package/dist/chunk-XROULIQN.js +2 -0
  68. package/dist/chunk-XUFYOXOU.js +3 -0
  69. package/dist/chunk-Y4XFVDZC.js +3 -0
  70. package/dist/chunk-Y6KXTQBG.js +2 -0
  71. package/dist/{chunk-GTR2TBIJ.js → chunk-Z2UZUCY6.js} +237 -1047
  72. package/dist/chunk-Z34K6GY2.js +8 -0
  73. package/dist/claude-4LR3LJQZ.js +13 -0
  74. package/dist/claude-cli-UP6HGH7C.js +6 -0
  75. package/dist/claude-code-RLJ4GX77.js +11 -0
  76. package/dist/claude-code-teams-R37HJY3Y.js +29 -0
  77. package/dist/commands-LMUD5L6R.js +455 -0
  78. package/dist/compliance-GZ7UAOG3.js +6 -0
  79. package/dist/conductor-Y5IXELTL.js +4 -0
  80. package/dist/config-schema-HR7LDEQ6.js +2 -0
  81. package/dist/constellation-CG7C4WFE.js +13 -0
  82. package/dist/context-audit-RSSRX6XC.js +6 -0
  83. package/dist/cost-IDNVMAEV.js +10 -0
  84. package/dist/cost-PK4KIF7R.js +2 -0
  85. package/dist/cursor-cli-QKF7Z6M2.js +4 -0
  86. package/dist/cursorrules-U5O4G5T4.js +14 -0
  87. package/dist/decision-loader-2XPZE4EZ.js +2 -0
  88. package/dist/delete-P5VULXR4.js +14 -0
  89. package/dist/diff-RTFUKJHF.js +9 -0
  90. package/dist/discipline-H7LDI6NT.js +2 -0
  91. package/dist/dist-3ZCH25SG.js +2 -0
  92. package/dist/dist-KGRCLBJP-2QAPFYNF.js +39 -0
  93. package/dist/dist-R3RWD35F.js +2 -0
  94. package/dist/dist-VGFSP3XM.js +2 -0
  95. package/dist/dist-VXCZWVVJ.js +2 -0
  96. package/dist/dist-W3XCATBJ.js +2 -0
  97. package/dist/docs-EDQ2STFK.js +2 -0
  98. package/dist/docs-RXPN6CK7.js +12 -0
  99. package/dist/doctor-2T2QL6VM.js +2 -0
  100. package/dist/drift-ILZE5BFJ.js +13 -0
  101. package/dist/echo-UPTQUEDU.js +46 -0
  102. package/dist/edit-GUU3HBVW.js +9 -0
  103. package/dist/event-Y3VXC2RV.js +3 -0
  104. package/dist/explain-files-3GPZUETV.js +4 -0
  105. package/dist/export-CV5KCTPS.js +2 -0
  106. package/dist/flow-S3RQ4YPY.js +11 -0
  107. package/dist/global-C44FW4G2.js +13 -0
  108. package/dist/graduate-3BBSC27A.js +5 -0
  109. package/dist/graph-CNDE5TAT.js +2 -0
  110. package/dist/graph-server-COZR5C3Z.js +14 -0
  111. package/dist/habits-4J2KRYUL.js +42 -0
  112. package/dist/history-UW454SDP.js +12 -0
  113. package/dist/hooks-XH52VGOU.js +2 -0
  114. package/dist/index.js +15 -1039
  115. package/dist/init-24MAQJFM.js +2 -0
  116. package/dist/integrity-UYDOOJDP.js +7 -0
  117. package/dist/integrity-checker-DHGMZQDG.js +2 -0
  118. package/dist/journal-loader-GLH7XFTK.js +2 -0
  119. package/dist/lint-IGKE6UPS.js +26 -0
  120. package/dist/list-5IUGP3ZB.js +7 -0
  121. package/dist/list-YKIQNKGB.js +6 -0
  122. package/dist/lore-loader-RVQI5GXL.js +2 -0
  123. package/dist/lore-loader-XY5MZRR2.js +2 -0
  124. package/dist/lore-server-FC2GMDLT.js +14 -0
  125. package/dist/manual-RXSPSFLL.js +20 -0
  126. package/dist/mcp.js +93 -20529
  127. package/dist/migrate-X5OMAFAQ.js +59 -0
  128. package/dist/migrate-assessments-GEI5WMI2.js +4 -0
  129. package/dist/model-discovery-HMB3YI4L.js +2 -0
  130. package/dist/nomination-engine-XF7TWPAP.js +2 -0
  131. package/dist/notebook-PE3JSYZI.js +11 -0
  132. package/dist/notebook-loader-CENTDDUJ.js +2 -0
  133. package/dist/orchestrate-35HBQ3O3.js +8 -0
  134. package/dist/peers-P2KXU7ZK.js +5 -0
  135. package/dist/persona-STQWZH5P.js +29 -0
  136. package/dist/pipeline-MZUITRVN.js +4 -0
  137. package/dist/platform-server-2KXHGHFV.js +25 -0
  138. package/dist/plugin-update-checker-M7PW434O.js +2 -0
  139. package/dist/portal-check-3JVNLOEP.js +8 -0
  140. package/dist/portal-compliance-2UG4VKWH.js +2 -0
  141. package/dist/probe-5L5BQDGE.js +6 -0
  142. package/dist/project-type-SURTOIG7.js +2 -0
  143. package/dist/promote-NJQDZBZA.js +8 -0
  144. package/dist/providers-4PXMWA7V.js +8 -0
  145. package/dist/quiz-FE5UGAY2.js +10 -0
  146. package/dist/record-YXPB34MY.js +6 -0
  147. package/dist/reindex-PGDQSM42.js +2 -0
  148. package/dist/remember-MJRNTXYS.js +14 -0
  149. package/dist/retag-N5XF3KXP.js +6 -0
  150. package/dist/review-6UAH6V3R.js +11 -0
  151. package/dist/review-77QI6VOC.js +6 -0
  152. package/dist/ripple-ZGDITCGB.js +10 -0
  153. package/dist/roster-FLRZ5J42.js +2 -0
  154. package/dist/sentinel-HYAZ3CO5.js +19 -0
  155. package/dist/sentinel-bridge-VR357PKL.js +2 -0
  156. package/dist/sentinel-mcp.js +38 -3808
  157. package/dist/sentinel.js +1 -34
  158. package/dist/serve-JE6UF5P2.js +8 -0
  159. package/dist/serve-L52ZUTU6.js +10 -0
  160. package/dist/serve-OY6XYL7F.js +12 -0
  161. package/dist/server-2MNROHF6.js +7 -0
  162. package/dist/server-4YNUIK4W.js +8 -0
  163. package/dist/session-tracker-SKOMBDOW.js +2 -0
  164. package/dist/session-work-log-3MNUDEZ6.js +2 -0
  165. package/dist/session-work-log-J2H5OZBR.js +2 -0
  166. package/dist/setup-3F5IK7MO.js +31 -0
  167. package/dist/setup-KPIMRZ4Q.js +2 -0
  168. package/dist/shift-6GCNH666.js +11 -0
  169. package/dist/show-BOAVWZPZ.js +7 -0
  170. package/dist/show-PJ5LFLIL.js +5 -0
  171. package/dist/snapshot-L2G56RPL.js +8 -0
  172. package/dist/spawn-UH5RENSE.js +12 -0
  173. package/dist/status-77M3SDIF.js +8 -0
  174. package/dist/status-A37ECYNJ.js +6 -0
  175. package/dist/summary-ZJLQ6KHB.js +7 -0
  176. package/dist/sweep-HU74OPVW.js +17 -0
  177. package/dist/switch-CTW4PDGI.js +17 -0
  178. package/dist/symphony-3QMBGCZY.js +2 -0
  179. package/dist/symphony-QI63XL62.js +53 -0
  180. package/dist/symphony-loader-XACVV2E3.js +2 -0
  181. package/dist/symphony-peers-U4KHMKGI.js +2 -0
  182. package/dist/symphony-peers-X5NGWXFP.js +2 -0
  183. package/dist/symphony-relay-5GY5JIPT.js +3 -0
  184. package/dist/sync-QRDSFETO.js +2 -0
  185. package/dist/sync-llms-HL5PPW3M.js +15 -0
  186. package/dist/task-loader-NZFDTUQ5.js +2 -0
  187. package/dist/team-WGERKGNP.js +2 -0
  188. package/dist/test-BQJMS4Y2.js +111 -0
  189. package/dist/thread-HFXK65D4.js +41 -0
  190. package/dist/timeline-K3ZFKJ3R.js +6 -0
  191. package/dist/triage-FCWOZASE.js +18 -0
  192. package/dist/tutorial-UC6YQMNN.js +305 -0
  193. package/dist/university-content/courses/.purpose +74 -5
  194. package/dist/university-content/plsat/.purpose +3 -2
  195. package/dist/university-ui/assets/{index-BjewBB6s.js → index-CGFJczb1.js} +2 -2
  196. package/dist/university-ui/assets/{index-BjewBB6s.js.map → index-CGFJczb1.js.map} +1 -1
  197. package/dist/university-ui/index.html +1 -1
  198. package/dist/upgrade-B4IOLZYK.js +53 -0
  199. package/dist/validate-C6SMKGYD.js +9 -0
  200. package/dist/validate-LSCDOLBO.js +13 -0
  201. package/dist/validate-VZXTJHGO.js +6 -0
  202. package/dist/watch-LRM5XD46.js +8 -0
  203. package/dist/watch-PZCCUP6K.js +9 -0
  204. package/dist/wisdom-XZ3QKPNP.js +7 -0
  205. package/dist/work-log-loader-DL5GZ2BQ.js +2 -0
  206. package/dist/workspace-2ODL5WLY.js +2 -0
  207. package/package.json +1 -1
  208. package/platform-ui/dist/assets/AmbientSection-DqQ2mfCO.js +1 -0
  209. package/platform-ui/dist/assets/{CanvasSection-DwPTRdIN.js → CanvasSection-DLW0s-Bu.js} +1 -1
  210. package/platform-ui/dist/assets/{DocsSection-BJc_ws4I.js → DocsSection-BQ9Hi51g.js} +1 -1
  211. package/platform-ui/dist/assets/{GitSection-DhqBo1xc.js → GitSection-QQeUX6o3.js} +1 -1
  212. package/platform-ui/dist/assets/{GraphSection-D9fhVnZ0.js → GraphSection-0c9C-w7K.js} +2 -2
  213. package/platform-ui/dist/assets/{GraphSection-BlgXTl53.css → GraphSection-Bbs2a8sC.css} +1 -1
  214. package/platform-ui/dist/assets/LoreSection--t56kCj2.js +1 -0
  215. package/platform-ui/dist/assets/LoreSection-qnmm3o4y.css +1 -0
  216. package/platform-ui/dist/assets/SentinelSection-C4OoME9U.js +1 -0
  217. package/platform-ui/dist/assets/{SymphonySection-BRoBaUSS.js → SymphonySection-B-rvsLxq.js} +1 -1
  218. package/platform-ui/dist/assets/TeamSection-CBFmNEEo.js +1 -0
  219. package/platform-ui/dist/assets/index-Bxp0TVaf.css +1 -0
  220. package/platform-ui/dist/assets/index-DPpOdAtC.js +57 -0
  221. package/platform-ui/dist/index.html +2 -2
  222. package/dist/accept-orchestration-UQLM7PTQ.js +0 -189
  223. package/dist/add-FZRKEGH4.js +0 -81
  224. package/dist/agent-WERIO2XV.js +0 -523
  225. package/dist/agent-loader-TFIANSF4.js +0 -44
  226. package/dist/agent-state-S5DAWPTF.js +0 -24
  227. package/dist/agents-suggest-DNSYJ6IA.js +0 -83
  228. package/dist/aggregate-H57K7PNV.js +0 -88
  229. package/dist/assess-4WVXZLZQ.js +0 -68
  230. package/dist/auto-QFS5NHQU.js +0 -504
  231. package/dist/beacon-KXZXYQHX.js +0 -251
  232. package/dist/calibration-V46G7JTY.js +0 -135
  233. package/dist/check-OWAIWV23.js +0 -175
  234. package/dist/chunk-2IO7JAG2.js +0 -148
  235. package/dist/chunk-2T6BTYBN.js +0 -712
  236. package/dist/chunk-36TKPM5Z.js +0 -400
  237. package/dist/chunk-45MUDW6E.js +0 -804
  238. package/dist/chunk-4BLYIB7J.js +0 -5701
  239. package/dist/chunk-4L3UTYQX.js +0 -677
  240. package/dist/chunk-4NCFWYGG.js +0 -110
  241. package/dist/chunk-54LTTQBH.js +0 -138
  242. package/dist/chunk-5EWAQHFY.js +0 -269
  243. package/dist/chunk-5JGJACDU.js +0 -37
  244. package/dist/chunk-5OUOLN6M.js +0 -659
  245. package/dist/chunk-5VKJBNJL.js +0 -444
  246. package/dist/chunk-6N3JTACN.js +0 -2260
  247. package/dist/chunk-6QC3YGB6.js +0 -114
  248. package/dist/chunk-7N7GSU6K.js +0 -34
  249. package/dist/chunk-ABVQGRF7.js +0 -268
  250. package/dist/chunk-CL7JSK52.js +0 -129
  251. package/dist/chunk-CSD7IHSN.js +0 -152
  252. package/dist/chunk-EDOAWN7J.js +0 -717
  253. package/dist/chunk-EKGMAM62.js +0 -525
  254. package/dist/chunk-EZ3GOCYC.js +0 -132
  255. package/dist/chunk-F3BCHPYT.js +0 -143
  256. package/dist/chunk-FKJUBQU3.js +0 -3081
  257. package/dist/chunk-GT5QGC2H.js +0 -253
  258. package/dist/chunk-GZDFVP2N.js +0 -540
  259. package/dist/chunk-IRKUEJVW.js +0 -405
  260. package/dist/chunk-J2JEQRT3.js +0 -164
  261. package/dist/chunk-JASGXLK3.js +0 -679
  262. package/dist/chunk-KVDYJLTC.js +0 -121
  263. package/dist/chunk-L27I3CPZ.js +0 -357
  264. package/dist/chunk-LHLIAYQ3.js +0 -185
  265. package/dist/chunk-MCMOGQMU.js +0 -145
  266. package/dist/chunk-NQKQG45G.js +0 -688
  267. package/dist/chunk-PBHIFAL4.js +0 -259
  268. package/dist/chunk-PDX44BCA.js +0 -11
  269. package/dist/chunk-PMXRGPRQ.js +0 -305
  270. package/dist/chunk-RAB5IKPR.js +0 -487
  271. package/dist/chunk-RJE5G7WO.js +0 -590
  272. package/dist/chunk-RTHA3XRE.js +0 -880
  273. package/dist/chunk-S2HO5MLR.js +0 -621
  274. package/dist/chunk-S3ORKP3V.js +0 -716
  275. package/dist/chunk-TAIJOFOE.js +0 -124
  276. package/dist/chunk-TXESEO7Y.js +0 -245
  277. package/dist/chunk-UPLDI7CN.js +0 -1334
  278. package/dist/chunk-VL67H5IC.js +0 -506
  279. package/dist/chunk-VPPK3SY4.js +0 -1136
  280. package/dist/chunk-YMDLDELF.js +0 -314
  281. package/dist/chunk-YO6DVTL7.js +0 -99
  282. package/dist/chunk-YRZ5RPEB.js +0 -1561
  283. package/dist/chunk-ZDHLG5VP.js +0 -5676
  284. package/dist/chunk-ZGUAAVMA.js +0 -756
  285. package/dist/chunk-ZSYVKSY6.js +0 -2602
  286. package/dist/claude-FRRWJSTJ.js +0 -362
  287. package/dist/claude-cli-XJLK2X4L.js +0 -276
  288. package/dist/claude-code-HTBA4XRB.js +0 -126
  289. package/dist/claude-code-teams-T4SP24MD.js +0 -199
  290. package/dist/commands-5N4ILTPH.js +0 -5859
  291. package/dist/conductor-CQVGTEQN.js +0 -161
  292. package/dist/config-schema-EA4XALGG.js +0 -154
  293. package/dist/constellation-A26CCGQS.js +0 -225
  294. package/dist/context-audit-RLO3ETRP.js +0 -682
  295. package/dist/cost-BGM32XJU.js +0 -93
  296. package/dist/cost-VI46A4XL.js +0 -174
  297. package/dist/cursor-cli-JVEZGHWQ.js +0 -269
  298. package/dist/cursorrules-HLIKJJZT.js +0 -84
  299. package/dist/decision-loader-WWCLIQPJ.js +0 -20
  300. package/dist/delete-KBRPQLPC.js +0 -56
  301. package/dist/diff-D4X53HAC.js +0 -126
  302. package/dist/discipline-FA4OZXIS.js +0 -24
  303. package/dist/dist-34NA5RS5.js +0 -74
  304. package/dist/dist-5QE2BB2B-5S3T6Y3T.js +0 -6919
  305. package/dist/dist-77JDTVAY.js +0 -62
  306. package/dist/dist-OGTSAZ55.js +0 -1358
  307. package/dist/dist-QK4SQAK7.js +0 -64
  308. package/dist/dist-TA6LSC2Q.js +0 -20
  309. package/dist/docs-PBZB7LYP.js +0 -89
  310. package/dist/docs-QIYKO3BR.js +0 -155
  311. package/dist/doctor-ULBOHEIC.js +0 -11
  312. package/dist/drift-R5NRKFHI.js +0 -251
  313. package/dist/echo-O2LY7CC2.js +0 -248
  314. package/dist/edit-R2HNLMOG.js +0 -63
  315. package/dist/event-25OJKDCE.js +0 -31
  316. package/dist/export-IWVL7XLF.js +0 -38
  317. package/dist/flow-CRRVV3O3.js +0 -185
  318. package/dist/global-3NG5JXUB.js +0 -136
  319. package/dist/graduate-USAWGBJM.js +0 -160
  320. package/dist/graph-VHUMAAS6.js +0 -12
  321. package/dist/graph-server-YL22VBBN.js +0 -116
  322. package/dist/habits-OL5NGPXO.js +0 -1405
  323. package/dist/history-WOWC573W.js +0 -277
  324. package/dist/hooks-HFWSCGPV.js +0 -12
  325. package/dist/integrity-IHO4FZTS.js +0 -194
  326. package/dist/integrity-checker-PSKJA5SB.js +0 -12
  327. package/dist/journal-loader-5EYSBFFY.js +0 -18
  328. package/dist/lint-K6CJGGPH.js +0 -456
  329. package/dist/list-4YK7QKFF.js +0 -57
  330. package/dist/list-ENR7Q4CR.js +0 -56
  331. package/dist/lore-loader-7NO6N6FT.js +0 -26
  332. package/dist/lore-server-UNJY5KC3.js +0 -118
  333. package/dist/manual-G6FISID5.js +0 -204
  334. package/dist/migrate-LS45DNEV.js +0 -889
  335. package/dist/migrate-assessments-RGH4O6IX.js +0 -97
  336. package/dist/model-discovery-D2H3VBGC.js +0 -8
  337. package/dist/nomination-engine-RV5CNO5B.js +0 -42
  338. package/dist/notebook-YWIYGEHV.js +0 -155
  339. package/dist/orchestrate-JLILBBJE.js +0 -324
  340. package/dist/peers-DEOUIZM6.js +0 -82
  341. package/dist/persona-UHAHIVST.js +0 -390
  342. package/dist/pipeline-L4HCSBGN.js +0 -263
  343. package/dist/platform-server-H5YO3DQD.js +0 -1475
  344. package/dist/plugin-update-checker-KRRSGXMV.js +0 -12
  345. package/dist/portal-check-NPYGII2D.js +0 -42
  346. package/dist/portal-compliance-J7DGAPFX.js +0 -18
  347. package/dist/probe-MHL5HQZ2.js +0 -167
  348. package/dist/promote-F6ZYZZAL.js +0 -182
  349. package/dist/providers-GK7PB2OL.js +0 -104
  350. package/dist/quiz-M66SC7F7.js +0 -99
  351. package/dist/record-RA4WR2BO.js +0 -49
  352. package/dist/reindex-5LTD53ZC.js +0 -16
  353. package/dist/remember-HBWJ655S.js +0 -77
  354. package/dist/retag-3OLCVDEQ.js +0 -62
  355. package/dist/review-27ATYTD2.js +0 -33
  356. package/dist/review-57QMURZV.js +0 -334
  357. package/dist/ripple-JPBXP5I3.js +0 -215
  358. package/dist/sentinel-4XIG4STA.js +0 -63
  359. package/dist/sentinel-bridge-MDUXTQRL.js +0 -109
  360. package/dist/serve-CAH3PHE7.js +0 -33
  361. package/dist/serve-INL7SNBK.js +0 -36
  362. package/dist/serve-KBSE36PL.js +0 -49
  363. package/dist/server-54SKYFFY.js +0 -1647
  364. package/dist/server-XUOIO7E6.js +0 -338
  365. package/dist/session-tracker-C4BMD5WG.js +0 -13
  366. package/dist/session-work-log-MZ47OAPB.js +0 -20
  367. package/dist/setup-EDS27WUR.js +0 -25
  368. package/dist/setup-KO5AFC4K.js +0 -296
  369. package/dist/shift-D2JOHHBF.js +0 -668
  370. package/dist/show-5PV5KFJE.js +0 -176
  371. package/dist/show-NQKYX6WQ.js +0 -82
  372. package/dist/snapshot-BK4RBPCG.js +0 -62
  373. package/dist/spawn-RCHNXDHE.js +0 -196
  374. package/dist/status-WGIAQODY.js +0 -71
  375. package/dist/summary-NIRABMF5.js +0 -140
  376. package/dist/sweep-QMHNSIY5.js +0 -934
  377. package/dist/switch-6EJPZDIA.js +0 -232
  378. package/dist/symphony-4OCY36AI.js +0 -791
  379. package/dist/symphony-B75X2MME.js +0 -326
  380. package/dist/symphony-loader-UZGON56V.js +0 -90
  381. package/dist/symphony-peers-2ZQYLRNI.js +0 -34
  382. package/dist/symphony-peers-OL7F6M5S.js +0 -121
  383. package/dist/symphony-relay-UJYUXN65.js +0 -710
  384. package/dist/sync-VEHUH4OA.js +0 -11
  385. package/dist/sync-llms-YHCFIE6X.js +0 -166
  386. package/dist/task-loader-LDYWQSLM.js +0 -20
  387. package/dist/team-O5MIIFMA.js +0 -34
  388. package/dist/test-566CP5KC.js +0 -1017
  389. package/dist/thread-N754I4D5.js +0 -274
  390. package/dist/timeline-M3CICQFE.js +0 -112
  391. package/dist/triage-HHYGT3HY.js +0 -671
  392. package/dist/tutorial-KD22SUNO.js +0 -666
  393. package/dist/upgrade-H5PF32BW.js +0 -551
  394. package/dist/validate-CNKEKO6A.js +0 -134
  395. package/dist/validate-MB5ULIHS.js +0 -39
  396. package/dist/validate-QH3LADM6.js +0 -64
  397. package/dist/watch-2TKP5PVL.js +0 -199
  398. package/dist/watch-ZF4ML6CD.js +0 -111
  399. package/dist/wisdom-AATMGNFA.js +0 -319
  400. package/dist/work-log-loader-5L45XNYZ.js +0 -14
  401. package/dist/workspace-6E6OSRNU.js +0 -21
  402. package/platform-ui/dist/assets/AmbientSection-WtHfNedO.js +0 -1
  403. package/platform-ui/dist/assets/LoreSection-C3EixkjW.css +0 -1
  404. package/platform-ui/dist/assets/LoreSection-CwDDHrz9.js +0 -1
  405. package/platform-ui/dist/assets/SentinelSection-Cl7e5oZ6.js +0 -1
  406. package/platform-ui/dist/assets/TeamSection-CqSIMrKz.js +0 -1
  407. package/platform-ui/dist/assets/index-CfpZFjea.css +0 -1
  408. package/platform-ui/dist/assets/index-F0KL9xrN.js +0 -57
@@ -1,682 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- log
4
- } from "./chunk-4NCFWYGG.js";
5
- import "./chunk-PDX44BCA.js";
6
-
7
- // src/commands/doctor/context-audit.ts
8
- import * as fs from "fs";
9
- import * as path from "path";
10
- import * as yaml from "js-yaml";
11
- var INSTRUCTION_FILES = ["CLAUDE.md", ".cursorrules", "AGENTS.md"];
12
- function loadInstructionFiles(rootDir) {
13
- const results = [];
14
- for (const name of INSTRUCTION_FILES) {
15
- const filePath = path.join(rootDir, name);
16
- if (fs.existsSync(filePath)) {
17
- const content = fs.readFileSync(filePath, "utf8");
18
- results.push({ name, content, lines: content.split("\n") });
19
- }
20
- }
21
- return results;
22
- }
23
- function findSourceDirs(dir, extensions) {
24
- const dirs = /* @__PURE__ */ new Set();
25
- const skipDirs = /* @__PURE__ */ new Set(["node_modules", "dist", ".git", ".paradigm", "coverage", "build", "__pycache__", "target", ".next", ".nuxt"]);
26
- function walk(current) {
27
- let entries;
28
- try {
29
- entries = fs.readdirSync(current, { withFileTypes: true });
30
- } catch {
31
- return;
32
- }
33
- let hasSource = false;
34
- for (const entry of entries) {
35
- if (skipDirs.has(entry.name)) continue;
36
- const full = path.join(current, entry.name);
37
- if (entry.isDirectory()) {
38
- walk(full);
39
- } else if (entry.isFile()) {
40
- const ext = path.extname(entry.name);
41
- if (extensions.includes(ext)) {
42
- hasSource = true;
43
- }
44
- }
45
- }
46
- if (hasSource) {
47
- dirs.add(current);
48
- }
49
- }
50
- walk(dir);
51
- return dirs;
52
- }
53
- function hasPurposeCoverage(dir, rootDir) {
54
- let current = dir;
55
- while (true) {
56
- if (fs.existsSync(path.join(current, ".purpose"))) return true;
57
- if (current === rootDir) break;
58
- const parent = path.dirname(current);
59
- if (parent === current) break;
60
- current = parent;
61
- }
62
- return false;
63
- }
64
- async function checkStaleReferences(rootDir) {
65
- const results = [];
66
- const files = loadInstructionFiles(rootDir);
67
- if (files.length === 0) {
68
- results.push({
69
- check: "stale-references",
70
- status: "advisory",
71
- message: "No instruction files found (CLAUDE.md, .cursorrules, AGENTS.md)"
72
- });
73
- return results;
74
- }
75
- const pathPattern = /(?:^|\s|`|"|')([.a-zA-Z0-9_-]+(?:\/[.a-zA-Z0-9_*{}-]+)+\/?)/gm;
76
- const extPattern = /(?:^|\s|`|"|')([a-zA-Z0-9_-]+\.(?:ts|js|py|rs|go|yaml|yml|json|md|toml))\b/gm;
77
- const stale = [];
78
- const checked = /* @__PURE__ */ new Set();
79
- for (const file of files) {
80
- const allMatches = [];
81
- let match;
82
- pathPattern.lastIndex = 0;
83
- while ((match = pathPattern.exec(file.content)) !== null) {
84
- allMatches.push(match[1]);
85
- }
86
- extPattern.lastIndex = 0;
87
- while ((match = extPattern.exec(file.content)) !== null) {
88
- allMatches.push(match[1]);
89
- }
90
- for (const ref of allMatches) {
91
- const cleaned = ref.replace(/\/+$/, "").replace(/`/g, "");
92
- if (cleaned.startsWith("http") || cleaned.startsWith("//")) continue;
93
- if (cleaned.includes("*") || cleaned.includes("{")) continue;
94
- if (cleaned.startsWith("paradigm://")) continue;
95
- if (cleaned.startsWith("node_modules/")) continue;
96
- if (checked.has(cleaned)) continue;
97
- checked.add(cleaned);
98
- const hasExt = /\.(ts|js|py|rs|go|yaml|yml|json|md|toml)(?:\/|$)/.test(cleaned);
99
- const hasPathPrefix = /^(\.|src\/|packages\/|lib\/|app\/|docs\/)/.test(cleaned);
100
- if (!hasExt && !hasPathPrefix) continue;
101
- const fullPath = path.join(rootDir, cleaned);
102
- if (!fs.existsSync(fullPath)) {
103
- stale.push(`${file.name}: ${cleaned}`);
104
- }
105
- }
106
- }
107
- if (stale.length > 0) {
108
- results.push({
109
- check: "stale-references",
110
- status: "error",
111
- message: `${stale.length} dead path reference${stale.length > 1 ? "s" : ""} in instruction files`,
112
- details: stale,
113
- fix: "Update or remove dead paths from instruction files"
114
- });
115
- } else {
116
- results.push({
117
- check: "stale-references",
118
- status: "ok",
119
- message: "All referenced paths exist"
120
- });
121
- }
122
- return results;
123
- }
124
- async function checkConventionContradictions(rootDir) {
125
- const results = [];
126
- const files = loadInstructionFiles(rootDir);
127
- const configPath = path.join(rootDir, ".paradigm", "config.yaml");
128
- if (fs.existsSync(configPath)) {
129
- const content = fs.readFileSync(configPath, "utf8");
130
- files.push({ name: "config.yaml", content, lines: content.split("\n") });
131
- }
132
- if (files.length === 0) {
133
- results.push({
134
- check: "convention-contradictions",
135
- status: "ok",
136
- message: "No instruction files to check"
137
- });
138
- return results;
139
- }
140
- const conventions = [];
141
- const contradictions = [];
142
- const namingPatterns = [
143
- [/\bcamelCase\b/i, "camelCase"],
144
- [/\bkebab[- ]?case\b/i, "kebab-case"],
145
- [/\bsnake[_ ]?case\b/i, "snake_case"],
146
- [/\bPascalCase\b/i, "PascalCase"]
147
- ];
148
- for (const file of files) {
149
- for (let i = 0; i < file.lines.length; i++) {
150
- const line = file.lines[i];
151
- for (const [pattern, name] of namingPatterns) {
152
- if (pattern.test(line)) {
153
- const scopeMatch = line.match(/\b(file|variable|function|class|component|symbol|directory|folder|module|import)\s*nam/i);
154
- const scope = scopeMatch ? scopeMatch[1].toLowerCase() : "general";
155
- conventions.push({ scope, directive: name, source: file.name, line: i + 1 });
156
- }
157
- }
158
- }
159
- }
160
- const byScope = /* @__PURE__ */ new Map();
161
- for (const conv of conventions) {
162
- const existing = byScope.get(conv.scope) || [];
163
- existing.push(conv);
164
- byScope.set(conv.scope, existing);
165
- }
166
- for (const [scope, rules] of byScope) {
167
- const directives = new Set(rules.map((r) => r.directive));
168
- const conflictPairs = [
169
- ["camelCase", "kebab-case"],
170
- ["camelCase", "snake_case"],
171
- ["kebab-case", "snake_case"]
172
- ];
173
- for (const [a, b] of conflictPairs) {
174
- if (directives.has(a) && directives.has(b)) {
175
- const ruleA = rules.find((r) => r.directive === a);
176
- const ruleB = rules.find((r) => r.directive === b);
177
- contradictions.push(
178
- `${scope} naming: ${a} (${ruleA.source}:${ruleA.line}) vs ${b} (${ruleB.source}:${ruleB.line})`
179
- );
180
- }
181
- }
182
- }
183
- if (contradictions.length > 0) {
184
- results.push({
185
- check: "convention-contradictions",
186
- status: "warn",
187
- message: `${contradictions.length} potential convention contradiction${contradictions.length > 1 ? "s" : ""}`,
188
- details: contradictions,
189
- fix: "Reconcile conflicting naming/style conventions in instruction files"
190
- });
191
- } else {
192
- results.push({
193
- check: "convention-contradictions",
194
- status: "ok",
195
- message: "No contradictions detected"
196
- });
197
- }
198
- return results;
199
- }
200
- var SKIP_DEPS = /* @__PURE__ */ new Set([
201
- "typescript",
202
- "tsup",
203
- "vitest",
204
- "eslint",
205
- "prettier",
206
- "rimraf",
207
- "tsx",
208
- "ts-node",
209
- "nodemon",
210
- "concurrently",
211
- "husky",
212
- "lint-staged",
213
- "unbuild",
214
- "turbo",
215
- "lerna",
216
- "changesets"
217
- ]);
218
- var SKIP_PREFIXES = ["@types/", "@typescript-eslint/", "@eslint/"];
219
- async function checkUndocumentedStack(rootDir) {
220
- const results = [];
221
- const pkgPath = path.join(rootDir, "package.json");
222
- if (!fs.existsSync(pkgPath)) {
223
- results.push({
224
- check: "undocumented-stack",
225
- status: "ok",
226
- message: "No package.json found (not a JS/TS project or monorepo root)"
227
- });
228
- return results;
229
- }
230
- let pkg;
231
- try {
232
- pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
233
- } catch {
234
- results.push({
235
- check: "undocumented-stack",
236
- status: "advisory",
237
- message: "Could not parse package.json"
238
- });
239
- return results;
240
- }
241
- const allDeps = /* @__PURE__ */ new Set([
242
- ...Object.keys(pkg.dependencies || {}),
243
- ...Object.keys(pkg.devDependencies || {})
244
- ]);
245
- const majorDeps = [];
246
- for (const dep of allDeps) {
247
- if (SKIP_DEPS.has(dep)) continue;
248
- if (SKIP_PREFIXES.some((p) => dep.startsWith(p))) continue;
249
- majorDeps.push(dep);
250
- }
251
- if (majorDeps.length === 0) {
252
- results.push({
253
- check: "undocumented-stack",
254
- status: "ok",
255
- message: "No major dependencies to document"
256
- });
257
- return results;
258
- }
259
- const files = loadInstructionFiles(rootDir);
260
- const allContent = files.map((f) => f.content).join("\n").toLowerCase();
261
- const undocumented = [];
262
- for (const dep of majorDeps) {
263
- const depLower = dep.toLowerCase();
264
- const shortName = dep.includes("/") ? dep.split("/").pop() : dep;
265
- if (!allContent.includes(depLower) && !allContent.includes(shortName.toLowerCase())) {
266
- undocumented.push(dep);
267
- }
268
- }
269
- if (undocumented.length > 0) {
270
- results.push({
271
- check: "undocumented-stack",
272
- status: "advisory",
273
- message: `${undocumented.length} dependenc${undocumented.length > 1 ? "ies" : "y"} not mentioned in instruction files`,
274
- details: undocumented.slice(0, 20),
275
- // Cap at 20 to avoid noise
276
- fix: "Consider documenting major dependencies in CLAUDE.md for AI context"
277
- });
278
- } else {
279
- results.push({
280
- check: "undocumented-stack",
281
- status: "ok",
282
- message: "All major dependencies are documented"
283
- });
284
- }
285
- return results;
286
- }
287
- async function checkPurposeCoverage(rootDir) {
288
- const results = [];
289
- const sourceExtensions = [".ts", ".js", ".py", ".rs", ".go", ".tsx", ".jsx"];
290
- const sourceDirs = findSourceDirs(rootDir, sourceExtensions);
291
- if (sourceDirs.size === 0) {
292
- results.push({
293
- check: "purpose-coverage",
294
- status: "ok",
295
- message: "No source directories found"
296
- });
297
- return results;
298
- }
299
- let covered = 0;
300
- const uncovered = [];
301
- for (const dir of sourceDirs) {
302
- if (hasPurposeCoverage(dir, rootDir)) {
303
- covered++;
304
- } else {
305
- const rel = path.relative(rootDir, dir);
306
- uncovered.push(rel);
307
- }
308
- }
309
- const total = sourceDirs.size;
310
- const pct = Math.round(covered / total * 100);
311
- if (pct < 80) {
312
- results.push({
313
- check: "purpose-coverage",
314
- status: "warn",
315
- message: `${pct}% purpose coverage (${covered}/${total} source directories) \u2014 below 80% threshold`,
316
- details: uncovered.slice(0, 15),
317
- fix: "Create .purpose files in uncovered source directories"
318
- });
319
- } else {
320
- results.push({
321
- check: "purpose-coverage",
322
- status: "ok",
323
- message: `${pct}% purpose coverage (${covered}/${total} source directories)`
324
- });
325
- }
326
- return results;
327
- }
328
- async function checkOrphanedSymbols(rootDir) {
329
- const results = [];
330
- const indexPath = path.join(rootDir, ".paradigm", "scan-index.json");
331
- if (!fs.existsSync(indexPath)) {
332
- results.push({
333
- check: "orphaned-symbols",
334
- status: "advisory",
335
- message: "No scan-index.json found \u2014 run paradigm scan first"
336
- });
337
- return results;
338
- }
339
- let index;
340
- try {
341
- index = JSON.parse(fs.readFileSync(indexPath, "utf8"));
342
- } catch {
343
- results.push({
344
- check: "orphaned-symbols",
345
- status: "advisory",
346
- message: "Could not parse scan-index.json"
347
- });
348
- return results;
349
- }
350
- const categories = ["components", "gates", "signals", "flows", "aspects"];
351
- const allSymbols = /* @__PURE__ */ new Map();
352
- const referencedSymbols = /* @__PURE__ */ new Set();
353
- for (const cat of categories) {
354
- const entries = index[cat];
355
- if (!entries || typeof entries !== "object") continue;
356
- for (const [id, entry] of Object.entries(entries)) {
357
- if (entry.symbol) {
358
- allSymbols.set(entry.symbol, id);
359
- }
360
- if (entry.related && Array.isArray(entry.related)) {
361
- for (const ref of entry.related) {
362
- referencedSymbols.add(ref);
363
- }
364
- }
365
- }
366
- }
367
- const hasOutgoingRefs = /* @__PURE__ */ new Set();
368
- for (const cat of categories) {
369
- const entries = index[cat];
370
- if (!entries || typeof entries !== "object") continue;
371
- for (const [, entry] of Object.entries(entries)) {
372
- if (entry.symbol && entry.related && Array.isArray(entry.related) && entry.related.length > 0) {
373
- hasOutgoingRefs.add(entry.symbol);
374
- }
375
- }
376
- }
377
- const isolated = [];
378
- for (const [symbol] of allSymbols) {
379
- if (!referencedSymbols.has(symbol) && !hasOutgoingRefs.has(symbol)) {
380
- isolated.push(symbol);
381
- }
382
- }
383
- if (isolated.length > 0) {
384
- results.push({
385
- check: "orphaned-symbols",
386
- status: "advisory",
387
- message: `${isolated.length} isolated symbol${isolated.length > 1 ? "s" : ""} (no connections to other symbols)`,
388
- details: isolated.slice(0, 20),
389
- fix: "Wire isolated symbols into features or remove them from .purpose files"
390
- });
391
- } else {
392
- results.push({
393
- check: "orphaned-symbols",
394
- status: "ok",
395
- message: "All symbols are connected"
396
- });
397
- }
398
- return results;
399
- }
400
- async function checkStalePortal(rootDir) {
401
- const results = [];
402
- const portalPath = path.join(rootDir, "portal.yaml");
403
- if (!fs.existsSync(portalPath)) {
404
- results.push({
405
- check: "stale-portal",
406
- status: "ok",
407
- message: "No portal.yaml found (no routes to check)"
408
- });
409
- return results;
410
- }
411
- let portal;
412
- try {
413
- portal = yaml.load(fs.readFileSync(portalPath, "utf8"));
414
- } catch {
415
- results.push({
416
- check: "stale-portal",
417
- status: "error",
418
- message: "Could not parse portal.yaml"
419
- });
420
- return results;
421
- }
422
- if (!portal?.routes || typeof portal.routes !== "object") {
423
- results.push({
424
- check: "stale-portal",
425
- status: "ok",
426
- message: "No routes defined in portal.yaml"
427
- });
428
- return results;
429
- }
430
- const routePatterns = Object.keys(portal.routes);
431
- const staleRoutes = [];
432
- const sourceExtensions = [".ts", ".js", ".py", ".rs", ".go"];
433
- const allSourceFiles = [];
434
- function collectSourceFiles(dir) {
435
- const skipDirs = /* @__PURE__ */ new Set(["node_modules", "dist", ".git", ".paradigm", "coverage", "build", "target"]);
436
- try {
437
- const entries = fs.readdirSync(dir, { withFileTypes: true });
438
- for (const entry of entries) {
439
- if (skipDirs.has(entry.name)) continue;
440
- const full = path.join(dir, entry.name);
441
- if (entry.isDirectory()) {
442
- collectSourceFiles(full);
443
- } else if (entry.isFile()) {
444
- const ext = path.extname(entry.name);
445
- if (sourceExtensions.includes(ext)) {
446
- allSourceFiles.push(full);
447
- }
448
- }
449
- }
450
- } catch {
451
- }
452
- }
453
- collectSourceFiles(rootDir);
454
- const filenameLower = allSourceFiles.map((f) => ({
455
- full: f,
456
- name: path.basename(f, path.extname(f)).toLowerCase(),
457
- relPath: path.relative(rootDir, f).toLowerCase()
458
- }));
459
- for (const route of routePatterns) {
460
- const pathPart = route.replace(/^(GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS)\s+/i, "");
461
- const segments = pathPart.split("/").filter((s) => s && !s.startsWith(":") && s !== "api");
462
- if (segments.length === 0) continue;
463
- const resource = segments[0].toLowerCase();
464
- const hasMatch = filenameLower.some(
465
- (f) => f.name.includes(resource) || f.relPath.includes(resource)
466
- );
467
- if (!hasMatch) {
468
- staleRoutes.push(route);
469
- }
470
- }
471
- if (staleRoutes.length > 0) {
472
- results.push({
473
- check: "stale-portal",
474
- status: "error",
475
- message: `${staleRoutes.length} portal route${staleRoutes.length > 1 ? "s" : ""} with no matching implementation file`,
476
- details: staleRoutes,
477
- fix: "Implement missing route handlers or remove stale routes from portal.yaml"
478
- });
479
- } else {
480
- results.push({
481
- check: "stale-portal",
482
- status: "ok",
483
- message: `All ${routePatterns.length} portal routes have matching implementation files`
484
- });
485
- }
486
- return results;
487
- }
488
- var VAGUE_PATTERNS = [
489
- { pattern: /\btry to\b/i, label: "try to" },
490
- { pattern: /\bmaybe\b/i, label: "maybe" },
491
- { pattern: /\bif possible\b/i, label: "if possible" },
492
- { pattern: /\bconsider\b(?!-handoff)/i, label: "consider" },
493
- { pattern: /\bmight want to\b/i, label: "might want to" },
494
- { pattern: /\byou could\b/i, label: "you could" },
495
- { pattern: /\boptionally\b/i, label: "optionally" }
496
- ];
497
- async function checkInstructionVagueness(rootDir) {
498
- const results = [];
499
- const files = loadInstructionFiles(rootDir);
500
- if (files.length === 0) {
501
- results.push({
502
- check: "instruction-vagueness",
503
- status: "ok",
504
- message: "No instruction files to check"
505
- });
506
- return results;
507
- }
508
- const instances = [];
509
- for (const file of files) {
510
- for (let i = 0; i < file.lines.length; i++) {
511
- const line = file.lines[i];
512
- if (line.trimStart().startsWith("```")) continue;
513
- if (line.trim().startsWith("|---")) continue;
514
- for (const { pattern, label } of VAGUE_PATTERNS) {
515
- if (pattern.test(line)) {
516
- const trimmed = line.trim();
517
- const preview = trimmed.length > 80 ? trimmed.slice(0, 77) + "..." : trimmed;
518
- instances.push(`${file.name}:${i + 1} \u2014 "${label}" \u2014 ${preview}`);
519
- }
520
- }
521
- }
522
- }
523
- if (instances.length > 0) {
524
- results.push({
525
- check: "instruction-vagueness",
526
- status: "advisory",
527
- message: `${instances.length} vague phrase${instances.length > 1 ? "s" : ""} in instruction files`,
528
- details: instances.slice(0, 20),
529
- fix: "Replace vague language with clear, actionable directives"
530
- });
531
- } else {
532
- results.push({
533
- check: "instruction-vagueness",
534
- status: "ok",
535
- message: "No vague language detected"
536
- });
537
- }
538
- return results;
539
- }
540
- async function checkConfigSchema(rootDir) {
541
- const results = [];
542
- const configPath = path.join(rootDir, ".paradigm", "config.yaml");
543
- if (!fs.existsSync(configPath)) {
544
- results.push({
545
- check: "config-schema-validation",
546
- status: "advisory",
547
- message: "No .paradigm/config.yaml found"
548
- });
549
- return results;
550
- }
551
- try {
552
- const content = fs.readFileSync(configPath, "utf8");
553
- const { validateConfig } = await import("./config-schema-EA4XALGG.js");
554
- const validation = validateConfig(content);
555
- const details = [];
556
- for (const err of validation.errors) {
557
- details.push(`Error: ${err}`);
558
- }
559
- for (const warn of validation.warnings) {
560
- details.push(`Warning: ${warn}`);
561
- }
562
- if (validation.errors.length > 0) {
563
- results.push({
564
- check: "config-schema-validation",
565
- status: "error",
566
- message: `${validation.errors.length} schema error${validation.errors.length > 1 ? "s" : ""} in config.yaml`,
567
- details,
568
- fix: "Fix invalid fields in .paradigm/config.yaml"
569
- });
570
- } else if (validation.warnings.length > 0) {
571
- results.push({
572
- check: "config-schema-validation",
573
- status: "warn",
574
- message: `${validation.warnings.length} unrecognized key${validation.warnings.length > 1 ? "s" : ""} in config.yaml`,
575
- details,
576
- fix: "Check for typos in .paradigm/config.yaml field names"
577
- });
578
- } else {
579
- results.push({
580
- check: "config-schema-validation",
581
- status: "ok",
582
- message: "config.yaml schema is valid"
583
- });
584
- }
585
- } catch (e) {
586
- results.push({
587
- check: "config-schema-validation",
588
- status: "error",
589
- message: `Could not validate config.yaml: ${e.message}`
590
- });
591
- }
592
- return results;
593
- }
594
- async function checkPurposeFileHealth(rootDir) {
595
- const results = [];
596
- const purposeFiles = [];
597
- function findPurpose(dir) {
598
- const skipDirs = /* @__PURE__ */ new Set(["node_modules", "dist", ".git", ".paradigm", "coverage", "build"]);
599
- try {
600
- const entries = fs.readdirSync(dir, { withFileTypes: true });
601
- for (const entry of entries) {
602
- if (skipDirs.has(entry.name)) continue;
603
- const full = path.join(dir, entry.name);
604
- if (entry.isDirectory()) {
605
- findPurpose(full);
606
- } else if (entry.name === ".purpose") {
607
- purposeFiles.push(full);
608
- }
609
- }
610
- } catch {
611
- }
612
- }
613
- findPurpose(rootDir);
614
- if (purposeFiles.length === 0) {
615
- results.push({
616
- check: "purpose-file-health",
617
- status: "ok",
618
- message: "No .purpose files to check"
619
- });
620
- return results;
621
- }
622
- const oversized = [];
623
- let maxLines = 0;
624
- let maxFile = "";
625
- for (const pf of purposeFiles) {
626
- try {
627
- const content = fs.readFileSync(pf, "utf8");
628
- const lines = content.split("\n").length;
629
- if (lines > maxLines) {
630
- maxLines = lines;
631
- maxFile = path.relative(rootDir, pf);
632
- }
633
- if (lines > 500) {
634
- const severity = lines > 1e3 ? "!!" : "!";
635
- oversized.push(`${severity} ${path.relative(rootDir, pf)} (${lines} lines)`);
636
- }
637
- } catch {
638
- continue;
639
- }
640
- }
641
- if (oversized.length > 0) {
642
- results.push({
643
- check: "purpose-file-health",
644
- status: "warn",
645
- message: `${oversized.length} oversized .purpose file${oversized.length > 1 ? "s" : ""} (largest: ${maxFile} at ${maxLines} lines)`,
646
- details: oversized,
647
- fix: "Split large .purpose files by component type or subdirectory"
648
- });
649
- } else {
650
- results.push({
651
- check: "purpose-file-health",
652
- status: "ok",
653
- message: `${purposeFiles.length} .purpose files, all under 500 lines`
654
- });
655
- }
656
- return results;
657
- }
658
- async function runContextAudit(rootDir, _options) {
659
- const tracker = log.command("doctor:context-audit").start("Running context audit checks");
660
- const results = [];
661
- results.push(...await checkStaleReferences(rootDir));
662
- results.push(...await checkConventionContradictions(rootDir));
663
- results.push(...await checkUndocumentedStack(rootDir));
664
- results.push(...await checkPurposeCoverage(rootDir));
665
- results.push(...await checkOrphanedSymbols(rootDir));
666
- results.push(...await checkStalePortal(rootDir));
667
- results.push(...await checkInstructionVagueness(rootDir));
668
- results.push(...await checkConfigSchema(rootDir));
669
- results.push(...await checkPurposeFileHealth(rootDir));
670
- const errorCount = results.filter((r) => r.status === "error").length;
671
- const warnCount = results.filter((r) => r.status === "warn").length;
672
- const advisoryCount = results.filter((r) => r.status === "advisory").length;
673
- if (errorCount > 0) {
674
- tracker.error("Context audit found issues", { errors: errorCount, warnings: warnCount, advisories: advisoryCount });
675
- } else {
676
- tracker.success("Context audit complete", { warnings: warnCount, advisories: advisoryCount });
677
- }
678
- return results;
679
- }
680
- export {
681
- runContextAudit
682
- };