forge-server 0.1.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 (412) hide show
  1. package/.claude/hooks/worktree-create.sh +64 -0
  2. package/.claude/hooks/worktree-remove.sh +57 -0
  3. package/.claude/settings.local.json +29 -0
  4. package/.forge/knowledge/conventions.yaml +1 -0
  5. package/.forge/knowledge/decisions.yaml +1 -0
  6. package/.forge/knowledge/gotchas.yaml +1 -0
  7. package/.forge/knowledge/patterns.yaml +1 -0
  8. package/.forge/manifest.yaml +6 -0
  9. package/CLAUDE.md +144 -0
  10. package/bin/setup-forge.sh +132 -0
  11. package/dist/cli.d.ts +3 -0
  12. package/dist/cli.d.ts.map +1 -0
  13. package/dist/cli.js +553 -0
  14. package/dist/cli.js.map +1 -0
  15. package/dist/context/codebase.d.ts +57 -0
  16. package/dist/context/codebase.d.ts.map +1 -0
  17. package/dist/context/codebase.js +301 -0
  18. package/dist/context/codebase.js.map +1 -0
  19. package/dist/context/injector.d.ts +147 -0
  20. package/dist/context/injector.d.ts.map +1 -0
  21. package/dist/context/injector.js +533 -0
  22. package/dist/context/injector.js.map +1 -0
  23. package/dist/context/memory.d.ts +32 -0
  24. package/dist/context/memory.d.ts.map +1 -0
  25. package/dist/context/memory.js +140 -0
  26. package/dist/context/memory.js.map +1 -0
  27. package/dist/context/session-index.d.ts +54 -0
  28. package/dist/context/session-index.d.ts.map +1 -0
  29. package/dist/context/session-index.js +265 -0
  30. package/dist/context/session-index.js.map +1 -0
  31. package/dist/context/session.d.ts +42 -0
  32. package/dist/context/session.d.ts.map +1 -0
  33. package/dist/context/session.js +121 -0
  34. package/dist/context/session.js.map +1 -0
  35. package/dist/index.d.ts +3 -0
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +37 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/ingestion/chunker.d.ts +19 -0
  40. package/dist/ingestion/chunker.d.ts.map +1 -0
  41. package/dist/ingestion/chunker.js +189 -0
  42. package/dist/ingestion/chunker.js.map +1 -0
  43. package/dist/ingestion/embedder.d.ts +45 -0
  44. package/dist/ingestion/embedder.d.ts.map +1 -0
  45. package/dist/ingestion/embedder.js +152 -0
  46. package/dist/ingestion/embedder.js.map +1 -0
  47. package/dist/ingestion/git-analyzer.d.ts +77 -0
  48. package/dist/ingestion/git-analyzer.d.ts.map +1 -0
  49. package/dist/ingestion/git-analyzer.js +437 -0
  50. package/dist/ingestion/git-analyzer.js.map +1 -0
  51. package/dist/ingestion/indexer.d.ts +79 -0
  52. package/dist/ingestion/indexer.d.ts.map +1 -0
  53. package/dist/ingestion/indexer.js +766 -0
  54. package/dist/ingestion/indexer.js.map +1 -0
  55. package/dist/ingestion/markdown-chunker.d.ts +19 -0
  56. package/dist/ingestion/markdown-chunker.d.ts.map +1 -0
  57. package/dist/ingestion/markdown-chunker.js +243 -0
  58. package/dist/ingestion/markdown-chunker.js.map +1 -0
  59. package/dist/ingestion/markdown-knowledge.d.ts +21 -0
  60. package/dist/ingestion/markdown-knowledge.d.ts.map +1 -0
  61. package/dist/ingestion/markdown-knowledge.js +129 -0
  62. package/dist/ingestion/markdown-knowledge.js.map +1 -0
  63. package/dist/ingestion/parser.d.ts +20 -0
  64. package/dist/ingestion/parser.d.ts.map +1 -0
  65. package/dist/ingestion/parser.js +429 -0
  66. package/dist/ingestion/parser.js.map +1 -0
  67. package/dist/ingestion/watcher.d.ts +28 -0
  68. package/dist/ingestion/watcher.d.ts.map +1 -0
  69. package/dist/ingestion/watcher.js +147 -0
  70. package/dist/ingestion/watcher.js.map +1 -0
  71. package/dist/knowledge/hydrator.d.ts +37 -0
  72. package/dist/knowledge/hydrator.d.ts.map +1 -0
  73. package/dist/knowledge/hydrator.js +220 -0
  74. package/dist/knowledge/hydrator.js.map +1 -0
  75. package/dist/knowledge/registry.d.ts +129 -0
  76. package/dist/knowledge/registry.d.ts.map +1 -0
  77. package/dist/knowledge/registry.js +361 -0
  78. package/dist/knowledge/registry.js.map +1 -0
  79. package/dist/knowledge/search.d.ts +114 -0
  80. package/dist/knowledge/search.d.ts.map +1 -0
  81. package/dist/knowledge/search.js +428 -0
  82. package/dist/knowledge/search.js.map +1 -0
  83. package/dist/knowledge/store.d.ts +76 -0
  84. package/dist/knowledge/store.d.ts.map +1 -0
  85. package/dist/knowledge/store.js +230 -0
  86. package/dist/knowledge/store.js.map +1 -0
  87. package/dist/learning/confidence.d.ts +30 -0
  88. package/dist/learning/confidence.d.ts.map +1 -0
  89. package/dist/learning/confidence.js +165 -0
  90. package/dist/learning/confidence.js.map +1 -0
  91. package/dist/learning/patterns.d.ts +52 -0
  92. package/dist/learning/patterns.d.ts.map +1 -0
  93. package/dist/learning/patterns.js +290 -0
  94. package/dist/learning/patterns.js.map +1 -0
  95. package/dist/learning/trajectory.d.ts +55 -0
  96. package/dist/learning/trajectory.d.ts.map +1 -0
  97. package/dist/learning/trajectory.js +200 -0
  98. package/dist/learning/trajectory.js.map +1 -0
  99. package/dist/memory/memory-compat.d.ts +100 -0
  100. package/dist/memory/memory-compat.d.ts.map +1 -0
  101. package/dist/memory/memory-compat.js +146 -0
  102. package/dist/memory/memory-compat.js.map +1 -0
  103. package/dist/memory/observation-store.d.ts +57 -0
  104. package/dist/memory/observation-store.d.ts.map +1 -0
  105. package/dist/memory/observation-store.js +154 -0
  106. package/dist/memory/observation-store.js.map +1 -0
  107. package/dist/memory/session-tracker.d.ts +81 -0
  108. package/dist/memory/session-tracker.d.ts.map +1 -0
  109. package/dist/memory/session-tracker.js +262 -0
  110. package/dist/memory/session-tracker.js.map +1 -0
  111. package/dist/pipeline/engine.d.ts +179 -0
  112. package/dist/pipeline/engine.d.ts.map +1 -0
  113. package/dist/pipeline/engine.js +691 -0
  114. package/dist/pipeline/engine.js.map +1 -0
  115. package/dist/pipeline/events.d.ts +54 -0
  116. package/dist/pipeline/events.d.ts.map +1 -0
  117. package/dist/pipeline/events.js +157 -0
  118. package/dist/pipeline/events.js.map +1 -0
  119. package/dist/pipeline/parallel.d.ts +83 -0
  120. package/dist/pipeline/parallel.d.ts.map +1 -0
  121. package/dist/pipeline/parallel.js +277 -0
  122. package/dist/pipeline/parallel.js.map +1 -0
  123. package/dist/pipeline/state-machine.d.ts +65 -0
  124. package/dist/pipeline/state-machine.d.ts.map +1 -0
  125. package/dist/pipeline/state-machine.js +176 -0
  126. package/dist/pipeline/state-machine.js.map +1 -0
  127. package/dist/query/graph-queries.d.ts +84 -0
  128. package/dist/query/graph-queries.d.ts.map +1 -0
  129. package/dist/query/graph-queries.js +216 -0
  130. package/dist/query/graph-queries.js.map +1 -0
  131. package/dist/query/hybrid-search.d.ts +34 -0
  132. package/dist/query/hybrid-search.d.ts.map +1 -0
  133. package/dist/query/hybrid-search.js +263 -0
  134. package/dist/query/hybrid-search.js.map +1 -0
  135. package/dist/query/intent-detector.d.ts +35 -0
  136. package/dist/query/intent-detector.d.ts.map +1 -0
  137. package/dist/query/intent-detector.js +115 -0
  138. package/dist/query/intent-detector.js.map +1 -0
  139. package/dist/query/ranking.d.ts +57 -0
  140. package/dist/query/ranking.d.ts.map +1 -0
  141. package/dist/query/ranking.js +109 -0
  142. package/dist/query/ranking.js.map +1 -0
  143. package/dist/server.d.ts +3 -0
  144. package/dist/server.d.ts.map +1 -0
  145. package/dist/server.js +291 -0
  146. package/dist/server.js.map +1 -0
  147. package/dist/storage/falkordb-store.d.ts +73 -0
  148. package/dist/storage/falkordb-store.d.ts.map +1 -0
  149. package/dist/storage/falkordb-store.js +346 -0
  150. package/dist/storage/falkordb-store.js.map +1 -0
  151. package/dist/storage/file-cache.d.ts +32 -0
  152. package/dist/storage/file-cache.d.ts.map +1 -0
  153. package/dist/storage/file-cache.js +115 -0
  154. package/dist/storage/file-cache.js.map +1 -0
  155. package/dist/storage/interfaces.d.ts +151 -0
  156. package/dist/storage/interfaces.d.ts.map +1 -0
  157. package/dist/storage/interfaces.js +7 -0
  158. package/dist/storage/interfaces.js.map +1 -0
  159. package/dist/storage/qdrant-store.d.ts +110 -0
  160. package/dist/storage/qdrant-store.d.ts.map +1 -0
  161. package/dist/storage/qdrant-store.js +467 -0
  162. package/dist/storage/qdrant-store.js.map +1 -0
  163. package/dist/storage/schema.d.ts +4 -0
  164. package/dist/storage/schema.d.ts.map +1 -0
  165. package/dist/storage/schema.js +136 -0
  166. package/dist/storage/schema.js.map +1 -0
  167. package/dist/storage/sqlite.d.ts +35 -0
  168. package/dist/storage/sqlite.d.ts.map +1 -0
  169. package/dist/storage/sqlite.js +132 -0
  170. package/dist/storage/sqlite.js.map +1 -0
  171. package/dist/tools/collaboration-tools.d.ts +111 -0
  172. package/dist/tools/collaboration-tools.d.ts.map +1 -0
  173. package/dist/tools/collaboration-tools.js +174 -0
  174. package/dist/tools/collaboration-tools.js.map +1 -0
  175. package/dist/tools/context-tools.d.ts +293 -0
  176. package/dist/tools/context-tools.d.ts.map +1 -0
  177. package/dist/tools/context-tools.js +437 -0
  178. package/dist/tools/context-tools.js.map +1 -0
  179. package/dist/tools/graph-tools.d.ts +129 -0
  180. package/dist/tools/graph-tools.d.ts.map +1 -0
  181. package/dist/tools/graph-tools.js +237 -0
  182. package/dist/tools/graph-tools.js.map +1 -0
  183. package/dist/tools/ingestion-tools.d.ts +96 -0
  184. package/dist/tools/ingestion-tools.d.ts.map +1 -0
  185. package/dist/tools/ingestion-tools.js +90 -0
  186. package/dist/tools/ingestion-tools.js.map +1 -0
  187. package/dist/tools/learning-tools.d.ts +168 -0
  188. package/dist/tools/learning-tools.d.ts.map +1 -0
  189. package/dist/tools/learning-tools.js +158 -0
  190. package/dist/tools/learning-tools.js.map +1 -0
  191. package/dist/tools/memory-tools.d.ts +183 -0
  192. package/dist/tools/memory-tools.d.ts.map +1 -0
  193. package/dist/tools/memory-tools.js +197 -0
  194. package/dist/tools/memory-tools.js.map +1 -0
  195. package/dist/tools/phase-tools.d.ts +954 -0
  196. package/dist/tools/phase-tools.d.ts.map +1 -0
  197. package/dist/tools/phase-tools.js +1215 -0
  198. package/dist/tools/phase-tools.js.map +1 -0
  199. package/dist/tools/pipeline-tools.d.ts +140 -0
  200. package/dist/tools/pipeline-tools.d.ts.map +1 -0
  201. package/dist/tools/pipeline-tools.js +162 -0
  202. package/dist/tools/pipeline-tools.js.map +1 -0
  203. package/dist/tools/registration-tools.d.ts +220 -0
  204. package/dist/tools/registration-tools.d.ts.map +1 -0
  205. package/dist/tools/registration-tools.js +391 -0
  206. package/dist/tools/registration-tools.js.map +1 -0
  207. package/dist/util/circuit-breaker.d.ts +75 -0
  208. package/dist/util/circuit-breaker.d.ts.map +1 -0
  209. package/dist/util/circuit-breaker.js +159 -0
  210. package/dist/util/circuit-breaker.js.map +1 -0
  211. package/dist/util/config.d.ts +23 -0
  212. package/dist/util/config.d.ts.map +1 -0
  213. package/dist/util/config.js +164 -0
  214. package/dist/util/config.js.map +1 -0
  215. package/dist/util/logger.d.ts +13 -0
  216. package/dist/util/logger.d.ts.map +1 -0
  217. package/dist/util/logger.js +45 -0
  218. package/dist/util/logger.js.map +1 -0
  219. package/dist/util/token-counter.d.ts +24 -0
  220. package/dist/util/token-counter.d.ts.map +1 -0
  221. package/dist/util/token-counter.js +48 -0
  222. package/dist/util/token-counter.js.map +1 -0
  223. package/dist/util/types.d.ts +525 -0
  224. package/dist/util/types.d.ts.map +1 -0
  225. package/dist/util/types.js +5 -0
  226. package/dist/util/types.js.map +1 -0
  227. package/docker-compose.yml +20 -0
  228. package/docs/plans/2026-02-27-swarm-coordination/architecture.md +203 -0
  229. package/docs/plans/2026-02-27-swarm-coordination/vision.md +57 -0
  230. package/docs/plans/completed/2026-02-26-forge-plugin-bundling/architecture.md +1 -0
  231. package/docs/plans/completed/2026-02-26-forge-plugin-bundling/vision.md +300 -0
  232. package/docs/plans/completed/2026-02-27-forge-swarm-learning/architecture.md +480 -0
  233. package/docs/plans/completed/2026-02-27-forge-swarm-learning/verification-checklist.md +462 -0
  234. package/docs/plans/completed/2026-02-27-git-history-atlassian/git-jira-plan.md +181 -0
  235. package/package.json +39 -0
  236. package/plugin/.claude-plugin/plugin.json +8 -0
  237. package/plugin/.mcp.json +15 -0
  238. package/plugin/README.md +134 -0
  239. package/plugin/agents/architect.md +367 -0
  240. package/plugin/agents/backend-specialist.md +263 -0
  241. package/plugin/agents/brainstormer.md +122 -0
  242. package/plugin/agents/data-specialist.md +266 -0
  243. package/plugin/agents/designer.md +408 -0
  244. package/plugin/agents/frontend-specialist.md +241 -0
  245. package/plugin/agents/inspector.md +406 -0
  246. package/plugin/agents/knowledge-keeper.md +443 -0
  247. package/plugin/agents/platform-engineer.md +326 -0
  248. package/plugin/agents/product-manager.md +268 -0
  249. package/plugin/agents/product-owner.md +438 -0
  250. package/plugin/agents/pulse-checker.md +73 -0
  251. package/plugin/agents/qa-strategist.md +500 -0
  252. package/plugin/agents/self-improver.md +310 -0
  253. package/plugin/agents/strategist.md +360 -0
  254. package/plugin/agents/supervisor.md +380 -0
  255. package/plugin/commands/brainstorm.md +25 -0
  256. package/plugin/commands/forge.md +88 -0
  257. package/plugin/docs/atlassian-integration.md +110 -0
  258. package/plugin/docs/workflow.md +126 -0
  259. package/plugin/skills/agent-development/.skillfish.json +10 -0
  260. package/plugin/skills/agent-development/SKILL.md +415 -0
  261. package/plugin/skills/agent-development/examples/agent-creation-prompt.md +238 -0
  262. package/plugin/skills/agent-development/examples/complete-agent-examples.md +427 -0
  263. package/plugin/skills/agent-development/references/agent-creation-system-prompt.md +207 -0
  264. package/plugin/skills/agent-development/references/system-prompt-design.md +411 -0
  265. package/plugin/skills/agent-development/references/triggering-examples.md +491 -0
  266. package/plugin/skills/agent-development/scripts/validate-agent.sh +217 -0
  267. package/plugin/skills/agent-handoff/SKILL.md +335 -0
  268. package/plugin/skills/anti-stub/SKILL.md +317 -0
  269. package/plugin/skills/brainstorm/SKILL.md +31 -0
  270. package/plugin/skills/debugging/SKILL.md +276 -0
  271. package/plugin/skills/fix/SKILL.md +62 -0
  272. package/plugin/skills/frontend-design/.skillfish.json +10 -0
  273. package/plugin/skills/frontend-design/SKILL.md +42 -0
  274. package/plugin/skills/gotchas/SKILL.md +61 -0
  275. package/plugin/skills/graph-orchestrator/SKILL.md +38 -0
  276. package/plugin/skills/history/SKILL.md +58 -0
  277. package/plugin/skills/impact/SKILL.md +59 -0
  278. package/plugin/skills/implementation-execution/SKILL.md +291 -0
  279. package/plugin/skills/index-repo/SKILL.md +55 -0
  280. package/plugin/skills/interviewing/SKILL.md +225 -0
  281. package/plugin/skills/knowledge-curation/SKILL.md +393 -0
  282. package/plugin/skills/learn/SKILL.md +69 -0
  283. package/plugin/skills/mcp-integration/.skillfish.json +10 -0
  284. package/plugin/skills/mcp-integration/SKILL.md +554 -0
  285. package/plugin/skills/mcp-integration/examples/http-server.json +20 -0
  286. package/plugin/skills/mcp-integration/examples/sse-server.json +19 -0
  287. package/plugin/skills/mcp-integration/examples/stdio-server.json +26 -0
  288. package/plugin/skills/mcp-integration/references/authentication.md +549 -0
  289. package/plugin/skills/mcp-integration/references/server-types.md +536 -0
  290. package/plugin/skills/mcp-integration/references/tool-usage.md +538 -0
  291. package/plugin/skills/nestjs/.skillfish.json +10 -0
  292. package/plugin/skills/nestjs/SKILL.md +669 -0
  293. package/plugin/skills/nestjs/drizzle-reference.md +1894 -0
  294. package/plugin/skills/nestjs/reference.md +1447 -0
  295. package/plugin/skills/nestjs/workflow-optimization.md +229 -0
  296. package/plugin/skills/parallel-dispatch/SKILL.md +308 -0
  297. package/plugin/skills/project-discovery/SKILL.md +304 -0
  298. package/plugin/skills/search/SKILL.md +56 -0
  299. package/plugin/skills/security-audit/SKILL.md +362 -0
  300. package/plugin/skills/skill-development/.skillfish.json +10 -0
  301. package/plugin/skills/skill-development/SKILL.md +637 -0
  302. package/plugin/skills/skill-development/references/skill-creator-original.md +209 -0
  303. package/plugin/skills/tdd/SKILL.md +273 -0
  304. package/plugin/skills/terminal-presentation/SKILL.md +395 -0
  305. package/plugin/skills/test-strategy/SKILL.md +365 -0
  306. package/plugin/skills/verification-protocol/SKILL.md +256 -0
  307. package/plugin/skills/visual-explainer/CHANGELOG.md +97 -0
  308. package/plugin/skills/visual-explainer/LICENSE +21 -0
  309. package/plugin/skills/visual-explainer/README.md +137 -0
  310. package/plugin/skills/visual-explainer/SKILL.md +352 -0
  311. package/plugin/skills/visual-explainer/banner.png +0 -0
  312. package/plugin/skills/visual-explainer/package.json +11 -0
  313. package/plugin/skills/visual-explainer/prompts/diff-review.md +68 -0
  314. package/plugin/skills/visual-explainer/prompts/fact-check.md +63 -0
  315. package/plugin/skills/visual-explainer/prompts/generate-slides.md +18 -0
  316. package/plugin/skills/visual-explainer/prompts/generate-web-diagram.md +10 -0
  317. package/plugin/skills/visual-explainer/prompts/plan-review.md +86 -0
  318. package/plugin/skills/visual-explainer/prompts/project-recap.md +61 -0
  319. package/plugin/skills/visual-explainer/references/css-patterns.md +1188 -0
  320. package/plugin/skills/visual-explainer/references/libraries.md +470 -0
  321. package/plugin/skills/visual-explainer/references/responsive-nav.md +212 -0
  322. package/plugin/skills/visual-explainer/references/slide-patterns.md +1403 -0
  323. package/plugin/skills/visual-explainer/templates/architecture.html +596 -0
  324. package/plugin/skills/visual-explainer/templates/data-table.html +540 -0
  325. package/plugin/skills/visual-explainer/templates/mermaid-flowchart.html +435 -0
  326. package/plugin/skills/visual-explainer/templates/slide-deck.html +913 -0
  327. package/src/cli.ts +655 -0
  328. package/src/context/.gitkeep +0 -0
  329. package/src/context/codebase.ts +393 -0
  330. package/src/context/injector.ts +797 -0
  331. package/src/context/memory.ts +187 -0
  332. package/src/context/session-index.ts +327 -0
  333. package/src/context/session.ts +152 -0
  334. package/src/index.ts +47 -0
  335. package/src/ingestion/.gitkeep +0 -0
  336. package/src/ingestion/chunker.ts +277 -0
  337. package/src/ingestion/embedder.ts +167 -0
  338. package/src/ingestion/git-analyzer.ts +545 -0
  339. package/src/ingestion/indexer.ts +984 -0
  340. package/src/ingestion/markdown-chunker.ts +337 -0
  341. package/src/ingestion/markdown-knowledge.ts +175 -0
  342. package/src/ingestion/parser.ts +475 -0
  343. package/src/ingestion/watcher.ts +182 -0
  344. package/src/knowledge/.gitkeep +0 -0
  345. package/src/knowledge/hydrator.ts +246 -0
  346. package/src/knowledge/registry.ts +463 -0
  347. package/src/knowledge/search.ts +565 -0
  348. package/src/knowledge/store.ts +262 -0
  349. package/src/learning/.gitkeep +0 -0
  350. package/src/learning/confidence.ts +193 -0
  351. package/src/learning/patterns.ts +360 -0
  352. package/src/learning/trajectory.ts +268 -0
  353. package/src/memory/.gitkeep +0 -0
  354. package/src/memory/memory-compat.ts +233 -0
  355. package/src/memory/observation-store.ts +224 -0
  356. package/src/memory/session-tracker.ts +332 -0
  357. package/src/pipeline/.gitkeep +0 -0
  358. package/src/pipeline/engine.ts +1139 -0
  359. package/src/pipeline/events.ts +253 -0
  360. package/src/pipeline/parallel.ts +394 -0
  361. package/src/pipeline/state-machine.ts +199 -0
  362. package/src/query/.gitkeep +0 -0
  363. package/src/query/graph-queries.ts +262 -0
  364. package/src/query/hybrid-search.ts +337 -0
  365. package/src/query/intent-detector.ts +131 -0
  366. package/src/query/ranking.ts +161 -0
  367. package/src/server.ts +352 -0
  368. package/src/storage/.gitkeep +0 -0
  369. package/src/storage/falkordb-store.ts +388 -0
  370. package/src/storage/file-cache.ts +141 -0
  371. package/src/storage/interfaces.ts +201 -0
  372. package/src/storage/qdrant-store.ts +557 -0
  373. package/src/storage/schema.ts +139 -0
  374. package/src/storage/sqlite.ts +168 -0
  375. package/src/tools/.gitkeep +0 -0
  376. package/src/tools/collaboration-tools.ts +208 -0
  377. package/src/tools/context-tools.ts +493 -0
  378. package/src/tools/graph-tools.ts +295 -0
  379. package/src/tools/ingestion-tools.ts +122 -0
  380. package/src/tools/learning-tools.ts +181 -0
  381. package/src/tools/memory-tools.ts +234 -0
  382. package/src/tools/phase-tools.ts +1452 -0
  383. package/src/tools/pipeline-tools.ts +188 -0
  384. package/src/tools/registration-tools.ts +450 -0
  385. package/src/util/.gitkeep +0 -0
  386. package/src/util/circuit-breaker.ts +193 -0
  387. package/src/util/config.ts +177 -0
  388. package/src/util/logger.ts +53 -0
  389. package/src/util/token-counter.ts +52 -0
  390. package/src/util/types.ts +710 -0
  391. package/tests/context/.gitkeep +0 -0
  392. package/tests/integration/.gitkeep +0 -0
  393. package/tests/knowledge/.gitkeep +0 -0
  394. package/tests/learning/.gitkeep +0 -0
  395. package/tests/pipeline/.gitkeep +0 -0
  396. package/tests/tools/.gitkeep +0 -0
  397. package/tsconfig.json +21 -0
  398. package/vitest.config.ts +10 -0
  399. package/vscode-extension/.vscodeignore +7 -0
  400. package/vscode-extension/README.md +43 -0
  401. package/vscode-extension/out/edge-collector.js +274 -0
  402. package/vscode-extension/out/edge-collector.js.map +1 -0
  403. package/vscode-extension/out/extension.js +264 -0
  404. package/vscode-extension/out/extension.js.map +1 -0
  405. package/vscode-extension/out/forge-client.js +318 -0
  406. package/vscode-extension/out/forge-client.js.map +1 -0
  407. package/vscode-extension/package-lock.json +59 -0
  408. package/vscode-extension/package.json +71 -0
  409. package/vscode-extension/src/edge-collector.ts +320 -0
  410. package/vscode-extension/src/extension.ts +269 -0
  411. package/vscode-extension/src/forge-client.ts +364 -0
  412. package/vscode-extension/tsconfig.json +19 -0
@@ -0,0 +1,954 @@
1
+ import { z } from 'zod';
2
+ import type { PipelineEngine } from '../pipeline/engine.js';
3
+ import type { ContextInjector } from '../context/injector.js';
4
+ import type { Phase, PipelinePhase } from '../util/types.js';
5
+ import type { VectorStore, GraphStore } from '../storage/interfaces.js';
6
+ export declare const startInterviewSchema: z.ZodObject<{
7
+ project_id: z.ZodString;
8
+ initial_request: z.ZodOptional<z.ZodString>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ project_id: string;
11
+ initial_request?: string | undefined;
12
+ }, {
13
+ project_id: string;
14
+ initial_request?: string | undefined;
15
+ }>;
16
+ export declare const submitVisionSchema: z.ZodObject<{
17
+ project_id: z.ZodString;
18
+ vision: z.ZodString;
19
+ file_path: z.ZodOptional<z.ZodString>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ project_id: string;
22
+ vision: string;
23
+ file_path?: string | undefined;
24
+ }, {
25
+ project_id: string;
26
+ vision: string;
27
+ file_path?: string | undefined;
28
+ }>;
29
+ export declare const startArchitectureSchema: z.ZodObject<{
30
+ project_id: z.ZodString;
31
+ vision_summary: z.ZodOptional<z.ZodString>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ project_id: string;
34
+ vision_summary?: string | undefined;
35
+ }, {
36
+ project_id: string;
37
+ vision_summary?: string | undefined;
38
+ }>;
39
+ export declare const submitPlanSchema: z.ZodObject<{
40
+ project_id: z.ZodString;
41
+ plan: z.ZodString;
42
+ file_path: z.ZodOptional<z.ZodString>;
43
+ modules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
44
+ requires_designer: z.ZodOptional<z.ZodBoolean>;
45
+ requires_qa: z.ZodOptional<z.ZodBoolean>;
46
+ }, "strip", z.ZodTypeAny, {
47
+ project_id: string;
48
+ plan: string;
49
+ file_path?: string | undefined;
50
+ modules?: string[] | undefined;
51
+ requires_designer?: boolean | undefined;
52
+ requires_qa?: boolean | undefined;
53
+ }, {
54
+ project_id: string;
55
+ plan: string;
56
+ file_path?: string | undefined;
57
+ modules?: string[] | undefined;
58
+ requires_designer?: boolean | undefined;
59
+ requires_qa?: boolean | undefined;
60
+ }>;
61
+ export declare const startDesignSchema: z.ZodObject<{
62
+ project_id: z.ZodString;
63
+ focus: z.ZodOptional<z.ZodString>;
64
+ }, "strip", z.ZodTypeAny, {
65
+ project_id: string;
66
+ focus?: string | undefined;
67
+ }, {
68
+ project_id: string;
69
+ focus?: string | undefined;
70
+ }>;
71
+ export declare const submitDesignSchema: z.ZodObject<{
72
+ project_id: z.ZodString;
73
+ design: z.ZodString;
74
+ file_path: z.ZodOptional<z.ZodString>;
75
+ }, "strip", z.ZodTypeAny, {
76
+ design: string;
77
+ project_id: string;
78
+ file_path?: string | undefined;
79
+ }, {
80
+ design: string;
81
+ project_id: string;
82
+ file_path?: string | undefined;
83
+ }>;
84
+ export declare const startQAStrategySchema: z.ZodObject<{
85
+ project_id: z.ZodString;
86
+ }, "strip", z.ZodTypeAny, {
87
+ project_id: string;
88
+ }, {
89
+ project_id: string;
90
+ }>;
91
+ export declare const submitTestPlanSchema: z.ZodObject<{
92
+ project_id: z.ZodString;
93
+ test_plan: z.ZodString;
94
+ file_path: z.ZodOptional<z.ZodString>;
95
+ }, "strip", z.ZodTypeAny, {
96
+ project_id: string;
97
+ test_plan: string;
98
+ file_path?: string | undefined;
99
+ }, {
100
+ project_id: string;
101
+ test_plan: string;
102
+ file_path?: string | undefined;
103
+ }>;
104
+ export declare const startImplementationSchema: z.ZodObject<{
105
+ project_id: z.ZodString;
106
+ modules: z.ZodArray<z.ZodObject<{
107
+ name: z.ZodString;
108
+ agent_type: z.ZodString;
109
+ description: z.ZodOptional<z.ZodString>;
110
+ }, "strip", z.ZodTypeAny, {
111
+ name: string;
112
+ agent_type: string;
113
+ description?: string | undefined;
114
+ }, {
115
+ name: string;
116
+ agent_type: string;
117
+ description?: string | undefined;
118
+ }>, "many">;
119
+ }, "strip", z.ZodTypeAny, {
120
+ modules: {
121
+ name: string;
122
+ agent_type: string;
123
+ description?: string | undefined;
124
+ }[];
125
+ project_id: string;
126
+ }, {
127
+ modules: {
128
+ name: string;
129
+ agent_type: string;
130
+ description?: string | undefined;
131
+ }[];
132
+ project_id: string;
133
+ }>;
134
+ export declare const submitImplementationSchema: z.ZodObject<{
135
+ project_id: z.ZodString;
136
+ module: z.ZodString;
137
+ branch: z.ZodOptional<z.ZodString>;
138
+ summary: z.ZodOptional<z.ZodString>;
139
+ files_changed: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
140
+ }, "strip", z.ZodTypeAny, {
141
+ module: string;
142
+ project_id: string;
143
+ branch?: string | undefined;
144
+ summary?: string | undefined;
145
+ files_changed?: string[] | undefined;
146
+ }, {
147
+ module: string;
148
+ project_id: string;
149
+ branch?: string | undefined;
150
+ summary?: string | undefined;
151
+ files_changed?: string[] | undefined;
152
+ }>;
153
+ export declare const startInspectionSchema: z.ZodObject<{
154
+ project_id: z.ZodString;
155
+ }, "strip", z.ZodTypeAny, {
156
+ project_id: string;
157
+ }, {
158
+ project_id: string;
159
+ }>;
160
+ export declare const submitVerdictSchema: z.ZodObject<{
161
+ project_id: z.ZodString;
162
+ verdict: z.ZodEnum<["pass", "pass_with_warnings", "fail"]>;
163
+ findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
164
+ severity: z.ZodEnum<["critical", "warning", "info"]>;
165
+ description: z.ZodString;
166
+ file_path: z.ZodOptional<z.ZodString>;
167
+ line_number: z.ZodOptional<z.ZodNumber>;
168
+ }, "strip", z.ZodTypeAny, {
169
+ description: string;
170
+ severity: "info" | "warning" | "critical";
171
+ file_path?: string | undefined;
172
+ line_number?: number | undefined;
173
+ }, {
174
+ description: string;
175
+ severity: "info" | "warning" | "critical";
176
+ file_path?: string | undefined;
177
+ line_number?: number | undefined;
178
+ }>, "many">>;
179
+ summary: z.ZodOptional<z.ZodString>;
180
+ }, "strip", z.ZodTypeAny, {
181
+ project_id: string;
182
+ verdict: "pass" | "pass_with_warnings" | "fail";
183
+ summary?: string | undefined;
184
+ findings?: {
185
+ description: string;
186
+ severity: "info" | "warning" | "critical";
187
+ file_path?: string | undefined;
188
+ line_number?: number | undefined;
189
+ }[] | undefined;
190
+ }, {
191
+ project_id: string;
192
+ verdict: "pass" | "pass_with_warnings" | "fail";
193
+ summary?: string | undefined;
194
+ findings?: {
195
+ description: string;
196
+ severity: "info" | "warning" | "critical";
197
+ file_path?: string | undefined;
198
+ line_number?: number | undefined;
199
+ }[] | undefined;
200
+ }>;
201
+ export declare const collectKnowledgeSchema: z.ZodObject<{
202
+ project_id: z.ZodString;
203
+ }, "strip", z.ZodTypeAny, {
204
+ project_id: string;
205
+ }, {
206
+ project_id: string;
207
+ }>;
208
+ export declare function createPhaseTools(engine: PipelineEngine, contextInjector: ContextInjector, vectorStore?: VectorStore | null, graphStore?: GraphStore | null): {
209
+ start_interview: {
210
+ schema: z.ZodObject<{
211
+ project_id: z.ZodString;
212
+ initial_request: z.ZodOptional<z.ZodString>;
213
+ }, "strip", z.ZodTypeAny, {
214
+ project_id: string;
215
+ initial_request?: string | undefined;
216
+ }, {
217
+ project_id: string;
218
+ initial_request?: string | undefined;
219
+ }>;
220
+ description: string;
221
+ handler: (input: z.infer<typeof startInterviewSchema>) => Promise<{
222
+ error: string;
223
+ current_phase: Phase;
224
+ legal_transitions: Phase[];
225
+ } | {
226
+ project_id: string;
227
+ phase: Phase;
228
+ similar_projects: {
229
+ name: string;
230
+ repo: string;
231
+ relevance: number;
232
+ outcome: string;
233
+ }[];
234
+ relevant_gotchas: {
235
+ title: string;
236
+ content: string;
237
+ confidence: number;
238
+ source_repo: string;
239
+ }[];
240
+ interview_template: string;
241
+ trajectory_id: string;
242
+ available_transitions: Phase[];
243
+ error?: undefined;
244
+ message?: undefined;
245
+ } | {
246
+ error: string;
247
+ message: string;
248
+ project_id?: undefined;
249
+ phase?: undefined;
250
+ similar_projects?: undefined;
251
+ relevant_gotchas?: undefined;
252
+ interview_template?: undefined;
253
+ trajectory_id?: undefined;
254
+ available_transitions?: undefined;
255
+ }>;
256
+ };
257
+ submit_vision: {
258
+ schema: z.ZodObject<{
259
+ project_id: z.ZodString;
260
+ vision: z.ZodString;
261
+ file_path: z.ZodOptional<z.ZodString>;
262
+ }, "strip", z.ZodTypeAny, {
263
+ project_id: string;
264
+ vision: string;
265
+ file_path?: string | undefined;
266
+ }, {
267
+ project_id: string;
268
+ vision: string;
269
+ file_path?: string | undefined;
270
+ }>;
271
+ description: string;
272
+ handler: (input: z.infer<typeof submitVisionSchema>) => Promise<{
273
+ error: string;
274
+ project_id: string;
275
+ current_phase?: undefined;
276
+ required_phase?: undefined;
277
+ phase?: undefined;
278
+ vision_stored?: undefined;
279
+ knowledge_extracted?: undefined;
280
+ trajectory_step_recorded?: undefined;
281
+ next_agents?: undefined;
282
+ message?: undefined;
283
+ } | {
284
+ error: string;
285
+ current_phase: PipelinePhase;
286
+ required_phase: string;
287
+ project_id?: undefined;
288
+ phase?: undefined;
289
+ vision_stored?: undefined;
290
+ knowledge_extracted?: undefined;
291
+ trajectory_step_recorded?: undefined;
292
+ next_agents?: undefined;
293
+ message?: undefined;
294
+ } | {
295
+ project_id: string;
296
+ phase: Phase;
297
+ vision_stored: boolean;
298
+ knowledge_extracted: number;
299
+ trajectory_step_recorded: boolean;
300
+ next_agents: string[];
301
+ error?: undefined;
302
+ current_phase?: undefined;
303
+ required_phase?: undefined;
304
+ message?: undefined;
305
+ } | {
306
+ error: string;
307
+ message: string;
308
+ project_id?: undefined;
309
+ current_phase?: undefined;
310
+ required_phase?: undefined;
311
+ phase?: undefined;
312
+ vision_stored?: undefined;
313
+ knowledge_extracted?: undefined;
314
+ trajectory_step_recorded?: undefined;
315
+ next_agents?: undefined;
316
+ }>;
317
+ };
318
+ start_architecture: {
319
+ schema: z.ZodObject<{
320
+ project_id: z.ZodString;
321
+ vision_summary: z.ZodOptional<z.ZodString>;
322
+ }, "strip", z.ZodTypeAny, {
323
+ project_id: string;
324
+ vision_summary?: string | undefined;
325
+ }, {
326
+ project_id: string;
327
+ vision_summary?: string | undefined;
328
+ }>;
329
+ description: string;
330
+ handler: (input: z.infer<typeof startArchitectureSchema>) => Promise<{
331
+ error: string;
332
+ current_phase: Phase;
333
+ legal_transitions: Phase[];
334
+ } | {
335
+ project_id: string;
336
+ phase: Phase;
337
+ codebase_context: {
338
+ modules: import("../context/injector.js").ArchitectureContextModules[];
339
+ patterns: string[];
340
+ dependencies: string[];
341
+ file_count: number;
342
+ language_breakdown: {};
343
+ };
344
+ relevant_decisions: {
345
+ title: string;
346
+ content: string;
347
+ confidence: number;
348
+ source_repo: string;
349
+ }[];
350
+ relevant_gotchas: {
351
+ title: string;
352
+ content: string;
353
+ stack_tags: string[];
354
+ confidence: number;
355
+ }[];
356
+ stack_constraints: string[];
357
+ trajectory_id: string;
358
+ available_transitions: Phase[];
359
+ error?: undefined;
360
+ message?: undefined;
361
+ } | {
362
+ error: string;
363
+ message: string;
364
+ project_id?: undefined;
365
+ phase?: undefined;
366
+ codebase_context?: undefined;
367
+ relevant_decisions?: undefined;
368
+ relevant_gotchas?: undefined;
369
+ stack_constraints?: undefined;
370
+ trajectory_id?: undefined;
371
+ available_transitions?: undefined;
372
+ }>;
373
+ };
374
+ submit_plan: {
375
+ schema: z.ZodObject<{
376
+ project_id: z.ZodString;
377
+ plan: z.ZodString;
378
+ file_path: z.ZodOptional<z.ZodString>;
379
+ modules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
380
+ requires_designer: z.ZodOptional<z.ZodBoolean>;
381
+ requires_qa: z.ZodOptional<z.ZodBoolean>;
382
+ }, "strip", z.ZodTypeAny, {
383
+ project_id: string;
384
+ plan: string;
385
+ file_path?: string | undefined;
386
+ modules?: string[] | undefined;
387
+ requires_designer?: boolean | undefined;
388
+ requires_qa?: boolean | undefined;
389
+ }, {
390
+ project_id: string;
391
+ plan: string;
392
+ file_path?: string | undefined;
393
+ modules?: string[] | undefined;
394
+ requires_designer?: boolean | undefined;
395
+ requires_qa?: boolean | undefined;
396
+ }>;
397
+ description: string;
398
+ handler: (input: z.infer<typeof submitPlanSchema>) => Promise<{
399
+ error: string;
400
+ project_id: string;
401
+ current_phase?: undefined;
402
+ required_phase?: undefined;
403
+ phase?: undefined;
404
+ plan_stored?: undefined;
405
+ knowledge_extracted?: undefined;
406
+ parallel_phases?: undefined;
407
+ message?: undefined;
408
+ } | {
409
+ error: string;
410
+ current_phase: PipelinePhase;
411
+ required_phase: string;
412
+ project_id?: undefined;
413
+ phase?: undefined;
414
+ plan_stored?: undefined;
415
+ knowledge_extracted?: undefined;
416
+ parallel_phases?: undefined;
417
+ message?: undefined;
418
+ } | {
419
+ project_id: string;
420
+ phase: "design" | "qa_strategy" | "implementation";
421
+ plan_stored: boolean;
422
+ knowledge_extracted: number;
423
+ parallel_phases: string[] | undefined;
424
+ error?: undefined;
425
+ current_phase?: undefined;
426
+ required_phase?: undefined;
427
+ message?: undefined;
428
+ } | {
429
+ error: string;
430
+ message: string;
431
+ project_id?: undefined;
432
+ current_phase?: undefined;
433
+ required_phase?: undefined;
434
+ phase?: undefined;
435
+ plan_stored?: undefined;
436
+ knowledge_extracted?: undefined;
437
+ parallel_phases?: undefined;
438
+ }>;
439
+ };
440
+ start_design: {
441
+ schema: z.ZodObject<{
442
+ project_id: z.ZodString;
443
+ focus: z.ZodOptional<z.ZodString>;
444
+ }, "strip", z.ZodTypeAny, {
445
+ project_id: string;
446
+ focus?: string | undefined;
447
+ }, {
448
+ project_id: string;
449
+ focus?: string | undefined;
450
+ }>;
451
+ description: string;
452
+ handler: (input: z.infer<typeof startDesignSchema>) => Promise<{
453
+ error: string;
454
+ current_phase: Phase;
455
+ legal_transitions: Phase[];
456
+ } | {
457
+ project_id: string;
458
+ phase: Phase;
459
+ existing_design_system: {
460
+ found: boolean;
461
+ summary?: string;
462
+ theme_files?: string[];
463
+ component_count?: number;
464
+ };
465
+ relevant_patterns: {
466
+ title: string;
467
+ content: string;
468
+ source_repo: string;
469
+ }[];
470
+ trajectory_id: string;
471
+ available_transitions: Phase[];
472
+ error?: undefined;
473
+ message?: undefined;
474
+ } | {
475
+ error: string;
476
+ message: string;
477
+ project_id?: undefined;
478
+ phase?: undefined;
479
+ existing_design_system?: undefined;
480
+ relevant_patterns?: undefined;
481
+ trajectory_id?: undefined;
482
+ available_transitions?: undefined;
483
+ }>;
484
+ };
485
+ submit_design: {
486
+ schema: z.ZodObject<{
487
+ project_id: z.ZodString;
488
+ design: z.ZodString;
489
+ file_path: z.ZodOptional<z.ZodString>;
490
+ }, "strip", z.ZodTypeAny, {
491
+ design: string;
492
+ project_id: string;
493
+ file_path?: string | undefined;
494
+ }, {
495
+ design: string;
496
+ project_id: string;
497
+ file_path?: string | undefined;
498
+ }>;
499
+ description: string;
500
+ handler: (input: z.infer<typeof submitDesignSchema>) => Promise<{
501
+ error: string;
502
+ project_id: string;
503
+ current_phase?: undefined;
504
+ required_phase?: undefined;
505
+ phase?: undefined;
506
+ design_stored?: undefined;
507
+ waiting_for?: undefined;
508
+ knowledge_extracted?: undefined;
509
+ message?: undefined;
510
+ } | {
511
+ error: string;
512
+ current_phase: PipelinePhase;
513
+ required_phase: string;
514
+ project_id?: undefined;
515
+ phase?: undefined;
516
+ design_stored?: undefined;
517
+ waiting_for?: undefined;
518
+ knowledge_extracted?: undefined;
519
+ message?: undefined;
520
+ } | {
521
+ project_id: string;
522
+ phase: Phase;
523
+ design_stored: boolean;
524
+ waiting_for: string | undefined;
525
+ knowledge_extracted: number;
526
+ error?: undefined;
527
+ current_phase?: undefined;
528
+ required_phase?: undefined;
529
+ message?: undefined;
530
+ } | {
531
+ error: string;
532
+ message: string;
533
+ project_id?: undefined;
534
+ current_phase?: undefined;
535
+ required_phase?: undefined;
536
+ phase?: undefined;
537
+ design_stored?: undefined;
538
+ waiting_for?: undefined;
539
+ knowledge_extracted?: undefined;
540
+ }>;
541
+ };
542
+ start_qa_strategy: {
543
+ schema: z.ZodObject<{
544
+ project_id: z.ZodString;
545
+ }, "strip", z.ZodTypeAny, {
546
+ project_id: string;
547
+ }, {
548
+ project_id: string;
549
+ }>;
550
+ description: string;
551
+ handler: (input: z.infer<typeof startQAStrategySchema>) => Promise<{
552
+ error: string;
553
+ current_phase: Phase;
554
+ legal_transitions: Phase[];
555
+ } | {
556
+ project_id: string;
557
+ phase: Phase;
558
+ architecture_summary: string;
559
+ design_summary: string | undefined;
560
+ past_test_failures: {
561
+ description: string;
562
+ resolution: string;
563
+ source_repo: string;
564
+ }[];
565
+ trajectory_id: string;
566
+ available_transitions: Phase[];
567
+ error?: undefined;
568
+ message?: undefined;
569
+ } | {
570
+ error: string;
571
+ message: string;
572
+ project_id?: undefined;
573
+ phase?: undefined;
574
+ architecture_summary?: undefined;
575
+ design_summary?: undefined;
576
+ past_test_failures?: undefined;
577
+ trajectory_id?: undefined;
578
+ available_transitions?: undefined;
579
+ }>;
580
+ };
581
+ submit_test_plan: {
582
+ schema: z.ZodObject<{
583
+ project_id: z.ZodString;
584
+ test_plan: z.ZodString;
585
+ file_path: z.ZodOptional<z.ZodString>;
586
+ }, "strip", z.ZodTypeAny, {
587
+ project_id: string;
588
+ test_plan: string;
589
+ file_path?: string | undefined;
590
+ }, {
591
+ project_id: string;
592
+ test_plan: string;
593
+ file_path?: string | undefined;
594
+ }>;
595
+ description: string;
596
+ handler: (input: z.infer<typeof submitTestPlanSchema>) => Promise<{
597
+ error: string;
598
+ project_id: string;
599
+ current_phase?: undefined;
600
+ required_phase?: undefined;
601
+ phase?: undefined;
602
+ test_plan_stored?: undefined;
603
+ knowledge_extracted?: undefined;
604
+ message?: undefined;
605
+ } | {
606
+ error: string;
607
+ current_phase: PipelinePhase;
608
+ required_phase: string;
609
+ project_id?: undefined;
610
+ phase?: undefined;
611
+ test_plan_stored?: undefined;
612
+ knowledge_extracted?: undefined;
613
+ message?: undefined;
614
+ } | {
615
+ project_id: string;
616
+ phase: Phase;
617
+ test_plan_stored: boolean;
618
+ knowledge_extracted: number;
619
+ error?: undefined;
620
+ current_phase?: undefined;
621
+ required_phase?: undefined;
622
+ message?: undefined;
623
+ } | {
624
+ error: string;
625
+ message: string;
626
+ project_id?: undefined;
627
+ current_phase?: undefined;
628
+ required_phase?: undefined;
629
+ phase?: undefined;
630
+ test_plan_stored?: undefined;
631
+ knowledge_extracted?: undefined;
632
+ }>;
633
+ };
634
+ start_implementation: {
635
+ schema: z.ZodObject<{
636
+ project_id: z.ZodString;
637
+ modules: z.ZodArray<z.ZodObject<{
638
+ name: z.ZodString;
639
+ agent_type: z.ZodString;
640
+ description: z.ZodOptional<z.ZodString>;
641
+ }, "strip", z.ZodTypeAny, {
642
+ name: string;
643
+ agent_type: string;
644
+ description?: string | undefined;
645
+ }, {
646
+ name: string;
647
+ agent_type: string;
648
+ description?: string | undefined;
649
+ }>, "many">;
650
+ }, "strip", z.ZodTypeAny, {
651
+ modules: {
652
+ name: string;
653
+ agent_type: string;
654
+ description?: string | undefined;
655
+ }[];
656
+ project_id: string;
657
+ }, {
658
+ modules: {
659
+ name: string;
660
+ agent_type: string;
661
+ description?: string | undefined;
662
+ }[];
663
+ project_id: string;
664
+ }>;
665
+ description: string;
666
+ handler: (input: z.infer<typeof startImplementationSchema>) => Promise<{
667
+ error: string;
668
+ current_phase: Phase;
669
+ legal_transitions: Phase[];
670
+ } | {
671
+ project_id: string;
672
+ phase: Phase;
673
+ claims: {
674
+ claim_id: string;
675
+ module: string;
676
+ agent_type: string;
677
+ status: "claimed";
678
+ }[];
679
+ module_contexts: Record<string, {
680
+ relevant_code: string;
681
+ gotchas: Array<{
682
+ title: string;
683
+ content: string;
684
+ }>;
685
+ conventions: Array<{
686
+ title: string;
687
+ content: string;
688
+ }>;
689
+ recent_broadcasts: Array<{
690
+ content: string;
691
+ severity: string;
692
+ created_at: number;
693
+ }>;
694
+ sibling_modules: Array<{
695
+ name: string;
696
+ agentType: string;
697
+ description?: string;
698
+ }>;
699
+ }>;
700
+ trajectory_id: string;
701
+ error?: undefined;
702
+ message?: undefined;
703
+ } | {
704
+ error: string;
705
+ message: string;
706
+ project_id?: undefined;
707
+ phase?: undefined;
708
+ claims?: undefined;
709
+ module_contexts?: undefined;
710
+ trajectory_id?: undefined;
711
+ }>;
712
+ };
713
+ submit_implementation: {
714
+ schema: z.ZodObject<{
715
+ project_id: z.ZodString;
716
+ module: z.ZodString;
717
+ branch: z.ZodOptional<z.ZodString>;
718
+ summary: z.ZodOptional<z.ZodString>;
719
+ files_changed: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
720
+ }, "strip", z.ZodTypeAny, {
721
+ module: string;
722
+ project_id: string;
723
+ branch?: string | undefined;
724
+ summary?: string | undefined;
725
+ files_changed?: string[] | undefined;
726
+ }, {
727
+ module: string;
728
+ project_id: string;
729
+ branch?: string | undefined;
730
+ summary?: string | undefined;
731
+ files_changed?: string[] | undefined;
732
+ }>;
733
+ description: string;
734
+ handler: (input: z.infer<typeof submitImplementationSchema>) => Promise<{
735
+ error: string;
736
+ project_id: string;
737
+ current_phase?: undefined;
738
+ required_phase?: undefined;
739
+ module?: undefined;
740
+ message?: undefined;
741
+ claim_status?: undefined;
742
+ remaining_claims?: undefined;
743
+ all_complete?: undefined;
744
+ phase?: undefined;
745
+ knowledge_extracted?: undefined;
746
+ } | {
747
+ error: string;
748
+ current_phase: PipelinePhase;
749
+ required_phase: string;
750
+ project_id?: undefined;
751
+ module?: undefined;
752
+ message?: undefined;
753
+ claim_status?: undefined;
754
+ remaining_claims?: undefined;
755
+ all_complete?: undefined;
756
+ phase?: undefined;
757
+ knowledge_extracted?: undefined;
758
+ } | {
759
+ error: string;
760
+ module: string;
761
+ message: string;
762
+ project_id?: undefined;
763
+ current_phase?: undefined;
764
+ required_phase?: undefined;
765
+ claim_status?: undefined;
766
+ remaining_claims?: undefined;
767
+ all_complete?: undefined;
768
+ phase?: undefined;
769
+ knowledge_extracted?: undefined;
770
+ } | {
771
+ project_id: string;
772
+ module: string;
773
+ claim_status: "completed";
774
+ remaining_claims: number;
775
+ all_complete: boolean;
776
+ phase: Phase;
777
+ knowledge_extracted: number;
778
+ error?: undefined;
779
+ current_phase?: undefined;
780
+ required_phase?: undefined;
781
+ message?: undefined;
782
+ } | {
783
+ error: string;
784
+ message: string;
785
+ project_id?: undefined;
786
+ current_phase?: undefined;
787
+ required_phase?: undefined;
788
+ module?: undefined;
789
+ claim_status?: undefined;
790
+ remaining_claims?: undefined;
791
+ all_complete?: undefined;
792
+ phase?: undefined;
793
+ knowledge_extracted?: undefined;
794
+ }>;
795
+ };
796
+ start_inspection: {
797
+ schema: z.ZodObject<{
798
+ project_id: z.ZodString;
799
+ }, "strip", z.ZodTypeAny, {
800
+ project_id: string;
801
+ }, {
802
+ project_id: string;
803
+ }>;
804
+ description: string;
805
+ handler: (input: z.infer<typeof startInspectionSchema>) => Promise<{
806
+ error: string;
807
+ current_phase: Phase;
808
+ legal_transitions: Phase[];
809
+ } | {
810
+ project_id: string;
811
+ phase: Phase;
812
+ checklist: string;
813
+ past_findings: {
814
+ description: string;
815
+ severity: string;
816
+ resolution: string;
817
+ source_repo: string;
818
+ }[];
819
+ implementation_broadcasts: {
820
+ content: string;
821
+ severity: string;
822
+ created_at: number;
823
+ }[];
824
+ anti_stub_patterns: string[];
825
+ cycle_count: number;
826
+ max_cycles: number;
827
+ trajectory_id: string;
828
+ available_transitions: Phase[];
829
+ error?: undefined;
830
+ message?: undefined;
831
+ } | {
832
+ error: string;
833
+ message: string;
834
+ project_id?: undefined;
835
+ phase?: undefined;
836
+ checklist?: undefined;
837
+ past_findings?: undefined;
838
+ implementation_broadcasts?: undefined;
839
+ anti_stub_patterns?: undefined;
840
+ cycle_count?: undefined;
841
+ max_cycles?: undefined;
842
+ trajectory_id?: undefined;
843
+ available_transitions?: undefined;
844
+ }>;
845
+ };
846
+ submit_verdict: {
847
+ schema: z.ZodObject<{
848
+ project_id: z.ZodString;
849
+ verdict: z.ZodEnum<["pass", "pass_with_warnings", "fail"]>;
850
+ findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
851
+ severity: z.ZodEnum<["critical", "warning", "info"]>;
852
+ description: z.ZodString;
853
+ file_path: z.ZodOptional<z.ZodString>;
854
+ line_number: z.ZodOptional<z.ZodNumber>;
855
+ }, "strip", z.ZodTypeAny, {
856
+ description: string;
857
+ severity: "info" | "warning" | "critical";
858
+ file_path?: string | undefined;
859
+ line_number?: number | undefined;
860
+ }, {
861
+ description: string;
862
+ severity: "info" | "warning" | "critical";
863
+ file_path?: string | undefined;
864
+ line_number?: number | undefined;
865
+ }>, "many">>;
866
+ summary: z.ZodOptional<z.ZodString>;
867
+ }, "strip", z.ZodTypeAny, {
868
+ project_id: string;
869
+ verdict: "pass" | "pass_with_warnings" | "fail";
870
+ summary?: string | undefined;
871
+ findings?: {
872
+ description: string;
873
+ severity: "info" | "warning" | "critical";
874
+ file_path?: string | undefined;
875
+ line_number?: number | undefined;
876
+ }[] | undefined;
877
+ }, {
878
+ project_id: string;
879
+ verdict: "pass" | "pass_with_warnings" | "fail";
880
+ summary?: string | undefined;
881
+ findings?: {
882
+ description: string;
883
+ severity: "info" | "warning" | "critical";
884
+ file_path?: string | undefined;
885
+ line_number?: number | undefined;
886
+ }[] | undefined;
887
+ }>;
888
+ description: string;
889
+ handler: (input: z.infer<typeof submitVerdictSchema>) => Promise<Record<string, unknown>>;
890
+ };
891
+ collect_knowledge: {
892
+ schema: z.ZodObject<{
893
+ project_id: z.ZodString;
894
+ }, "strip", z.ZodTypeAny, {
895
+ project_id: string;
896
+ }, {
897
+ project_id: string;
898
+ }>;
899
+ description: string;
900
+ handler: (input: z.infer<typeof collectKnowledgeSchema>) => Promise<{
901
+ error: string;
902
+ project_id: string;
903
+ current_phase?: undefined;
904
+ required_phase?: undefined;
905
+ phase?: undefined;
906
+ knowledge_items?: undefined;
907
+ trajectory_summary?: undefined;
908
+ patterns_promoted?: undefined;
909
+ message?: undefined;
910
+ } | {
911
+ error: string;
912
+ current_phase: PipelinePhase;
913
+ required_phase: string;
914
+ project_id?: undefined;
915
+ phase?: undefined;
916
+ knowledge_items?: undefined;
917
+ trajectory_summary?: undefined;
918
+ patterns_promoted?: undefined;
919
+ message?: undefined;
920
+ } | {
921
+ project_id: string;
922
+ phase: Phase;
923
+ knowledge_items: {
924
+ category: string;
925
+ title: string;
926
+ content: string;
927
+ confidence: number;
928
+ destination: string;
929
+ }[];
930
+ trajectory_summary: {
931
+ total_steps: number;
932
+ phases_completed: number;
933
+ cycles: Record<string, number>;
934
+ duration_minutes: number;
935
+ };
936
+ patterns_promoted: number;
937
+ error?: undefined;
938
+ current_phase?: undefined;
939
+ required_phase?: undefined;
940
+ message?: undefined;
941
+ } | {
942
+ error: string;
943
+ message: string;
944
+ project_id?: undefined;
945
+ current_phase?: undefined;
946
+ required_phase?: undefined;
947
+ phase?: undefined;
948
+ knowledge_items?: undefined;
949
+ trajectory_summary?: undefined;
950
+ patterns_promoted?: undefined;
951
+ }>;
952
+ };
953
+ };
954
+ //# sourceMappingURL=phase-tools.d.ts.map