@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,203 @@
|
|
|
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
|
+
buildSite,
|
|
8
|
+
catalogRecords,
|
|
9
|
+
openChanges
|
|
10
|
+
} from "./chunk-B2WLAWNJ.js";
|
|
11
|
+
import {
|
|
12
|
+
doctorChecks
|
|
13
|
+
} from "./chunk-AIOQPLA5.js";
|
|
14
|
+
import {
|
|
15
|
+
readProbes,
|
|
16
|
+
whatRunsWhere
|
|
17
|
+
} from "./chunk-IPKHE5D6.js";
|
|
18
|
+
import {
|
|
19
|
+
baseClonePath,
|
|
20
|
+
loadRepos
|
|
21
|
+
} from "./chunk-EFHQ3TWP.js";
|
|
22
|
+
import {
|
|
23
|
+
CatalogBaseline,
|
|
24
|
+
DEFAULT_RUNTIME,
|
|
25
|
+
WORKSPACE_SCHEMA_VERSION,
|
|
26
|
+
catalogDirOf,
|
|
27
|
+
inputsDirOf,
|
|
28
|
+
loadOrgPack,
|
|
29
|
+
orgPackDirOf,
|
|
30
|
+
require_dist
|
|
31
|
+
} from "./chunk-S2A7YC3Q.js";
|
|
32
|
+
import {
|
|
33
|
+
__toESM
|
|
34
|
+
} from "./chunk-TV45EUGM.js";
|
|
35
|
+
|
|
36
|
+
// packages/cli/dist/baseline-commands.js
|
|
37
|
+
var import_yaml = __toESM(require_dist(), 1);
|
|
38
|
+
import { readdir, readFile, stat, writeFile } from "node:fs/promises";
|
|
39
|
+
import { join, resolve } from "node:path";
|
|
40
|
+
var BASELINE_FILE = "baseline.yaml";
|
|
41
|
+
async function readBaseline(root) {
|
|
42
|
+
try {
|
|
43
|
+
const r = CatalogBaseline.safeParse((0, import_yaml.parse)(await readFile(join(catalogDirOf(root), BASELINE_FILE), "utf8")));
|
|
44
|
+
return r.success ? r.data : void 0;
|
|
45
|
+
} catch {
|
|
46
|
+
return void 0;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
async function countFiles(dir) {
|
|
50
|
+
try {
|
|
51
|
+
const all = await readdir(dir, { recursive: true, withFileTypes: true });
|
|
52
|
+
return all.filter((e) => e.isFile()).length;
|
|
53
|
+
} catch {
|
|
54
|
+
return 0;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async function setupSteps(root, o = {}) {
|
|
58
|
+
const clonedOf = async (repos2) => (await Promise.all(repos2.map((r) => stat(join(baseClonePath(root, r.id), ".git")).then(() => true, () => false)))).filter(Boolean).length;
|
|
59
|
+
const [doctor, op, repos, records, inputs, baseline, probes] = await Promise.all([
|
|
60
|
+
o.doctor ?? doctorChecks(root),
|
|
61
|
+
loadOrgPack(orgPackDirOf(root)),
|
|
62
|
+
loadRepos(root).catch(() => []),
|
|
63
|
+
catalogRecords(root),
|
|
64
|
+
countFiles(inputsDirOf(root)),
|
|
65
|
+
readBaseline(root),
|
|
66
|
+
readProbes(root).then((p) => p.results)
|
|
67
|
+
]);
|
|
68
|
+
const failing = doctor.filter((c) => c.status === "fail");
|
|
69
|
+
const cloned = await clonedOf(repos);
|
|
70
|
+
const generated = records.filter((r) => r.evidence.some((e) => e.source !== "manual")).length;
|
|
71
|
+
const wikis = op.sources.wikis.length;
|
|
72
|
+
const steps = [
|
|
73
|
+
{
|
|
74
|
+
id: "machine",
|
|
75
|
+
label: "This machine has what Atticus needs",
|
|
76
|
+
done: failing.length === 0,
|
|
77
|
+
detail: failing.length ? `to fix: ${failing.map((c) => c.label).join(", ")}` : `${doctor.filter((c) => c.status === "warn").length} to look at`,
|
|
78
|
+
fix: failing.length ? `Run atticus doctor: ${failing.map((c) => c.fix ?? c.label).join(" ")}` : "Run atticus doctor for the details."
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: "org-pack",
|
|
82
|
+
label: "The org pack's files are valid",
|
|
83
|
+
done: op.problems.length === 0,
|
|
84
|
+
detail: op.problems.length ? `${op.problems.length} problem${op.problems.length === 1 ? "" : "s"}` : "no problems in its files",
|
|
85
|
+
fix: "Run atticus orgpack validate and fix each problem it names (each says the file and field)."
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
// A new metarepo's org pack is valid as atticus init wrote it, but nobody owns it yet.
|
|
89
|
+
id: "org-pack-owner",
|
|
90
|
+
label: "The org pack has an owner",
|
|
91
|
+
done: !!op.pack?.owner && op.pack.owner !== "unassigned",
|
|
92
|
+
detail: op.pack?.owner && op.pack.owner !== "unassigned" ? op.pack.owner : "unassigned",
|
|
93
|
+
fix: "Set owner in org-pack/pack.yaml to the person who looks after the org pack (normally the platform lead), and commit it through a pull request."
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
// ADR 0121 item 6: how AI runs here is a choice, not the default left by accident.
|
|
97
|
+
id: "ai",
|
|
98
|
+
label: "Choose how AI runs here",
|
|
99
|
+
// runtime.yaml's version alone (1 from an older init, ADR 0121 addendum) isn't a choice.
|
|
100
|
+
done: JSON.stringify({ ...op.runtime, schemaVersion: DEFAULT_RUNTIME.schemaVersion }) !== JSON.stringify(DEFAULT_RUNTIME),
|
|
101
|
+
detail: whatRunsWhere(op.runtime, { probes }),
|
|
102
|
+
fix: "Choose the assistants, the modes and the model provider on Set up \u203A AI in the app (or in org-pack/runtime.yaml), and commit it through a pull request. As atticus init wrote it, steps are handed to Copilot, which needs nothing more.",
|
|
103
|
+
optional: true
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: "repos",
|
|
107
|
+
label: "Repos are listed",
|
|
108
|
+
done: repos.length > 0,
|
|
109
|
+
detail: `${repos.length} repo${repos.length === 1 ? "" : "s"} in the manifests`,
|
|
110
|
+
fix: "Run atticus repos discover <folder> (or --org <org>) and add what it proposes to repos.manifest.yaml."
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
id: "clones",
|
|
114
|
+
label: "Repos are cloned here",
|
|
115
|
+
done: repos.length > 0 && cloned === repos.length,
|
|
116
|
+
detail: `${cloned} of ${repos.length} cloned`,
|
|
117
|
+
fix: "Run atticus workspace sync (or Sync repos on the Scans screen); it clones what's missing."
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
// ADR 0124: your assistant reads each repo and writes its facts; Atticus checks every one
|
|
121
|
+
// against its line and puts them in the catalog. The id stays: the app keys on it.
|
|
122
|
+
id: "scan",
|
|
123
|
+
label: "Every repo is read and verified",
|
|
124
|
+
done: generated > 0,
|
|
125
|
+
detail: `${records.length} record${records.length === 1 ? "" : "s"} in the catalog`,
|
|
126
|
+
fix: "Read each repo: /atticus-map <repo> in your assistant (or atticus map <repo>), then atticus verify <repo> --write. Verify checks every fact against the line it cites and runs no model."
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: "knowledge",
|
|
130
|
+
label: "Existing knowledge is added",
|
|
131
|
+
done: inputs > 0 || wikis > 0,
|
|
132
|
+
detail: `${inputs} file${inputs === 1 ? "" : "s"} in inputs/, ${wikis} wiki source${wikis === 1 ? "" : "s"}`,
|
|
133
|
+
fix: "Drop diagrams, partner specs and exports into inputs/ (atticus intake add <files>), and add wikis to sources.yaml (atticus sources add).",
|
|
134
|
+
optional: true
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
id: "baseline",
|
|
138
|
+
label: "The catalog is accepted",
|
|
139
|
+
done: !!baseline,
|
|
140
|
+
detail: baseline ? `accepted by ${baseline.acceptedBy} on ${baseline.acceptedAt.slice(0, 10)}` : "not yet",
|
|
141
|
+
fix: "Walk the ecosystem map with the architect, then accept it: atticus baseline (or Accept the catalog on Home), and commit catalog/baseline.yaml through a pull request."
|
|
142
|
+
}
|
|
143
|
+
];
|
|
144
|
+
return { steps, baselined: !!baseline };
|
|
145
|
+
}
|
|
146
|
+
async function setupCommand(root, o, io) {
|
|
147
|
+
const s = await setupSteps(root);
|
|
148
|
+
const open = s.steps.filter((x) => !x.done && !x.optional);
|
|
149
|
+
if (o.json)
|
|
150
|
+
io.out(JSON.stringify(s, null, 2));
|
|
151
|
+
else {
|
|
152
|
+
for (const x of s.steps) {
|
|
153
|
+
io.out(`${x.done ? "[x]" : "[ ]"} ${x.label}: ${x.detail}${x.optional ? " (optional)" : ""}`);
|
|
154
|
+
if (!x.done && x.fix)
|
|
155
|
+
io.out(` ${x.fix}`);
|
|
156
|
+
}
|
|
157
|
+
io.out(open.length ? `${open.length} step${open.length === 1 ? "" : "s"} to go.` : "Setup is done: the catalog is accepted.");
|
|
158
|
+
}
|
|
159
|
+
return open.length ? 1 : 0;
|
|
160
|
+
}
|
|
161
|
+
async function baselineCommand(root, o, io) {
|
|
162
|
+
if (!o.by) {
|
|
163
|
+
io.err("Usage: atticus baseline [--by <you>] [--note <text>] [--site <dir>]");
|
|
164
|
+
return 2;
|
|
165
|
+
}
|
|
166
|
+
const records = await catalogRecords(root, io);
|
|
167
|
+
if (records.length === 0) {
|
|
168
|
+
io.err("The catalog is empty: read the repos first (atticus map <repo>, then atticus verify <repo> --write), then walk the map and accept it.");
|
|
169
|
+
return 1;
|
|
170
|
+
}
|
|
171
|
+
const kinds = {};
|
|
172
|
+
for (const r of records)
|
|
173
|
+
kinds[r.kind] = (kinds[r.kind] ?? 0) + 1;
|
|
174
|
+
const systems = records.filter((r) => r.kind === "System").map((r) => r.id).sort();
|
|
175
|
+
const b = CatalogBaseline.parse({
|
|
176
|
+
schemaVersion: WORKSPACE_SCHEMA_VERSION,
|
|
177
|
+
acceptedBy: o.by,
|
|
178
|
+
acceptedAt: o.now ?? (/* @__PURE__ */ new Date()).toISOString().replace(/\.\d{3}Z$/, "Z"),
|
|
179
|
+
kinds: Object.fromEntries(Object.entries(kinds).sort(([a], [b2]) => a.localeCompare(b2))),
|
|
180
|
+
systems,
|
|
181
|
+
...o.note ? { note: o.note } : {}
|
|
182
|
+
});
|
|
183
|
+
await writeFile(join(catalogDirOf(root), BASELINE_FILE), (0, import_yaml.stringify)(b), "utf8");
|
|
184
|
+
io.out(`Accepted the catalog as the baseline as ${o.by}: ${records.length} records in ${Object.keys(kinds).length} kinds, ${systems.length} systems. Wrote catalog/${BASELINE_FILE}; commit it with the catalog and open a pull request, whose merge makes it the baseline on main.`);
|
|
185
|
+
if (o.site) {
|
|
186
|
+
const dir = resolve(o.site);
|
|
187
|
+
const s = await buildSite(records, dir, {
|
|
188
|
+
title: "Catalog",
|
|
189
|
+
builtAt: b.acceptedAt.slice(0, 10),
|
|
190
|
+
changes: await openChanges(root)
|
|
191
|
+
});
|
|
192
|
+
io.out(`Wrote the read-only catalog site to ${dir} (${s.systems.length} systems).`);
|
|
193
|
+
}
|
|
194
|
+
return 0;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export {
|
|
198
|
+
BASELINE_FILE,
|
|
199
|
+
readBaseline,
|
|
200
|
+
setupSteps,
|
|
201
|
+
setupCommand,
|
|
202
|
+
baselineCommand
|
|
203
|
+
};
|
|
@@ -0,0 +1,334 @@
|
|
|
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 "./chunk-GLUX4EEP.js";
|
|
7
|
+
import {
|
|
8
|
+
loadCatalog
|
|
9
|
+
} from "./chunk-FITWGOJ2.js";
|
|
10
|
+
import {
|
|
11
|
+
repoFor
|
|
12
|
+
} from "./chunk-O3WI5KWW.js";
|
|
13
|
+
import {
|
|
14
|
+
recordFact,
|
|
15
|
+
verifyScan
|
|
16
|
+
} from "./chunk-KEM4SDDP.js";
|
|
17
|
+
import "./chunk-ZVM6AKKM.js";
|
|
18
|
+
import {
|
|
19
|
+
stepJudges
|
|
20
|
+
} from "./chunk-CKSITVS4.js";
|
|
21
|
+
import "./chunk-L6SGQIR3.js";
|
|
22
|
+
import "./chunk-3HI6Z55Y.js";
|
|
23
|
+
import "./chunk-XY3P7JW7.js";
|
|
24
|
+
import "./chunk-4AK7IBVP.js";
|
|
25
|
+
import "./chunk-7JUKDRSZ.js";
|
|
26
|
+
import {
|
|
27
|
+
checkScanSettings
|
|
28
|
+
} from "./chunk-27NKUS3X.js";
|
|
29
|
+
import "./chunk-L24C55VN.js";
|
|
30
|
+
import "./chunk-PAMPPUR6.js";
|
|
31
|
+
import "./chunk-23W7VWKR.js";
|
|
32
|
+
import "./chunk-7EKXJZ2Y.js";
|
|
33
|
+
import "./chunk-MC3H7736.js";
|
|
34
|
+
import "./chunk-T6AIP7H5.js";
|
|
35
|
+
import "./chunk-EFHQ3TWP.js";
|
|
36
|
+
import {
|
|
37
|
+
fsRepo
|
|
38
|
+
} from "./chunk-GQ4N4WKF.js";
|
|
39
|
+
import "./chunk-CNUKCS2T.js";
|
|
40
|
+
import {
|
|
41
|
+
SCAN_VERIFY_SCHEMA_VERSION,
|
|
42
|
+
ScanSettings,
|
|
43
|
+
ScanVerifyProposal,
|
|
44
|
+
listQuestions,
|
|
45
|
+
loadOrgPack,
|
|
46
|
+
orgPackDirOf,
|
|
47
|
+
proposalsDirOf,
|
|
48
|
+
proposalsRelOf,
|
|
49
|
+
questionsRelOf,
|
|
50
|
+
raiseQuestions,
|
|
51
|
+
require_dist,
|
|
52
|
+
reusedLine
|
|
53
|
+
} from "./chunk-S2A7YC3Q.js";
|
|
54
|
+
import "./chunk-D3PO4DOZ.js";
|
|
55
|
+
import {
|
|
56
|
+
__toESM
|
|
57
|
+
} from "./chunk-TV45EUGM.js";
|
|
58
|
+
|
|
59
|
+
// packages/cli/dist/scan-verify-commands.js
|
|
60
|
+
var import_yaml = __toESM(require_dist(), 1);
|
|
61
|
+
import { createHash } from "node:crypto";
|
|
62
|
+
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
63
|
+
import { join } from "node:path";
|
|
64
|
+
var plural = (n, one, many = `${one}s`) => `${n} ${n === 1 ? one : many}`;
|
|
65
|
+
var KIND_WORDS = {
|
|
66
|
+
"entry-point": "entry point",
|
|
67
|
+
call: "call",
|
|
68
|
+
table: "table",
|
|
69
|
+
deployment: "deployment",
|
|
70
|
+
other: "fact"
|
|
71
|
+
};
|
|
72
|
+
var fixWords = (f) => "settings" in f ? "a scan settings entry" : "question" in f ? "a question for a person" : "a reader must change";
|
|
73
|
+
var sentence = (s) => {
|
|
74
|
+
const t = s.trim();
|
|
75
|
+
return `${t.charAt(0).toUpperCase()}${t.slice(1)}${/[.!?]$/.test(t) ? "" : "."}`;
|
|
76
|
+
};
|
|
77
|
+
var proposalFile = (root, repo) => join(proposalsDirOf(root), "scan", `${repo}.yaml`);
|
|
78
|
+
var findingsFile = (root, repo) => join(proposalsDirOf(root), "scan", `${repo}.findings.md`);
|
|
79
|
+
var EMPTY = { exclude: [], prefixes: [], clients: [] };
|
|
80
|
+
function newEntries(have, add) {
|
|
81
|
+
const ex = (e) => e.path;
|
|
82
|
+
const px = (p) => `${p.paths.join(",")} ${p.prefix}`;
|
|
83
|
+
const cl = (c) => `${c.paths.join(",")} ${c.base} ${c.names.join(",")}`;
|
|
84
|
+
const fresh = (had, more, key) => {
|
|
85
|
+
const seen = new Set(had.map(key));
|
|
86
|
+
return more.filter((x) => {
|
|
87
|
+
const k = key(x);
|
|
88
|
+
if (seen.has(k))
|
|
89
|
+
return false;
|
|
90
|
+
seen.add(k);
|
|
91
|
+
return true;
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
return {
|
|
95
|
+
exclude: fresh(have.exclude, add.exclude, ex),
|
|
96
|
+
prefixes: fresh(have.prefixes, add.prefixes, px),
|
|
97
|
+
clients: fresh(have.clients, add.clients, cl)
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
var merge = (a, b) => {
|
|
101
|
+
const n = newEntries(a, b);
|
|
102
|
+
return {
|
|
103
|
+
exclude: [...a.exclude, ...n.exclude],
|
|
104
|
+
prefixes: [...a.prefixes, ...n.prefixes],
|
|
105
|
+
clients: [...a.clients, ...n.clients]
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
var size = (s) => s.exclude.length + s.prefixes.length + s.clients.length;
|
|
109
|
+
var describeSettings = (s) => [
|
|
110
|
+
s.exclude.length ? plural(s.exclude.length, "folder") + " left out" : "",
|
|
111
|
+
s.prefixes.length ? plural(s.prefixes.length, "prefix", "prefixes") : "",
|
|
112
|
+
s.clients.length ? plural(s.clients.length, "client base") : ""
|
|
113
|
+
].filter(Boolean).join(", ");
|
|
114
|
+
async function readProposal(root, repo) {
|
|
115
|
+
const text = await readFile(proposalFile(root, repo), "utf8").catch(() => void 0);
|
|
116
|
+
return text === void 0 ? void 0 : ScanVerifyProposal.parse((0, import_yaml.parse)(text));
|
|
117
|
+
}
|
|
118
|
+
async function writeProposal(root, p) {
|
|
119
|
+
await mkdir(join(proposalsDirOf(root), "scan"), { recursive: true });
|
|
120
|
+
await writeFile(proposalFile(root, p.repo), `# From atticus scan verify (ADR 0082): every item was checked against the code. Accept the settings with atticus scan verify ${p.repo} --accept.
|
|
121
|
+
${(0, import_yaml.stringify)(ScanVerifyProposal.parse(p))}`, "utf8");
|
|
122
|
+
}
|
|
123
|
+
var ofRepo = (records, repo) => records.filter((r) => r.evidence.some((e) => e.repo === repo));
|
|
124
|
+
async function pin(repo, r) {
|
|
125
|
+
const e = r.evidence.find((x) => x.path) ?? r.evidence[0];
|
|
126
|
+
if (!e?.path)
|
|
127
|
+
return { record: r.id, at: "?" };
|
|
128
|
+
if (!e.line)
|
|
129
|
+
return { record: r.id, at: e.path };
|
|
130
|
+
const text = await repo.readText(e.path).catch(() => void 0);
|
|
131
|
+
const line = text?.replace(/\r\n?/g, "\n").split("\n")[e.line - 1];
|
|
132
|
+
return {
|
|
133
|
+
record: r.id,
|
|
134
|
+
at: `${e.path}:${e.line}`,
|
|
135
|
+
...line !== void 0 ? { line: createHash("sha256").update(line.trim()).digest("hex").slice(0, 12) } : {}
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
function findings(repo, r, now, records) {
|
|
139
|
+
const a = r.answer;
|
|
140
|
+
const items = [];
|
|
141
|
+
for (const m of a.missed)
|
|
142
|
+
if ("reader" in m.fix)
|
|
143
|
+
items.push(`- Missed the ${KIND_WORDS[m.kind]} ${m.method ? `${m.method} ` : ""}${m.name} at ${m.at}. ${sentence(m.why)} What must change: ${sentence(m.fix.reader)}`);
|
|
144
|
+
for (const w of a.wrong)
|
|
145
|
+
if ("reader" in w.fix) {
|
|
146
|
+
const rec = records.find((x) => x.id === w.record);
|
|
147
|
+
const f = rec ? recordFact(rec) : void 0;
|
|
148
|
+
items.push(`- Wrong: ${w.record}${f ? ` (the ${KIND_WORDS[f.kind]} ${f.method ? `${f.method} ` : ""}${f.name})` : ""}, shown by ${w.at}. ${sentence(w.why)} What must change: ${sentence(w.fix.reader)}`);
|
|
149
|
+
}
|
|
150
|
+
const text = [
|
|
151
|
+
`# What the scan of ${repo} reads wrong`,
|
|
152
|
+
"",
|
|
153
|
+
`Found by atticus scan verify on ${now.toISOString().slice(0, 10)}${r.runId ? ` (run ${r.runId})` : ""}. No scan setting can put these right: each needs a change to a built-in reader or a scanner plugin (ADR 0080). Atticus checked that each cited line says what is quoted.`,
|
|
154
|
+
"",
|
|
155
|
+
...items.length ? items : ["Nothing this time."],
|
|
156
|
+
""
|
|
157
|
+
].join("\n");
|
|
158
|
+
return { text, count: items.length };
|
|
159
|
+
}
|
|
160
|
+
async function scanVerify(root, target, o, deps, io) {
|
|
161
|
+
const repo = await repoFor(root, target);
|
|
162
|
+
if (!repo) {
|
|
163
|
+
io.err(`${target} isn't a cloned repo of the manifest or a folder; clone it with atticus workspace sync, or give its folder.`);
|
|
164
|
+
return 2;
|
|
165
|
+
}
|
|
166
|
+
const { records: all } = await loadCatalog(root, { out: () => {
|
|
167
|
+
}, err: (l) => io.err(l) });
|
|
168
|
+
const records = ofRepo(all, repo.id);
|
|
169
|
+
if (records.length === 0) {
|
|
170
|
+
io.err(`The catalog has nothing from ${repo.id} yet: run atticus scan first.`);
|
|
171
|
+
return 1;
|
|
172
|
+
}
|
|
173
|
+
const op = await loadOrgPack(orgPackDirOf(root));
|
|
174
|
+
const settings = op.scanSettings.find((s) => s.repo === repo.id);
|
|
175
|
+
const before = await listQuestions(root, { repo: repo.id }).then((l) => ({
|
|
176
|
+
...l,
|
|
177
|
+
questions: l.questions.filter((q) => q.state !== "retired")
|
|
178
|
+
}));
|
|
179
|
+
const handle = fsRepo(repo.id, repo.dir, "0".repeat(40));
|
|
180
|
+
const now = deps.now ?? /* @__PURE__ */ new Date();
|
|
181
|
+
const r = await verifyScan(handle, {
|
|
182
|
+
repoId: repo.id,
|
|
183
|
+
runtime: deps.runtime,
|
|
184
|
+
records,
|
|
185
|
+
...settings ? { settings } : {},
|
|
186
|
+
orgPack: op,
|
|
187
|
+
maxAttempts: o.attempts ?? 3,
|
|
188
|
+
questions: before.questions,
|
|
189
|
+
now,
|
|
190
|
+
...o.resume ? { resume: o.resume } : {}
|
|
191
|
+
});
|
|
192
|
+
if (r.status === "waiting") {
|
|
193
|
+
io.out(`Handed the check to your assistant (run ${r.runId}). When it is done: atticus handoff done ${r.runId}, then atticus scan verify ${repo.id} --resume ${r.runId}`);
|
|
194
|
+
return 0;
|
|
195
|
+
}
|
|
196
|
+
const handedBack = r.attempts.filter((x, n) => x.problems.length > 0 && n < r.attempts.length - 1);
|
|
197
|
+
if (r.status !== "checked" || !r.answer) {
|
|
198
|
+
if (o.json)
|
|
199
|
+
io.out(JSON.stringify({ status: r.status, attempts: r.attempts }, null, 2));
|
|
200
|
+
else {
|
|
201
|
+
for (const a2 of r.attempts) {
|
|
202
|
+
io.out(`Attempt ${a2.attempt}: ${plural(a2.problems.length, "problem")}:`);
|
|
203
|
+
for (const p of a2.problems)
|
|
204
|
+
io.out(` - ${p}`);
|
|
205
|
+
}
|
|
206
|
+
io.out(`No answer could be read in ${plural(r.attempts.length, "attempt")}; nothing was written.`);
|
|
207
|
+
}
|
|
208
|
+
return 1;
|
|
209
|
+
}
|
|
210
|
+
const a = r.answer;
|
|
211
|
+
let fixes = EMPTY;
|
|
212
|
+
for (const item of [...a.missed, ...a.wrong])
|
|
213
|
+
if ("settings" in item.fix)
|
|
214
|
+
fixes = merge(fixes, item.fix.settings);
|
|
215
|
+
const earlier = await readProposal(root, repo.id).catch(() => void 0);
|
|
216
|
+
const proposed = newEntries(settings ?? EMPTY, merge(earlier?.settings ?? EMPTY, fixes));
|
|
217
|
+
const drafts = [...a.missed, ...a.wrong].flatMap((x) => "question" in x.fix ? [x.fix.question] : []);
|
|
218
|
+
const judges = stepJudges(root, deps.runtime, repo.id, now);
|
|
219
|
+
const { raised, known, reused } = await raiseQuestions(root, drafts, {
|
|
220
|
+
step: "scan-verify",
|
|
221
|
+
repo: repo.id,
|
|
222
|
+
command: `atticus scan verify ${repo.id}`,
|
|
223
|
+
rerun: `atticus scan verify ${repo.id}`,
|
|
224
|
+
...r.runId ? { run: r.runId } : {},
|
|
225
|
+
at: now.toISOString()
|
|
226
|
+
}, judges);
|
|
227
|
+
const byId = new Map(records.map((x) => [x.id, x]));
|
|
228
|
+
const verified = await Promise.all(a.confirmed.map((c) => c.record).sort().map((id) => pin(handle, byId.get(id))));
|
|
229
|
+
const proposal = {
|
|
230
|
+
schemaVersion: SCAN_VERIFY_SCHEMA_VERSION,
|
|
231
|
+
repo: repo.id,
|
|
232
|
+
...r.runId ? { run: r.runId } : {},
|
|
233
|
+
at: now.toISOString(),
|
|
234
|
+
settings: proposed,
|
|
235
|
+
missed: a.missed,
|
|
236
|
+
wrong: a.wrong.map((w) => ({ ...w, ...recordFact(byId.get(w.record)) })),
|
|
237
|
+
verified,
|
|
238
|
+
questions: [...new Set([...raised, ...known].map((q) => q.id))].sort(),
|
|
239
|
+
...earlier?.accepted ? { accepted: earlier.accepted } : {}
|
|
240
|
+
};
|
|
241
|
+
await writeProposal(root, proposal);
|
|
242
|
+
const f = findings(repo.id, r, now, records);
|
|
243
|
+
await writeFile(findingsFile(root, repo.id), f.text, "utf8");
|
|
244
|
+
const rel = proposalsRelOf(root);
|
|
245
|
+
if (o.json) {
|
|
246
|
+
io.out(JSON.stringify({
|
|
247
|
+
status: r.status,
|
|
248
|
+
proposal,
|
|
249
|
+
refused: r.refused,
|
|
250
|
+
attempts: r.attempts,
|
|
251
|
+
questions: { raised: raised.map((q) => q.id), known: known.map((q) => q.id) },
|
|
252
|
+
files: {
|
|
253
|
+
proposal: `${rel}/scan/${repo.id}.yaml`,
|
|
254
|
+
findings: `${rel}/scan/${repo.id}.findings.md`
|
|
255
|
+
}
|
|
256
|
+
}, null, 2));
|
|
257
|
+
return 0;
|
|
258
|
+
}
|
|
259
|
+
io.out(`Checked ${repo.id} against its last scan: ${a.missed.length} missed, ${a.wrong.length} wrong, ${a.confirmed.length} confirmed.`);
|
|
260
|
+
for (const at of handedBack) {
|
|
261
|
+
io.out(`Attempt ${at.attempt}: ${plural(at.problems.length, "problem")}, handed back:`);
|
|
262
|
+
for (const p of at.problems)
|
|
263
|
+
io.out(` - ${p}`);
|
|
264
|
+
}
|
|
265
|
+
if (r.refused.length) {
|
|
266
|
+
io.out("Left out, because the last attempt still failed its checks:");
|
|
267
|
+
for (const p of r.refused)
|
|
268
|
+
io.out(` - ${p}`);
|
|
269
|
+
}
|
|
270
|
+
for (const m of a.missed)
|
|
271
|
+
io.out(` missed: ${KIND_WORDS[m.kind]} ${m.method ? `${m.method} ` : ""}${m.name} (${m.at}); ${fixWords(m.fix)}`);
|
|
272
|
+
for (const w of a.wrong)
|
|
273
|
+
io.out(` wrong: ${w.record} (${w.at}); ${fixWords(w.fix)}`);
|
|
274
|
+
io.out(`Wrote ${rel}/scan/${repo.id}.yaml: ${plural(size(proposed), "settings entry", "settings entries")} to accept, ${plural(verified.length, "record")} confirmed.`);
|
|
275
|
+
if (f.count)
|
|
276
|
+
io.out(`Wrote ${rel}/scan/${repo.id}.findings.md: ${plural(f.count, "thing")} a reader or a scanner plugin must read differently.`);
|
|
277
|
+
const waiting = known.filter((q) => q.state === "open");
|
|
278
|
+
if (raised.length) {
|
|
279
|
+
io.out(`${plural(raised.length, "question")} for a person, in ${questionsRelOf(root)}/:`);
|
|
280
|
+
for (const q of raised)
|
|
281
|
+
io.out(` ${q.id} ${q.question}`);
|
|
282
|
+
}
|
|
283
|
+
for (const q of reused)
|
|
284
|
+
io.out(reusedLine(q));
|
|
285
|
+
if (waiting.length)
|
|
286
|
+
io.out(`${plural(waiting.length, "question")} still waiting for an answer: ${waiting.map((q) => q.id).join(", ")}`);
|
|
287
|
+
if (raised.length + waiting.length)
|
|
288
|
+
io.out(`Answer with atticus questions answer <id> --option <n>, or on the app's Questions page; then run atticus scan verify ${repo.id} again.`);
|
|
289
|
+
io.out(size(proposed) ? `Next: review ${rel}/scan/${repo.id}.yaml, then atticus scan verify ${repo.id} --accept, and atticus scan.` : `Next: nothing to accept; see ${rel}/scan/${repo.id}.findings.md for what a reader must change.`);
|
|
290
|
+
return 0;
|
|
291
|
+
}
|
|
292
|
+
async function scanVerifyAccept(root, target, o, io) {
|
|
293
|
+
const repo = await repoFor(root, target);
|
|
294
|
+
if (!repo) {
|
|
295
|
+
io.err(`${target} isn't a cloned repo of the manifest or a folder; clone it with atticus workspace sync, or give its folder.`);
|
|
296
|
+
return 2;
|
|
297
|
+
}
|
|
298
|
+
const proposal = await readProposal(root, repo.id);
|
|
299
|
+
if (!proposal) {
|
|
300
|
+
io.err(`There is no proposal for ${repo.id} yet: run atticus scan verify ${repo.id} first.`);
|
|
301
|
+
return 1;
|
|
302
|
+
}
|
|
303
|
+
if (size(proposal.settings) === 0) {
|
|
304
|
+
io.out(`Nothing to accept for ${repo.id}: the proposal has no settings entries.`);
|
|
305
|
+
return 0;
|
|
306
|
+
}
|
|
307
|
+
const file = join(orgPackDirOf(root), "scan", `${repo.id}.yaml`);
|
|
308
|
+
const text = await readFile(file, "utf8").catch(() => void 0);
|
|
309
|
+
const have = text ? ScanSettings.parse((0, import_yaml.parse)(text)) : ScanSettings.parse({ schemaVersion: 1, repo: repo.id });
|
|
310
|
+
const added = newEntries(have, proposal.settings);
|
|
311
|
+
const next = ScanSettings.parse({ ...have, ...merge(have, added) });
|
|
312
|
+
const checked = await checkScanSettings(next, fsRepo(repo.id, repo.dir, "0".repeat(40)));
|
|
313
|
+
if (checked.problems.length) {
|
|
314
|
+
io.err(`The settings no longer check out against the code, so nothing was merged:`);
|
|
315
|
+
for (const p of checked.problems)
|
|
316
|
+
io.err(` - ${p}`);
|
|
317
|
+
return 1;
|
|
318
|
+
}
|
|
319
|
+
const now = o.now ?? /* @__PURE__ */ new Date();
|
|
320
|
+
await mkdir(join(orgPackDirOf(root), "scan"), { recursive: true });
|
|
321
|
+
await writeFile(file, `# Scan settings for ${repo.id} (ADR 0075); entries accepted from atticus scan verify on ${now.toISOString().slice(0, 10)} by ${o.by} (ADR 0082). Review it like any org-pack change.
|
|
322
|
+
${(0, import_yaml.stringify)(next)}`, "utf8");
|
|
323
|
+
await writeProposal(root, {
|
|
324
|
+
...proposal,
|
|
325
|
+
settings: EMPTY,
|
|
326
|
+
accepted: { at: now.toISOString(), by: o.by, entries: size(added) }
|
|
327
|
+
});
|
|
328
|
+
io.out(`Merged ${plural(size(added), "entry", "entries")} into org-pack/scan/${repo.id}.yaml${size(added) ? `: ${describeSettings(added)}` : ""}. Review it in a pull request, then run atticus scan.`);
|
|
329
|
+
return 0;
|
|
330
|
+
}
|
|
331
|
+
export {
|
|
332
|
+
scanVerify,
|
|
333
|
+
scanVerifyAccept
|
|
334
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
codeToolOptions,
|
|
8
|
+
criticCodeSearch,
|
|
9
|
+
metarepoToolBox,
|
|
10
|
+
offerCodeDir
|
|
11
|
+
} from "./chunk-ZVM6AKKM.js";
|
|
12
|
+
import "./chunk-T6AIP7H5.js";
|
|
13
|
+
import "./chunk-CNUKCS2T.js";
|
|
14
|
+
import "./chunk-S2A7YC3Q.js";
|
|
15
|
+
import "./chunk-D3PO4DOZ.js";
|
|
16
|
+
import "./chunk-TV45EUGM.js";
|
|
17
|
+
export {
|
|
18
|
+
codeToolOptions,
|
|
19
|
+
criticCodeSearch,
|
|
20
|
+
metarepoToolBox,
|
|
21
|
+
offerCodeDir
|
|
22
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
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
|
+
diffLines
|
|
8
|
+
} from "./chunk-JGZCG5VM.js";
|
|
9
|
+
import "./chunk-RVH5SUW5.js";
|
|
10
|
+
import "./chunk-OT2O76OS.js";
|
|
11
|
+
import "./chunk-IPKHE5D6.js";
|
|
12
|
+
import "./chunk-3HI6Z55Y.js";
|
|
13
|
+
import "./chunk-XY3P7JW7.js";
|
|
14
|
+
import "./chunk-4AK7IBVP.js";
|
|
15
|
+
import "./chunk-7JUKDRSZ.js";
|
|
16
|
+
import {
|
|
17
|
+
diffCatalogs,
|
|
18
|
+
readCatalog,
|
|
19
|
+
scanEstate,
|
|
20
|
+
writeCatalog
|
|
21
|
+
} from "./chunk-27NKUS3X.js";
|
|
22
|
+
import "./chunk-L24C55VN.js";
|
|
23
|
+
import "./chunk-PAMPPUR6.js";
|
|
24
|
+
import "./chunk-23W7VWKR.js";
|
|
25
|
+
import "./chunk-7EKXJZ2Y.js";
|
|
26
|
+
import "./chunk-MC3H7736.js";
|
|
27
|
+
import {
|
|
28
|
+
branchSlug,
|
|
29
|
+
createWorkspace,
|
|
30
|
+
isInPlace,
|
|
31
|
+
loadRepos
|
|
32
|
+
} from "./chunk-EFHQ3TWP.js";
|
|
33
|
+
import "./chunk-GQ4N4WKF.js";
|
|
34
|
+
import "./chunk-CNUKCS2T.js";
|
|
35
|
+
import {
|
|
36
|
+
catalogDirOf,
|
|
37
|
+
require_dist
|
|
38
|
+
} from "./chunk-S2A7YC3Q.js";
|
|
39
|
+
import {
|
|
40
|
+
writeFileAtomic
|
|
41
|
+
} from "./chunk-D3PO4DOZ.js";
|
|
42
|
+
import {
|
|
43
|
+
__toESM
|
|
44
|
+
} from "./chunk-TV45EUGM.js";
|
|
45
|
+
|
|
46
|
+
// packages/cli/dist/branch-scan-commands.js
|
|
47
|
+
var import_yaml = __toESM(require_dist(), 1);
|
|
48
|
+
import { join } from "node:path";
|
|
49
|
+
var branchCatalogRel = (branch) => `branches/${branchSlug(branch)}`;
|
|
50
|
+
var fromRepos = (records, repos) => records.filter((r) => r.evidence.some((e) => e.repo && repos.has(e.repo)));
|
|
51
|
+
async function scanBranch(root, branch, o, io) {
|
|
52
|
+
const all = (await loadRepos(root)).filter((r) => !r.archived && !isInPlace(r.url));
|
|
53
|
+
const named = o.repos?.length ? all.filter((r) => o.repos.includes(r.id)) : void 0;
|
|
54
|
+
const baseline = (named ?? all).filter((r) => r.defaultBranch === branch);
|
|
55
|
+
if (baseline.length) {
|
|
56
|
+
io.err(`${branch} is the default branch of ${baseline.map((r) => r.id).join(", ")}: its catalog is the baseline. Run atticus scan for it.`);
|
|
57
|
+
return 2;
|
|
58
|
+
}
|
|
59
|
+
const repos = named ?? all.filter((r) => r.branches.includes(branch));
|
|
60
|
+
if (!repos.length) {
|
|
61
|
+
io.err(`No repo lists ${branch} under branches in its manifest. Add it there (or on Set up \u203A Repos), or name the repos: atticus scan --ref ${branch} --repos <id>,<id>.`);
|
|
62
|
+
return 2;
|
|
63
|
+
}
|
|
64
|
+
const ws = createWorkspace(root);
|
|
65
|
+
const dirs = /* @__PURE__ */ new Map();
|
|
66
|
+
const commits = [];
|
|
67
|
+
let problems = 0;
|
|
68
|
+
for (const r of repos)
|
|
69
|
+
try {
|
|
70
|
+
const c = await ws.checkoutBranch(r, branch);
|
|
71
|
+
dirs.set(r.id, c.dir);
|
|
72
|
+
commits.push({ id: r.id, commit: c.commit });
|
|
73
|
+
} catch (e) {
|
|
74
|
+
io.err(`${e.message}; it is left out of this scan.`);
|
|
75
|
+
problems++;
|
|
76
|
+
}
|
|
77
|
+
if (!dirs.size)
|
|
78
|
+
return 1;
|
|
79
|
+
const ids = [...dirs.keys()];
|
|
80
|
+
const scannedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
81
|
+
const scan = await scanEstate({
|
|
82
|
+
root,
|
|
83
|
+
repos: ids,
|
|
84
|
+
repoDir: (id) => dirs.get(id),
|
|
85
|
+
// The branch's code only: inputs/ and other metarepos belong to the baseline.
|
|
86
|
+
inputsDir: null,
|
|
87
|
+
federated: [],
|
|
88
|
+
scannedAt,
|
|
89
|
+
...o.full ? { cache: null } : {}
|
|
90
|
+
});
|
|
91
|
+
const rel = branchCatalogRel(branch);
|
|
92
|
+
const dir = join(catalogDirOf(root), ...rel.split("/"));
|
|
93
|
+
const write = await writeCatalog(join(dir, "generated"), scan.records);
|
|
94
|
+
await writeFileAtomic(join(dir, "branch.yaml"), (0, import_yaml.stringify)({ schemaVersion: 1, branch, scannedAt, repos: commits }));
|
|
95
|
+
const ofRepos = new Set(ids);
|
|
96
|
+
const before = await readCatalog(join(catalogDirOf(root), "generated"), { cacheRoot: root });
|
|
97
|
+
const diff = diffCatalogs(fromRepos(before.records, ofRepos), fromRepos(scan.records, ofRepos));
|
|
98
|
+
problems += scan.problems.length;
|
|
99
|
+
if (o.json) {
|
|
100
|
+
io.out(JSON.stringify({ branch, repos: commits, folder: `catalog/${rel}`, diff, problems: scan.problems }, null, 2));
|
|
101
|
+
return problems ? 1 : 0;
|
|
102
|
+
}
|
|
103
|
+
io.out(`Scanned ${branch} of ${ids.join(", ")}: ${scan.records.length} records in catalog/${rel}/generated (${write.written} written, ${write.unchanged} unchanged, ${write.removed} removed).`);
|
|
104
|
+
const lines = diffLines(diff);
|
|
105
|
+
io.out(`${branch} against the baseline: ${lines[0]}`);
|
|
106
|
+
for (const l of lines.slice(1))
|
|
107
|
+
io.out(l);
|
|
108
|
+
for (const p of scan.problems)
|
|
109
|
+
io.err(`${"repo" in p && p.repo ? `${p.repo}: ` : ""}${p.message}`);
|
|
110
|
+
io.out(`The baseline (catalog/generated) is unchanged: a branch is compared with it, never merged into it.`);
|
|
111
|
+
return problems ? 1 : 0;
|
|
112
|
+
}
|
|
113
|
+
export {
|
|
114
|
+
branchCatalogRel,
|
|
115
|
+
scanBranch
|
|
116
|
+
};
|