@maycombhq/atticus 0.0.0-stage → 2.0.0-beta.2

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 (475) hide show
  1. package/LICENSE +177 -0
  2. package/README.md +17 -2
  3. package/THIRD-PARTY-LICENSES.txt +2607 -0
  4. package/dist/bin.js +47 -0
  5. package/dist/chunk-23W7VWKR.js +2609 -0
  6. package/dist/chunk-27NKUS3X.js +4330 -0
  7. package/dist/chunk-2ANOROX3.js +2522 -0
  8. package/dist/chunk-2BF2EYJV.js +174 -0
  9. package/dist/chunk-2BFCZ3RK.js +315 -0
  10. package/dist/chunk-2DIQQJCB.js +378 -0
  11. package/dist/chunk-2RMYG36Q.js +1227 -0
  12. package/dist/chunk-2VHF7OXM.js +55 -0
  13. package/dist/chunk-3ALD2W2A.js +95 -0
  14. package/dist/chunk-3C7EYRFZ.js +41 -0
  15. package/dist/chunk-3G4YI4ZU.js +16 -0
  16. package/dist/chunk-3HI6Z55Y.js +5949 -0
  17. package/dist/chunk-3USYZGRF.js +324 -0
  18. package/dist/chunk-42EVSKME.js +37 -0
  19. package/dist/chunk-4AK7IBVP.js +915 -0
  20. package/dist/chunk-4BKGMUIK.js +53 -0
  21. package/dist/chunk-4BN53TG3.js +343 -0
  22. package/dist/chunk-4NDAAFQT.js +103 -0
  23. package/dist/chunk-4Q3NN7VF.js +32 -0
  24. package/dist/chunk-4RS5KZQD.js +25 -0
  25. package/dist/chunk-4SKZDI62.js +22 -0
  26. package/dist/chunk-4WBVUHXN.js +69 -0
  27. package/dist/chunk-5GDRCDQB.js +32 -0
  28. package/dist/chunk-5GGOLAKC.js +856 -0
  29. package/dist/chunk-5KLGBXG5.js +48 -0
  30. package/dist/chunk-5WG5YP4T.js +34 -0
  31. package/dist/chunk-64EQYWCA.js +180 -0
  32. package/dist/chunk-652QWTLZ.js +242 -0
  33. package/dist/chunk-65NYPGRC.js +766 -0
  34. package/dist/chunk-66YVAGGM.js +46 -0
  35. package/dist/chunk-6BNC6EQ4.js +41 -0
  36. package/dist/chunk-6BVONWJ7.js +50 -0
  37. package/dist/chunk-6D2CQ5II.js +41 -0
  38. package/dist/chunk-6IU67AEK.js +325 -0
  39. package/dist/chunk-6J5OKA4Y.js +49 -0
  40. package/dist/chunk-6JCPI55B.js +92 -0
  41. package/dist/chunk-6JUBZBMW.js +56 -0
  42. package/dist/chunk-6M5NK3K3.js +415 -0
  43. package/dist/chunk-6QSERWXH.js +53 -0
  44. package/dist/chunk-6TACQN3N.js +41 -0
  45. package/dist/chunk-76WKMA4J.js +14 -0
  46. package/dist/chunk-7AVHLZGD.js +45 -0
  47. package/dist/chunk-7EFILTCI.js +67 -0
  48. package/dist/chunk-7EKXJZ2Y.js +2902 -0
  49. package/dist/chunk-7EOBHUMC.js +133 -0
  50. package/dist/chunk-7FBGJFEE.js +66 -0
  51. package/dist/chunk-7JUKDRSZ.js +1726 -0
  52. package/dist/chunk-7SW2QWLU.js +212 -0
  53. package/dist/chunk-7WD63HU2.js +143 -0
  54. package/dist/chunk-7ZUIMTOU.js +108 -0
  55. package/dist/chunk-A3GY6SOA.js +95 -0
  56. package/dist/chunk-A7UPUQFY.js +2356 -0
  57. package/dist/chunk-AA6YULYB.js +376 -0
  58. package/dist/chunk-ABWHYWNI.js +101 -0
  59. package/dist/chunk-AIOQPLA5.js +540 -0
  60. package/dist/chunk-AVJDSJ2F.js +18 -0
  61. package/dist/chunk-B2WLAWNJ.js +374 -0
  62. package/dist/chunk-BKVWTZ6A.js +211 -0
  63. package/dist/chunk-BOHJZTEQ.js +1991 -0
  64. package/dist/chunk-BWZ77RQT.js +25 -0
  65. package/dist/chunk-C6EKFH7J.js +169 -0
  66. package/dist/chunk-CAQZUNOH.js +1150 -0
  67. package/dist/chunk-CEXSU4S6.js +1217 -0
  68. package/dist/chunk-CKSITVS4.js +16101 -0
  69. package/dist/chunk-CNUKCS2T.js +2741 -0
  70. package/dist/chunk-CPA6HPVR.js +3206 -0
  71. package/dist/chunk-CR3MTH32.js +207 -0
  72. package/dist/chunk-CSZ4C5N6.js +307 -0
  73. package/dist/chunk-D3PO4DOZ.js +261 -0
  74. package/dist/chunk-D46WUV3T.js +33 -0
  75. package/dist/chunk-DE76JROX.js +80 -0
  76. package/dist/chunk-DFBCSHVT.js +69 -0
  77. package/dist/chunk-DHPACDG7.js +104 -0
  78. package/dist/chunk-DKJA76CJ.js +113 -0
  79. package/dist/chunk-DPUYDDQG.js +164 -0
  80. package/dist/chunk-DPZHZQKE.js +285 -0
  81. package/dist/chunk-E36QOJMD.js +47 -0
  82. package/dist/chunk-EADP3PEN.js +450 -0
  83. package/dist/chunk-EBEW3XXQ.js +166 -0
  84. package/dist/chunk-EDS2L2LD.js +106 -0
  85. package/dist/chunk-EFHQ3TWP.js +637 -0
  86. package/dist/chunk-EPTBZ3GP.js +101 -0
  87. package/dist/chunk-EYWIDJFU.js +130 -0
  88. package/dist/chunk-F7HYOUFF.js +287 -0
  89. package/dist/chunk-FHH4I4ZV.js +128 -0
  90. package/dist/chunk-FITWGOJ2.js +131 -0
  91. package/dist/chunk-FQXYPF7E.js +147 -0
  92. package/dist/chunk-G2B4ZQGH.js +240 -0
  93. package/dist/chunk-GBRFVT63.js +45 -0
  94. package/dist/chunk-GDLULHTC.js +2919 -0
  95. package/dist/chunk-GLUX4EEP.js +583 -0
  96. package/dist/chunk-GQ4N4WKF.js +1142 -0
  97. package/dist/chunk-GT4I4ZWM.js +38 -0
  98. package/dist/chunk-HFQCFSJR.js +60 -0
  99. package/dist/chunk-HITVBIJS.js +1247 -0
  100. package/dist/chunk-HLJAXMM4.js +233 -0
  101. package/dist/chunk-HVUPKCGJ.js +162 -0
  102. package/dist/chunk-I3E7CX4H.js +155 -0
  103. package/dist/chunk-I4JRCD6M.js +184 -0
  104. package/dist/chunk-ICY36XCH.js +34 -0
  105. package/dist/chunk-IHMLFRVV.js +228 -0
  106. package/dist/chunk-IPKHE5D6.js +1963 -0
  107. package/dist/chunk-J4K3KVLD.js +131 -0
  108. package/dist/chunk-JBTK5OP2.js +55 -0
  109. package/dist/chunk-JCZIKA4C.js +163 -0
  110. package/dist/chunk-JGZCG5VM.js +189 -0
  111. package/dist/chunk-JIITQXFB.js +4087 -0
  112. package/dist/chunk-JMSCMUCA.js +271 -0
  113. package/dist/chunk-JZU3H6UQ.js +54 -0
  114. package/dist/chunk-K65BJIMT.js +49 -0
  115. package/dist/chunk-KEM4SDDP.js +3898 -0
  116. package/dist/chunk-KQDZXGNR.js +14 -0
  117. package/dist/chunk-L24C55VN.js +7923 -0
  118. package/dist/chunk-L6SGQIR3.js +471 -0
  119. package/dist/chunk-LR3R6Z2A.js +400 -0
  120. package/dist/chunk-M766ZJ6W.js +119 -0
  121. package/dist/chunk-MC3H7736.js +19910 -0
  122. package/dist/chunk-MGYZM27B.js +205 -0
  123. package/dist/chunk-MMOSZPWJ.js +273 -0
  124. package/dist/chunk-MVZVGYXH.js +1611 -0
  125. package/dist/chunk-N7IXEHK3.js +549 -0
  126. package/dist/chunk-NE2W3OO7.js +230 -0
  127. package/dist/chunk-NN2ZQEB4.js +38 -0
  128. package/dist/chunk-NXFPS2LR.js +182 -0
  129. package/dist/chunk-O3WI5KWW.js +31 -0
  130. package/dist/chunk-OLQJTJJU.js +76 -0
  131. package/dist/chunk-ONLS5QA5.js +102 -0
  132. package/dist/chunk-OT2O76OS.js +1496 -0
  133. package/dist/chunk-PAMPPUR6.js +4500 -0
  134. package/dist/chunk-PCOCACY3.js +385 -0
  135. package/dist/chunk-PCVDV3UZ.js +430 -0
  136. package/dist/chunk-PRPPGYZG.js +104 -0
  137. package/dist/chunk-Q4D5X7QB.js +264 -0
  138. package/dist/chunk-Q5AMFEWD.js +119 -0
  139. package/dist/chunk-QRAOANID.js +214 -0
  140. package/dist/chunk-QSXK2RGH.js +688 -0
  141. package/dist/chunk-QZSX3F7C.js +389 -0
  142. package/dist/chunk-R6RY4Q5T.js +51 -0
  143. package/dist/chunk-R6XF6UR3.js +149 -0
  144. package/dist/chunk-R77KLRB3.js +166 -0
  145. package/dist/chunk-RRTKKSLQ.js +251 -0
  146. package/dist/chunk-RTEYOSJY.js +29 -0
  147. package/dist/chunk-RUVFXE2L.js +666 -0
  148. package/dist/chunk-RVH5SUW5.js +69 -0
  149. package/dist/chunk-RZPYKDWS.js +26 -0
  150. package/dist/chunk-S2A7YC3Q.js +41433 -0
  151. package/dist/chunk-S3QNRWYR.js +25 -0
  152. package/dist/chunk-SJRGMG6A.js +174 -0
  153. package/dist/chunk-SP2I63OO.js +252 -0
  154. package/dist/chunk-T2UYZSCQ.js +545 -0
  155. package/dist/chunk-T6AIP7H5.js +3851 -0
  156. package/dist/chunk-T6XQL73F.js +94 -0
  157. package/dist/chunk-TANFV3MZ.js +531 -0
  158. package/dist/chunk-TDD55CJH.js +119 -0
  159. package/dist/chunk-TV45EUGM.js +51 -0
  160. package/dist/chunk-TXLH6WHQ.js +2078 -0
  161. package/dist/chunk-TYAID7B7.js +408 -0
  162. package/dist/chunk-UBBC2XSG.js +873 -0
  163. package/dist/chunk-UGLN7QHV.js +27 -0
  164. package/dist/chunk-UNM6ZOKP.js +878 -0
  165. package/dist/chunk-V2YTAIQO.js +1075 -0
  166. package/dist/chunk-VN3DP4LQ.js +43 -0
  167. package/dist/chunk-VOGCSYOI.js +16 -0
  168. package/dist/chunk-VYDBJ73M.js +32 -0
  169. package/dist/chunk-W3BQAZ3Q.js +34 -0
  170. package/dist/chunk-W5BVQF44.js +36 -0
  171. package/dist/chunk-WVPJSRRJ.js +52 -0
  172. package/dist/chunk-WY6PP6AA.js +53 -0
  173. package/dist/chunk-XAKWMCXI.js +285 -0
  174. package/dist/chunk-XPCM366L.js +70 -0
  175. package/dist/chunk-XPTOBS2D.js +48 -0
  176. package/dist/chunk-XY3P7JW7.js +3479 -0
  177. package/dist/chunk-XZRON6IV.js +131 -0
  178. package/dist/chunk-YEDDOYSC.js +27809 -0
  179. package/dist/chunk-YISXLPHN.js +496 -0
  180. package/dist/chunk-YMZ3TNYB.js +18 -0
  181. package/dist/chunk-YY6ZQQBP.js +203 -0
  182. package/dist/chunk-YYQN46FY.js +334 -0
  183. package/dist/chunk-Z6LF7HQN.js +22 -0
  184. package/dist/chunk-ZCJDOK2S.js +116 -0
  185. package/dist/chunk-ZDPAS56H.js +76 -0
  186. package/dist/chunk-ZMAINWBW.js +18 -0
  187. package/dist/chunk-ZMFPW66A.js +22 -0
  188. package/dist/chunk-ZNCEKR4J.js +296 -0
  189. package/dist/chunk-ZVM6AKKM.js +47 -0
  190. package/dist/files.json +1888 -0
  191. package/dist/fixtures/forge/README.md +19 -0
  192. package/dist/fixtures/forge/expected/discrepancies.yaml +54 -0
  193. package/dist/fixtures/forge/expected/inputs.yaml +38 -0
  194. package/dist/fixtures/forge/expected/scan.yaml +342 -0
  195. package/dist/fixtures/forge/inputs/diagrams/forge-context.drawio +23 -0
  196. package/dist/fixtures/forge/inputs/partner-specs/northwind-pay-openapi.yaml +11 -0
  197. package/dist/fixtures/forge/inputs/tickets/ado-stories.json +4 -0
  198. package/dist/fixtures/forge/inputs/tickets/closed-service-requests.json +5 -0
  199. package/dist/fixtures/forge/inputs/wiki/integration-patterns.md +11 -0
  200. package/dist/fixtures/forge/inputs/wiki/ledger-solution-spec.md +9 -0
  201. package/dist/fixtures/forge/inputs/wiki/snow-firewall-request.md +4 -0
  202. package/dist/fixtures/forge/metarepo/judgments/reaches/84af5b6af24f7ca8c23013f3.yaml +17 -0
  203. package/dist/fixtures/forge/metarepo/judgments/reaches/c3917555edebddce8cecb647.yaml +17 -0
  204. package/dist/fixtures/forge/metarepo/judgments/reaches/c5fafd6601f8ca9e34e0bbd0.yaml +17 -0
  205. package/dist/fixtures/forge/metarepo/org-pack/agents/architecture-critic.yaml +9 -0
  206. package/dist/fixtures/forge/metarepo/org-pack/agents/story-writer.yaml +10 -0
  207. package/dist/fixtures/forge/metarepo/org-pack/checklists/architecture.yaml +115 -0
  208. package/dist/fixtures/forge/metarepo/org-pack/dialects/forge.yaml +111 -0
  209. package/dist/fixtures/forge/metarepo/org-pack/gates.yaml +22 -0
  210. package/dist/fixtures/forge/metarepo/org-pack/pack.yaml +11 -0
  211. package/dist/fixtures/forge/metarepo/org-pack/patterns/A.EB.PUB.yaml +12 -0
  212. package/dist/fixtures/forge/metarepo/org-pack/patterns/D.JDBC.yaml +12 -0
  213. package/dist/fixtures/forge/metarepo/org-pack/patterns/S.DIR.BFF.yaml +12 -0
  214. package/dist/fixtures/forge/metarepo/org-pack/patterns/S.GW.SOR.yaml +13 -0
  215. package/dist/fixtures/forge/metarepo/org-pack/patterns/S.GW.VND.yaml +14 -0
  216. package/dist/fixtures/forge/metarepo/org-pack/process/change-templates/feature.md +37 -0
  217. package/dist/fixtures/forge/metarepo/org-pack/process/skills/add-forge-endpoint/SKILL.md +17 -0
  218. package/dist/fixtures/forge/metarepo/org-pack/process/snow/firewall-rule.yaml +14 -0
  219. package/dist/fixtures/forge/metarepo/org-pack/process/snow/gateway-route.yaml +13 -0
  220. package/dist/fixtures/forge/metarepo/org-pack/profiles/forge/profile.yaml +12 -0
  221. package/dist/fixtures/forge/metarepo/org-pack/profiles/forge/repos.manifest.yaml +44 -0
  222. package/dist/fixtures/forge/metarepo/org-pack/roles.yaml +14 -0
  223. package/dist/fixtures/forge/metarepo/org-pack/runtime.yaml +14 -0
  224. package/dist/fixtures/forge/metarepo/org-pack/sources.yaml +3 -0
  225. package/dist/fixtures/forge/repos/forge-events/topics/payments.initiated.yaml +4 -0
  226. package/dist/fixtures/forge/repos/forge-events/topics/transfers.completed.yaml +4 -0
  227. package/dist/fixtures/forge/repos/forge-gateway/proxies/ledger-v1/apiproxy/ledger-v1.xml +3 -0
  228. package/dist/fixtures/forge/repos/forge-gateway/proxies/ledger-v1/apiproxy/policies/SpikeArrest.xml +3 -0
  229. package/dist/fixtures/forge/repos/forge-gateway/proxies/ledger-v1/apiproxy/policies/VerifyOAuth.xml +4 -0
  230. package/dist/fixtures/forge/repos/forge-gateway/proxies/ledger-v1/apiproxy/proxies/default.xml +14 -0
  231. package/dist/fixtures/forge/repos/forge-gateway/proxies/ledger-v1/apiproxy/targets/ledger.xml +5 -0
  232. package/dist/fixtures/forge/repos/forge-infra/alerts/ledger-api.yaml +5 -0
  233. package/dist/fixtures/forge/repos/forge-infra/k8s/ledger-api.yaml +15 -0
  234. package/dist/fixtures/forge/repos/forge-infra/k8s/portal-bff.yaml +7 -0
  235. package/dist/fixtures/forge/repos/forge-infra/terraform/ledger-db.tf +9 -0
  236. package/dist/fixtures/forge/repos/forge-ledger/api/ledger-openapi.yaml +31 -0
  237. package/dist/fixtures/forge/repos/forge-ledger/forge.yaml +4 -0
  238. package/dist/fixtures/forge/repos/forge-ledger/src/main/java/forge/ledger/LedgerEndpoints.java +13 -0
  239. package/dist/fixtures/forge/repos/forge-ledger/src/main/java/forge/ledger/LedgerEvents.java +11 -0
  240. package/dist/fixtures/forge/repos/forge-ledger/src/main/java/forge/ledger/NorthwindClient.java +10 -0
  241. package/dist/fixtures/forge/repos/forge-ledger/src/main/resources/application.yml +3 -0
  242. package/dist/fixtures/forge/repos/forge-ledger/src/main/resources/db/migration/V1__create_account.sql +5 -0
  243. package/dist/fixtures/forge/repos/forge-ledger/src/main/resources/db/migration/V2__create_entry.sql +7 -0
  244. package/dist/fixtures/forge/repos/forge-portal-bff/pom.xml +1 -0
  245. package/dist/fixtures/forge/repos/forge-portal-bff/src/main/java/forge/portal/AuditPublisher.java +12 -0
  246. package/dist/fixtures/forge/repos/forge-portal-bff/src/main/java/forge/portal/BalanceController.java +16 -0
  247. package/dist/fixtures/forge/repos/forge-portal-bff/src/main/java/forge/portal/LedgerClient.java +13 -0
  248. package/dist/fixtures/forge/repos/forge-portal-bff/src/main/java/forge/portal/PaymentEvents.java +13 -0
  249. package/dist/fixtures/forge/repos/forge-portal-bff/src/main/resources/application.yml +8 -0
  250. package/dist/fixtures/forge/repos/forge-portal-ui/package.json +1 -0
  251. package/dist/fixtures/forge/repos/forge-portal-ui/src/api/balance.ts +5 -0
  252. package/dist/fixtures/forge/repos/forge-reports-job/src/main/java/forge/reports/DailyEntriesJob.java +19 -0
  253. package/dist/fixtures/forge/repos/forge-reports-job/src/main/resources/application.yml +3 -0
  254. package/dist/fixtures/forge-change/README.md +41 -0
  255. package/dist/fixtures/forge-change/expected/findings.yaml +301 -0
  256. package/dist/fixtures/forge-change/expected/stories.yaml +101 -0
  257. package/dist/fixtures/forge-change/judgments/personal-data/0b5f3dbf5257a22275d8c74b.yaml +18 -0
  258. package/dist/fixtures/forge-change/judgments/personal-data/2759a66770134c417440bf2d.yaml +18 -0
  259. package/dist/fixtures/forge-change/judgments/personal-data/31b1ea2f14d0737f1aca79fd.yaml +18 -0
  260. package/dist/fixtures/forge-change/judgments/personal-data/49afd70c08228e65ad6ca1ed.yaml +18 -0
  261. package/dist/fixtures/forge-change/judgments/personal-data/761cabcb8a39f5e5866d2dd6.yaml +18 -0
  262. package/dist/fixtures/forge-change/judgments/personal-data/adae902b90cc8ffa0c765145.yaml +18 -0
  263. package/dist/fixtures/forge-change/judgments/personal-data/ba11bb933105ec9493e065dd.yaml +18 -0
  264. package/dist/fixtures/forge-change/judgments/personal-data/bdbcd1cdac3021c68063c3e7.yaml +18 -0
  265. package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/brief.md +35 -0
  266. package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/change.yaml +120 -0
  267. package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/data.md +18 -0
  268. package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/design.md +29 -0
  269. package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/interfaces.md +17 -0
  270. package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/mappings.md +26 -0
  271. package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/proposal.md +35 -0
  272. package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/snow.md +12 -0
  273. package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/specs/transfer-limits/spec.md +19 -0
  274. package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/stories/s1-refuse-over-limit.md +17 -0
  275. package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/stories/s2-show-remaining.md +16 -0
  276. package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/stories/s3-audit-refusals.md +18 -0
  277. package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/stories/s4-velocity-check.md +16 -0
  278. package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/stories.md +8 -0
  279. package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/tasks.md +12 -0
  280. package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/ux.md +7 -0
  281. package/dist/fixtures/forge-change/org-pack/agents/code-and-test-critic.yaml +13 -0
  282. package/dist/fixtures/forge-change/org-pack/agents/complete-critic.yaml +12 -0
  283. package/dist/fixtures/forge-change/org-pack/agents/safe-critic.yaml +12 -0
  284. package/dist/fixtures/forge-change/org-pack/agents/ship-critic.yaml +11 -0
  285. package/dist/fixtures/forge-change/org-pack/agents/true-critic.yaml +11 -0
  286. package/dist/fixtures/forge-change/org-pack/checklists/review.yaml +54 -0
  287. package/dist/fixtures/forge-change/org-pack/gates.yaml +25 -0
  288. package/dist/fixtures/forge-change/org-pack/teams/team-ledger/checklists/ledger-team.yaml +227 -0
  289. package/dist/fixtures/forge-change/recordings/complete-critic/2ad84f84bf39c1d5412697e69fe23034d6983ec45a00314bf0975e627589a3c5.json +12 -0
  290. package/dist/fixtures/forge-change/recordings/complete-critic/417c98d8e54a4387d0fd93441c49f44c2868958739070d855c1dce0c41e24db3.json +12 -0
  291. package/dist/fixtures/forge-change/recordings/complete-critic/50203ee22e9cb3ef047295edb6538fe7d5695e1e4b139f3c929013dc6ce47021.json +12 -0
  292. package/dist/fixtures/forge-change/recordings/complete-critic/89f18d67f5d9c325bf35e2a9e020f9ddb6ee13b8523315037f0905cc57c040b1.json +12 -0
  293. package/dist/fixtures/forge-change/recordings/complete-critic/b4097867d26ae8eadc8b9efa8cdd86897013358035f0b40086c299a59c4ba121.json +12 -0
  294. package/dist/fixtures/forge-change/recordings/safe-critic/302d06f49664dd67ad2e21ab9cf74c1b0f7d3f750709c6ed8eff2b70983274e2.json +12 -0
  295. package/dist/fixtures/forge-change/recordings/safe-critic/32f1049c9a5ab4a759543290db4644ec6e221cc45fdfdcf06193837c6a8ce0b9.json +12 -0
  296. package/dist/fixtures/forge-change/recordings/safe-critic/4e4a84bfc04b9f26ca4250319a879901ff7a1c081c71e46a117675fee05026b0.json +12 -0
  297. package/dist/fixtures/forge-change/recordings/safe-critic/604af0fcdd6df6b76208fa88305fdc15c37606c2a4d1ae816477e46ac8c2dd04.json +12 -0
  298. package/dist/fixtures/forge-change/recordings/safe-critic/f0bf50af11f14c50d07904f0dffe1c8c20fb0cd89770645a8824c1d30a443955.json +12 -0
  299. package/dist/fixtures/forge-change/recordings/ship-critic/350954b58833b2c04880c67db45a1b328b7fd541d9f0d943b63905b8875488a6.json +12 -0
  300. package/dist/fixtures/forge-change/recordings/ship-critic/4af95c6c96a206777cec9de1f9c2d8c55a36ddc9b8db2f81d6eb83217b835efa.json +12 -0
  301. package/dist/fixtures/forge-change/recordings/ship-critic/76c34522a49cf7587a4e5689a5030d384603fa780b8aba97d27815cbc829683e.json +12 -0
  302. package/dist/fixtures/forge-change/recordings/ship-critic/a3b2cd1ace48587e5994333db03b34c3a0f9dec4f1932f1730ddfb687f6918c8.json +12 -0
  303. package/dist/fixtures/forge-change/recordings/ship-critic/de288a4fa64d0fc20890f9a787080ce6eac5203b7b9b72d884df11e8cf111835.json +12 -0
  304. package/dist/fixtures/forge-change/recordings/story-writer/1ddb00eac2aaf91a5ec5d9dfd220116be9f75aec6546a4a3a3b050ed89af2864.json +12 -0
  305. package/dist/packages/assistant-kit/frameworks-kit/README.md +86 -0
  306. package/dist/packages/assistant-kit/frameworks-kit/checklist.md +11 -0
  307. package/dist/packages/assistant-kit/frameworks-kit/examples/tide-lantern.yaml +56 -0
  308. package/dist/packages/assistant-kit/frameworks-kit/examples/tide-platform.yaml +43 -0
  309. package/dist/packages/assistant-kit/frameworks-kit/prompts/write-framework-model.md +12 -0
  310. package/dist/packages/assistant-kit/kit/README.md +98 -0
  311. package/dist/packages/assistant-kit/kit/c2-reference.md +334 -0
  312. package/dist/packages/assistant-kit/kit/checklist.md +39 -0
  313. package/dist/packages/assistant-kit/kit/examples/house-http-client.yaml +102 -0
  314. package/dist/packages/assistant-kit/kit/examples/tide-apigee.yaml +56 -0
  315. package/dist/packages/assistant-kit/kit/examples/tide-apim.yaml +32 -0
  316. package/dist/packages/assistant-kit/kit/examples/tide-kong.yaml +44 -0
  317. package/dist/packages/assistant-kit/kit/prompts/write-dialect.md +34 -0
  318. package/dist/packages/assistant-kit/kit/worked-example.md +198 -0
  319. package/dist/packages/conformance/sample/README.md +4 -0
  320. package/dist/packages/conformance/sample/inputs/notes.md +3 -0
  321. package/dist/packages/conformance/sample/inputs/systems.csv +3 -0
  322. package/dist/packages/conformance/sample/repo/api/greeter.proto +6 -0
  323. package/dist/packages/conformance/sample/repo/api/openapi.yaml +10 -0
  324. package/dist/packages/conformance/sample/repo/api/schema.graphql +3 -0
  325. package/dist/packages/conformance/sample/repo/db/V1__create_greeting.sql +4 -0
  326. package/dist/packages/conformance/sample/repo/package.json +7 -0
  327. package/dist/packages/conformance/sample/repo/src/main/java/sample/HelloController.java +10 -0
  328. package/dist/packages/conformance/sample/repo/web/app.ts +4 -0
  329. package/dist/packages/evals/datasets/critic-lenses.yaml +62 -0
  330. package/dist/packages/evals/datasets/dialect-writer.yaml +14 -0
  331. package/dist/packages/evals/datasets/feature-namer.yaml +34 -0
  332. package/dist/packages/evals/datasets/glossary-definer.yaml +25 -0
  333. package/dist/packages/evals/datasets/story-writer.yaml +13 -0
  334. package/dist/packages/evals/datasets/template-writer.yaml +16 -0
  335. package/dist/packages/evals/datasets/test-writer.yaml +18 -0
  336. package/dist/packages/executors/reference/reference-executor.mjs +233 -0
  337. package/dist/packages/extractors/dialects/argocd.yaml +45 -0
  338. package/dist/packages/extractors/dialects/fixtures/jaxrs/accounts-service/src/main/java/forge/accounts/AccountResource.java +47 -0
  339. package/dist/packages/extractors/dialects/fixtures/jaxrs/accounts-service/src/main/java/forge/accounts/AuditClient.java +12 -0
  340. package/dist/packages/extractors/dialects/fixtures/jaxrs/accounts-service/src/main/java/forge/accounts/LedgerClient.java +17 -0
  341. package/dist/packages/extractors/dialects/fixtures/micronaut/statements-service/src/main/java/forge/statements/LedgerClient.java +14 -0
  342. package/dist/packages/extractors/dialects/fixtures/micronaut/statements-service/src/main/java/forge/statements/RatesClient.java +11 -0
  343. package/dist/packages/extractors/dialects/fixtures/micronaut/statements-service/src/main/java/forge/statements/StatementController.java +36 -0
  344. package/dist/packages/extractors/dialects/fixtures/micronaut/statements-service/src/main/resources/application.yml +7 -0
  345. package/dist/packages/extractors/dialects/fixtures/quarkus-reactive-messaging/fraud-service/src/main/java/forge/fraud/FraudScorer.java +27 -0
  346. package/dist/packages/extractors/dialects/fixtures/quarkus-reactive-messaging/fraud-service/src/main/resources/application.properties +4 -0
  347. package/dist/packages/extractors/dialects/fixtures/terraform-aws/forge-aws-infra/envs/prod/api.tf +38 -0
  348. package/dist/packages/extractors/dialects/fixtures/terraform-aws/forge-aws-infra/envs/prod/main.tf +95 -0
  349. package/dist/packages/extractors/dialects/fixtures/terraform-aws/forge-aws-infra/envs/prod/terraform.tfvars +1 -0
  350. package/dist/packages/extractors/dialects/fixtures/terraform-aws/forge-aws-infra/envs/prod/variables.tf +4 -0
  351. package/dist/packages/extractors/dialects/fixtures/terraform-azure/forge-azure-infra/main.tf +102 -0
  352. package/dist/packages/extractors/dialects/fixtures/terraform-gcp/forge-gcp-infra/main.tf +51 -0
  353. package/dist/packages/extractors/dialects/harness.yaml +101 -0
  354. package/dist/packages/extractors/dialects/jaxrs.yaml +155 -0
  355. package/dist/packages/extractors/dialects/micronaut.yaml +207 -0
  356. package/dist/packages/extractors/dialects/quarkus-reactive-messaging.yaml +158 -0
  357. package/dist/packages/extractors/dialects/tekton.yaml +71 -0
  358. package/dist/packages/extractors/dialects/terraform-aws.yaml +267 -0
  359. package/dist/packages/extractors/dialects/terraform-azure.yaml +212 -0
  360. package/dist/packages/extractors/dialects/terraform-gcp.yaml +109 -0
  361. package/dist/packages/extractors/grammars/README.md +11 -0
  362. package/dist/packages/extractors/grammars/tree-sitter-groovy.LICENSE +21 -0
  363. package/dist/packages/extractors/grammars/tree-sitter-groovy.wasm +0 -0
  364. package/dist/packages/extractors/grammars/vendored.json +11 -0
  365. package/dist/packages/learn/lessons/architect-diagrams-and-code.yaml +69 -0
  366. package/dist/packages/learn/lessons/business-analyst-story-bar.yaml +94 -0
  367. package/dist/packages/learn/lessons/delivery-lead-release-readiness.yaml +44 -0
  368. package/dist/packages/learn/lessons/designer-features-in-user-words.yaml +57 -0
  369. package/dist/packages/learn/lessons/developer-find-your-way.yaml +60 -0
  370. package/dist/packages/learn/lessons/everyone-first-hour.yaml +74 -0
  371. package/dist/packages/learn/lessons/platform-lead-coverage-and-defences.yaml +58 -0
  372. package/dist/packages/learn/lessons/product-owner-first-change.yaml +167 -0
  373. package/dist/packages/learn/lessons/qa-tests-and-trace.yaml +53 -0
  374. package/dist/packages/learn/lessons/team-lead-initiative.yaml +146 -0
  375. package/dist/packages/naysayer/constitution/constitution.yaml +286 -0
  376. package/dist/packages/naysayer/starter/review.yaml +256 -0
  377. package/dist/packages/sdk/npm/index.js +8892 -0
  378. package/dist/packages/speckit/rules/drift.yaml +78 -0
  379. package/dist/packages/taskrun/rules/conform.yaml +38 -0
  380. package/dist/packages/testgen/rules/trace.yaml +49 -0
  381. package/dist/packages/ui/dist/assets/elk-api-tma0MCuh.js +2 -0
  382. package/dist/packages/ui/dist/assets/elk-worker.min--dAJroGl.js +6401 -0
  383. package/dist/packages/ui/dist/assets/elk-worker.min-DdYmS5kP.js +2 -0
  384. package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-400-normal-BTotfTJu.woff +0 -0
  385. package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-400-normal-DZqxrq2p.woff2 +0 -0
  386. package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-500-normal-ByOcLdNv.woff +0 -0
  387. package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-500-normal-CocWQlwt.woff2 +0 -0
  388. package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-600-normal-71GNu3SW.woff2 +0 -0
  389. package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-600-normal-BGq0mW3O.woff +0 -0
  390. package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-ext-400-normal-Dsrv2Tcn.woff +0 -0
  391. package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-ext-400-normal-g30qAdWV.woff2 +0 -0
  392. package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-ext-500-normal-Cs5J6C77.woff2 +0 -0
  393. package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-ext-500-normal-DB5PtV2g.woff +0 -0
  394. package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-ext-600-normal-Bz0x94Yp.woff +0 -0
  395. package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-ext-600-normal-DUMzJB7m.woff2 +0 -0
  396. package/dist/packages/ui/dist/assets/ibm-plex-sans-greek-400-normal-D9ESIMu3.woff +0 -0
  397. package/dist/packages/ui/dist/assets/ibm-plex-sans-greek-400-normal-_efipK4i.woff2 +0 -0
  398. package/dist/packages/ui/dist/assets/ibm-plex-sans-greek-500-normal-CuWXN6rf.woff +0 -0
  399. package/dist/packages/ui/dist/assets/ibm-plex-sans-greek-500-normal-JMMifIXV.woff2 +0 -0
  400. package/dist/packages/ui/dist/assets/ibm-plex-sans-greek-600-normal-D-CqTdkO.woff +0 -0
  401. package/dist/packages/ui/dist/assets/ibm-plex-sans-greek-600-normal-DzTrcv_p.woff2 +0 -0
  402. package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-400-normal-CDDApCn2.woff2 +0 -0
  403. package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-400-normal-CYLoc0-x.woff +0 -0
  404. package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-500-normal-6ng42L7E.woff2 +0 -0
  405. package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-500-normal-BgVn5rGT.woff +0 -0
  406. package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-600-normal-Cu4Hd6ag.woff +0 -0
  407. package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-600-normal-CuJfVYMP.woff2 +0 -0
  408. package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-ext-400-normal-C5H60-Va.woff2 +0 -0
  409. package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-ext-400-normal-RBey6euL.woff +0 -0
  410. package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-ext-500-normal-D0aIdm-b.woff +0 -0
  411. package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-ext-500-normal-DakdToA3.woff2 +0 -0
  412. package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-ext-600-normal-DIrixKbi.woff +0 -0
  413. package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-ext-600-normal-DOrvGEcy.woff2 +0 -0
  414. package/dist/packages/ui/dist/assets/ibm-plex-sans-vietnamese-400-normal-DG4YqDda.woff2 +0 -0
  415. package/dist/packages/ui/dist/assets/ibm-plex-sans-vietnamese-400-normal-fK1oJ5dG.woff +0 -0
  416. package/dist/packages/ui/dist/assets/ibm-plex-sans-vietnamese-500-normal-BEb3_waV.woff +0 -0
  417. package/dist/packages/ui/dist/assets/ibm-plex-sans-vietnamese-500-normal-e4dixQRQ.woff2 +0 -0
  418. package/dist/packages/ui/dist/assets/ibm-plex-sans-vietnamese-600-normal-DgdngZtN.woff +0 -0
  419. package/dist/packages/ui/dist/assets/ibm-plex-sans-vietnamese-600-normal-DpPYBSTl.woff2 +0 -0
  420. package/dist/packages/ui/dist/assets/index-B54fm9FQ.js +29 -0
  421. package/dist/packages/ui/dist/assets/index-DD_hufQz.css +1 -0
  422. package/dist/packages/ui/dist/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
  423. package/dist/packages/ui/dist/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
  424. package/dist/packages/ui/dist/assets/jetbrains-mono-cyrillic-500-normal-DJqRU3vO.woff +0 -0
  425. package/dist/packages/ui/dist/assets/jetbrains-mono-cyrillic-500-normal-DmUKJPL_.woff2 +0 -0
  426. package/dist/packages/ui/dist/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
  427. package/dist/packages/ui/dist/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
  428. package/dist/packages/ui/dist/assets/jetbrains-mono-greek-500-normal-D7SFKleX.woff +0 -0
  429. package/dist/packages/ui/dist/assets/jetbrains-mono-greek-500-normal-JpySY46c.woff2 +0 -0
  430. package/dist/packages/ui/dist/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
  431. package/dist/packages/ui/dist/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  432. package/dist/packages/ui/dist/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
  433. package/dist/packages/ui/dist/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
  434. package/dist/packages/ui/dist/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
  435. package/dist/packages/ui/dist/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
  436. package/dist/packages/ui/dist/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
  437. package/dist/packages/ui/dist/assets/jetbrains-mono-latin-ext-500-normal-ckzbgY84.woff +0 -0
  438. package/dist/packages/ui/dist/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
  439. package/dist/packages/ui/dist/assets/jetbrains-mono-vietnamese-500-normal-DNRqzVM1.woff +0 -0
  440. package/dist/packages/ui/dist/assets/rajdhani-devanagari-600-normal-BtY48IV_.woff +0 -0
  441. package/dist/packages/ui/dist/assets/rajdhani-devanagari-600-normal-DhS7ScYx.woff2 +0 -0
  442. package/dist/packages/ui/dist/assets/rajdhani-devanagari-700-normal-BQQOj9BB.woff2 +0 -0
  443. package/dist/packages/ui/dist/assets/rajdhani-devanagari-700-normal-DBRwWuxA.woff +0 -0
  444. package/dist/packages/ui/dist/assets/rajdhani-latin-600-normal-CXCVEoA9.woff2 +0 -0
  445. package/dist/packages/ui/dist/assets/rajdhani-latin-600-normal-Dx02qI2_.woff +0 -0
  446. package/dist/packages/ui/dist/assets/rajdhani-latin-700-normal-BPDUZo87.woff2 +0 -0
  447. package/dist/packages/ui/dist/assets/rajdhani-latin-700-normal-e0Uj8ZlN.woff +0 -0
  448. package/dist/packages/ui/dist/assets/rajdhani-latin-ext-600-normal-BleIgkPp.woff +0 -0
  449. package/dist/packages/ui/dist/assets/rajdhani-latin-ext-600-normal-C9ZjJQAt.woff2 +0 -0
  450. package/dist/packages/ui/dist/assets/rajdhani-latin-ext-700-normal-BPaQ7tlD.woff +0 -0
  451. package/dist/packages/ui/dist/assets/rajdhani-latin-ext-700-normal-S6aYESQK.woff2 +0 -0
  452. package/dist/packages/ui/dist/favicon.svg +1 -0
  453. package/dist/packages/ui/dist/index.html +15 -0
  454. package/dist/third-party.json +575 -0
  455. package/dist/vendor/@fission-ai/openspec/bin/openspec.js +85986 -0
  456. package/dist/vendor/@fission-ai/openspec/package.json +82 -0
  457. package/dist/vendor/@fission-ai/openspec/schemas/spec-driven/schema.yaml +248 -0
  458. package/dist/vendor/@fission-ai/openspec/schemas/spec-driven/templates/design.md +21 -0
  459. package/dist/vendor/@fission-ai/openspec/schemas/spec-driven/templates/proposal.md +34 -0
  460. package/dist/vendor/@fission-ai/openspec/schemas/spec-driven/templates/spec.md +13 -0
  461. package/dist/vendor/@fission-ai/openspec/schemas/spec-driven/templates/tasks.md +11 -0
  462. package/dist/vendor/tree-sitter-wasms/out/tree-sitter-c_sharp.wasm +0 -0
  463. package/dist/vendor/tree-sitter-wasms/out/tree-sitter-go.wasm +0 -0
  464. package/dist/vendor/tree-sitter-wasms/out/tree-sitter-java.wasm +0 -0
  465. package/dist/vendor/tree-sitter-wasms/out/tree-sitter-javascript.wasm +0 -0
  466. package/dist/vendor/tree-sitter-wasms/out/tree-sitter-kotlin.wasm +0 -0
  467. package/dist/vendor/tree-sitter-wasms/out/tree-sitter-php.wasm +0 -0
  468. package/dist/vendor/tree-sitter-wasms/out/tree-sitter-python.wasm +0 -0
  469. package/dist/vendor/tree-sitter-wasms/out/tree-sitter-ruby.wasm +0 -0
  470. package/dist/vendor/tree-sitter-wasms/out/tree-sitter-rust.wasm +0 -0
  471. package/dist/vendor/tree-sitter-wasms/out/tree-sitter-scala.wasm +0 -0
  472. package/dist/vendor/tree-sitter-wasms/out/tree-sitter-tsx.wasm +0 -0
  473. package/dist/vendor/tree-sitter-wasms/out/tree-sitter-typescript.wasm +0 -0
  474. package/dist/vendor/web-tree-sitter/tree-sitter.wasm +0 -0
  475. package/package.json +36 -3
@@ -0,0 +1,2356 @@
1
+ import { createRequire as __atticusCreateRequire } from "node:module";
2
+ import { fileURLToPath as __atticusFileURLToPath } from "node:url";
3
+ var require = __atticusCreateRequire(import.meta.url);
4
+ var __atticusUrl = (p) => new URL("./" + p, import.meta.url).href;
5
+ var __atticusPath = (p) => __atticusFileURLToPath(__atticusUrl(p));
6
+ import {
7
+ aliasArgv
8
+ } from "./chunk-ZDPAS56H.js";
9
+ import {
10
+ VERSION
11
+ } from "./chunk-RZPYKDWS.js";
12
+ import {
13
+ SCHEMA_VERSION,
14
+ createLog
15
+ } from "./chunk-D3PO4DOZ.js";
16
+ import "./chunk-TV45EUGM.js";
17
+
18
+ // packages/cli/dist/main.js
19
+ import { parseArgs } from "node:util";
20
+ import { basename, join, resolve } from "node:path";
21
+ import { existsSync } from "node:fs";
22
+ var loadAi = () => import("./chunk-SP2I63OO.js");
23
+ var runtimeForCli = async (...a) => {
24
+ await setUpAi();
25
+ return (await loadAi()).runtimeForCli(...a);
26
+ };
27
+ var gitUser = (...a) => import("./chunk-OLQJTJJU.js").then((m) => m.gitUser(...a));
28
+ var loadAiSetUp = () => Promise.all([
29
+ loadAi(),
30
+ import("./chunk-3ALD2W2A.js"),
31
+ import("./chunk-6TACQN3N.js"),
32
+ import("./chunk-6IU67AEK.js"),
33
+ import("./chunk-Z6LF7HQN.js"),
34
+ import("./chunk-3C7EYRFZ.js")
35
+ ]);
36
+ async function setUpAi() {
37
+ const [ai, providers, plugins, naysayer, codeTools, draftCheck] = await loadAiSetUp();
38
+ providers.registerBuiltInModelProviders();
39
+ plugins.registerModelProviderPlugins();
40
+ ai.registerToolSource((at) => (req) => draftCheck.bothTools(codeTools.metarepoToolBox(at), draftCheck.draftCheckTool(at, req)));
41
+ naysayer.registerCodeSearch(codeTools.criticCodeSearch);
42
+ }
43
+ var NO_AI = /* @__PURE__ */ new Set([
44
+ "next",
45
+ "runs",
46
+ "history",
47
+ "waiting",
48
+ "mcp",
49
+ "doctor",
50
+ "setup",
51
+ "verify",
52
+ "baseline",
53
+ "upgrade",
54
+ "support",
55
+ "change list",
56
+ "change status",
57
+ // Reading the questions on file and printing one: files only, no model (question-commands.ts).
58
+ "questions list",
59
+ "questions show"
60
+ ]);
61
+ var runsNoAi = (group, command) => NO_AI.has(group) || NO_AI.has(`${group} ${command ?? ""}`);
62
+ var loadCommands = () => import("./chunk-Q5AMFEWD.js");
63
+ var catalogValidate = (...a) => loadCommands().then((m) => m.catalogValidate(...a));
64
+ var orgPackValidate = (...a) => loadCommands().then((m) => m.orgPackValidate(...a));
65
+ var schemaExport = (...a) => loadCommands().then((m) => m.schemaExport(...a));
66
+ var loadWorkspaceCommands = () => import("./chunk-JZU3H6UQ.js");
67
+ var handoffDone = (...a) => loadWorkspaceCommands().then((m) => m.handoffDone(...a));
68
+ var openspecCheck = (...a) => loadWorkspaceCommands().then((m) => m.openspecCheck(...a));
69
+ var openspecSetup = (...a) => loadWorkspaceCommands().then((m) => m.openspecSetup(...a));
70
+ var workspaceOpen = (...a) => loadWorkspaceCommands().then((m) => m.workspaceOpen(...a));
71
+ var workspacePrune = (...a) => loadWorkspaceCommands().then((m) => m.workspacePrune(...a));
72
+ var workspaceSync = (...a) => loadWorkspaceCommands().then((m) => m.workspaceSync(...a));
73
+ var loadScanCommands = () => import("./chunk-ICY36XCH.js");
74
+ var catalogDiff = (...a) => loadScanCommands().then((m) => m.catalogDiff(...a));
75
+ var scanCommand = (...a) => loadScanCommands().then((m) => m.scanCommand(...a));
76
+ var loadIndexCommands = () => import("./chunk-C6EKFH7J.js");
77
+ var askCommand = (...a) => loadIndexCommands().then((m) => m.askCommand(...a));
78
+ var impactCommand = (...a) => loadIndexCommands().then((m) => m.impactCommand(...a));
79
+ var indexRebuild = (...a) => loadIndexCommands().then((m) => m.indexRebuild(...a));
80
+ var queryCommand = (...a) => loadIndexCommands().then((m) => m.queryCommand(...a));
81
+ var searchCommand = (...a) => loadIndexCommands().then((m) => m.searchCommand(...a));
82
+ var loadSiteCommands = () => import("./chunk-VYDBJ73M.js");
83
+ var guideCommand = (...a) => loadSiteCommands().then((m) => m.guideCommand(...a));
84
+ var siteBuildCommand = (...a) => loadSiteCommands().then((m) => m.siteBuildCommand(...a));
85
+ var loadBaselineCommands = () => import("./chunk-GBRFVT63.js");
86
+ var baselineCommand = (...a) => loadBaselineCommands().then((m) => m.baselineCommand(...a));
87
+ var setupCommand = (...a) => loadBaselineCommands().then((m) => m.setupCommand(...a));
88
+ var loadDigestCommands = () => import("./chunk-RTEYOSJY.js");
89
+ var digestCommand = (...a) => loadDigestCommands().then((m) => m.digestCommand(...a));
90
+ var loadDoctor = () => import("./chunk-5KLGBXG5.js");
91
+ var doctorCommand = (...a) => loadDoctor().then((m) => m.doctorCommand(...a));
92
+ var loadSupport = () => import("./chunk-SJRGMG6A.js");
93
+ var supportBundleCommand = (...a) => loadSupport().then((m) => m.supportBundleCommand(...a));
94
+ var loadUpgrade = () => import("./chunk-6D2CQ5II.js");
95
+ var upgradeCommand = (...a) => loadUpgrade().then((m) => m.upgradeCommand(...a));
96
+ var loadReconcileCommands = () => import("./chunk-S3QNRWYR.js");
97
+ var aliasCommand = (...a) => loadReconcileCommands().then((m) => m.aliasCommand(...a));
98
+ var reconcileCommand = (...a) => loadReconcileCommands().then((m) => m.reconcileCommand(...a));
99
+ var loadKnowledgeCommands = () => import("./chunk-5WG5YP4T.js");
100
+ var coverageCommand = (...a) => loadKnowledgeCommands().then((m) => m.coverageCommand(...a));
101
+ var patternsScan = (...a) => loadKnowledgeCommands().then((m) => m.patternsScan(...a));
102
+ var questionsCommand = (...a) => loadKnowledgeCommands().then((m) => m.questionsCommand(...a));
103
+ var questionsFiles = (...a) => import("./chunk-2BF2EYJV.js").then((m) => m.questionsFiles(...a));
104
+ var sourcesAdd = (...a) => loadKnowledgeCommands().then((m) => m.sourcesAdd(...a));
105
+ var sourcesSync = (...a) => loadKnowledgeCommands().then((m) => m.sourcesSync(...a));
106
+ var loadDiagramCommands = () => import("./chunk-UGLN7QHV.js");
107
+ var diagramLibrary = (...a) => loadDiagramCommands().then((m) => m.diagramLibrary(...a));
108
+ var diagramRender = (...a) => loadDiagramCommands().then((m) => m.diagramRender(...a));
109
+ var loadStubCommands = () => import("./chunk-DKJA76CJ.js");
110
+ var stubCheck = (...a) => loadStubCommands().then((m) => m.stubCheck(...a));
111
+ var stubServe = (...a) => loadStubCommands().then((m) => m.stubServe(...a));
112
+ var loadIntakeCommands = () => import("./chunk-W3BQAZ3Q.js");
113
+ var intakeAdd = (...a) => loadIntakeCommands().then((m) => m.intakeAdd(...a));
114
+ var intakeList = (...a) => loadIntakeCommands().then((m) => m.intakeList(...a));
115
+ var triageDecide = (...a) => loadIntakeCommands().then((m) => m.triageDecide(...a));
116
+ var triageList = (...a) => loadIntakeCommands().then((m) => m.triageList(...a));
117
+ var loadRunCommands = () => import("./chunk-4BKGMUIK.js");
118
+ var assistantFiles = (...a) => loadRunCommands().then((m) => m.assistantFiles(...a));
119
+ var driftCommand = (...a) => loadRunCommands().then((m) => m.driftCommand(...a));
120
+ var specHandDown = (...a) => loadRunCommands().then((m) => m.specHandDown(...a));
121
+ var specHandUp = (...a) => loadRunCommands().then((m) => m.specHandUp(...a));
122
+ var taskHandoff = (...a) => loadRunCommands().then((m) => m.taskHandoff(...a));
123
+ var taskRun = (...a) => loadRunCommands().then((m) => m.taskRun(...a));
124
+ var loadFeatureCommands = () => import("./chunk-6J5OKA4Y.js");
125
+ var featureSuggestNames = (...a) => loadFeatureCommands().then((m) => m.featureSuggestNames(...a));
126
+ var loadDomainCommands = () => import("./chunk-7FBGJFEE.js");
127
+ var domainProfileCommand = (...a) => loadDomainCommands().then((m) => m.domainProfileCommand(...a));
128
+ var loadPlanCommands = () => import("./chunk-66YVAGGM.js");
129
+ var adoSync = (...a) => loadPlanCommands().then((m) => m.adoSync(...a));
130
+ var changeDraft = (...a) => loadPlanCommands().then((m) => m.changeDraft(...a));
131
+ var planStories = (...a) => loadPlanCommands().then((m) => m.planStories(...a));
132
+ var snowDraft = (...a) => loadPlanCommands().then((m) => m.snowDraft(...a));
133
+ var snowSubmit = (...a) => loadPlanCommands().then((m) => m.snowSubmit(...a));
134
+ var storyBarCommand = (...a) => loadPlanCommands().then((m) => m.storyBarCommand(...a));
135
+ var templatesDraft = (...a) => loadPlanCommands().then((m) => m.templatesDraft(...a));
136
+ var loadTodoCommands = () => import("./chunk-4RS5KZQD.js");
137
+ var executorsCheck = (...a) => loadTodoCommands().then((m) => m.executorsCheck(...a));
138
+ var todoDone = (...a) => loadTodoCommands().then((m) => m.todoDone(...a));
139
+ var todoList = (...a) => loadTodoCommands().then((m) => m.todoList(...a));
140
+ var todoRun = (...a) => loadTodoCommands().then((m) => m.todoRun(...a));
141
+ var todoShow = (...a) => loadTodoCommands().then((m) => m.todoShow(...a));
142
+ var loadSetupCommands = () => import("./chunk-QZSX3F7C.js");
143
+ var absorbCommand = (...a) => loadSetupCommands().then((m) => m.absorbCommand(...a));
144
+ var absorbAcceptCommand = (...a) => loadSetupCommands().then((m) => m.absorbAcceptCommand(...a));
145
+ var absorbRefreshCommand = (...a) => loadSetupCommands().then((m) => m.absorbRefreshCommand(...a));
146
+ var sourcesRefreshCommand = (...a) => loadSetupCommands().then((m) => m.sourcesRefreshCommand(...a));
147
+ var adoptCommand = (...a) => loadSetupCommands().then((m) => m.adoptCommand(...a));
148
+ var initCommand = (...a) => loadSetupCommands().then((m) => m.initCommand(...a));
149
+ var reposDiscoverCommand = (...a) => loadSetupCommands().then((m) => m.reposDiscoverCommand(...a));
150
+ var unadoptCommand = (...a) => loadSetupCommands().then((m) => m.unadoptCommand(...a));
151
+ var zeroInstallCommand = (...a) => loadSetupCommands().then((m) => m.zeroInstallCommand(...a));
152
+ var loadQualityCommands = () => import("./chunk-6QSERWXH.js");
153
+ var ciArchiveGate = (...a) => loadQualityCommands().then((m) => m.ciArchiveGate(...a));
154
+ var ciDrift = (...a) => loadQualityCommands().then((m) => m.ciDrift(...a));
155
+ var ciSnippet = (...a) => loadQualityCommands().then((m) => m.ciSnippet(...a));
156
+ var glossaryAlias = (...a) => loadQualityCommands().then((m) => m.glossaryAlias(...a));
157
+ var glossaryDefine = (...a) => loadQualityCommands().then((m) => m.glossaryDefine(...a));
158
+ var glossaryLink = (...a) => loadQualityCommands().then((m) => m.glossaryLink(...a));
159
+ var glossaryList = (...a) => loadQualityCommands().then((m) => m.glossaryList(...a));
160
+ var glossaryScan = (...a) => loadQualityCommands().then((m) => m.glossaryScan(...a));
161
+ var testsGenerate = (...a) => loadQualityCommands().then((m) => m.testsGenerate(...a));
162
+ var traceCommand = (...a) => loadQualityCommands().then((m) => m.traceCommand(...a));
163
+ var loadInitiativeCommands = () => import("./chunk-I4JRCD6M.js");
164
+ var initiativeCommitment = (...a) => loadInitiativeCommands().then((m) => m.initiativeCommitment(...a));
165
+ var initiativeNew = (...a) => loadInitiativeCommands().then((m) => m.initiativeNew(...a));
166
+ var initiativePlan = (...a) => loadInitiativeCommands().then((m) => m.initiativePlan(...a));
167
+ var initiativeStatus = (...a) => loadInitiativeCommands().then((m) => m.initiativeStatus(...a));
168
+ var requestFromTeam = (...a) => loadInitiativeCommands().then((m) => m.requestFromTeam(...a));
169
+ var loadLearnCommands = () => import("./chunk-VN3DP4LQ.js");
170
+ var explainCommand = (...a) => loadLearnCommands().then((m) => m.explainCommand(...a));
171
+ var learnCheck = (...a) => loadLearnCommands().then((m) => m.learnCheck(...a));
172
+ var learnList = (...a) => loadLearnCommands().then((m) => m.learnList(...a));
173
+ var learnStart = (...a) => loadLearnCommands().then((m) => m.learnStart(...a));
174
+ var sandboxCreate = (...a) => loadLearnCommands().then((m) => m.sandboxCreate(...a));
175
+ var loadEvalCommands = () => import("./chunk-6BNC6EQ4.js");
176
+ var loadBenchCommands = () => import("./chunk-XPTOBS2D.js");
177
+ var benchFetch = (...a) => loadBenchCommands().then((m) => m.benchFetch(...a));
178
+ var benchRun = (...a) => loadBenchCommands().then((m) => m.benchRun(...a));
179
+ var benchSurvey = (...a) => loadBenchCommands().then((m) => m.benchSurvey(...a));
180
+ var benchVerify = (...a) => loadBenchCommands().then((m) => m.benchVerify(...a));
181
+ var loadScanVerifyCommands = () => import("./chunk-YYQN46FY.js");
182
+ var stageCli = (...a) => import("./chunk-3USYZGRF.js").then((m) => m.stageCli(...a));
183
+ var knowledgeCli = (...a) => import("./chunk-5GGOLAKC.js").then((m) => m.knowledgeCli(...a));
184
+ var defencesScan = (...a) => loadEvalCommands().then((m) => m.defencesScan(...a));
185
+ var evalReport = (...a) => loadEvalCommands().then((m) => m.evalReport(...a));
186
+ var evalRun = (...a) => loadEvalCommands().then((m) => m.evalRun(...a));
187
+ var loadU1Commands = () => import("./chunk-AVJDSJ2F.js");
188
+ var conformanceCommand = (...a) => loadU1Commands().then((m) => m.conformanceCommand(...a));
189
+ var loadReleaseCommands = () => import("./chunk-E36QOJMD.js");
190
+ var outcomeList = (...a) => loadReleaseCommands().then((m) => m.outcomeList(...a));
191
+ var outcomeRecord = (...a) => loadReleaseCommands().then((m) => m.outcomeRecord(...a));
192
+ var releaseEvidenceCommand = (...a) => loadReleaseCommands().then((m) => m.releaseEvidenceCommand(...a));
193
+ var releaseForecastCommand = (...a) => loadReleaseCommands().then((m) => m.releaseForecastCommand(...a));
194
+ var releaseNotesCommand = (...a) => loadReleaseCommands().then((m) => m.releaseNotesCommand(...a));
195
+ var releasePlanCommand = (...a) => loadReleaseCommands().then((m) => m.releasePlanCommand(...a));
196
+ var releaseSecurityCommand = (...a) => loadReleaseCommands().then((m) => m.releaseSecurityCommand(...a));
197
+ var loadUiCommands = () => import("./chunk-JIITQXFB.js");
198
+ var uiCommand = (...a) => loadUiCommands().then((m) => m.uiCommand(...a));
199
+ var loadCriticCommands = () => import("./chunk-GT4I4ZWM.js");
200
+ var critic = (...a) => loadCriticCommands().then((m) => m.critic(...a));
201
+ var criticStats = (...a) => loadCriticCommands().then((m) => m.criticStats(...a));
202
+ var findingAction = (...a) => loadCriticCommands().then((m) => m.findingAction(...a));
203
+ var findings = (...a) => loadCriticCommands().then((m) => m.findings(...a));
204
+ var catalogMigrate = (...a) => loadFeatureCommands().then((m) => m.catalogMigrate(...a));
205
+ var featureLink = (...a) => loadFeatureCommands().then((m) => m.featureLink(...a));
206
+ var featureList = (...a) => loadFeatureCommands().then((m) => m.featureList(...a));
207
+ var featureMerge = (...a) => loadFeatureCommands().then((m) => m.featureMerge(...a));
208
+ var featureName = (...a) => loadFeatureCommands().then((m) => m.featureName(...a));
209
+ var featureShow = (...a) => loadFeatureCommands().then((m) => m.featureShow(...a));
210
+ var featureSpec = (...a) => loadFeatureCommands().then((m) => m.featureSpec(...a));
211
+ var featureSplit = (...a) => loadFeatureCommands().then((m) => m.featureSplit(...a));
212
+ var featureSuggestLinks = (...a) => loadFeatureCommands().then((m) => m.featureSuggestLinks(...a));
213
+ var featureTag = (...a) => loadFeatureCommands().then((m) => m.featureTag(...a));
214
+ var loadChangeCommands = () => import("./chunk-WVPJSRRJ.js");
215
+ var changeArchive = (...a) => loadChangeCommands().then((m) => m.changeArchive(...a));
216
+ var changeConflicts = (...a) => loadChangeCommands().then((m) => m.changeConflicts(...a));
217
+ var changeHandoff = (...a) => loadChangeCommands().then((m) => m.changeHandoff(...a));
218
+ var changeList = (...a) => loadChangeCommands().then((m) => m.changeList(...a));
219
+ var changeNew = (...a) => loadChangeCommands().then((m) => m.changeNew(...a));
220
+ var changeReturn = (...a) => loadChangeCommands().then((m) => m.changeReturn(...a));
221
+ var changeStatus = (...a) => loadChangeCommands().then((m) => m.changeStatus(...a));
222
+ var changeSync = (...a) => loadChangeCommands().then((m) => m.changeSync(...a));
223
+ var changeLearn = (...a) => loadChangeCommands().then((m) => m.changeLearn(...a));
224
+ var loadDialectCommands = () => import("./chunk-7SW2QWLU.js");
225
+ var dialectGrade = (...a) => loadDialectCommands().then((m) => m.dialectGrade(...a));
226
+ var dialectKit = (...a) => loadDialectCommands().then((m) => m.dialectKit(...a));
227
+ var dialectTree = (...a) => loadDialectCommands().then((m) => m.dialectTree(...a));
228
+ var dialectNew = (...a) => loadDialectCommands().then((m) => m.dialectNew(...a));
229
+ var dialectRun = (...a) => loadDialectCommands().then((m) => m.dialectRun(...a));
230
+ var dialectTest = (...a) => loadDialectCommands().then((m) => m.dialectTest(...a));
231
+ var loadPluginCommands = () => import("./chunk-NXFPS2LR.js");
232
+ var pluginTest = (...a) => loadPluginCommands().then((m) => m.pluginTest(...a));
233
+ var pluginPin = (...a) => loadPluginCommands().then((m) => m.pluginPin(...a));
234
+ var pluginAdd = (...a) => loadPluginCommands().then((m) => m.pluginAdd(...a));
235
+ var loadFrameworkCommands = () => import("./chunk-2DIQQJCB.js");
236
+ var frameworksCheck = (...a) => loadFrameworkCommands().then((m) => m.frameworksCheck(...a));
237
+ var frameworksDiscover = (...a) => loadFrameworkCommands().then((m) => m.frameworksDiscover(...a));
238
+ var frameworksKit = (...a) => loadFrameworkCommands().then((m) => m.frameworksKit(...a));
239
+ var frameworksLearn = (...a) => loadFrameworkCommands().then((m) => m.frameworksLearn(...a));
240
+ var frameworksSurvey = (...a) => loadFrameworkCommands().then((m) => m.frameworksSurvey(...a));
241
+ var loadOnboardCommands = () => import("./chunk-K65BJIMT.js");
242
+ var onboardAccept = (...a) => loadOnboardCommands().then((m) => m.onboardAccept(...a));
243
+ var onboardCheck = (...a) => loadOnboardCommands().then((m) => m.onboardCheck(...a));
244
+ var onboardDraft = (...a) => loadOnboardCommands().then((m) => m.onboardDraft(...a));
245
+ var scanReview = (...a) => loadOnboardCommands().then((m) => m.scanReview(...a));
246
+ var scanSurvey = (...a) => loadOnboardCommands().then((m) => m.scanSurvey(...a));
247
+ var loadRepoTypeCommands = () => import("./chunk-J4K3KVLD.js");
248
+ var loadRepoCommands = () => import("./chunk-DPZHZQKE.js");
249
+ var loadSpecCommands = () => import("./chunk-TYAID7B7.js");
250
+ var loadEstateCommands = () => import("./chunk-2BFCZ3RK.js");
251
+ var onboardEval = (...a) => loadOnboardCommands().then((m) => m.onboardEval(...a));
252
+ var onboardFramework = (...a) => loadOnboardCommands().then((m) => m.onboardFramework(...a));
253
+ var onboardFrameworkAccept = (...a) => loadOnboardCommands().then((m) => m.onboardFrameworkAccept(...a));
254
+ var onboardFrameworkCheck = (...a) => loadOnboardCommands().then((m) => m.onboardFrameworkCheck(...a));
255
+ var HELP = `atticus ${VERSION} (catalog schema v${SCHEMA_VERSION})
256
+
257
+ Usage:
258
+ atticus schema export [dir] Write JSON Schema for every contract and the API's OpenAPI document (default: ./schema)
259
+ atticus catalog validate <dir> Check record files: schema, location and canonical form
260
+ [--fix] Rewrite files that aren't in canonical form
261
+ atticus catalog diff <a> <b> Compare two catalog folders (exit 1 when they differ)
262
+ atticus scan [--no-drift] Scan every repo's base clone and write catalog/generated
263
+ [--repos a,b] Only these repos
264
+ [--full] Ignore the scan cache
265
+ [--dry-run] Show what would change; write nothing
266
+ [--warnings] List what the scan left out or couldn't read, not just how many
267
+ [--ref <branch>] Scan another branch beside the baseline, into catalog/branches/<branch>/, and say what it changes
268
+ [--json] Print the result as JSON
269
+ atticus scan survey <repo> Your assistant reads the repo and drafts its scan settings (folders to leave out, path prefixes, client base URLs); checked against the code [--attempts 3] [--force] [--max-tokens n]
270
+ atticus scan verify <repo> Your assistant compares the code with the last scan: what it missed, what it has wrong, a fix for each; checked, kept in proposals/scan/ [--attempts 3] [--json] [--accept] [--max-tokens n]
271
+ atticus map <repo> Read a repo into facts in batches that fit your model, one hand-off at a time, each answer verified at once; for an assistant without file tools (ADR 0124; /atticus-map reads it in one session) [--mode m] [--max-tokens n] [--next] [--resume run] [--force] [--dir path] [--commit sha] [--json]
272
+ [--estimate] Say what the first read costs: the checkout, commit, facts file, source files, tokens, your assistant's tier and the batches at the limit
273
+ [--copy] Print the next batch's prompt to paste into a chat
274
+ [--answer <file>] With --copy: read the pasted answer back from a file (- for stdin)
275
+ atticus verify <repo> Check the facts your assistant wrote for a repo (/atticus-map) against its code: the claim on each cited line, the quote, references, secrets, coverage; raises the questions it wrote for a person; rejected facts go back to the assistant (ADR 0124) [--dir path] [--commit sha] [--routed a,b] [--json]
276
+ [--write] When nothing is rejected: put the facts in the catalog, the flows in specs/<repo>/, ask about calls nothing joins, and render the map
277
+ [--verbose] With --write: list every record changed and flow written, not only the counts
278
+ atticus map render <repo> [--json] Render the repo's map from the catalog: map.md, a page per flow with its sequence diagram, an OpenAPI file per component, under map/<repo>/
279
+ atticus spec draft <repo> Your assistant writes the repo's flows, one per trigger, each step cited and checked [--attempts 3] [--resume run] [--force] [--mode m] [--max-tokens n]
280
+ atticus spec check <repo> [--json] Check the repo's flows against the catalog, the template and the code; confirms steps on their cited lines
281
+ atticus estate join [--json] Join each repo's call-outs to the flows their targets start; writes specs/estate.yaml
282
+ atticus estate flow <flow> [--depth 5] [--json] A flow followed across repos, with the data at each crossing
283
+ atticus estate lineage <flow> <field> [--depth 5] [--json] Follow a field along a flow to the column it is stored in, or where it breaks
284
+ atticus join [--json] Follow each repo's flows into the flows their calls reach, through the calls the repos' verified facts join (verify --write); the same as estate join
285
+ atticus repo-type detect <repo> [--json] Match a repo against the org pack's repo types by fingerprint, with the evidence for each signal
286
+ atticus repo-type new <id> --from <repo> [--force] Draft a repo type from a repo (its build files, dependencies, markers, folders) for you to edit
287
+ atticus scan review <repo> What the last scan couldn't read: your assistant gives a verdict on each gap and a rule for code it can read; checked [--gaps] [--attempts 3]
288
+ atticus query "<query>" Find records, e.g. "kind:interface via:gateway -has:pattern"
289
+ atticus query "<words>" --search Search everything the index holds (records, knowledge items, flows, changes, answered questions, wiki sections, documents), names and ids first [--by words|meaning|both] [--kind k,k] [--limit n] [--json]
290
+ [--limit n] [--json] (see docs/query-language.md)
291
+ atticus context show <id> One record, flow, step, knowledge item, change, answered question or wiki section in full, with its file
292
+ atticus context walk <id> [--hops 1] [--kind k,k] [--limit n] The links from one id, how each was made, at most two hops
293
+ atticus cites --repo <repo> --path <path> What cites each line of one file: the flow steps, with the changes in flight on them, and the records (or --file <path on disk>) [--json]
294
+ atticus context code <id> [--around 6] The code a fact cites, a few lines around each cited line, from the workspace checkout
295
+ [--repo r --path p --line n] (or one line a fact cites)
296
+ atticus context similar <id> [--kind k,k] [--limit n] What reads like one id, by the local embedding model: a hint where to look, never a link
297
+ atticus context grep "<pattern>" [--regex] [--ignore-case] [--repo r] [--paths glob] [--limit n] The lines of the workspace clones that match, each repo:path:line; .gitignore'd files skipped
298
+ atticus context files "<glob>" [--repo r] [--limit n] The clones' files whose paths match a glob
299
+ atticus context outline <repo> <path> A file's declarations with their annotations, from its syntax tree; a document's headings
300
+ atticus context tools [--json] The read-only tools a step's model may call beside its pack, and their caps
301
+ atticus context call <tool> --input <json> [--run <run>] [--round n] [--json] Run one tool call a model made; with --run it is kept in the run's record
302
+ atticus impact <id> What a change to a record reaches, with owners and open questions
303
+ atticus ask "<question>" Answer a plain question from the catalog, showing the query it ran
304
+ atticus setup [--json] The setup checklist until the catalog is accepted, with a fix for each step
305
+ atticus baseline Accept the as-is catalog as the baseline [--note text] [--site dir]
306
+ atticus doctor [--json] Check this machine: Node, Git, OpenSpec, proxy, TLS, disk, port, assistant, and the tier your assistant reads a repo at
307
+ atticus probe Measure what your assistant can do here (open a file, write one, run a command), so the tier it reads a repo at is measured, not read off runtime.yaml; then /atticus-probe in the assistant (ADR 0124) [--assistant id] [--max-tokens n] [--json]
308
+ atticus probe answer <code> Check the assistant's answer (none when it couldn't open the file) and keep what it measured in .atticus/probe/<assistant>.yaml, on this machine only [--pasted] [--max-tokens n] [--json]
309
+ atticus secret set|check|forget <name> Keep a model provider's key in this machine's credential store under the name runtime.yaml gives as keyEnv; read from stdin, never printed
310
+ atticus upgrade [--check|--dry-run] Bring the metarepo's files up to this version (backs them up first) [--openspec-store: also make it an OpenSpec store, beta]
311
+ atticus support bundle Collect versions, checks, counts and the redacted log in a zip [--out f]
312
+ atticus digest What waits on you: hand-offs to revise, blocking findings [--channel c] [--send] [--json]
313
+ atticus watch [<change>] [--off] Follow a change without being on it (or stop); with no change, how each one you watch is doing [--json]
314
+ atticus guide <system> [--json] A system's guide, generated from the catalog: parts, calls, data, runtime, decisions
315
+ atticus site build <dir> [--title t] The read-only catalog site as static files (only systems open to everyone)
316
+ [--depth n] [--json]
317
+ atticus index rebuild Rebuild the local index from the catalog files
318
+ atticus index embed Give every node of the index its vector from the local embedding model (similar in meaning stays off until then)
319
+ atticus reconcile [diagram...] Compare draw.io diagrams with the catalog (default: inputs/diagrams)
320
+ [--json]
321
+ atticus sources add <type> <location> Print the sources.yaml entry for a wiki (git, markdown-folder, ado-wiki, ...), or write it [--save]
322
+ [--id <id>] [--path <folder>] [--ref <branch>] [--submodule] [--kind <k,k>] [--framework <f,f>] [--owner <who>] [--save]
323
+ atticus sources sync [--source s] [--json] Read the wikis and copy each to a dated snapshot: pages, stale pages, conflicts with code, document-only facts
324
+ atticus sources tag <source> [--kind k,k] [--framework f,f] [--owner o] Tag a knowledge source in sources.yaml (kinds, frameworks, owner)
325
+ atticus sources estimate [--source s] [--batch-tokens n] [--full] [--json] What a knowledge scan would cost before it runs: pages, tokens and model calls per source, within each source's maxPages
326
+ atticus knowledge scan [--source s] [--mode m] [--resume run] [--full] [--batch-tokens n] [--max-tokens n] Your assistant reads the snapshots into patterns, standards, processes, requests, decisions and constraints; every quote checked. A rescan reads only the pages that changed and says what changed
327
+ atticus knowledge list [--tag t] [--kind k] [--unverified] [--json] The knowledge items, by tag and kind
328
+ atticus knowledge ask "<question>" [--mode m] [--resume run] [--max-tokens n] An answer from the knowledge items only, citing them
329
+ atticus knowledge find "<phrase>" Search every wiki for a term or phrase; your assistant reads the pages that mention it and proposes what isn't a knowledge item yet, each quote checked [--source s] [--mode m] [--resume run] [--json] [--max-tokens n]
330
+ atticus knowledge keep <item> Keep a found item as a knowledge item you verified [--find <search>] [--as <kind>] [--set <field=value>] [--note <text>]
331
+ atticus knowledge finds [--json] The searches saved, and how many of each were kept
332
+ atticus knowledge conflicts [--json] Pages that disagree: what each says, which page applies and who decided (a person's answer, or the code: a fact verified from code that holds one page's value), the page a signal suggests, and the questions still open
333
+ atticus knowledge verify <item> Mark a knowledge item right as read: a green tick wherever it shows [--note <text>]
334
+ atticus knowledge correct <item> --set field=value Correct an item's details (a list takes a|b|c); the corrected item is what plans read [--note <text>]
335
+ atticus knowledge reject <item> --note <why> Mark an item wrong: plans and answers leave it out
336
+ atticus bench knowledge [--mode m] [--resume run] Scan the bench's invented wiki, ask its questions, and score both
337
+ atticus bench design [--mode m] [--resume run] Read the bench's Figma export, map it against the petclinic estate, and score it
338
+ atticus sources refresh [--json] Fetch every absorbed source again and show what changed
339
+ atticus patterns scan [--json] Find integration patterns in the wikis and compare them with the org pack
340
+ atticus coverage [--json] What the catalog knows per system and area: verified, document-only, unknown
341
+ atticus questions [--json] Knowledge gaps and the owner questions that close them
342
+ atticus questions list [--state open] [--json] The questions in questions/ a step raised for a person
343
+ atticus questions show <id> [--json] One question on file, with its options, evidence and answer
344
+ atticus questions answer <id> --option <n> | --text "..." Write the answer to the file; prints the rerun
345
+ [--scope repo|repo-type] [--type <repo type>] [--by who]
346
+ atticus intake add <files...> Drop documents, specs and diagrams into inputs/inbox for intake
347
+ atticus intake list [--json] What intake read from inputs/: kinds, systems, duplicates, versions
348
+ atticus intake impact <spec> [--json] A vendor spec against its other version: each change, breaking or not, and the gateway routes, service calls and callers it reaches
349
+ atticus triage [--json] What needs a person: unknown names, conflicts with code, image edges
350
+ atticus triage decide <item> <n> Choose option n for a triage item; writes a curated decision
351
+ [--reason text]
352
+ atticus diagram render <view|file> Draw a view (context, container, data, event, sequence) or a .drawio file
353
+ [--focus id] [--format mermaid|drawio] [--out file]
354
+ atticus diagram library <file> Write the draw.io shape library
355
+ atticus stub serve <spec|id> Serve a stub of an API from its spec, or from the catalog (--from-catalog)
356
+ [--port 4010] [--host 127.0.0.1]
357
+ atticus stub check <spec> Which operations have examples to answer with
358
+ atticus dialect new <name> --from <repo>[,<repo>...] Scaffold a dialect from sample repos
359
+ atticus dialect test <name> Run a dialect's own tests
360
+ atticus dialect run <name> <repo> Show the records a dialect produces from one repo [--json]
361
+ atticus dialect kit [dir] Export the dialect build kit for an assistant
362
+ atticus dialect tree <file> [--language l] Print a file's syntax tree, for syntax matches
363
+ atticus plugin test|pin <id> Run a scanner or model-provider plugin against its golden files, sandboxed; or pin its entry file's sha256
364
+ atticus plugin add <id> Copy a model-provider plugin Atticus ships (vertex) into the org pack, to review and pin
365
+ atticus onboard <repo> [--name n] [--attempts 3] [--mode m] Your assistant drafts a dialect for a repo Atticus can't read; checked, kept as a proposal
366
+ atticus onboard check <name> --repo <repo> Check a proposal (drafted, handed off or hand-written)
367
+ atticus onboard eval <dir> [--mode m] [--json] Score the assistant's drafts against reference dialects
368
+ atticus onboard accept <name> [--replace] Accept a proposal into org-pack/dialects/ (or frameworks/)
369
+ atticus onboard framework <name> --from <source|jar|tgz> [--users <repo>,...] Learn a house framework, your assistant drafts what the learner couldn't; checked, kept as a proposal
370
+ [--attempts 3] [--package a.b] [--mode m] [--no-ai]
371
+ atticus onboard check framework <name> [--from <source>] [--users <repo>,...] Check a framework proposal (drafted, handed off or hand-written)
372
+ atticus onboard accept framework <name> [--replace] Accept a framework proposal into org-pack/frameworks/
373
+ atticus frameworks learn <name> --from <repo|jar|tgz> Learn what a house framework means from its source, JAR or npm package
374
+ [--package a.b] [--dry-run] (writes org-pack/frameworks/<name>.yaml)
375
+ atticus frameworks discover --group <a.b|@scope>[,...] The house artifacts and npm packages the repos build on, found here
376
+ [--jars <dir>]... [--learn] [--json] (.jar and .tgz folders, Maven and Gradle caches, node_modules; never downloads)
377
+ atticus frameworks check [name] Run each framework model's own tests; a failing model isn't used
378
+ atticus frameworks survey [--package <prefix>[,...]] How the repos use house frameworks, any language [--json]
379
+ atticus frameworks kit [dir] Export the framework-model kit for an assistant
380
+ atticus change new "<title>" Start a change from a template: --type <type>
381
+ [--template id] [--id id] [--owner role=a,b]... [--system id]... [--like <archived change>]
382
+ [--impact <vendor spec>] (its footprint: what the spec's newer version reaches, see intake impact)
383
+ atticus change similar "<brief>" The archived changes nearest a new brief (or --change <id>: a change's own), to start from one with change new --like or change attach --like [--limit n] [--json]
384
+ atticus domain profile <system> A system as a domain profile, filled from the catalog [--out file]
385
+ atticus change feature <change> The feature stage: your assistant places the change on the estate's flows and features from the brief, stories or a design; checked and criticised every draft until done [--from-figma f.json] [--mode m] [--resume run] [--force] [--context-tokens n] [--whole-context] [--max-tokens n]
386
+ atticus change architecture <change> The architecture stage: the target flows (steps added, changed or removed, with fields) as flow deltas; looped the same way [--mode m] [--resume run] [--context-tokens n] [--whole-context] [--max-tokens n]
387
+ atticus change small <change> The fast path for a small change (ADR 0113): your assistant places it on the flows, writes its target flows and words its stories in one step; every stage's checks, and the critic at the change type's gate [--mode m] [--resume run] [--force] [--context-tokens n] [--whole-context]
388
+ atticus change attach <change> <files...> Attach a spec, screenshot, PDF, email export or document to a change: copied into its inputs/, read and cited by line or page, read by its steps [--replaces inputs/<file>] [--promote inputs/<file>: copy one into general knowledge] [--like <archived change>: attach an earlier change as an example] [--prototype <repo>: compare a prototype with the estate and attach what exists, changes, is new or only a vendor provides] [--json]
389
+ atticus change draft <change> Your assistant drafts the proposal, spec and interfaces from the brief and the catalog; checked [--attempts 3] [--force] [--mode m] [--max-tokens n]
390
+ atticus change status <id> [--json] State, next step, what blocks it, risk, the PR to merge and test kinds
391
+ atticus change knowledge <id> The patterns, standards, decisions, processes, requests and wiki and document sections that apply to the change, picked by each of its stages from the feature stage on and by each task, with near-misses and the pages that disagree (each undecided one asked of a person once); confirm one (later stages that take its kind pick it) or exclude it (they leave it out) [--confirm id] [--exclude id] [--json]
392
+ atticus change handoff <id> --approve Open the phase's hand-off PR; merging it approves the gate [--repo]
393
+ (without --approve: say what it would open, send nothing)
394
+ atticus change sync <id> [--approve] Read the hand-off PR; a merged PR moves the change on (--approve merges a ready one) and keeps what Atticus drafted beside what merged (stage/<stage>.drafted/, .merged/)
395
+ atticus change learn [--json] How much people changed Atticus's drafts: per merged change and stage, lines per file and each story's criteria and fields, and whether it falls over time (from the kept drafts; completes any whose merge you have since pulled)
396
+ atticus change return <id> --reason "<why>" --approve Close the hand-off PR and return the change to the product owner
397
+ atticus change archive <id> [--no-rescan] Archive a released change and rescan its repos
398
+ atticus change list [--json] Every change and its state
399
+ atticus change export <change> [ado|jira] [--format ado|jira] [--out file.csv] [--area path] [--iteration path] The change's stories and tasks as a work-item import file: Azure DevOps' CSV (a User Story per story, its Tasks under it, criteria in Acceptance Criteria) or Jira's; a person imports it
400
+ atticus change conflicts [--json] Open changes that touch the same systems, records or repos
401
+ atticus change conform <change> [--repo r] [--ref branch] [--task t] [--latest] [--json] Does the code do what the design says: scan the branch's commit and check it against the target flows; what is missing, still there or not in the design becomes findings on the conform gate (--latest shows the newest check, scanning nothing)
402
+ atticus change estimate <change> [--json] The change's estimate: its size from the target flows, the org pack's ranges summed, and what drives it, each with its source; never a number nobody stands behind
403
+ atticus change map <change> [--format mermaid|drawio] [--json] The change's picture: the components, entries and tables its target flows touch, marked + new, \u25C7 modify or \u2715 retire
404
+ atticus critic <change> [--gate g] [--lens l] [--mode m] [--json] [--max-tokens n] Review a change at a gate: rule checks, then AI lenses (--mode runs them)
405
+ atticus critic <change> [--gate g] --resume Read in the AI lens answers your assistant wrote (hand-off); handoff done does it per lens
406
+ atticus critic stats [--json] How often each rule's findings are dismissed or waived
407
+ atticus findings <change> [--json] The change's findings by gate and round
408
+ atticus finding <change> <id> <action> apply | edit-and-apply | not-relevant | waive | ask (recorded with you; reaches main with the hand-off PR)
409
+ [--gate g] [--reason text] [--asked-of who] [--edit patch-file]
410
+ atticus feature list [--json] Features found in code, named by people or proposed by AI
411
+ atticus feature show <id> [--json] A feature's entry points, flow, owner, links and gaps
412
+ atticus feature name <id> "<name>" Confirm or correct a feature's name [--description] [--owner]
413
+ atticus feature tag <id> <tags...> Tag a feature
414
+ atticus feature merge <into> <from...> Merge features
415
+ atticus feature split <id> <entry-points...> Split entry points into another feature [--name] [--into]
416
+ atticus feature link <id> <ref> Link a work item or page, e.g. ado:1234 [--title]
417
+ atticus feature suggest-links [--json] Suggest links between features and work items
418
+ atticus feature spec <id> Draft an OpenSpec capability spec from a confirmed feature
419
+ atticus catalog migrate [--dry-run] Rewrite catalog files to the current schema version
420
+ atticus task context <change> <task> [--json|--markdown] The task's context for an assistant: its story and criteria, the step it implements with today's code, what applies, the knowledge that applies to it (how-tos with their steps, standards, processes, decisions, each with its page, the pages that say the same and those that disagree), the files attached and the files likely to change
421
+ atticus task run <change> <task> Run a task with AI [--level plan|draft|pr] [--mode m] [--approve]
422
+ atticus task <change> <task> Run one task with your assistant, the same as task run [--level plan|draft|pr] [--mode m] [--approve]
423
+ atticus spec hand-down <change> <task> Create the task's Spec Kit feature in its repo [--force]
424
+ atticus spec hand-up <change> <task> Read the Spec Kit feature back at the PR [--pr n --pr-url url]
425
+ atticus drift <change> [--json] Compare design, repo plans and code
426
+ atticus assistant-files [--repo id [--change id]] [--force] [--check] Generate the slash commands, instructions and skills for each assistant runtime.yaml allows (Copilot, Claude Code, Cursor, Gemini CLI, Windsurf, AGENTS.md)
427
+ atticus feature suggest-names [--mode m] Ask AI to propose names for detected features
428
+ atticus plan stories <change> Write stories, stories.md and tasks.md from the approved design [--force] [--mode m] [--draft: before approval] [--context-tokens n] [--whole-context] [--max-tokens n]
429
+ atticus stories <change> The stories stage, the same as plan stories [--force] [--mode m] [--draft] [--context-tokens n] [--whole-context] [--max-tokens n]
430
+ atticus change needs <change> Your assistant says what the change needs from the organisation (requests and processes to raise, standards to follow, teams and vendors to involve), for the change, a feature, flow, story or task; each checked against the change's own words [--mode m] [--resume run] [--context-tokens n] [--whole-context] [--max-tokens n]
431
+ atticus needs [--change id] [--all] [--json] What changes need from the organisation, open ones first, with lead times and who handles each
432
+ atticus waiting [--group change|kind] [--filter words] [--json] What waits on you across every change: questions, open needs, manual steps, findings, knowledge to verify
433
+ atticus runs [--change id] [--limit n] [--json] The model runs: what Atticus asked a model, each round, and whether it was answered
434
+ atticus runs show <run> [--json] One run: its prompt, its answer and the problems handed back to it
435
+ atticus history [--change id] [--session id] [--filter words] [--limit n] [--json] The prompts people sent their assistant here and the responses they got, by session, kept on this machine
436
+ atticus history show <id> [--json] One prompt or response, and its pair
437
+ atticus history add --surface <claude-code|vscode|cli> --kind <prompt|response> [--session id] [--command c] [--change id] Record one prompt or response, its text read from stdin (the plugin's hooks and VS Code call it)
438
+ atticus history off Stop recording prompts and responses on this machine (kept in .atticus/me.yaml)
439
+ atticus history on Record them again on this machine (runtime.yaml can still turn it off for everyone)
440
+ atticus needs done <change> <item> Record a need as done, e.g. with the CTASK number as its note [--for <target>] [--note <text>]
441
+ atticus needs skip <change> <item> --note <why> Record a need as not needed, and why [--for <target>]
442
+ atticus needs reopen <change> <item> Open a need again [--for <target>]
443
+ (with target flows: the stories stage, a task per changed step with its prompt, requests from knowledge)
444
+ atticus plan snow <change> Draft service-desk requests the change needs [--force]
445
+ atticus plan bar <change> Measure the story bar [--eval file]
446
+ atticus plan submit <change> File the drafted requests (a dry run until you add --approve)
447
+ atticus ado sync <change> Create or update work items (a dry run until you add --approve) [--epic id]
448
+ atticus templates draft Draft request and work-item templates from wikis, uploads and past tickets [--no-ai]
449
+ atticus todo [--change id] [--all] Manual steps waiting for a person
450
+ atticus todo show <step> [--export text|csv|import] A manual step: what to do, where, and what it needs
451
+ atticus todo done <step> Record a manual step's result [--result k=v]... [--skip --note why]
452
+ atticus todo run <step> --with <executor> Run a step with a team's own tool [--approve --inputs sha] [--fill-only]
453
+ atticus executors check Ping configured executors and show what each covers
454
+ atticus init <folder> --platform <p> Create a new metarepo named after the folder [--from pack] [--owner who] [--openspec-store: also an OpenSpec store, beta]
455
+ atticus adopt <path> Use Atticus in an existing repo; writes only .atticus/ [--platform p] [--name n]
456
+ atticus unadopt <path> Remove Atticus from an adopted repo, leaving it as it was
457
+ atticus repos discover <folder> | --org <org> Propose repos.manifest.yaml entries [--platform p] [--dry-run]
458
+ atticus repo add <url|path> Add one repo to the manifest, with what it is in your own words; with a folder and no --type, its type is read from its files (or, where they say nothing, from what you wrote) [--id x] [--type t] [--owner team] [--system s] [--component c] [--platform p] [--description "what it is"] [--no-description] [--json]
459
+ atticus repo describe [<repo>] Say what a repo is, in one line, for a repo that has none (or edit what it says); with no repo, the repos with no description and the drafts waiting for a person [--description "..."] [--accept] [--reject] [--json]
460
+ [--drafted "..." --cites f:n] Your assistant hands over the line it drafted, with the lines it read it from; kept unconfirmed until a person confirms it
461
+ atticus absorb <git-url|path> --id <id> Translate another team's prompts, agents, checklists, OpenSpec, Spec Kit, TypeSpec or Atticus repo
462
+ [--mode adopt|link|ignore] [--ref r] [--dry-run]
463
+ atticus absorb --refresh <id> Fetch an absorbed source again and update its proposal
464
+ atticus absorb accept <id> Copy what the reviewed proposal adopts into the org pack and add its sources.yaml entry [--replace] [--dry-run] [--json]
465
+ atticus tests generate <change> <story> Generate tests from a story [--framework id] [--force] [--check] [--mode m]
466
+ atticus trace <change> [--json] [--csv] [--no-write] Requirement \u2192 story \u2192 test \u2192 code \u2192 records \u2192 feature
467
+ atticus release plan <change> [--json] Deploy order across the repos, why, rollback per step, waits and release sections
468
+ atticus release forecast <change> [--json] Forecast ready-to-release day from lead times and the initiative's plan
469
+ atticus release evidence <change> [--out dir] [--json] The evidence pack for an approval board or an audit
470
+ atticus release notes <change> [--audience business|technical] [--json] Release notes from the brief, interfaces and data
471
+ atticus release security <change> [--json] Security review draft: auth, classifications, boundaries, vendors, secrets
472
+ atticus outcome list [--change id] [--json] The brief's success measures and the values recorded after release
473
+ atticus outcome record <change> <measure> --value <v> Record a measured outcome [--note text]
474
+ atticus ci drift [repo] --catalog <path> In a repo's pipeline: compare the repo with the committed catalog
475
+ [--repo id] [--json [file]] [--junit file] [--summary file] [--warn-only]
476
+ atticus ci snippet <github|azure|gitlab|jenkins> [--write dir] Pipeline template for the drift check
477
+ atticus ci archive-gate <change> [--drift file]... Whether a change may be archived
478
+ atticus glossary list|scan [--json] Business terms from wikis, code and people
479
+ atticus glossary define <term> "<definition>" [--owner team] Define a business term, as you
480
+ atticus glossary link <term> <record-id|schema#field> Link a term to a catalog record or field
481
+ atticus glossary alias <term> <name>... Another name people use for a term
482
+ atticus initiative new "<title>" --journey <j> Start an initiative [--id] [--release YYYY-MM-DD] [--epic]
483
+ atticus initiative plan <id> --target <system> Plan its changes and commitments [--release d] [--system s]... [--dry-run]
484
+ atticus initiative status <id> Critical path, at-risk and slipped commitments
485
+ atticus initiative request <id> <party> Send a team a system card and track the reply [--system s]...
486
+ atticus initiative commit <commitment> <open|at-risk|done|slipped> Record a commitment's status
487
+ atticus learn [list] | learn start <role|lesson> | learn check [--answer a] [--lesson l] [--step s]
488
+ Lessons by role in a practice sandbox: list them, start one, check a step
489
+ atticus sandbox create <dir> A throwaway practice metarepo
490
+ atticus commands [--json] Every command as data: its arguments, options, area and how it runs (for an editor)
491
+ atticus legacy [--all] Every command outside the twelve atticus help shows, grouped; atticus legacy <command> runs one exactly as atticus <command> does
492
+ atticus explain <id|command> Explain a record, finding, change or command in plain words
493
+ atticus eval run [--agent a]... [--mode mock|replay|live] [--runs n] Evaluate AI agents
494
+ atticus eval report The latest eval results and AI quality
495
+ atticus bench fetch [--repo id] [--batch n] [--cache dir] Clone the bench's public repos at their pinned commits
496
+ atticus bench survey [--repo id] [--batch n] [--mode m] Your assistant drafts each bench repo's scan settings; kept for later runs
497
+ atticus bench verify [--repo id] [--batch n] [--mode m] Your assistant verifies each bench repo's scan; kept for bench run to score
498
+ atticus bench run [--repo id] [--batch n] [--estate e] [--json] [--specs] Scan each bench repo and score it against its reference; --specs also scores drafted specs against bench/flows and scans each estate's repos together
499
+ atticus bench facts [<repo>] [--facts file] [--batch n] [--json] Score the facts your assistant wrote for each bench repo against its reference, per kind, with bench run's matcher
500
+ atticus bench stories --draft <file> [--facts file] [--json] Score a drafted user story against its reference story in bench/stories: steps, fields, error cases, invented fields, rubric sections
501
+ atticus bench stories --change <change> --story <id> [--out file] [--facts file] [--json] Score the stories the stories stage drafted for a change (its id or folder), converted to one bench story, against bench/stories/<id>.yaml; --out keeps the converted draft
502
+ atticus defences scan [path] [--all] Look for instructions hidden in documents and prompts
503
+ atticus conformance <path> --kind <catalog|org-pack|dialect|plugin|executor>
504
+ Check a catalog, org pack, dialect, plugin or executor against the spec
505
+ atticus alias "<name>" <id> Record that a name used in diagrams or documents means a catalog id
506
+ [--reason text]
507
+ atticus orgpack owner [<handle>] Who looks after the org pack: shown, or set in pack.yaml (the rest of the file stays)
508
+ atticus orgpack validate [dir] Check an org pack against its schemas (default: <root>/org-pack)
509
+ atticus orgpack draft Draft the profile's systems from the knowledge items: the products and vendors the wikis name, with their aliases and owners, each citing its item [--platform <p>] [--json]
510
+ atticus orgpack accept <platform> Put the drafted systems into profile.yaml [--only <id,id>] [--verified-only] [--dry-run] [--json]
511
+ atticus standards propose Propose each rule of a confirmed standard as a critic check (proposals/checklists/standards.yaml); nothing is enforced [--json]
512
+ atticus standards accept Put the proposed checks a person picks into org-pack/checklists/standards.yaml [--only <id,id>] [--dry-run] [--json]
513
+ atticus openspec setup Set up OpenSpec with the org-flow schema in the metarepo
514
+ atticus openspec check Check the OpenSpec version and validate every change and spec
515
+ atticus openspec <args...> Run the bundled OpenSpec CLI in the metarepo with these arguments (openspec isn't on PATH; it ships inside Atticus). status, instructions and show take --change from the only change open when you don't name one
516
+ atticus handoff done <run-id> Tell Atticus a hand-off artifact is written; it validates it (a stage's draft: with the stage's checks, its problems listed with their lines until it is clean) [--model m: the model that wrote it, kept in the run record]
517
+ atticus stage check <change> <stage> <file> Run a stage's checks on a draft's file and list its problems with their lines; writes nothing (a drafter checks its draft before it hands it in)
518
+ atticus next [--all] [--json] The next step to take, its command and slash command, and why; from the files only
519
+ atticus <step> --handoff [--json] On map, scan survey, scan verify, spec draft, knowledge scan, change feature, change architecture, change small, change draft, stories, change needs, knowledge find, knowledge ask and critic (its lenses one at a time, as a stage offers its critic lenses after each draft): print only the prompt, the result file and the commands that finish it
520
+ atticus <step> --max-tokens n On the same steps: the model's limit. The whole prompt fits n tokens (counted as characters / 4, a quarter kept back for the count's error), or the step says before handing off that it can't, with the numbers. The VS Code extension passes its model's limit to every step
521
+ atticus workspace sync Clone or update the base clone of every repo in the manifests
522
+ [--repos a,b] Only these repos
523
+ atticus workspace open <change> Create the change's worktrees, repos.yaml and editor workspaces
524
+ --repos a,b The repos the change touches
525
+ atticus workspace prune <change> Remove worktrees whose PRs merged or closed
526
+ [--all] [--force] All worktrees; also those with uncommitted work
527
+
528
+ --root <dir> The metarepo (default: the current folder)
529
+ --by <handle> Who is acting (default: the metarepo's Git user, git config user.email)
530
+ atticus mcp Serve read-only tools to an assistant over MCP (stdio): next step, catalog, knowledge, changes, needs (the Claude Code plugin starts it)
531
+ atticus ui [--port n] [--open] Start the app on this machine (127.0.0.1); Ctrl+C stops it
532
+ [--embed vscode] Let a VS Code panel show the app (the Atticus extension starts it so)
533
+ [--parent pid] Stop when that process ends (an editor that started it)
534
+ [--show-token] Print the session token, for an assistant or a script (an editor that starts it gets it)
535
+ [--full] Every page a tab of its section, and the menu's More pages open
536
+ atticus --version Print the version
537
+ atticus --help Show this help
538
+
539
+ Every command is described in docs/guide/commands.md; atticus explain <command> says more.`;
540
+ var HELP_TEXT = HELP;
541
+ var RECORDS_A_PERSON = /* @__PURE__ */ new Set([
542
+ "knowledge",
543
+ "needs",
544
+ "upgrade",
545
+ "baseline",
546
+ "digest",
547
+ "alias",
548
+ "initiative",
549
+ "outcome",
550
+ "glossary",
551
+ "plan",
552
+ "ado",
553
+ "todo",
554
+ "task",
555
+ "spec",
556
+ "feature",
557
+ "finding",
558
+ "change",
559
+ "triage",
560
+ "handoff"
561
+ ]);
562
+ async function readAll(stream) {
563
+ const chunks = [];
564
+ for await (const c of stream)
565
+ chunks.push(typeof c === "string" ? Buffer.from(c) : c);
566
+ return Buffer.concat(chunks).toString("utf8");
567
+ }
568
+ function num(v) {
569
+ const n = typeof v === "string" ? Number(v) : NaN;
570
+ return Number.isInteger(n) && n > 0 ? n : void 0;
571
+ }
572
+ async function main(given, io, o = {}) {
573
+ const started = Date.now();
574
+ const argv = aliasArgv(given, positionalsAt(given));
575
+ const words = argv.filter((a) => !a.startsWith("-")).slice(0, 2);
576
+ const flags = [
577
+ ...new Set(argv.filter((a) => a.startsWith("--")).map((a) => a.slice(2).split("=")[0]))
578
+ ];
579
+ const rootAt = argv.indexOf("--root");
580
+ const root = resolve(rootAt >= 0 && argv[rootAt + 1] ? argv[rootAt + 1] : process.cwd());
581
+ const log = () => isMetarepoRoot(root) ? createLog(root, o.quiet ? { level: "warn" } : {}) : void 0;
582
+ try {
583
+ const code = await dispatch(argv, io);
584
+ log()?.info("command", { command: words.join(" "), flags, code, ms: Date.now() - started });
585
+ return code;
586
+ } catch (e) {
587
+ const l = log();
588
+ l?.error("crash", e, { command: words.join(" "), flags, ms: Date.now() - started });
589
+ if (l && e instanceof Error)
590
+ e.logFile = l.file;
591
+ throw e;
592
+ }
593
+ }
594
+ function openspecArgsOf(argv) {
595
+ const at = argv.indexOf("openspec");
596
+ const out = [];
597
+ for (let i = at + 1; i < argv.length; i++) {
598
+ const a = argv[i];
599
+ if (a === "--root") {
600
+ i++;
601
+ continue;
602
+ }
603
+ if (a.startsWith("--root="))
604
+ continue;
605
+ out.push(a);
606
+ }
607
+ return out;
608
+ }
609
+ function positionalsAt(argv) {
610
+ const { tokens } = parseArgs({
611
+ args: argv,
612
+ allowPositionals: true,
613
+ options: OPTIONS,
614
+ strict: false,
615
+ tokens: true
616
+ });
617
+ return tokens.filter((t) => t.kind === "positional").map((t) => t.index);
618
+ }
619
+ function isMetarepoRoot(root) {
620
+ return existsSync(join(root, "org-pack")) || existsSync(join(root, ".atticus", "org-pack"));
621
+ }
622
+ async function dispatch(argv, io) {
623
+ const at = argv.findIndex((a) => a === "--max-tokens" || a.startsWith("--max-tokens="));
624
+ if (at < 0)
625
+ return dispatchCommand(argv, io);
626
+ const raw = argv[at].includes("=") ? argv[at].slice("--max-tokens=".length) : argv[at + 1];
627
+ const n = Number(raw);
628
+ if (!Number.isInteger(n) || n < 1e3) {
629
+ io.err("--max-tokens is a whole number of 1000 or more: the model's limit, which the whole prompt must fit.");
630
+ return 2;
631
+ }
632
+ const { withPromptLimit, PromptTooLong } = await loadAi();
633
+ try {
634
+ return await withPromptLimit(n, () => dispatchCommand(argv, io));
635
+ } catch (e) {
636
+ if (!(e instanceof PromptTooLong))
637
+ throw e;
638
+ io.err(e.message);
639
+ return 2;
640
+ }
641
+ }
642
+ var OPTIONS = {
643
+ help: { type: "boolean", short: "h" },
644
+ version: { type: "boolean", short: "v" },
645
+ fix: { type: "boolean" },
646
+ root: { type: "string" },
647
+ repos: { type: "string" },
648
+ all: { type: "boolean" },
649
+ kind: { type: "string" },
650
+ executor: { type: "string" },
651
+ fixture: { type: "string" },
652
+ force: { type: "boolean" },
653
+ draft: { type: "boolean" },
654
+ story: { type: "string" },
655
+ gaps: { type: "boolean" },
656
+ full: { type: "boolean" },
657
+ "dry-run": { type: "boolean" },
658
+ json: { type: "boolean" },
659
+ limit: { type: "string" },
660
+ filter: { type: "string" },
661
+ "batch-tokens": { type: "string" },
662
+ "max-tokens": { type: "string" },
663
+ // atticus probe (ADR 0124 addendum A-probe).
664
+ assistant: { type: "string" },
665
+ pasted: { type: "boolean" },
666
+ "context-tokens": { type: "string" },
667
+ "whole-context": { type: "boolean" },
668
+ search: { type: "boolean" },
669
+ regex: { type: "boolean" },
670
+ "ignore-case": { type: "boolean" },
671
+ paths: { type: "string" },
672
+ // atticus context (ADR 0107 addendum): the context tools.
673
+ input: { type: "string" },
674
+ run: { type: "string" },
675
+ round: { type: "string" },
676
+ hops: { type: "string" },
677
+ line: { type: "string" },
678
+ around: { type: "string" },
679
+ depth: { type: "string" },
680
+ by: { type: "string" },
681
+ as: { type: "string" },
682
+ group: { type: "string", multiple: true },
683
+ channel: { type: "string" },
684
+ send: { type: "boolean" },
685
+ site: { type: "string" },
686
+ reason: { type: "string" },
687
+ focus: { type: "string" },
688
+ format: { type: "string" },
689
+ out: { type: "string" },
690
+ area: { type: "string" },
691
+ iteration: { type: "string" },
692
+ port: { type: "string" },
693
+ open: { type: "boolean" },
694
+ "show-token": { type: "boolean" },
695
+ embed: { type: "string" },
696
+ parent: { type: "string" },
697
+ host: { type: "string" },
698
+ catalog: { type: "string" },
699
+ "from-catalog": { type: "boolean" },
700
+ from: { type: "string" },
701
+ package: { type: "string" },
702
+ jars: { type: "string", multiple: true },
703
+ learn: { type: "boolean" },
704
+ type: { type: "string" },
705
+ template: { type: "string" },
706
+ like: { type: "string" },
707
+ impact: { type: "string" },
708
+ id: { type: "string" },
709
+ owner: { type: "string", multiple: true },
710
+ system: { type: "string", multiple: true },
711
+ base: { type: "string" },
712
+ repo: { type: "string" },
713
+ gate: { type: "string" },
714
+ lens: { type: "string" },
715
+ model: { type: "string" },
716
+ "asked-of": { type: "string" },
717
+ edit: { type: "string" },
718
+ description: { type: "string" },
719
+ title: { type: "string" },
720
+ name: { type: "string" },
721
+ attempts: { type: "string" },
722
+ users: { type: "string" },
723
+ language: { type: "string" },
724
+ replace: { type: "boolean" },
725
+ into: { type: "string" },
726
+ level: { type: "string" },
727
+ mode: { type: "string" },
728
+ approve: { type: "boolean" },
729
+ pr: { type: "string" },
730
+ "pr-url": { type: "string" },
731
+ change: { type: "string" },
732
+ check: { type: "boolean" },
733
+ resume: { type: "string" },
734
+ eval: { type: "string" },
735
+ epic: { type: "string" },
736
+ "no-ai": { type: "boolean" },
737
+ "openspec-store": { type: "boolean" },
738
+ "no-drift": { type: "boolean" },
739
+ warnings: { type: "boolean" },
740
+ "no-rescan": { type: "boolean" },
741
+ refresh: { type: "string" },
742
+ export: { type: "string" },
743
+ result: { type: "string", multiple: true },
744
+ skip: { type: "boolean" },
745
+ note: { type: "string" },
746
+ for: { type: "string" },
747
+ with: { type: "string" },
748
+ inputs: { type: "string" },
749
+ "fill-only": { type: "boolean" },
750
+ platform: { type: "string" },
751
+ ref: { type: "string" },
752
+ task: { type: "string" },
753
+ latest: { type: "boolean" },
754
+ org: { type: "string" },
755
+ framework: { type: "string" },
756
+ csv: { type: "boolean" },
757
+ "no-write": { type: "boolean" },
758
+ junit: { type: "string" },
759
+ summary: { type: "string" },
760
+ "json-out": { type: "string" },
761
+ "warn-only": { type: "boolean" },
762
+ write: { type: "string" },
763
+ path: { type: "string" },
764
+ file: { type: "string" },
765
+ submodule: { type: "boolean" },
766
+ save: { type: "boolean" },
767
+ only: { type: "string" },
768
+ "verified-only": { type: "boolean" },
769
+ unverified: { type: "boolean" },
770
+ set: { type: "string", multiple: true },
771
+ find: { type: "string" },
772
+ drift: { type: "string", multiple: true },
773
+ journey: { type: "string" },
774
+ release: { type: "string" },
775
+ target: { type: "string" },
776
+ answer: { type: "string" },
777
+ lesson: { type: "string" },
778
+ step: { type: "string" },
779
+ agent: { type: "string", multiple: true },
780
+ runs: { type: "string" },
781
+ audience: { type: "string" },
782
+ value: { type: "string" },
783
+ bench: { type: "string" },
784
+ cache: { type: "string" },
785
+ batch: { type: "string" },
786
+ specs: { type: "boolean" },
787
+ estate: { type: "string" },
788
+ accept: { type: "boolean" },
789
+ // atticus repo add / repo describe (ADR 0128)
790
+ reject: { type: "boolean" },
791
+ cites: { type: "string" },
792
+ drafted: { type: "string" },
793
+ "no-description": { type: "boolean" },
794
+ component: { type: "string" },
795
+ tag: { type: "string" },
796
+ source: { type: "string" },
797
+ "from-figma": { type: "string" },
798
+ replaces: { type: "string" },
799
+ promote: { type: "string" },
800
+ prototype: { type: "string" },
801
+ off: { type: "boolean" },
802
+ surface: { type: "string" },
803
+ session: { type: "string" },
804
+ command: { type: "string" },
805
+ markdown: { type: "boolean" },
806
+ dir: { type: "string" },
807
+ commit: { type: "string" },
808
+ confirm: { type: "string" },
809
+ exclude: { type: "string" },
810
+ routed: { type: "string" },
811
+ // atticus map (ADR 0124 §4)
812
+ estimate: { type: "boolean" },
813
+ next: { type: "boolean" },
814
+ copy: { type: "boolean" },
815
+ facts: { type: "string" }
816
+ };
817
+ async function dispatchCommand(argv, io) {
818
+ const { values, positionals } = parseArgs({
819
+ args: argv,
820
+ allowPositionals: true,
821
+ options: OPTIONS,
822
+ strict: false
823
+ });
824
+ if (values.version) {
825
+ io.out(VERSION);
826
+ return 0;
827
+ }
828
+ const [group, command, arg] = positionals;
829
+ const refused = await checkFlags(argv, positionals, io);
830
+ if (refused !== void 0)
831
+ return refused;
832
+ if (group === "help" || values.help || !group) {
833
+ const { helpCommand } = await import("./chunk-7EOBHUMC.js");
834
+ return helpCommand(group === "help" ? positionals.slice(1) : positionals, HELP, io, {
835
+ all: values.all === true
836
+ });
837
+ }
838
+ if (group === "legacy") {
839
+ const { legacyHelp } = await import("./chunk-7EOBHUMC.js");
840
+ io.out(legacyHelp(HELP, { all: values.all === true }));
841
+ return 0;
842
+ }
843
+ if (group === "commands") {
844
+ const { AREAS, commandCatalog: commandCatalog2 } = await import("./chunk-YMZ3TNYB.js");
845
+ const commands = commandCatalog2(HELP);
846
+ if (values.json === true)
847
+ io.out(JSON.stringify({ areas: AREAS, commands }, null, 2));
848
+ else
849
+ for (const a of AREAS) {
850
+ io.out(`${a.title}:`);
851
+ for (const c of commands.filter((x) => x.area === a.id))
852
+ io.out(` atticus ${c.id}${c.runs === "local" ? "" : ` (${c.runs})`}`);
853
+ }
854
+ return 0;
855
+ }
856
+ if (group === "schema" && command === "export") {
857
+ await schemaExport(arg ?? "schema", io);
858
+ return 0;
859
+ }
860
+ if (group === "catalog" && command === "validate") {
861
+ if (!arg) {
862
+ io.err("catalog validate needs a folder, for example: atticus catalog validate catalog/generated");
863
+ return 2;
864
+ }
865
+ const s = await catalogValidate(arg, { fix: values.fix === true }, io);
866
+ return s.invalid + s.misplaced + s.notCanonical > 0 ? 1 : 0;
867
+ }
868
+ if (group === "catalog" && command === "diff") {
869
+ const b = positionals[3];
870
+ if (!arg || !b) {
871
+ io.err("catalog diff needs two folders, for example: atticus catalog diff catalog/generated /tmp/other");
872
+ return 2;
873
+ }
874
+ return catalogDiff(resolve(arg), resolve(b), values.json === true, io);
875
+ }
876
+ const root = resolve(typeof values.root === "string" ? values.root : process.cwd());
877
+ if (!runsNoAi(group, command))
878
+ await setUpAi();
879
+ if (group === "next")
880
+ return (await import("./chunk-7AVHLZGD.js")).nextCommand(root, { json: values.json === true, all: values.all === true }, io);
881
+ if (values.handoff === true && (await import("./chunk-KQDZXGNR.js")).isHandoffStep(group, command))
882
+ return (await import("./chunk-W5BVQF44.js")).handoffStep(root, argv, io, dispatch);
883
+ const given = typeof values.by === "string" && values.by.trim() ? values.by : void 0;
884
+ const person = !given && RECORDS_A_PERSON.has(group) ? await gitUser(root) : void 0;
885
+ let warned = false;
886
+ const who = () => {
887
+ if (given)
888
+ return given;
889
+ if (person?.warning && !warned) {
890
+ io.err(person.warning);
891
+ warned = true;
892
+ }
893
+ return person?.handle ?? "someone";
894
+ };
895
+ const repoIds = typeof values.repos === "string" ? values.repos.split(",").map((s) => s.trim()).filter(Boolean) : void 0;
896
+ if (group === "change" && command === "needs" || group === "needs") {
897
+ const handled = await (await import("./chunk-QRAOANID.js")).needsCli(root, positionals, values, io, who);
898
+ if (handled !== void 0)
899
+ return handled;
900
+ }
901
+ if (group === "waiting") {
902
+ const given2 = Array.isArray(values.group) ? values.group[0] : values.group;
903
+ const g = given2 === void 0 ? "change" : String(given2);
904
+ if (g !== "change" && g !== "kind") {
905
+ io.err(`--group takes change or kind, not ${g}.`);
906
+ return 2;
907
+ }
908
+ const run = async (argv2) => {
909
+ const out = [];
910
+ const err = [];
911
+ const code = await main([...argv2, "--root", root], { out: (l) => out.push(l), err: (l) => err.push(l) }, { quiet: true });
912
+ return { code, out: out.join("\n"), err: err.join("\n") };
913
+ };
914
+ return (await import("./chunk-XZRON6IV.js")).waitingCli({
915
+ by: g,
916
+ ...typeof values.filter === "string" ? { filter: values.filter } : {},
917
+ json: values.json === true
918
+ }, io, run);
919
+ }
920
+ if (group === "runs") {
921
+ const m = await import("./chunk-PRPPGYZG.js");
922
+ if (command === "show") {
923
+ const id = positionals[2];
924
+ if (!id) {
925
+ io.err("Usage: atticus runs show <run> [--json] (atticus runs lists them)");
926
+ return 2;
927
+ }
928
+ return m.runShowCli(root, id, { json: values.json === true }, io);
929
+ }
930
+ if (command !== void 0) {
931
+ io.err(`runs takes show <run>, or nothing to list them; not ${command}.`);
932
+ return 2;
933
+ }
934
+ const limit = num(values.limit);
935
+ return m.runsCli(root, {
936
+ ...typeof values.change === "string" ? { change: values.change } : {},
937
+ ...limit ? { limit } : {},
938
+ json: values.json === true
939
+ }, io);
940
+ }
941
+ if (group === "history") {
942
+ const m = await import("./chunk-I3E7CX4H.js");
943
+ const text = (v) => typeof v === "string" && v.trim() ? v : void 0;
944
+ if (command === "add") {
945
+ if (process.stdin.isTTY) {
946
+ io.err("history add reads the text from stdin; pipe the prompt or response into it (the plugin's hooks and VS Code do).");
947
+ return 2;
948
+ }
949
+ return m.historyAddCli(root, {
950
+ ...text(values.surface) ? { surface: text(values.surface) } : {},
951
+ ...text(values.kind) ? { kind: text(values.kind) } : {},
952
+ ...text(values.session) ? { session: text(values.session) } : {},
953
+ ...text(values.command) ? { command: text(values.command) } : {},
954
+ ...text(values.change) ? { change: text(values.change) } : {}
955
+ }, () => readAll(process.stdin), io);
956
+ }
957
+ if (command === "show") {
958
+ const id = positionals[2];
959
+ if (!id) {
960
+ io.err("Usage: atticus history show <id> [--json] (atticus history lists them)");
961
+ return 2;
962
+ }
963
+ return m.historyShowCli(root, id, { json: values.json === true }, io);
964
+ }
965
+ if (command === "on" || command === "off")
966
+ return m.historyOnOffCli(root, command === "on", io);
967
+ if (command !== void 0) {
968
+ io.err(`history takes show <id>, add, on or off, or nothing to list them; not ${command}.`);
969
+ return 2;
970
+ }
971
+ const limit = num(values.limit);
972
+ return m.historyCli(root, {
973
+ ...text(values.change) ? { change: text(values.change) } : {},
974
+ ...text(values.session) ? { session: text(values.session) } : {},
975
+ ...text(values.filter) ? { filter: text(values.filter) } : {},
976
+ ...limit ? { limit } : {},
977
+ json: values.json === true
978
+ }, io);
979
+ }
980
+ if (group === "change" && (command === "feature" || command === "architecture" || command === "small") || group === "plan" && command === "stories" || group === "bench" && command === "design") {
981
+ const handled = await stageCli(root, positionals, values, io);
982
+ if (handled !== void 0)
983
+ return handled;
984
+ }
985
+ if (group === "repo" && (command === "add" || command === "describe")) {
986
+ const m = await loadRepoCommands();
987
+ const str2 = (v) => typeof v === "string" ? v : void 0;
988
+ const pick = (...names) => Object.fromEntries(names.flatMap((n) => {
989
+ const v = str2(values[n]);
990
+ return v ? [[n, v]] : [];
991
+ }));
992
+ const first = (v) => Array.isArray(v) ? v[0] : str2(v);
993
+ if (command === "add")
994
+ return m.repoAdd(root, arg, {
995
+ ...pick("id", "type", "platform", "component", "description"),
996
+ ...first(values.owner) ? { owner: first(values.owner) } : {},
997
+ ...first(values.system) ? { system: first(values.system) } : {},
998
+ noDescription: values["no-description"] === true,
999
+ json: values.json === true
1000
+ }, io);
1001
+ return m.repoDescribe(root, arg, {
1002
+ ...pick("description", "drafted", "cites"),
1003
+ accept: values.accept === true,
1004
+ reject: values.reject === true,
1005
+ json: values.json === true
1006
+ }, io);
1007
+ }
1008
+ if (group === "repo-type" && (command === "detect" || command === "new")) {
1009
+ const m = await loadRepoTypeCommands();
1010
+ const from = typeof values.from === "string" ? values.from : void 0;
1011
+ if (command === "new")
1012
+ return m.repoTypeNew(root, arg ?? "", { ...from ? { from } : {}, force: values.force === true }, io);
1013
+ if (!arg) {
1014
+ io.err("Usage: atticus repo-type detect <repo> [--json]");
1015
+ return 2;
1016
+ }
1017
+ return m.repoTypeDetect(root, arg, { json: values.json === true }, io);
1018
+ }
1019
+ if (group === "scan" && command === "survey") {
1020
+ const text = (v) => typeof v === "string" ? v : void 0;
1021
+ if (!arg) {
1022
+ io.err("Usage: atticus scan survey <repo> [--attempts 3] [--resume run] [--force] [--mode m]");
1023
+ return 2;
1024
+ }
1025
+ const attempts = Number(text(values.attempts) ?? "3");
1026
+ if (!Number.isInteger(attempts) || attempts < 1 || attempts > 10) {
1027
+ io.err("--attempts is a whole number from 1 to 10.");
1028
+ return 2;
1029
+ }
1030
+ try {
1031
+ const { runtime } = await runtimeForCli(root, {
1032
+ ...text(values.mode) ? { mode: text(values.mode) } : {}
1033
+ });
1034
+ return await scanSurvey(root, arg, {
1035
+ attempts,
1036
+ force: values.force === true,
1037
+ ...text(values.resume) ? { resume: text(values.resume) } : {}
1038
+ }, { runtime }, io);
1039
+ } catch (e) {
1040
+ if (e instanceof (await loadAi()).RuntimeConfigError) {
1041
+ io.err(e.message);
1042
+ return 2;
1043
+ }
1044
+ throw e;
1045
+ }
1046
+ }
1047
+ if (group === "estate" && (command === "join" || command === "flow" || command === "lineage")) {
1048
+ const m = await loadEstateCommands();
1049
+ const field = positionals[3];
1050
+ const depth = num(values.depth);
1051
+ const o = { json: values.json === true, ...depth ? { depth } : {} };
1052
+ if (command === "join")
1053
+ return m.estateJoin(root, o, io);
1054
+ if (!arg || command === "lineage" && !field) {
1055
+ io.err(command === "flow" ? "Usage: atticus estate flow <flow-id> [--depth 5] [--json]" : "Usage: atticus estate lineage <flow-id> <field> [--depth 5] [--json]");
1056
+ return 2;
1057
+ }
1058
+ return command === "flow" ? m.estateFlowCommand(root, arg, o, io) : m.estateLineage(root, arg, field, o, io);
1059
+ }
1060
+ if (group === "spec" && (command === "draft" || command === "check")) {
1061
+ const text = (v) => typeof v === "string" ? v : void 0;
1062
+ const m = await loadSpecCommands();
1063
+ if (!arg) {
1064
+ io.err(command === "draft" ? "Usage: atticus spec draft <repo> [--attempts 3] [--resume run] [--force] [--mode m]" : "Usage: atticus spec check <repo> [--json]");
1065
+ return 2;
1066
+ }
1067
+ if (command === "check")
1068
+ return m.specCheck(root, arg, { json: values.json === true }, io);
1069
+ const attempts = Number(text(values.attempts) ?? "3");
1070
+ if (!Number.isInteger(attempts) || attempts < 1 || attempts > 10) {
1071
+ io.err("--attempts is a whole number from 1 to 10.");
1072
+ return 2;
1073
+ }
1074
+ try {
1075
+ const { runtime } = await runtimeForCli(root, {
1076
+ ...text(values.mode) ? { mode: text(values.mode) } : {}
1077
+ });
1078
+ return await m.specDraft(root, arg, {
1079
+ attempts,
1080
+ force: values.force === true,
1081
+ ...text(values.resume) ? { resume: text(values.resume) } : {}
1082
+ }, { runtime }, io);
1083
+ } catch (e) {
1084
+ if (e instanceof (await loadAi()).RuntimeConfigError) {
1085
+ io.err(e.message);
1086
+ return 2;
1087
+ }
1088
+ throw e;
1089
+ }
1090
+ }
1091
+ if (group === "map" && command === "render") {
1092
+ const repo = positionals[2];
1093
+ if (!repo) {
1094
+ io.err("Usage: atticus map render <repo> [--json]");
1095
+ return 2;
1096
+ }
1097
+ const { mapRenderCommand } = await import("./chunk-PCOCACY3.js");
1098
+ return mapRenderCommand(root, repo, { json: values.json === true }, io);
1099
+ }
1100
+ if (group === "map") {
1101
+ const repo = command;
1102
+ if (!repo) {
1103
+ io.err("Usage: atticus map <repo> [--estimate] [--handoff | --copy [--answer <file>] | --mode m] [--next] [--max-tokens n] [--force]");
1104
+ return 2;
1105
+ }
1106
+ const text = (v) => typeof v === "string" ? v : void 0;
1107
+ const { mapCommand } = await import("./chunk-UBBC2XSG.js");
1108
+ const o = {
1109
+ ...text(values.dir) ? { dir: resolve(text(values.dir)) } : {},
1110
+ ...text(values.commit) ? { commit: text(values.commit) } : {},
1111
+ ...text(values.resume) ? { resume: text(values.resume) } : {},
1112
+ ...text(values.answer) !== void 0 ? { answer: text(values.answer) } : {},
1113
+ estimate: values.estimate === true,
1114
+ next: values.next === true,
1115
+ force: values.force === true,
1116
+ copy: values.copy === true,
1117
+ json: values.json === true
1118
+ };
1119
+ if (o.estimate)
1120
+ return mapCommand(root, repo, o, io);
1121
+ try {
1122
+ const { runtime } = await runtimeForCli(root, {
1123
+ ...o.copy ? { mode: "hand-off" } : text(values.mode) ? { mode: text(values.mode) } : {},
1124
+ handoffValidate: async () => []
1125
+ });
1126
+ return await mapCommand(root, repo, o, io, { runtime });
1127
+ } catch (e) {
1128
+ if (e instanceof (await loadAi()).RuntimeConfigError) {
1129
+ io.err(e.message);
1130
+ return 2;
1131
+ }
1132
+ throw e;
1133
+ }
1134
+ }
1135
+ if (group === "verify") {
1136
+ const v = parseArgs({
1137
+ args: argv,
1138
+ allowPositionals: true,
1139
+ options: { ...OPTIONS, write: { type: "boolean" }, verbose: { type: "boolean" } },
1140
+ strict: false
1141
+ });
1142
+ const repo = v.positionals[1];
1143
+ if (!repo) {
1144
+ io.err("Usage: atticus verify <repo> [--write [--verbose]] [--dir path] [--commit sha] [--routed a,b] [--json]");
1145
+ return 2;
1146
+ }
1147
+ const text = (x) => typeof x === "string" ? x : void 0;
1148
+ const { verifyCommand } = await import("./chunk-JMSCMUCA.js");
1149
+ return verifyCommand(
1150
+ // The first reading took --write's next word as its value, so a --root right after it
1151
+ // was lost; this reading has --write as a switch.
1152
+ text(v.values.root) ? resolve(text(v.values.root)) : root,
1153
+ repo,
1154
+ {
1155
+ ...text(v.values.dir) ? { dir: resolve(text(v.values.dir)) } : {},
1156
+ ...text(v.values.commit) ? { commit: text(v.values.commit) } : {},
1157
+ ...text(v.values.routed) ? {
1158
+ routed: text(v.values.routed).split(",").map((x) => x.trim()).filter(Boolean)
1159
+ } : {},
1160
+ write: v.values.write === true,
1161
+ verbose: v.values.verbose === true,
1162
+ json: v.values.json === true
1163
+ },
1164
+ io
1165
+ );
1166
+ }
1167
+ if (group === "scan" && command === "verify") {
1168
+ const text = (v) => typeof v === "string" ? v : void 0;
1169
+ if (!arg) {
1170
+ io.err("Usage: atticus scan verify <repo> [--attempts 3] [--resume run] [--mode m] [--json] | --accept");
1171
+ return 2;
1172
+ }
1173
+ const m = await loadScanVerifyCommands();
1174
+ if (values.accept === true) {
1175
+ const by = given ?? (await gitUser(root)).handle ?? "someone";
1176
+ return m.scanVerifyAccept(root, arg, { by }, io);
1177
+ }
1178
+ const attempts = Number(text(values.attempts) ?? "3");
1179
+ if (!Number.isInteger(attempts) || attempts < 1 || attempts > 10) {
1180
+ io.err("--attempts is a whole number from 1 to 10.");
1181
+ return 2;
1182
+ }
1183
+ try {
1184
+ const { runtime } = await runtimeForCli(root, {
1185
+ ...text(values.mode) ? { mode: text(values.mode) } : {}
1186
+ });
1187
+ return await m.scanVerify(root, arg, {
1188
+ attempts,
1189
+ json: values.json === true,
1190
+ ...text(values.resume) ? { resume: text(values.resume) } : {}
1191
+ }, { runtime }, io);
1192
+ } catch (e) {
1193
+ if (e instanceof (await loadAi()).RuntimeConfigError) {
1194
+ io.err(e.message);
1195
+ return 2;
1196
+ }
1197
+ throw e;
1198
+ }
1199
+ }
1200
+ if (group === "scan" && command === "review") {
1201
+ const text = (v) => typeof v === "string" ? v : void 0;
1202
+ if (!arg) {
1203
+ io.err("Usage: atticus scan review <repo> [--gaps] [--name n] [--attempts 3] [--resume run] [--mode m]");
1204
+ return 2;
1205
+ }
1206
+ const attempts = Number(text(values.attempts) ?? "3");
1207
+ if (!Number.isInteger(attempts) || attempts < 1 || attempts > 10) {
1208
+ io.err("--attempts is a whole number from 1 to 10.");
1209
+ return 2;
1210
+ }
1211
+ try {
1212
+ const { runtime } = await runtimeForCli(root, {
1213
+ ...text(values.mode) ? { mode: text(values.mode) } : {}
1214
+ });
1215
+ return await scanReview(root, arg, {
1216
+ gapsOnly: values.gaps === true,
1217
+ attempts,
1218
+ ...text(values.name) ? { name: text(values.name) } : {},
1219
+ ...text(values.resume) ? { resume: text(values.resume) } : {}
1220
+ }, { runtime }, io);
1221
+ } catch (e) {
1222
+ if (e instanceof (await loadAi()).RuntimeConfigError) {
1223
+ io.err(e.message);
1224
+ return 2;
1225
+ }
1226
+ throw e;
1227
+ }
1228
+ }
1229
+ if (group === "scan")
1230
+ return scanCommand(root, {
1231
+ ...repoIds ? { repos: repoIds } : {},
1232
+ full: values.full === true,
1233
+ dryRun: values["dry-run"] === true,
1234
+ json: values.json === true,
1235
+ noDrift: values["no-drift"] === true,
1236
+ warnings: values.warnings === true,
1237
+ ...typeof values.ref === "string" && values.ref.trim() ? { ref: values.ref.trim() } : {}
1238
+ }, io);
1239
+ if (group === "cites") {
1240
+ const given2 = (v) => typeof v === "string" && v.trim() ? v.trim() : void 0;
1241
+ const [repo, path, file] = [given2(values.repo), given2(values.path), given2(values.file)];
1242
+ return (await import("./chunk-D46WUV3T.js")).citesCli(root, {
1243
+ ...repo ? { repo } : {},
1244
+ ...path ? { path } : {},
1245
+ ...file ? { file: resolve(file) } : {},
1246
+ json: values.json === true
1247
+ }, io);
1248
+ }
1249
+ if (group === "watch")
1250
+ return (await import("./chunk-DE76JROX.js")).watchCommand(root, command, { off: values.off === true, json: values.json === true }, io);
1251
+ if (group === "setup" && !command)
1252
+ return setupCommand(root, { json: values.json === true }, io);
1253
+ if (group === "doctor")
1254
+ return doctorCommand(root, { json: values.json === true }, io);
1255
+ if (group === "probe") {
1256
+ const { probeCommand, probeAnswerCommand } = await import("./chunk-JCZIKA4C.js");
1257
+ const max = typeof values["max-tokens"] === "string" ? Number(values["max-tokens"]) : void 0;
1258
+ const json2 = values.json === true;
1259
+ if (command === "answer")
1260
+ return probeAnswerCommand(root, positionals[2], { pasted: values.pasted === true, ...max !== void 0 ? { maxTokens: max } : {}, json: json2 }, io);
1261
+ if (command) {
1262
+ io.err("Usage: atticus probe [--assistant id] [--max-tokens n] [--json] | atticus probe answer <code|none> [--pasted] [--max-tokens n] [--json]");
1263
+ return 2;
1264
+ }
1265
+ return probeCommand(root, {
1266
+ ...typeof values.assistant === "string" ? { assistant: values.assistant } : {},
1267
+ ...max !== void 0 ? { maxTokens: max } : {},
1268
+ json: json2
1269
+ }, io);
1270
+ }
1271
+ if (group === "upgrade")
1272
+ return upgradeCommand(root, {
1273
+ check: values.check === true,
1274
+ dryRun: values["dry-run"] === true,
1275
+ ...values.check === true || values["dry-run"] === true ? {} : { by: who() },
1276
+ json: values.json === true,
1277
+ ...values["openspec-store"] === true ? { openspecStore: true } : {}
1278
+ }, io);
1279
+ if (group === "support" && command === "bundle")
1280
+ return supportBundleCommand(root, {
1281
+ ...typeof values.out === "string" && values.out ? { out: values.out } : {},
1282
+ json: values.json === true
1283
+ }, io);
1284
+ if (group === "baseline")
1285
+ return baselineCommand(root, {
1286
+ by: who(),
1287
+ ...typeof values.note === "string" && values.note ? { note: values.note } : {},
1288
+ ...typeof values.site === "string" && values.site ? { site: values.site } : {}
1289
+ }, io);
1290
+ if (group === "digest")
1291
+ return digestCommand(root, {
1292
+ as: typeof values.as === "string" && values.as ? values.as : who(),
1293
+ ...typeof values.channel === "string" && values.channel ? { channel: values.channel } : {},
1294
+ send: values.send === true,
1295
+ json: values.json === true
1296
+ }, io);
1297
+ if (group === "guide")
1298
+ return guideCommand(root, command, { json: values.json === true }, io);
1299
+ if (group === "site" && command === "build")
1300
+ return siteBuildCommand(root, positionals[2], { ...typeof values.title === "string" && values.title ? { title: values.title } : {} }, io);
1301
+ if (group === "ask") {
1302
+ if (!command) {
1303
+ io.err('ask needs a question, for example: atticus ask "who calls ledger-api?"');
1304
+ return 2;
1305
+ }
1306
+ return askCommand(root, command, { json: values.json === true }, io);
1307
+ }
1308
+ if (group === "context") {
1309
+ const m = await import("./chunk-EYWIDJFU.js");
1310
+ const target = positionals[2];
1311
+ const csv = (v) => typeof v === "string" ? v.split(",").map((k) => k.trim()).filter(Boolean) : void 0;
1312
+ if (command === "tools")
1313
+ return m.contextTools({ json: values.json === true }, io);
1314
+ if (command === "show" || command === "walk") {
1315
+ if (!target) {
1316
+ io.err(`Usage: atticus context ${command} <id> (an id the index has; atticus query "<words>" --search finds one)`);
1317
+ return 2;
1318
+ }
1319
+ if (command === "show")
1320
+ return m.contextShow(root, target, io);
1321
+ return m.contextWalk(root, target, {
1322
+ ...num(values.hops) ? { hops: num(values.hops) } : {},
1323
+ ...csv(values.kind) ? { kinds: csv(values.kind) } : {},
1324
+ ...num(values.limit) ? { limit: num(values.limit) } : {}
1325
+ }, io);
1326
+ }
1327
+ if (command === "code") {
1328
+ const repo = typeof values.repo === "string" ? values.repo : void 0;
1329
+ const path = typeof values.path === "string" ? values.path : void 0;
1330
+ if (!target && !(repo && path && num(values.line))) {
1331
+ io.err("Usage: atticus context code <id>, or --repo <repo> --path <path> --line <n> (a line a fact cites)");
1332
+ return 2;
1333
+ }
1334
+ const around = typeof values.around === "string" ? Number(values.around) : void 0;
1335
+ return m.contextCode(root, {
1336
+ ...target ? { id: target } : {},
1337
+ ...repo ? { repo } : {},
1338
+ ...path ? { path } : {},
1339
+ ...num(values.line) ? { line: num(values.line) } : {},
1340
+ ...around !== void 0 && Number.isInteger(around) ? { around } : {}
1341
+ }, io);
1342
+ }
1343
+ const repoOpt = typeof values.repo === "string" && values.repo ? values.repo : void 0;
1344
+ if (command === "grep") {
1345
+ if (!target) {
1346
+ io.err('Usage: atticus context grep "<pattern>" [--regex] [--ignore-case] [--repo r] [--paths glob] [--limit n]');
1347
+ return 2;
1348
+ }
1349
+ return m.contextGrep(root, target, {
1350
+ ...values.regex === true ? { regex: true } : {},
1351
+ ...values["ignore-case"] === true ? { ignoreCase: true } : {},
1352
+ ...repoOpt ? { repo: repoOpt } : {},
1353
+ ...typeof values.paths === "string" && values.paths ? { paths: values.paths } : {},
1354
+ ...num(values.limit) ? { limit: num(values.limit) } : {}
1355
+ }, io);
1356
+ }
1357
+ if (command === "files") {
1358
+ if (!target) {
1359
+ io.err('Usage: atticus context files "<glob>" [--repo r] [--limit n], e.g. "src/**/*.java"');
1360
+ return 2;
1361
+ }
1362
+ return m.contextFiles(root, target, {
1363
+ ...repoOpt ? { repo: repoOpt } : {},
1364
+ ...num(values.limit) ? { limit: num(values.limit) } : {}
1365
+ }, io);
1366
+ }
1367
+ if (command === "outline") {
1368
+ const file = positionals[3];
1369
+ if (!target || !file) {
1370
+ io.err("Usage: atticus context outline <repo> <path> (the file's path in the repo)");
1371
+ return 2;
1372
+ }
1373
+ return m.contextOutline(root, target, file, io);
1374
+ }
1375
+ if (command === "call") {
1376
+ if (!target) {
1377
+ io.err("Usage: atticus context call <tool> --input <json> [--run <run>] (atticus context tools lists the tools)");
1378
+ return 2;
1379
+ }
1380
+ return m.contextCall(root, target, {
1381
+ ...typeof values.input === "string" ? { input: values.input } : {},
1382
+ ...typeof values.run === "string" ? { run: values.run } : {},
1383
+ ...num(values.round) ? { round: num(values.round) } : {},
1384
+ json: values.json === true
1385
+ }, io);
1386
+ }
1387
+ if (command === "similar") {
1388
+ if (!target) {
1389
+ io.err("Usage: atticus context similar <id> [--kind k,k] [--limit n]");
1390
+ return 2;
1391
+ }
1392
+ return m.contextSimilar(root, target, {
1393
+ ...csv(values.kind) ? { kinds: csv(values.kind) } : {},
1394
+ ...num(values.limit) ? { limit: num(values.limit) } : {}
1395
+ }, io);
1396
+ }
1397
+ io.err(`context takes show, walk, code, grep, files, outline, similar, tools or call; not ${command ?? "nothing"}.`);
1398
+ return 2;
1399
+ }
1400
+ if (group === "query") {
1401
+ if (!command) {
1402
+ io.err('query needs a query, for example: atticus query "kind:interface via:gateway"');
1403
+ return 2;
1404
+ }
1405
+ if (values.search === true)
1406
+ return searchCommand(root, command, {
1407
+ json: values.json === true,
1408
+ ...num(values.limit) ? { limit: num(values.limit) } : {},
1409
+ ...typeof values.kind === "string" ? { kind: values.kind } : {},
1410
+ ...typeof values.by === "string" ? { by: values.by } : {}
1411
+ }, io);
1412
+ return queryCommand(root, command, { json: values.json === true, ...num(values.limit) ? { limit: num(values.limit) } : {} }, io);
1413
+ }
1414
+ if (group === "impact") {
1415
+ if (!command) {
1416
+ io.err("impact needs a record id, for example: atticus impact ledger-db.entry");
1417
+ return 2;
1418
+ }
1419
+ return impactCommand(root, command, { json: values.json === true, ...num(values.depth) ? { depth: num(values.depth) } : {} }, io);
1420
+ }
1421
+ if (group === "index" && command === "rebuild")
1422
+ return indexRebuild(root, io);
1423
+ if (group === "index" && command === "embed")
1424
+ return (await import("./chunk-C6EKFH7J.js")).indexEmbed(root, io);
1425
+ if (group === "alias") {
1426
+ const target = positionals[2];
1427
+ if (!command || !target) {
1428
+ io.err('alias needs a name and an id, for example: atticus alias "Ledger Platform" ledger-api');
1429
+ return 2;
1430
+ }
1431
+ return aliasCommand(root, command, target, {
1432
+ by: who(),
1433
+ ...typeof values.reason === "string" ? { reason: values.reason } : {}
1434
+ }, io);
1435
+ }
1436
+ const str = (v) => typeof v === "string" ? v : void 0;
1437
+ const json = values.json === true;
1438
+ if (group === "initiative") {
1439
+ const by = command === "status" ? void 0 : who();
1440
+ const systems = Array.isArray(values.system) ? values.system : [];
1441
+ if (command === "new")
1442
+ return initiativeNew(root, {
1443
+ ...arg ? { title: positionals.slice(2).join(" ") } : {},
1444
+ ...str(values.journey) ? { journey: str(values.journey) } : {},
1445
+ ...by ? { by } : {},
1446
+ ...str(values.id) ? { id: str(values.id) } : {},
1447
+ ...str(values.release) ? { release: str(values.release) } : {},
1448
+ ...str(values.epic) ? { epic: str(values.epic) } : {},
1449
+ json
1450
+ }, io);
1451
+ if (command === "plan")
1452
+ return initiativePlan(root, arg, {
1453
+ ...str(values.target) ? { target: str(values.target) } : {},
1454
+ ...str(values.release) ? { release: str(values.release) } : {},
1455
+ ...systems.length ? { systems } : {},
1456
+ ...by ? { by } : {},
1457
+ dryRun: values["dry-run"] === true,
1458
+ json
1459
+ }, io);
1460
+ if (command === "status")
1461
+ return initiativeStatus(root, arg, { json }, io);
1462
+ if (command === "request")
1463
+ return requestFromTeam(root, arg, positionals[3], { ...by ? { by } : {}, ...systems.length ? { systems } : {}, json }, io);
1464
+ if (command === "commit")
1465
+ return initiativeCommitment(root, arg, positionals[3], { ...by ? { by } : {} }, io);
1466
+ }
1467
+ if (group === "learn") {
1468
+ if (!command || command === "list")
1469
+ return learnList(root, { json }, io);
1470
+ if (command === "start")
1471
+ return learnStart(root, arg, { json }, io);
1472
+ if (command === "check")
1473
+ return learnCheck(root, {
1474
+ ...str(values.answer) ? { answer: str(values.answer) } : {},
1475
+ ...str(values.lesson) ? { lesson: str(values.lesson) } : {},
1476
+ ...str(values.step) ? { step: str(values.step) } : {},
1477
+ json
1478
+ }, io);
1479
+ }
1480
+ if (group === "sandbox" && command === "create")
1481
+ return sandboxCreate(arg ? resolve(arg) : void 0, { json }, io);
1482
+ if (group === "explain")
1483
+ return explainCommand(root, positionals.slice(1).join(" ") || void 0, { json }, io);
1484
+ if (group === "eval" && command === "run")
1485
+ return evalRun(root, {
1486
+ ...Array.isArray(values.agent) ? { agent: values.agent } : {},
1487
+ ...str(values.mode) ? { mode: str(values.mode) } : {},
1488
+ ...num(values.runs) ? { runs: num(values.runs) } : {},
1489
+ json
1490
+ }, io);
1491
+ if (group === "eval" && command === "report")
1492
+ return evalReport(root, { json }, io);
1493
+ if (group === "bench" && (command === "facts" || command === "stories")) {
1494
+ const m = await import("./chunk-BKVWTZ6A.js");
1495
+ return m.benchScoreCli(command, arg, values, io, root);
1496
+ }
1497
+ if (group === "bench" && (command === "fetch" || command === "run" || command === "survey" || command === "verify")) {
1498
+ const b = {
1499
+ ...str(values.bench) ? { bench: str(values.bench) } : {},
1500
+ ...str(values.cache) ? { cache: str(values.cache) } : {},
1501
+ ...str(values.repo) ? { repo: str(values.repo) } : {},
1502
+ ...num(values.batch) ? { batch: num(values.batch) } : {},
1503
+ ...str(values.estate) ? { estate: str(values.estate) } : {},
1504
+ json
1505
+ };
1506
+ if (command === "survey")
1507
+ return benchSurvey({ ...b, ...str(values.mode) ? { mode: str(values.mode) } : {} }, io);
1508
+ if (command === "verify")
1509
+ return benchVerify({ ...b, ...str(values.mode) ? { mode: str(values.mode) } : {} }, io);
1510
+ return command === "fetch" ? benchFetch(b, io) : benchRun({ ...b, ...values.specs === true ? { specs: true } : {} }, io);
1511
+ }
1512
+ if (group === "mcp") {
1513
+ const run = async (argv2) => {
1514
+ const out = [];
1515
+ const err = [];
1516
+ const code = await main([...argv2, "--root", root], { out: (l) => out.push(l), err: (l) => err.push(l) }, { quiet: true });
1517
+ return { code, out: out.join("\n"), err: err.join("\n") };
1518
+ };
1519
+ const { serveMcp } = await import("./chunk-EADP3PEN.js");
1520
+ await serveMcp(process.stdin, process.stdout, run, VERSION);
1521
+ return 0;
1522
+ }
1523
+ if (group === "ui") {
1524
+ if (values.embed !== void 0 && values.embed !== "vscode") {
1525
+ io.err(`--embed takes vscode (the app in a VS Code panel), not ${values.embed}.`);
1526
+ return 2;
1527
+ }
1528
+ const parent = values.parent === void 0 ? void 0 : Number(values.parent);
1529
+ if (parent !== void 0 && !(Number.isInteger(parent) && parent > 0)) {
1530
+ io.err(`--parent takes a process id, not ${String(values.parent)}.`);
1531
+ return 2;
1532
+ }
1533
+ return uiCommand(root, {
1534
+ // --port 0 asks for any free port.
1535
+ ...values.port === "0" ? { port: 0 } : num(values.port) ? { port: num(values.port) } : {},
1536
+ open: values.open === true,
1537
+ showToken: values["show-token"] === true,
1538
+ ...values.full === true ? { full: true } : {},
1539
+ ...values.embed === "vscode" ? { embed: "vscode" } : {},
1540
+ ...parent !== void 0 ? { parent } : {},
1541
+ version: VERSION,
1542
+ ...given ? { user: given } : {}
1543
+ }, io);
1544
+ }
1545
+ if (group === "secret") {
1546
+ const { secretCommand } = await import("./chunk-DFBCSHVT.js");
1547
+ return secretCommand(positionals.slice(1), io);
1548
+ }
1549
+ if (group === "conformance") {
1550
+ if (!command) {
1551
+ io.err("conformance needs a folder or file to check, for example: atticus conformance catalog --kind catalog");
1552
+ return 2;
1553
+ }
1554
+ return conformanceCommand(command, {
1555
+ ...str(values.kind) ? { kind: str(values.kind) } : {},
1556
+ ...str(values.executor) ? { executor: str(values.executor) } : {},
1557
+ ...str(values.fixture) ? { fixture: str(values.fixture) } : {},
1558
+ json
1559
+ }, io);
1560
+ }
1561
+ if (group === "defences" && command === "scan")
1562
+ return defencesScan(root, arg ? resolve(arg) : void 0, { json, all: values.all === true }, io);
1563
+ if (group === "tests" && command === "generate")
1564
+ return testsGenerate(root, arg, positionals[3], {
1565
+ ...str(values.framework) ? { framework: str(values.framework) } : {},
1566
+ force: values.force === true,
1567
+ check: values.check === true,
1568
+ ...str(values.mode) ? { mode: str(values.mode) } : {},
1569
+ ...str(values.resume) ? { resume: str(values.resume) } : {},
1570
+ json
1571
+ }, io);
1572
+ if (group === "trace")
1573
+ return traceCommand(root, command, { json, csv: values.csv === true, write: values["no-write"] !== true }, io);
1574
+ if (group === "release") {
1575
+ if (command === "plan")
1576
+ return releasePlanCommand(root, arg, { json }, io);
1577
+ if (command === "forecast")
1578
+ return releaseForecastCommand(root, arg, { json }, io);
1579
+ if (command === "evidence")
1580
+ return releaseEvidenceCommand(root, arg, { ...str(values.out) ? { out: str(values.out) } : {}, json }, io);
1581
+ if (command === "notes")
1582
+ return releaseNotesCommand(root, arg, { ...str(values.audience) ? { audience: str(values.audience) } : {}, json }, io);
1583
+ if (command === "security")
1584
+ return releaseSecurityCommand(root, arg, { json }, io);
1585
+ }
1586
+ if (group === "outcome" && (!command || command === "list"))
1587
+ return outcomeList(root, { ...str(values.change) ? { change: str(values.change) } : {}, json }, io);
1588
+ if (group === "outcome" && command === "record")
1589
+ return outcomeRecord(root, arg, positionals[3], {
1590
+ ...str(values.value) ? { value: str(values.value) } : {},
1591
+ by: who(),
1592
+ ...str(values.note) ? { note: str(values.note) } : {},
1593
+ json
1594
+ }, io);
1595
+ if (group === "ci" && command === "drift")
1596
+ return ciDrift(resolve(arg ?? "."), {
1597
+ ...str(values.catalog) ? { catalog: resolve(str(values.catalog)) } : {},
1598
+ json: str(values["json-out"]) ?? json,
1599
+ ...str(values.junit) ? { junit: str(values.junit) } : {},
1600
+ ...str(values.summary) ? { summary: str(values.summary) } : {},
1601
+ warnOnly: values["warn-only"] === true,
1602
+ ...str(values.repo) ? { repo: str(values.repo) } : {}
1603
+ }, io);
1604
+ if (group === "ci" && command === "snippet")
1605
+ return ciSnippet(arg, io, { ...str(values.write) ? { write: str(values.write) } : {} });
1606
+ if (group === "ci" && command === "archive-gate")
1607
+ return ciArchiveGate(root, arg, { ...Array.isArray(values.drift) ? { drift: values.drift } : {}, json }, io);
1608
+ if (group === "glossary") {
1609
+ const by = ["define", "link", "alias"].includes(command ?? "") ? who() : void 0;
1610
+ if (command === "list")
1611
+ return glossaryList(root, { json }, io);
1612
+ if (command === "scan")
1613
+ return glossaryScan(root, { ...str(values.mode) ? { mode: str(values.mode) } : {}, json }, io);
1614
+ const ownerOne = Array.isArray(values.owner) ? values.owner[0] : str(values.owner);
1615
+ if (command === "define")
1616
+ return glossaryDefine(root, arg, positionals.slice(3).join(" ") || void 0, { ...by ? { by } : {}, ...ownerOne ? { owner: ownerOne } : {} }, io);
1617
+ if (command === "link")
1618
+ return glossaryLink(root, arg, positionals[3], { ...by ? { by } : {} }, io);
1619
+ if (command === "alias")
1620
+ return glossaryAlias(root, arg, positionals.slice(3), { ...by ? { by } : {} }, io);
1621
+ }
1622
+ if (group === "init") {
1623
+ const owner = Array.isArray(values.owner) ? values.owner[0] : str(values.owner);
1624
+ const dir = resolve(command ?? ".");
1625
+ const code = await initCommand(dir, {
1626
+ ...command ? { name: basename(dir) } : {},
1627
+ ...str(values.platform) ? { platform: str(values.platform) } : {},
1628
+ ...str(values.from) ? { packFrom: resolve(str(values.from)) } : {},
1629
+ ...owner ? { owner } : {},
1630
+ ...values["openspec-store"] === true ? { openspecStore: true } : {},
1631
+ json
1632
+ }, io);
1633
+ return code;
1634
+ }
1635
+ if (group === "adopt")
1636
+ return adoptCommand(resolve(command ?? "."), {
1637
+ json,
1638
+ ...str(values.platform) ? { platform: str(values.platform) } : {},
1639
+ ...str(values.name) ? { name: str(values.name) } : {}
1640
+ }, io);
1641
+ if (group === "unadopt")
1642
+ return unadoptCommand(resolve(command ?? "."), io);
1643
+ if (group === "repos" && command === "discover")
1644
+ return reposDiscoverCommand(root, {
1645
+ ...arg ? { from: resolve(arg) } : {},
1646
+ ...str(values.org) ? { org: str(values.org) } : {},
1647
+ ...str(values.platform) ? { platform: str(values.platform) } : {},
1648
+ dryRun: values["dry-run"] === true,
1649
+ json
1650
+ }, io);
1651
+ if (group === "absorb") {
1652
+ if (str(values.refresh))
1653
+ return absorbRefreshCommand(root, str(values.refresh), { json }, io);
1654
+ if (command === "accept")
1655
+ return absorbAcceptCommand(root, arg ?? "", { replace: values.replace === true, dryRun: values["dry-run"] === true, json }, io);
1656
+ if (!command) {
1657
+ io.err("absorb needs a git URL or a folder, for example: atticus absorb ../payments-metarepo --id payments");
1658
+ return 2;
1659
+ }
1660
+ return absorbCommand(root, command, {
1661
+ ...str(values.id) ? { id: str(values.id) } : {},
1662
+ ...str(values.mode) ? { mode: str(values.mode) } : {},
1663
+ ...str(values.ref) ? { ref: str(values.ref) } : {},
1664
+ json,
1665
+ dryRun: values["dry-run"] === true
1666
+ }, io);
1667
+ }
1668
+ const approver = values.approve === true ? who() : void 0;
1669
+ const dryRun = values["dry-run"] === true;
1670
+ if (group === "plan") {
1671
+ if (!arg) {
1672
+ io.err(`plan ${command ?? ""} needs a change id, for example: atticus plan stories add-transfer-limit`.replace(" ", " "));
1673
+ return 2;
1674
+ }
1675
+ if (command === "stories")
1676
+ return planStories(root, arg, {
1677
+ force: values.force === true,
1678
+ draft: values.draft === true,
1679
+ ...str(values.resume) ? { resume: str(values.resume) } : {},
1680
+ ...str(values.mode) ? { mode: str(values.mode) } : {},
1681
+ json
1682
+ }, io);
1683
+ if (command === "snow")
1684
+ return snowDraft(root, arg, { force: values.force === true, json }, io);
1685
+ if (command === "bar")
1686
+ return storyBarCommand(root, arg, { ...str(values.eval) ? { eval: str(values.eval) } : {}, json }, io);
1687
+ if (command === "submit")
1688
+ return snowSubmit(root, arg, { ...approver ? { approve: approver } : {}, dryRun, json }, io);
1689
+ }
1690
+ if (group === "ado" && command === "sync") {
1691
+ if (!arg) {
1692
+ io.err("ado sync needs a change id");
1693
+ return 2;
1694
+ }
1695
+ return adoSync(root, arg, {
1696
+ ...approver ? { approve: approver } : {},
1697
+ dryRun,
1698
+ ...str(values.epic) ? { epic: str(values.epic) } : {},
1699
+ json
1700
+ }, io);
1701
+ }
1702
+ if (group === "templates" && command === "draft")
1703
+ return templatesDraft(root, {
1704
+ ...str(values.mode) ? { mode: str(values.mode) } : {},
1705
+ json,
1706
+ noAi: values["no-ai"] === true
1707
+ }, io);
1708
+ if (group === "executors" && command === "check")
1709
+ return executorsCheck(root, { json }, io);
1710
+ if (group === "todo") {
1711
+ if (!command || command === "list")
1712
+ return todoList(root, {
1713
+ json,
1714
+ ...str(values.change) ? { change: str(values.change) } : {},
1715
+ all: values.all === true
1716
+ }, io);
1717
+ if (!arg) {
1718
+ io.err(`todo ${command} needs a step id; see atticus todo`);
1719
+ return 2;
1720
+ }
1721
+ if (command === "show")
1722
+ return todoShow(root, arg, { ...str(values.export) ? { export: str(values.export) } : {} }, io);
1723
+ if (command === "done") {
1724
+ const results = Array.isArray(values.result) ? values.result : [];
1725
+ return todoDone(root, arg, {
1726
+ result: results,
1727
+ by: who(),
1728
+ skip: values.skip === true,
1729
+ ...str(values.note) ? { note: str(values.note) } : {}
1730
+ }, io);
1731
+ }
1732
+ if (command === "run")
1733
+ return todoRun(root, arg, {
1734
+ ...str(values.with) ? { with: str(values.with) } : {},
1735
+ ...approver ? { approve: approver } : {},
1736
+ ...str(values.inputs) ? { inputs: str(values.inputs) } : {},
1737
+ fillOnly: values["fill-only"] === true
1738
+ }, io);
1739
+ }
1740
+ if (group === "task" && command === "context")
1741
+ return (await import("./chunk-NE2W3OO7.js")).taskContextCli(root, arg, positionals[3], { json, markdown: values.markdown === true }, io);
1742
+ if (group === "change" && command === "attach")
1743
+ return (await import("./chunk-NE2W3OO7.js")).changeAttachCli(root, arg, positionals.slice(3), {
1744
+ by: who(),
1745
+ json,
1746
+ ...typeof values.replaces === "string" && values.replaces.trim() ? { replaces: values.replaces.trim() } : {},
1747
+ ...typeof values.promote === "string" && values.promote.trim() ? { promote: values.promote.trim() } : {},
1748
+ ...typeof values.like === "string" && values.like.trim() ? { like: values.like.trim() } : {},
1749
+ ...typeof values.prototype === "string" && values.prototype.trim() ? { prototype: values.prototype.trim() } : {}
1750
+ }, io);
1751
+ if (group === "task" && command === "run")
1752
+ return taskRun(root, arg, positionals[3], {
1753
+ ...str(values.level) ? { level: str(values.level) } : {},
1754
+ ...str(values.mode) ? { mode: str(values.mode) } : {},
1755
+ by: who(),
1756
+ approve: values.approve === true,
1757
+ json
1758
+ }, io);
1759
+ if (group === "spec" && command === "hand-down")
1760
+ return specHandDown(root, arg, positionals[3], { force: values.force === true, json }, io);
1761
+ if (group === "spec" && command === "hand-up")
1762
+ return specHandUp(root, arg, positionals[3], {
1763
+ by: who(),
1764
+ ...num(values.pr) ? { pr: num(values.pr) } : {},
1765
+ ...str(values["pr-url"]) ? { prUrl: str(values["pr-url"]) } : {},
1766
+ json
1767
+ }, io);
1768
+ if (group === "drift")
1769
+ return driftCommand(root, command, { json }, io);
1770
+ if (group === "assistant-files" && existsSync(join(root, ".atticus", "adopted.yaml")))
1771
+ return zeroInstallCommand(root, { check: values.check === true, force: values.force === true }, io);
1772
+ if (group === "assistant-files")
1773
+ return assistantFiles(root, {
1774
+ ...str(values.repo) ? { repo: str(values.repo) } : {},
1775
+ ...str(values.change) ? { change: str(values.change) } : {},
1776
+ force: values.force === true,
1777
+ check: values.check === true,
1778
+ json
1779
+ }, io);
1780
+ if (group === "catalog" && command === "migrate")
1781
+ return catalogMigrate(root, io, { dryRun: values["dry-run"] === true });
1782
+ if (group === "feature") {
1783
+ const rest = positionals.slice(3);
1784
+ const writes = ["name", "tag", "merge", "split", "link"].includes(command ?? "");
1785
+ const by = writes ? who() : void 0;
1786
+ const firstOwner = Array.isArray(values.owner) ? values.owner[0] : str(values.owner);
1787
+ if (command === "list")
1788
+ return featureList(root, { json }, io);
1789
+ if (command === "suggest-links")
1790
+ return featureSuggestLinks(root, { json }, io);
1791
+ if (command === "suggest-names") {
1792
+ try {
1793
+ const { runtime } = await runtimeForCli(root, {
1794
+ ...str(values.mode) ? { mode: str(values.mode) } : {}
1795
+ });
1796
+ return await featureSuggestNames(root, { runtime, json }, io);
1797
+ } catch (e) {
1798
+ if (e instanceof (await loadAi()).RuntimeConfigError) {
1799
+ io.err(e.message);
1800
+ return 2;
1801
+ }
1802
+ throw e;
1803
+ }
1804
+ }
1805
+ if (!arg) {
1806
+ io.err(`feature ${command ?? ""} needs a feature id, for example: atticus feature show feature.transfers`);
1807
+ return 2;
1808
+ }
1809
+ if (command === "show")
1810
+ return featureShow(root, arg, { json }, io);
1811
+ if (command === "spec")
1812
+ return featureSpec(root, arg, io);
1813
+ if (command === "name") {
1814
+ if (!rest[0]) {
1815
+ io.err('feature name needs a name, for example: atticus feature name feature.transfers "Transfer money"');
1816
+ return 2;
1817
+ }
1818
+ return featureName(root, arg, rest.join(" "), {
1819
+ ...by ? { by } : {},
1820
+ ...str(values.description) ? { description: str(values.description) } : {},
1821
+ ...firstOwner ? { owner: firstOwner } : {}
1822
+ }, io);
1823
+ }
1824
+ if (command === "tag")
1825
+ return featureTag(root, arg, rest, { ...by ? { by } : {} }, io);
1826
+ if (command === "merge")
1827
+ return featureMerge(root, arg, rest, { ...by ? { by } : {} }, io);
1828
+ if (command === "split")
1829
+ return featureSplit(root, arg, rest, {
1830
+ ...by ? { by } : {},
1831
+ ...str(values.name) ? { name: str(values.name) } : {},
1832
+ ...str(values.into) ? { into: str(values.into) } : {}
1833
+ }, io);
1834
+ if (command === "link") {
1835
+ if (!rest[0]) {
1836
+ io.err("feature link needs a reference, for example: atticus feature link feature.transfers ado:1234");
1837
+ return 2;
1838
+ }
1839
+ return featureLink(root, arg, rest[0], { ...by ? { by } : {}, ...str(values.title) ? { title: str(values.title) } : {} }, io);
1840
+ }
1841
+ }
1842
+ if (group === "critic" && command === "stats")
1843
+ return criticStats(root, { json }, io);
1844
+ if (group === "critic") {
1845
+ if (!command) {
1846
+ io.err("critic needs a change id, for example: atticus critic add-transfer-limit --gate design");
1847
+ return 2;
1848
+ }
1849
+ return critic(root, command, {
1850
+ ...str(values.gate) ? { gate: str(values.gate) } : {},
1851
+ ...str(values.lens) ? { lens: str(values.lens) } : {},
1852
+ ...str(values.mode) ? { mode: str(values.mode) } : {},
1853
+ ...values.resume ? { resume: true } : {},
1854
+ json
1855
+ }, io);
1856
+ }
1857
+ if (group === "findings") {
1858
+ if (!command) {
1859
+ io.err("findings needs a change id");
1860
+ return 2;
1861
+ }
1862
+ return findings(root, command, { json }, io);
1863
+ }
1864
+ if (group === "finding") {
1865
+ const [findingId, action] = positionals.slice(2);
1866
+ if (!command || !findingId || !action) {
1867
+ io.err('finding needs a change, a finding id and an action, for example: atticus finding add-transfer-limit f-1 not-relevant --reason "..."');
1868
+ return 2;
1869
+ }
1870
+ const session = given ? void 0 : (await import("./chunk-5GDRCDQB.js")).assistantSession(process.env);
1871
+ if (session)
1872
+ io.err(`Recorded as ${session.by}: ${session.because}.`);
1873
+ return findingAction(root, command, findingId, action, {
1874
+ by: session?.by ?? who(),
1875
+ ...str(values.reason) ? { reason: str(values.reason) } : {},
1876
+ ...str(values["asked-of"]) ? { askedOf: str(values["asked-of"]) } : {},
1877
+ ...str(values.edit) ? { edit: str(values.edit) } : {},
1878
+ ...str(values.gate) ? { gate: str(values.gate) } : {}
1879
+ }, io);
1880
+ }
1881
+ if (group === "change") {
1882
+ const list = (v) => Array.isArray(v) ? v : typeof v === "string" ? [v] : void 0;
1883
+ const repo = str(values.repo);
1884
+ if (command === "new")
1885
+ return changeNew(root, {
1886
+ ...arg ? { title: arg } : {},
1887
+ ...str(values.type) ? { type: str(values.type) } : {},
1888
+ ...str(values.template) ? { template: str(values.template) } : {},
1889
+ ...str(values.id) ? { id: str(values.id) } : {},
1890
+ by: who(),
1891
+ ...list(values.owner) ? { owners: list(values.owner) } : {},
1892
+ ...list(values.system) ? { systems: list(values.system) } : {},
1893
+ ...str(values.like) ? { like: str(values.like) } : {},
1894
+ ...str(values.impact) ? { impact: str(values.impact) } : {}
1895
+ }, io);
1896
+ if (command === "similar") {
1897
+ const { changeSimilarCli } = await import("./chunk-HVUPKCGJ.js");
1898
+ const limit = Number(str(values.limit) ?? 5);
1899
+ return changeSimilarCli(root, arg, {
1900
+ json,
1901
+ ...Number.isFinite(limit) && limit > 0 ? { limit } : {},
1902
+ ...str(values.change) ? { change: str(values.change) } : {}
1903
+ }, io);
1904
+ }
1905
+ if (command === "list")
1906
+ return changeList(root, { json }, io);
1907
+ if (command === "export") {
1908
+ const { changeExportCommand } = await import("./chunk-4WBVUHXN.js");
1909
+ const named = positionals[3];
1910
+ const fmt = str(values.format) ?? (named === "ado" || named === "jira" ? named : void 0);
1911
+ return changeExportCommand(root, arg, {
1912
+ ...fmt ? { format: fmt } : {},
1913
+ ...str(values.out) ? { out: str(values.out) } : {},
1914
+ ...str(values.area) ? { areaPath: str(values.area) } : {},
1915
+ ...str(values.iteration) ? { iterationPath: str(values.iteration) } : {}
1916
+ }, io);
1917
+ }
1918
+ if (command === "conflicts")
1919
+ return changeConflicts(root, { json }, io);
1920
+ if (command === "conform") {
1921
+ if (!arg) {
1922
+ io.err("change conform needs a change id, for example: atticus change conform add-transfer-limit");
1923
+ return 2;
1924
+ }
1925
+ const { changeConformCommand } = await import("./chunk-7ZUIMTOU.js");
1926
+ return changeConformCommand(root, arg, {
1927
+ ...str(values.repo) ? { repo: str(values.repo) } : {},
1928
+ ...str(values.ref) ? { ref: str(values.ref) } : {},
1929
+ ...str(values.task) ? { task: str(values.task) } : {},
1930
+ latest: values.latest === true,
1931
+ json
1932
+ }, io);
1933
+ }
1934
+ if (command === "estimate") {
1935
+ if (!arg) {
1936
+ io.err("change estimate needs a change id, for example: atticus change estimate add-transfer-limit");
1937
+ return 2;
1938
+ }
1939
+ const { changeEstimateCommand } = await import("./chunk-NN2ZQEB4.js");
1940
+ return changeEstimateCommand(root, arg, { json }, io);
1941
+ }
1942
+ if (command === "map") {
1943
+ if (!arg) {
1944
+ io.err("change map needs a change id, for example: atticus change map add-transfer-limit");
1945
+ return 2;
1946
+ }
1947
+ const { changeMapCommand } = await import("./chunk-42EVSKME.js");
1948
+ return changeMapCommand(root, arg, { ...str(values.format) ? { format: str(values.format) } : {}, json }, io);
1949
+ }
1950
+ if (command === "learn")
1951
+ return changeLearn(root, { json }, io);
1952
+ if (command === "draft")
1953
+ return changeDraft(root, arg, {
1954
+ ...str(values.attempts) ? { attempts: Number(str(values.attempts)) } : {},
1955
+ force: values.force === true,
1956
+ ...str(values.resume) ? { resume: str(values.resume) } : {},
1957
+ ...str(values.mode) ? { mode: str(values.mode) } : {},
1958
+ json
1959
+ }, io);
1960
+ if (!arg) {
1961
+ io.err(`change ${command ?? ""} needs a change id, for example: atticus change status add-transfer-limit`);
1962
+ return 2;
1963
+ }
1964
+ if (command === "status")
1965
+ return changeStatus(root, arg, { json }, io);
1966
+ if (command === "knowledge") {
1967
+ const { changeKnowledge } = await import("./chunk-A3GY6SOA.js");
1968
+ return changeKnowledge(root, arg, {
1969
+ ...str(values.confirm) ? { confirm: str(values.confirm) } : {},
1970
+ ...str(values.exclude) ? { exclude: str(values.exclude) } : {},
1971
+ json
1972
+ }, io);
1973
+ }
1974
+ const approve = values.approve === true;
1975
+ if (command === "handoff")
1976
+ return changeHandoff(root, arg, {
1977
+ by: who(),
1978
+ approve,
1979
+ ...repo ? { repo } : {},
1980
+ ...str(values.base) ? { base: str(values.base) } : {}
1981
+ }, io);
1982
+ if (command === "sync")
1983
+ return changeSync(root, arg, { ...approve ? { by: who() } : {}, approve, ...repo ? { repo } : {} }, io);
1984
+ if (command === "return")
1985
+ return changeReturn(root, arg, {
1986
+ by: who(),
1987
+ approve,
1988
+ ...str(values.reason) ? { reason: str(values.reason) } : {},
1989
+ ...repo ? { repo } : {}
1990
+ }, io);
1991
+ if (command === "archive" && await ciArchiveGate(root, arg, { json: false }, io) !== 0)
1992
+ return 1;
1993
+ if (command === "archive")
1994
+ return changeArchive(root, arg, { by: who(), ...values["no-rescan"] === true ? { rescan: false } : {} }, io);
1995
+ }
1996
+ if (group === "intake" && command === "add")
1997
+ return intakeAdd(root, positionals.slice(2).map((f) => resolve(f)), io);
1998
+ if (group === "intake" && command === "list")
1999
+ return intakeList(root, io, { json });
2000
+ if (group === "intake" && command === "impact") {
2001
+ const { intakeImpact } = await import("./chunk-MGYZM27B.js");
2002
+ return intakeImpact(root, positionals[2] ?? "", { json }, io);
2003
+ }
2004
+ if (group === "triage" && !command)
2005
+ return triageList(root, io, { json });
2006
+ if (group === "triage" && command === "decide") {
2007
+ const [item, option] = positionals.slice(2);
2008
+ if (!item || !option || !num(option)) {
2009
+ io.err("triage decide needs an item id and an option number, for example: atticus triage decide alias-needed.ledger-platform 1");
2010
+ return 2;
2011
+ }
2012
+ return triageDecide(root, item, num(option), {
2013
+ by: who(),
2014
+ ...str(values.reason) ? { reason: str(values.reason) } : {}
2015
+ }, io);
2016
+ }
2017
+ if (group === "diagram" && command === "render") {
2018
+ if (!arg) {
2019
+ io.err("diagram render needs a view or a file, for example: atticus diagram render context");
2020
+ return 2;
2021
+ }
2022
+ return diagramRender(root, {
2023
+ view: arg,
2024
+ ...str(values.focus) ? { focus: str(values.focus) } : {},
2025
+ ...str(values.format) ? { format: str(values.format) } : {},
2026
+ ...str(values.out) ? { out: str(values.out) } : {}
2027
+ }, io);
2028
+ }
2029
+ if (group === "diagram" && command === "library") {
2030
+ if (!arg) {
2031
+ io.err("diagram library needs a file to write, for example: atticus diagram library atticus.xml");
2032
+ return 2;
2033
+ }
2034
+ return diagramLibrary(arg, io);
2035
+ }
2036
+ if (group === "stub" && command === "serve") {
2037
+ if (!arg) {
2038
+ io.err("stub serve needs a spec file or a catalog id, for example: atticus stub serve api/openapi.yaml");
2039
+ return 2;
2040
+ }
2041
+ return stubServe(root, arg, {
2042
+ ...num(values.port) ? { port: num(values.port) } : {},
2043
+ ...str(values.host) ? { host: str(values.host) } : {},
2044
+ catalog: values["from-catalog"] === true
2045
+ }, io);
2046
+ }
2047
+ if (group === "stub" && command === "check") {
2048
+ if (!arg) {
2049
+ io.err("stub check needs a spec file");
2050
+ return 2;
2051
+ }
2052
+ return stubCheck(arg, io);
2053
+ }
2054
+ if (group === "onboard") {
2055
+ const list = (v) => (str(v) ?? "").split(",").map((x) => x.trim()).filter(Boolean);
2056
+ const fwOptions = () => ({
2057
+ ...str(values.from) ? { from: str(values.from) } : {},
2058
+ ...list(values.users).length ? { users: list(values.users) } : {},
2059
+ ...list(values.package).length ? { packages: list(values.package) } : {}
2060
+ });
2061
+ if ((command === "check" || command === "accept") && arg === "framework") {
2062
+ const name = positionals[3];
2063
+ if (!name) {
2064
+ io.err(`onboard ${command} framework needs the model's name: atticus onboard ${command} framework <name>`);
2065
+ return 2;
2066
+ }
2067
+ return command === "check" ? onboardFrameworkCheck(root, name, fwOptions(), io) : onboardFrameworkAccept(root, name, { replace: values.replace === true }, io);
2068
+ }
2069
+ if (command === "framework") {
2070
+ if (!arg) {
2071
+ io.err("onboard framework needs a name and the framework's source: atticus onboard framework <name> --from <source|jar|tgz> [--users <repo>,...]");
2072
+ return 2;
2073
+ }
2074
+ const attempts2 = Number(str(values.attempts) ?? "3");
2075
+ if (!Number.isInteger(attempts2) || attempts2 < 1 || attempts2 > 10) {
2076
+ io.err("--attempts is a whole number from 1 to 10.");
2077
+ return 2;
2078
+ }
2079
+ let runtime;
2080
+ if (values["no-ai"] !== true)
2081
+ try {
2082
+ runtime = (await runtimeForCli(root, { ...str(values.mode) ? { mode: str(values.mode) } : {} })).runtime;
2083
+ } catch (e) {
2084
+ if (e instanceof (await loadAi()).AiOffError)
2085
+ io.out("AI is off here: the learned model alone is checked.");
2086
+ else if (e instanceof (await loadAi()).RuntimeConfigError) {
2087
+ io.err(e.message);
2088
+ return 2;
2089
+ } else
2090
+ throw e;
2091
+ }
2092
+ return onboardFramework(root, arg, { ...fwOptions(), attempts: attempts2 }, { ...runtime ? { runtime } : {} }, io);
2093
+ }
2094
+ if (command === "check") {
2095
+ const repo = str(values.repo);
2096
+ if (!arg || !repo) {
2097
+ io.err("onboard check needs a proposal and its repo: atticus onboard check <name> --repo <repo>");
2098
+ return 2;
2099
+ }
2100
+ return onboardCheck(root, arg, repo, io);
2101
+ }
2102
+ if (command === "accept") {
2103
+ if (!arg) {
2104
+ io.err("onboard accept needs the proposal's name: atticus onboard accept <name>");
2105
+ return 2;
2106
+ }
2107
+ return onboardAccept(root, arg, { replace: values.replace === true }, io);
2108
+ }
2109
+ if (command === "eval") {
2110
+ if (!arg) {
2111
+ io.err("onboard eval needs a folder of cases: atticus onboard eval fixtures/onboard-eval --mode model");
2112
+ return 2;
2113
+ }
2114
+ try {
2115
+ const { runtime } = await runtimeForCli(root, {
2116
+ ...str(values.mode) ? { mode: str(values.mode) } : {}
2117
+ });
2118
+ return await onboardEval(root, arg, { json }, { runtime }, io);
2119
+ } catch (e) {
2120
+ if (e instanceof (await loadAi()).RuntimeConfigError) {
2121
+ io.err(e.message);
2122
+ return 2;
2123
+ }
2124
+ throw e;
2125
+ }
2126
+ }
2127
+ if (!command) {
2128
+ io.err("onboard needs a repo: atticus onboard <repo-id|folder> [--name <dialect>] [--attempts 3] [--mode model]");
2129
+ return 2;
2130
+ }
2131
+ const attempts = Number(str(values.attempts) ?? "3");
2132
+ if (!Number.isInteger(attempts) || attempts < 1 || attempts > 10) {
2133
+ io.err("--attempts is a whole number from 1 to 10.");
2134
+ return 2;
2135
+ }
2136
+ try {
2137
+ const { runtime } = await runtimeForCli(root, {
2138
+ ...str(values.mode) ? { mode: str(values.mode) } : {}
2139
+ });
2140
+ return await onboardDraft(root, command, { ...str(values.name) ? { name: str(values.name) } : {}, attempts }, { runtime }, io);
2141
+ } catch (e) {
2142
+ if (e instanceof (await loadAi()).RuntimeConfigError) {
2143
+ io.err(e.message);
2144
+ return 2;
2145
+ }
2146
+ throw e;
2147
+ }
2148
+ }
2149
+ if (group === "frameworks" && command === "check")
2150
+ return frameworksCheck(root, arg, io);
2151
+ if (group === "frameworks" && command === "kit")
2152
+ return frameworksKit(resolve(arg ?? "frameworks-kit"), io);
2153
+ if (group === "frameworks" && command === "survey") {
2154
+ const pkg = str(values.package);
2155
+ return frameworksSurvey(root, {
2156
+ prefixes: pkg ? pkg.split(",").map((x) => x.trim()).filter(Boolean) : [],
2157
+ json: values.json === true
2158
+ }, io);
2159
+ }
2160
+ if (group === "frameworks" && command === "discover") {
2161
+ const strings = (v) => (Array.isArray(v) ? v : []).filter((x) => typeof x === "string");
2162
+ const groups = strings(values.group).flatMap((g) => g.split(",")).map((g) => g.trim()).filter(Boolean);
2163
+ return frameworksDiscover(root, {
2164
+ groups,
2165
+ jars: strings(values.jars),
2166
+ learn: values.learn === true,
2167
+ json: values.json === true
2168
+ }, io);
2169
+ }
2170
+ if (group === "frameworks") {
2171
+ const from = str(values.from);
2172
+ if (command !== "learn" || !arg || !from) {
2173
+ io.err("frameworks learn needs a name and the starter's source, for example: atticus frameworks learn tide-platform --from workspace/tide-platform");
2174
+ return 2;
2175
+ }
2176
+ const pkg = str(values.package);
2177
+ return frameworksLearn(root, arg, from, {
2178
+ ...pkg ? { packages: pkg.split(",").map((x) => x.trim()) } : {},
2179
+ dryRun: values["dry-run"] === true
2180
+ }, io);
2181
+ }
2182
+ if (group === "plugin" && (command === "test" || command === "pin" || command === "add")) {
2183
+ if (!arg) {
2184
+ io.err(`plugin ${command} needs a plugin id, for example: atticus plugin ${command} ${command === "add" ? "vertex" : "forge-routes"}`);
2185
+ return 2;
2186
+ }
2187
+ return command === "test" ? pluginTest(root, arg, io) : command === "pin" ? pluginPin(root, arg, io) : pluginAdd(root, arg, io);
2188
+ }
2189
+ if (group === "dialect") {
2190
+ const rest = positionals.slice(3);
2191
+ if (command === "kit")
2192
+ return dialectKit(resolve(arg ?? "dialect-kit"), io);
2193
+ if (command === "tree") {
2194
+ if (!arg) {
2195
+ io.err("dialect tree needs a file: atticus dialect tree src/A.java [--language java]");
2196
+ return 2;
2197
+ }
2198
+ return dialectTree(arg, { ...str(values.language) ? { language: str(values.language) } : {} }, io);
2199
+ }
2200
+ if (!arg) {
2201
+ io.err(`dialect ${command ?? ""} needs a dialect name, for example: atticus dialect test forge`.replace(" ", " "));
2202
+ return 2;
2203
+ }
2204
+ if (command === "new") {
2205
+ const repos = [...str(values.from)?.split(",") ?? [], ...rest].map((r) => r.trim()).filter(Boolean);
2206
+ if (repos.length === 0) {
2207
+ io.err("dialect new needs sample repos, for example: atticus dialect new forge --from workspace/forge-ledger");
2208
+ return 2;
2209
+ }
2210
+ return dialectNew(root, arg, repos, io);
2211
+ }
2212
+ if (command === "test")
2213
+ return dialectTest(root, arg, io);
2214
+ if (command === "run") {
2215
+ if (!rest[0]) {
2216
+ io.err("dialect run needs a repo folder, for example: atticus dialect run forge workspace/forge-ledger");
2217
+ return 2;
2218
+ }
2219
+ return dialectRun(root, arg, rest[0], { json }, io);
2220
+ }
2221
+ if (command === "grade") {
2222
+ if (!rest[0]) {
2223
+ io.err("dialect grade needs a dialect file and an eval folder");
2224
+ return 2;
2225
+ }
2226
+ return dialectGrade(arg, rest[0], io);
2227
+ }
2228
+ }
2229
+ if (group === "sources" && command === "tag" || group === "knowledge" || group === "bench" && command === "knowledge") {
2230
+ const handled = await knowledgeCli(root, positionals, values, io, who);
2231
+ if (handled !== void 0)
2232
+ return handled;
2233
+ }
2234
+ if (group === "sources" && command === "add") {
2235
+ const [kind, location] = positionals.slice(2);
2236
+ if (!kind || !location) {
2237
+ io.err("sources add needs a type and a location, for example: atticus sources add markdown-folder ../wiki");
2238
+ return 2;
2239
+ }
2240
+ const listOf = (v) => typeof v === "string" ? v.split(",").map((x) => x.trim()).filter(Boolean) : void 0;
2241
+ return sourcesAdd(root, kind, location, io, {
2242
+ ...str(values.id) ? { id: str(values.id) } : {},
2243
+ ...str(values.path) ? { path: str(values.path) } : {},
2244
+ ...str(values.ref) ? { ref: str(values.ref) } : {},
2245
+ ...values.submodule === true ? { submodule: true } : {},
2246
+ ...listOf(values.kind) ? { kinds: listOf(values.kind) } : {},
2247
+ ...listOf(values.framework) ? { frameworks: listOf(values.framework) } : {},
2248
+ ...Array.isArray(values.owner) && values.owner[0] ? { owner: String(values.owner[0]) } : {},
2249
+ ...values.save === true ? { save: true } : {}
2250
+ });
2251
+ }
2252
+ if (group === "sources" && command === "refresh")
2253
+ return sourcesRefreshCommand(root, { json }, io);
2254
+ if (group === "sources" && command === "estimate") {
2255
+ const bt = str(values["batch-tokens"]);
2256
+ return (await import("./chunk-DHPACDG7.js")).sourcesEstimate(root, {
2257
+ ...str(values.source) ? { source: str(values.source) } : {},
2258
+ ...bt && Number(bt) > 0 ? { batchTokens: Number(bt) } : {},
2259
+ ...values.full === true ? { full: true } : {},
2260
+ json: values.json === true
2261
+ }, io);
2262
+ }
2263
+ if (group === "standards")
2264
+ return (await import("./chunk-DHPACDG7.js")).standardsCli(root, command, values, io);
2265
+ if (group === "sources" && command === "sync")
2266
+ return sourcesSync(root, io, {
2267
+ json: values.json === true,
2268
+ ...str(values.source) ? { source: str(values.source) } : {}
2269
+ });
2270
+ if (group === "patterns" && command === "scan")
2271
+ return patternsScan(root, io, { json: values.json === true });
2272
+ if (group === "coverage")
2273
+ return coverageCommand(root, io, { json: values.json === true });
2274
+ if (group === "domain" && command === "profile")
2275
+ return domainProfileCommand(root, arg, str(values.out) ? { out: str(values.out) } : {}, io);
2276
+ if (group === "questions" && command)
2277
+ return questionsFiles(root, argv, io);
2278
+ if (group === "questions")
2279
+ return questionsCommand(root, io, { json: values.json === true });
2280
+ if (group === "reconcile")
2281
+ return reconcileCommand(root, positionals.slice(1), { json: values.json === true }, io);
2282
+ if (group === "orgpack" && (command === "draft" || command === "accept"))
2283
+ return (await import("./chunk-XPCM366L.js")).orgPackDraftCli(root, command, arg, values, io);
2284
+ if (group === "orgpack" && command === "owner")
2285
+ return (await import("./chunk-WY6PP6AA.js")).orgPackOwnerCli(root, arg, io);
2286
+ if (group === "orgpack" && command === "validate")
2287
+ return orgPackValidate(arg ? resolve(arg) : join((await import("./chunk-CAQZUNOH.js")).orgPackDirOf(root)), io);
2288
+ if (group === "stage" && command === "check")
2289
+ return (await import("./chunk-3USYZGRF.js")).stageCheck(root, arg, positionals[3], positionals[4], io);
2290
+ if (group === "handoff" && command === "done") {
2291
+ if (!arg) {
2292
+ io.err("handoff done needs the run id from the prompt, for example: atticus handoff done run-20261018060000-0001");
2293
+ return 2;
2294
+ }
2295
+ if (await (await import("./chunk-T6XQL73F.js")).isTaskRun(root, arg))
2296
+ return taskHandoff(root, arg, {
2297
+ by: who(),
2298
+ approve: values.approve === true,
2299
+ json
2300
+ }, io);
2301
+ return handoffDone(root, arg, io, str(values.model) ? { model: str(values.model) } : {});
2302
+ }
2303
+ if (group === "openspec" && command === "setup")
2304
+ return openspecSetup(root, io);
2305
+ if (group === "openspec" && command === "check")
2306
+ return openspecCheck(root, io);
2307
+ if (group === "openspec") {
2308
+ const { openspecRun } = await import("./chunk-6BVONWJ7.js");
2309
+ return openspecRun(root, openspecArgsOf(argv), io);
2310
+ }
2311
+ if (group === "workspace" && command === "sync")
2312
+ return workspaceSync(root, repoIds, io);
2313
+ if (group === "workspace" && (command === "open" || command === "prune")) {
2314
+ if (!arg) {
2315
+ io.err(`workspace ${command} needs a change id, for example: atticus workspace ${command} add-transfer-limit`);
2316
+ return 2;
2317
+ }
2318
+ if (command === "open")
2319
+ return workspaceOpen(root, arg, repoIds, io);
2320
+ return workspacePrune(root, arg, { all: values.all === true, force: values.force === true }, io);
2321
+ }
2322
+ const { commandCatalog } = await import("./chunk-YMZ3TNYB.js");
2323
+ const { nearestCommand } = await import("./chunk-4SKZDI62.js");
2324
+ const near = nearestCommand(positionals, commandCatalog(HELP).map((c) => c.id));
2325
+ io.err(`Unknown command: ${positionals.join(" ")}.${near ? ` Did you mean atticus ${near}?` : ""}`);
2326
+ io.err("atticus help lists the main commands, atticus legacy the rest; atticus help <command> explains one.");
2327
+ return 2;
2328
+ }
2329
+ var QUESTION_FLAGS = ["state", "option", "text", "scope", "type"];
2330
+ async function checkFlags(argv, positionals, io) {
2331
+ const { unknownFlags, unknownFlagMessages } = await import("./chunk-4SKZDI62.js");
2332
+ const quick = /* @__PURE__ */ new Set([...Object.keys(OPTIONS), ...QUESTION_FLAGS, "handoff"]);
2333
+ if (!unknownFlags(argv, quick).length)
2334
+ return void 0;
2335
+ const { commandCatalog } = await import("./chunk-YMZ3TNYB.js");
2336
+ const catalog = commandCatalog(HELP);
2337
+ const known = /* @__PURE__ */ new Set([
2338
+ ...quick,
2339
+ ...catalog.flatMap((c) => c.flags.map((f) => f.name.replace(/^--/, "")))
2340
+ ]);
2341
+ const unknown = unknownFlags(argv, known);
2342
+ if (!unknown.length)
2343
+ return void 0;
2344
+ for (const m of unknownFlagMessages(unknown, known))
2345
+ io.err(m);
2346
+ const { commandOf } = await import("./chunk-7EOBHUMC.js");
2347
+ const id = commandOf(positionals, catalog.map((c) => c.id));
2348
+ io.err(id ? `atticus help ${id} lists what it takes. Nothing was run.` : "atticus help --all lists every command and what it takes. Nothing was run.");
2349
+ return 2;
2350
+ }
2351
+ export {
2352
+ HELP_TEXT,
2353
+ VERSION,
2354
+ main,
2355
+ setUpAi
2356
+ };