tea-rags 1.51.2 → 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 (334) 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/vcs/git/adapter.d.ts +8 -1
  27. package/build/core/adapters/vcs/git/adapter.d.ts.map +1 -1
  28. package/build/core/adapters/vcs/git/adapter.js.map +1 -1
  29. package/build/core/adapters/vcs/git/es-git/adapter.d.ts +4 -1
  30. package/build/core/adapters/vcs/git/es-git/adapter.d.ts.map +1 -1
  31. package/build/core/adapters/vcs/git/es-git/adapter.js +2 -2
  32. package/build/core/adapters/vcs/git/es-git/adapter.js.map +1 -1
  33. package/build/core/adapters/vcs/git/git-cli/adapter.d.ts +4 -1
  34. package/build/core/adapters/vcs/git/git-cli/adapter.d.ts.map +1 -1
  35. package/build/core/adapters/vcs/git/git-cli/adapter.js +2 -2
  36. package/build/core/adapters/vcs/git/git-cli/adapter.js.map +1 -1
  37. package/build/core/adapters/vcs/git/git-cli/history.d.ts +4 -1
  38. package/build/core/adapters/vcs/git/git-cli/history.d.ts.map +1 -1
  39. package/build/core/adapters/vcs/git/git-cli/history.js +9 -2
  40. package/build/core/adapters/vcs/git/git-cli/history.js.map +1 -1
  41. package/build/core/api/internal/app-factory.d.ts +1 -1
  42. package/build/core/api/internal/app-factory.d.ts.map +1 -1
  43. package/build/core/api/internal/app-factory.js +3 -2
  44. package/build/core/api/internal/app-factory.js.map +1 -1
  45. package/build/core/api/internal/composition.d.ts +1 -1
  46. package/build/core/api/internal/composition.d.ts.map +1 -1
  47. package/build/core/api/internal/composition.js +7 -1
  48. package/build/core/api/internal/composition.js.map +1 -1
  49. package/build/core/api/internal/facades/explore-facade.d.ts +1 -1
  50. package/build/core/api/internal/facades/explore-facade.d.ts.map +1 -1
  51. package/build/core/api/internal/infra/working-tree-graph-read.d.ts +22 -0
  52. package/build/core/api/internal/infra/working-tree-graph-read.d.ts.map +1 -1
  53. package/build/core/api/internal/infra/working-tree-graph-read.js +75 -1
  54. package/build/core/api/internal/infra/working-tree-graph-read.js.map +1 -1
  55. package/build/core/api/internal/migration-parser.d.ts.map +1 -1
  56. package/build/core/api/internal/migration-parser.js +4 -1
  57. package/build/core/api/internal/migration-parser.js.map +1 -1
  58. package/build/core/api/internal/ops/explore-ops.d.ts +7 -2
  59. package/build/core/api/internal/ops/explore-ops.d.ts.map +1 -1
  60. package/build/core/api/internal/ops/explore-ops.js +98 -63
  61. package/build/core/api/internal/ops/explore-ops.js.map +1 -1
  62. package/build/core/api/internal/ops/indexing-ops.js +1 -0
  63. package/build/core/api/internal/ops/indexing-ops.js.map +1 -1
  64. package/build/core/api/public/dto/ingest.d.ts +8 -0
  65. package/build/core/api/public/dto/ingest.d.ts.map +1 -1
  66. package/build/core/api/tools/code/register-index-tools.d.ts.map +1 -1
  67. package/build/core/api/tools/code/register-index-tools.js +2 -0
  68. package/build/core/api/tools/code/register-index-tools.js.map +1 -1
  69. package/build/core/contracts/types/language.d.ts +8 -0
  70. package/build/core/contracts/types/language.d.ts.map +1 -1
  71. package/build/core/contracts/types/language.js.map +1 -1
  72. package/build/core/contracts/types/provider.d.ts +17 -0
  73. package/build/core/contracts/types/provider.d.ts.map +1 -1
  74. package/build/core/domains/explore/index.d.ts +2 -0
  75. package/build/core/domains/explore/index.d.ts.map +1 -1
  76. package/build/core/domains/explore/index.js +2 -0
  77. package/build/core/domains/explore/index.js.map +1 -1
  78. package/build/core/domains/explore/resolver-batch.d.ts +45 -0
  79. package/build/core/domains/explore/resolver-batch.d.ts.map +1 -0
  80. package/build/core/domains/explore/resolver-batch.js +175 -0
  81. package/build/core/domains/explore/resolver-batch.js.map +1 -0
  82. package/build/core/domains/explore/working-tree/tree-graph-marker.d.ts +0 -27
  83. package/build/core/domains/explore/working-tree/tree-graph-marker.d.ts.map +1 -1
  84. package/build/core/domains/explore/working-tree/tree-graph-marker.js +15 -1
  85. package/build/core/domains/explore/working-tree/tree-graph-marker.js.map +1 -1
  86. package/build/core/domains/ingest/errors/ingest-errors.d.ts.map +1 -1
  87. package/build/core/domains/ingest/errors/ingest-errors.js +4 -2
  88. package/build/core/domains/ingest/errors/ingest-errors.js.map +1 -1
  89. package/build/core/domains/ingest/operations/reindexing.d.ts +17 -0
  90. package/build/core/domains/ingest/operations/reindexing.d.ts.map +1 -1
  91. package/build/core/domains/ingest/operations/reindexing.js +45 -1
  92. package/build/core/domains/ingest/operations/reindexing.js.map +1 -1
  93. package/build/core/domains/ingest/pipeline/chunk-point-payload.d.ts.map +1 -1
  94. package/build/core/domains/ingest/pipeline/chunk-point-payload.js +4 -1
  95. package/build/core/domains/ingest/pipeline/chunk-point-payload.js.map +1 -1
  96. package/build/core/domains/ingest/pipeline/chunker/infra/worker.js +3 -0
  97. package/build/core/domains/ingest/pipeline/chunker/infra/worker.js.map +1 -1
  98. package/build/core/domains/ingest/pipeline/enrichment/backfiller.d.ts.map +1 -1
  99. package/build/core/domains/ingest/pipeline/enrichment/backfiller.js +16 -0
  100. package/build/core/domains/ingest/pipeline/enrichment/backfiller.js.map +1 -1
  101. package/build/core/domains/ingest/pipeline/enrichment/completion-runner.d.ts.map +1 -1
  102. package/build/core/domains/ingest/pipeline/enrichment/completion-runner.js +4 -1
  103. package/build/core/domains/ingest/pipeline/enrichment/completion-runner.js.map +1 -1
  104. package/build/core/domains/ingest/pipeline/enrichment/file-phase.d.ts.map +1 -1
  105. package/build/core/domains/ingest/pipeline/enrichment/file-phase.js +11 -0
  106. package/build/core/domains/ingest/pipeline/enrichment/file-phase.js.map +1 -1
  107. package/build/core/domains/ingest/pipeline/file-ingestor.d.ts.map +1 -1
  108. package/build/core/domains/ingest/pipeline/file-ingestor.js +10 -6
  109. package/build/core/domains/ingest/pipeline/file-ingestor.js.map +1 -1
  110. package/build/core/domains/ingest/pipeline/status-module.d.ts.map +1 -1
  111. package/build/core/domains/ingest/pipeline/status-module.js +3 -8
  112. package/build/core/domains/ingest/pipeline/status-module.js.map +1 -1
  113. package/build/core/domains/ingest/sync/index-holes.d.ts +40 -0
  114. package/build/core/domains/ingest/sync/index-holes.d.ts.map +1 -0
  115. package/build/core/domains/ingest/sync/index-holes.js +50 -0
  116. package/build/core/domains/ingest/sync/index-holes.js.map +1 -0
  117. package/build/core/domains/ingest/sync/index.d.ts +1 -0
  118. package/build/core/domains/ingest/sync/index.d.ts.map +1 -1
  119. package/build/core/domains/ingest/sync/index.js +1 -0
  120. package/build/core/domains/ingest/sync/index.js.map +1 -1
  121. package/build/core/domains/language/capability/readme.d.ts +1 -1
  122. package/build/core/domains/language/capability/readme.js +2 -2
  123. package/build/core/domains/language/errors.d.ts +13 -1
  124. package/build/core/domains/language/errors.d.ts.map +1 -1
  125. package/build/core/domains/language/errors.js +18 -0
  126. package/build/core/domains/language/errors.js.map +1 -1
  127. package/build/core/domains/language/factory.d.ts +41 -10
  128. package/build/core/domains/language/factory.d.ts.map +1 -1
  129. package/build/core/domains/language/factory.js +87 -85
  130. package/build/core/domains/language/factory.js.map +1 -1
  131. package/build/core/domains/language/index.d.ts +2 -5
  132. package/build/core/domains/language/index.d.ts.map +1 -1
  133. package/build/core/domains/language/index.js +9 -5
  134. package/build/core/domains/language/index.js.map +1 -1
  135. package/build/core/domains/language/provider-sources.d.ts +56 -0
  136. package/build/core/domains/language/provider-sources.d.ts.map +1 -0
  137. package/build/core/domains/language/provider-sources.js +156 -0
  138. package/build/core/domains/language/provider-sources.js.map +1 -0
  139. package/build/core/domains/language/ruby/capability.d.ts.map +1 -1
  140. package/build/core/domains/language/ruby/capability.js +6 -1
  141. package/build/core/domains/language/ruby/capability.js.map +1 -1
  142. package/build/core/domains/language/ruby/chunking/rspec-scope-chunker.d.ts.map +1 -1
  143. package/build/core/domains/language/ruby/chunking/rspec-scope-chunker.js +4 -1
  144. package/build/core/domains/language/ruby/chunking/rspec-scope-chunker.js.map +1 -1
  145. package/build/core/domains/language/rust/capability.js +1 -1
  146. package/build/core/domains/language/rust/capability.js.map +1 -1
  147. package/build/core/domains/language/typescript/capability.js +1 -1
  148. package/build/core/domains/language/typescript/capability.js.map +1 -1
  149. package/build/core/domains/trajectory/codegraph/factory.d.ts.map +1 -1
  150. package/build/core/domains/trajectory/codegraph/factory.js +3 -0
  151. package/build/core/domains/trajectory/codegraph/factory.js.map +1 -1
  152. package/build/core/domains/trajectory/git/infra/blame-store.d.ts +5 -1
  153. package/build/core/domains/trajectory/git/infra/blame-store.d.ts.map +1 -1
  154. package/build/core/domains/trajectory/git/infra/blame-store.js +62 -8
  155. package/build/core/domains/trajectory/git/infra/blame-store.js.map +1 -1
  156. package/build/core/domains/trajectory/git/infra/file-lifetime-store.d.ts +38 -0
  157. package/build/core/domains/trajectory/git/infra/file-lifetime-store.d.ts.map +1 -0
  158. package/build/core/domains/trajectory/git/infra/file-lifetime-store.js +105 -0
  159. package/build/core/domains/trajectory/git/infra/file-lifetime-store.js.map +1 -0
  160. package/build/core/domains/trajectory/git/infra/file-lifetime.d.ts +24 -0
  161. package/build/core/domains/trajectory/git/infra/file-lifetime.d.ts.map +1 -1
  162. package/build/core/domains/trajectory/git/infra/file-lifetime.js +55 -1
  163. package/build/core/domains/trajectory/git/infra/file-lifetime.js.map +1 -1
  164. package/build/core/domains/trajectory/git/provider.d.ts +15 -1
  165. package/build/core/domains/trajectory/git/provider.d.ts.map +1 -1
  166. package/build/core/domains/trajectory/git/provider.js +61 -8
  167. package/build/core/domains/trajectory/git/provider.js.map +1 -1
  168. package/build/core/types.d.ts +8 -0
  169. package/build/core/types.d.ts.map +1 -1
  170. package/build/mcp/resources/generated/agent-context.d.ts.map +1 -1
  171. package/build/mcp/resources/generated/agent-context.js +1 -1
  172. package/build/mcp/resources/generated/agent-context.js.map +1 -1
  173. package/build/typecheck-tests.tsbuildinfo +1 -0
  174. package/harness/cursor/README.md +4 -1
  175. package/harness/cursor/dinopowers/.cursor-plugin/plugin.json +3 -2
  176. package/harness/cursor/dinopowers/icon.png +0 -0
  177. package/harness/cursor/dinopowers/skills/dino-brainstorming/SKILL.md +14 -12
  178. package/harness/cursor/dinopowers/skills/dino-executing-plans/SKILL.md +7 -3
  179. package/harness/cursor/dinopowers/skills/dino-finishing-a-development-branch/SKILL.md +3 -3
  180. package/harness/cursor/dinopowers/skills/dino-receiving-code-review/SKILL.md +4 -4
  181. package/harness/cursor/dinopowers/skills/dino-requesting-code-review/SKILL.md +3 -3
  182. package/harness/cursor/dinopowers/skills/dino-systematic-debugging/SKILL.md +12 -12
  183. package/harness/cursor/dinopowers/skills/dino-test-driven-development/SKILL.md +6 -3
  184. package/harness/cursor/dinopowers/skills/dino-verification-before-completion/SKILL.md +3 -3
  185. package/harness/cursor/dinopowers/skills/dino-writing-plans/SKILL.md +7 -3
  186. package/harness/cursor/dinopowers/skills/dino-writing-skills/SKILL.md +4 -4
  187. package/harness/cursor/tea-rags/.cursor-plugin/plugin.json +3 -2
  188. package/harness/cursor/tea-rags/icon.png +0 -0
  189. package/harness/cursor/tea-rags/rules/tea-rags-core.mdc +12 -8
  190. package/harness/cursor/tea-rags/scripts/check-build-fresh.sh +1 -0
  191. package/harness/cursor/tea-rags/scripts/reread-ledger.mjs +6 -3
  192. package/harness/cursor/tea-rags/skills/analytics-rerank/SKILL.md +3 -3
  193. package/harness/cursor/tea-rags/skills/architecture-diagnostics/SKILL.md +7 -7
  194. package/harness/cursor/tea-rags/skills/bug-hunt/SKILL.md +9 -9
  195. package/harness/cursor/tea-rags/skills/data-driven-generation/SKILL.md +6 -4
  196. package/harness/cursor/tea-rags/skills/explore/SKILL.md +3 -3
  197. package/harness/cursor/tea-rags/skills/extract-project-patterns/SKILL.md +3 -3
  198. package/harness/cursor/tea-rags/skills/filter-building/SKILL.md +3 -3
  199. package/harness/cursor/tea-rags/skills/force-reindex/SKILL.md +3 -3
  200. package/harness/cursor/tea-rags/skills/index/SKILL.md +3 -3
  201. package/harness/cursor/tea-rags/skills/mr-review/SKILL.md +5 -3
  202. package/harness/cursor/tea-rags/skills/pattern-search/SKILL.md +3 -3
  203. package/harness/cursor/tea-rags/skills/refactoring-planning/SKILL.md +3 -3
  204. package/harness/cursor/tea-rags/skills/refactoring-scan/SKILL.md +3 -3
  205. package/harness/cursor/tea-rags/skills/report-issue/SKILL.md +3 -3
  206. package/harness/cursor/tea-rags/skills/risk-assessment/SKILL.md +4 -4
  207. package/harness/cursor/tea-rags/skills/test-first/SKILL.md +4 -4
  208. package/harness/cursor/tea-rags/skills/tests-as-context/SKILL.md +3 -3
  209. package/harness/cursor/tea-rags-setup/.cursor-plugin/plugin.json +3 -2
  210. package/harness/cursor/tea-rags-setup/icon.png +0 -0
  211. package/harness/cursor/tea-rags-setup/scripts/detect.mjs +4 -0
  212. package/harness/cursor/tea-rags-setup/skills/install/SKILL.md +17 -9
  213. package/harness/cursor/tea-rags-setup/skills/tune/SKILL.md +3 -3
  214. package/harness/zcode/MANUAL-TEST.md +43 -0
  215. package/harness/zcode/README.md +141 -0
  216. package/harness/zcode/dinopowers/.zcode-plugin/plugin.json +10 -0
  217. package/harness/zcode/dinopowers/CHAINING.md +56 -0
  218. package/harness/zcode/dinopowers/FRESHNESS.md +33 -0
  219. package/harness/zcode/dinopowers/hooks/hooks.json +30 -0
  220. package/harness/zcode/dinopowers/icon.png +0 -0
  221. package/harness/zcode/dinopowers/scripts/main-session-routing.sh +41 -0
  222. package/harness/zcode/dinopowers/scripts/main-session-routing.txt +24 -0
  223. package/harness/zcode/dinopowers/scripts/wrapper-routing-agent.sh +19 -0
  224. package/harness/zcode/dinopowers/scripts/wrapper-routing.txt +25 -0
  225. package/harness/zcode/dinopowers/skills/dino-brainstorming/SKILL.md +286 -0
  226. package/harness/zcode/dinopowers/skills/dino-executing-plans/SKILL.md +375 -0
  227. package/harness/zcode/dinopowers/skills/dino-finishing-a-development-branch/SKILL.md +186 -0
  228. package/harness/zcode/dinopowers/skills/dino-receiving-code-review/SKILL.md +275 -0
  229. package/harness/zcode/dinopowers/skills/dino-receiving-code-review/references/call-route.md +53 -0
  230. package/harness/zcode/dinopowers/skills/dino-requesting-code-review/SKILL.md +260 -0
  231. package/harness/zcode/dinopowers/skills/dino-systematic-debugging/SKILL.md +358 -0
  232. package/harness/zcode/dinopowers/skills/dino-systematic-debugging/references/red-flags.md +47 -0
  233. package/harness/zcode/dinopowers/skills/dino-systematic-debugging/references/trace-chain.md +36 -0
  234. package/harness/zcode/dinopowers/skills/dino-test-driven-development/SKILL.md +263 -0
  235. package/harness/zcode/dinopowers/skills/dino-verification-before-completion/SKILL.md +268 -0
  236. package/harness/zcode/dinopowers/skills/dino-writing-plans/SKILL.md +332 -0
  237. package/harness/zcode/dinopowers/skills/dino-writing-skills/SKILL.md +134 -0
  238. package/harness/zcode/marketplace.json +32 -0
  239. package/harness/zcode/tea-rags/.mcp.json +9 -0
  240. package/harness/zcode/tea-rags/.zcode-plugin/plugin.json +11 -0
  241. package/harness/zcode/tea-rags/hooks/hooks.json +129 -0
  242. package/harness/zcode/tea-rags/icon.png +0 -0
  243. package/harness/zcode/tea-rags/repair/README.md +38 -0
  244. package/harness/zcode/tea-rags/repair/cycles.md +36 -0
  245. package/harness/zcode/tea-rags/repair/facadeContract.md +32 -0
  246. package/harness/zcode/tea-rags/repair/hubLike.md +72 -0
  247. package/harness/zcode/tea-rags/repair/layeringBackEdge.md +64 -0
  248. package/harness/zcode/tea-rags/repair/leakingAbstraction.md +58 -0
  249. package/harness/zcode/tea-rags/repair/mainSequence.md +48 -0
  250. package/harness/zcode/tea-rags/repair/silentCoupling.md +43 -0
  251. package/harness/zcode/tea-rags/repair/splitCandidates.md +37 -0
  252. package/harness/zcode/tea-rags/repair/stableDependencies.md +76 -0
  253. package/harness/zcode/tea-rags/rules/core.md +146 -0
  254. package/harness/zcode/tea-rags/rules/references/axis-splitting.md +50 -0
  255. package/harness/zcode/tea-rags/rules/references/report-follow-up.md +36 -0
  256. package/harness/zcode/tea-rags/rules/references/runtime-introspection.md +138 -0
  257. package/harness/zcode/tea-rags/rules/references/signal-interpretation.md +545 -0
  258. package/harness/zcode/tea-rags/scripts/check-build-fresh.sh +24 -0
  259. package/harness/zcode/tea-rags/scripts/cleanup-clone.sh +12 -0
  260. package/harness/zcode/tea-rags/scripts/cleanup-worktree-clone.sh +48 -0
  261. package/harness/zcode/tea-rags/scripts/inject-rules.sh +120 -0
  262. package/harness/zcode/tea-rags/scripts/reread-ledger.mjs +1610 -0
  263. package/harness/zcode/tea-rags/scripts/search-drift.sh +212 -0
  264. package/harness/zcode/tea-rags/scripts/session-digest.sh +33 -0
  265. package/harness/zcode/tea-rags/scripts/session-rules.sh +20 -0
  266. package/harness/zcode/tea-rags/scripts/standard-zone.ere +1 -0
  267. package/harness/zcode/tea-rags/scripts/subagent-block.txt +32 -0
  268. package/harness/zcode/tea-rags/scripts/subagent-context.sh +31 -0
  269. package/harness/zcode/tea-rags/scripts/turn-routing.sh +82 -0
  270. package/harness/zcode/tea-rags/scripts/turn-routing.txt +6 -0
  271. package/harness/zcode/tea-rags/skills/analytics-rerank/SKILL.md +276 -0
  272. package/harness/zcode/tea-rags/skills/architecture-diagnostics/SKILL.md +261 -0
  273. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/anti-patterns.md +55 -0
  274. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-1-report.md +106 -0
  275. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3b-leaking-abstraction.md +46 -0
  276. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3c-silent-coupling.md +55 -0
  277. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3c2-shotgun-surgery.md +93 -0
  278. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3d-main-sequence.md +29 -0
  279. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3d2-hub-like.md +26 -0
  280. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3d3-propagation-cost.md +26 -0
  281. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3e-layering.md +29 -0
  282. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3f-layer-map.md +24 -0
  283. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3g-dependency-norms.md +70 -0
  284. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3h-diff-time.md +37 -0
  285. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3i-remedy-simulation.md +36 -0
  286. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-4-exclusions.md +55 -0
  287. package/harness/zcode/tea-rags/skills/bug-hunt/SKILL.md +282 -0
  288. package/harness/zcode/tea-rags/skills/bug-hunt/references/call-path.md +97 -0
  289. package/harness/zcode/tea-rags/skills/bug-hunt/references/probes.md +69 -0
  290. package/harness/zcode/tea-rags/skills/bug-hunt/references/triage.md +56 -0
  291. package/harness/zcode/tea-rags/skills/data-driven-generation/SKILL.md +430 -0
  292. package/harness/zcode/tea-rags/skills/data-driven-generation/references/step-5-style.md +118 -0
  293. package/harness/zcode/tea-rags/skills/data-driven-generation/references/step-6-generate.md +66 -0
  294. package/harness/zcode/tea-rags/skills/data-driven-generation/references/step-7-verify.md +210 -0
  295. package/harness/zcode/tea-rags/skills/data-driven-generation/strategies/conservative.md +19 -0
  296. package/harness/zcode/tea-rags/skills/data-driven-generation/strategies/defensive.md +24 -0
  297. package/harness/zcode/tea-rags/skills/data-driven-generation/strategies/stabilization.md +21 -0
  298. package/harness/zcode/tea-rags/skills/data-driven-generation/strategies/standard.md +13 -0
  299. package/harness/zcode/tea-rags/skills/explore/SKILL.md +112 -0
  300. package/harness/zcode/tea-rags/skills/explore/references/architecture-pattern.md +63 -0
  301. package/harness/zcode/tea-rags/skills/explore/references/cycle-pattern.md +43 -0
  302. package/harness/zcode/tea-rags/skills/explore/references/entry-point-pattern.md +48 -0
  303. package/harness/zcode/tea-rags/skills/explore/references/exemplar-pattern.md +46 -0
  304. package/harness/zcode/tea-rags/skills/explore/references/explain-pattern.md +33 -0
  305. package/harness/zcode/tea-rags/skills/explore/references/explore-flow.md +89 -0
  306. package/harness/zcode/tea-rags/skills/explore/references/naming-pattern.md +15 -0
  307. package/harness/zcode/tea-rags/skills/explore/references/pre-gen-pattern.md +97 -0
  308. package/harness/zcode/tea-rags/skills/explore/references/trace-pattern.md +20 -0
  309. package/harness/zcode/tea-rags/skills/explore/references/usage-pattern.md +75 -0
  310. package/harness/zcode/tea-rags/skills/extract-project-patterns/SKILL.md +149 -0
  311. package/harness/zcode/tea-rags/skills/filter-building/SKILL.md +359 -0
  312. package/harness/zcode/tea-rags/skills/force-reindex/SKILL.md +76 -0
  313. package/harness/zcode/tea-rags/skills/index/SKILL.md +87 -0
  314. package/harness/zcode/tea-rags/skills/mr-review/SKILL.md +217 -0
  315. package/harness/zcode/tea-rags/skills/mr-review/references/delivery-contract.md +160 -0
  316. package/harness/zcode/tea-rags/skills/mr-review/references/dimension-playbook.md +237 -0
  317. package/harness/zcode/tea-rags/skills/pattern-search/SKILL.md +178 -0
  318. package/harness/zcode/tea-rags/skills/refactoring-planning/SKILL.md +193 -0
  319. package/harness/zcode/tea-rags/skills/refactoring-scan/SKILL.md +150 -0
  320. package/harness/zcode/tea-rags/skills/report-issue/SKILL.md +95 -0
  321. package/harness/zcode/tea-rags/skills/risk-assessment/SKILL.md +622 -0
  322. package/harness/zcode/tea-rags/skills/risk-assessment/references/anti-patterns.md +77 -0
  323. package/harness/zcode/tea-rags/skills/risk-assessment/references/classification-tiers.md +28 -0
  324. package/harness/zcode/tea-rags/skills/risk-assessment/references/enrich.md +213 -0
  325. package/harness/zcode/tea-rags/skills/test-first/SKILL.md +112 -0
  326. package/harness/zcode/tea-rags/skills/tests-as-context/SKILL.md +357 -0
  327. package/harness/zcode/tea-rags-setup/.zcode-plugin/plugin.json +9 -0
  328. package/harness/zcode/tea-rags-setup/icon.png +0 -0
  329. package/harness/zcode/tea-rags-setup/scripts/contextignore.mjs +107 -0
  330. package/harness/zcode/tea-rags-setup/scripts/detect.mjs +98 -0
  331. package/harness/zcode/tea-rags-setup/scripts/profile.mjs +110 -0
  332. package/harness/zcode/tea-rags-setup/skills/install/SKILL.md +216 -0
  333. package/harness/zcode/tea-rags-setup/skills/tune/SKILL.md +80 -0
  334. package/package.json +3 -1
@@ -0,0 +1,216 @@
1
+ ---
2
+ name: install
3
+ description: >-
4
+ One-step TeaRAGs install for Claude Code, Cursor, Codex and ZCode: detects
5
+ host, writes .contextignore.local, profiles languages, picks embedding model,
6
+ shows ONE plan, confirms once, then installs tea-rags, llama-server pool,
7
+ model, plugin + MCP server, registers and indexes the project. Triggers on
8
+ "install tea-rags", "set up TeaRAGs", "configure tea-rags from scratch",
9
+ "поставь tea-rags", "установи tea-rags в проект". NOT for re-tuning an
10
+ existing install — use tune.
11
+ ---
12
+
13
+ # TeaRAGs install — one plan, one confirmation
14
+
15
+ Same flow in every harness and OS. Order fixed: detect → ignore → profile → plan
16
+ → ONE confirmation → apply → verify. No question before the plan, none after the
17
+ confirmation.
18
+
19
+ ## Invariants — every answer, plan-only included
20
+
21
+ - Embedding provider = llama-server pool, ≥ 2 instances, loopback ports the CLI
22
+ picks (random 20000–29999). Never offer or configure Ollama.
23
+ - Model = `choose-model` result. Show its `rule` string verbatim; never derive
24
+ the model yourself.
25
+ - MCP server = `tea-rags server` (global binary, never `npx`), config WITHOUT
26
+ `env` — project registry holds embedding config.
27
+ - Git analytics on. No squash question.
28
+ - Indexing = FOREGROUND command, waited on. Never a detached/background shell
29
+ job.
30
+ - Commands below are shell-neutral unless a POSIX / PowerShell pair is given.
31
+
32
+ ## Paths
33
+
34
+ `<project>` = argument, else cwd (absolute). Helper scripts live in
35
+ `${CLAUDE_PLUGIN_ROOT}/scripts/`. Variable not expanded in your harness → use
36
+ the `scripts/` folder two levels above this SKILL.md
37
+ (`<this skill dir>/../../scripts`) in its place.
38
+
39
+ ## Step 0 — Node prerequisite
40
+
41
+ `node --version`. Missing or major < 22 → STOP before Step 1, print the install
42
+ line for the OS, ask user to re-run after a new terminal:
43
+
44
+ | OS | Command |
45
+ | --------------------- | ------------------------------------------------------------------------------------------------------ |
46
+ | macOS (Homebrew) | `brew install node@24` |
47
+ | Windows | `winget install OpenJS.NodeJS.LTS` |
48
+ | Linux (Debian/Ubuntu) | `curl -fsSL https://deb.nodesource.com/setup_24.x \| sudo -E bash - && sudo apt-get install -y nodejs` |
49
+ | other | installer from <https://nodejs.org> (v24) |
50
+
51
+ ## Step 1 — Detect
52
+
53
+ `node "${CLAUDE_PLUGIN_ROOT}/scripts/detect.mjs" "<project>"` → JSON:
54
+ `{ os, arch, ramGb, gpuBackend, node: { version, ok }, teaRags: { version } | null, harness, registered: { name } | null }`.
55
+ `node.ok` false → Step 0 table, STOP. `harness` decides the Step 5 row.
56
+
57
+ Latest published client: `npm view tea-rags version`.
58
+
59
+ ## Step 2 — Ignore (before any LOC count)
60
+
61
+ `node "${CLAUDE_PLUGIN_ROOT}/scripts/contextignore.mjs" "<project>"` →
62
+ `{ added, kept }`. Merges build outputs, vendored dirs, lockfiles, minified
63
+ assets into `<project>/.contextignore.local`; user lines never removed. Runs
64
+ before the profile so shares exclude generated code.
65
+
66
+ ## Step 3 — Profile
67
+
68
+ `node "${CLAUDE_PLUGIN_ROOT}/scripts/profile.mjs" "<project>"` →
69
+ `{ files, loc, languages: { <lang>: { files, loc, share } }, estimatedChunks }`.
70
+
71
+ Shares JSON = `{ "<lang>": <share>, … }` from `languages`.
72
+
73
+ ## Step 4 — Plan + ONE confirmation
74
+
75
+ Model — client installed:
76
+ `tea-rags llama-server choose-model --shares '<shares json>'`; client missing →
77
+ `npx -y tea-rags@latest llama-server choose-model --shares '<shares json>'`.
78
+ Windows PowerShell 5.1 strips inner quotes → escape them:
79
+ `--shares '{\"ruby\":0.06,\"typescript\":0.94}'` (PowerShell 7.3+ and POSIX
80
+ shells take the plain form). Output `{ model, rule, window, dimensions }`.
81
+
82
+ Alias = `registered.name` when present, else project folder name lowercased, non
83
+ `[a-z0-9_-]` → `-`, matching `^[a-z0-9][a-z0-9_-]{0,63}$`. Existing alias →
84
+ `tea-rags projects info --name <alias>`; `embeddingModel` set and ≠ `<model>` →
85
+ `Index:` line carries `--force` (Step 5.8).
86
+
87
+ Print this block, slots filled, then ask:
88
+
89
+ ```text
90
+ TeaRAGs install plan — <project>
91
+ Host: <os>/<arch>, <ramGb> GB RAM, GPU backend <gpuBackend>, harness <harness>
92
+ Client: tea-rags <installed version | not installed> → <latest> (npm i -g tea-rags@latest | up to date)
93
+ Project: <files> files, <loc> LOC, ~<estimatedChunks> chunks; top languages <lang share%, …>
94
+ Ignore: .contextignore.local +<added count> patterns
95
+ Model: <model> (<dimensions>d, window <window>) — <rule>
96
+ Embeddings: llama-server pool, instances by bench (≥ 2), loopback ports 20000–29999
97
+ Rust: rustc driver install | not needed (no Rust)
98
+ Register: alias <alias> (<new | existing — env updated>), git analytics on
99
+ Plugin+MCP: <harness>: tea-rags plugin pinned v<latest> + MCP `tea-rags server`, no env
100
+ Index: EMBEDDING_MODEL=<model> tea-rags index-codebase --project <alias> [--force if model changed] --wait-enrichments --json (foreground)
101
+ Thresholds: Ruby ≥ 5% or Swift ≥ 5% → CodeRankEmbed; Muninn languages ≥ 80% → Muninn-small; else jina
102
+ ```
103
+
104
+ ONE ask the user (no such tool → ask the user), options: `Install` /
105
+ `Change model` / `Cancel`.
106
+
107
+ - `Install` → Step 5, no further question.
108
+ - `Change model` → one pick among `nomic-ai/CodeRankEmbed`,
109
+ `jinaai/jina-embeddings-v2-base-code`, `brokkai/Muninn-small`; the pick IS the
110
+ confirmation → Step 5 with that model.
111
+ - `Cancel` → stop; `.contextignore.local` stays (harmless, user-editable).
112
+
113
+ ## Step 5 — Apply, in order, stop on first failure
114
+
115
+ Each command foreground, waited on (long ones: timeout ≥ 10 min).
116
+
117
+ 1. Client missing or older than latest → `npm i -g tea-rags@latest`; then
118
+ `tea-rags --version` = `<ver>`. Say once: "Client auto-update is ON (runs
119
+ from `tea-rags prime`); turn off: `tea-rags update --auto off`."
120
+ 2. `tea-rags llama-server install`
121
+ 3. `tea-rags llama-server fetch-model <model>`
122
+ 4. `tea-rags llama-server start --model <model> --instances auto` → JSON
123
+ `{ model, endpoints, instances, bench }`. `<endpoints>` = `endpoints` joined
124
+ with `,`.
125
+ 5. Rust in profile → `tea-rags rustc-driver install`, then
126
+ `tea-rags rustc-driver status`.
127
+ 6. Register (registry = env source of truth):
128
+ - new:
129
+ `tea-rags projects register --path "<project>" --name <alias> --env EMBEDDING_PROVIDER=llama-server --env "EMBEDDING_BASE_URL=<endpoints>" --env TRAJECTORY_GIT_ENABLED=true`
130
+ - existing alias:
131
+ `tea-rags projects set-env --name <alias> EMBEDDING_PROVIDER=llama-server "EMBEDDING_BASE_URL=<endpoints>" TRAJECTORY_GIT_ENABLED=true`
132
+
133
+ Never `EMBEDDING_MODEL` in register / set-env: CLI rejects it (index run
134
+ alone records the model). Step 8 exports it.
135
+
136
+ 7. Plugin + MCP, block for `harness` (pin = `v<ver>`, never a branch):
137
+ - Claude Code — three commands, in order:
138
+ `claude plugin marketplace add https://github.com/artk0de/TeaRAGs-MCP.git#v<ver>`
139
+ → `claude plugin install tea-rags@tea-rags --scope user` →
140
+ `claude mcp add --scope user tea-rags -- tea-rags server`.
141
+ - Codex — plugin ships the MCP server:
142
+ `codex plugin marketplace add artk0de/TeaRAGs-MCP --ref v<ver> --sparse .agents --sparse harness/codex`
143
+ → `codex plugin add tea-rags@tea-rags`.
144
+ - Cursor — no marketplace CLI; plugin ships the MCP server. Copy
145
+ `<npm root -g>/tea-rags/harness/cursor/tea-rags` into
146
+ `~/.cursor/plugins/local/`. POSIX:
147
+ `cp -R "$(npm root -g)/tea-rags/harness/cursor/tea-rags" ~/.cursor/plugins/local/`
148
+ · PowerShell:
149
+ `Copy-Item -Recurse "$(npm root -g)\tea-rags\harness\cursor\tea-rags" "$HOME\.cursor\plugins\local\"`.
150
+ - ZCode — plugin ships the MCP server (auto-connects with the plugin; no
151
+ separate MCP add). The package's own directory is the release-pinned
152
+ marketplace — the channel `tea-rags update` refreshes:
153
+ `zcode plugins marketplace add "$(npm root -g)/tea-rags/harness/zcode"` →
154
+ `zcode plugins install tea-rags@tea-rags`. ZCode CLI not on PATH → run the
155
+ bundled one: `/Applications/ZCode.app/Contents/Resources/glm/zcode.cjs`
156
+ (macOS).
157
+
158
+ Marketplace already added at another ref → `tea-rags update` re-pins it to
159
+ `v<ver>` instead of the add. Never add an `env` block to any MCP config;
160
+ project-level MCP entry for tea-rags (`<project>/.mcp.json`,
161
+ `.cursor/mcp.json`, `<project>/.zcode/config.json`) → report it as duplicate,
162
+ never write one.
163
+
164
+ 8. Index, model exported for this run — registry records it, later runs,
165
+ `tea-rags server`, `tea-rags call` and auto-update replay it unexported.
166
+ POSIX:
167
+ `EMBEDDING_MODEL=<model> tea-rags index-codebase --project <alias> --wait-enrichments --json`
168
+ · PowerShell:
169
+ `$env:EMBEDDING_MODEL="<model>"; tea-rags index-codebase --project <alias> --wait-enrichments --json`.
170
+ Foreground, timeout ≥ 60 min on large repos. Read `outcome.measured`, then
171
+ `outcome.failed` / `outcome.degraded`.
172
+
173
+ Existing alias, index built with another model
174
+ (`tea-rags projects info --name <alias>` → `embeddingModel` ≠ `<model>`):
175
+ plain run stops with `Embedding model mismatch` (model guard). Add `--force`
176
+ to the same command — full re-embed into a new collection, alias swaps at the
177
+ end, search stays up. Step 4 put it on the `Index:` line; the one
178
+ confirmation covers it.
179
+
180
+ ## Step 6 — Verify
181
+
182
+ MCP server live in this session (after harness reload) →
183
+ `get_index_status(project: "<alias>")`, then one
184
+ `semantic_search(project: "<alias>", path: "<project>", query: "<main entry point concept of the top language>", limit: 3)`.
185
+ Not live yet → same calls via CLI:
186
+ `tea-rags call get_index_status '{"project":"<alias>"}'`.
187
+
188
+ Report, slots filled:
189
+
190
+ ```text
191
+ TeaRAGs installed — <alias>
192
+ Model: <model> on <instances> llama-server instances (<endpoints>)
193
+ Index: <chunks> chunks, status <status>, enrichment <measured: ok | failed: … | degraded: …>
194
+ Search: <top hit relativePath> — <ok | no hits>
195
+ Next: restart / reload <harness> so the plugin hooks and MCP server load
196
+ Auto-update: on (`tea-rags update --auto off` to disable)
197
+ ```
198
+
199
+ ## Errors
200
+
201
+ - Command fails → show stderr, stop, fix cause, re-run from the failed command;
202
+ completed commands need no repeat.
203
+ - Network / proxy (ECONNREFUSED, timeout, SSL) → ask about proxy; set
204
+ `HTTPS_PROXY` (POSIX `export HTTPS_PROXY=http://host:port`, PowerShell
205
+ `$env:HTTPS_PROXY="http://host:port"`), re-run.
206
+ - EACCES on `npm i -g` → fix npm prefix ownership or use a Node version manager;
207
+ never `sudo npm`.
208
+ - `command not found` after install → new terminal (PATH refresh), re-run.
209
+
210
+ ## Do NOT
211
+
212
+ - Ask anything before the plan or after the confirmation.
213
+ - Offer Ollama, ONNX, or a remote GPU host.
214
+ - Re-derive the model or edit the `rule` string.
215
+ - Pass `env` in an MCP config or write a project-level MCP duplicate.
216
+ - Run indexing detached (`&`, `nohup`, `Start-Process`, background job).
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: tune
3
+ description: >-
4
+ Re-tune an existing TeaRAGs install: re-bench the llama-server pool (instance
5
+ count, -np slots) and restart it, or run the pipeline/Qdrant benchmark for a
6
+ user-chosen Ollama/ONNX provider; writes results into the project registry.
7
+ Triggers on "indexing is slow", "tune performance", "benchmark my hardware",
8
+ "tune llama-server slots", "поднастрой производительность". NOT for first-time
9
+ install — use install.
10
+ ---
11
+
12
+ # TeaRAGs re-tune
13
+
14
+ Existing install only. Install flow never calls this skill. Registry = env
15
+ source of truth: results go through `tea-rags projects set-env`, never into an
16
+ MCP config `env` block.
17
+
18
+ ## 0. Inputs
19
+
20
+ - `<alias>` = argument, else `tea-rags projects list` row whose path = cwd.
21
+ - `tea-rags projects info --name <alias>` → `EMBEDDING_PROVIDER`,
22
+ `EMBEDDING_MODEL`, `EMBEDDING_BASE_URL`.
23
+ - `tea-rags llama-server status` → managed pools, instance liveness.
24
+
25
+ Provider `llama-server` → section A. `ollama` / `onnx` (user switched
26
+ themselves) → section B. Every command foreground, waited on (timeout ≥ 10 min).
27
+
28
+ ## A. llama-server pool
29
+
30
+ Client batch size + concurrency = runtime tuner (hill-climb, persisted per
31
+ endpoint). Never write `EMBEDDING_BATCH_SIZE` / `EMBEDDING_CONCURRENCY` /
32
+ `EMBEDDING_TUNE_MIN_BATCH_SIZE` — a pin caps the climb.
33
+
34
+ 1. Instance count, default slots: `tea-rags llama-server bench --model <model>`
35
+ → texts/s per count + the count `--instances auto` picks.
36
+ 2. Slots (`-np`), only on "tune slots" / `--slots`: repeat bench with
37
+ `--slots 2`, `4`, `8`; stop when gain < 5% vs previous or launch fails / OOM;
38
+ keep previous value. Typical optimum = 4 (default).
39
+ 3. Restart pool with winners: `tea-rags llama-server stop --model <model>` →
40
+ `tea-rags llama-server start --model <model> --instances <best count> [--slots <best>]`
41
+ → `{ model, endpoints, instances, bench }`.
42
+ 4. Ports are random each start → always
43
+ `tea-rags projects set-env --name <alias> "EMBEDDING_BASE_URL=<endpoints joined with ,>"`.
44
+
45
+ Context invariant: `-c = slots × window`, `-b = -ub = window`, window from model
46
+ catalog. CLI derives them; never hand-edit. Window change = chunk size change =
47
+ `--force` reindex.
48
+
49
+ Summary, slots filled:
50
+
51
+ ```text
52
+ Pool re-tuned — <alias>
53
+ Bench: <count>: <texts/s>, … → <best count> instances
54
+ Slots: <best> (-np)
55
+ Endpoints: <endpoints>
56
+ Registry: EMBEDDING_BASE_URL updated
57
+ ```
58
+
59
+ ## B. Ollama / ONNX (user-chosen provider)
60
+
61
+ `tea-rags tune --project <alias> --provider <ollama|onnx> [--full]` — quick ~2–3
62
+ min, full ~10–15 min. Omit `--qdrant-url`: tune probes `http://localhost:6333`,
63
+ else spawns the embedded daemon on its own port.
64
+
65
+ Reads `tuned_environment_variables.env` (project root or cwd) → write every
66
+ `KEY=VALUE` with `tea-rags projects set-env --name <alias> KEY=VALUE …` → delete
67
+ the file. Report embedding / storage / deletion rates from its comment lines.
68
+
69
+ ## Errors
70
+
71
+ - `tea-rags` missing → run the install skill.
72
+ - Pool instance dead in `status` → `stop` + `start` (step A3), then set-env.
73
+ - Qdrant unreachable with `--qdrant-url` passed → re-run without it.
74
+ - Tune timeout (> 10 min quick, > 20 min full) → stop it, keep current values.
75
+
76
+ ## Do NOT
77
+
78
+ - Offer switching to Ollama; section B only serves a provider already chosen.
79
+ - Pass `llama-server` to `tea-rags tune` (accepts only `ollama|onnx`).
80
+ - Write an `env` block into any MCP config.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tea-rags",
3
- "version": "1.51.2",
3
+ "version": "1.52.0",
4
4
  "description": "MCP server for semantic search using local Qdrant and Ollama (default) with support for OpenAI, Cohere, and Voyage AI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -26,6 +26,7 @@
26
26
  "gen:agent-context": "tsx scripts/gen-agent-context.ts",
27
27
  "gen:plugins": "tsx scripts/gen-plugins.ts",
28
28
  "gen:harness-claude": "tsx scripts/gen-harness-claude.ts",
29
+ "gen:harness-zcode": "tsx scripts/gen-harness-zcode.ts",
29
30
  "gen:migration-sql": "tsx scripts/gen-migration-sql.ts",
30
31
  "pin:lang-versions": "tsx scripts/pin-language-versions.ts",
31
32
  "postinstall": "node scripts/postinstall.js",
@@ -62,6 +63,7 @@
62
63
  "build/",
63
64
  "benchmarks/",
64
65
  "harness/cursor/",
66
+ "harness/zcode/",
65
67
  "scripts/postinstall.js",
66
68
  "scripts/install-fish-completion.js",
67
69
  "prompts.json",