@maycombhq/atticus 0.0.0-stage → 2.0.0-beta.10
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-23M2LUYM.js +55 -0
- package/dist/chunk-26PLPSQW.js +48 -0
- package/dist/chunk-2G4DFUWJ.js +43 -0
- package/dist/chunk-2HMWX4T6.js +226 -0
- package/dist/chunk-2KDSXJFJ.js +294 -0
- package/dist/chunk-2M6WXO73.js +38 -0
- package/dist/chunk-2RX7PI2Y.js +166 -0
- package/dist/chunk-2XM6PYQQ.js +199 -0
- package/dist/chunk-3G4YI4ZU.js +16 -0
- package/dist/chunk-3GTZ2OON.js +362 -0
- package/dist/chunk-3QAKDIEU.js +108 -0
- package/dist/chunk-47QE246J.js +6115 -0
- package/dist/chunk-4GZXS6S2.js +5401 -0
- package/dist/chunk-4PJADZRR.js +545 -0
- package/dist/chunk-4Q3NN7VF.js +32 -0
- package/dist/chunk-4QUQEBFT.js +143 -0
- package/dist/chunk-4SKZDI62.js +22 -0
- package/dist/chunk-4SVJNVEE.js +80 -0
- package/dist/chunk-52R2YXP5.js +80 -0
- package/dist/chunk-577AJVRS.js +44694 -0
- package/dist/chunk-5F3RJCHB.js +45 -0
- package/dist/chunk-5IALSMZ2.js +34 -0
- package/dist/chunk-5KTOPOEP.js +174 -0
- package/dist/chunk-5MI2SEV5.js +242 -0
- package/dist/chunk-5XDNUJ4P.js +2743 -0
- package/dist/chunk-5XN76FTF.js +22 -0
- package/dist/chunk-5YIBJXGB.js +2007 -0
- package/dist/chunk-62YMDXY6.js +38 -0
- package/dist/chunk-65C57N7P.js +116 -0
- package/dist/chunk-67J3VZBA.js +120 -0
- package/dist/chunk-6EDQE7GO.js +27809 -0
- package/dist/chunk-6GNS32SI.js +285 -0
- package/dist/chunk-6GWHKMQR.js +405 -0
- package/dist/chunk-6JLPXDWN.js +7923 -0
- package/dist/chunk-6TJCUYC5.js +22 -0
- package/dist/chunk-6VBXAGJX.js +234 -0
- package/dist/chunk-73VPWF5R.js +415 -0
- package/dist/chunk-76WKMA4J.js +14 -0
- package/dist/chunk-7DUDLVFJ.js +52 -0
- package/dist/chunk-7EFILTCI.js +67 -0
- package/dist/chunk-7EKESFWV.js +130 -0
- package/dist/chunk-7F2RUWPU.js +101 -0
- package/dist/chunk-7GB4ZRE2.js +378 -0
- package/dist/chunk-7TGYNOXD.js +189 -0
- package/dist/chunk-7UKVYFQ2.js +2078 -0
- package/dist/chunk-7URGP4DD.js +102 -0
- package/dist/chunk-7YYEKTYF.js +2522 -0
- package/dist/chunk-AJJK7GLO.js +252 -0
- package/dist/chunk-AKJTKMXU.js +25 -0
- package/dist/chunk-APSVL2AI.js +344 -0
- package/dist/chunk-AWECWW5Y.js +3206 -0
- package/dist/chunk-AY2IUF4K.js +5071 -0
- package/dist/chunk-B2VSVN4P.js +34 -0
- package/dist/chunk-B3O52AUQ.js +275 -0
- package/dist/chunk-B7434AE2.js +104 -0
- package/dist/chunk-BDEKREZH.js +155 -0
- package/dist/chunk-BJPMKJTL.js +1428 -0
- package/dist/chunk-BMCKL3VQ.js +324 -0
- package/dist/chunk-BMHGA7WD.js +25 -0
- package/dist/chunk-BUYJL3GJ.js +287 -0
- package/dist/chunk-BXIX7S7O.js +32 -0
- package/dist/chunk-CHC5FKTU.js +26 -0
- package/dist/chunk-CITDNDIZ.js +53 -0
- package/dist/chunk-CIUHAHM6.js +70 -0
- package/dist/chunk-CNKGYDMG.js +334 -0
- package/dist/chunk-CRE4BJHM.js +408 -0
- package/dist/chunk-D3PO4DOZ.js +261 -0
- package/dist/chunk-DAQBIK5G.js +47 -0
- package/dist/chunk-DDAHCPGA.js +212 -0
- package/dist/chunk-DPHCFZ7W.js +374 -0
- package/dist/chunk-DZRQDNPT.js +34 -0
- package/dist/chunk-E3JYO547.js +46 -0
- package/dist/chunk-E3Z67HRK.js +104 -0
- package/dist/chunk-EADP3PEN.js +450 -0
- package/dist/chunk-EX6ZXS5K.js +169 -0
- package/dist/chunk-EZIUFEN6.js +27 -0
- package/dist/chunk-F2FOQLJ7.js +430 -0
- package/dist/chunk-F7UQR4ZX.js +149 -0
- package/dist/chunk-F7YL2RZ4.js +94 -0
- package/dist/chunk-FEZE6NIA.js +69 -0
- package/dist/chunk-FJCFYKVO.js +1014 -0
- package/dist/chunk-FLOEZA6K.js +29 -0
- package/dist/chunk-FMKKVWZD.js +133 -0
- package/dist/chunk-FNHSVBRA.js +48 -0
- package/dist/chunk-FOGG4AUR.js +114 -0
- package/dist/chunk-FPGVOSOG.js +41 -0
- package/dist/chunk-FQSRHTTC.js +49 -0
- package/dist/chunk-FR7JPYBD.js +182 -0
- package/dist/chunk-FTV6I76U.js +211 -0
- package/dist/chunk-FV5YFR6I.js +540 -0
- package/dist/chunk-FZ2E5LGK.js +54 -0
- package/dist/chunk-FZL2HNWP.js +531 -0
- package/dist/chunk-G2E5MNYP.js +549 -0
- package/dist/chunk-G5SFOH7P.js +256 -0
- package/dist/chunk-GFXLPJWY.js +53 -0
- package/dist/chunk-GR6YKM55.js +480 -0
- package/dist/chunk-GXJVY6WT.js +250 -0
- package/dist/chunk-GZ4TKR3Q.js +928 -0
- package/dist/chunk-HB6XSGI6.js +131 -0
- package/dist/chunk-HE4ZQXZM.js +396 -0
- package/dist/chunk-HHUFVJF7.js +1019 -0
- package/dist/chunk-HKTUIMH4.js +76 -0
- package/dist/chunk-HUZQDKQK.js +48 -0
- package/dist/chunk-I7IWQIEB.js +58 -0
- package/dist/chunk-IDGSU7JF.js +1496 -0
- package/dist/chunk-ILFKECGI.js +69 -0
- package/dist/chunk-ISNZYKAS.js +53 -0
- package/dist/chunk-IUD3ME4E.js +251 -0
- package/dist/chunk-IV7BCWWN.js +101 -0
- package/dist/chunk-IZNSAEBX.js +164 -0
- package/dist/chunk-J5LHDJU4.js +400 -0
- package/dist/chunk-JAA53T23.js +172 -0
- package/dist/chunk-JF2NSTFO.js +47 -0
- package/dist/chunk-JMSEEBN4.js +41 -0
- package/dist/chunk-JQ7XQPQS.js +273 -0
- package/dist/chunk-KC5DROFC.js +16667 -0
- package/dist/chunk-KIAI6PWL.js +36 -0
- package/dist/chunk-KIHOIVST.js +18 -0
- package/dist/chunk-KM2FBM3T.js +659 -0
- package/dist/chunk-KQDZXGNR.js +14 -0
- package/dist/chunk-L4VJ4ETL.js +41 -0
- package/dist/chunk-LDKUC2QJ.js +49 -0
- package/dist/chunk-LK44ULGI.js +2043 -0
- package/dist/chunk-LRS573EX.js +104 -0
- package/dist/chunk-LTQANUDH.js +119 -0
- package/dist/chunk-LVGBKKSM.js +282 -0
- package/dist/chunk-MF7QH4AX.js +162 -0
- package/dist/chunk-MGVYVW7Q.js +915 -0
- package/dist/chunk-MH5OCRUM.js +240 -0
- package/dist/chunk-MKFYQQ5Q.js +36 -0
- package/dist/chunk-MKRBG5EF.js +1142 -0
- package/dist/chunk-MTAUZW2Z.js +2504 -0
- package/dist/chunk-MTEBM4Y4.js +39 -0
- package/dist/chunk-N3NBWIYQ.js +48 -0
- package/dist/chunk-N4QZJJVB.js +3851 -0
- package/dist/chunk-NGPU2ARF.js +1726 -0
- package/dist/chunk-NIXVDQVO.js +2929 -0
- package/dist/chunk-NNUASOAA.js +34 -0
- package/dist/chunk-NPCD54I7.js +226 -0
- package/dist/chunk-OEI7LVRP.js +856 -0
- package/dist/chunk-OGRWQ562.js +18 -0
- package/dist/chunk-OIU657QQ.js +95 -0
- package/dist/chunk-OJLRFGBP.js +128 -0
- package/dist/chunk-OS7PQ35Z.js +391 -0
- package/dist/chunk-OSGQW2Z6.js +104 -0
- package/dist/chunk-P3TKKBAH.js +131 -0
- package/dist/chunk-PEF5OEMB.js +163 -0
- package/dist/chunk-PGKHJYOB.js +706 -0
- package/dist/chunk-PIVKU64W.js +688 -0
- package/dist/chunk-PKCMRPPB.js +109 -0
- package/dist/chunk-QICFHVRW.js +15 -0
- package/dist/chunk-QKEFZRHS.js +166 -0
- package/dist/chunk-QWVBEK4P.js +113 -0
- package/dist/chunk-R4TBNKKC.js +3217 -0
- package/dist/chunk-R64GLVBO.js +2919 -0
- package/dist/chunk-R6B6XAKK.js +56 -0
- package/dist/chunk-R6RY4Q5T.js +51 -0
- package/dist/chunk-RK6MKKKP.js +471 -0
- package/dist/chunk-ROTY5J2L.js +25 -0
- package/dist/chunk-RRVT4MPS.js +150 -0
- package/dist/chunk-SS66Q4VE.js +231 -0
- package/dist/chunk-T4RTWMJD.js +310 -0
- package/dist/chunk-T6USVBEJ.js +105 -0
- package/dist/chunk-TM7LC37P.js +4044 -0
- package/dist/chunk-TV45EUGM.js +51 -0
- package/dist/chunk-TZDSDDSV.js +233 -0
- package/dist/chunk-UBWCUP3G.js +55 -0
- package/dist/chunk-UF7TAFJM.js +906 -0
- package/dist/chunk-UR7RMZ3R.js +19943 -0
- package/dist/chunk-UYYN2IUZ.js +1611 -0
- package/dist/chunk-V2TH46ZY.js +66 -0
- package/dist/chunk-VKMTFIWS.js +315 -0
- package/dist/chunk-VOGCSYOI.js +16 -0
- package/dist/chunk-W5OYJMBT.js +41 -0
- package/dist/chunk-WARBF2KY.js +296 -0
- package/dist/chunk-WGZWR4RF.js +130 -0
- package/dist/chunk-WLIIQ2A4.js +18 -0
- package/dist/chunk-X4W4XXWP.js +134 -0
- package/dist/chunk-XB5RFZHH.js +1217 -0
- package/dist/chunk-XEG3FE2R.js +766 -0
- package/dist/chunk-XIWYUQZQ.js +583 -0
- package/dist/chunk-XKS6THI5.js +31 -0
- package/dist/chunk-XKZHAD6Y.js +184 -0
- package/dist/chunk-XNYNEEBR.js +214 -0
- package/dist/chunk-XPCWQXTY.js +37 -0
- package/dist/chunk-XPEEICAO.js +325 -0
- package/dist/chunk-XQ3YIV5R.js +3507 -0
- package/dist/chunk-XRO65C7V.js +1079 -0
- package/dist/chunk-XTVDAHH2.js +203 -0
- package/dist/chunk-XZRON6IV.js +131 -0
- package/dist/chunk-Y4BRGOJR.js +523 -0
- package/dist/chunk-Y5PZHS4K.js +3898 -0
- package/dist/chunk-Y7KBQ4BD.js +230 -0
- package/dist/chunk-YFSSNGLR.js +277 -0
- package/dist/chunk-YGKYFMSL.js +60 -0
- package/dist/chunk-YGR6OCHQ.js +345 -0
- package/dist/chunk-YIEOFHOL.js +30 -0
- package/dist/chunk-YLAJAI2W.js +180 -0
- package/dist/chunk-YMOJD5BO.js +50 -0
- package/dist/chunk-YPBQNJHA.js +33 -0
- package/dist/chunk-YPIEYQF4.js +307 -0
- package/dist/chunk-YVLMBAYE.js +221 -0
- package/dist/chunk-YXJ4XOHF.js +376 -0
- package/dist/chunk-ZE3P35DA.js +1247 -0
- package/dist/chunk-ZONE6E3Z.js +32 -0
- package/dist/chunk-ZP4FJHR4.js +95 -0
- package/dist/chunk-ZZXF6OOJ.js +119 -0
- package/dist/files.json +1976 -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 +305 -0
- package/dist/packages/naysayer/starter/review.yaml +256 -0
- package/dist/packages/sdk/npm/index.js +9780 -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-Mo5w5xCa.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-Bp3XhPHX.css +1 -0
- package/dist/packages/ui/dist/assets/index-DM212ZbV.js +29 -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,104 @@
|
|
|
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
|
+
hostQuestionDrafts,
|
|
8
|
+
unknownHosts
|
|
9
|
+
} from "./chunk-AY2IUF4K.js";
|
|
10
|
+
import {
|
|
11
|
+
baseClonePath,
|
|
12
|
+
loadRepos
|
|
13
|
+
} from "./chunk-PGKHJYOB.js";
|
|
14
|
+
import {
|
|
15
|
+
fsRepo
|
|
16
|
+
} from "./chunk-MKRBG5EF.js";
|
|
17
|
+
import {
|
|
18
|
+
HOSTS_NONE,
|
|
19
|
+
HOSTS_OUTSIDE_INTERNAL,
|
|
20
|
+
HOSTS_OUTSIDE_VENDOR,
|
|
21
|
+
HOSTS_STEP,
|
|
22
|
+
hostMatches,
|
|
23
|
+
hostOfQuestion,
|
|
24
|
+
listQuestions,
|
|
25
|
+
raiseQuestions,
|
|
26
|
+
retireQuestion,
|
|
27
|
+
writeQuestion
|
|
28
|
+
} from "./chunk-577AJVRS.js";
|
|
29
|
+
|
|
30
|
+
// packages/cli/dist/host-questions.js
|
|
31
|
+
import { stat } from "node:fs/promises";
|
|
32
|
+
var HOSTS_RERUN = "atticus scan";
|
|
33
|
+
var isDir = (p) => stat(p).then((s) => s.isDirectory(), () => false);
|
|
34
|
+
async function askHosts(root, records, o) {
|
|
35
|
+
const repos = await loadRepos(root).catch(() => []);
|
|
36
|
+
const dirs = /* @__PURE__ */ new Map();
|
|
37
|
+
for (const r of repos) {
|
|
38
|
+
const dir = baseClonePath(root, r.id);
|
|
39
|
+
if (await isDir(dir))
|
|
40
|
+
dirs.set(r.id, dir);
|
|
41
|
+
}
|
|
42
|
+
const asks = await unknownHosts({
|
|
43
|
+
records,
|
|
44
|
+
repos,
|
|
45
|
+
handle: (id) => dirs.has(id) ? fsRepo(id, dirs.get(id), "0".repeat(40)) : void 0
|
|
46
|
+
});
|
|
47
|
+
const before = (await listQuestions(root, { step: HOSTS_STEP })).questions;
|
|
48
|
+
const asked = new Set(before.map((q) => hostOfQuestion(q)));
|
|
49
|
+
const raised = [];
|
|
50
|
+
const at = (o.now ?? /* @__PURE__ */ new Date()).toISOString();
|
|
51
|
+
const reasked = [];
|
|
52
|
+
const OUTSIDE = /* @__PURE__ */ new Set([HOSTS_OUTSIDE_INTERNAL, HOSTS_OUTSIDE_VENDOR]);
|
|
53
|
+
for (const { repo, draft } of hostQuestionDrafts(asks)) {
|
|
54
|
+
if (asked.has(hostOfQuestion(draft))) {
|
|
55
|
+
const old = before.find((q) => hostOfQuestion(q) === hostOfQuestion(draft));
|
|
56
|
+
if (!old || old.state !== "open" || old.options.some((x) => OUTSIDE.has(x.label)))
|
|
57
|
+
continue;
|
|
58
|
+
const add = draft.options.filter((x) => OUTSIDE.has(x.label));
|
|
59
|
+
const none = old.options.findIndex((x) => x.label === HOSTS_NONE);
|
|
60
|
+
const at2 = none < 0 ? old.options.length : none;
|
|
61
|
+
const next = {
|
|
62
|
+
...old,
|
|
63
|
+
options: [...old.options.slice(0, at2), ...add, ...old.options.slice(at2)]
|
|
64
|
+
};
|
|
65
|
+
await writeQuestion(root, next);
|
|
66
|
+
reasked.push(next);
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
const r = await raiseQuestions(root, [draft], {
|
|
70
|
+
step: HOSTS_STEP,
|
|
71
|
+
repo,
|
|
72
|
+
command: o.command,
|
|
73
|
+
rerun: o.rerun ?? HOSTS_RERUN,
|
|
74
|
+
at
|
|
75
|
+
});
|
|
76
|
+
raised.push(...r.raised);
|
|
77
|
+
}
|
|
78
|
+
const hosts = new Set(asks.map((a) => a.host));
|
|
79
|
+
const open = before.map((q) => reasked.find((x) => x.id === q.id) ?? q).filter((q) => q.state === "open" && hosts.has(hostOfQuestion(q)));
|
|
80
|
+
const lines = [];
|
|
81
|
+
for (const q of before) {
|
|
82
|
+
const host = hostOfQuestion(q);
|
|
83
|
+
if (q.state !== "open" || !host || hosts.has(host))
|
|
84
|
+
continue;
|
|
85
|
+
const [name, port] = host.split(/:(?=\d+$)/);
|
|
86
|
+
const listing = repos.filter((r) => [...r.hosts, ...r.modules.flatMap((m) => m.hosts)].some((p) => hostMatches(p, name, port ? Number(port) : void 0))).map((r) => r.id);
|
|
87
|
+
if (!listing.length)
|
|
88
|
+
continue;
|
|
89
|
+
const why = `${listing.join(", ")} ${listing.length === 1 ? "lists" : "list"} ${host} under hosts in repos.manifest.yaml`;
|
|
90
|
+
await retireQuestion(root, q.id, { why, at });
|
|
91
|
+
lines.push(`Retired ${q.id} (${q.question}): ${why}.`);
|
|
92
|
+
}
|
|
93
|
+
for (const q of raised)
|
|
94
|
+
lines.push(`Calls to ${hostOfQuestion(q)} join no repo: no repo lists it under hosts. Asked ${q.id}: ${q.question} Answer it: atticus questions answer ${q.id} --option <n> (1 is ${q.options[0].label}). If several repos answer on it (a shared gateway or platform host), don't pick one: list it under hosts on each of them in repos.manifest.yaml (with each one's basePath where the path tells them apart), and the question retires itself. If a system outside the estate answers on it, pick an outside system (another team's or a vendor's): it goes into the profile with the host as its alias.`);
|
|
95
|
+
for (const q of reasked)
|
|
96
|
+
lines.push(`Re-asked ${q.id} (${q.question}): it now offers an outside system, another team's or a vendor's, for a host no repo of the estate answers on.`);
|
|
97
|
+
for (const q of open)
|
|
98
|
+
lines.push(`Still open: ${q.question} Answer it: atticus questions answer ${q.id} --option <n>, then ${o.rerun ?? HOSTS_RERUN}.`);
|
|
99
|
+
return { raised, reasked, open, lines };
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export {
|
|
103
|
+
askHosts
|
|
104
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
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
|
+
estimateOf
|
|
8
|
+
} from "./chunk-X4W4XXWP.js";
|
|
9
|
+
import {
|
|
10
|
+
changeMapBody,
|
|
11
|
+
changeMapOf
|
|
12
|
+
} from "./chunk-67J3VZBA.js";
|
|
13
|
+
import "./chunk-5YIBJXGB.js";
|
|
14
|
+
import "./chunk-UYYN2IUZ.js";
|
|
15
|
+
import "./chunk-P3TKKBAH.js";
|
|
16
|
+
import "./chunk-7YYEKTYF.js";
|
|
17
|
+
import "./chunk-XEG3FE2R.js";
|
|
18
|
+
import {
|
|
19
|
+
knowledgeAppliesMarkdown,
|
|
20
|
+
readKnowledgeApplies
|
|
21
|
+
} from "./chunk-KC5DROFC.js";
|
|
22
|
+
import "./chunk-RK6MKKKP.js";
|
|
23
|
+
import {
|
|
24
|
+
readRound,
|
|
25
|
+
reviewedGates,
|
|
26
|
+
roundsOf
|
|
27
|
+
} from "./chunk-47QE246J.js";
|
|
28
|
+
import "./chunk-XQ3YIV5R.js";
|
|
29
|
+
import "./chunk-MGVYVW7Q.js";
|
|
30
|
+
import "./chunk-NGPU2ARF.js";
|
|
31
|
+
import "./chunk-AY2IUF4K.js";
|
|
32
|
+
import "./chunk-6JLPXDWN.js";
|
|
33
|
+
import "./chunk-4GZXS6S2.js";
|
|
34
|
+
import "./chunk-R4TBNKKC.js";
|
|
35
|
+
import "./chunk-NIXVDQVO.js";
|
|
36
|
+
import "./chunk-UR7RMZ3R.js";
|
|
37
|
+
import "./chunk-N4QZJJVB.js";
|
|
38
|
+
import "./chunk-PGKHJYOB.js";
|
|
39
|
+
import "./chunk-MKRBG5EF.js";
|
|
40
|
+
import "./chunk-5XDNUJ4P.js";
|
|
41
|
+
import "./chunk-577AJVRS.js";
|
|
42
|
+
import "./chunk-D3PO4DOZ.js";
|
|
43
|
+
import "./chunk-TV45EUGM.js";
|
|
44
|
+
|
|
45
|
+
// packages/cli/dist/handoff-review.js
|
|
46
|
+
var days = (d) => `${d.p20}\u2013${d.p80} days (most likely ${d.p50})`;
|
|
47
|
+
async function handoffReview(root, change) {
|
|
48
|
+
const lines = [];
|
|
49
|
+
lines.push("### What it changes", "");
|
|
50
|
+
const map = await changeMapOf(root, change).catch(() => void 0);
|
|
51
|
+
if (map && map.flows > 0) {
|
|
52
|
+
lines.push("```mermaid", changeMapBody(change, map).mermaid.trimEnd(), "```", "");
|
|
53
|
+
lines.push(`From ${map.flows} target flow${map.flows === 1 ? "" : "s"} in ${map.source}.`, "");
|
|
54
|
+
} else
|
|
55
|
+
lines.push("No target flows yet: the architecture stage writes them.", "");
|
|
56
|
+
const applies = await readKnowledgeApplies(root, change).catch(() => void 0);
|
|
57
|
+
if (applies)
|
|
58
|
+
lines.push(knowledgeAppliesMarkdown(applies).trimEnd(), "");
|
|
59
|
+
lines.push("### Estimate", "");
|
|
60
|
+
const est = await estimateOf(root, change).catch(() => void 0);
|
|
61
|
+
if (est?.effort) {
|
|
62
|
+
lines.push(days(est.effort), "");
|
|
63
|
+
for (const d of est.drivers.filter((x) => x.count > 0).slice(0, 5))
|
|
64
|
+
lines.push(`- ${d.what}: ${d.count}`);
|
|
65
|
+
if (est.needsClass)
|
|
66
|
+
lines.push(`- ${est.needsClass} unit${est.needsClass === 1 ? "" : "s"} not sized yet`);
|
|
67
|
+
lines.push("");
|
|
68
|
+
} else
|
|
69
|
+
lines.push(est ? "Not sized yet: the org pack's estimates don't cover these units." : "Not sized yet.", "");
|
|
70
|
+
lines.push("### Since the last round", "");
|
|
71
|
+
const reviewed = await reviewedGates(root, change).catch(() => []);
|
|
72
|
+
const openIds = async (gate, n) => new Set((await readRound(root, change, gate, n)).findings.filter(({ finding: f }) => f.state === "open").map(({ finding: f }) => f.id));
|
|
73
|
+
const code = (ids) => ids.map((i) => `\`${i}\``).join(", ");
|
|
74
|
+
let any = false;
|
|
75
|
+
for (const gate of reviewed) {
|
|
76
|
+
const rounds = await roundsOf(root, change, gate);
|
|
77
|
+
if (!rounds.length)
|
|
78
|
+
continue;
|
|
79
|
+
any = true;
|
|
80
|
+
if (rounds.length === 1) {
|
|
81
|
+
lines.push(`- ${gate} gate: the first round.`);
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
const [before, now] = [rounds.at(-2), rounds.at(-1)];
|
|
85
|
+
const [was, is] = [await openIds(gate, before), await openIds(gate, now)];
|
|
86
|
+
const closed = [...was].filter((i) => !is.has(i)).sort();
|
|
87
|
+
const added = [...is].filter((i) => !was.has(i)).sort();
|
|
88
|
+
const still = [...is].filter((i) => was.has(i)).length;
|
|
89
|
+
lines.push(`- ${gate} gate, round ${now} against round ${before}: ${closed.length} closed${closed.length ? ` (${code(closed)})` : ""}, ${added.length} new${added.length ? ` (${code(added)})` : ""}, ${still} still open.`);
|
|
90
|
+
}
|
|
91
|
+
if (!any)
|
|
92
|
+
lines.push("No gate has been reviewed yet.");
|
|
93
|
+
lines.push("");
|
|
94
|
+
lines.push("### Findings still open", "");
|
|
95
|
+
const gates = await reviewedGates(root, change).catch(() => []);
|
|
96
|
+
const open = [];
|
|
97
|
+
for (const gate of gates) {
|
|
98
|
+
const rounds = await roundsOf(root, change, gate);
|
|
99
|
+
if (!rounds.length)
|
|
100
|
+
continue;
|
|
101
|
+
for (const { finding: f } of (await readRound(root, change, gate, rounds.at(-1))).findings)
|
|
102
|
+
if (f.state === "open")
|
|
103
|
+
open.push({ gate, severity: f.severity, summary: f.summary, id: f.id });
|
|
104
|
+
}
|
|
105
|
+
if (!gates.length)
|
|
106
|
+
lines.push("No gate has been reviewed yet.", "");
|
|
107
|
+
else if (!open.length)
|
|
108
|
+
lines.push("None open.", "");
|
|
109
|
+
else {
|
|
110
|
+
const order = ["blocking", "gap", "risk", "idea"];
|
|
111
|
+
for (const f of open.sort((a, b) => order.indexOf(a.severity) - order.indexOf(b.severity)))
|
|
112
|
+
lines.push(`- **${f.severity}** (${f.gate}): ${f.summary} \`${f.id}\``);
|
|
113
|
+
lines.push("");
|
|
114
|
+
}
|
|
115
|
+
return lines.join("\n");
|
|
116
|
+
}
|
|
117
|
+
export {
|
|
118
|
+
handoffReview
|
|
119
|
+
};
|
|
@@ -0,0 +1,282 @@
|
|
|
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
|
+
intakeContext
|
|
8
|
+
} from "./chunk-WARBF2KY.js";
|
|
9
|
+
import "./chunk-VOGCSYOI.js";
|
|
10
|
+
import {
|
|
11
|
+
changeFolder,
|
|
12
|
+
changeStore
|
|
13
|
+
} from "./chunk-XQ3YIV5R.js";
|
|
14
|
+
import "./chunk-MGVYVW7Q.js";
|
|
15
|
+
import "./chunk-NGPU2ARF.js";
|
|
16
|
+
import {
|
|
17
|
+
estateFacts,
|
|
18
|
+
estateRepos,
|
|
19
|
+
hostAliases,
|
|
20
|
+
joinReposOf,
|
|
21
|
+
outsideProfileSystems,
|
|
22
|
+
outsideSystems
|
|
23
|
+
} from "./chunk-AY2IUF4K.js";
|
|
24
|
+
import "./chunk-6JLPXDWN.js";
|
|
25
|
+
import "./chunk-4GZXS6S2.js";
|
|
26
|
+
import {
|
|
27
|
+
attachToChange,
|
|
28
|
+
readChangeInputs,
|
|
29
|
+
readVendorSpec
|
|
30
|
+
} from "./chunk-R4TBNKKC.js";
|
|
31
|
+
import "./chunk-NIXVDQVO.js";
|
|
32
|
+
import "./chunk-UR7RMZ3R.js";
|
|
33
|
+
import "./chunk-PGKHJYOB.js";
|
|
34
|
+
import "./chunk-MKRBG5EF.js";
|
|
35
|
+
import "./chunk-5XDNUJ4P.js";
|
|
36
|
+
import {
|
|
37
|
+
PROTOTYPE_GROUPS,
|
|
38
|
+
comparePrototype,
|
|
39
|
+
factsDirOf,
|
|
40
|
+
inputsDirOf,
|
|
41
|
+
isPrototypeType,
|
|
42
|
+
joinConventions,
|
|
43
|
+
parseFacts,
|
|
44
|
+
prototypeArchitectureSection
|
|
45
|
+
} from "./chunk-577AJVRS.js";
|
|
46
|
+
import "./chunk-D3PO4DOZ.js";
|
|
47
|
+
import "./chunk-TV45EUGM.js";
|
|
48
|
+
|
|
49
|
+
// packages/cli/dist/prototype-commands.js
|
|
50
|
+
import { readFile } from "node:fs/promises";
|
|
51
|
+
import { join } from "node:path";
|
|
52
|
+
var PROTOTYPE_CLI_WORDS = {
|
|
53
|
+
usage: (change, repo) => `--prototype names a prototype repo, attached on its own: atticus change attach ${change} --prototype ${repo}`,
|
|
54
|
+
noChange: (change) => `There is no change ${change}: atticus change list shows them.`,
|
|
55
|
+
noRepo: (repo) => `There is no repo ${repo} in the manifests (org-pack/profiles/<platform>/repos.manifest.yaml); atticus repo add adds one.`,
|
|
56
|
+
notPrototype: (repo, type) => `${repo} isn't a prototype: repos.manifest.yaml types it ${type}. A prototype is typed prototype there; then attach it.`,
|
|
57
|
+
notRead: (repo) => `${repo} has no verified facts yet: read it with /atticus-map ${repo}, then atticus verify ${repo}.`,
|
|
58
|
+
about: (repo, about) => `${repo} (a prototype)${about ? `: ${about.text}${about.trust === "suggested" ? " (a draft nobody has confirmed)" : ""}` : ": nothing says what it is yet (atticus repo describe)."}`,
|
|
59
|
+
counts: (c) => {
|
|
60
|
+
const all = PROTOTYPE_GROUPS.reduce((n, g) => n + c[g], 0);
|
|
61
|
+
return `${all} call${all === 1 ? "" : "s"} compared with the estate: ${c.exists} exist${c.exists === 1 ? "s" : ""}, ${c.changes} change${c.changes === 1 ? "s" : ""}, ${c.new} new, ${c.vendor} only a vendor provides.`;
|
|
62
|
+
},
|
|
63
|
+
group: {
|
|
64
|
+
exists: "Exists: the estate serves it as the prototype needs.",
|
|
65
|
+
changes: "Changes: the estate serves the operation, but not as the prototype needs.",
|
|
66
|
+
new: "New: nothing in the estate serves it.",
|
|
67
|
+
vendor: "Vendor: only a vendor provides it, so it needs a route through the external gateway."
|
|
68
|
+
},
|
|
69
|
+
/** The vendor group's heading when another team's system provides one of its calls (O2). */
|
|
70
|
+
outside: "Outside: only a vendor or another team's system provides it; a vendor's needs a route through the external gateway, another team's is called as it publishes it.",
|
|
71
|
+
left: (n) => `${n} call${n === 1 ? "" : "s"} of the prototype reach${n === 1 ? "es" : ""} nothing in it and ${n === 1 ? "isn't" : "aren't"} compared:`,
|
|
72
|
+
attached: (path) => `Attached as ${path}: the change's feature and architecture stages read it as data, citing it by line.`,
|
|
73
|
+
unchanged: (path) => `The comparison is what ${path} already says: nothing to attach again.`,
|
|
74
|
+
footprint: (c) => {
|
|
75
|
+
const parts = [
|
|
76
|
+
c.repos.length ? `repos ${c.repos.join(", ")}` : "",
|
|
77
|
+
c.endpoints.length ? `Endpoints ${c.endpoints.join(", ")}` : "",
|
|
78
|
+
c.vendorOperations.length ? `vendor operations ${c.vendorOperations.join(", ")}` : ""
|
|
79
|
+
].filter(Boolean);
|
|
80
|
+
return parts.length ? `Its footprint now has ${parts.join("; ")}.` : "Its footprint is unchanged: every call exists as the prototype needs, or is new.";
|
|
81
|
+
},
|
|
82
|
+
docTitle: (repo) => `# What the prototype ${repo} asks of the estate`
|
|
83
|
+
};
|
|
84
|
+
var SPECS = /* @__PURE__ */ new Set(["openapi", "swagger"]);
|
|
85
|
+
async function loadPrototypeComparison(root, repo, io) {
|
|
86
|
+
const { op, inputs } = await intakeContext(root, io);
|
|
87
|
+
const manifest = estateRepos(op).find((r) => r.id === repo);
|
|
88
|
+
if (!manifest)
|
|
89
|
+
return { error: PROTOTYPE_CLI_WORDS.noRepo(repo) };
|
|
90
|
+
if (!isPrototypeType(manifest.type))
|
|
91
|
+
return { error: PROTOTYPE_CLI_WORDS.notPrototype(repo, manifest.type) };
|
|
92
|
+
const text = await readFile(join(factsDirOf(root), `${repo}.jsonl`), "utf8").catch(() => "");
|
|
93
|
+
const parsed = text.trim() ? parseFacts(text) : void 0;
|
|
94
|
+
if (!parsed?.ok || !parsed.facts.length || parsed.facts.some((f) => f.verified === "none"))
|
|
95
|
+
return { error: PROTOTYPE_CLI_WORDS.notRead(repo) };
|
|
96
|
+
const estate = await estateFacts(root, op, repo);
|
|
97
|
+
const systems = outsideProfileSystems(op);
|
|
98
|
+
const vendors = [];
|
|
99
|
+
for (const d of inputs.documents) {
|
|
100
|
+
if (!d.id || d.supersededBy || !SPECS.has(d.classification))
|
|
101
|
+
continue;
|
|
102
|
+
const system = systems.find((s) => s.id === d.systems[0]);
|
|
103
|
+
if (!system)
|
|
104
|
+
continue;
|
|
105
|
+
const body = await readFile(join(inputsDirOf(root), ...d.path.split("/").slice(1)), "utf8");
|
|
106
|
+
const spec = readVendorSpec(d.path, body, system.id);
|
|
107
|
+
if (!spec)
|
|
108
|
+
continue;
|
|
109
|
+
const prior = vendors.find((v) => v.system === system.id);
|
|
110
|
+
const operations = spec.operations.map((o) => ({
|
|
111
|
+
id: o.id,
|
|
112
|
+
method: o.method,
|
|
113
|
+
path: o.path,
|
|
114
|
+
fullPath: o.fullPath,
|
|
115
|
+
cite: o.cite,
|
|
116
|
+
...o.auth ? { auth: o.auth } : {},
|
|
117
|
+
scopes: o.scopes,
|
|
118
|
+
fields: [
|
|
119
|
+
...o.request.map((f) => ({ side: "request", f })),
|
|
120
|
+
...o.response.map((f) => ({ side: "response", f }))
|
|
121
|
+
].map(({ side, f }) => ({
|
|
122
|
+
side,
|
|
123
|
+
name: f.name,
|
|
124
|
+
...f.type ? { type: f.type } : {},
|
|
125
|
+
...f.required !== void 0 ? { required: f.required } : {},
|
|
126
|
+
...f.enum ? { enum: f.enum } : {},
|
|
127
|
+
...f.in === "header" ? { in: f.in } : {},
|
|
128
|
+
at: f.cite
|
|
129
|
+
})),
|
|
130
|
+
...o.errors ? { errors: o.errors.map((e) => ({ status: e.status, at: e.cite })) } : {}
|
|
131
|
+
}));
|
|
132
|
+
if (prior) {
|
|
133
|
+
prior.operations.push(...operations);
|
|
134
|
+
prior.hosts.push(...spec.hosts);
|
|
135
|
+
} else
|
|
136
|
+
vendors.push({
|
|
137
|
+
system: system.id,
|
|
138
|
+
names: [system.name, ...system.aliases],
|
|
139
|
+
hosts: [.../* @__PURE__ */ new Set([...spec.hosts, ...hostAliases(system.aliases)])],
|
|
140
|
+
...system.boundary === "vendor" ? {} : { boundary: "internal" },
|
|
141
|
+
operations
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
const comparison = comparePrototype({
|
|
145
|
+
prototype: {
|
|
146
|
+
repo,
|
|
147
|
+
facts: parsed.facts,
|
|
148
|
+
...manifest.component ? { component: manifest.component } : {}
|
|
149
|
+
},
|
|
150
|
+
estate: joinReposOf(op, estate.repos),
|
|
151
|
+
vendors,
|
|
152
|
+
outside: outsideSystems(op),
|
|
153
|
+
...joinConventions(op)
|
|
154
|
+
});
|
|
155
|
+
return {
|
|
156
|
+
repo,
|
|
157
|
+
...manifest.description ? { about: manifest.description } : {},
|
|
158
|
+
comparison,
|
|
159
|
+
notes: estate.notes,
|
|
160
|
+
architecture: prototypeArchitectureSection(comparison, parsed.facts),
|
|
161
|
+
systemOf: Object.fromEntries(estateRepos(op).flatMap((r) => r.system ? [[r.id, r.system]] : []))
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
var where = (e) => `${e.repo} ${e.at}`;
|
|
165
|
+
function callLines(c) {
|
|
166
|
+
const other = c.estate ? `; ${where(c.estate.entry)}` : c.vendor?.at ? `; ${c.vendor.name} ${c.vendor.at}` : "";
|
|
167
|
+
return [
|
|
168
|
+
` ${c.sentence}`,
|
|
169
|
+
` ${c.call.repo} ${c.call.at} \u2192 ${c.lands.at}${other}`,
|
|
170
|
+
...(c.candidates ?? []).map((x) => ` ? ${where(x)}`),
|
|
171
|
+
...c.differences.map((d) => ` - ${d.message}`)
|
|
172
|
+
];
|
|
173
|
+
}
|
|
174
|
+
function prototypeLines(l) {
|
|
175
|
+
const c = l.comparison;
|
|
176
|
+
const out = [PROTOTYPE_CLI_WORDS.about(l.repo, l.about), PROTOTYPE_CLI_WORDS.counts(c.counts)];
|
|
177
|
+
for (const g of PROTOTYPE_GROUPS) {
|
|
178
|
+
const calls = c.calls.filter((x) => x.group === g);
|
|
179
|
+
if (!calls.length)
|
|
180
|
+
continue;
|
|
181
|
+
out.push(g === "vendor" && calls.some((x) => x.vendor?.boundary === "internal") ? PROTOTYPE_CLI_WORDS.outside : PROTOTYPE_CLI_WORDS.group[g]);
|
|
182
|
+
for (const x of calls)
|
|
183
|
+
out.push(...callLines(x));
|
|
184
|
+
}
|
|
185
|
+
if (c.left.length) {
|
|
186
|
+
out.push(PROTOTYPE_CLI_WORDS.left(c.left.length));
|
|
187
|
+
for (const x of c.left)
|
|
188
|
+
out.push(` ${x.why} (${x.call.at})`);
|
|
189
|
+
}
|
|
190
|
+
out.push(...l.notes);
|
|
191
|
+
return out;
|
|
192
|
+
}
|
|
193
|
+
function prototypeDocument(l) {
|
|
194
|
+
return {
|
|
195
|
+
name: `prototype-${l.repo}.md`,
|
|
196
|
+
text: [
|
|
197
|
+
PROTOTYPE_CLI_WORDS.docTitle(l.repo),
|
|
198
|
+
"",
|
|
199
|
+
...prototypeLines(l),
|
|
200
|
+
"",
|
|
201
|
+
...l.architecture
|
|
202
|
+
].join("\n")
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
var sorted = (xs) => [...new Set(xs)].sort();
|
|
206
|
+
var ATTACHED = /^prototype-(.+)\.md$/;
|
|
207
|
+
async function changePrototypes(root, change) {
|
|
208
|
+
const quiet = { out: () => void 0, err: () => void 0 };
|
|
209
|
+
const files = (await readChangeInputs(changeFolder(root, change))).files.filter((f) => !f.supersededBy && ATTACHED.test(f.name)).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0);
|
|
210
|
+
const prototypes = [];
|
|
211
|
+
for (const f of files) {
|
|
212
|
+
const repo = ATTACHED.exec(f.name)[1];
|
|
213
|
+
const got = await loadPrototypeComparison(root, repo, quiet);
|
|
214
|
+
prototypes.push("error" in got ? { repo, attached: f.path, problem: got.error } : {
|
|
215
|
+
repo,
|
|
216
|
+
attached: f.path,
|
|
217
|
+
...got.about ? { about: { text: got.about.text, trust: got.about.trust } } : {},
|
|
218
|
+
comparison: got.comparison
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
return { prototypes };
|
|
222
|
+
}
|
|
223
|
+
async function attachPrototype(root, change, repo, o, io) {
|
|
224
|
+
const store = changeStore(root);
|
|
225
|
+
const c = await store.read(change).catch(() => void 0);
|
|
226
|
+
if (!c) {
|
|
227
|
+
io.err(PROTOTYPE_CLI_WORDS.noChange(change));
|
|
228
|
+
return 1;
|
|
229
|
+
}
|
|
230
|
+
const got = await loadPrototypeComparison(root, repo, io);
|
|
231
|
+
if ("error" in got) {
|
|
232
|
+
io.err(got.error);
|
|
233
|
+
return 1;
|
|
234
|
+
}
|
|
235
|
+
const doc = prototypeDocument(got);
|
|
236
|
+
const dir = changeFolder(root, c.id);
|
|
237
|
+
const before = (await readChangeInputs(dir)).files.find((f) => f.name === doc.name && !f.supersededBy);
|
|
238
|
+
const r = await attachToChange(dir, [{ name: doc.name, bytes: new TextEncoder().encode(doc.text) }], {
|
|
239
|
+
by: o.by,
|
|
240
|
+
at: (o.now ?? /* @__PURE__ */ new Date()).toISOString().replace(/\.\d{3}Z$/, "Z"),
|
|
241
|
+
...before ? { replaces: before.path } : {}
|
|
242
|
+
});
|
|
243
|
+
const added = r.added[0]?.path;
|
|
244
|
+
const path = added ?? before?.path ?? `inputs/${doc.name}`;
|
|
245
|
+
const cmp = got.comparison;
|
|
246
|
+
const fresh = await store.read(c.id);
|
|
247
|
+
const touches = {
|
|
248
|
+
...fresh.touches,
|
|
249
|
+
repos: sorted([...fresh.touches.repos, ...cmp.repos]),
|
|
250
|
+
records: sorted([...fresh.touches.records, ...cmp.endpoints, ...cmp.vendorOperations])
|
|
251
|
+
};
|
|
252
|
+
const systems = sorted([
|
|
253
|
+
...fresh.systems,
|
|
254
|
+
...cmp.vendors,
|
|
255
|
+
...cmp.repos.flatMap((x) => got.systemOf[x] ? [got.systemOf[x]] : [])
|
|
256
|
+
]);
|
|
257
|
+
await store.write({ ...fresh, systems, touches });
|
|
258
|
+
if (o.json) {
|
|
259
|
+
io.out(JSON.stringify({
|
|
260
|
+
prototype: repo,
|
|
261
|
+
...got.about ? { about: got.about } : {},
|
|
262
|
+
comparison: cmp,
|
|
263
|
+
attached: path,
|
|
264
|
+
touches: { repos: touches.repos, records: touches.records },
|
|
265
|
+
systems
|
|
266
|
+
}, null, 2));
|
|
267
|
+
return 0;
|
|
268
|
+
}
|
|
269
|
+
for (const l of prototypeLines(got))
|
|
270
|
+
io.out(l);
|
|
271
|
+
io.out(added ? PROTOTYPE_CLI_WORDS.attached(path) : PROTOTYPE_CLI_WORDS.unchanged(path));
|
|
272
|
+
io.out(PROTOTYPE_CLI_WORDS.footprint(cmp));
|
|
273
|
+
return 0;
|
|
274
|
+
}
|
|
275
|
+
export {
|
|
276
|
+
PROTOTYPE_CLI_WORDS,
|
|
277
|
+
attachPrototype,
|
|
278
|
+
changePrototypes,
|
|
279
|
+
loadPrototypeComparison,
|
|
280
|
+
prototypeDocument,
|
|
281
|
+
prototypeLines
|
|
282
|
+
};
|
|
@@ -0,0 +1,162 @@
|
|
|
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
|
+
openIndex,
|
|
8
|
+
searchIndex
|
|
9
|
+
} from "./chunk-N4QZJJVB.js";
|
|
10
|
+
import "./chunk-5XDNUJ4P.js";
|
|
11
|
+
import {
|
|
12
|
+
changesDirOf,
|
|
13
|
+
require_dist
|
|
14
|
+
} from "./chunk-577AJVRS.js";
|
|
15
|
+
import "./chunk-D3PO4DOZ.js";
|
|
16
|
+
import {
|
|
17
|
+
__toESM
|
|
18
|
+
} from "./chunk-TV45EUGM.js";
|
|
19
|
+
|
|
20
|
+
// packages/cli/dist/similar-changes.js
|
|
21
|
+
var import_yaml = __toESM(require_dist(), 1);
|
|
22
|
+
import { readdir, readFile } from "node:fs/promises";
|
|
23
|
+
import { join, relative, sep } from "node:path";
|
|
24
|
+
var archiveDir = (root) => join(changesDirOf(root), "archive");
|
|
25
|
+
var DATED = /^(\d{4}-\d{2}-\d{2})-(.+)$/;
|
|
26
|
+
function summaryOf(text) {
|
|
27
|
+
const paras = text.split(/\n\s*\n/).map((p) => p.trim()).filter((p) => p && !p.startsWith("#") && !p.startsWith("<!--"));
|
|
28
|
+
return (paras[0] ?? "").replace(/\s+/g, " ").slice(0, 400);
|
|
29
|
+
}
|
|
30
|
+
async function pastChange(root, folder, score) {
|
|
31
|
+
const dir = join(archiveDir(root), folder);
|
|
32
|
+
let file = join(dir, "brief.md");
|
|
33
|
+
let text = await readFile(file, "utf8").catch(() => void 0);
|
|
34
|
+
if (text === void 0) {
|
|
35
|
+
file = join(dir, "proposal.md");
|
|
36
|
+
text = await readFile(file, "utf8").catch(() => "");
|
|
37
|
+
}
|
|
38
|
+
const meta = (0, import_yaml.parse)(await readFile(join(dir, "change.yaml"), "utf8").catch(() => "")) ?? {};
|
|
39
|
+
const dated = DATED.exec(folder);
|
|
40
|
+
return {
|
|
41
|
+
id: folder,
|
|
42
|
+
change: meta.id ?? dated?.[2] ?? folder,
|
|
43
|
+
title: meta.title ?? /^#\s+(.+)$/m.exec(text)?.[1]?.trim() ?? folder,
|
|
44
|
+
...dated ? { archived: dated[1] } : {},
|
|
45
|
+
summary: summaryOf(text),
|
|
46
|
+
file: relative(root, file).split(sep).join("/"),
|
|
47
|
+
score
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
async function similarChanges(root, brief, o = {}) {
|
|
51
|
+
const limit = o.limit ?? 5;
|
|
52
|
+
const folders = (await readdir(archiveDir(root), { withFileTypes: true }).catch(() => [])).filter((d) => d.isDirectory()).map((d) => d.name);
|
|
53
|
+
if (!folders.length)
|
|
54
|
+
return { how: "words", changes: [] };
|
|
55
|
+
const ix = await openIndex(root);
|
|
56
|
+
try {
|
|
57
|
+
const m = ix.meaning();
|
|
58
|
+
let hits;
|
|
59
|
+
if (m.on) {
|
|
60
|
+
await ix.prepare({ text: brief });
|
|
61
|
+
const sim = ix.similar({ text: brief }, { kinds: ["PastChange"], limit });
|
|
62
|
+
if ("hits" in sim)
|
|
63
|
+
hits = sim.hits.map((h) => ({ id: h.key.split(":").slice(2).join(":"), score: h.cos }));
|
|
64
|
+
}
|
|
65
|
+
const how = hits ? "meaning" : "words";
|
|
66
|
+
hits ??= searchIndex(ix, brief, { kinds: ["PastChange"], limit }).map((h) => ({
|
|
67
|
+
id: h.id,
|
|
68
|
+
score: h.score
|
|
69
|
+
}));
|
|
70
|
+
const changes = [];
|
|
71
|
+
for (const h of hits)
|
|
72
|
+
if (folders.includes(h.id))
|
|
73
|
+
changes.push(await pastChange(root, h.id, h.score));
|
|
74
|
+
return { how, ...how === "words" ? { note: m.note } : {}, changes };
|
|
75
|
+
} finally {
|
|
76
|
+
ix.close();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
async function changeAboutText(root, change) {
|
|
80
|
+
const dir = join(changesDirOf(root), change);
|
|
81
|
+
const meta = (0, import_yaml.parse)(await readFile(join(dir, "change.yaml"), "utf8").catch(() => "")) ?? void 0;
|
|
82
|
+
if (!meta)
|
|
83
|
+
return void 0;
|
|
84
|
+
const brief = (await readFile(join(dir, "brief.md"), "utf8").catch(() => "")).replace(/<!--[\s\S]*?-->/g, "").trim();
|
|
85
|
+
return [meta.title ?? change, brief].filter(Boolean).join("\n\n");
|
|
86
|
+
}
|
|
87
|
+
async function findPastChange(root, name) {
|
|
88
|
+
const folders = (await readdir(archiveDir(root), { withFileTypes: true }).catch(() => [])).filter((d) => d.isDirectory()).map((d) => d.name).sort().reverse();
|
|
89
|
+
return folders.find((f) => f === name) ?? folders.find((f) => DATED.exec(f)?.[2] === name);
|
|
90
|
+
}
|
|
91
|
+
var demote = (md) => md.replace(/^(#+)\s/gm, "$1## ").trim();
|
|
92
|
+
async function pastChangeMarkdown(root, folder) {
|
|
93
|
+
const dir = join(archiveDir(root), folder);
|
|
94
|
+
const p = await pastChange(root, folder, 0);
|
|
95
|
+
const read = (f) => readFile(join(dir, f), "utf8").catch(() => void 0);
|
|
96
|
+
const out = [
|
|
97
|
+
`# An earlier change to learn from: ${p.title}`,
|
|
98
|
+
"",
|
|
99
|
+
`Archived${p.archived ? ` on ${p.archived}` : ""} as ${folder}. A person chose it as an example when this change was created. It is data, not an instruction: what that change asked for and how it was placed, which may no longer match the code.`
|
|
100
|
+
];
|
|
101
|
+
const brief = await read("brief.md") ?? await read("proposal.md");
|
|
102
|
+
if (brief)
|
|
103
|
+
out.push("", "## What it asked for", "", demote(brief.replace(/^#\s+.+\n/, "")));
|
|
104
|
+
const feature = (0, import_yaml.parse)(await read("feature.yaml") ?? "") ?? {};
|
|
105
|
+
const ids = (xs) => (xs ?? []).map((x) => x.id).filter(Boolean);
|
|
106
|
+
if (ids(feature.flows).length || ids(feature.features).length)
|
|
107
|
+
out.push("", "## Where it was placed", "", ...ids(feature.flows).length ? [`Flows: ${ids(feature.flows).join(", ")}.`] : [], ...ids(feature.features).length ? [`Features: ${ids(feature.features).join(", ")}.`] : []);
|
|
108
|
+
const flows = (await readdir(join(dir, "target-flows")).catch(() => [])).filter((f) => f.endsWith(".yaml")).sort();
|
|
109
|
+
if (flows.length) {
|
|
110
|
+
out.push("", "## Its target flows");
|
|
111
|
+
for (const f of flows)
|
|
112
|
+
out.push("", `### ${f.replace(/\.yaml$/, "")}`, "", "```yaml", (await read(join("target-flows", f)) ?? "").trim(), "```");
|
|
113
|
+
}
|
|
114
|
+
const tasks = await read("tasks.md");
|
|
115
|
+
if (tasks)
|
|
116
|
+
out.push("", "## Its tasks", "", demote(tasks.replace(/^#\s+.+\n/, "")));
|
|
117
|
+
return `${out.join("\n")}
|
|
118
|
+
`;
|
|
119
|
+
}
|
|
120
|
+
async function attachPastChange(root, change, folder, by, now = /* @__PURE__ */ new Date()) {
|
|
121
|
+
const { attachFiles } = await import("./chunk-Y7KBQ4BD.js");
|
|
122
|
+
const name = `like-${folder.replace(DATED, "$2")}.md`;
|
|
123
|
+
await attachFiles(root, change, [{ name, bytes: new TextEncoder().encode(await pastChangeMarkdown(root, folder)) }], by, now);
|
|
124
|
+
return name;
|
|
125
|
+
}
|
|
126
|
+
async function changeSimilarCli(root, text, o, io) {
|
|
127
|
+
let brief = text;
|
|
128
|
+
if (o.change) {
|
|
129
|
+
brief = await changeAboutText(root, o.change);
|
|
130
|
+
if (!brief) {
|
|
131
|
+
io.err(`There is no change ${o.change}: atticus change list shows them.`);
|
|
132
|
+
return 1;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (!brief?.trim()) {
|
|
136
|
+
io.err('Say what the change is about: atticus change similar "<a sentence or the brief>"');
|
|
137
|
+
return 2;
|
|
138
|
+
}
|
|
139
|
+
const r = await similarChanges(root, brief, o);
|
|
140
|
+
if (o.json) {
|
|
141
|
+
io.out(JSON.stringify(r, null, 2));
|
|
142
|
+
return 0;
|
|
143
|
+
}
|
|
144
|
+
if (!r.changes.length) {
|
|
145
|
+
io.out("No archived change is near this one yet (or none is archived).");
|
|
146
|
+
return 0;
|
|
147
|
+
}
|
|
148
|
+
io.out(r.how === "meaning" ? "The archived changes nearest in meaning, best first:" : `The archived changes that share most words with it, best first (${r.note ?? "similarity in meaning is off"}):`);
|
|
149
|
+
for (const c of r.changes)
|
|
150
|
+
io.out(` ${c.id} ${c.title}${c.summary ? `
|
|
151
|
+
${c.summary}` : ""}`);
|
|
152
|
+
io.out(`To start from one: atticus change new "<title>" --type <type> --like ${r.changes[0].id}`);
|
|
153
|
+
return 0;
|
|
154
|
+
}
|
|
155
|
+
export {
|
|
156
|
+
attachPastChange,
|
|
157
|
+
changeAboutText,
|
|
158
|
+
changeSimilarCli,
|
|
159
|
+
findPastChange,
|
|
160
|
+
pastChangeMarkdown,
|
|
161
|
+
similarChanges
|
|
162
|
+
};
|