tea-rags 1.51.1 → 1.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (356) hide show
  1. package/README.md +303 -138
  2. package/benchmarks/bench-model-ab.mjs +407 -0
  3. package/build/bootstrap/factory.d.ts.map +1 -1
  4. package/build/bootstrap/factory.js +19 -15
  5. package/build/bootstrap/factory.js.map +1 -1
  6. package/build/bootstrap/project-ingest-factory.d.ts +7 -3
  7. package/build/bootstrap/project-ingest-factory.d.ts.map +1 -1
  8. package/build/bootstrap/project-ingest-factory.js +2 -2
  9. package/build/bootstrap/project-ingest-factory.js.map +1 -1
  10. package/build/cli/commands/update.d.ts +2 -0
  11. package/build/cli/commands/update.d.ts.map +1 -1
  12. package/build/cli/commands/update.js +9 -1
  13. package/build/cli/commands/update.js.map +1 -1
  14. package/build/cli/plugin-sync/index.d.ts +4 -1
  15. package/build/cli/plugin-sync/index.d.ts.map +1 -1
  16. package/build/cli/plugin-sync/index.js +9 -18
  17. package/build/cli/plugin-sync/index.js.map +1 -1
  18. package/build/cli/plugin-sync/types.d.ts +8 -1
  19. package/build/cli/plugin-sync/types.d.ts.map +1 -1
  20. package/build/cli/plugin-sync/types.js +24 -0
  21. package/build/cli/plugin-sync/types.js.map +1 -1
  22. package/build/cli/plugin-sync/zcode.d.ts +46 -0
  23. package/build/cli/plugin-sync/zcode.d.ts.map +1 -0
  24. package/build/cli/plugin-sync/zcode.js +163 -0
  25. package/build/cli/plugin-sync/zcode.js.map +1 -0
  26. package/build/core/adapters/qdrant/aliases.d.ts.map +1 -1
  27. package/build/core/adapters/qdrant/aliases.js +11 -2
  28. package/build/core/adapters/qdrant/aliases.js.map +1 -1
  29. package/build/core/adapters/qdrant/connection.d.ts +12 -3
  30. package/build/core/adapters/qdrant/connection.d.ts.map +1 -1
  31. package/build/core/adapters/qdrant/connection.js +53 -17
  32. package/build/core/adapters/qdrant/connection.js.map +1 -1
  33. package/build/core/adapters/qdrant/point-store.d.ts +3 -1
  34. package/build/core/adapters/qdrant/point-store.d.ts.map +1 -1
  35. package/build/core/adapters/qdrant/point-store.js +13 -4
  36. package/build/core/adapters/qdrant/point-store.js.map +1 -1
  37. package/build/core/adapters/vcs/git/adapter.d.ts +8 -1
  38. package/build/core/adapters/vcs/git/adapter.d.ts.map +1 -1
  39. package/build/core/adapters/vcs/git/adapter.js.map +1 -1
  40. package/build/core/adapters/vcs/git/es-git/adapter.d.ts +4 -1
  41. package/build/core/adapters/vcs/git/es-git/adapter.d.ts.map +1 -1
  42. package/build/core/adapters/vcs/git/es-git/adapter.js +2 -2
  43. package/build/core/adapters/vcs/git/es-git/adapter.js.map +1 -1
  44. package/build/core/adapters/vcs/git/git-cli/adapter.d.ts +4 -1
  45. package/build/core/adapters/vcs/git/git-cli/adapter.d.ts.map +1 -1
  46. package/build/core/adapters/vcs/git/git-cli/adapter.js +2 -2
  47. package/build/core/adapters/vcs/git/git-cli/adapter.js.map +1 -1
  48. package/build/core/adapters/vcs/git/git-cli/history.d.ts +4 -1
  49. package/build/core/adapters/vcs/git/git-cli/history.d.ts.map +1 -1
  50. package/build/core/adapters/vcs/git/git-cli/history.js +9 -2
  51. package/build/core/adapters/vcs/git/git-cli/history.js.map +1 -1
  52. package/build/core/api/internal/app-factory.d.ts +1 -1
  53. package/build/core/api/internal/app-factory.d.ts.map +1 -1
  54. package/build/core/api/internal/app-factory.js +3 -2
  55. package/build/core/api/internal/app-factory.js.map +1 -1
  56. package/build/core/api/internal/composition.d.ts +1 -1
  57. package/build/core/api/internal/composition.d.ts.map +1 -1
  58. package/build/core/api/internal/composition.js +7 -1
  59. package/build/core/api/internal/composition.js.map +1 -1
  60. package/build/core/api/internal/facades/explore-facade.d.ts +1 -1
  61. package/build/core/api/internal/facades/explore-facade.d.ts.map +1 -1
  62. package/build/core/api/internal/infra/working-tree-graph-read.d.ts +22 -0
  63. package/build/core/api/internal/infra/working-tree-graph-read.d.ts.map +1 -1
  64. package/build/core/api/internal/infra/working-tree-graph-read.js +75 -1
  65. package/build/core/api/internal/infra/working-tree-graph-read.js.map +1 -1
  66. package/build/core/api/internal/migration-parser.d.ts.map +1 -1
  67. package/build/core/api/internal/migration-parser.js +4 -1
  68. package/build/core/api/internal/migration-parser.js.map +1 -1
  69. package/build/core/api/internal/ops/explore-ops.d.ts +7 -2
  70. package/build/core/api/internal/ops/explore-ops.d.ts.map +1 -1
  71. package/build/core/api/internal/ops/explore-ops.js +98 -63
  72. package/build/core/api/internal/ops/explore-ops.js.map +1 -1
  73. package/build/core/api/internal/ops/indexing-ops.js +1 -0
  74. package/build/core/api/internal/ops/indexing-ops.js.map +1 -1
  75. package/build/core/api/public/dto/ingest.d.ts +8 -0
  76. package/build/core/api/public/dto/ingest.d.ts.map +1 -1
  77. package/build/core/api/tools/code/register-index-tools.d.ts.map +1 -1
  78. package/build/core/api/tools/code/register-index-tools.js +2 -0
  79. package/build/core/api/tools/code/register-index-tools.js.map +1 -1
  80. package/build/core/contracts/types/language.d.ts +8 -0
  81. package/build/core/contracts/types/language.d.ts.map +1 -1
  82. package/build/core/contracts/types/language.js.map +1 -1
  83. package/build/core/contracts/types/provider.d.ts +17 -0
  84. package/build/core/contracts/types/provider.d.ts.map +1 -1
  85. package/build/core/domains/explore/index.d.ts +2 -0
  86. package/build/core/domains/explore/index.d.ts.map +1 -1
  87. package/build/core/domains/explore/index.js +2 -0
  88. package/build/core/domains/explore/index.js.map +1 -1
  89. package/build/core/domains/explore/resolver-batch.d.ts +45 -0
  90. package/build/core/domains/explore/resolver-batch.d.ts.map +1 -0
  91. package/build/core/domains/explore/resolver-batch.js +175 -0
  92. package/build/core/domains/explore/resolver-batch.js.map +1 -0
  93. package/build/core/domains/explore/working-tree/tree-graph-marker.d.ts +0 -27
  94. package/build/core/domains/explore/working-tree/tree-graph-marker.d.ts.map +1 -1
  95. package/build/core/domains/explore/working-tree/tree-graph-marker.js +15 -1
  96. package/build/core/domains/explore/working-tree/tree-graph-marker.js.map +1 -1
  97. package/build/core/domains/ingest/errors/ingest-errors.d.ts.map +1 -1
  98. package/build/core/domains/ingest/errors/ingest-errors.js +4 -2
  99. package/build/core/domains/ingest/errors/ingest-errors.js.map +1 -1
  100. package/build/core/domains/ingest/operations/reindexing.d.ts +17 -0
  101. package/build/core/domains/ingest/operations/reindexing.d.ts.map +1 -1
  102. package/build/core/domains/ingest/operations/reindexing.js +45 -1
  103. package/build/core/domains/ingest/operations/reindexing.js.map +1 -1
  104. package/build/core/domains/ingest/pipeline/chunk-point-payload.d.ts.map +1 -1
  105. package/build/core/domains/ingest/pipeline/chunk-point-payload.js +4 -1
  106. package/build/core/domains/ingest/pipeline/chunk-point-payload.js.map +1 -1
  107. package/build/core/domains/ingest/pipeline/chunker/infra/worker.js +3 -0
  108. package/build/core/domains/ingest/pipeline/chunker/infra/worker.js.map +1 -1
  109. package/build/core/domains/ingest/pipeline/enrichment/backfiller.d.ts.map +1 -1
  110. package/build/core/domains/ingest/pipeline/enrichment/backfiller.js +16 -0
  111. package/build/core/domains/ingest/pipeline/enrichment/backfiller.js.map +1 -1
  112. package/build/core/domains/ingest/pipeline/enrichment/completion-runner.d.ts.map +1 -1
  113. package/build/core/domains/ingest/pipeline/enrichment/completion-runner.js +4 -1
  114. package/build/core/domains/ingest/pipeline/enrichment/completion-runner.js.map +1 -1
  115. package/build/core/domains/ingest/pipeline/enrichment/coordinator.d.ts.map +1 -1
  116. package/build/core/domains/ingest/pipeline/enrichment/coordinator.js +5 -1
  117. package/build/core/domains/ingest/pipeline/enrichment/coordinator.js.map +1 -1
  118. package/build/core/domains/ingest/pipeline/enrichment/file-phase.d.ts +2 -0
  119. package/build/core/domains/ingest/pipeline/enrichment/file-phase.d.ts.map +1 -1
  120. package/build/core/domains/ingest/pipeline/enrichment/file-phase.js +21 -1
  121. package/build/core/domains/ingest/pipeline/enrichment/file-phase.js.map +1 -1
  122. package/build/core/domains/ingest/pipeline/enrichment/recovery.d.ts.map +1 -1
  123. package/build/core/domains/ingest/pipeline/enrichment/recovery.js +13 -4
  124. package/build/core/domains/ingest/pipeline/enrichment/recovery.js.map +1 -1
  125. package/build/core/domains/ingest/pipeline/file-ingestor.d.ts.map +1 -1
  126. package/build/core/domains/ingest/pipeline/file-ingestor.js +10 -6
  127. package/build/core/domains/ingest/pipeline/file-ingestor.js.map +1 -1
  128. package/build/core/domains/ingest/pipeline/status-module.d.ts.map +1 -1
  129. package/build/core/domains/ingest/pipeline/status-module.js +3 -8
  130. package/build/core/domains/ingest/pipeline/status-module.js.map +1 -1
  131. package/build/core/domains/ingest/sync/index-holes.d.ts +40 -0
  132. package/build/core/domains/ingest/sync/index-holes.d.ts.map +1 -0
  133. package/build/core/domains/ingest/sync/index-holes.js +50 -0
  134. package/build/core/domains/ingest/sync/index-holes.js.map +1 -0
  135. package/build/core/domains/ingest/sync/index.d.ts +1 -0
  136. package/build/core/domains/ingest/sync/index.d.ts.map +1 -1
  137. package/build/core/domains/ingest/sync/index.js +1 -0
  138. package/build/core/domains/ingest/sync/index.js.map +1 -1
  139. package/build/core/domains/language/capability/readme.d.ts +1 -1
  140. package/build/core/domains/language/capability/readme.js +2 -2
  141. package/build/core/domains/language/errors.d.ts +13 -1
  142. package/build/core/domains/language/errors.d.ts.map +1 -1
  143. package/build/core/domains/language/errors.js +18 -0
  144. package/build/core/domains/language/errors.js.map +1 -1
  145. package/build/core/domains/language/factory.d.ts +41 -10
  146. package/build/core/domains/language/factory.d.ts.map +1 -1
  147. package/build/core/domains/language/factory.js +87 -85
  148. package/build/core/domains/language/factory.js.map +1 -1
  149. package/build/core/domains/language/index.d.ts +2 -5
  150. package/build/core/domains/language/index.d.ts.map +1 -1
  151. package/build/core/domains/language/index.js +9 -5
  152. package/build/core/domains/language/index.js.map +1 -1
  153. package/build/core/domains/language/provider-sources.d.ts +56 -0
  154. package/build/core/domains/language/provider-sources.d.ts.map +1 -0
  155. package/build/core/domains/language/provider-sources.js +156 -0
  156. package/build/core/domains/language/provider-sources.js.map +1 -0
  157. package/build/core/domains/language/ruby/capability.d.ts.map +1 -1
  158. package/build/core/domains/language/ruby/capability.js +6 -1
  159. package/build/core/domains/language/ruby/capability.js.map +1 -1
  160. package/build/core/domains/language/ruby/chunking/rspec-scope-chunker.d.ts.map +1 -1
  161. package/build/core/domains/language/ruby/chunking/rspec-scope-chunker.js +4 -1
  162. package/build/core/domains/language/ruby/chunking/rspec-scope-chunker.js.map +1 -1
  163. package/build/core/domains/language/rust/capability.js +1 -1
  164. package/build/core/domains/language/rust/capability.js.map +1 -1
  165. package/build/core/domains/language/typescript/capability.js +1 -1
  166. package/build/core/domains/language/typescript/capability.js.map +1 -1
  167. package/build/core/domains/trajectory/codegraph/factory.d.ts.map +1 -1
  168. package/build/core/domains/trajectory/codegraph/factory.js +3 -0
  169. package/build/core/domains/trajectory/codegraph/factory.js.map +1 -1
  170. package/build/core/domains/trajectory/codegraph/symbols/provider.d.ts +8 -0
  171. package/build/core/domains/trajectory/codegraph/symbols/provider.d.ts.map +1 -1
  172. package/build/core/domains/trajectory/codegraph/symbols/provider.js +19 -1
  173. package/build/core/domains/trajectory/codegraph/symbols/provider.js.map +1 -1
  174. package/build/core/domains/trajectory/git/infra/blame-store.d.ts +5 -1
  175. package/build/core/domains/trajectory/git/infra/blame-store.d.ts.map +1 -1
  176. package/build/core/domains/trajectory/git/infra/blame-store.js +62 -8
  177. package/build/core/domains/trajectory/git/infra/blame-store.js.map +1 -1
  178. package/build/core/domains/trajectory/git/infra/file-lifetime-store.d.ts +38 -0
  179. package/build/core/domains/trajectory/git/infra/file-lifetime-store.d.ts.map +1 -0
  180. package/build/core/domains/trajectory/git/infra/file-lifetime-store.js +105 -0
  181. package/build/core/domains/trajectory/git/infra/file-lifetime-store.js.map +1 -0
  182. package/build/core/domains/trajectory/git/infra/file-lifetime.d.ts +24 -0
  183. package/build/core/domains/trajectory/git/infra/file-lifetime.d.ts.map +1 -1
  184. package/build/core/domains/trajectory/git/infra/file-lifetime.js +55 -1
  185. package/build/core/domains/trajectory/git/infra/file-lifetime.js.map +1 -1
  186. package/build/core/domains/trajectory/git/provider.d.ts +15 -1
  187. package/build/core/domains/trajectory/git/provider.d.ts.map +1 -1
  188. package/build/core/domains/trajectory/git/provider.js +61 -8
  189. package/build/core/domains/trajectory/git/provider.js.map +1 -1
  190. package/build/core/types.d.ts +8 -0
  191. package/build/core/types.d.ts.map +1 -1
  192. package/build/mcp/resources/generated/agent-context.d.ts.map +1 -1
  193. package/build/mcp/resources/generated/agent-context.js +1 -1
  194. package/build/mcp/resources/generated/agent-context.js.map +1 -1
  195. package/build/typecheck-tests.tsbuildinfo +1 -0
  196. package/harness/cursor/README.md +4 -1
  197. package/harness/cursor/dinopowers/.cursor-plugin/plugin.json +3 -2
  198. package/harness/cursor/dinopowers/icon.png +0 -0
  199. package/harness/cursor/dinopowers/skills/dino-brainstorming/SKILL.md +14 -12
  200. package/harness/cursor/dinopowers/skills/dino-executing-plans/SKILL.md +7 -3
  201. package/harness/cursor/dinopowers/skills/dino-finishing-a-development-branch/SKILL.md +3 -3
  202. package/harness/cursor/dinopowers/skills/dino-receiving-code-review/SKILL.md +4 -4
  203. package/harness/cursor/dinopowers/skills/dino-requesting-code-review/SKILL.md +3 -3
  204. package/harness/cursor/dinopowers/skills/dino-systematic-debugging/SKILL.md +12 -12
  205. package/harness/cursor/dinopowers/skills/dino-test-driven-development/SKILL.md +6 -3
  206. package/harness/cursor/dinopowers/skills/dino-verification-before-completion/SKILL.md +3 -3
  207. package/harness/cursor/dinopowers/skills/dino-writing-plans/SKILL.md +7 -3
  208. package/harness/cursor/dinopowers/skills/dino-writing-skills/SKILL.md +4 -4
  209. package/harness/cursor/tea-rags/.cursor-plugin/plugin.json +3 -2
  210. package/harness/cursor/tea-rags/icon.png +0 -0
  211. package/harness/cursor/tea-rags/rules/tea-rags-core.mdc +12 -8
  212. package/harness/cursor/tea-rags/scripts/check-build-fresh.sh +1 -0
  213. package/harness/cursor/tea-rags/scripts/reread-ledger.mjs +6 -3
  214. package/harness/cursor/tea-rags/skills/analytics-rerank/SKILL.md +3 -3
  215. package/harness/cursor/tea-rags/skills/architecture-diagnostics/SKILL.md +7 -7
  216. package/harness/cursor/tea-rags/skills/bug-hunt/SKILL.md +9 -9
  217. package/harness/cursor/tea-rags/skills/data-driven-generation/SKILL.md +6 -4
  218. package/harness/cursor/tea-rags/skills/explore/SKILL.md +3 -3
  219. package/harness/cursor/tea-rags/skills/extract-project-patterns/SKILL.md +3 -3
  220. package/harness/cursor/tea-rags/skills/filter-building/SKILL.md +3 -3
  221. package/harness/cursor/tea-rags/skills/force-reindex/SKILL.md +3 -3
  222. package/harness/cursor/tea-rags/skills/index/SKILL.md +3 -3
  223. package/harness/cursor/tea-rags/skills/mr-review/SKILL.md +5 -3
  224. package/harness/cursor/tea-rags/skills/pattern-search/SKILL.md +3 -3
  225. package/harness/cursor/tea-rags/skills/refactoring-planning/SKILL.md +3 -3
  226. package/harness/cursor/tea-rags/skills/refactoring-scan/SKILL.md +3 -3
  227. package/harness/cursor/tea-rags/skills/report-issue/SKILL.md +3 -3
  228. package/harness/cursor/tea-rags/skills/risk-assessment/SKILL.md +4 -4
  229. package/harness/cursor/tea-rags/skills/test-first/SKILL.md +4 -4
  230. package/harness/cursor/tea-rags/skills/tests-as-context/SKILL.md +3 -3
  231. package/harness/cursor/tea-rags-setup/.cursor-plugin/plugin.json +3 -2
  232. package/harness/cursor/tea-rags-setup/icon.png +0 -0
  233. package/harness/cursor/tea-rags-setup/scripts/detect.mjs +4 -0
  234. package/harness/cursor/tea-rags-setup/skills/install/SKILL.md +17 -9
  235. package/harness/cursor/tea-rags-setup/skills/tune/SKILL.md +3 -3
  236. package/harness/zcode/MANUAL-TEST.md +43 -0
  237. package/harness/zcode/README.md +141 -0
  238. package/harness/zcode/dinopowers/.zcode-plugin/plugin.json +10 -0
  239. package/harness/zcode/dinopowers/CHAINING.md +56 -0
  240. package/harness/zcode/dinopowers/FRESHNESS.md +33 -0
  241. package/harness/zcode/dinopowers/hooks/hooks.json +30 -0
  242. package/harness/zcode/dinopowers/icon.png +0 -0
  243. package/harness/zcode/dinopowers/scripts/main-session-routing.sh +41 -0
  244. package/harness/zcode/dinopowers/scripts/main-session-routing.txt +24 -0
  245. package/harness/zcode/dinopowers/scripts/wrapper-routing-agent.sh +19 -0
  246. package/harness/zcode/dinopowers/scripts/wrapper-routing.txt +25 -0
  247. package/harness/zcode/dinopowers/skills/dino-brainstorming/SKILL.md +286 -0
  248. package/harness/zcode/dinopowers/skills/dino-executing-plans/SKILL.md +375 -0
  249. package/harness/zcode/dinopowers/skills/dino-finishing-a-development-branch/SKILL.md +186 -0
  250. package/harness/zcode/dinopowers/skills/dino-receiving-code-review/SKILL.md +275 -0
  251. package/harness/zcode/dinopowers/skills/dino-receiving-code-review/references/call-route.md +53 -0
  252. package/harness/zcode/dinopowers/skills/dino-requesting-code-review/SKILL.md +260 -0
  253. package/harness/zcode/dinopowers/skills/dino-systematic-debugging/SKILL.md +358 -0
  254. package/harness/zcode/dinopowers/skills/dino-systematic-debugging/references/red-flags.md +47 -0
  255. package/harness/zcode/dinopowers/skills/dino-systematic-debugging/references/trace-chain.md +36 -0
  256. package/harness/zcode/dinopowers/skills/dino-test-driven-development/SKILL.md +263 -0
  257. package/harness/zcode/dinopowers/skills/dino-verification-before-completion/SKILL.md +268 -0
  258. package/harness/zcode/dinopowers/skills/dino-writing-plans/SKILL.md +332 -0
  259. package/harness/zcode/dinopowers/skills/dino-writing-skills/SKILL.md +134 -0
  260. package/harness/zcode/marketplace.json +32 -0
  261. package/harness/zcode/tea-rags/.mcp.json +9 -0
  262. package/harness/zcode/tea-rags/.zcode-plugin/plugin.json +11 -0
  263. package/harness/zcode/tea-rags/hooks/hooks.json +129 -0
  264. package/harness/zcode/tea-rags/icon.png +0 -0
  265. package/harness/zcode/tea-rags/repair/README.md +38 -0
  266. package/harness/zcode/tea-rags/repair/cycles.md +36 -0
  267. package/harness/zcode/tea-rags/repair/facadeContract.md +32 -0
  268. package/harness/zcode/tea-rags/repair/hubLike.md +72 -0
  269. package/harness/zcode/tea-rags/repair/layeringBackEdge.md +64 -0
  270. package/harness/zcode/tea-rags/repair/leakingAbstraction.md +58 -0
  271. package/harness/zcode/tea-rags/repair/mainSequence.md +48 -0
  272. package/harness/zcode/tea-rags/repair/silentCoupling.md +43 -0
  273. package/harness/zcode/tea-rags/repair/splitCandidates.md +37 -0
  274. package/harness/zcode/tea-rags/repair/stableDependencies.md +76 -0
  275. package/harness/zcode/tea-rags/rules/core.md +146 -0
  276. package/harness/zcode/tea-rags/rules/references/axis-splitting.md +50 -0
  277. package/harness/zcode/tea-rags/rules/references/report-follow-up.md +36 -0
  278. package/harness/zcode/tea-rags/rules/references/runtime-introspection.md +138 -0
  279. package/harness/zcode/tea-rags/rules/references/signal-interpretation.md +545 -0
  280. package/harness/zcode/tea-rags/scripts/check-build-fresh.sh +24 -0
  281. package/harness/zcode/tea-rags/scripts/cleanup-clone.sh +12 -0
  282. package/harness/zcode/tea-rags/scripts/cleanup-worktree-clone.sh +48 -0
  283. package/harness/zcode/tea-rags/scripts/inject-rules.sh +120 -0
  284. package/harness/zcode/tea-rags/scripts/reread-ledger.mjs +1610 -0
  285. package/harness/zcode/tea-rags/scripts/search-drift.sh +212 -0
  286. package/harness/zcode/tea-rags/scripts/session-digest.sh +33 -0
  287. package/harness/zcode/tea-rags/scripts/session-rules.sh +20 -0
  288. package/harness/zcode/tea-rags/scripts/standard-zone.ere +1 -0
  289. package/harness/zcode/tea-rags/scripts/subagent-block.txt +32 -0
  290. package/harness/zcode/tea-rags/scripts/subagent-context.sh +31 -0
  291. package/harness/zcode/tea-rags/scripts/turn-routing.sh +82 -0
  292. package/harness/zcode/tea-rags/scripts/turn-routing.txt +6 -0
  293. package/harness/zcode/tea-rags/skills/analytics-rerank/SKILL.md +276 -0
  294. package/harness/zcode/tea-rags/skills/architecture-diagnostics/SKILL.md +261 -0
  295. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/anti-patterns.md +55 -0
  296. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-1-report.md +106 -0
  297. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3b-leaking-abstraction.md +46 -0
  298. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3c-silent-coupling.md +55 -0
  299. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3c2-shotgun-surgery.md +93 -0
  300. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3d-main-sequence.md +29 -0
  301. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3d2-hub-like.md +26 -0
  302. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3d3-propagation-cost.md +26 -0
  303. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3e-layering.md +29 -0
  304. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3f-layer-map.md +24 -0
  305. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3g-dependency-norms.md +70 -0
  306. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3h-diff-time.md +37 -0
  307. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3i-remedy-simulation.md +36 -0
  308. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-4-exclusions.md +55 -0
  309. package/harness/zcode/tea-rags/skills/bug-hunt/SKILL.md +282 -0
  310. package/harness/zcode/tea-rags/skills/bug-hunt/references/call-path.md +97 -0
  311. package/harness/zcode/tea-rags/skills/bug-hunt/references/probes.md +69 -0
  312. package/harness/zcode/tea-rags/skills/bug-hunt/references/triage.md +56 -0
  313. package/harness/zcode/tea-rags/skills/data-driven-generation/SKILL.md +430 -0
  314. package/harness/zcode/tea-rags/skills/data-driven-generation/references/step-5-style.md +118 -0
  315. package/harness/zcode/tea-rags/skills/data-driven-generation/references/step-6-generate.md +66 -0
  316. package/harness/zcode/tea-rags/skills/data-driven-generation/references/step-7-verify.md +210 -0
  317. package/harness/zcode/tea-rags/skills/data-driven-generation/strategies/conservative.md +19 -0
  318. package/harness/zcode/tea-rags/skills/data-driven-generation/strategies/defensive.md +24 -0
  319. package/harness/zcode/tea-rags/skills/data-driven-generation/strategies/stabilization.md +21 -0
  320. package/harness/zcode/tea-rags/skills/data-driven-generation/strategies/standard.md +13 -0
  321. package/harness/zcode/tea-rags/skills/explore/SKILL.md +112 -0
  322. package/harness/zcode/tea-rags/skills/explore/references/architecture-pattern.md +63 -0
  323. package/harness/zcode/tea-rags/skills/explore/references/cycle-pattern.md +43 -0
  324. package/harness/zcode/tea-rags/skills/explore/references/entry-point-pattern.md +48 -0
  325. package/harness/zcode/tea-rags/skills/explore/references/exemplar-pattern.md +46 -0
  326. package/harness/zcode/tea-rags/skills/explore/references/explain-pattern.md +33 -0
  327. package/harness/zcode/tea-rags/skills/explore/references/explore-flow.md +89 -0
  328. package/harness/zcode/tea-rags/skills/explore/references/naming-pattern.md +15 -0
  329. package/harness/zcode/tea-rags/skills/explore/references/pre-gen-pattern.md +97 -0
  330. package/harness/zcode/tea-rags/skills/explore/references/trace-pattern.md +20 -0
  331. package/harness/zcode/tea-rags/skills/explore/references/usage-pattern.md +75 -0
  332. package/harness/zcode/tea-rags/skills/extract-project-patterns/SKILL.md +149 -0
  333. package/harness/zcode/tea-rags/skills/filter-building/SKILL.md +359 -0
  334. package/harness/zcode/tea-rags/skills/force-reindex/SKILL.md +76 -0
  335. package/harness/zcode/tea-rags/skills/index/SKILL.md +87 -0
  336. package/harness/zcode/tea-rags/skills/mr-review/SKILL.md +217 -0
  337. package/harness/zcode/tea-rags/skills/mr-review/references/delivery-contract.md +160 -0
  338. package/harness/zcode/tea-rags/skills/mr-review/references/dimension-playbook.md +237 -0
  339. package/harness/zcode/tea-rags/skills/pattern-search/SKILL.md +178 -0
  340. package/harness/zcode/tea-rags/skills/refactoring-planning/SKILL.md +193 -0
  341. package/harness/zcode/tea-rags/skills/refactoring-scan/SKILL.md +150 -0
  342. package/harness/zcode/tea-rags/skills/report-issue/SKILL.md +95 -0
  343. package/harness/zcode/tea-rags/skills/risk-assessment/SKILL.md +622 -0
  344. package/harness/zcode/tea-rags/skills/risk-assessment/references/anti-patterns.md +77 -0
  345. package/harness/zcode/tea-rags/skills/risk-assessment/references/classification-tiers.md +28 -0
  346. package/harness/zcode/tea-rags/skills/risk-assessment/references/enrich.md +213 -0
  347. package/harness/zcode/tea-rags/skills/test-first/SKILL.md +112 -0
  348. package/harness/zcode/tea-rags/skills/tests-as-context/SKILL.md +357 -0
  349. package/harness/zcode/tea-rags-setup/.zcode-plugin/plugin.json +9 -0
  350. package/harness/zcode/tea-rags-setup/icon.png +0 -0
  351. package/harness/zcode/tea-rags-setup/scripts/contextignore.mjs +107 -0
  352. package/harness/zcode/tea-rags-setup/scripts/detect.mjs +98 -0
  353. package/harness/zcode/tea-rags-setup/scripts/profile.mjs +110 -0
  354. package/harness/zcode/tea-rags-setup/skills/install/SKILL.md +216 -0
  355. package/harness/zcode/tea-rags-setup/skills/tune/SKILL.md +80 -0
  356. package/package.json +3 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <p align="center">
2
2
  <a href="https://artk0de.github.io/TeaRAGs-MCP/">
3
- <img src="public/logo.png" alt="TeaRAGs logo">
3
+ <img src="public/logo-readme.png" alt="TeaRAGs logo" width="540">
4
4
  </a>
5
5
  </p>
6
6
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  <p align="center">
10
10
  <strong>Codebase Intelligence layer for AI coding agents</strong><br>
11
- <sub>Trajectory Enrichment-Aware RAG · served over MCP · 100% local</sub>
11
+ <sub>Trajectory Enrichment-Aware RAG · served over MCP · local by default</sub>
12
12
  </p>
13
13
 
14
14
  <p align="center">
@@ -22,19 +22,139 @@
22
22
 
23
23
  ---
24
24
 
25
- **Your coding agent copies the first code it finds — not the right one.**
25
+ **🧠 Your codebase grows faster than your team can understand it.**
26
26
 
27
- TeaRAGs is a **Codebase Intelligence layer** your agent queries over MCP. It
28
- indexes the repository on your machine into five layers — three that read the
29
- code and two that judge its interfaces:
27
+ Even experienced developers know only parts of a large system. AI agents face
28
+ the same problem: finding similar code is easier than knowing whether it is a
29
+ good example or what a change might affect.
30
30
 
31
- - 🔍 **What it does** — semantic and hybrid search over AST-aware chunks
32
- - 🕸️ **How it is connected** — callers, callees, fan-in, transitive impact
33
- - 🧬 **How it has lived** — churn, bug-fix rate, ownership, age
34
- - 🏛️ **Whether it is laid out right** — dependency direction, leaking facades,
35
- files that change together with no edge between them
36
- - 🔤 **What the project calls things** — the naming vocabulary, inferred from
37
- the call graph, and a verdict on every new name
31
+ **🔬 TeaRAGs is a microscope for your codebase.** It gives coding agents
32
+ semantic search, a code graph, Git history, and architecture and naming signals
33
+ over MCP — helping them find relevant code, investigate risks, and prepare
34
+ changes for review. Fully local by default; cloud embeddings are optional.
35
+
36
+ ## 🚀 Quick Start
37
+
38
+ We recommend Node.js 24+. With Node.js and [Ollama](https://ollama.com)
39
+ installed:
40
+
41
+ ```bash
42
+ npm install -g tea-rags
43
+ ollama pull unclemusclez/jina-embeddings-v2-base-code:latest
44
+ tea-rags index-codebase /path/to/repo --name myrepo
45
+ tea-rags prime /path/to/repo
46
+ ```
47
+
48
+ [Connect your agent](#-installation): setup instructions for Claude Code, Codex,
49
+ Cursor, ZCode, and other MCP clients are below. Qdrant downloads and starts
50
+ automatically on first use. For cloud embeddings or an alternative local
51
+ provider, see the
52
+ [installation guide](https://artk0de.github.io/TeaRAGs-MCP/quickstart/installation).
53
+
54
+ Then ask your agent:
55
+
56
+ - _"How does auth work in this project?"_
57
+ - _"Find stable examples of retry logic I can reuse."_
58
+ - _"What might be affected if I change the payment module?"_
59
+
60
+ ## 🔬 A closer look
61
+
62
+ Even experienced developers know a system unevenly: their own modules well,
63
+ neighboring ones less well, and the rest only in broad strokes. Much of a
64
+ project's established practice lives in the code itself. Every change means
65
+ rebuilding context: finding the implementation, tracing dependencies, comparing
66
+ approaches, studying past fixes, and finding people who know the area.
67
+
68
+ Even human review can miss the problem. Code may look reasonable locally while
69
+ introducing an unwanted dependency, duplicating an existing mechanism, or
70
+ repeating a fragile approach. AI coding agents face the same limitation: finding
71
+ similar code is much easier than knowing whether to use it as a model.
72
+
73
+ **🔬 TeaRAGs is a microscope for your codebase, helping your agent examine it
74
+ from different angles.** This local **Codebase Intelligence layer**, queried
75
+ over MCP, combines semantic and graph indexes with Git history: what code does,
76
+ how it connects, how it has changed, where risks concentrate, and who knows it
77
+ best. Architecture detectors and project vocabulary analysis help surface
78
+ structural problems and inconsistencies that are easy to miss when reading
79
+ isolated files.
80
+
81
+ **🔍 Search by meaning, then navigate by relationships.**
82
+ [Semantic indexing](https://arxiv.org/abs/1909.09436) helps locate
83
+ implementations from a description of the task, even before you know method
84
+ names or the project's terminology.
85
+ [Graph indexing](https://docs.joern.io/code-property-graph/) lets you
86
+ investigate structural relationships: who calls the code, which dependencies
87
+ surround it, and which components execution passes through.
88
+
89
+ TeaRAGs retains the benefits of both approaches. An agent can start with a
90
+ natural-language question, find the relevant code, and follow its connections.
91
+ Git signals add another perspective: how that code has evolved and where to
92
+ exercise caution.
93
+
94
+ These signals are inferred from observed code and change history. They help
95
+ agents investigate established practices and make decisions; explicit team rules
96
+ and agent instructions retain priority.
97
+
98
+ This removes much of the routine investigation. Instead of searching through
99
+ files one after another, the agent gets the symbols, relationships, and evidence
100
+ needed for a specific question. Developers have fewer details to keep in their
101
+ heads, fewer search steps to direct manually, and less information to assemble
102
+ by hand.
103
+
104
+ The benefits extend beyond search:
105
+
106
+ - **🎯 Better-informed decisions.** Fix history, dependencies, and potential
107
+ impact help agents choose an implementation, assess risk, and decide how much
108
+ verification a change needs.
109
+ - **👥 More targeted review.** Authorship and ownership analysis help
110
+ automatically identify reviewer candidates familiar with the affected code and
111
+ highlight areas that need their attention.
112
+ - **📉 Less unnecessary context.** Reading the relevant symbols and
113
+ relationships reduces input tokens and intermediate search steps. Compact,
114
+ relevant context leaves fewer distractions. This aligns with
115
+ [context rot research](https://www.trychroma.com/research/context-rot), which
116
+ shows declining model reliability as context grows, and may make tasks easier
117
+ for less capable models.
118
+ - **♻️ More purposeful refactoring.** Detectors help locate structural problems
119
+ and decide where to invest effort. Better structure can reduce the
120
+ investigation and cost of subsequent changes, paying back the initial
121
+ investment.
122
+
123
+ **🧩 Especially useful for less capable models.** In our observations, giving
124
+ these models more relevant code and explicit relationships helps them make
125
+ better use of their capabilities. Frontier models often produce comparable code
126
+ quality with or without TeaRAGs; for them, the benefit is more about the time
127
+ spent finding and assembling context. Semantic search has generally saved
128
+ investigation time in our sessions, although we have not consistently observed
129
+ that speed advantage in Codex. The benefit depends on the model and agent
130
+ harness, not just the search engine.
131
+
132
+ ### 📊 Refactoring TeaRAGs with TeaRAGs
133
+
134
+ In TeaRAGs' own development, we measured Claude Code agents before and after a
135
+ program of structural refactoring. This compares development before and after
136
+ structural improvements, rather than search with and without TeaRAGs:
137
+
138
+ | Metric per feature | Before refactoring | After | Change |
139
+ | -------------------- | -----------------: | -----: | -----: |
140
+ | Median elapsed time | 68 min | 17 min | −75% |
141
+ | Agent steps | 117 | 68 | −42% |
142
+ | Context processed | 23.3M tokens | 12.7M | −45% |
143
+ | Weighted token cost¹ | 4.5M | 1.8M | −60% |
144
+
145
+ ¹ `input + 2 × cache_write + 0.1 × cache_read + 5 × output`. This is an
146
+ aggregate cost metric, not a separate measurement of output tokens.
147
+
148
+ These are observations from real development tasks using the same model, not a
149
+ controlled A/B experiment. The working process did not change substantially. The
150
+ `review_changes` check was added after refactoring, so the reductions already
151
+ include its additional overhead.
152
+
153
+ **💡 You do not need to keep the whole system in your head. You need to see what
154
+ matters for the change in front of you.**
155
+
156
+ _Your code should be as powerful as a T-rex, not a collection of dinosaur
157
+ remains. 🦖_
38
158
 
39
159
  <p align="center">
40
160
  <img src="public/five-layers.png" alt="Five layers behind one MCP interface: Semantic index, Codegraph, Trajectory, Architecture, Lexicon. The first three read the code, the last two judge its borders and names; every result comes back as a dossier">
@@ -44,90 +164,65 @@ The first three layers and why an agent needs all of them at once are laid out
44
164
  in [Codebase Intelligence для агента](https://habr.com/ru/articles/1084028/)
45
165
  (Habr, in Russian).
46
166
 
47
- TeaRAGs also ships agent skills that know which layer a task needs. The agent
48
- stops guessing which code is safe to copy, what is critical, and what a change
49
- will break — it reads the dossier instead.
50
-
51
167
  📖 **[Documentation](https://artk0de.github.io/TeaRAGs-MCP/)** · 🏁
52
168
  **[15-minute quickstart](https://artk0de.github.io/TeaRAGs-MCP/quickstart/installation)**
53
169
  · 🧠
54
170
  **[Core concepts](https://artk0de.github.io/TeaRAGs-MCP/introduction/core-concepts)**
55
171
 
56
- ## 👀 See It
172
+ ## 👀 See What Changes the Decision
57
173
 
58
- Three questions an agent asks before touching code, answered by TeaRAGs on its
59
- own repository. Every number below is a real response, trimmed.
174
+ Finding code is the beginning. The useful question is what the evidence changes
175
+ about the next step. These independent examples use real TeaRAGs responses from
176
+ its own repository, trimmed. The decisions below illustrate how an agent can use
177
+ that evidence; they are not a recorded implementation session.
60
178
 
61
- ### 1. "Find retry logic I can reuse"
179
+ ### 1. 🧬 The closest match may be the wrong example
62
180
 
63
- `semantic_search { query: "retry a failed request with exponential backoff", rerank: "hotspots" }`
181
+ **Question:** “Which retry implementation should I reuse?”
64
182
 
65
- Similarity alone puts `OllamaEmbeddings#retryWithBackoff` first. The dossiers of
66
- the top two candidates tell different stories:
183
+ Similarity puts `OllamaEmbeddings#retryWithBackoff` first. Its history gives the
184
+ agent a reason to look beyond that first result:
67
185
 
68
- | | 🥇 `OllamaEmbeddings#retryWithBackoff` | 🥈 `DeletionRetryHelper#execute` |
69
- | ------------------------- | -------------------------------------- | -------------------------------- |
70
- | Similarity rank | #1 | #2 (`retry-helper.ts`) |
71
- | Commits to the file | 28 | 1 |
72
- | Share that were bug fixes | 54% · 🔴 _concerning_ | 0% · 🟢 _healthy_ |
73
- | Last changed | 2 days ago · _recent_ | 86 days ago · _old_ |
74
- | Callers | 2 | 1 |
186
+ | Evidence | First semantic match: `OllamaEmbeddings#retryWithBackoff` | Second match: `DeletionRetryHelper#execute` |
187
+ | ----------------------------- | --------------------------------------------------------: | ------------------------------------------: |
188
+ | Commits to the file | 28 | 1 |
189
+ | Share classified as bug fixes | 54% · 🔴 concerning | 0% · 🟢 healthy |
190
+ | Last changed | 2 days ago | 86 days ago |
191
+ | Callers | 2 | 1 |
75
192
 
76
- The closest match keeps getting fixed. The agent copies the quiet helper's shape
77
- — or learns why the first one keeps breaking before it repeats the mistake.
193
+ **Decision:** investigate why the closest match keeps being fixed before copying
194
+ it, and compare the quieter helper's approach. One commit and no recorded fixes
195
+ are limited evidence, not a guarantee of quality.
78
196
 
79
197
  <details>
80
- <summary>Raw response for the first hit (trimmed)</summary>
198
+ <summary>Query and how to read the signals</summary>
81
199
 
82
- ```json
83
- {
84
- "symbolId": "OllamaEmbeddings#retryWithBackoff",
85
- "relativePath": "src/core/adapters/embeddings/ollama.ts",
86
- "startLine": 290,
87
- "endLine": 378,
88
- "preset": "hotspots",
89
- "git": {
90
- "file": {
91
- "commitCount": 28,
92
- "ageDays": { "value": 2, "label": "recent" },
93
- "bugFixRate": { "value": 54, "label": "concerning" },
94
- "relativeChurn": { "value": 2.55, "label": "normal" }
95
- },
96
- "chunk": {
97
- "commitCount": { "value": 11, "label": "extreme" },
98
- "relativeChurn": { "value": 9.09, "label": "high" }
99
- }
100
- },
101
- "codegraph": { "symbols": { "chunk": { "fanIn": 2, "fanOut": 6 } } }
102
- }
103
- ```
200
+ `semantic_search { query: "retry a failed request with exponential backoff", rerank: "hotspots" }`
104
201
 
105
- Labels are computed from **this repository's own percentiles**, so _extreme_
106
- means extreme for this codebase, not for some global average.
202
+ The semantic match locates candidates; Git history gives another axis for
203
+ comparison. Labels are computed from this repository's own distributions.
204
+ Bug-fix classification is a history heuristic, not a count of defects in the
205
+ current implementation.
107
206
 
108
207
  </details>
109
208
 
110
- ### 2. "What is risky to touch around vector writes?"
209
+ ### 2. 🕸️ A local edit can reach far beyond the file
111
210
 
112
- `semantic_search { query: "write points to the vector database in batches", rerank: "dangerous" }`
211
+ **Question:** “What needs verification before I change this write method?”
113
212
 
114
- Similarity alone ranks `PointsAccumulator#flushBatch`,
115
- `QdrantPointStore#addPointsOptimized` and `QdrantPointStore#addPoints` first.
116
- The `dangerous` preset reorders by risk and says why:
213
+ `QdrantManager#addPointsWithSparse` has **10 call sites across 8 files**. Its
214
+ file has a **transitive impact of 47 files**. Callers span ingestion, API
215
+ operations, schema management, and migrations.
117
216
 
118
- | # | Ranked by risk | Why it moved up |
119
- | --- | -------------------------------------------- | --------------------------------------------------------------------------- |
120
- | 1 | `ChunkPipeline#createBatchHandler` | 16 outgoing calls, 77 lines, 5 commits · _high_ |
121
- | 2 | `QdrantManager#addPointsWithSparseOptimized` | file with 45 commits, relative churn 8.09 · 🔴 _high_, 4 authors |
122
- | 3 | `PointsAccumulator#flushBatch` | one author owns 100% of the live lines · 🟠 _deep-silo_, 158 days untouched |
217
+ **Decision:** include those entry points in the verification plan rather than
218
+ judge the change by the size of the method. Transitive impact identifies
219
+ potential exposure; it does not mean all 47 files will break.
123
220
 
124
- ### 3. "Who calls it before I change it?"
221
+ <details>
222
+ <summary>Query and call sites</summary>
125
223
 
126
224
  `get_callers { symbolId: "QdrantManager#addPointsWithSparse" }`
127
225
 
128
- Ten exact call sites across eight files — method fan-in 10 · _central_, file
129
- transitive impact 47 · _regional_:
130
-
131
226
  ```text
132
227
  ChunkPipeline#createBatchHandler ingest/pipeline/chunk-pipeline.ts
133
228
  createQdrantPipeline ingest/pipeline/pipeline-manager.ts
@@ -140,16 +235,92 @@ SparseStoreAdapter#rebuildSparseVectors maintenance/migration/adapters/sparse-
140
235
  SparseStoreAdapter#storeSparseVersion maintenance/migration/adapters/sparse-store-adapter.ts
141
236
  ```
142
237
 
143
- Need the whole chain from an entry point to this call? `trace_path` enumerates
144
- every A→B path and, with a rerank preset, sorts them by how dangerous each step
145
- is.
238
+ `trace_path` can follow A→B call paths; risk ranking helps decide which steps
239
+ deserve closer investigation. Ownership signals help identify reviewer
240
+ candidates familiar with the affected areas.
241
+
242
+ </details>
243
+
244
+ ### 3. 🔗 No graph edge does not mean independent changes
245
+
246
+ **Question:** “Why do these two resolvers keep changing together?”
247
+
248
+ The Go and Java resolvers changed together in **5 sessions**. Every Java change
249
+ in that sample came with a Go change (**lift 86.5**), despite no import or call
250
+ connecting them.
251
+
252
+ **Decision:** investigate a shared convention or duplicated responsibility
253
+ before changing either resolver in isolation. Check whether the other needs a
254
+ matching update, or whether common behavior belongs in the language kernel.
255
+ Co-change is a lead for investigation, not proof of a missing abstraction.
256
+
257
+ <details>
258
+ <summary>Where the evidence comes from</summary>
259
+
260
+ `get_architecture_report` combines structural relationships with change history.
261
+ Its silent-coupling detector surfaces co-change that has no corresponding graph
262
+ edge. A call graph alone would not reveal this relationship.
263
+
264
+ </details>
265
+
266
+ ### 4. 🔤 A reasonable name can introduce a second vocabulary
267
+
268
+ **Question:** “Does this new name speak the project's language?”
269
+
270
+ | Draft | Evidence from the project | Review result |
271
+ | ---------------------------- | ------------------------------------------------------------------------------------ | --------------------------------- |
272
+ | `const meta: GitFileSignals` | Values of this type are named after `assembleFileSignals` | **MISFIT** → `fileSignals` |
273
+ | `type SignalStatistics` | Existing term `stats` has semantic similarity 0.93, above the chance-corrected floor | **NEW_TERM**, alternative `stats` |
274
+
275
+ **Decision:** prefer the established name when it describes the same role or
276
+ concept. The agent gets evidence for a naming discussion instead of adding
277
+ another plausible synonym. Explicit team naming rules retain priority.
278
+
279
+ <details>
280
+ <summary>Review query and evidence isolation</summary>
281
+
282
+ `review_changes { changes: { base: "main" }, sections: ["naming"] }`
283
+
284
+ The vocabulary is inferred from the project's call graph. Only declarations on
285
+ added lines are judged, and changed files are excluded from the evidence so a
286
+ diff cannot establish its own convention. `get_ontology_report` can audit the
287
+ wider vocabulary for synonyms, homonyms, and outliers.
288
+
289
+ </details>
290
+
291
+ ### 5. 🏛️ A working import can still cross the wrong boundary
292
+
293
+ **Question:** “Does this change fit how the component is used?”
294
+
295
+ `bootstrap/factory.ts` reaches past the `bootstrap/config` facade into
296
+ `env-snapshot.ts` for **3 names the facade does not export**. Meanwhile, **7 of
297
+ 9 importers** use the facade.
298
+
299
+ **Decision:** examine whether the factory should use the facade or whether the
300
+ facade's contract needs an intentional change. A valid import and passing local
301
+ tests do not answer that architectural question.
302
+
303
+ <details>
304
+ <summary>Detector and interpretation</summary>
305
+
306
+ `get_architecture_report` identifies the bypass using import edges and observed
307
+ facade adoption. This is an inferred boundary to investigate; an explicit
308
+ architectural rule or an intentional exception can take precedence.
309
+
310
+ </details>
311
+
312
+ **The microscope changes what the agent checks, copies, names, and asks a human
313
+ to verify — with evidence attached to each decision.**
146
314
 
147
315
  ## ❓ What It Answers
148
316
 
149
- Ask in plain language. **The plugin picks the skill, tools and rerank presets
150
- for every question automatically** — it ships a decision table that maps intent
151
- to the right call, so nobody has to know a preset name. Other MCP clients get
152
- the same routing guide as an MCP resource (`tea-rags://schema/search-guide`).
317
+ <details>
318
+ <summary>Explore questions, evidence, and agent workflows</summary>
319
+
320
+ Ask in plain language. **The plugin routes tasks to relevant skills, tools and
321
+ rerank presets** — it ships a decision table that maps intent to the right call,
322
+ so nobody has to know a preset name. Other MCP clients get the same routing
323
+ guide as an MCP resource (`tea-rags://schema/search-guide`).
153
324
 
154
325
  One question per layer, most distinctive first. Every number is a real response
155
326
  on TeaRAGs' own repository.
@@ -207,7 +378,8 @@ Similarity finds all four; history decides. `proven` ranks long-lived,
207
378
  low-bug-rate, multi-author code first, and every result carries its dossier —
208
379
  commits, bug-fix share, age, owners — labelled against this repository's own
209
380
  percentiles. The closest match by text is often the one fixed every sprint; see
210
- [See It → 1](#1-find-retry-logic-i-can-reuse) for a real pair.
381
+ [retry comparison](#1--the-closest-match-may-be-the-wrong-example) for a real
382
+ pair.
211
383
 
212
384
  ### 4. 🕸️ _"How does a request get from the API to the card charge, and which step is riskiest?"_
213
385
 
@@ -216,8 +388,8 @@ percentiles. The closest match by text is often the one fixed every sprint; see
216
388
  Every call path between the two symbols, resolved from the call graph rather
217
389
  than guessed from names, with each step ranked by how risky it is to touch. An
218
390
  ambiguous call is reported as ambiguous, never picked at random. See
219
- [See It → 3](#3-who-calls-it-before-i-change-it) for the ten call sites of a
220
- real write path.
391
+ [impact example](#2--a-local-edit-can-reach-far-beyond-the-file) for the ten
392
+ call sites of a real write path.
221
393
 
222
394
  ### 5. 🔍 _"Where do we charge a bill with a saved card?"_ — when the code says `invoice`
223
395
 
@@ -279,6 +451,8 @@ The right column shows what runs under the hood.
279
451
 
280
452
  </details>
281
453
 
454
+ </details>
455
+
282
456
  ## ✨ Features
283
457
 
284
458
  - 📈 **Git- and codegraph-aware ranking** — 23 rerank presets blend churn,
@@ -286,8 +460,8 @@ The right column shows what runs under the hood.
286
460
  (`proven`, `hotspots`, `techDebt`, `blastRadius`, `criticalPath`, …), plus 12
287
461
  filter presets
288
462
  - 🕸️ **Call graph** — callers, callees, cycles and A→B paths (`get_callers`,
289
- `get_callees`, `find_cycles`, `trace_path`) for TypeScript, JavaScript, Ruby,
290
- Swift and Python at a high tier
463
+ `get_callees`, `find_cycles`, `trace_path`) with resolution depth varying by
464
+ language and driver availability — see [Language Support](#language-support)
291
465
  - 🏛️ **Architecture report** — Stable Dependencies at component level, imports
292
466
  that leak past an adopted facade, files that change together with no edge
293
467
  between them, and distance from the main sequence (`get_architecture_report`)
@@ -295,23 +469,20 @@ The right column shows what runs under the hood.
295
469
  off the project vocabulary, co-change partners the change left untouched,
296
470
  per-file cohesion, and new edges that break architecture boundaries
297
471
  (`review_changes`)
298
- - 🔤 **Naming review** — the project's vocabulary inferred from the call graph:
299
- verdicts on value and type names, the project's own word for a synonym, a
300
- review of every name a diff declares (`review_changes`), and a whole-code
301
- audit of synonyms, homonyms and outliers (`get_ontology_report`)
302
- - 🧠 **Agent skills** — the plugin routes every question to the right tools and
303
- presets on its own; 15 ready-made workflows (`explore`, `bug-hunt`,
304
- `risk-assessment`, `data-driven-generation`, `mr-review`, …) plus
472
+ - 🧠 **Agent skills** — the plugin routes tasks to relevant tools and presets;
473
+ 15 ready-made workflows (`explore`, `bug-hunt`, `risk-assessment`,
474
+ `data-driven-generation`, `mr-review`, …) plus
305
475
  [`dinopowers`](https://artk0de.github.io/TeaRAGs-MCP/usage/skills/#dinopowers--wrappers-over-superpowers),
306
476
  10 wrappers that feed index signals into
307
477
  [`superpowers`](https://github.com/obra/superpowers)
308
- - 🔒 **100% local** — embedded Qdrant and DuckDB, no Docker; embeddings through
309
- Ollama — on the laptop or on any machine in your network, with the laptop as
310
- an automatic fallback (see [Embedding providers](#embedding-providers)) — with
311
- OpenAI, Cohere and Voyage optional
312
- - 🔄 **Always fresh** — incremental reindex, auto-update on a target branch,
313
- per-worktree index clones, and a drift report that names the exact command to
314
- run
478
+ - 🔒 **Fully local by default** — embedded Qdrant and DuckDB, no Docker;
479
+ embeddings through Ollama — on the laptop or on any machine in your network,
480
+ with the laptop as an automatic fallback (see
481
+ [Embedding providers](#embedding-providers)) — with OpenAI, Cohere and Voyage
482
+ optional
483
+ - 🔄 **Incremental updates & worktree support** — incremental reindex,
484
+ auto-update on a target branch, per-worktree index clones, and a drift report
485
+ that names the exact command to run
315
486
  - 🏢 **Built for enterprise monorepos** — AST chunking for 12 languages,
316
487
  parallel pipelines, validated on a 3.5M-line production monolith
317
488
 
@@ -334,8 +505,8 @@ Disk taken by real indexes (turbo quantization, dense + sparse vectors):
334
505
  | Production monolith (Ruby + TypeScript) | **3.3M lines of Ruby + TypeScript, tests included + 162K lines of docs** · ~34k files · 175k chunks | 2.0 GB | ~460 MB |
335
506
  | TeaRAGs itself (TypeScript) | 686K LoC + 290K lines of docs · ~3.5k files · 45k chunks | 1.2 GB | 40 MB |
336
507
 
337
- The call graph grows with the code; the vector index much less — a codebase five
338
- times smaller still takes 1.2 GB.
508
+ These are measured examples, not a sizing formula. Storage depends on chunk
509
+ count, embedding dimensions, quantization, and graph density.
339
510
 
340
511
  Pull the code-embedding model:
341
512
 
@@ -343,10 +514,10 @@ Pull the code-embedding model:
343
514
  ollama pull unclemusclez/jina-embeddings-v2-base-code:latest
344
515
  ```
345
516
 
346
- The repository is a plugin marketplace for Claude Code, Codex and Cursor. Each
347
- harness gets `tea-rags` (MCP server, skills, session hooks) and `dinopowers`
348
- (wrappers over [superpowers](https://github.com/obra/superpowers) — install
349
- superpowers first).
517
+ The repository is a plugin marketplace for Claude Code, Codex, Cursor and ZCode.
518
+ Each harness gets `tea-rags` (MCP server, skills, session hooks) and
519
+ `dinopowers` (wrappers over [superpowers](https://github.com/obra/superpowers) —
520
+ install superpowers first).
350
521
 
351
522
  <details>
352
523
  <summary><b>Claude Code</b> — plugins plus a setup wizard</summary>
@@ -398,6 +569,27 @@ yet verified). Details: [`harness/cursor/README.md`](harness/cursor/README.md).
398
569
 
399
570
  </details>
400
571
 
572
+ <details>
573
+ <summary><b>ZCode</b></summary>
574
+
575
+ ```bash
576
+ npm install -g tea-rags
577
+ zcode plugins marketplace add "$(npm root -g)/tea-rags/harness/zcode"
578
+ zcode plugins install tea-rags-setup@tea-rags
579
+ ```
580
+
581
+ Then run the `tea-rags-setup:install` skill in a ZCode session — the wizard
582
+ detects the zcode host and finishes the setup (tea-rags plugin + MCP server,
583
+ project registration, first index). Manual alternative:
584
+ `zcode plugins install tea-rags@tea-rags` (+ `dinopowers@tea-rags`); the plugin
585
+ carries its own MCP server and hooks on ZCode's seven events (no SubagentStart —
586
+ the subagent search block rides a PreToolUse(Agent) hook). `tea-rags update`
587
+ keeps the installed plugins at the client's release through this marketplace. A
588
+ workspace server override lives in `.zcode/config.json` → `mcp.servers`.
589
+ Details: [`harness/zcode/README.md`](harness/zcode/README.md).
590
+
591
+ </details>
592
+
401
593
  <details>
402
594
  <summary><b>Any other MCP client</b> (Roo Code, Continue, …)</summary>
403
595
 
@@ -426,34 +618,6 @@ Voyage), an external Qdrant, and the built-in ONNX provider (beta) are covered
426
618
  in the
427
619
  [installation guide](https://artk0de.github.io/TeaRAGs-MCP/quickstart/installation).
428
620
 
429
- ### 🕸️ The call graph
430
-
431
- The call graph is **on by default**. To index a project without it, set
432
- `CODEGRAPH_ENABLED=false` for that run, or pin it on an indexed project:
433
-
434
- ```bash
435
- tea-rags projects set-env --name <alias> CODEGRAPH_ENABLED=false
436
- ```
437
-
438
- The flag is recorded per project, so later runs from the CLI, the MCP server or
439
- auto-update keep each project's choice. Projects indexed while the call graph
440
- was opt-in keep the state they were indexed with; turn it on for one with
441
- `CODEGRAPH_ENABLED=true` in the same command. Details:
442
- [Codegraph Enrichments](https://artk0de.github.io/TeaRAGs-MCP/usage/advanced/codegraph-enrichments).
443
-
444
- ## 🚀 Quick Start
445
-
446
- ```bash
447
- tea-rags index-codebase /path/to/repo --name myrepo # first index: register + index
448
- tea-rags prime /path/to/repo # index state, drift, signal thresholds
449
- ```
450
-
451
- In Claude Code, `/tea-rags:index` does the same. Then ask your agent:
452
-
453
- - _"How does auth work in this project?"_
454
- - _"Find stable examples of retry logic I can copy."_
455
- - _"What breaks if I change the payment module?"_
456
-
457
621
  ## 🤔 Why TeaRAGs?
458
622
 
459
623
  | | `grep` / `ripgrep` | Embedding search | **TeaRAGs** |
@@ -462,7 +626,7 @@ In Claude Code, `/tea-rags:index` does the same. Then ask your agent:
462
626
  | **Knows history** | — | — | Churn, bug fixes, owners, age |
463
627
  | **Knows callers** | — | — | Fan-in, transitive impact, call paths |
464
628
  | **Ranks for the task** | — | Similarity only | 23 presets — see [What It Answers](#-what-it-answers) |
465
- | **Cost on a large monorepo** | Many agent turns | One query | One query |
629
+ | **Cost on a large monorepo** | Many agent turns | One query | Targeted queries with code, graph and history |
466
630
 
467
631
  ### 🆚 Compared to other tools
468
632
 
@@ -591,7 +755,7 @@ your own corpus.
591
755
 
592
756
  <!-- BEGIN lang-compat -->
593
757
 
594
- ## Languages Compatibilities
758
+ ## Language Support
595
759
 
596
760
  <!-- markdownlint-disable MD033 -->
597
761
  <details>
@@ -608,12 +772,12 @@ Rows are ordered by overall capability, richest support first.
608
772
 
609
773
  | Language | AST chunking | Test chunking | Codegraph |
610
774
  | ----------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
611
- | **_TypeScript_** | 🌔 **full** · tree-sitter (comment attachment, method-body splitting, describe/it scopes) | 🌖 **high** · testScopeChunker (describe/it scopes, one addressable chunk per example; in-source blocks marked isTest and pruned from the codegraph) | 🌖 **high** — 14-strategy chain (10 tree-sitter + 4 ts.Program/typeChecker) + cone dispatch + typeChecker-backed union-receiver fan-out |
775
+ | **_TypeScript_** | 🌔 **full** · tree-sitter (comment attachment, method-body splitting, describe/it scopes) | 🌖 **high** · testScopeChunker (describe/it scopes, one addressable chunk per example; in-source blocks marked isTest and pruned from the codegraph) | 🌕 **maximum** — 14-strategy chain (10 tree-sitter + 4 ts.Program/typeChecker) + cone dispatch + typeChecker-backed union-receiver fan-out |
776
+ | **_Rust_** | 🌔 **full** · tree-sitter (named-item extraction, #[cfg(test)] / #[test] scopes) | 🌖 **high** · attribute-AST test scope chunking (#[cfg(test)] with all/any/not evaluation, #[test]-family attributes); inline tests marked isTest and pruned from the codegraph | 🌕 **maximum** — 10-strategy (rustc call-site driver first); trait dispatch; return/field chains (Self, generics, assoc-fn heads, aliases); call-result locals; crate impls |
612
777
  | **_JavaScript_** | 🌔 **full** · tree-sitter (assignment chunking, describe/it scopes, module/class split) | 🌖 **high** · testScopeChunker (describe/it scopes, one addressable chunk per example; in-source blocks marked isTest and pruned from the codegraph) | 🌖 **high** — 6-strategy; CommonJS/ESM require resolution (dynamic gaps) |
613
778
  | **_Ruby_** | 🌔 **full** · tree-sitter (RSpec block grouping, comment attachment, spec scope splitting, method-body splitting) | 🌖 **high** · RSpec scope chunker (one chunk per example, ancestor setup injected) | untyped 🌖 **high** · YARD 🌕 **maximum** · RBS/Sorbet 🌑 **TBD** — 15-strategy chain + 4 dispatch components + 20-grammar DSL catalogue + YARD type-source + db/schema.rb column accessors |
614
779
  | **_Swift_** | 🌔 **full** · tree-sitter | 🌖 **high** · XCTest + swift-testing recognition (test cases, setUp/tearDown, @Test/@Suite) plus Quick/Nimble DSL scope chunking (per-scenario chunks with ancestor beforeEach spliced in) | 🌖 **high** — 10-strategy chain + superclass dispatch + field and return-type receiver typing + nested-type and module-value receivers; no import narrowing |
615
780
  | **_Python_** | 🌔 **full** · tree-sitter | 🌓 **medium** · generic AST | 🌖 **high** — 10-strategy chain + C3 MRO + cone/union/callable-param/dict-table dispatch + re-export-aware imports + inferred return types + gated framework vocabularies |
616
- | **_Rust_** | 🌔 **full** · tree-sitter (named-item extraction, #[cfg(test)] / #[test] scopes) | 🌖 **high** · attribute-AST test scope chunking (#[cfg(test)] with all/any/not evaluation, #[test]-family attributes); inline tests marked isTest and pruned from the codegraph | 🌗 **moderate** — 10-strategy (rustc call-site driver first); trait dispatch; return/field chains (Self, generics, assoc-fn heads, aliases); call-result locals; crate impls |
617
781
  | **_Go_** | 🌔 **full** · tree-sitter (func/type split) | 🌓 **medium** · generic AST | 🌗 **moderate** — 7-pass chain + scope-aware typed locals + struct-field chains + embedding promotion + go.mod module-path imports; no interface dispatch |
618
782
  | **_Java_** | 🌔 **full** · tree-sitter | 🌓 **medium** · generic AST | 🌗 **moderate** — 6-strategy + java.lang stdlib whitelist + overload disambiguation |
619
783
  | **_PHP_** | 🌔 **full** · tree-sitter | 🌓 **medium** · generic AST | 🌗 **moderate** — same-file $this members, typed locals, same-file and imported scoped calls, same-file functions, unique global functions, use-to-file edges |
@@ -635,7 +799,7 @@ or syntax-blind fallback. Internal revisions only route index rebuilds.
635
799
 
636
800
  | Language | Language / toolchain policy | Grammar package version | Internal revisions (chunking / walker / codegraphSchema) | Evidence and limits |
637
801
  | ---------- | --------------------------- | ---------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
638
- | ruby | grammar-bounded | tree-sitter-ruby@0.23.1 | 3 / 11 / 2 | Installed grammar and project fixtures bound Ruby syntax; no Ruby/MRI release range or runtime conformance certified · tests/core/domains/language/capability/version-policy.test.ts |
802
+ | ruby | grammar-bounded | tree-sitter-ruby@0.23.1 | 4 / 11 / 2 | Installed grammar and project fixtures bound Ruby syntax; no Ruby/MRI release range or runtime conformance certified · tests/core/domains/language/capability/version-policy.test.ts |
639
803
  | typescript | grammar-bounded | tree-sitter-typescript@0.23.2 | 4 / 17 / 2 | Installed TypeScript/TSX grammar and project fixtures bound syntax; TypeScript compiler package version does not certify a language release range · tests/core/domains/language/capability/version-policy.test.ts |
640
804
  | javascript | grammar-bounded | tree-sitter-javascript@0.25.0 | 4 / 6 / 2 | Installed JavaScript/JSX grammar and project fixtures bound syntax; no ECMAScript edition or Node/browser runtime range certified · tests/core/domains/language/capability/version-policy.test.ts |
641
805
  | python | grammar-bounded | tree-sitter-python@0.25.0 | 1 / 12 / 2 | Installed grammar and project fixtures bound Python syntax; no Python/CPython release range or runtime conformance certified · tests/core/domains/language/capability/version-policy.test.ts |
@@ -664,6 +828,7 @@ decides how much of the tooling on top of the MCP server you get.
664
828
  | **Claude Code** | ✅ stdio | ✅ plus the plugin's routing rules | ✅ plugins | ✅ `/tea-rags-setup:install` |
665
829
  | **Codex CLI** | ✅ stdio | ✅ plus the plugin's core skill and hooks | ✅ plugins (`$name` skills) | — manual install |
666
830
  | **Cursor** | ✅ stdio | ✅ plus the plugin's sessionStart digest | ✅ plugins (`/name` skills) | — manual install |
831
+ | **ZCode** | ✅ stdio | ✅ plus the plugin's SessionStart hooks | ✅ plugins (`tea-rags:name` skills) | ✅ `tea-rags-setup:install` |
667
832
  | **Other stdio clients** (Roo Code, Continue, …) | ✅ `tea-rags server` | ✅ where the client reads MCP resources | — | — manual install |
668
833
  | **HTTP clients** | ✅ `tea-rags server --http` (Streamable HTTP, port 3000) | ✅ where the client reads MCP resources | — | — manual install |
669
834
 
@@ -761,7 +926,7 @@ is incremental — only changed files are re-embedded.
761
926
  graph of varying depth: TypeScript, JavaScript, Ruby, Python, Swift, Go, Java,
762
927
  Rust, Bash, Objective-C, PHP, and Kotlin. Markdown is chunked by heading and
763
928
  YAML by key path; SQL and JSON fall back to plain character chunks. Per-language
764
- depth is in [Languages Compatibilities](#languages-compatibilities).
929
+ depth is in [Language Support](#language-support).
765
930
 
766
931
  **How accurate are the git signals?** They are read from your real history; the
767
932
  one heuristic is bug-fix detection. A commit counts as a bug fix when its