agentic-qe 3.11.0 → 3.11.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/.claude/commands/agents/README.md +50 -0
- package/.claude/commands/agents/agent-capabilities.md +140 -0
- package/.claude/commands/agents/agent-coordination.md +28 -0
- package/.claude/commands/agents/agent-spawning.md +28 -0
- package/.claude/commands/agents/agent-types.md +216 -0
- package/.claude/commands/agents/health.md +139 -0
- package/.claude/commands/agents/list.md +100 -0
- package/.claude/commands/agents/logs.md +130 -0
- package/.claude/commands/agents/metrics.md +122 -0
- package/.claude/commands/agents/pool.md +127 -0
- package/.claude/commands/agents/spawn.md +140 -0
- package/.claude/commands/agents/status.md +115 -0
- package/.claude/commands/agents/stop.md +102 -0
- package/.claude/commands/claude-flow-help.md +1 -1
- package/.claude/commands/coordination/README.md +9 -0
- package/.claude/commands/coordination/agent-spawn.md +25 -0
- package/.claude/commands/coordination/init.md +44 -0
- package/.claude/commands/coordination/orchestrate.md +43 -0
- package/.claude/commands/coordination/spawn.md +45 -0
- package/.claude/commands/coordination/swarm-init.md +85 -0
- package/.claude/commands/coordination/task-orchestrate.md +25 -0
- package/.claude/commands/github/code-review-swarm.md +1 -1
- package/.claude/commands/github/issue-tracker.md +3 -3
- package/.claude/commands/github/release-manager.md +5 -3
- package/.claude/commands/github/release-swarm.md +1 -1
- package/.claude/commands/github/repo-architect.md +2 -2
- package/.claude/commands/github/swarm-issue.md +4 -1
- package/.claude/commands/github/swarm-pr.md +6 -3
- package/.claude/commands/github/sync-coordinator.md +3 -1
- package/.claude/commands/github/workflow-automation.md +2 -2
- package/.claude/commands/hive-mind/README.md +17 -0
- package/.claude/commands/hive-mind/hive-mind-consensus.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-init.md +18 -0
- package/.claude/commands/hive-mind/hive-mind-memory.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-metrics.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-resume.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-sessions.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-spawn.md +21 -0
- package/.claude/commands/hive-mind/hive-mind-status.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-stop.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-wizard.md +8 -0
- package/.claude/commands/hive-mind/hive-mind.md +27 -0
- package/.claude/commands/memory/README.md +9 -0
- package/.claude/commands/memory/memory-persist.md +25 -0
- package/.claude/commands/memory/memory-search.md +25 -0
- package/.claude/commands/memory/memory-usage.md +25 -0
- package/.claude/commands/memory/neural.md +47 -0
- package/.claude/commands/swarm/README.md +15 -0
- package/.claude/commands/swarm/analysis.md +95 -0
- package/.claude/commands/swarm/development.md +96 -0
- package/.claude/commands/swarm/examples.md +168 -0
- package/.claude/commands/swarm/maintenance.md +102 -0
- package/.claude/commands/swarm/optimization.md +117 -0
- package/.claude/commands/swarm/research.md +136 -0
- package/.claude/commands/swarm/swarm-analysis.md +8 -0
- package/.claude/commands/swarm/swarm-background.md +8 -0
- package/.claude/commands/swarm/swarm-init.md +19 -0
- package/.claude/commands/swarm/swarm-modes.md +8 -0
- package/.claude/commands/swarm/swarm-monitor.md +8 -0
- package/.claude/commands/swarm/swarm-spawn.md +19 -0
- package/.claude/commands/swarm/swarm-status.md +8 -0
- package/.claude/commands/swarm/swarm-strategies.md +8 -0
- package/.claude/commands/swarm/swarm.md +87 -0
- package/.claude/commands/swarm/testing.md +131 -0
- package/.claude/commands/workflows/README.md +9 -0
- package/.claude/commands/workflows/development.md +78 -0
- package/.claude/commands/workflows/research.md +63 -0
- package/.claude/commands/workflows/workflow-create.md +25 -0
- package/.claude/commands/workflows/workflow-execute.md +25 -0
- package/.claude/commands/workflows/workflow-export.md +25 -0
- package/.claude/helpers/auto-commit.sh +1 -1
- package/.claude/helpers/auto-memory-hook.mjs +37 -4
- package/.claude/helpers/github-safe.js +90 -40
- package/.claude/helpers/github-setup.sh +30 -13
- package/.claude/helpers/hook-handler.cjs +68 -49
- package/.claude/helpers/intelligence.cjs +156 -27
- package/.claude/helpers/post-commit +1 -1
- package/.claude/helpers/pre-commit +1 -1
- package/.claude/helpers/quick-start.sh +4 -4
- package/.claude/helpers/router.js +70 -31
- package/.claude/helpers/ruflo-hook.cjs +59 -0
- package/.claude/helpers/session.js +28 -6
- package/.claude/helpers/setup-mcp.sh +3 -3
- package/.claude/helpers/statusline.cjs +584 -468
- package/.claude/helpers/statusline.js +47 -11
- package/.claude/skills/github-code-review/SKILL.md +2 -17
- package/.claude/skills/github-multi-repo/SKILL.md +4 -16
- package/.claude/skills/github-project-management/SKILL.md +18 -33
- package/.claude/skills/github-release-management/SKILL.md +4 -21
- package/.claude/skills/github-workflow-automation/SKILL.md +8 -26
- package/.claude/skills/pair-programming/SKILL.md +2 -2
- package/.claude/skills/qe-code-intelligence/SKILL.md +3 -0
- package/.claude/skills/reasoningbank-intelligence/SKILL.md +2 -2
- package/.claude/skills/skill-builder/SKILL.md +0 -103
- package/.claude/skills/skills-manifest.json +1 -1
- package/.claude/skills/sparc-methodology/SKILL.md +2 -11
- package/.claude/skills/stream-chain/SKILL.md +0 -3
- package/.claude/skills/swarm-advanced/SKILL.md +2 -5
- package/.claude/skills/swarm-orchestration/SKILL.md +1 -1
- package/.claude/skills/verification-quality/SKILL.md +121 -93
- package/CHANGELOG.md +84 -0
- package/README.md +1 -0
- package/assets/skills/pair-programming/SKILL.md +2 -2
- package/assets/skills/qe-code-intelligence/SKILL.md +3 -0
- package/assets/skills/verification-quality/SKILL.md +121 -93
- package/dist/audit/witness-chain.d.ts +1 -1
- package/dist/audit/witness-findings.d.ts +50 -0
- package/dist/audit/witness-findings.js +41 -0
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-LDNYC4GH.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-5CSKQB4O.js → agent-booster-wasm-FNCVODUJ.js} +2 -2
- package/dist/cli/chunks/{agent-handler-EBV3OKTE.js → agent-handler-JK7VK37B.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-RZ53YM2U.js → agent-memory-branch-EPVVJNNA.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-CA4CT5Q7.js +2 -0
- package/dist/cli/chunks/{arena-UCP74DRO.js → arena-EH2IMSRW.js} +4 -4
- package/dist/cli/chunks/{arena-QWYTIQ6I.js → arena-NTHVDZTJ.js} +2 -2
- package/dist/cli/chunks/{audit-M4FNIX47.js → audit-ODZV2T2B.js} +2 -2
- package/dist/cli/chunks/base-TSDAEMT4.js +2 -0
- package/dist/cli/chunks/{hnswlib-node-HMZC5TXM.js → better-sqlite3-5JTP47LA.js} +2 -2
- package/dist/cli/chunks/{brain-handler-OY6Q2GY5.js → brain-handler-NVB6OJ25.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-TQWN4NIX.js → branch-enumerator-BIXSELMY.js} +2 -2
- package/dist/cli/chunks/{browser-2EH3RXJ2.js → browser-S2Y2W33Z.js} +2 -2
- package/dist/cli/chunks/browser-workflow-3HCTJBLR.js +2 -0
- package/dist/cli/chunks/{chunk-V6WJVFRN.js → chunk-26ZMIYSK.js} +2 -2
- package/dist/cli/chunks/{chunk-I2HQLBWG.js → chunk-27KNLVOY.js} +2 -2
- package/dist/cli/chunks/{chunk-HNSZDIQU.js → chunk-2Q65LTJN.js} +2 -2
- package/dist/cli/chunks/{chunk-SKL225P5.js → chunk-3ATEYGVD.js} +2 -2
- package/dist/cli/chunks/{chunk-LTH6XARD.js → chunk-3J3QXLWP.js} +2 -2
- package/dist/cli/chunks/{chunk-NQD4CMXC.js → chunk-3KTOM7NN.js} +2 -2
- package/dist/cli/chunks/{chunk-QCJ7YOVN.js → chunk-3NCVUFAL.js} +2 -2
- package/dist/cli/chunks/{chunk-ZEUUVLS2.js → chunk-42DCMEUM.js} +1 -1
- package/dist/cli/chunks/{chunk-2QU6C3OS.js → chunk-4FTVTAMN.js} +2 -2
- package/dist/cli/chunks/{chunk-QYXTESM3.js → chunk-4PYJCIRO.js} +2 -2
- package/dist/cli/chunks/{chunk-LFT7WYHW.js → chunk-527U4AHC.js} +2 -2
- package/dist/cli/chunks/{chunk-VHON5NDM.js → chunk-5AFO7ZZG.js} +3 -3
- package/dist/cli/chunks/{chunk-F62ZQZQQ.js → chunk-5BDVFFYF.js} +2 -2
- package/dist/cli/chunks/{chunk-KBVXKFDI.js → chunk-5KMGG3QW.js} +4 -4
- package/dist/cli/chunks/{chunk-AVKGDS6F.js → chunk-6LQIVIZB.js} +2 -2
- package/dist/cli/chunks/{chunk-RKDNLPZM.js → chunk-6SOGYNJG.js} +2 -2
- package/dist/cli/chunks/{chunk-RPYYS6BX.js → chunk-6VAFRS5N.js} +2 -2
- package/dist/cli/chunks/chunk-72VVTMEL.js +2 -0
- package/dist/cli/chunks/{chunk-AURDGQNB.js → chunk-75C5GX7D.js} +2 -2
- package/dist/cli/chunks/{chunk-JN3IQB4L.js → chunk-76RO2RHG.js} +1 -1
- package/dist/cli/chunks/{chunk-7E5NYLJT.js → chunk-7HYO76F2.js} +2 -2
- package/dist/cli/chunks/{chunk-R3YO3Z7I.js → chunk-7KHZZVF2.js} +4 -4
- package/dist/cli/chunks/{chunk-G5VE3HQW.js → chunk-7MKF52GT.js} +2 -2
- package/dist/cli/chunks/{chunk-TGLEREP5.js → chunk-7VM4ZUHT.js} +2 -2
- package/dist/cli/chunks/{chunk-XW5OXBVV.js → chunk-7XIQR6VU.js} +2 -2
- package/dist/cli/chunks/{chunk-XKRG2U3V.js → chunk-A4ZDKF5F.js} +1 -1
- package/dist/cli/chunks/{chunk-XSG4XKGO.js → chunk-AAVUZVM6.js} +2 -2
- package/dist/cli/chunks/{chunk-XVQUVCFR.js → chunk-AINAWVGD.js} +2 -2
- package/dist/cli/chunks/{chunk-PUTRXS5I.js → chunk-AK5Q2WCJ.js} +2 -2
- package/dist/cli/chunks/{chunk-TYS77XHV.js → chunk-AKZK46TQ.js} +2 -2
- package/dist/cli/chunks/{chunk-JQM64WJ2.js → chunk-ARUXFZDY.js} +1 -1
- package/dist/cli/chunks/{chunk-YR44KQUK.js → chunk-AYXRT2ND.js} +1 -1
- package/dist/cli/chunks/{chunk-ZT4NPTML.js → chunk-AZQ6HDPM.js} +2 -2
- package/dist/cli/chunks/{chunk-DCJIXDO6.js → chunk-BGVEBYV4.js} +2 -2
- package/dist/cli/chunks/{chunk-IHNBZ5XG.js → chunk-C6UTRG66.js} +2 -2
- package/dist/cli/chunks/{chunk-R7FHQQAV.js → chunk-CAUTOCLZ.js} +2 -2
- package/dist/cli/chunks/{chunk-N52ZBTPM.js → chunk-CAVBEZV4.js} +2 -2
- package/dist/cli/chunks/{chunk-3LP5GPGU.js → chunk-CEMROADY.js} +1 -1
- package/dist/cli/chunks/{chunk-IQSPL2H4.js → chunk-CMVNYVKL.js} +2 -2
- package/dist/cli/chunks/{chunk-7BD7DZCB.js → chunk-CUDGKSFX.js} +2 -2
- package/dist/cli/chunks/{chunk-D3S4SRSA.js → chunk-CZYSCUJ4.js} +2 -2
- package/dist/cli/chunks/{chunk-4OTA6KYJ.js → chunk-DMUQV2YU.js} +2 -2
- package/dist/cli/chunks/{chunk-KZE5UR4T.js → chunk-DPFLJMEI.js} +3 -3
- package/dist/cli/chunks/{chunk-IOQYSR5S.js → chunk-DU4GQKTH.js} +2 -2
- package/dist/cli/chunks/{chunk-FMKALHT3.js → chunk-EDH4H55B.js} +2 -2
- package/dist/cli/chunks/{chunk-NI7O3GKZ.js → chunk-EIWZDVMT.js} +3 -3
- package/dist/cli/chunks/{chunk-5DG6H553.js → chunk-FPZLOVEF.js} +1 -1
- package/dist/cli/chunks/{chunk-DV7662EZ.js → chunk-FV53RMVB.js} +1 -1
- package/dist/cli/chunks/{chunk-BA4WZIAQ.js → chunk-FYY7OJ6Y.js} +2 -2
- package/dist/cli/chunks/{chunk-5ASPEVVF.js → chunk-G4CQBQBV.js} +1 -1
- package/dist/cli/chunks/{chunk-GBFAQ4DW.js → chunk-G6LIQFT2.js} +1 -1
- package/dist/cli/chunks/{chunk-2WVLFT2I.js → chunk-H3LGBH4Y.js} +1 -1
- package/dist/cli/chunks/{chunk-G25YZ7Z6.js → chunk-H4ZPPHOI.js} +2 -2
- package/dist/cli/chunks/{chunk-C33BMWYZ.js → chunk-H5TM4KIB.js} +5 -5
- package/dist/cli/chunks/{chunk-72QNONO6.js → chunk-H6MBRYA7.js} +2 -2
- package/dist/cli/chunks/{chunk-5OJXVVTI.js → chunk-HDBJORV7.js} +2 -2
- package/dist/cli/chunks/{chunk-HJFQVKPI.js → chunk-I3AD523O.js} +1 -1
- package/dist/cli/chunks/{chunk-2BBKA5J4.js → chunk-I7UWFV6N.js} +1 -1
- package/dist/cli/chunks/{chunk-IFTEM672.js → chunk-IMPSB5WW.js} +2 -2
- package/dist/cli/chunks/{chunk-YSTWLDVD.js → chunk-IO7ZUP2G.js} +3 -3
- package/dist/cli/chunks/{chunk-F6Y7DTHR.js → chunk-IQOCTGA2.js} +2 -2
- package/dist/cli/chunks/{chunk-RVQW6CBF.js → chunk-IXYF5BZY.js} +2 -2
- package/dist/cli/chunks/{chunk-3J6LYF6I.js → chunk-JC4Z2ADP.js} +2 -2
- package/dist/cli/chunks/{chunk-T6KT63NC.js → chunk-JCH2FHJ7.js} +2 -2
- package/dist/cli/chunks/{chunk-7PTA7AVW.js → chunk-JDFF2QMZ.js} +1 -1
- package/dist/cli/chunks/{chunk-UEH6C5JA.js → chunk-JELN5XTK.js} +1 -1
- package/dist/cli/chunks/{chunk-Z45QDDZQ.js → chunk-JSZNI3AO.js} +1 -1
- package/dist/cli/chunks/{chunk-ZFP3O5FM.js → chunk-K3YM2Z3E.js} +1 -1
- package/dist/cli/chunks/{chunk-X2TUDGFL.js → chunk-K426HTEQ.js} +44 -44
- package/dist/cli/chunks/{chunk-GGSXHGWD.js → chunk-K6IQBVD7.js} +2 -2
- package/dist/cli/chunks/{chunk-453UDYD2.js → chunk-KEJEZY2R.js} +163 -181
- package/dist/cli/chunks/{chunk-MTSMFEWK.js → chunk-KFE6LB4I.js} +2 -2
- package/dist/cli/chunks/{chunk-DDQWW22L.js → chunk-KO3WB4SU.js} +2 -2
- package/dist/cli/chunks/{chunk-ETGEGMYS.js → chunk-LAY35POY.js} +3 -3
- package/dist/cli/chunks/{chunk-P3NV6KN3.js → chunk-LFXXA325.js} +1 -1
- package/dist/cli/chunks/{chunk-ZK56THZT.js → chunk-LI3T5YNC.js} +3 -3
- package/dist/cli/chunks/{chunk-ACV2WVMX.js → chunk-LIEA5EON.js} +1 -1
- package/dist/cli/chunks/{chunk-KOOY72E3.js → chunk-LRJWKFGY.js} +2 -2
- package/dist/cli/chunks/{chunk-Y7TBCHW4.js → chunk-LY6PTRVL.js} +2 -2
- package/dist/cli/chunks/{chunk-WP6XUSVW.js → chunk-MAXOIEUG.js} +1 -1
- package/dist/cli/chunks/{chunk-X2L4POJE.js → chunk-MN6W7ZNL.js} +1 -1
- package/dist/cli/chunks/{chunk-CERSTEAJ.js → chunk-NGE5YNKC.js} +2 -2
- package/dist/cli/chunks/{chunk-J425SQFE.js → chunk-NIW4CLN2.js} +2 -2
- package/dist/cli/chunks/{chunk-PJ4HSXH3.js → chunk-NPT7BYGF.js} +1 -1
- package/dist/cli/chunks/{chunk-HHSEIPSQ.js → chunk-NZNXEEZR.js} +1 -1
- package/dist/cli/chunks/{chunk-FMULOSBL.js → chunk-O3IIAIXB.js} +1 -1
- package/dist/cli/chunks/{chunk-ITRUZ3WE.js → chunk-OC2W7KIW.js} +2 -2
- package/dist/cli/chunks/{chunk-QZQGYSDG.js → chunk-OFUF3APC.js} +2 -2
- package/dist/cli/chunks/{chunk-MKLLB4PM.js → chunk-OU52V67H.js} +4 -4
- package/dist/cli/chunks/{chunk-Y7UJC5OL.js → chunk-P2RR4SW5.js} +3 -3
- package/dist/cli/chunks/{chunk-7Q6CMSMD.js → chunk-P3VRXQ3H.js} +3 -3
- package/dist/cli/chunks/{chunk-YRP73HO4.js → chunk-P5SGBQLY.js} +1 -1
- package/dist/cli/chunks/{chunk-MDYI4IIW.js → chunk-P7MIOTVP.js} +1 -1
- package/dist/cli/chunks/{chunk-B4QA3YN6.js → chunk-PFDILSVO.js} +1 -1
- package/dist/cli/chunks/{chunk-2ZC7S4UG.js → chunk-PPD5ZLNA.js} +2 -2
- package/dist/cli/chunks/{chunk-VGYUVMSN.js → chunk-QFJDR4HC.js} +2 -2
- package/dist/cli/chunks/{chunk-3GWSHRDA.js → chunk-QZ2GQGJX.js} +2 -2
- package/dist/cli/chunks/{chunk-XMZ2DHUL.js → chunk-QZLTIGLB.js} +1 -1
- package/dist/cli/chunks/{chunk-BEOGI5FC.js → chunk-RHSUXQNF.js} +2 -2
- package/dist/cli/chunks/{chunk-ISVBO4XO.js → chunk-S6BWEZKK.js} +2 -2
- package/dist/cli/chunks/{chunk-AYOTODUV.js → chunk-SE4S23C7.js} +1 -1
- package/dist/cli/chunks/{chunk-SLWJNHCR.js → chunk-TOGZ37RL.js} +2 -2
- package/dist/cli/chunks/{chunk-73EWPVBJ.js → chunk-UCXW24HY.js} +2 -2
- package/dist/cli/chunks/{chunk-JQSA6EMI.js → chunk-UQ6WB4N2.js} +2 -2
- package/dist/cli/chunks/{chunk-SQPDGRYR.js → chunk-UQBGA4UA.js} +1 -1
- package/dist/cli/chunks/{chunk-N3R3JGUY.js → chunk-VNFL2TPU.js} +1 -1
- package/dist/cli/chunks/{chunk-QGBXENIP.js → chunk-WARFZ626.js} +1 -1
- package/dist/cli/chunks/{chunk-PVBJUANU.js → chunk-WEBHFIWS.js} +2 -2
- package/dist/cli/chunks/{chunk-YQIMO7VJ.js → chunk-WKIYYF3G.js} +2 -2
- package/dist/cli/chunks/{chunk-6VQKNPGY.js → chunk-WZC4HKGZ.js} +2 -2
- package/dist/cli/chunks/{chunk-O6FN53HB.js → chunk-X36TZXDK.js} +1 -1
- package/dist/cli/chunks/{chunk-IKNDGXZZ.js → chunk-XN4G3SRU.js} +2 -2
- package/dist/cli/chunks/{chunk-N7MKF4F4.js → chunk-XNREA3FG.js} +1 -1
- package/dist/cli/chunks/{chunk-PC3VIR2A.js → chunk-XRDPGJNW.js} +2 -2
- package/dist/cli/chunks/{chunk-ETZ62NFD.js → chunk-XXCSJMSR.js} +1 -1
- package/dist/cli/chunks/{chunk-LCDRRAES.js → chunk-XY2B2BEJ.js} +2 -2
- package/dist/cli/chunks/{chunk-HMSPPGUF.js → chunk-XY4JS3IZ.js} +2 -2
- package/dist/cli/chunks/{chunk-L7GQKJLV.js → chunk-Y4M2HMPR.js} +2 -2
- package/dist/cli/chunks/{chunk-2TUVBEWK.js → chunk-YDPBCN7H.js} +2 -2
- package/dist/cli/chunks/{chunk-NBTKI2TX.js → chunk-YGR54EAA.js} +2 -2
- package/dist/cli/chunks/{chunk-WBQEOACC.js → chunk-YGRY2TVI.js} +2 -2
- package/dist/cli/chunks/{chunk-VVJXQ4FR.js → chunk-YJUJCLXV.js} +2 -2
- package/dist/cli/chunks/{chunk-SHW43QQV.js → chunk-YWG4LHFU.js} +2 -2
- package/dist/cli/chunks/{chunk-FGOVDO3R.js → chunk-Z2QNTRUX.js} +2 -2
- package/dist/cli/chunks/{chunk-UFMW25MS.js → chunk-ZBJMVWQR.js} +2 -2
- package/dist/cli/chunks/{chunk-7MBF3S25.js → chunk-ZH6HYT7C.js} +1 -1
- package/dist/cli/chunks/{chunk-LYV7WJWA.js → chunk-ZP2GE6DM.js} +1 -1
- package/dist/cli/chunks/{chunk-JNX7IRSI.js → chunk-ZQYEBLTL.js} +2 -2
- package/dist/cli/chunks/{chunk-FTOICJQG.js → chunk-ZRU3OZEU.js} +2 -2
- package/dist/cli/chunks/{chunk-OZQIDDXB.js → chunk-ZU3V4CJ4.js} +2 -2
- package/dist/cli/chunks/{chunk-JZFA2PWY.js → chunk-ZWMXF6AX.js} +2 -2
- package/dist/cli/chunks/{ci-4JK2NFCD.js → ci-SM3EVLZ4.js} +2 -2
- package/dist/cli/chunks/{ci-output-LCGTJQWC.js → ci-output-YYXICZBC.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-EJF7D3L4.js → circuit-breaker-CV5UGKXT.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-3RUC6OB4.js → claude-flow-setup-BSBUZ4B7.js} +2 -2
- package/dist/cli/chunks/client-WRDYZGM2.js +2 -0
- package/dist/cli/chunks/{cline-installer-6LY5C5QH.js → cline-installer-P2O6STIC.js} +2 -2
- package/dist/cli/chunks/code-M7DDLBGS.js +58 -0
- package/dist/cli/chunks/{code-index-extractor-OY5GQJBM.js → code-index-extractor-3QZIUYOG.js} +2 -2
- package/dist/cli/chunks/{codex-installer-BO7E2ZVA.js → codex-installer-5JVZCCTC.js} +2 -2
- package/dist/cli/chunks/{completions-VGL3KJ2R.js → completions-EM7IL2BJ.js} +8 -5
- package/dist/cli/chunks/{complexity-analyzer-5DPUK7IL.js → complexity-analyzer-VJXVB2CV.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-LFDG2D42.js → continuedev-installer-RCKJIAEC.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-SEMMMIZH.js → copilot-installer-DZ7LTDOZ.js} +2 -2
- package/dist/cli/chunks/core-handlers-O6E5DNHT.js +2 -0
- package/dist/cli/chunks/{cost-tracker-OPBC6FQM.js → cost-tracker-QLOLXVAM.js} +2 -2
- package/dist/cli/chunks/{coverage-CFDUSRKU.js → coverage-LYHTLWRV.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-EV7LQMDO.js +2 -0
- package/dist/cli/chunks/{cursor-installer-6TXUUVY4.js → cursor-installer-PSIZ3Y53.js} +2 -2
- package/dist/cli/chunks/{daemon-5KO46YQR.js → daemon-IYDTMA5M.js} +4 -4
- package/dist/cli/chunks/{daemon-7BDBPPAF.js → daemon-YLOAXM4X.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-6DQKZOUW.js → dag-attention-scheduler-I2UIO3Z7.js} +2 -2
- package/dist/cli/chunks/{detect-R2QAYDPI.js → detect-ZXQ7X7GZ.js} +2 -2
- package/dist/cli/chunks/{dist-node-3POCIJ4N.js → dist-node-GK6OZX4H.js} +2 -2
- package/dist/cli/chunks/{domain-handler-KW63CHUH.js → domain-handler-NS3IBLRQ.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-2QPOJCUD.js → domain-transfer-5G4RZEWF.js} +2 -2
- package/dist/cli/chunks/dream-E4C236UL.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-OIDJZQEP.js → embed-and-insert-pattern-V4JJUFR6.js} +2 -2
- package/dist/cli/chunks/{eval-UGEKTTAQ.js → eval-7Q6PPYKR.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-3BIM2TT7.js → experience-capture-middleware-DUBKSYFM.js} +3 -3
- package/dist/cli/chunks/{fast-paths-HCJQXB7W.js → fast-paths-IDPPMBUW.js} +2 -2
- package/dist/cli/chunks/{feature-flags-W4JSFBMV.js → feature-flags-EPTMAAKA.js} +2 -2
- package/dist/cli/chunks/{feature-flags-GDGJKLN4.js → feature-flags-KXI6FDY7.js} +2 -2
- package/dist/cli/chunks/{file-discovery-JMUZ4MUH.js → file-discovery-EDX2OJO7.js} +2 -2
- package/dist/cli/chunks/{fleet-YNNK2CKW.js → fleet-67BO3LJ4.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-R2ZY6CDD.js → gnn-wrapper-YARORYT7.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-OZX2EJHQ.js → heartbeat-handler-K3JGPBYR.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-WMADLDKT.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-STRDGJ65.js +2 -0
- package/dist/cli/chunks/hnsw-index-DBHX3TSC.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-3S6TYCG3.js → hnsw-legacy-bridge-CDDRSV5E.js} +2 -2
- package/dist/cli/chunks/{better-sqlite3-RIBLRHJL.js → hnswlib-node-2KL54YUA.js} +2 -2
- package/dist/cli/chunks/{hooks-KM7WR35T.js → hooks-6SCAE6LC.js} +10 -10
- package/dist/cli/chunks/hybrid-router-L2K55I4T.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-RX53A73M.js → hypergraph-engine-I3LUMO7I.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-3QQB3H3Z.js → hypergraph-handler-YAKAIVCN.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-WMO7ZGS7.js +2 -0
- package/dist/cli/chunks/{init-handler-Y62RH4ZI.js → init-handler-NBKCZD7Q.js} +6 -6
- package/dist/cli/chunks/init-wizard-ZAB7UZZS.js +2 -0
- package/dist/cli/chunks/kernel-4MUFDEQI.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-26R253L2.js → kilocode-installer-YGPJCPU3.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-PFA5QPZZ.js → kiro-installer-JV3ONVMN.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-GZRFGXLX.js +2 -0
- package/dist/cli/chunks/{learning-CQLM5ANX.js → learning-2FEZJ5CX.js} +3 -3
- package/dist/cli/chunks/{llm-router-QZ5PG4PF.js → llm-router-SILI4KLU.js} +4 -4
- package/dist/cli/chunks/llm-router-service-5ODLU5U5.js +2 -0
- package/dist/cli/chunks/{load-UPA6LPHM.js → load-EGXLQVR3.js} +2 -2
- package/dist/cli/chunks/load-test-ZDQFS5XS.js +2 -0
- package/dist/cli/chunks/{mcp-LSWTLAJ4.js → mcp-OJH775TL.js} +2 -2
- package/dist/cli/chunks/{memory-VGEYYGCG.js → memory-FNEOK4FW.js} +5 -5
- package/dist/cli/chunks/memory-backend-UK7SQ6ZM.js +2 -0
- package/dist/cli/chunks/{memory-handlers-QBURG7NA.js → memory-handlers-6LDUH3JZ.js} +2 -2
- package/dist/cli/chunks/{multi-model-executor-VZVFBIKC.js → multi-model-executor-ORTFWLLE.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-PBQAXNLV.js → opencode-installer-UAQLW6XX.js} +2 -2
- package/dist/cli/chunks/{orchestrator-YND7JB5O.js → orchestrator-VE5KJ2V4.js} +5 -5
- package/dist/cli/chunks/pattern-null-store-LO2QTIBU.js +2 -0
- package/dist/cli/chunks/{pipeline-GM5RRUES.js → pipeline-FNMDRWTU.js} +2 -2
- package/dist/cli/chunks/{platform-L7OGGRSL.js → platform-MGAKRUQN.js} +2 -2
- package/dist/cli/chunks/{plugin-N4YAE6H5.js → plugin-YX7THX3I.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-7D67XV6Z.js → prime-radiant-advanced-wasm-XJV4RLMK.js} +2 -2
- package/dist/cli/chunks/protocol-executor-JWMYQEOI.js +2 -0
- package/dist/cli/chunks/{protocol-handler-V2WTFU7N.js → protocol-handler-QFET442Y.js} +2 -2
- package/dist/cli/chunks/{prove-33DS5Z3N.js → prove-QBAESCOC.js} +2 -2
- package/dist/cli/chunks/provider-manager-PEXOHGNB.js +2 -0
- package/dist/cli/chunks/qe-reasoning-bank-7B2G4UGQ.js +2 -0
- package/dist/cli/chunks/{quality-WCSEA5GH.js → quality-ZTNRL6EG.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-6OF4HT3S.js +2 -0
- package/dist/cli/chunks/{real-embeddings-OQ5F37DG.js → real-embeddings-ZFFDV6HC.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-II7LIR2X.js → roocode-installer-J4LFL4AE.js} +2 -2
- package/dist/cli/chunks/router-GMWRF6DU.js +2 -0
- package/dist/cli/chunks/routing-feedback-XKJSQK3I.js +2 -0
- package/dist/cli/chunks/{routing-handler-6OFHARIY.js → routing-handler-A5QG2TP2.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-GD5JTR4M.js → ruvector-commands-J5JL5WX5.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-HSK6BYZV.js → rvf-dual-writer-H7442GMO.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-554SMF5S.js → rvf-migration-adapter-PTFQUYKC.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-OFDBCAYE.js → rvf-migration-coordinator-RSNROYRX.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-YEA6TMXB.js +2 -0
- package/dist/cli/chunks/safe-db-5DOP2J3V.js +2 -0
- package/dist/cli/chunks/schedule-SUWTOBHP.js +2 -0
- package/dist/cli/chunks/scheduler-P4VTC5SQ.js +2 -0
- package/dist/cli/chunks/{security-GN4J6DSS.js → security-LHHLMCBA.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-Q4PM3QCN.js → shared-rvf-adapter-NPSHVUTM.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-R5WK5BXQ.js → shared-rvf-dual-writer-INQDY5WE.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-5Z2RAXH7.js +2 -0
- package/dist/cli/chunks/{status-handler-AHS5WVMG.js → status-handler-R2KIAMAE.js} +2 -2
- package/dist/cli/chunks/{structural-health-5KUKNLHZ.js → structural-health-2VPPIOZX.js} +2 -2
- package/dist/cli/chunks/{sync-PUMM3SR6.js → sync-ASZ3T5GT.js} +2 -2
- package/dist/cli/chunks/{sync-TQLGD5HX.js → sync-NLASP7AK.js} +2 -2
- package/dist/cli/chunks/{task-handler-D7VXV4AF.js → task-handler-UV5R6LJG.js} +2 -2
- package/dist/cli/chunks/{task-handlers-QMN4SWUG.js → task-handlers-I6YJXPYP.js} +3 -3
- package/dist/cli/chunks/{test-HEWZR6YQ.js → test-TE43TNTI.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-VTMLBEPA.js → test-scheduling-WWWWF2TZ.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-IYBG7PQ6.js → token-bootstrap-HEWP7KKS.js} +2 -2
- package/dist/cli/chunks/{token-usage-C7H27BFZ.js → token-usage-3FVHUAW6.js} +2 -2
- package/dist/cli/chunks/{transformers-5ZJVC6NB.js → transformers-O5OFM4XM.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-EARBJG2H.js → tree-sitter-wasm-parser-YOYWFW63.js} +2 -2
- package/dist/cli/chunks/{types-3IHE42PZ.js → types-42GR6PLO.js} +2 -2
- package/dist/cli/chunks/unified-memory-HCKOPFAY.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-6NQPYA5C.js +2 -0
- package/dist/cli/chunks/unified-persistence-NIMKNAFR.js +2 -0
- package/dist/cli/chunks/{upgrade-YP3VFSXO.js → upgrade-BU6DJ4LT.js} +2 -2
- package/dist/cli/chunks/{validate-VSBNKPN6.js → validate-MPTBARGN.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-GOCJVWXE.js → validate-swarm-5LUQYHPP.js} +2 -2
- package/dist/cli/chunks/{vibium-U6YKCLDF.js → vibium-MJJDANDL.js} +2 -2
- package/dist/cli/chunks/visual-security-HFGHA57Z.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-TSNVGWSN.js → web-tree-sitter-5TF4UGB3.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-2VKMEFSD.js → windsurf-installer-NQAOSVCN.js} +2 -2
- package/dist/cli/chunks/{witness-chain-BWZCW52H.js → witness-chain-23UWK2JT.js} +2 -2
- package/dist/cli/chunks/witness-chain-VZGGJ7TJ.js +2 -0
- package/dist/cli/chunks/{workflow-J6SCYLU3.js → workflow-3QOLXRJC.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-45L7D4SN.js +2 -0
- package/dist/cli/chunks/{wrappers-M5C7DONW.js → wrappers-S6EUZBCX.js} +2 -2
- package/dist/cli/commands/code.js +78 -2
- package/dist/cli/completions/index.js +4 -1
- package/dist/domains/code-intelligence/coordinator.js +8 -4
- package/dist/domains/code-intelligence/services/c4-model/from-detected.d.ts +41 -0
- package/dist/domains/code-intelligence/services/c4-model/from-detected.js +152 -0
- package/dist/domains/code-intelligence/services/c4-model/kg-relationships.d.ts +71 -0
- package/dist/domains/code-intelligence/services/c4-model/kg-relationships.js +87 -0
- package/dist/domains/code-intelligence/services/knowledge-graph.d.ts +6 -0
- package/dist/domains/code-intelligence/services/knowledge-graph.js +3 -3
- package/dist/domains/code-intelligence/services/product-factors-bridge.d.ts +26 -5
- package/dist/domains/code-intelligence/services/product-factors-bridge.js +72 -65
- package/dist/domains/requirements-validation/coordinator.d.ts +16 -2
- package/dist/domains/requirements-validation/coordinator.js +112 -7
- package/dist/domains/requirements-validation/plugin.js +20 -1
- package/dist/domains/test-generation/coordinator.d.ts +3 -1
- package/dist/domains/test-generation/coordinator.js +15 -33
- package/dist/integrations/darwin/types.d.ts +10 -3
- package/dist/integrations/darwin/types.js +10 -3
- package/dist/mcp/bundle.js +446 -464
- package/dist/mcp/tool-scoping.d.ts +8 -2
- package/dist/mcp/tool-scoping.js +13 -0
- package/dist/mcp/tools/code-intelligence/c4.d.ts +56 -0
- package/dist/mcp/tools/code-intelligence/c4.js +145 -0
- package/dist/mcp/tools/index.d.ts +1 -0
- package/dist/mcp/tools/index.js +1 -0
- package/dist/mcp/tools/registry.d.ts +1 -0
- package/dist/mcp/tools/registry.js +3 -0
- package/dist/routing/free-tier/coordinator-support.d.ts +90 -0
- package/dist/routing/free-tier/coordinator-support.js +78 -0
- package/dist/routing/free-tier/executor.d.ts +43 -1
- package/dist/routing/free-tier/executor.js +69 -26
- package/dist/routing/free-tier/index.d.ts +1 -0
- package/dist/routing/free-tier/index.js +1 -0
- package/dist/routing/value-score.d.ts +49 -0
- package/dist/routing/value-score.js +54 -0
- package/dist/shared/c4-model/confidence.d.ts +38 -0
- package/dist/shared/c4-model/confidence.js +69 -0
- package/dist/shared/c4-model/index.d.ts +4 -0
- package/dist/shared/c4-model/index.js +1 -0
- package/dist/shared/optional-module.d.ts +23 -0
- package/dist/shared/optional-module.js +46 -0
- package/dist/verification/adversarial-verify/calibrate.d.ts +32 -0
- package/dist/verification/adversarial-verify/calibrate.js +33 -0
- package/dist/verification/adversarial-verify/gate.d.ts +38 -0
- package/dist/verification/adversarial-verify/gate.js +32 -0
- package/dist/verification/adversarial-verify/index.d.ts +20 -0
- package/dist/verification/adversarial-verify/index.js +6 -0
- package/dist/verification/adversarial-verify/prompts.d.ts +14 -0
- package/dist/verification/adversarial-verify/prompts.js +17 -0
- package/dist/verification/adversarial-verify/synthesize.d.ts +18 -0
- package/dist/verification/adversarial-verify/synthesize.js +35 -0
- package/dist/verification/adversarial-verify/types.d.ts +59 -0
- package/dist/verification/adversarial-verify/types.js +10 -0
- package/dist/verification/adversarial-verify/verify.d.ts +20 -0
- package/dist/verification/adversarial-verify/verify.js +34 -0
- package/package.json +10 -1
- package/dist/cli/chunks/adapter-WLFT5VMV.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-JBH4GZUM.js +0 -2
- package/dist/cli/chunks/base-A7JGM473.js +0 -2
- package/dist/cli/chunks/browser-workflow-TIDJWULK.js +0 -2
- package/dist/cli/chunks/chunk-C4OYHUJV.js +0 -2
- package/dist/cli/chunks/client-ZLJ3JMBC.js +0 -2
- package/dist/cli/chunks/code-MPDG4UHS.js +0 -39
- package/dist/cli/chunks/core-handlers-EM7FUYTI.js +0 -2
- package/dist/cli/chunks/cross-domain-router-DYGHQ6P5.js +0 -2
- package/dist/cli/chunks/dream-DBE5D5BD.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-NFHAANNL.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-HMPCZFBY.js +0 -2
- package/dist/cli/chunks/hnsw-index-KRIWSXX4.js +0 -2
- package/dist/cli/chunks/hybrid-router-BAB32B2W.js +0 -2
- package/dist/cli/chunks/impact-analyzer-3D6XHWQE.js +0 -2
- package/dist/cli/chunks/init-wizard-LLU3WVGC.js +0 -2
- package/dist/cli/chunks/kernel-ZFHAYHHJ.js +0 -2
- package/dist/cli/chunks/knowledge-graph-ETZ65KOY.js +0 -2
- package/dist/cli/chunks/llm-router-service-R6CTGF5I.js +0 -2
- package/dist/cli/chunks/load-test-UOWIJUCH.js +0 -2
- package/dist/cli/chunks/memory-backend-E3ZQKW7A.js +0 -2
- package/dist/cli/chunks/pattern-null-store-OUOJO2RH.js +0 -2
- package/dist/cli/chunks/protocol-executor-KHAPG5CP.js +0 -2
- package/dist/cli/chunks/provider-manager-FGPPW7T4.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-TS7XOJDA.js +0 -2
- package/dist/cli/chunks/queen-coordinator-J35FNFQ3.js +0 -2
- package/dist/cli/chunks/router-AFTKPDI5.js +0 -2
- package/dist/cli/chunks/routing-feedback-SABZUJTF.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-57MDDSFQ.js +0 -2
- package/dist/cli/chunks/safe-db-2HR6MVYM.js +0 -2
- package/dist/cli/chunks/schedule-KLVAN6XI.js +0 -2
- package/dist/cli/chunks/scheduler-WYZ6BC5Y.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-2CGU5INO.js +0 -2
- package/dist/cli/chunks/unified-memory-PMYRQC5K.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-7TRL2K5Q.js +0 -2
- package/dist/cli/chunks/unified-persistence-S4BNJK4S.js +0 -2
- package/dist/cli/chunks/visual-security-RPMZ3J7L.js +0 -2
- package/dist/cli/chunks/witness-chain-BTDZSQ6P.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-42B62D3V.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.11.
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v as L,w as M,x as N}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.11.2");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v as L,w as M,x as N}from"./chunk-KFE6LB4I.js";import{a as v,b as w,c as x,d as y,e as z,f as A,g as B,h as C,i as D,j as E,k as F,l as G,m as H,n as I,o as J,p as K}from"./chunk-OFUF3APC.js";import"./chunk-4PYJCIRO.js";import"./chunk-Y4M2HMPR.js";import"./chunk-72VVTMEL.js";import"./chunk-5BDVFFYF.js";import"./chunk-JCH2FHJ7.js";import"./chunk-LY6PTRVL.js";import"./chunk-IXYF5BZY.js";import"./chunk-FYY7OJ6Y.js";import"./chunk-AZQ6HDPM.js";import"./chunk-Z2QNTRUX.js";import"./chunk-6SOGYNJG.js";import"./chunk-7MKF52GT.js";import"./chunk-XY2B2BEJ.js";import"./chunk-AINAWVGD.js";import"./chunk-NIW4CLN2.js";import"./chunk-UCXW24HY.js";import"./chunk-WKIYYF3G.js";import"./chunk-LIEA5EON.js";export{z as GNNLayerFactory,i as QEFlashAttention,x as QEGNNEmbeddingIndex,y as QEGNNIndexFactory,a as QESONA,e as QE_FLASH_ATTENTION_CONFIG,g as QE_PERFORMANCE_TARGETS,f as QE_SONA_CONFIG,A as TensorCompressionFactory,u as batchComputeAttention,K as batchDifferentiableSearch,M as checkRuvectorPackagesAvailable,c as createDomainQESONA,j as createQEFlashAttention,b as createQESONA,D as getDifferentiableSearch,F as getGetCompressionLevel,E as getHierarchicalForward,G as getInit,h as getOptimalBlockConfig,k as getQEFlashAttentionConfig,n as getRuvectorDotProductAttention,m as getRuvectorFlashAttention,p as getRuvectorHyperbolicAttention,B as getRuvectorLayer,q as getRuvectorLinearAttention,r as getRuvectorMoEAttention,o as getRuvectorMultiHeadAttention,L as getRuvectorPackageVersions,C as getTensorCompress,l as getWorkloadTypes,N as initAllRuvectorPackages,w as initGNN,d as isAttentionAvailable,v as isGNNAvailable,s as toFloat32Array,H as toFloat32ArrayGNN,J as toIEmbedding,t as toNumberArrayAttn,I as toNumberArrayGNN};
|
|
@@ -10,12 +10,13 @@ import { writeOutput, toJSON } from '../utils/ci-output.js';
|
|
|
10
10
|
export function createCodeCommand(context, cleanupAndExit, ensureInitialized) {
|
|
11
11
|
const codeCmd = new Command('code')
|
|
12
12
|
.description('Code intelligence analysis')
|
|
13
|
-
.argument('<action>', 'Action (index|search|impact|deps|complexity)')
|
|
13
|
+
.argument('<action>', 'Action (index|search|impact|deps|complexity|c4)')
|
|
14
14
|
.argument('[target]', 'Target path or query')
|
|
15
15
|
.option('--depth <depth>', 'Analysis depth', '3')
|
|
16
16
|
.option('--include-tests', 'Include test files')
|
|
17
17
|
.option('--incremental', 'Incremental indexing (index action only)')
|
|
18
18
|
.option('--git-since <ref>', 'Index changes since git ref (index action only)')
|
|
19
|
+
.option('--level <level>', 'C4 level for c4 action (context|container|component|all)', 'all')
|
|
19
20
|
.option('-F, --format <format>', 'Output format (text|json)', 'text')
|
|
20
21
|
.option('-o, --output <path>', 'Write output to file')
|
|
21
22
|
.addHelpText('after', `
|
|
@@ -27,6 +28,9 @@ Examples:
|
|
|
27
28
|
aqe code impact src/auth/ Analyze change impact
|
|
28
29
|
aqe code deps src/ Map dependencies
|
|
29
30
|
aqe code complexity src/ Analyze code complexity metrics
|
|
31
|
+
aqe code c4 . Generate C4 architecture diagrams (Mermaid)
|
|
32
|
+
aqe code c4 src/ --level component Only the C4 component diagram
|
|
33
|
+
aqe code c4 . --format json -o c4.json Full C4 result as JSON
|
|
30
34
|
`)
|
|
31
35
|
.action(async (action, target, options) => {
|
|
32
36
|
if (!await ensureInitialized())
|
|
@@ -328,9 +332,81 @@ Examples:
|
|
|
328
332
|
}
|
|
329
333
|
}
|
|
330
334
|
}
|
|
335
|
+
else if (action === 'c4') {
|
|
336
|
+
const targetPath = path.resolve(target || '.');
|
|
337
|
+
const level = String(options.level || 'all').toLowerCase();
|
|
338
|
+
const validLevels = ['context', 'container', 'component', 'all'];
|
|
339
|
+
if (!validLevels.includes(level)) {
|
|
340
|
+
console.log(chalk.red(`Invalid --level: "${level}" (must be ${validLevels.join('|')})`));
|
|
341
|
+
return await cleanupAndExit(1);
|
|
342
|
+
}
|
|
343
|
+
if (typeof codeAPI.getCoordinator !== 'function' || !codeAPI.getCoordinator()) {
|
|
344
|
+
console.log(chalk.red('C4 generation not available — ensure the fleet is initialized'));
|
|
345
|
+
return await cleanupAndExit(1);
|
|
346
|
+
}
|
|
347
|
+
console.log(chalk.blue(`\n Generating C4 diagrams for ${targetPath} (level: ${level})...\n`));
|
|
348
|
+
const want = (l) => level === 'all' || level === l;
|
|
349
|
+
const result = await codeAPI.getCoordinator().generateC4Diagrams(targetPath, {
|
|
350
|
+
includeContext: want('context'),
|
|
351
|
+
includeContainer: want('container'),
|
|
352
|
+
includeComponent: want('component'),
|
|
353
|
+
includeDependency: level === 'all',
|
|
354
|
+
analyzeComponents: true,
|
|
355
|
+
detectExternalSystems: true,
|
|
356
|
+
analyzeCoupling: true,
|
|
357
|
+
});
|
|
358
|
+
if (!result.success || !result.value) {
|
|
359
|
+
console.log(chalk.red(`Failed: ${result.error?.message || 'Unknown error'}`));
|
|
360
|
+
return await cleanupAndExit(1);
|
|
361
|
+
}
|
|
362
|
+
const c4 = result.value;
|
|
363
|
+
const confidence = c4.metadata.analysisMetadata?.confidence;
|
|
364
|
+
if (format === 'json') {
|
|
365
|
+
writeOutput(toJSON(c4), options.output);
|
|
366
|
+
}
|
|
367
|
+
else {
|
|
368
|
+
// Build the Markdown (fenced mermaid blocks) — copy-paste into GitHub/IDE.
|
|
369
|
+
const blocks = [];
|
|
370
|
+
const add = (titleLevel, code) => {
|
|
371
|
+
if (code)
|
|
372
|
+
blocks.push(`### C4 ${titleLevel}\n\n\`\`\`mermaid\n${code.trim()}\n\`\`\``);
|
|
373
|
+
};
|
|
374
|
+
add('Context', c4.diagrams.context);
|
|
375
|
+
add('Container', c4.diagrams.container);
|
|
376
|
+
add('Component', c4.diagrams.component);
|
|
377
|
+
if (c4.diagrams.dependency)
|
|
378
|
+
blocks.push(`### Dependency Graph\n\n\`\`\`mermaid\n${c4.diagrams.dependency.trim()}\n\`\`\``);
|
|
379
|
+
const markdown = `# C4 Architecture — ${c4.metadata.projectName}\n\n${blocks.join('\n\n')}\n`;
|
|
380
|
+
if (options.output) {
|
|
381
|
+
writeOutput(markdown, options.output);
|
|
382
|
+
}
|
|
383
|
+
else {
|
|
384
|
+
console.log(markdown);
|
|
385
|
+
}
|
|
386
|
+
// Confidence banner (ADR-112 quality gate) — always to stderr-style console.
|
|
387
|
+
if (confidence) {
|
|
388
|
+
const color = confidence.level === 'high' ? chalk.green : confidence.level === 'medium' ? chalk.yellow : chalk.red;
|
|
389
|
+
console.log(color(`Confidence: ${confidence.level.toUpperCase()} (${(confidence.score * 100).toFixed(0)}%)`));
|
|
390
|
+
if (confidence.level !== 'high') {
|
|
391
|
+
for (const reason of confidence.reasons) {
|
|
392
|
+
console.log(chalk.gray(` - ${reason}`));
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
// Architecture analysis (coupling/cycles).
|
|
397
|
+
const coupling = c4.couplingAnalysis ?? [];
|
|
398
|
+
const circular = coupling.filter((c) => c.isCircular);
|
|
399
|
+
console.log(chalk.cyan(`\n Components: ${chalk.white(c4.components.length)} External systems: ${chalk.white(c4.externalSystems.length)} Relationships: ${chalk.white(c4.relationships.length)}`));
|
|
400
|
+
if (circular.length > 0) {
|
|
401
|
+
console.log(chalk.red(` Circular dependencies: ${circular.length}`));
|
|
402
|
+
for (const c of circular.slice(0, 3))
|
|
403
|
+
console.log(chalk.red(` ${c.moduleA} <-> ${c.moduleB}`));
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
331
407
|
else {
|
|
332
408
|
console.log(chalk.red(`\nUnknown action: ${action}`));
|
|
333
|
-
console.log(chalk.gray(' Available: index, search, impact, deps, complexity\n'));
|
|
409
|
+
console.log(chalk.gray(' Available: index, search, impact, deps, complexity, c4\n'));
|
|
334
410
|
await cleanupAndExit(1);
|
|
335
411
|
}
|
|
336
412
|
console.log('');
|
|
@@ -349,7 +349,7 @@ _aqe_completions() {
|
|
|
349
349
|
local protocol_subcmds="run"
|
|
350
350
|
local completions_subcmds="bash zsh fish powershell install"
|
|
351
351
|
local brain_subcmds="export import info diff search witness-backfill"
|
|
352
|
-
local code_actions="index search impact deps"
|
|
352
|
+
local code_actions="index search impact deps complexity c4"
|
|
353
353
|
local test_actions="generate execute"
|
|
354
354
|
|
|
355
355
|
# Domains
|
|
@@ -1287,6 +1287,9 @@ complete -c aqe -n "__fish_seen_subcommand_from code; and not __fish_seen_subcom
|
|
|
1287
1287
|
complete -c aqe -n "__fish_seen_subcommand_from code; and not __fish_seen_subcommand_from index search impact deps" -a "search" -d "Search code"
|
|
1288
1288
|
complete -c aqe -n "__fish_seen_subcommand_from code; and not __fish_seen_subcommand_from index search impact deps" -a "impact" -d "Analyze impact"
|
|
1289
1289
|
complete -c aqe -n "__fish_seen_subcommand_from code; and not __fish_seen_subcommand_from index search impact deps" -a "deps" -d "Map dependencies"
|
|
1290
|
+
complete -c aqe -n "__fish_seen_subcommand_from code; and not __fish_seen_subcommand_from index search impact deps complexity c4" -a "complexity" -d "Code complexity metrics"
|
|
1291
|
+
complete -c aqe -n "__fish_seen_subcommand_from code; and not __fish_seen_subcommand_from index search impact deps complexity c4" -a "c4" -d "Generate C4 architecture diagrams"
|
|
1292
|
+
complete -c aqe -n "__fish_seen_subcommand_from code; and __fish_seen_subcommand_from c4" -l level -d "C4 level" -xa "context container component all"
|
|
1290
1293
|
complete -c aqe -n "__fish_seen_subcommand_from code" -l depth -d "Analysis depth" -xa "1 2 3 4 5"
|
|
1291
1294
|
complete -c aqe -n "__fish_seen_subcommand_from code" -l include-tests -d "Include test files"
|
|
1292
1295
|
# Directory completion for code actions
|
|
@@ -6,12 +6,14 @@
|
|
|
6
6
|
* - QEGNNEmbeddingIndex: Code graph embeddings with HNSW for fast similarity search
|
|
7
7
|
* - QESONA: Learns and adapts code patterns for improved intelligence
|
|
8
8
|
*/
|
|
9
|
+
import { existsSync } from 'node:fs';
|
|
9
10
|
import { LoggerFactory } from '../../logging/index.js';
|
|
10
11
|
import { v4 as uuidv4 } from 'uuid';
|
|
11
12
|
import { err } from '../../shared/types';
|
|
12
13
|
import { toError } from '../../shared/error-utils.js';
|
|
13
14
|
import { CodeIntelligenceEvents, createEvent, } from '../../shared/events/domain-events';
|
|
14
15
|
import { ProductFactorsBridgeService, } from './services/product-factors-bridge';
|
|
16
|
+
import { createKnowledgeGraphRelationshipResolver } from './services/c4-model/kg-relationships';
|
|
15
17
|
import { KnowledgeGraphService, } from './services/knowledge-graph';
|
|
16
18
|
import { SemanticAnalyzerService, } from './services/semantic-analyzer';
|
|
17
19
|
import { ImpactAnalyzerService, } from './services/impact-analyzer';
|
|
@@ -85,9 +87,12 @@ export class CodeIntelligenceCoordinator extends BaseDomainCoordinator {
|
|
|
85
87
|
this.semanticAnalyzer = new SemanticAnalyzerService(memory);
|
|
86
88
|
this.impactAnalyzer = new ImpactAnalyzerService(memory, this.knowledgeGraph);
|
|
87
89
|
this.fileReader = new FileReader();
|
|
88
|
-
// Initialize Product Factors Bridge
|
|
90
|
+
// Initialize Product Factors Bridge.
|
|
91
|
+
// ADR-112 C2: inject a KG-backed relationship resolver so C4 component
|
|
92
|
+
// diagrams use REAL import/call edges (not the naming heuristic).
|
|
89
93
|
this.productFactorsBridge = new ProductFactorsBridgeService(eventBus, memory, {
|
|
90
94
|
publishEvents: this.config.publishEvents,
|
|
95
|
+
relationshipResolver: createKnowledgeGraphRelationshipResolver((projectPath) => new KnowledgeGraphService({ memory, llmRouter }, { basePath: projectPath })),
|
|
91
96
|
});
|
|
92
97
|
}
|
|
93
98
|
// ==========================================================================
|
|
@@ -949,9 +954,8 @@ export class CodeIntelligenceCoordinator extends BaseDomainCoordinator {
|
|
|
949
954
|
for (const marker of markers) {
|
|
950
955
|
try {
|
|
951
956
|
const markerPath = `${currentPath}/${marker}`;
|
|
952
|
-
//
|
|
953
|
-
|
|
954
|
-
if (fs.existsSync(markerPath)) {
|
|
957
|
+
// Synchronous existence check (we're in an async context anyway).
|
|
958
|
+
if (existsSync(markerPath)) {
|
|
955
959
|
return currentPath;
|
|
956
960
|
}
|
|
957
961
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ADR-112 — Detected → C4 spec mapping.
|
|
3
|
+
*
|
|
4
|
+
* Pure, dependency-free functions that convert the code-intelligence DETECTOR
|
|
5
|
+
* output (shared `Detected*` types, produced by ProductFactorsBridgeService's
|
|
6
|
+
* filesystem scan) into the `C4ModelService` Build*Request specs.
|
|
7
|
+
*
|
|
8
|
+
* This is the consolidation seam: the bridge keeps detection; the rich
|
|
9
|
+
* `C4ModelService` does all rendering/analysis/storage. Keeping the mapping pure
|
|
10
|
+
* makes the C1 parity test (every detected element survives into a spec) trivial
|
|
11
|
+
* and keeps zero coupling to the service's async/embedding/memory machinery.
|
|
12
|
+
*/
|
|
13
|
+
import type { C4ProjectInfo, DetectedExternalSystem, DetectedComponent, DetectedRelationship, ExternalSystemType, C4ComponentType, C4RelationshipType as SharedC4RelationshipType } from '../../../../shared/c4-model';
|
|
14
|
+
import type { BuildContextRequest, BuildContainerRequest, BuildComponentRequest, ExternalSystemSpec, ComponentSpec, ComponentRelationshipSpec, SystemType, ComponentType, C4RelationshipType as DomainC4RelationshipType } from './types';
|
|
15
|
+
/** The single application container the detector models today (mirrors the
|
|
16
|
+
* legacy bridge, which hardcoded one "Application" container). Real multi-
|
|
17
|
+
* container detection is future work (ADR-112 G-ABORT note). */
|
|
18
|
+
export declare const DEFAULT_CONTAINER_NAME = "Application";
|
|
19
|
+
export declare function mapExternalSystemType(type: ExternalSystemType): SystemType;
|
|
20
|
+
export declare function mapComponentType(type: C4ComponentType): ComponentType;
|
|
21
|
+
export declare function mapRelationshipType(type: SharedC4RelationshipType): DomainC4RelationshipType;
|
|
22
|
+
/** Detected external systems → C4 ExternalSystemSpec[]. */
|
|
23
|
+
export declare function toExternalSystemSpecs(externalSystems: DetectedExternalSystem[]): ExternalSystemSpec[];
|
|
24
|
+
/** Detected components → C4 ComponentSpec[]. */
|
|
25
|
+
export declare function toComponentSpecs(components: DetectedComponent[]): ComponentSpec[];
|
|
26
|
+
/**
|
|
27
|
+
* Detected relationships → C4 ComponentRelationshipSpec[].
|
|
28
|
+
*
|
|
29
|
+
* `DetectedRelationship` references components by `id`; the service re-derives
|
|
30
|
+
* ids by sanitizing the spec's `from`/`to` NAMES. So we translate ids back to
|
|
31
|
+
* names via the component set; relationships whose endpoints aren't in the set
|
|
32
|
+
* are dropped (they can't render) — surfaced by the caller's count delta.
|
|
33
|
+
*/
|
|
34
|
+
export declare function toComponentRelationshipSpecs(components: DetectedComponent[], relationships: DetectedRelationship[]): ComponentRelationshipSpec[];
|
|
35
|
+
/** Project + detected external systems → BuildContextRequest. */
|
|
36
|
+
export declare function toContextRequest(project: C4ProjectInfo, externalSystems: DetectedExternalSystem[]): BuildContextRequest;
|
|
37
|
+
/** Project + detected external systems → BuildContainerRequest (single app container). */
|
|
38
|
+
export declare function toContainerRequest(project: C4ProjectInfo, externalSystems: DetectedExternalSystem[]): BuildContainerRequest;
|
|
39
|
+
/** Detected components + relationships → BuildComponentRequest. */
|
|
40
|
+
export declare function toComponentRequest(components: DetectedComponent[], relationships: DetectedRelationship[], containerName?: string): BuildComponentRequest;
|
|
41
|
+
//# sourceMappingURL=from-detected.d.ts.map
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ADR-112 — Detected → C4 spec mapping.
|
|
3
|
+
*
|
|
4
|
+
* Pure, dependency-free functions that convert the code-intelligence DETECTOR
|
|
5
|
+
* output (shared `Detected*` types, produced by ProductFactorsBridgeService's
|
|
6
|
+
* filesystem scan) into the `C4ModelService` Build*Request specs.
|
|
7
|
+
*
|
|
8
|
+
* This is the consolidation seam: the bridge keeps detection; the rich
|
|
9
|
+
* `C4ModelService` does all rendering/analysis/storage. Keeping the mapping pure
|
|
10
|
+
* makes the C1 parity test (every detected element survives into a spec) trivial
|
|
11
|
+
* and keeps zero coupling to the service's async/embedding/memory machinery.
|
|
12
|
+
*/
|
|
13
|
+
/** The single application container the detector models today (mirrors the
|
|
14
|
+
* legacy bridge, which hardcoded one "Application" container). Real multi-
|
|
15
|
+
* container detection is future work (ADR-112 G-ABORT note). */
|
|
16
|
+
export const DEFAULT_CONTAINER_NAME = 'Application';
|
|
17
|
+
/** shared ExternalSystemType → domain SystemType (C4ModelService vocabulary). */
|
|
18
|
+
const EXTERNAL_SYSTEM_TYPE_MAP = {
|
|
19
|
+
database: 'database',
|
|
20
|
+
cache: 'cache',
|
|
21
|
+
queue: 'message_queue',
|
|
22
|
+
api: 'api',
|
|
23
|
+
storage: 'storage',
|
|
24
|
+
auth: 'authentication',
|
|
25
|
+
monitoring: 'monitoring',
|
|
26
|
+
cloud: 'third_party',
|
|
27
|
+
};
|
|
28
|
+
/** shared C4ComponentType → domain ComponentType (C4ModelService vocabulary).
|
|
29
|
+
* Types the service lacks (transformer/layer/feature/package/other) fold to the
|
|
30
|
+
* nearest supported concept so no component is dropped. */
|
|
31
|
+
const COMPONENT_TYPE_MAP = {
|
|
32
|
+
controller: 'controller',
|
|
33
|
+
service: 'service',
|
|
34
|
+
repository: 'repository',
|
|
35
|
+
facade: 'facade',
|
|
36
|
+
factory: 'factory',
|
|
37
|
+
adapter: 'adapter',
|
|
38
|
+
gateway: 'gateway',
|
|
39
|
+
handler: 'handler',
|
|
40
|
+
validator: 'validator',
|
|
41
|
+
transformer: 'adapter',
|
|
42
|
+
utility: 'utility',
|
|
43
|
+
module: 'module',
|
|
44
|
+
layer: 'module',
|
|
45
|
+
feature: 'module',
|
|
46
|
+
package: 'module',
|
|
47
|
+
other: 'module',
|
|
48
|
+
};
|
|
49
|
+
export function mapExternalSystemType(type) {
|
|
50
|
+
return EXTERNAL_SYSTEM_TYPE_MAP[type] ?? 'third_party';
|
|
51
|
+
}
|
|
52
|
+
export function mapComponentType(type) {
|
|
53
|
+
return COMPONENT_TYPE_MAP[type] ?? 'module';
|
|
54
|
+
}
|
|
55
|
+
/** shared C4RelationshipType → domain C4RelationshipType (C4ModelService vocabulary).
|
|
56
|
+
* The two unions diverge (shared `sends`/`reads`/`writes`/`imports`/`stores_data_in`
|
|
57
|
+
* vs domain `sends_to`/`reads_from`/`writes_to`); fold to the nearest domain verb. */
|
|
58
|
+
const RELATIONSHIP_TYPE_MAP = {
|
|
59
|
+
uses: 'uses',
|
|
60
|
+
calls: 'calls',
|
|
61
|
+
imports: 'depends_on',
|
|
62
|
+
depends_on: 'depends_on',
|
|
63
|
+
extends: 'extends',
|
|
64
|
+
implements: 'implements',
|
|
65
|
+
sends: 'sends_to',
|
|
66
|
+
reads: 'reads_from',
|
|
67
|
+
writes: 'writes_to',
|
|
68
|
+
stores_data_in: 'writes_to',
|
|
69
|
+
authenticates_with: 'authenticates_with',
|
|
70
|
+
};
|
|
71
|
+
export function mapRelationshipType(type) {
|
|
72
|
+
return RELATIONSHIP_TYPE_MAP[type] ?? 'uses';
|
|
73
|
+
}
|
|
74
|
+
/** Detected external systems → C4 ExternalSystemSpec[]. */
|
|
75
|
+
export function toExternalSystemSpecs(externalSystems) {
|
|
76
|
+
return externalSystems.map((es) => ({
|
|
77
|
+
name: es.name,
|
|
78
|
+
type: mapExternalSystemType(es.type),
|
|
79
|
+
technology: es.technology,
|
|
80
|
+
relationshipDescription: es.relationship,
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
/** Detected components → C4 ComponentSpec[]. */
|
|
84
|
+
export function toComponentSpecs(components) {
|
|
85
|
+
return components.map((c) => ({
|
|
86
|
+
name: c.name,
|
|
87
|
+
type: mapComponentType(c.type),
|
|
88
|
+
technology: c.technology,
|
|
89
|
+
boundary: c.boundary,
|
|
90
|
+
files: c.files,
|
|
91
|
+
responsibilities: c.responsibilities,
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Detected relationships → C4 ComponentRelationshipSpec[].
|
|
96
|
+
*
|
|
97
|
+
* `DetectedRelationship` references components by `id`; the service re-derives
|
|
98
|
+
* ids by sanitizing the spec's `from`/`to` NAMES. So we translate ids back to
|
|
99
|
+
* names via the component set; relationships whose endpoints aren't in the set
|
|
100
|
+
* are dropped (they can't render) — surfaced by the caller's count delta.
|
|
101
|
+
*/
|
|
102
|
+
export function toComponentRelationshipSpecs(components, relationships) {
|
|
103
|
+
const nameById = new Map(components.map((c) => [c.id, c.name]));
|
|
104
|
+
const specs = [];
|
|
105
|
+
for (const rel of relationships) {
|
|
106
|
+
const from = nameById.get(rel.sourceId);
|
|
107
|
+
const to = nameById.get(rel.targetId);
|
|
108
|
+
if (from === undefined || to === undefined)
|
|
109
|
+
continue;
|
|
110
|
+
specs.push({ from, to, type: mapRelationshipType(rel.type) });
|
|
111
|
+
}
|
|
112
|
+
return specs;
|
|
113
|
+
}
|
|
114
|
+
/** Project + detected external systems → BuildContextRequest. */
|
|
115
|
+
export function toContextRequest(project, externalSystems) {
|
|
116
|
+
return {
|
|
117
|
+
systemName: project.name,
|
|
118
|
+
systemDescription: project.description,
|
|
119
|
+
externalSystems: toExternalSystemSpecs(externalSystems),
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
/** Project + detected external systems → BuildContainerRequest (single app container). */
|
|
123
|
+
export function toContainerRequest(project, externalSystems) {
|
|
124
|
+
const externalSpecs = toExternalSystemSpecs(externalSystems);
|
|
125
|
+
return {
|
|
126
|
+
systemName: project.name,
|
|
127
|
+
containers: [
|
|
128
|
+
{
|
|
129
|
+
name: DEFAULT_CONTAINER_NAME,
|
|
130
|
+
type: 'web_application',
|
|
131
|
+
technology: 'TypeScript',
|
|
132
|
+
description: 'Main application',
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
externalSystems: externalSpecs,
|
|
136
|
+
// The legacy bridge drew Rel(app, <external>) for each external system.
|
|
137
|
+
dependencies: externalSpecs.map((es) => ({
|
|
138
|
+
from: DEFAULT_CONTAINER_NAME,
|
|
139
|
+
to: es.name,
|
|
140
|
+
description: es.relationshipDescription,
|
|
141
|
+
})),
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
/** Detected components + relationships → BuildComponentRequest. */
|
|
145
|
+
export function toComponentRequest(components, relationships, containerName = DEFAULT_CONTAINER_NAME) {
|
|
146
|
+
return {
|
|
147
|
+
containerName,
|
|
148
|
+
components: toComponentSpecs(components),
|
|
149
|
+
relationships: toComponentRelationshipSpecs(components, relationships),
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=from-detected.js.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ADR-112 C2 — real component relationships from the Knowledge Graph.
|
|
3
|
+
*
|
|
4
|
+
* The detector models components as top-level `src/` directories but its edge
|
|
5
|
+
* detection is a NAMING heuristic (`likelyHasRelationship`) that never reads the
|
|
6
|
+
* code. This module folds the KnowledgeGraph's REAL file-level import/call edges
|
|
7
|
+
* (extracted from the AST by the TS parser — no LLM needed) up to
|
|
8
|
+
* component→component relationships.
|
|
9
|
+
*
|
|
10
|
+
* Pure aggregation + a resolver that drives the existing KG. The resolver
|
|
11
|
+
* returns `null` on any miss so the bridge falls back to the heuristic — C2 can
|
|
12
|
+
* only improve accuracy, never break generation.
|
|
13
|
+
*/
|
|
14
|
+
import type { DetectedComponent, DetectedRelationship } from '../../../../shared/c4-model';
|
|
15
|
+
/** Minimal shape of the KG `mapDependencies` result we consume. */
|
|
16
|
+
export interface DependencyMapLike {
|
|
17
|
+
nodes: Array<{
|
|
18
|
+
id: string;
|
|
19
|
+
path: string;
|
|
20
|
+
}>;
|
|
21
|
+
edges: Array<{
|
|
22
|
+
source: string;
|
|
23
|
+
target: string;
|
|
24
|
+
}>;
|
|
25
|
+
}
|
|
26
|
+
/** Minimal slice of the KnowledgeGraph the resolver needs (keeps this decoupled). */
|
|
27
|
+
export interface KnowledgeGraphSlice {
|
|
28
|
+
index(req: {
|
|
29
|
+
paths: string[];
|
|
30
|
+
incremental?: boolean;
|
|
31
|
+
}): Promise<{
|
|
32
|
+
success: boolean;
|
|
33
|
+
}>;
|
|
34
|
+
mapDependencies(req: {
|
|
35
|
+
files: string[];
|
|
36
|
+
direction: 'incoming' | 'outgoing' | 'both';
|
|
37
|
+
depth?: number;
|
|
38
|
+
}): Promise<{
|
|
39
|
+
success: boolean;
|
|
40
|
+
value?: DependencyMapLike;
|
|
41
|
+
}>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Resolve real component relationships for a set of detected components.
|
|
45
|
+
* Returns `null` when it cannot (no files, KG miss, no cross-component edges) so
|
|
46
|
+
* the caller keeps the heuristic.
|
|
47
|
+
*/
|
|
48
|
+
export type RelationshipResolver = (components: DetectedComponent[], projectPath: string) => Promise<DetectedRelationship[] | null>;
|
|
49
|
+
/**
|
|
50
|
+
* PURE: fold file-level dependency edges into component→component relationships.
|
|
51
|
+
* An edge counts only when both endpoints map to *different* components; weight =
|
|
52
|
+
* number of underlying file edges. Exported for direct testing.
|
|
53
|
+
*/
|
|
54
|
+
export declare function aggregateDependencyMapToComponentRelationships(components: DetectedComponent[], dependencyMap: DependencyMapLike, projectPath: string): DetectedRelationship[];
|
|
55
|
+
/**
|
|
56
|
+
* A KG factory scoped to a project root. Building the KG per-call lets us set
|
|
57
|
+
* the FileReader base directory to `projectPath`, so analyzing a repo outside
|
|
58
|
+
* cwd doesn't trip the path-traversal guard.
|
|
59
|
+
*/
|
|
60
|
+
export type KnowledgeGraphFactory = (projectPath: string) => KnowledgeGraphSlice;
|
|
61
|
+
/**
|
|
62
|
+
* Build a resolver backed by the existing KnowledgeGraph. It (incrementally)
|
|
63
|
+
* indexes the component files so edges exist regardless of prior `aqe code
|
|
64
|
+
* index`, maps their dependencies, and aggregates to component edges.
|
|
65
|
+
*
|
|
66
|
+
* Accepts a project-scoped factory (preferred) or a single pre-built KG.
|
|
67
|
+
*/
|
|
68
|
+
export declare function createKnowledgeGraphRelationshipResolver(kgOrFactory: KnowledgeGraphSlice | KnowledgeGraphFactory, opts?: {
|
|
69
|
+
autoIndex?: boolean;
|
|
70
|
+
}): RelationshipResolver;
|
|
71
|
+
//# sourceMappingURL=kg-relationships.d.ts.map
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ADR-112 C2 — real component relationships from the Knowledge Graph.
|
|
3
|
+
*
|
|
4
|
+
* The detector models components as top-level `src/` directories but its edge
|
|
5
|
+
* detection is a NAMING heuristic (`likelyHasRelationship`) that never reads the
|
|
6
|
+
* code. This module folds the KnowledgeGraph's REAL file-level import/call edges
|
|
7
|
+
* (extracted from the AST by the TS parser — no LLM needed) up to
|
|
8
|
+
* component→component relationships.
|
|
9
|
+
*
|
|
10
|
+
* Pure aggregation + a resolver that drives the existing KG. The resolver
|
|
11
|
+
* returns `null` on any miss so the bridge falls back to the heuristic — C2 can
|
|
12
|
+
* only improve accuracy, never break generation.
|
|
13
|
+
*/
|
|
14
|
+
import * as path from 'path';
|
|
15
|
+
const normalize = (projectPath, p) => path.resolve(projectPath, p).replace(/\\/g, '/');
|
|
16
|
+
/**
|
|
17
|
+
* PURE: fold file-level dependency edges into component→component relationships.
|
|
18
|
+
* An edge counts only when both endpoints map to *different* components; weight =
|
|
19
|
+
* number of underlying file edges. Exported for direct testing.
|
|
20
|
+
*/
|
|
21
|
+
export function aggregateDependencyMapToComponentRelationships(components, dependencyMap, projectPath) {
|
|
22
|
+
// normalized file path → componentId
|
|
23
|
+
const fileToComponent = new Map();
|
|
24
|
+
for (const c of components) {
|
|
25
|
+
for (const f of c.files ?? [])
|
|
26
|
+
fileToComponent.set(normalize(projectPath, f), c.id);
|
|
27
|
+
}
|
|
28
|
+
const idToPath = new Map(dependencyMap.nodes.map((n) => [n.id, normalize(projectPath, n.path)]));
|
|
29
|
+
const componentOf = (nodeId) => {
|
|
30
|
+
const p = idToPath.get(nodeId);
|
|
31
|
+
if (!p)
|
|
32
|
+
return undefined;
|
|
33
|
+
const exact = fileToComponent.get(p);
|
|
34
|
+
if (exact)
|
|
35
|
+
return exact;
|
|
36
|
+
// Tolerate abs/rel divergence from the parser via a suffix match.
|
|
37
|
+
for (const [file, cid] of fileToComponent) {
|
|
38
|
+
if (p.endsWith(file) || file.endsWith(p))
|
|
39
|
+
return cid;
|
|
40
|
+
}
|
|
41
|
+
return undefined;
|
|
42
|
+
};
|
|
43
|
+
const byKey = new Map();
|
|
44
|
+
for (const e of dependencyMap.edges) {
|
|
45
|
+
const cs = componentOf(e.source);
|
|
46
|
+
const ct = componentOf(e.target);
|
|
47
|
+
if (!cs || !ct || cs === ct)
|
|
48
|
+
continue;
|
|
49
|
+
const key = `${cs}->${ct}`;
|
|
50
|
+
const existing = byKey.get(key);
|
|
51
|
+
if (existing)
|
|
52
|
+
existing.weight = (existing.weight ?? 1) + 1;
|
|
53
|
+
else
|
|
54
|
+
byKey.set(key, { sourceId: cs, targetId: ct, type: 'depends_on', weight: 1 });
|
|
55
|
+
}
|
|
56
|
+
return [...byKey.values()];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Build a resolver backed by the existing KnowledgeGraph. It (incrementally)
|
|
60
|
+
* indexes the component files so edges exist regardless of prior `aqe code
|
|
61
|
+
* index`, maps their dependencies, and aggregates to component edges.
|
|
62
|
+
*
|
|
63
|
+
* Accepts a project-scoped factory (preferred) or a single pre-built KG.
|
|
64
|
+
*/
|
|
65
|
+
export function createKnowledgeGraphRelationshipResolver(kgOrFactory, opts = {}) {
|
|
66
|
+
const autoIndex = opts.autoIndex ?? true;
|
|
67
|
+
const factory = typeof kgOrFactory === 'function' ? kgOrFactory : () => kgOrFactory;
|
|
68
|
+
return async (components, projectPath) => {
|
|
69
|
+
const absFiles = components.flatMap((c) => (c.files ?? []).map((f) => path.resolve(projectPath, f)));
|
|
70
|
+
if (absFiles.length === 0)
|
|
71
|
+
return null;
|
|
72
|
+
try {
|
|
73
|
+
const kg = factory(projectPath);
|
|
74
|
+
if (autoIndex)
|
|
75
|
+
await kg.index({ paths: absFiles, incremental: true });
|
|
76
|
+
const dep = await kg.mapDependencies({ files: absFiles, direction: 'both' });
|
|
77
|
+
if (!dep.success || !dep.value)
|
|
78
|
+
return null;
|
|
79
|
+
const rels = aggregateDependencyMapToComponentRelationships(components, dep.value, projectPath);
|
|
80
|
+
return rels.length > 0 ? rels : null;
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
return null; // any failure → heuristic fallback
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=kg-relationships.js.map
|
|
@@ -40,6 +40,12 @@ export interface KnowledgeGraphConfig {
|
|
|
40
40
|
llmModelTier?: number;
|
|
41
41
|
/** ADR-051: Max tokens for LLM responses */
|
|
42
42
|
llmMaxTokens?: number;
|
|
43
|
+
/**
|
|
44
|
+
* ADR-112 C2: base directory for file reads. Defaults to cwd. Set to a
|
|
45
|
+
* project root so analyzing a repo OUTSIDE cwd (e.g. `aqe code c4 /other`)
|
|
46
|
+
* doesn't trip the FileReader path-traversal guard.
|
|
47
|
+
*/
|
|
48
|
+
basePath?: string;
|
|
43
49
|
}
|
|
44
50
|
/**
|
|
45
51
|
* Dependencies for KnowledgeGraphService
|
|
@@ -72,7 +72,7 @@ export class KnowledgeGraphService {
|
|
|
72
72
|
this.llmRouter = undefined;
|
|
73
73
|
}
|
|
74
74
|
this.tsParser = new TypeScriptParser();
|
|
75
|
-
this.fileReader = new FileReader();
|
|
75
|
+
this.fileReader = new FileReader(this.config.basePath ? { basePath: this.config.basePath } : undefined);
|
|
76
76
|
this.embedder = new NomicEmbedder({
|
|
77
77
|
enableFallback: true,
|
|
78
78
|
});
|
|
@@ -390,7 +390,7 @@ Be precise and only report high-confidence findings.`,
|
|
|
390
390
|
}
|
|
391
391
|
return { semanticRelationships: [], designPatterns: [], architecturalBoundaries: [], dependencyImpacts: [] };
|
|
392
392
|
}
|
|
393
|
-
catch
|
|
393
|
+
catch {
|
|
394
394
|
logger.warn('LLM relationship extraction failed:');
|
|
395
395
|
return { semanticRelationships: [], designPatterns: [], architecturalBoundaries: [], dependencyImpacts: [] };
|
|
396
396
|
}
|
|
@@ -501,7 +501,7 @@ Return JSON: { "rankedIds": ["id1", "id2", ...], "insights": ["insight1", "insig
|
|
|
501
501
|
}
|
|
502
502
|
return { enhancedResults: results, insights: [] };
|
|
503
503
|
}
|
|
504
|
-
catch
|
|
504
|
+
catch {
|
|
505
505
|
logger.warn('LLM query enhancement failed:');
|
|
506
506
|
return { enhancedResults: results, insights: [] };
|
|
507
507
|
}
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { Result } from '../../../shared/types';
|
|
15
15
|
import { EventBus, MemoryBackend } from '../../../kernel/interfaces';
|
|
16
|
-
import { C4DiagramResult, C4DiagramRequest,
|
|
16
|
+
import { C4DiagramResult, C4DiagramRequest, DetectedExternalSystem, DetectedComponent, DetectedRelationship } from '../../../shared/c4-model';
|
|
17
|
+
import type { RelationshipResolver } from './c4-model/kg-relationships';
|
|
17
18
|
export interface ProductFactorsBridgeConfig {
|
|
18
19
|
/** Cache TTL in milliseconds (default: 1 hour) */
|
|
19
20
|
cacheTtlMs: number;
|
|
@@ -23,6 +24,18 @@ export interface ProductFactorsBridgeConfig {
|
|
|
23
24
|
excludePatterns: string[];
|
|
24
25
|
/** Maximum files to analyze */
|
|
25
26
|
maxFiles: number;
|
|
27
|
+
/**
|
|
28
|
+
* ADR-112 C2: optional resolver that returns REAL component relationships
|
|
29
|
+
* from the Knowledge Graph. When it yields edges, they replace the naming
|
|
30
|
+
* heuristic; otherwise the heuristic stands. Off by default (no resolver).
|
|
31
|
+
*/
|
|
32
|
+
relationshipResolver?: RelationshipResolver;
|
|
33
|
+
/**
|
|
34
|
+
* ADR-112: persist diagram embeddings so they're semantically searchable
|
|
35
|
+
* (`qe/code/c4 search`). Off by default — the internal product-factors path
|
|
36
|
+
* stays fast/offline; surfaces that expose search (MCP) turn it on.
|
|
37
|
+
*/
|
|
38
|
+
enableC4Embeddings?: boolean;
|
|
26
39
|
}
|
|
27
40
|
export interface IProductFactorsBridge {
|
|
28
41
|
/** Initialize the bridge and subscribe to events */
|
|
@@ -40,13 +53,21 @@ export interface IProductFactorsBridge {
|
|
|
40
53
|
/** Get components for a project */
|
|
41
54
|
getComponents(projectPath: string): Promise<Result<DetectedComponent[], Error>>;
|
|
42
55
|
}
|
|
43
|
-
export declare class ProductFactorsBridgeService implements IProductFactorsBridge
|
|
56
|
+
export declare class ProductFactorsBridgeService implements IProductFactorsBridge {
|
|
44
57
|
private readonly eventBus;
|
|
45
58
|
private readonly memory;
|
|
46
59
|
private readonly config;
|
|
47
60
|
private initialized;
|
|
48
61
|
private eventSubscriptions;
|
|
62
|
+
/** ADR-112: the consolidated render+analyze+store engine (lazily built). */
|
|
63
|
+
private c4Service?;
|
|
49
64
|
constructor(eventBus: EventBus, memory: MemoryBackend, config?: Partial<ProductFactorsBridgeConfig>);
|
|
65
|
+
/**
|
|
66
|
+
* ADR-112: lazily construct the shared C4ModelService.
|
|
67
|
+
* Embeddings are OFF on this internal product-factors path (keeps it offline +
|
|
68
|
+
* fast); the CLI/MCP surfaces opt embeddings in when semantic search is wanted.
|
|
69
|
+
*/
|
|
70
|
+
private getC4Service;
|
|
50
71
|
initialize(): Promise<void>;
|
|
51
72
|
dispose(): Promise<void>;
|
|
52
73
|
private subscribeToEvents;
|
|
@@ -54,9 +75,9 @@ export declare class ProductFactorsBridgeService implements IProductFactorsBridg
|
|
|
54
75
|
private handleImpactAnalysisCompleted;
|
|
55
76
|
requestC4Diagrams(request: C4DiagramRequest): Promise<Result<C4DiagramResult, Error>>;
|
|
56
77
|
private generateC4Diagrams;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
78
|
+
private renderContext;
|
|
79
|
+
private renderContainer;
|
|
80
|
+
private renderComponent;
|
|
60
81
|
generateDependencyGraph(components: DetectedComponent[], relationships: DetectedRelationship[]): string;
|
|
61
82
|
private getProjectMetadata;
|
|
62
83
|
private detectExternalSystems;
|