@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.
- package/LICENSE +177 -0
- package/README.md +17 -2
- package/THIRD-PARTY-LICENSES.txt +2607 -0
- package/dist/bin.js +47 -0
- package/dist/chunk-23W7VWKR.js +2609 -0
- package/dist/chunk-27NKUS3X.js +4330 -0
- package/dist/chunk-2ANOROX3.js +2522 -0
- package/dist/chunk-2BF2EYJV.js +174 -0
- package/dist/chunk-2BFCZ3RK.js +315 -0
- package/dist/chunk-2DIQQJCB.js +378 -0
- package/dist/chunk-2RMYG36Q.js +1227 -0
- package/dist/chunk-2VHF7OXM.js +55 -0
- package/dist/chunk-3ALD2W2A.js +95 -0
- package/dist/chunk-3C7EYRFZ.js +41 -0
- package/dist/chunk-3G4YI4ZU.js +16 -0
- package/dist/chunk-3HI6Z55Y.js +5949 -0
- package/dist/chunk-3USYZGRF.js +324 -0
- package/dist/chunk-42EVSKME.js +37 -0
- package/dist/chunk-4AK7IBVP.js +915 -0
- package/dist/chunk-4BKGMUIK.js +53 -0
- package/dist/chunk-4BN53TG3.js +343 -0
- package/dist/chunk-4NDAAFQT.js +103 -0
- package/dist/chunk-4Q3NN7VF.js +32 -0
- package/dist/chunk-4RS5KZQD.js +25 -0
- package/dist/chunk-4SKZDI62.js +22 -0
- package/dist/chunk-4WBVUHXN.js +69 -0
- package/dist/chunk-5GDRCDQB.js +32 -0
- package/dist/chunk-5GGOLAKC.js +856 -0
- package/dist/chunk-5KLGBXG5.js +48 -0
- package/dist/chunk-5WG5YP4T.js +34 -0
- package/dist/chunk-64EQYWCA.js +180 -0
- package/dist/chunk-652QWTLZ.js +242 -0
- package/dist/chunk-65NYPGRC.js +766 -0
- package/dist/chunk-66YVAGGM.js +46 -0
- package/dist/chunk-6BNC6EQ4.js +41 -0
- package/dist/chunk-6BVONWJ7.js +50 -0
- package/dist/chunk-6D2CQ5II.js +41 -0
- package/dist/chunk-6IU67AEK.js +325 -0
- package/dist/chunk-6J5OKA4Y.js +49 -0
- package/dist/chunk-6JCPI55B.js +92 -0
- package/dist/chunk-6JUBZBMW.js +56 -0
- package/dist/chunk-6M5NK3K3.js +415 -0
- package/dist/chunk-6QSERWXH.js +53 -0
- package/dist/chunk-6TACQN3N.js +41 -0
- package/dist/chunk-76WKMA4J.js +14 -0
- package/dist/chunk-7AVHLZGD.js +45 -0
- package/dist/chunk-7EFILTCI.js +67 -0
- package/dist/chunk-7EKXJZ2Y.js +2902 -0
- package/dist/chunk-7EOBHUMC.js +133 -0
- package/dist/chunk-7FBGJFEE.js +66 -0
- package/dist/chunk-7JUKDRSZ.js +1726 -0
- package/dist/chunk-7SW2QWLU.js +212 -0
- package/dist/chunk-7WD63HU2.js +143 -0
- package/dist/chunk-7ZUIMTOU.js +108 -0
- package/dist/chunk-A3GY6SOA.js +95 -0
- package/dist/chunk-A7UPUQFY.js +2356 -0
- package/dist/chunk-AA6YULYB.js +376 -0
- package/dist/chunk-ABWHYWNI.js +101 -0
- package/dist/chunk-AIOQPLA5.js +540 -0
- package/dist/chunk-AVJDSJ2F.js +18 -0
- package/dist/chunk-B2WLAWNJ.js +374 -0
- package/dist/chunk-BKVWTZ6A.js +211 -0
- package/dist/chunk-BOHJZTEQ.js +1991 -0
- package/dist/chunk-BWZ77RQT.js +25 -0
- package/dist/chunk-C6EKFH7J.js +169 -0
- package/dist/chunk-CAQZUNOH.js +1150 -0
- package/dist/chunk-CEXSU4S6.js +1217 -0
- package/dist/chunk-CKSITVS4.js +16101 -0
- package/dist/chunk-CNUKCS2T.js +2741 -0
- package/dist/chunk-CPA6HPVR.js +3206 -0
- package/dist/chunk-CR3MTH32.js +207 -0
- package/dist/chunk-CSZ4C5N6.js +307 -0
- package/dist/chunk-D3PO4DOZ.js +261 -0
- package/dist/chunk-D46WUV3T.js +33 -0
- package/dist/chunk-DE76JROX.js +80 -0
- package/dist/chunk-DFBCSHVT.js +69 -0
- package/dist/chunk-DHPACDG7.js +104 -0
- package/dist/chunk-DKJA76CJ.js +113 -0
- package/dist/chunk-DPUYDDQG.js +164 -0
- package/dist/chunk-DPZHZQKE.js +285 -0
- package/dist/chunk-E36QOJMD.js +47 -0
- package/dist/chunk-EADP3PEN.js +450 -0
- package/dist/chunk-EBEW3XXQ.js +166 -0
- package/dist/chunk-EDS2L2LD.js +106 -0
- package/dist/chunk-EFHQ3TWP.js +637 -0
- package/dist/chunk-EPTBZ3GP.js +101 -0
- package/dist/chunk-EYWIDJFU.js +130 -0
- package/dist/chunk-F7HYOUFF.js +287 -0
- package/dist/chunk-FHH4I4ZV.js +128 -0
- package/dist/chunk-FITWGOJ2.js +131 -0
- package/dist/chunk-FQXYPF7E.js +147 -0
- package/dist/chunk-G2B4ZQGH.js +240 -0
- package/dist/chunk-GBRFVT63.js +45 -0
- package/dist/chunk-GDLULHTC.js +2919 -0
- package/dist/chunk-GLUX4EEP.js +583 -0
- package/dist/chunk-GQ4N4WKF.js +1142 -0
- package/dist/chunk-GT4I4ZWM.js +38 -0
- package/dist/chunk-HFQCFSJR.js +60 -0
- package/dist/chunk-HITVBIJS.js +1247 -0
- package/dist/chunk-HLJAXMM4.js +233 -0
- package/dist/chunk-HVUPKCGJ.js +162 -0
- package/dist/chunk-I3E7CX4H.js +155 -0
- package/dist/chunk-I4JRCD6M.js +184 -0
- package/dist/chunk-ICY36XCH.js +34 -0
- package/dist/chunk-IHMLFRVV.js +228 -0
- package/dist/chunk-IPKHE5D6.js +1963 -0
- package/dist/chunk-J4K3KVLD.js +131 -0
- package/dist/chunk-JBTK5OP2.js +55 -0
- package/dist/chunk-JCZIKA4C.js +163 -0
- package/dist/chunk-JGZCG5VM.js +189 -0
- package/dist/chunk-JIITQXFB.js +4087 -0
- package/dist/chunk-JMSCMUCA.js +271 -0
- package/dist/chunk-JZU3H6UQ.js +54 -0
- package/dist/chunk-K65BJIMT.js +49 -0
- package/dist/chunk-KEM4SDDP.js +3898 -0
- package/dist/chunk-KQDZXGNR.js +14 -0
- package/dist/chunk-L24C55VN.js +7923 -0
- package/dist/chunk-L6SGQIR3.js +471 -0
- package/dist/chunk-LR3R6Z2A.js +400 -0
- package/dist/chunk-M766ZJ6W.js +119 -0
- package/dist/chunk-MC3H7736.js +19910 -0
- package/dist/chunk-MGYZM27B.js +205 -0
- package/dist/chunk-MMOSZPWJ.js +273 -0
- package/dist/chunk-MVZVGYXH.js +1611 -0
- package/dist/chunk-N7IXEHK3.js +549 -0
- package/dist/chunk-NE2W3OO7.js +230 -0
- package/dist/chunk-NN2ZQEB4.js +38 -0
- package/dist/chunk-NXFPS2LR.js +182 -0
- package/dist/chunk-O3WI5KWW.js +31 -0
- package/dist/chunk-OLQJTJJU.js +76 -0
- package/dist/chunk-ONLS5QA5.js +102 -0
- package/dist/chunk-OT2O76OS.js +1496 -0
- package/dist/chunk-PAMPPUR6.js +4500 -0
- package/dist/chunk-PCOCACY3.js +385 -0
- package/dist/chunk-PCVDV3UZ.js +430 -0
- package/dist/chunk-PRPPGYZG.js +104 -0
- package/dist/chunk-Q4D5X7QB.js +264 -0
- package/dist/chunk-Q5AMFEWD.js +119 -0
- package/dist/chunk-QRAOANID.js +214 -0
- package/dist/chunk-QSXK2RGH.js +688 -0
- package/dist/chunk-QZSX3F7C.js +389 -0
- package/dist/chunk-R6RY4Q5T.js +51 -0
- package/dist/chunk-R6XF6UR3.js +149 -0
- package/dist/chunk-R77KLRB3.js +166 -0
- package/dist/chunk-RRTKKSLQ.js +251 -0
- package/dist/chunk-RTEYOSJY.js +29 -0
- package/dist/chunk-RUVFXE2L.js +666 -0
- package/dist/chunk-RVH5SUW5.js +69 -0
- package/dist/chunk-RZPYKDWS.js +26 -0
- package/dist/chunk-S2A7YC3Q.js +41433 -0
- package/dist/chunk-S3QNRWYR.js +25 -0
- package/dist/chunk-SJRGMG6A.js +174 -0
- package/dist/chunk-SP2I63OO.js +252 -0
- package/dist/chunk-T2UYZSCQ.js +545 -0
- package/dist/chunk-T6AIP7H5.js +3851 -0
- package/dist/chunk-T6XQL73F.js +94 -0
- package/dist/chunk-TANFV3MZ.js +531 -0
- package/dist/chunk-TDD55CJH.js +119 -0
- package/dist/chunk-TV45EUGM.js +51 -0
- package/dist/chunk-TXLH6WHQ.js +2078 -0
- package/dist/chunk-TYAID7B7.js +408 -0
- package/dist/chunk-UBBC2XSG.js +873 -0
- package/dist/chunk-UGLN7QHV.js +27 -0
- package/dist/chunk-UNM6ZOKP.js +878 -0
- package/dist/chunk-V2YTAIQO.js +1075 -0
- package/dist/chunk-VN3DP4LQ.js +43 -0
- package/dist/chunk-VOGCSYOI.js +16 -0
- package/dist/chunk-VYDBJ73M.js +32 -0
- package/dist/chunk-W3BQAZ3Q.js +34 -0
- package/dist/chunk-W5BVQF44.js +36 -0
- package/dist/chunk-WVPJSRRJ.js +52 -0
- package/dist/chunk-WY6PP6AA.js +53 -0
- package/dist/chunk-XAKWMCXI.js +285 -0
- package/dist/chunk-XPCM366L.js +70 -0
- package/dist/chunk-XPTOBS2D.js +48 -0
- package/dist/chunk-XY3P7JW7.js +3479 -0
- package/dist/chunk-XZRON6IV.js +131 -0
- package/dist/chunk-YEDDOYSC.js +27809 -0
- package/dist/chunk-YISXLPHN.js +496 -0
- package/dist/chunk-YMZ3TNYB.js +18 -0
- package/dist/chunk-YY6ZQQBP.js +203 -0
- package/dist/chunk-YYQN46FY.js +334 -0
- package/dist/chunk-Z6LF7HQN.js +22 -0
- package/dist/chunk-ZCJDOK2S.js +116 -0
- package/dist/chunk-ZDPAS56H.js +76 -0
- package/dist/chunk-ZMAINWBW.js +18 -0
- package/dist/chunk-ZMFPW66A.js +22 -0
- package/dist/chunk-ZNCEKR4J.js +296 -0
- package/dist/chunk-ZVM6AKKM.js +47 -0
- package/dist/files.json +1888 -0
- package/dist/fixtures/forge/README.md +19 -0
- package/dist/fixtures/forge/expected/discrepancies.yaml +54 -0
- package/dist/fixtures/forge/expected/inputs.yaml +38 -0
- package/dist/fixtures/forge/expected/scan.yaml +342 -0
- package/dist/fixtures/forge/inputs/diagrams/forge-context.drawio +23 -0
- package/dist/fixtures/forge/inputs/partner-specs/northwind-pay-openapi.yaml +11 -0
- package/dist/fixtures/forge/inputs/tickets/ado-stories.json +4 -0
- package/dist/fixtures/forge/inputs/tickets/closed-service-requests.json +5 -0
- package/dist/fixtures/forge/inputs/wiki/integration-patterns.md +11 -0
- package/dist/fixtures/forge/inputs/wiki/ledger-solution-spec.md +9 -0
- package/dist/fixtures/forge/inputs/wiki/snow-firewall-request.md +4 -0
- package/dist/fixtures/forge/metarepo/judgments/reaches/84af5b6af24f7ca8c23013f3.yaml +17 -0
- package/dist/fixtures/forge/metarepo/judgments/reaches/c3917555edebddce8cecb647.yaml +17 -0
- package/dist/fixtures/forge/metarepo/judgments/reaches/c5fafd6601f8ca9e34e0bbd0.yaml +17 -0
- package/dist/fixtures/forge/metarepo/org-pack/agents/architecture-critic.yaml +9 -0
- package/dist/fixtures/forge/metarepo/org-pack/agents/story-writer.yaml +10 -0
- package/dist/fixtures/forge/metarepo/org-pack/checklists/architecture.yaml +115 -0
- package/dist/fixtures/forge/metarepo/org-pack/dialects/forge.yaml +111 -0
- package/dist/fixtures/forge/metarepo/org-pack/gates.yaml +22 -0
- package/dist/fixtures/forge/metarepo/org-pack/pack.yaml +11 -0
- package/dist/fixtures/forge/metarepo/org-pack/patterns/A.EB.PUB.yaml +12 -0
- package/dist/fixtures/forge/metarepo/org-pack/patterns/D.JDBC.yaml +12 -0
- package/dist/fixtures/forge/metarepo/org-pack/patterns/S.DIR.BFF.yaml +12 -0
- package/dist/fixtures/forge/metarepo/org-pack/patterns/S.GW.SOR.yaml +13 -0
- package/dist/fixtures/forge/metarepo/org-pack/patterns/S.GW.VND.yaml +14 -0
- package/dist/fixtures/forge/metarepo/org-pack/process/change-templates/feature.md +37 -0
- package/dist/fixtures/forge/metarepo/org-pack/process/skills/add-forge-endpoint/SKILL.md +17 -0
- package/dist/fixtures/forge/metarepo/org-pack/process/snow/firewall-rule.yaml +14 -0
- package/dist/fixtures/forge/metarepo/org-pack/process/snow/gateway-route.yaml +13 -0
- package/dist/fixtures/forge/metarepo/org-pack/profiles/forge/profile.yaml +12 -0
- package/dist/fixtures/forge/metarepo/org-pack/profiles/forge/repos.manifest.yaml +44 -0
- package/dist/fixtures/forge/metarepo/org-pack/roles.yaml +14 -0
- package/dist/fixtures/forge/metarepo/org-pack/runtime.yaml +14 -0
- package/dist/fixtures/forge/metarepo/org-pack/sources.yaml +3 -0
- package/dist/fixtures/forge/repos/forge-events/topics/payments.initiated.yaml +4 -0
- package/dist/fixtures/forge/repos/forge-events/topics/transfers.completed.yaml +4 -0
- package/dist/fixtures/forge/repos/forge-gateway/proxies/ledger-v1/apiproxy/ledger-v1.xml +3 -0
- package/dist/fixtures/forge/repos/forge-gateway/proxies/ledger-v1/apiproxy/policies/SpikeArrest.xml +3 -0
- package/dist/fixtures/forge/repos/forge-gateway/proxies/ledger-v1/apiproxy/policies/VerifyOAuth.xml +4 -0
- package/dist/fixtures/forge/repos/forge-gateway/proxies/ledger-v1/apiproxy/proxies/default.xml +14 -0
- package/dist/fixtures/forge/repos/forge-gateway/proxies/ledger-v1/apiproxy/targets/ledger.xml +5 -0
- package/dist/fixtures/forge/repos/forge-infra/alerts/ledger-api.yaml +5 -0
- package/dist/fixtures/forge/repos/forge-infra/k8s/ledger-api.yaml +15 -0
- package/dist/fixtures/forge/repos/forge-infra/k8s/portal-bff.yaml +7 -0
- package/dist/fixtures/forge/repos/forge-infra/terraform/ledger-db.tf +9 -0
- package/dist/fixtures/forge/repos/forge-ledger/api/ledger-openapi.yaml +31 -0
- package/dist/fixtures/forge/repos/forge-ledger/forge.yaml +4 -0
- package/dist/fixtures/forge/repos/forge-ledger/src/main/java/forge/ledger/LedgerEndpoints.java +13 -0
- package/dist/fixtures/forge/repos/forge-ledger/src/main/java/forge/ledger/LedgerEvents.java +11 -0
- package/dist/fixtures/forge/repos/forge-ledger/src/main/java/forge/ledger/NorthwindClient.java +10 -0
- package/dist/fixtures/forge/repos/forge-ledger/src/main/resources/application.yml +3 -0
- package/dist/fixtures/forge/repos/forge-ledger/src/main/resources/db/migration/V1__create_account.sql +5 -0
- package/dist/fixtures/forge/repos/forge-ledger/src/main/resources/db/migration/V2__create_entry.sql +7 -0
- package/dist/fixtures/forge/repos/forge-portal-bff/pom.xml +1 -0
- package/dist/fixtures/forge/repos/forge-portal-bff/src/main/java/forge/portal/AuditPublisher.java +12 -0
- package/dist/fixtures/forge/repos/forge-portal-bff/src/main/java/forge/portal/BalanceController.java +16 -0
- package/dist/fixtures/forge/repos/forge-portal-bff/src/main/java/forge/portal/LedgerClient.java +13 -0
- package/dist/fixtures/forge/repos/forge-portal-bff/src/main/java/forge/portal/PaymentEvents.java +13 -0
- package/dist/fixtures/forge/repos/forge-portal-bff/src/main/resources/application.yml +8 -0
- package/dist/fixtures/forge/repos/forge-portal-ui/package.json +1 -0
- package/dist/fixtures/forge/repos/forge-portal-ui/src/api/balance.ts +5 -0
- package/dist/fixtures/forge/repos/forge-reports-job/src/main/java/forge/reports/DailyEntriesJob.java +19 -0
- package/dist/fixtures/forge/repos/forge-reports-job/src/main/resources/application.yml +3 -0
- package/dist/fixtures/forge-change/README.md +41 -0
- package/dist/fixtures/forge-change/expected/findings.yaml +301 -0
- package/dist/fixtures/forge-change/expected/stories.yaml +101 -0
- package/dist/fixtures/forge-change/judgments/personal-data/0b5f3dbf5257a22275d8c74b.yaml +18 -0
- package/dist/fixtures/forge-change/judgments/personal-data/2759a66770134c417440bf2d.yaml +18 -0
- package/dist/fixtures/forge-change/judgments/personal-data/31b1ea2f14d0737f1aca79fd.yaml +18 -0
- package/dist/fixtures/forge-change/judgments/personal-data/49afd70c08228e65ad6ca1ed.yaml +18 -0
- package/dist/fixtures/forge-change/judgments/personal-data/761cabcb8a39f5e5866d2dd6.yaml +18 -0
- package/dist/fixtures/forge-change/judgments/personal-data/adae902b90cc8ffa0c765145.yaml +18 -0
- package/dist/fixtures/forge-change/judgments/personal-data/ba11bb933105ec9493e065dd.yaml +18 -0
- package/dist/fixtures/forge-change/judgments/personal-data/bdbcd1cdac3021c68063c3e7.yaml +18 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/brief.md +35 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/change.yaml +120 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/data.md +18 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/design.md +29 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/interfaces.md +17 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/mappings.md +26 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/proposal.md +35 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/snow.md +12 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/specs/transfer-limits/spec.md +19 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/stories/s1-refuse-over-limit.md +17 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/stories/s2-show-remaining.md +16 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/stories/s3-audit-refusals.md +18 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/stories/s4-velocity-check.md +16 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/stories.md +8 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/tasks.md +12 -0
- package/dist/fixtures/forge-change/openspec/changes/add-transfer-limit/ux.md +7 -0
- package/dist/fixtures/forge-change/org-pack/agents/code-and-test-critic.yaml +13 -0
- package/dist/fixtures/forge-change/org-pack/agents/complete-critic.yaml +12 -0
- package/dist/fixtures/forge-change/org-pack/agents/safe-critic.yaml +12 -0
- package/dist/fixtures/forge-change/org-pack/agents/ship-critic.yaml +11 -0
- package/dist/fixtures/forge-change/org-pack/agents/true-critic.yaml +11 -0
- package/dist/fixtures/forge-change/org-pack/checklists/review.yaml +54 -0
- package/dist/fixtures/forge-change/org-pack/gates.yaml +25 -0
- package/dist/fixtures/forge-change/org-pack/teams/team-ledger/checklists/ledger-team.yaml +227 -0
- package/dist/fixtures/forge-change/recordings/complete-critic/2ad84f84bf39c1d5412697e69fe23034d6983ec45a00314bf0975e627589a3c5.json +12 -0
- package/dist/fixtures/forge-change/recordings/complete-critic/417c98d8e54a4387d0fd93441c49f44c2868958739070d855c1dce0c41e24db3.json +12 -0
- package/dist/fixtures/forge-change/recordings/complete-critic/50203ee22e9cb3ef047295edb6538fe7d5695e1e4b139f3c929013dc6ce47021.json +12 -0
- package/dist/fixtures/forge-change/recordings/complete-critic/89f18d67f5d9c325bf35e2a9e020f9ddb6ee13b8523315037f0905cc57c040b1.json +12 -0
- package/dist/fixtures/forge-change/recordings/complete-critic/b4097867d26ae8eadc8b9efa8cdd86897013358035f0b40086c299a59c4ba121.json +12 -0
- package/dist/fixtures/forge-change/recordings/safe-critic/302d06f49664dd67ad2e21ab9cf74c1b0f7d3f750709c6ed8eff2b70983274e2.json +12 -0
- package/dist/fixtures/forge-change/recordings/safe-critic/32f1049c9a5ab4a759543290db4644ec6e221cc45fdfdcf06193837c6a8ce0b9.json +12 -0
- package/dist/fixtures/forge-change/recordings/safe-critic/4e4a84bfc04b9f26ca4250319a879901ff7a1c081c71e46a117675fee05026b0.json +12 -0
- package/dist/fixtures/forge-change/recordings/safe-critic/604af0fcdd6df6b76208fa88305fdc15c37606c2a4d1ae816477e46ac8c2dd04.json +12 -0
- package/dist/fixtures/forge-change/recordings/safe-critic/f0bf50af11f14c50d07904f0dffe1c8c20fb0cd89770645a8824c1d30a443955.json +12 -0
- package/dist/fixtures/forge-change/recordings/ship-critic/350954b58833b2c04880c67db45a1b328b7fd541d9f0d943b63905b8875488a6.json +12 -0
- package/dist/fixtures/forge-change/recordings/ship-critic/4af95c6c96a206777cec9de1f9c2d8c55a36ddc9b8db2f81d6eb83217b835efa.json +12 -0
- package/dist/fixtures/forge-change/recordings/ship-critic/76c34522a49cf7587a4e5689a5030d384603fa780b8aba97d27815cbc829683e.json +12 -0
- package/dist/fixtures/forge-change/recordings/ship-critic/a3b2cd1ace48587e5994333db03b34c3a0f9dec4f1932f1730ddfb687f6918c8.json +12 -0
- package/dist/fixtures/forge-change/recordings/ship-critic/de288a4fa64d0fc20890f9a787080ce6eac5203b7b9b72d884df11e8cf111835.json +12 -0
- package/dist/fixtures/forge-change/recordings/story-writer/1ddb00eac2aaf91a5ec5d9dfd220116be9f75aec6546a4a3a3b050ed89af2864.json +12 -0
- package/dist/packages/assistant-kit/frameworks-kit/README.md +86 -0
- package/dist/packages/assistant-kit/frameworks-kit/checklist.md +11 -0
- package/dist/packages/assistant-kit/frameworks-kit/examples/tide-lantern.yaml +56 -0
- package/dist/packages/assistant-kit/frameworks-kit/examples/tide-platform.yaml +43 -0
- package/dist/packages/assistant-kit/frameworks-kit/prompts/write-framework-model.md +12 -0
- package/dist/packages/assistant-kit/kit/README.md +98 -0
- package/dist/packages/assistant-kit/kit/c2-reference.md +334 -0
- package/dist/packages/assistant-kit/kit/checklist.md +39 -0
- package/dist/packages/assistant-kit/kit/examples/house-http-client.yaml +102 -0
- package/dist/packages/assistant-kit/kit/examples/tide-apigee.yaml +56 -0
- package/dist/packages/assistant-kit/kit/examples/tide-apim.yaml +32 -0
- package/dist/packages/assistant-kit/kit/examples/tide-kong.yaml +44 -0
- package/dist/packages/assistant-kit/kit/prompts/write-dialect.md +34 -0
- package/dist/packages/assistant-kit/kit/worked-example.md +198 -0
- package/dist/packages/conformance/sample/README.md +4 -0
- package/dist/packages/conformance/sample/inputs/notes.md +3 -0
- package/dist/packages/conformance/sample/inputs/systems.csv +3 -0
- package/dist/packages/conformance/sample/repo/api/greeter.proto +6 -0
- package/dist/packages/conformance/sample/repo/api/openapi.yaml +10 -0
- package/dist/packages/conformance/sample/repo/api/schema.graphql +3 -0
- package/dist/packages/conformance/sample/repo/db/V1__create_greeting.sql +4 -0
- package/dist/packages/conformance/sample/repo/package.json +7 -0
- package/dist/packages/conformance/sample/repo/src/main/java/sample/HelloController.java +10 -0
- package/dist/packages/conformance/sample/repo/web/app.ts +4 -0
- package/dist/packages/evals/datasets/critic-lenses.yaml +62 -0
- package/dist/packages/evals/datasets/dialect-writer.yaml +14 -0
- package/dist/packages/evals/datasets/feature-namer.yaml +34 -0
- package/dist/packages/evals/datasets/glossary-definer.yaml +25 -0
- package/dist/packages/evals/datasets/story-writer.yaml +13 -0
- package/dist/packages/evals/datasets/template-writer.yaml +16 -0
- package/dist/packages/evals/datasets/test-writer.yaml +18 -0
- package/dist/packages/executors/reference/reference-executor.mjs +233 -0
- package/dist/packages/extractors/dialects/argocd.yaml +45 -0
- package/dist/packages/extractors/dialects/fixtures/jaxrs/accounts-service/src/main/java/forge/accounts/AccountResource.java +47 -0
- package/dist/packages/extractors/dialects/fixtures/jaxrs/accounts-service/src/main/java/forge/accounts/AuditClient.java +12 -0
- package/dist/packages/extractors/dialects/fixtures/jaxrs/accounts-service/src/main/java/forge/accounts/LedgerClient.java +17 -0
- package/dist/packages/extractors/dialects/fixtures/micronaut/statements-service/src/main/java/forge/statements/LedgerClient.java +14 -0
- package/dist/packages/extractors/dialects/fixtures/micronaut/statements-service/src/main/java/forge/statements/RatesClient.java +11 -0
- package/dist/packages/extractors/dialects/fixtures/micronaut/statements-service/src/main/java/forge/statements/StatementController.java +36 -0
- package/dist/packages/extractors/dialects/fixtures/micronaut/statements-service/src/main/resources/application.yml +7 -0
- package/dist/packages/extractors/dialects/fixtures/quarkus-reactive-messaging/fraud-service/src/main/java/forge/fraud/FraudScorer.java +27 -0
- package/dist/packages/extractors/dialects/fixtures/quarkus-reactive-messaging/fraud-service/src/main/resources/application.properties +4 -0
- package/dist/packages/extractors/dialects/fixtures/terraform-aws/forge-aws-infra/envs/prod/api.tf +38 -0
- package/dist/packages/extractors/dialects/fixtures/terraform-aws/forge-aws-infra/envs/prod/main.tf +95 -0
- package/dist/packages/extractors/dialects/fixtures/terraform-aws/forge-aws-infra/envs/prod/terraform.tfvars +1 -0
- package/dist/packages/extractors/dialects/fixtures/terraform-aws/forge-aws-infra/envs/prod/variables.tf +4 -0
- package/dist/packages/extractors/dialects/fixtures/terraform-azure/forge-azure-infra/main.tf +102 -0
- package/dist/packages/extractors/dialects/fixtures/terraform-gcp/forge-gcp-infra/main.tf +51 -0
- package/dist/packages/extractors/dialects/harness.yaml +101 -0
- package/dist/packages/extractors/dialects/jaxrs.yaml +155 -0
- package/dist/packages/extractors/dialects/micronaut.yaml +207 -0
- package/dist/packages/extractors/dialects/quarkus-reactive-messaging.yaml +158 -0
- package/dist/packages/extractors/dialects/tekton.yaml +71 -0
- package/dist/packages/extractors/dialects/terraform-aws.yaml +267 -0
- package/dist/packages/extractors/dialects/terraform-azure.yaml +212 -0
- package/dist/packages/extractors/dialects/terraform-gcp.yaml +109 -0
- package/dist/packages/extractors/grammars/README.md +11 -0
- package/dist/packages/extractors/grammars/tree-sitter-groovy.LICENSE +21 -0
- package/dist/packages/extractors/grammars/tree-sitter-groovy.wasm +0 -0
- package/dist/packages/extractors/grammars/vendored.json +11 -0
- package/dist/packages/learn/lessons/architect-diagrams-and-code.yaml +69 -0
- package/dist/packages/learn/lessons/business-analyst-story-bar.yaml +94 -0
- package/dist/packages/learn/lessons/delivery-lead-release-readiness.yaml +44 -0
- package/dist/packages/learn/lessons/designer-features-in-user-words.yaml +57 -0
- package/dist/packages/learn/lessons/developer-find-your-way.yaml +60 -0
- package/dist/packages/learn/lessons/everyone-first-hour.yaml +74 -0
- package/dist/packages/learn/lessons/platform-lead-coverage-and-defences.yaml +58 -0
- package/dist/packages/learn/lessons/product-owner-first-change.yaml +167 -0
- package/dist/packages/learn/lessons/qa-tests-and-trace.yaml +53 -0
- package/dist/packages/learn/lessons/team-lead-initiative.yaml +146 -0
- package/dist/packages/naysayer/constitution/constitution.yaml +286 -0
- package/dist/packages/naysayer/starter/review.yaml +256 -0
- package/dist/packages/sdk/npm/index.js +8892 -0
- package/dist/packages/speckit/rules/drift.yaml +78 -0
- package/dist/packages/taskrun/rules/conform.yaml +38 -0
- package/dist/packages/testgen/rules/trace.yaml +49 -0
- package/dist/packages/ui/dist/assets/elk-api-tma0MCuh.js +2 -0
- package/dist/packages/ui/dist/assets/elk-worker.min--dAJroGl.js +6401 -0
- package/dist/packages/ui/dist/assets/elk-worker.min-DdYmS5kP.js +2 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-400-normal-BTotfTJu.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-400-normal-DZqxrq2p.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-500-normal-ByOcLdNv.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-500-normal-CocWQlwt.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-600-normal-71GNu3SW.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-600-normal-BGq0mW3O.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-ext-400-normal-Dsrv2Tcn.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-ext-400-normal-g30qAdWV.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-ext-500-normal-Cs5J6C77.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-ext-500-normal-DB5PtV2g.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-ext-600-normal-Bz0x94Yp.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-cyrillic-ext-600-normal-DUMzJB7m.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-greek-400-normal-D9ESIMu3.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-greek-400-normal-_efipK4i.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-greek-500-normal-CuWXN6rf.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-greek-500-normal-JMMifIXV.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-greek-600-normal-D-CqTdkO.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-greek-600-normal-DzTrcv_p.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-400-normal-CDDApCn2.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-400-normal-CYLoc0-x.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-500-normal-6ng42L7E.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-500-normal-BgVn5rGT.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-600-normal-Cu4Hd6ag.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-600-normal-CuJfVYMP.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-ext-400-normal-C5H60-Va.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-ext-400-normal-RBey6euL.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-ext-500-normal-D0aIdm-b.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-ext-500-normal-DakdToA3.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-ext-600-normal-DIrixKbi.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-latin-ext-600-normal-DOrvGEcy.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-vietnamese-400-normal-DG4YqDda.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-vietnamese-400-normal-fK1oJ5dG.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-vietnamese-500-normal-BEb3_waV.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-vietnamese-500-normal-e4dixQRQ.woff2 +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-vietnamese-600-normal-DgdngZtN.woff +0 -0
- package/dist/packages/ui/dist/assets/ibm-plex-sans-vietnamese-600-normal-DpPYBSTl.woff2 +0 -0
- package/dist/packages/ui/dist/assets/index-B54fm9FQ.js +29 -0
- package/dist/packages/ui/dist/assets/index-DD_hufQz.css +1 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-cyrillic-500-normal-DJqRU3vO.woff +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-cyrillic-500-normal-DmUKJPL_.woff2 +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-greek-500-normal-D7SFKleX.woff +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-greek-500-normal-JpySY46c.woff2 +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-latin-ext-500-normal-ckzbgY84.woff +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
- package/dist/packages/ui/dist/assets/jetbrains-mono-vietnamese-500-normal-DNRqzVM1.woff +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-devanagari-600-normal-BtY48IV_.woff +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-devanagari-600-normal-DhS7ScYx.woff2 +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-devanagari-700-normal-BQQOj9BB.woff2 +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-devanagari-700-normal-DBRwWuxA.woff +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-latin-600-normal-CXCVEoA9.woff2 +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-latin-600-normal-Dx02qI2_.woff +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-latin-700-normal-BPDUZo87.woff2 +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-latin-700-normal-e0Uj8ZlN.woff +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-latin-ext-600-normal-BleIgkPp.woff +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-latin-ext-600-normal-C9ZjJQAt.woff2 +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-latin-ext-700-normal-BPaQ7tlD.woff +0 -0
- package/dist/packages/ui/dist/assets/rajdhani-latin-ext-700-normal-S6aYESQK.woff2 +0 -0
- package/dist/packages/ui/dist/favicon.svg +1 -0
- package/dist/packages/ui/dist/index.html +15 -0
- package/dist/third-party.json +575 -0
- package/dist/vendor/@fission-ai/openspec/bin/openspec.js +85986 -0
- package/dist/vendor/@fission-ai/openspec/package.json +82 -0
- package/dist/vendor/@fission-ai/openspec/schemas/spec-driven/schema.yaml +248 -0
- package/dist/vendor/@fission-ai/openspec/schemas/spec-driven/templates/design.md +21 -0
- package/dist/vendor/@fission-ai/openspec/schemas/spec-driven/templates/proposal.md +34 -0
- package/dist/vendor/@fission-ai/openspec/schemas/spec-driven/templates/spec.md +13 -0
- package/dist/vendor/@fission-ai/openspec/schemas/spec-driven/templates/tasks.md +11 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-c_sharp.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-go.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-java.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-javascript.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-kotlin.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-php.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-python.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-ruby.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-rust.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-scala.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-tsx.wasm +0 -0
- package/dist/vendor/tree-sitter-wasms/out/tree-sitter-typescript.wasm +0 -0
- package/dist/vendor/web-tree-sitter/tree-sitter.wasm +0 -0
- package/package.json +36 -3
|
@@ -0,0 +1,101 @@
|
|
|
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
|
+
parseFactLine
|
|
8
|
+
} from "./chunk-S2A7YC3Q.js";
|
|
9
|
+
|
|
10
|
+
// packages/cli/dist/memory-room.js
|
|
11
|
+
import { createReadStream } from "node:fs";
|
|
12
|
+
import { createInterface } from "node:readline";
|
|
13
|
+
import { freemem } from "node:os";
|
|
14
|
+
import { getHeapStatistics } from "node:v8";
|
|
15
|
+
var NoRoomError = class extends Error {
|
|
16
|
+
usedMB;
|
|
17
|
+
ceilingMB;
|
|
18
|
+
constructor(what, usedMB, ceilingMB) {
|
|
19
|
+
super(`${what} need more memory than Node was given: ${usedMB} MB of the ${ceilingMB} MB ceiling is in use. Run it again with ATTICUS_MAX_OLD_SPACE=${Math.max(4096, ceilingMB * 2)} (megabytes Node may use for the heap), or in parts, a repo at a time. Closing an IDE frees the memory this needs.`);
|
|
20
|
+
this.name = "NoRoomError";
|
|
21
|
+
this.usedMB = usedMB;
|
|
22
|
+
this.ceilingMB = ceilingMB;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
var MB = 1024 * 1024;
|
|
26
|
+
var SHARE = 0.8;
|
|
27
|
+
function ceilingOf(env = process.env) {
|
|
28
|
+
const heap = getHeapStatistics().heap_size_limit;
|
|
29
|
+
const asked = Number(env.ATTICUS_MAX_OLD_SPACE);
|
|
30
|
+
const limit = Number.isFinite(asked) && asked > 0 ? Math.min(heap, asked * MB) : heap;
|
|
31
|
+
const free = freemem();
|
|
32
|
+
return free > 0 ? Math.min(limit, free + process.memoryUsage.rss()) : limit;
|
|
33
|
+
}
|
|
34
|
+
function roomGuard(o) {
|
|
35
|
+
const ceiling = o.ceilingBytes ?? ceilingOf();
|
|
36
|
+
const every = o.every ?? 32;
|
|
37
|
+
const used = o.used ?? (() => process.memoryUsage.rss());
|
|
38
|
+
const bar = ceiling * SHARE;
|
|
39
|
+
let n = 0;
|
|
40
|
+
return () => {
|
|
41
|
+
if (n++ % every !== 0)
|
|
42
|
+
return;
|
|
43
|
+
const now = used();
|
|
44
|
+
if (now <= bar)
|
|
45
|
+
return;
|
|
46
|
+
throw new NoRoomError(o.what, Math.round(now / MB), Math.max(1, Math.round(ceiling / MB)));
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function maxOldSpaceIn(args) {
|
|
50
|
+
for (const a of args) {
|
|
51
|
+
const m = /^--max[-_]old[-_]space[-_]size[= ](\d+)$/.exec(a.trim());
|
|
52
|
+
if (m)
|
|
53
|
+
return Number(m[1]);
|
|
54
|
+
}
|
|
55
|
+
return void 0;
|
|
56
|
+
}
|
|
57
|
+
function reExecForMemory(env, execArgv) {
|
|
58
|
+
if (env.ATTICUS_RESTARTED_FOR_MEMORY)
|
|
59
|
+
return void 0;
|
|
60
|
+
const mb = Number(env.ATTICUS_MAX_OLD_SPACE);
|
|
61
|
+
if (!Number.isInteger(mb) || mb < 256 || mb > 1048576)
|
|
62
|
+
return void 0;
|
|
63
|
+
const already = [
|
|
64
|
+
maxOldSpaceIn(execArgv),
|
|
65
|
+
maxOldSpaceIn((env.NODE_OPTIONS ?? "").split(/\s+/))
|
|
66
|
+
].filter((n) => n !== void 0);
|
|
67
|
+
if (already.length && Math.max(...already) >= mb)
|
|
68
|
+
return void 0;
|
|
69
|
+
return { maxOldSpaceMB: mb };
|
|
70
|
+
}
|
|
71
|
+
async function streamFacts(file, room) {
|
|
72
|
+
const facts = [];
|
|
73
|
+
const bad = [];
|
|
74
|
+
const seen = /* @__PURE__ */ new Set();
|
|
75
|
+
const lines = createInterface({
|
|
76
|
+
input: createReadStream(file, { encoding: "utf8" }),
|
|
77
|
+
crlfDelay: Infinity
|
|
78
|
+
});
|
|
79
|
+
let line = 0;
|
|
80
|
+
try {
|
|
81
|
+
for await (const raw of lines) {
|
|
82
|
+
room?.();
|
|
83
|
+
const r = parseFactLine(raw, ++line, seen);
|
|
84
|
+
if (r.fact)
|
|
85
|
+
facts.push(r.fact);
|
|
86
|
+
else if (r.bad)
|
|
87
|
+
bad.push(r.bad);
|
|
88
|
+
}
|
|
89
|
+
} finally {
|
|
90
|
+
lines.close();
|
|
91
|
+
}
|
|
92
|
+
return { facts, bad };
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export {
|
|
96
|
+
NoRoomError,
|
|
97
|
+
ceilingOf,
|
|
98
|
+
roomGuard,
|
|
99
|
+
reExecForMemory,
|
|
100
|
+
streamFacts
|
|
101
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
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
|
+
metarepoToolBox
|
|
8
|
+
} from "./chunk-ZVM6AKKM.js";
|
|
9
|
+
import {
|
|
10
|
+
CONTEXT_TOOLS
|
|
11
|
+
} from "./chunk-T6AIP7H5.js";
|
|
12
|
+
import {
|
|
13
|
+
TOOL_LIMITS,
|
|
14
|
+
ToolSession,
|
|
15
|
+
readToolCalls,
|
|
16
|
+
recordToolCalls
|
|
17
|
+
} from "./chunk-CNUKCS2T.js";
|
|
18
|
+
import "./chunk-S2A7YC3Q.js";
|
|
19
|
+
import "./chunk-D3PO4DOZ.js";
|
|
20
|
+
import "./chunk-TV45EUGM.js";
|
|
21
|
+
|
|
22
|
+
// packages/cli/dist/context-commands.js
|
|
23
|
+
var box = (root) => metarepoToolBox(root);
|
|
24
|
+
async function runFor(root, name, input, io) {
|
|
25
|
+
try {
|
|
26
|
+
io.out(await box(root).call(name, input));
|
|
27
|
+
return 0;
|
|
28
|
+
} catch (e) {
|
|
29
|
+
io.err(e.message);
|
|
30
|
+
return e.name === "ToolError" ? 2 : 1;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function contextShow(root, id, io) {
|
|
34
|
+
return runFor(root, "show", { id }, io);
|
|
35
|
+
}
|
|
36
|
+
function contextWalk(root, id, o, io) {
|
|
37
|
+
return runFor(root, "walk", {
|
|
38
|
+
id,
|
|
39
|
+
...o.hops ? { hops: o.hops } : {},
|
|
40
|
+
...o.kinds?.length ? { kinds: o.kinds } : {},
|
|
41
|
+
...o.limit ? { limit: o.limit } : {}
|
|
42
|
+
}, io);
|
|
43
|
+
}
|
|
44
|
+
function contextCode(root, o, io) {
|
|
45
|
+
return runFor(root, "show_code", {
|
|
46
|
+
...o.id ? { id: o.id } : {},
|
|
47
|
+
...o.repo ? { repo: o.repo } : {},
|
|
48
|
+
...o.path ? { path: o.path } : {},
|
|
49
|
+
...o.line ? { line: o.line } : {},
|
|
50
|
+
...o.around !== void 0 ? { context: o.around } : {}
|
|
51
|
+
}, io);
|
|
52
|
+
}
|
|
53
|
+
function contextGrep(root, pattern, o, io) {
|
|
54
|
+
return runFor(root, "grep", {
|
|
55
|
+
pattern,
|
|
56
|
+
...o.regex ? { regex: true } : {},
|
|
57
|
+
...o.ignoreCase ? { ignoreCase: true } : {},
|
|
58
|
+
...o.repo ? { repo: o.repo } : {},
|
|
59
|
+
...o.paths ? { paths: o.paths } : {},
|
|
60
|
+
...o.limit ? { limit: o.limit } : {}
|
|
61
|
+
}, io);
|
|
62
|
+
}
|
|
63
|
+
function contextFiles(root, glob, o, io) {
|
|
64
|
+
return runFor(root, "files", { glob, ...o.repo ? { repo: o.repo } : {}, ...o.limit ? { limit: o.limit } : {} }, io);
|
|
65
|
+
}
|
|
66
|
+
function contextOutline(root, repo, path, io) {
|
|
67
|
+
return runFor(root, "outline", { repo, path }, io);
|
|
68
|
+
}
|
|
69
|
+
function contextSimilar(root, id, o, io) {
|
|
70
|
+
return runFor(root, "similar", { id, ...o.kinds?.length ? { kinds: o.kinds } : {}, ...o.limit ? { limit: o.limit } : {} }, io);
|
|
71
|
+
}
|
|
72
|
+
function contextTools(o, io) {
|
|
73
|
+
if (o.json) {
|
|
74
|
+
io.out(JSON.stringify({ tools: CONTEXT_TOOLS, limits: TOOL_LIMITS }, null, 2));
|
|
75
|
+
return 0;
|
|
76
|
+
}
|
|
77
|
+
for (const t of CONTEXT_TOOLS)
|
|
78
|
+
io.out(`${t.name}: ${t.description}`);
|
|
79
|
+
io.out(`At most ${TOOL_LIMITS.rounds} rounds of tool calls in a run, ${TOOL_LIMITS.tokens} tokens from tools in all, ${TOOL_LIMITS.perCall} from one call.`);
|
|
80
|
+
return 0;
|
|
81
|
+
}
|
|
82
|
+
async function contextCall(root, name, o, io) {
|
|
83
|
+
let input = {};
|
|
84
|
+
if (o.input !== void 0) {
|
|
85
|
+
try {
|
|
86
|
+
const v = JSON.parse(o.input);
|
|
87
|
+
if (typeof v !== "object" || v === null || Array.isArray(v))
|
|
88
|
+
throw new Error("not an object");
|
|
89
|
+
input = v;
|
|
90
|
+
} catch {
|
|
91
|
+
io.err(`--input is the tool's input as a JSON object, for example --input '{"id":"forge-ledger"}'.`);
|
|
92
|
+
return 2;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
const existing = o.run ? await readToolCalls(root, o.run) : void 0;
|
|
96
|
+
if (o.run && !existing) {
|
|
97
|
+
io.err(`There is no run ${o.run}. atticus runs lists them.`);
|
|
98
|
+
return 2;
|
|
99
|
+
}
|
|
100
|
+
const session = new ToolSession(metarepoToolBox(root, existing?.tools?.calls), {}, existing?.tools);
|
|
101
|
+
const before = session.calls.length;
|
|
102
|
+
const call = await session.run(o.round ?? 1, { name, input });
|
|
103
|
+
if (o.run)
|
|
104
|
+
await recordToolCalls(root, o.run, (t) => ({
|
|
105
|
+
offered: CONTEXT_TOOLS.map((d) => d.name),
|
|
106
|
+
calls: [...t?.calls ?? [], ...session.calls.slice(before)],
|
|
107
|
+
...session.stopped ? { stopped: session.stopped } : {}
|
|
108
|
+
}));
|
|
109
|
+
if (o.json)
|
|
110
|
+
io.out(JSON.stringify({
|
|
111
|
+
output: call.output,
|
|
112
|
+
tokens: call.tokens,
|
|
113
|
+
...call.error ? { error: true } : {},
|
|
114
|
+
...session.stopped ? { stopped: session.stopped } : {}
|
|
115
|
+
}, null, 2));
|
|
116
|
+
else
|
|
117
|
+
io.out(call.output);
|
|
118
|
+
return 0;
|
|
119
|
+
}
|
|
120
|
+
export {
|
|
121
|
+
contextCall,
|
|
122
|
+
contextCode,
|
|
123
|
+
contextFiles,
|
|
124
|
+
contextGrep,
|
|
125
|
+
contextOutline,
|
|
126
|
+
contextShow,
|
|
127
|
+
contextSimilar,
|
|
128
|
+
contextTools,
|
|
129
|
+
contextWalk
|
|
130
|
+
};
|
|
@@ -0,0 +1,287 @@
|
|
|
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
|
+
isLegacy
|
|
9
|
+
} from "./chunk-ZDPAS56H.js";
|
|
10
|
+
import {
|
|
11
|
+
isHandoffStep
|
|
12
|
+
} from "./chunk-4Q3NN7VF.js";
|
|
13
|
+
|
|
14
|
+
// packages/cli/dist/command-catalog.js
|
|
15
|
+
var AREAS = [
|
|
16
|
+
{ id: "start", title: "Set up and keep healthy" },
|
|
17
|
+
{ id: "repos", title: "Repos, scans and specs" },
|
|
18
|
+
{ id: "knowledge", title: "Knowledge and documents" },
|
|
19
|
+
{ id: "catalog", title: "The catalog" },
|
|
20
|
+
{ id: "changes", title: "Changes, findings and questions" },
|
|
21
|
+
{ id: "plan", title: "Plans, tasks and work items" },
|
|
22
|
+
{ id: "release", title: "Release" },
|
|
23
|
+
{ id: "developer", title: "For Atticus's own quality" }
|
|
24
|
+
];
|
|
25
|
+
var AREA_BY_WORD = {
|
|
26
|
+
init: "start",
|
|
27
|
+
adopt: "start",
|
|
28
|
+
unadopt: "start",
|
|
29
|
+
setup: "start",
|
|
30
|
+
doctor: "start",
|
|
31
|
+
probe: "start",
|
|
32
|
+
secret: "start",
|
|
33
|
+
upgrade: "start",
|
|
34
|
+
support: "start",
|
|
35
|
+
sandbox: "start",
|
|
36
|
+
learn: "start",
|
|
37
|
+
explain: "start",
|
|
38
|
+
executors: "start",
|
|
39
|
+
openspec: "start",
|
|
40
|
+
"assistant-files": "start",
|
|
41
|
+
ui: "start",
|
|
42
|
+
mcp: "start",
|
|
43
|
+
index: "start",
|
|
44
|
+
schema: "start",
|
|
45
|
+
orgpack: "start",
|
|
46
|
+
templates: "start",
|
|
47
|
+
commands: "start",
|
|
48
|
+
legacy: "start",
|
|
49
|
+
next: "changes",
|
|
50
|
+
scan: "repos",
|
|
51
|
+
verify: "repos",
|
|
52
|
+
join: "repos",
|
|
53
|
+
map: "repos",
|
|
54
|
+
spec: "repos",
|
|
55
|
+
estate: "repos",
|
|
56
|
+
"repo-type": "repos",
|
|
57
|
+
repo: "repos",
|
|
58
|
+
repos: "repos",
|
|
59
|
+
workspace: "repos",
|
|
60
|
+
frameworks: "repos",
|
|
61
|
+
dialect: "repos",
|
|
62
|
+
onboard: "repos",
|
|
63
|
+
baseline: "repos",
|
|
64
|
+
drift: "repos",
|
|
65
|
+
stub: "repos",
|
|
66
|
+
ci: "repos",
|
|
67
|
+
sources: "knowledge",
|
|
68
|
+
standards: "knowledge",
|
|
69
|
+
knowledge: "knowledge",
|
|
70
|
+
patterns: "knowledge",
|
|
71
|
+
absorb: "knowledge",
|
|
72
|
+
intake: "knowledge",
|
|
73
|
+
triage: "knowledge",
|
|
74
|
+
glossary: "knowledge",
|
|
75
|
+
domain: "knowledge",
|
|
76
|
+
catalog: "catalog",
|
|
77
|
+
query: "catalog",
|
|
78
|
+
context: "catalog",
|
|
79
|
+
cites: "catalog",
|
|
80
|
+
impact: "catalog",
|
|
81
|
+
ask: "catalog",
|
|
82
|
+
guide: "catalog",
|
|
83
|
+
diagram: "catalog",
|
|
84
|
+
reconcile: "catalog",
|
|
85
|
+
coverage: "catalog",
|
|
86
|
+
feature: "catalog",
|
|
87
|
+
alias: "catalog",
|
|
88
|
+
site: "catalog",
|
|
89
|
+
digest: "changes",
|
|
90
|
+
change: "changes",
|
|
91
|
+
finding: "changes",
|
|
92
|
+
findings: "changes",
|
|
93
|
+
stage: "changes",
|
|
94
|
+
critic: "changes",
|
|
95
|
+
handoff: "changes",
|
|
96
|
+
questions: "changes",
|
|
97
|
+
plan: "plan",
|
|
98
|
+
task: "plan",
|
|
99
|
+
stories: "plan",
|
|
100
|
+
todo: "plan",
|
|
101
|
+
needs: "changes",
|
|
102
|
+
waiting: "changes",
|
|
103
|
+
watch: "changes",
|
|
104
|
+
runs: "changes",
|
|
105
|
+
history: "changes",
|
|
106
|
+
ado: "plan",
|
|
107
|
+
tests: "plan",
|
|
108
|
+
trace: "plan",
|
|
109
|
+
initiative: "plan",
|
|
110
|
+
outcome: "plan",
|
|
111
|
+
release: "release",
|
|
112
|
+
bench: "developer",
|
|
113
|
+
eval: "developer",
|
|
114
|
+
defences: "developer",
|
|
115
|
+
plugin: "developer",
|
|
116
|
+
conformance: "developer"
|
|
117
|
+
};
|
|
118
|
+
var AREA_BY_ID = {
|
|
119
|
+
"spec hand-down": "changes",
|
|
120
|
+
"spec hand-up": "changes",
|
|
121
|
+
"ci archive-gate": "release"
|
|
122
|
+
};
|
|
123
|
+
var KIND_BY_NAME = {
|
|
124
|
+
repo: "repo",
|
|
125
|
+
repos: "repo",
|
|
126
|
+
change: "change",
|
|
127
|
+
flow: "flow",
|
|
128
|
+
system: "system",
|
|
129
|
+
file: "path",
|
|
130
|
+
files: "path",
|
|
131
|
+
dir: "path",
|
|
132
|
+
path: "path",
|
|
133
|
+
a: "path",
|
|
134
|
+
b: "path"
|
|
135
|
+
};
|
|
136
|
+
var KIND_BY_COMMAND = {
|
|
137
|
+
"questions answer": ["question"],
|
|
138
|
+
"change status": ["change"],
|
|
139
|
+
"change handoff": ["change"],
|
|
140
|
+
"change sync": ["change"],
|
|
141
|
+
"change return": ["change"],
|
|
142
|
+
"change archive": ["change"],
|
|
143
|
+
finding: ["change", "finding"],
|
|
144
|
+
findings: ["change"],
|
|
145
|
+
impact: ["record"],
|
|
146
|
+
drift: ["change"],
|
|
147
|
+
trace: ["change"]
|
|
148
|
+
};
|
|
149
|
+
var SERVES = /* @__PURE__ */ new Set(["ui", "stub serve", "mcp"]);
|
|
150
|
+
var APPROVE_FLAGS = ["--approve", "--send"];
|
|
151
|
+
var isWord = (t) => /^[a-z][a-z-]*$/.test(t);
|
|
152
|
+
function parseArgs(id, usage) {
|
|
153
|
+
const out = [];
|
|
154
|
+
const kinds = KIND_BY_COMMAND[id];
|
|
155
|
+
const re = /(\[|"?<)([a-z][a-z|-]*?)(\.\.\.)?(>"?|\])(\.\.\.)?/g;
|
|
156
|
+
for (const m of usage.matchAll(re)) {
|
|
157
|
+
const before = usage.slice(0, m.index).trimEnd();
|
|
158
|
+
if (/--[a-z-]+$/.test(before) || /--[a-z-]+ ?\|?$/.test(before))
|
|
159
|
+
continue;
|
|
160
|
+
if (m[1] === "[" && !/^[a-z]+$/.test(m[2]))
|
|
161
|
+
continue;
|
|
162
|
+
const raw = m[2];
|
|
163
|
+
const parts = raw.split("|");
|
|
164
|
+
const isChoice = parts.length >= 3;
|
|
165
|
+
const name = isChoice ? "choice" : parts[0];
|
|
166
|
+
const kind = kinds?.[out.length] ?? (isChoice ? "choice" : KIND_BY_NAME[name] ?? "text");
|
|
167
|
+
out.push({
|
|
168
|
+
name,
|
|
169
|
+
kind,
|
|
170
|
+
optional: m[1] === "[",
|
|
171
|
+
many: !!(m[3] || m[5]),
|
|
172
|
+
...isChoice ? { choices: parts } : {}
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
return out;
|
|
176
|
+
}
|
|
177
|
+
function parseFlags(text, summaries) {
|
|
178
|
+
const out = /* @__PURE__ */ new Map();
|
|
179
|
+
const re = /(--[a-z][a-z-]*)(?:[ =]("[^"]*"|<[^>]+>|[A-Za-z0-9][\w.,=-]*(?:\|[\w.-]+)*))?/g;
|
|
180
|
+
for (const m of text.matchAll(re)) {
|
|
181
|
+
const name = m[1];
|
|
182
|
+
if (out.has(name))
|
|
183
|
+
continue;
|
|
184
|
+
const before = text.slice(0, m.index);
|
|
185
|
+
const opened = (before.match(/\[/g) ?? []).length - (before.match(/\]/g) ?? []).length;
|
|
186
|
+
let value = m[2]?.replace(/^<|>$/g, "");
|
|
187
|
+
if (value?.startsWith("--") || value && /^[a-z]+$/.test(value) && !m[2].startsWith("<"))
|
|
188
|
+
value = /^(m|n|t|s|k|f|c|d|o|p|file|dir|id)$/.test(value) ? value : void 0;
|
|
189
|
+
const summary = summaries.get(name);
|
|
190
|
+
out.set(name, {
|
|
191
|
+
name,
|
|
192
|
+
...value ? { value } : {},
|
|
193
|
+
// `<folder> | --org <org>`: the option is given instead of the argument, not as well.
|
|
194
|
+
required: opened <= 0 && !/<[^>]+>\s*\|\s*$/.test(before),
|
|
195
|
+
...summary ? { summary } : {}
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
return [...out.values()];
|
|
199
|
+
}
|
|
200
|
+
function parseHelp(help) {
|
|
201
|
+
const out = [];
|
|
202
|
+
let current;
|
|
203
|
+
const blocks = [];
|
|
204
|
+
for (const l of help.split("\n")) {
|
|
205
|
+
if (/^ {2}atticus /.test(l)) {
|
|
206
|
+
current = { line: l.trim(), more: [] };
|
|
207
|
+
blocks.push(current);
|
|
208
|
+
} else if (current && /^ {6,}\[?--|^ {6,}\(/.test(l))
|
|
209
|
+
current.more.push(l.trim());
|
|
210
|
+
else if (current && !current.more.length && current.below === void 0 && /^ {6,}\S/.test(l))
|
|
211
|
+
current.below = l.trim();
|
|
212
|
+
else if (!/^ {6,}/.test(l))
|
|
213
|
+
current = void 0;
|
|
214
|
+
}
|
|
215
|
+
for (const b of blocks) {
|
|
216
|
+
if (/^atticus (--help|--version|<step>)/.test(b.line))
|
|
217
|
+
continue;
|
|
218
|
+
const cut = b.line.search(/ {2,}/);
|
|
219
|
+
const usage = cut > 0 ? b.line.slice(0, cut) : b.line;
|
|
220
|
+
const written = cut > 0 ? b.line.slice(cut).trim() : b.below ?? "";
|
|
221
|
+
const summary = written.replace(/(\s*\[[^\]]*--[^\]]*\](\.\.\.)?)+\s*$/, "");
|
|
222
|
+
const tokens = usage.split(" ").slice(1);
|
|
223
|
+
const words = [];
|
|
224
|
+
for (const t of tokens) {
|
|
225
|
+
if (!isWord(t))
|
|
226
|
+
break;
|
|
227
|
+
words.push(t);
|
|
228
|
+
}
|
|
229
|
+
const id = words.join(" ");
|
|
230
|
+
const summaries = /* @__PURE__ */ new Map();
|
|
231
|
+
for (const m of b.more) {
|
|
232
|
+
const c = m.search(/ {2,}/);
|
|
233
|
+
const opt = c > 0 ? m.slice(0, c) : m;
|
|
234
|
+
const what = c > 0 ? m.slice(c).trim() : "";
|
|
235
|
+
for (const f of opt.matchAll(/--[a-z][a-z-]*/g))
|
|
236
|
+
if (what)
|
|
237
|
+
summaries.set(f[0], what);
|
|
238
|
+
}
|
|
239
|
+
const optionText = [
|
|
240
|
+
usage,
|
|
241
|
+
written,
|
|
242
|
+
// Each option line's option part only: its description may hold brackets of its own.
|
|
243
|
+
...b.more.map((m) => {
|
|
244
|
+
const c = m.search(/ {2,}/);
|
|
245
|
+
return `[${(c > 0 ? m.slice(0, c) : m).replace(/^\[|\]$/g, "")}]`;
|
|
246
|
+
})
|
|
247
|
+
].join(" ");
|
|
248
|
+
out.push({
|
|
249
|
+
id,
|
|
250
|
+
words,
|
|
251
|
+
usage,
|
|
252
|
+
summary,
|
|
253
|
+
args: parseArgs(id, usage.slice(`atticus ${id}`.length)),
|
|
254
|
+
flags: parseFlags(optionText, summaries)
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
return out;
|
|
258
|
+
}
|
|
259
|
+
function commandCatalog(help) {
|
|
260
|
+
const seen = /* @__PURE__ */ new Set();
|
|
261
|
+
return parseHelp(help).map((parsed) => {
|
|
262
|
+
let c = parsed;
|
|
263
|
+
if (seen.has(c.id)) {
|
|
264
|
+
const mark = c.flags.find((f) => f.required) ?? c.flags[0];
|
|
265
|
+
if (mark)
|
|
266
|
+
c = { ...c, id: `${c.id} ${mark.name}` };
|
|
267
|
+
}
|
|
268
|
+
seen.add(c.id);
|
|
269
|
+
const area = AREA_BY_ID[c.id] ?? AREA_BY_WORD[c.words[0] ?? ""] ?? "";
|
|
270
|
+
const approve = APPROVE_FLAGS.find((f) => c.flags.some((x) => x.name === f));
|
|
271
|
+
const [w0, w1] = aliasArgv(c.words, c.words.map((_, i) => i));
|
|
272
|
+
const runs = isHandoffStep(w0, w1) || c.id === "critic" || c.id === "map" ? "ai" : SERVES.has(c.id) ? "serve" : approve ? "shared" : "local";
|
|
273
|
+
return {
|
|
274
|
+
...c,
|
|
275
|
+
area,
|
|
276
|
+
runs,
|
|
277
|
+
...approve && runs === "shared" ? { approve } : {},
|
|
278
|
+
legacy: isLegacy(c.words[0])
|
|
279
|
+
};
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export {
|
|
284
|
+
AREAS,
|
|
285
|
+
parseHelp,
|
|
286
|
+
commandCatalog
|
|
287
|
+
};
|
|
@@ -0,0 +1,128 @@
|
|
|
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
|
+
targetFlowsOf
|
|
8
|
+
} from "./chunk-TDD55CJH.js";
|
|
9
|
+
import {
|
|
10
|
+
estimateChange,
|
|
11
|
+
loadRelease,
|
|
12
|
+
releaseForecast
|
|
13
|
+
} from "./chunk-BOHJZTEQ.js";
|
|
14
|
+
import {
|
|
15
|
+
gateStatus,
|
|
16
|
+
reviewedGates
|
|
17
|
+
} from "./chunk-3HI6Z55Y.js";
|
|
18
|
+
import {
|
|
19
|
+
detectConflicts
|
|
20
|
+
} from "./chunk-XY3P7JW7.js";
|
|
21
|
+
import {
|
|
22
|
+
loadEstimates,
|
|
23
|
+
orgPackDirOf
|
|
24
|
+
} from "./chunk-S2A7YC3Q.js";
|
|
25
|
+
|
|
26
|
+
// packages/cli/dist/change-estimate.js
|
|
27
|
+
import { relative, sep } from "node:path";
|
|
28
|
+
async function estimateOf(root, change, o = {}) {
|
|
29
|
+
const t = await targetFlowsOf(root, change);
|
|
30
|
+
if (!t)
|
|
31
|
+
return void 0;
|
|
32
|
+
const problems = [...t.problems];
|
|
33
|
+
const { estimates, problem } = await loadEstimates(orgPackDirOf(root));
|
|
34
|
+
if (problem)
|
|
35
|
+
problems.push(problem);
|
|
36
|
+
const systems = /* @__PURE__ */ new Map();
|
|
37
|
+
const systemOf = /* @__PURE__ */ new Map();
|
|
38
|
+
for (const r of t.records) {
|
|
39
|
+
if (r.kind === "System")
|
|
40
|
+
systems.set(r.id, r.boundary);
|
|
41
|
+
if (r.kind === "Component")
|
|
42
|
+
systemOf.set(r.id, r.system);
|
|
43
|
+
}
|
|
44
|
+
const boundaryOf = (c) => systems.get(systemOf.get(c) ?? c);
|
|
45
|
+
let openBlocking = 0;
|
|
46
|
+
for (const gate of await reviewedGates(root, change).catch(() => []))
|
|
47
|
+
openBlocking += await gateStatus(root, change, gate).then((s) => s.open.blocking, () => 0);
|
|
48
|
+
const conflicts = (await detectConflicts(root).catch(() => [])).filter((p) => p.changes.includes(change)).length;
|
|
49
|
+
let waitDays;
|
|
50
|
+
try {
|
|
51
|
+
const f = await releaseForecast(await loadRelease(root, change, o.now ? { now: o.now } : {}));
|
|
52
|
+
if (f.status !== "released")
|
|
53
|
+
waitDays = f.waitDays;
|
|
54
|
+
} catch (e2) {
|
|
55
|
+
problems.push(`The release forecast couldn't be worked out: ${e2.message.split("\n")[0]}`);
|
|
56
|
+
}
|
|
57
|
+
const flows = t.merged.map((m) => ({
|
|
58
|
+
flow: m.flow,
|
|
59
|
+
repo: m.repo,
|
|
60
|
+
change: m.change,
|
|
61
|
+
trigger: m.trigger.kind,
|
|
62
|
+
file: `${t.source}/${m.flow}.yaml`,
|
|
63
|
+
steps: m.steps.map((s) => ({
|
|
64
|
+
mark: s.mark,
|
|
65
|
+
kind: s.kind,
|
|
66
|
+
...s.today !== void 0 ? { today: s.today } : {},
|
|
67
|
+
...s.target !== void 0 ? { target: s.target } : {},
|
|
68
|
+
...s.what ? { what: s.what } : {},
|
|
69
|
+
...s.to ? { to: s.to } : {},
|
|
70
|
+
...s.store ? { store: s.store } : {},
|
|
71
|
+
...s.confirmedBy ? { confirmedBy: s.confirmedBy } : {}
|
|
72
|
+
}))
|
|
73
|
+
}));
|
|
74
|
+
const e = estimateChange({
|
|
75
|
+
change,
|
|
76
|
+
flows,
|
|
77
|
+
...estimates ? { table: estimates } : {},
|
|
78
|
+
boundaryOf,
|
|
79
|
+
openBlocking,
|
|
80
|
+
conflicts,
|
|
81
|
+
...waitDays !== void 0 ? { waitDays } : {}
|
|
82
|
+
});
|
|
83
|
+
return {
|
|
84
|
+
...e,
|
|
85
|
+
title: t.title,
|
|
86
|
+
source: t.source,
|
|
87
|
+
...estimates ? { table: `${relative(root, orgPackDirOf(root)).split(sep).join("/")}/estimates.yaml` } : {},
|
|
88
|
+
problems
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
var units = (n) => `${n} unit${n === 1 ? "" : "s"} of work`;
|
|
92
|
+
var range = (d) => `${d.p20}-${d.p80} days (p50 ${d.p50})`;
|
|
93
|
+
async function changeEstimateCommand(root, change, o, io) {
|
|
94
|
+
const e = await estimateOf(root, change, o.now ? { now: o.now } : {});
|
|
95
|
+
if (!e) {
|
|
96
|
+
io.err(`There is no change ${change}.`);
|
|
97
|
+
return 2;
|
|
98
|
+
}
|
|
99
|
+
if (o.json) {
|
|
100
|
+
io.out(JSON.stringify(e, null, 2));
|
|
101
|
+
return 0;
|
|
102
|
+
}
|
|
103
|
+
for (const p of e.problems)
|
|
104
|
+
io.err(p);
|
|
105
|
+
if (!e.units.length) {
|
|
106
|
+
io.err(`${change} has no target flows yet, so there is nothing to size: the architecture stage writes them (atticus change architecture ${change}).`);
|
|
107
|
+
return 1;
|
|
108
|
+
}
|
|
109
|
+
io.out(`Estimate for ${change}: ${e.title}`);
|
|
110
|
+
io.out(e.effort ? `Effort: ${range(e.effort)}, from ${e.units.length - e.needsClass} of ${units(e.units.length)}.` : `Size: ${units(e.units.length)}. No days: ${e.table ? "no class in the org pack's estimates.yaml matches them" : "the org pack has no estimates.yaml"}.`);
|
|
111
|
+
if (e.calendar.waitDays !== void 0)
|
|
112
|
+
io.out(`Waiting (the release forecast): ${e.calendar.waitDays} working days${e.calendar.longer ? `; the ${e.calendar.longer} is longer` : ""}.`);
|
|
113
|
+
io.out(e.calibration.source ? `Not calibrated yet: the ranges are ${e.calibration.source}'s, from ${e.table}.` : "Not calibrated yet.");
|
|
114
|
+
if (e.drivers.length) {
|
|
115
|
+
io.out("Drivers:");
|
|
116
|
+
for (const d of e.drivers)
|
|
117
|
+
io.out(` ${d.what}: ${d.count}${d.widens ? ` (widens the upper end by ${d.widens}x)` : ""}${d.source ? ` ${d.source}` : ""}`);
|
|
118
|
+
}
|
|
119
|
+
io.out("Work:");
|
|
120
|
+
for (const u of e.units)
|
|
121
|
+
io.out(` ${u.repo} ${u.flow}${u.step !== void 0 ? ` step ${u.step}` : ""} ${u.class} ${u.days ? range(u.days) : "needs a class"} ${u.what}`);
|
|
122
|
+
return 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export {
|
|
126
|
+
estimateOf,
|
|
127
|
+
changeEstimateCommand
|
|
128
|
+
};
|