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,203 @@
1
+ # Swarm Coordination Activation — Architecture Plan
2
+
3
+ ## Overview
4
+
5
+ Wire the existing swarm infrastructure (broadcasts, observations, memory) into the implementation phase so agents actually coordinate. Five modules of changes across server code and agent prompts.
6
+
7
+ ## Module A: Context Injection — Broadcasts + Sibling Awareness
8
+
9
+ **Files:** `src/context/injector.ts`
10
+
11
+ ### Changes:
12
+
13
+ 1. **Extend `ModuleContext` interface** (line 90-94) — add two new fields:
14
+ ```typescript
15
+ export interface ModuleContext {
16
+ relevantCode: string;
17
+ gotchas: Array<{ title: string; content: string }>;
18
+ conventions: Array<{ title: string; content: string }>;
19
+ // NEW: swarm coordination
20
+ recentBroadcasts: Array<{ content: string; severity: string; created_at: number }>;
21
+ siblingModules: Array<{ name: string; agentType: string; description?: string }>;
22
+ }
23
+ ```
24
+
25
+ 2. **Update `injectImplementationContext()`** (line 347-407):
26
+ - Accept the full modules array (already does)
27
+ - Call `this.getRecentBroadcasts(projectId, 10)` once (not per-module)
28
+ - For each module, populate `recentBroadcasts` with project-wide broadcasts
29
+ - Populate `siblingModules` with ALL other modules in the dispatch (name + agentType + description), so each agent knows who else is working and on what
30
+ - Method signature gains optional `moduleDescriptions` parameter
31
+
32
+ 3. **Extend `getRecentBroadcasts()`** (line 184-209) — increase default limit from 5 to 10 for implementation phase, already handles empty gracefully.
33
+
34
+ ## Module B: Phase Tools — Broadcast Injection into start_implementation Response
35
+
36
+ **Files:** `src/tools/phase-tools.ts`
37
+
38
+ ### Changes:
39
+
40
+ 1. **Update `startImplementation()`** (line 714-769):
41
+ - Pass module descriptions through to `injectImplementationContext()`
42
+ - Add `recent_broadcasts` and `sibling_modules` to each entry in `module_contexts`
43
+ - Response shape becomes:
44
+ ```typescript
45
+ module_contexts: {
46
+ [moduleName]: {
47
+ relevant_code: string;
48
+ gotchas: [...];
49
+ conventions: [...];
50
+ recent_broadcasts: [...]; // NEW
51
+ sibling_modules: [...]; // NEW
52
+ }
53
+ }
54
+ ```
55
+
56
+ 2. **Update `startImplementationSchema`** (line 115-122):
57
+ - The `description` field on modules is already optional — no schema change needed
58
+ - But agents should be encouraged to pass it (handled in prompts)
59
+
60
+ 3. **Update `submitImplementation()`** (line 774+):
61
+ - After `engine.completeClaim()`, auto-broadcast the module's completion summary so sibling agents can query it:
62
+ ```typescript
63
+ // Fire-and-forget: broadcast module completion for sibling awareness
64
+ broadcastHandler({
65
+ project_id: input.project_id,
66
+ content: `Module "${input.module}" completed. Files changed: ${(input.files_changed ?? []).join(', ')}. Summary: ${input.summary ?? 'no summary'}`,
67
+ severity: 'info',
68
+ }).catch(() => {});
69
+ ```
70
+ - This requires access to the broadcast handler — pass it through the factory or import directly
71
+
72
+ ## Module C: Inspector — Interface Compatibility Verification
73
+
74
+ **Files:** `plugin/agents/inspector.md`, `src/context/injector.ts`
75
+
76
+ ### Changes to inspector.md:
77
+
78
+ 1. **Add new section "### 7. Interface Compatibility Verification"** after the existing section 6 (Security):
79
+ ```markdown
80
+ ### 7. Interface Compatibility Verification
81
+
82
+ When multiple agents built modules in parallel, verify interface compatibility:
83
+
84
+ **Cross-Module Interface Checklist:**
85
+ - [ ] Check `get_broadcasts` for all interface-related broadcasts from implementation agents
86
+ - [ ] For each producer module: verify exported types/interfaces match what consumer modules import
87
+ - [ ] For each API endpoint: verify request/response shapes match what frontend components expect
88
+ - [ ] For each shared component: verify prop interfaces match what consumers pass
89
+ - [ ] For each database schema: verify Drizzle schema types match what services expect
90
+ - [ ] Flag any module that was built without checking broadcasts from its dependencies
91
+
92
+ **Process:**
93
+ 1. Call `mcp__dk-forge__get_broadcasts` to get all implementation-phase broadcasts
94
+ 2. Identify producer/consumer pairs from the broadcasts
95
+ 3. For each pair, verify the producer's exported interface matches the consumer's import
96
+ 4. Report mismatches as CRITICAL findings
97
+ ```
98
+
99
+ 2. **Update Phase 3: Cross-Reference Verification** to include:
100
+ ```markdown
101
+ 5. Verify interface compatibility across parallel-built modules using broadcast history
102
+ ```
103
+
104
+ ### Changes to `src/context/injector.ts`:
105
+
106
+ 3. **Update `injectInspectionContext()`** (line 413-448):
107
+ - Add broadcast history to the inspection context so the Inspector can see what agents communicated:
108
+ ```typescript
109
+ const broadcasts = await this.getRecentBroadcasts(projectId, 20);
110
+ ```
111
+ - Add to return value: `broadcasts` field
112
+ - Update `InspectionContext` interface (line 100-111) to include `broadcasts`
113
+
114
+ ## Module D: Specialist Agent Prompts — Mandatory Broadcasting
115
+
116
+ **Files:** All 4 specialist prompts:
117
+ - `plugin/agents/backend-specialist.md`
118
+ - `plugin/agents/frontend-specialist.md`
119
+ - `plugin/agents/data-specialist.md`
120
+ - `plugin/agents/platform-engineer.md`
121
+
122
+ ### Changes (same pattern for all 4):
123
+
124
+ 1. **Add "## Swarm Coordination Protocol" section** — placed BEFORE "Knowledge & Context Access" to ensure it's seen early. This replaces the vague "Cross-Agent Collaboration" section at the bottom:
125
+
126
+ ```markdown
127
+ ## Swarm Coordination Protocol
128
+
129
+ You work as part of a swarm. Other specialists are building modules IN PARALLEL with you right now. You MUST coordinate.
130
+
131
+ ### On Startup (MANDATORY — do this BEFORE writing any code):
132
+ 1. Call `mcp__dk-forge__get_broadcasts` with your project_id
133
+ 2. Review ALL broadcasts — especially critical/warning severity
134
+ 3. Check if any broadcast affects your module's interfaces or dependencies
135
+ 4. If a sibling module you depend on has broadcast interface changes, use their broadcast as your source of truth
136
+
137
+ ### During Implementation (MANDATORY — broadcast when these happen):
138
+ - **You create or modify an exported type/interface** → broadcast it with the full type signature
139
+ - **You create or modify an API endpoint** → broadcast the method, path, request/response shape
140
+ - **You create or modify a component's prop interface** → broadcast the component name and props
141
+ - **You create or modify a database schema** → broadcast the table name and column types
142
+ - **You discover a blocker** (missing dependency, unresolved interface) → broadcast with severity=critical
143
+ - **You make a breaking change** to something another module might consume → broadcast with severity=critical
144
+
145
+ ### Broadcast Format:
146
+ Use `mcp__dk-forge__broadcast_finding` with structured content:
147
+ ```
148
+ INTERFACE: ComponentName
149
+ TYPE: export interface ComponentProps { ... }
150
+ MODULE: my-module-name
151
+ BREAKING: yes/no
152
+ ```
153
+
154
+ ### Breaking Change Protocol:
155
+ When you broadcast a breaking change (severity=critical), the Architect will be notified to assess impact. Continue your work — the Architect will coordinate any necessary adaptations across affected modules.
156
+ ```
157
+
158
+ 2. **Update existing "Cross-Agent Collaboration" section** — replace the weak "Usage:" paragraph with a reference to the Swarm Protocol:
159
+ ```markdown
160
+ ## Cross-Agent Collaboration
161
+
162
+ See **Swarm Coordination Protocol** above. Broadcasting is MANDATORY, not optional.
163
+ ```
164
+
165
+ ## Module E: Architect Prompt — Breaking Change Escalation
166
+
167
+ **Files:** `plugin/agents/architect.md`
168
+
169
+ ### Changes:
170
+
171
+ 1. **Add "## Breaking Change Escalation" section**:
172
+ ```markdown
173
+ ## Breaking Change Escalation
174
+
175
+ During implementation, specialists may broadcast critical findings about breaking changes. When reviewing implementation results or when called upon to assess impact:
176
+
177
+ 1. Call `mcp__dk-forge__get_broadcasts` filtered by severity=critical
178
+ 2. For each breaking change broadcast:
179
+ - Identify which sibling modules are affected
180
+ - Assess whether the affected modules can adapt or need to restart
181
+ - Broadcast your decision back with the resolution approach
182
+ 3. If the breaking change fundamentally conflicts with the architecture, escalate to the user
183
+ ```
184
+
185
+ ## Dependency Graph
186
+
187
+ ```
188
+ Module A (context injection) ← Module B (phase tools) depends on A's interface changes
189
+ Module C (inspector) — independent
190
+ Module D (specialist prompts) — independent
191
+ Module E (architect prompt) — independent
192
+ ```
193
+
194
+ Modules C, D, E are pure documentation changes (markdown only). Modules A and B are code changes. A must be done before B.
195
+
196
+ ## What This Does NOT Change
197
+
198
+ - No new MCP tools — we use `broadcast_finding` and `get_broadcasts` as-is
199
+ - No new database tables or columns — broadcasts already stored in `pipeline_events`
200
+ - No dependency ordering in claims — agents run fully parallel, coordination is via broadcasting
201
+ - No persistent orchestrator loop — broadcasting is agent-initiated
202
+ - No mid-implementation forced checkpoints — Inspector handles convergence at the end
203
+ - State machine transitions unchanged
@@ -0,0 +1,57 @@
1
+ # Swarm Coordination Activation — Vision
2
+
3
+ ## Problem Statement
4
+
5
+ The Forge pipeline's swarm infrastructure (broadcasts, observations, memory, collaboration tools) exists but is completely unwired during the implementation phase — the only phase where multiple agents work in parallel and need coordination. Agents build against the baseline codebase independently, producing interface mismatches that are only discovered after all work is done. The broadcast tools exist but no agent calls them, context injection skips broadcasts for implementation, claims have no dependency tracking, and agent prompts treat broadcasting as optional.
6
+
7
+ ## Coordination Model
8
+
9
+ **Fully parallel + mandatory broadcasting (Option B)**. All specialist agents start simultaneously for maximum parallelism. Agents MUST broadcast interface changes (exported types, prop interfaces, API contracts) as they produce them. Consumer agents check broadcasts before building against any shared interface. This relies on explicit prompt instructions making broadcasting non-optional.
10
+
11
+ ## Interface Contract Granularity
12
+
13
+ Broadcasts should include whatever level of detail makes most sense for the change — exported type signatures, prop interfaces, API endpoint contracts, schema changes. The system should make it easy for agents to broadcast structured interface data, not just free-text.
14
+
15
+ ## Convergence Checking
16
+
17
+ Mid-implementation convergence happens at the end via the Inspector. No forced checkpoints during implementation — agents run to completion, Inspector validates interface compatibility across all modules.
18
+
19
+ ## Breaking Change Handling
20
+
21
+ When Agent A broadcasts a breaking change that affects Agent B, escalate to the Architect. The Architect assesses impact and decides how to proceed (adapt, restart, or accept the mismatch for Inspector to catch).
22
+
23
+ ## User Stories
24
+
25
+ 1. As a specialist agent, when I create or modify a shared interface (exported types, API endpoints, component props), I MUST broadcast the interface contract so sibling agents can build against it.
26
+ 2. As a specialist agent, before I consume any shared interface, I MUST check broadcasts to see if a sibling agent has published an updated contract.
27
+ 3. As a specialist agent starting implementation, I receive context that includes all existing broadcasts from sibling agents on this project.
28
+ 4. As the implementation phase dispatcher, I inject broadcast history and sibling module awareness into each specialist's context.
29
+ 5. As the Inspector, I verify interface compatibility across all modules — checking that producer interfaces match consumer expectations, using broadcast history to identify mismatches.
30
+ 6. As the Supervisor/Architect, when a specialist broadcasts a breaking change (severity=critical), I am notified and can assess impact on dependent modules.
31
+ 7. As a claim in the parallel dispatch system, I track which modules I depend on and which depend on me, enabling the system to detect blocked claims.
32
+
33
+ ## Success Criteria
34
+
35
+ 1. `injectImplementationContext()` includes recent broadcasts and sibling module info in returned context
36
+ 2. All specialist agent prompts (backend, frontend, data, platform) contain MANDATORY broadcast instructions — not "can" but "MUST"
37
+ 3. Claims track `dependsOn` relationships derived from the architecture plan
38
+ 4. Specialist prompts include an "Initialization Checklist" requiring agents to check broadcasts before starting work
39
+ 5. Specialist prompts include "Mandatory Broadcast Triggers" — specific events that require broadcasting (interface creation, schema changes, API contract changes, breaking changes)
40
+ 6. Inspector checklist includes interface compatibility verification using broadcast history
41
+ 7. Breaking changes (severity=critical) trigger escalation to Architect
42
+ 8. The `start_implementation` response includes sibling module list with dependency relationships
43
+
44
+ ## Out of Scope (V1)
45
+
46
+ - Persistent background orchestrator agent (Option C) — too heavy for V1
47
+ - Mid-implementation forced convergence checkpoints — Inspector handles this at the end
48
+ - Automatic agent restart/adaptation on breaking changes — escalate to Architect instead
49
+ - Real-time WebSocket-style broadcast subscriptions — polling via get_broadcasts is sufficient
50
+ - Changes to the state machine or phase transitions (already fixed separately)
51
+
52
+ ## Known Risks
53
+
54
+ 1. Agent discipline — even with MUST language, LLM agents may not reliably call broadcast tools every time. Mitigation: make the prompts extremely explicit with checklists.
55
+ 2. Broadcast noise — too many broadcasts could overwhelm agent context. Mitigation: severity levels + recency filtering.
56
+ 3. Dependency tracking accuracy — Architect may not declare all dependencies correctly. Mitigation: Inspector catches mismatches at the end.
57
+ 4. Token budget — injecting broadcasts + sibling info increases context size. Mitigation: limit broadcast count, summarize older broadcasts.
@@ -0,0 +1 @@
1
+ Architecture plan for Forge Plugin Bundling. Covers 6 modules: Tool Rename (25 tools, 7 server files), Plugin Directory Structure (plugin.json + .mcp.json), Agent Migration (13 agents, external MCP refs replaced with forge-native tools), Skill Migration (14 skills, direct copy), Command & Docs (/forge command, workflow.md, README), Build Artifacts (remove dist/ from .gitignore, commit dist/). Full plan at docs/plans/2026-02-26-forge-plugin-bundling/architecture.md
@@ -0,0 +1,300 @@
1
+ # Vision: Forge Plugin Bundling
2
+
3
+ **Date**: 2026-02-26
4
+ **Status**: Implemented (plugin bundling complete; rebranded 2026-02-27)
5
+ **Author**: Strategist (on behalf of Adam Reynolds)
6
+
7
+ > **Note (2026-02-27):** This vision was implemented. The project was subsequently rebranded from `forge-pipeline-server` / `mcp__forge__*` to `dk-forge-server` / `mcp__dk-forge__*`. References below reflect the original naming at time of writing. See project CLAUDE.md for current naming convention.
8
+
9
+ ## Problem Statement
10
+
11
+ The Forge agent pipeline currently exists as two disconnected pieces: a forge-pipeline-server MCP server (TypeScript, distributed as a package) and a collection of 12 agent prompts, 14+ skills, and orchestration documentation that live in Adam's personal `~/.claude/` directory. Anyone who installs the forge-pipeline-server MCP server gets the tools (pipeline phases, knowledge search, codebase context) but NOT the agents, skills, or workflow documentation that make those tools useful.
12
+
13
+ This means:
14
+ 1. **No one else can use Forge.** Another developer installing the MCP server would have `forge_create_project` and `forge_start_interview` tools available, but no agent system prompt telling Claude when or how to use them. The tools are inert without the orchestration layer.
15
+ 2. **Version drift between agents and server.** The personal `~/.claude/agents/` directory has already diverged from the early `~/.claude/plugins/forge/agents/` directory -- the personal versions reference the Supervisor agent and dynamic routing, while the plugin versions still describe the older linear handoff model.
16
+ 3. **Manual sync is fragile.** When Adam updates an agent prompt (e.g., adding MCP tool references, changing the workflow), those changes stay local. The existing plugin copy was a manual snapshot that immediately went stale.
17
+ 4. **No single source of truth.** Agent prompts reference MCP tools by name (e.g., `mcp__forge-pipeline__forge_create_project`), but there is no mechanism to validate that the tools referenced in prompts actually exist in the server, or that the server's tools are documented in the agent prompts.
18
+
19
+ The Claude Code plugin system provides exactly the distribution mechanism needed: a `.claude-plugin/plugin.json` manifest, auto-discovered `agents/`, `skills/`, `commands/`, `hooks/` directories, and critically, a `.mcp.json` file that can auto-start the forge-pipeline-server when the plugin is enabled.
20
+
21
+ ## Goals
22
+
23
+ - Bundle all forge agents, skills, workflow docs, and MCP server configuration into a single distributable Claude Code plugin that lives inside the forge-pipeline-server repository.
24
+ - Make the plugin the single source of truth for agent prompts and skills -- the personal `~/.claude/agents/` and `~/.claude/skills/` directories should no longer contain forge-specific content.
25
+ - Auto-start the forge-pipeline-server MCP server when the plugin is enabled, using the `.mcp.json` mechanism with `${CLAUDE_PLUGIN_ROOT}` for portable path references.
26
+ - Include the Supervisor agent (currently only in personal `~/.claude/agents/supervisor.md`, missing from the existing plugin).
27
+ - Include a `/forge` slash command that serves as the entry point for new users.
28
+ - Ensure agents reference the correct MCP tool names (prefixed as `mcp__forge-pipeline__*`) and that the tool references in agent prompts match the actual tools registered by the server.
29
+ - Separate personal/user-specific content (NestJS stack preferences, Synapse naming conventions, IaC repo paths, gotchas learned) from the distributable forge workflow content.
30
+ - Support both local development installation (`isLocal: true` pointing at the repo) and future marketplace/npm distribution.
31
+
32
+ ## Non-Goals (Explicitly Out of Scope)
33
+
34
+ - **Publishing to a marketplace.** This iteration produces a plugin that works as a local install or git-based install. Marketplace packaging (registry metadata, review process, listing) is a future iteration.
35
+ - **Rewriting agent prompts.** The existing agent prompts are mature and battle-tested. This iteration moves them into the plugin structure and updates tool references to use the correct MCP prefix. It does NOT rewrite the agent system prompts from scratch.
36
+ - **Hooks for pipeline enforcement.** While the plugin system supports hooks (e.g., a `PreToolUse` hook that checks whether a pipeline project exists before allowing code writes), designing and implementing enforcement hooks is a future iteration. This iteration focuses on distribution.
37
+ - **Automated testing of agent prompts.** Validating that agent prompts correctly reference available MCP tools could be automated, but building that test infrastructure is out of scope. Manual verification during this iteration.
38
+ - **Multi-user concurrent pipeline support.** The forge-pipeline-server stores state in a per-user SQLite database. Multi-user or team-shared pipeline state is out of scope.
39
+ - **Docker Compose / infrastructure bundling.** The forge server depends on Qdrant and FalkorDB for full functionality. Bundling docker-compose configs or helm charts for these dependencies is out of scope -- users must set up the backing services themselves.
40
+
41
+ ## Success Criteria
42
+
43
+ - A developer who runs `claude plugins install --local /path/to/forge-pipeline-server/plugin` (or equivalent git-based install) gets:
44
+ - All 12 agents loaded and available for dispatch (strategist, architect, supervisor, product-manager, designer, qa-strategist, backend-specialist, frontend-specialist, data-specialist, platform-engineer, inspector, knowledge-keeper).
45
+ - All 14 forge-specific skills loaded and invocable (interviewing, terminal-presentation, project-discovery, implementation-execution, verification-protocol, test-strategy, parallel-dispatch, agent-handoff, knowledge-curation, tdd, debugging, anti-stub, security-audit, graph-orchestrator).
46
+ - The forge-pipeline-server MCP server auto-started and its tools (forge_create_project, forge_start_interview, forge_submit_vision, etc.) available without manual MCP configuration.
47
+ - A `/forge` command that explains the workflow and starts a new pipeline.
48
+ - The plugin works on Windows, macOS, and Linux (portable paths via `${CLAUDE_PLUGIN_ROOT}`).
49
+ - The forge-pipeline-server repository is the single source of truth -- no forge-specific agent or skill content remains in Adam's personal `~/.claude/agents/` or `~/.claude/skills/` directories after migration.
50
+ - The personal `~/.claude/CLAUDE.md` retains user-specific preferences (stack, naming conventions, gotchas) that are NOT part of the distributable plugin.
51
+
52
+ ## What Moves vs. What Stays
53
+
54
+ ### Moves INTO the Plugin (distributable)
55
+
56
+ | Content | Source Location | Plugin Location |
57
+ |---------|----------------|-----------------|
58
+ | 12 agent prompts | `~/.claude/agents/*.md` | `plugin/agents/*.md` |
59
+ | Supervisor agent | `~/.claude/agents/supervisor.md` | `plugin/agents/supervisor.md` |
60
+ | 14 forge-specific skills | `~/.claude/skills/{name}/SKILL.md` | `plugin/skills/{name}/SKILL.md` |
61
+ | Workflow documentation | `~/.claude/plugins/forge/docs/workflow.md` | `plugin/docs/workflow.md` |
62
+ | Plugin manifest | `~/.claude/plugins/forge/.claude-plugin/plugin.json` | `plugin/.claude-plugin/plugin.json` |
63
+ | README | `~/.claude/plugins/forge/README.md` | `plugin/README.md` |
64
+ | MCP server config | (new) | `plugin/.mcp.json` |
65
+ | Forge command | (new) | `plugin/commands/forge.md` |
66
+
67
+ ### Stays PERSONAL (not distributed)
68
+
69
+ | Content | Location | Reason |
70
+ |---------|----------|--------|
71
+ | NestJS + Drizzle preferences | `~/.claude/CLAUDE.md` | Stack-specific, not forge-generic |
72
+ | Synapse naming conventions | `~/.claude/CLAUDE.md` | Project-specific |
73
+ | IaC repo paths | `~/.claude/CLAUDE.md` | User-specific local paths |
74
+ | Gotchas learned | `~/.claude/CLAUDE.md` | Personal institutional memory |
75
+ | Non-forge skills (nestjs, frontend-design, visual-explainer, etc.) | `~/.claude/skills/` | General-purpose, not forge-specific |
76
+ | .claude-flow daemon state | `~/.claude/.claude-flow/` | Runtime state |
77
+ | .swarm memory | `~/.claude/.swarm/` | Runtime state |
78
+ | Session history | `~/.claude/history.jsonl` | Personal |
79
+
80
+ ### Skills Classification
81
+
82
+ **Forge-specific (move to plugin):**
83
+ - interviewing
84
+ - terminal-presentation
85
+ - project-discovery
86
+ - implementation-execution
87
+ - verification-protocol
88
+ - test-strategy
89
+ - parallel-dispatch
90
+ - agent-handoff
91
+ - knowledge-curation
92
+ - tdd
93
+ - debugging
94
+ - anti-stub
95
+ - security-audit
96
+ - graph-orchestrator
97
+
98
+ **Personal / general-purpose (stay in `~/.claude/skills/`):**
99
+ - nestjs (stack-specific)
100
+ - frontend-design (general)
101
+ - visual-explainer (general, third-party)
102
+ - agent-development (meta, for creating agents)
103
+ - skill-development (meta, for creating skills)
104
+ - mcp-integration (meta)
105
+ - analyzing-financial-statements (domain-specific)
106
+ - applying-brand-guidelines (domain-specific)
107
+ - creating-financial-models (domain-specific)
108
+ - writing-rules (general)
109
+ - optimize-claude-md (meta)
110
+ - record-claude-md (meta)
111
+ - self-improving-agent (meta)
112
+ - fix (general)
113
+ - vector-memory (deprecated, replaced by forge MCP server)
114
+
115
+ ## Plugin Directory Structure
116
+
117
+ ```
118
+ forge-pipeline-server/
119
+ src/ # MCP server source (existing)
120
+ dist/ # Compiled MCP server (existing)
121
+ plugin/ # Claude Code plugin root
122
+ .claude-plugin/
123
+ plugin.json # Plugin manifest
124
+ .mcp.json # Auto-start forge MCP server
125
+ agents/
126
+ strategist.md
127
+ architect.md
128
+ supervisor.md
129
+ product-manager.md
130
+ designer.md
131
+ qa-strategist.md
132
+ backend-specialist.md
133
+ frontend-specialist.md
134
+ data-specialist.md
135
+ platform-engineer.md
136
+ inspector.md
137
+ knowledge-keeper.md
138
+ skills/
139
+ interviewing/
140
+ SKILL.md
141
+ terminal-presentation/
142
+ SKILL.md
143
+ project-discovery/
144
+ SKILL.md
145
+ implementation-execution/
146
+ SKILL.md
147
+ verification-protocol/
148
+ SKILL.md
149
+ test-strategy/
150
+ SKILL.md
151
+ parallel-dispatch/
152
+ SKILL.md
153
+ agent-handoff/
154
+ SKILL.md
155
+ knowledge-curation/
156
+ SKILL.md
157
+ tdd/
158
+ SKILL.md
159
+ debugging/
160
+ SKILL.md
161
+ anti-stub/
162
+ SKILL.md
163
+ security-audit/
164
+ SKILL.md
165
+ graph-orchestrator/
166
+ SKILL.md
167
+ commands/
168
+ forge.md # /forge entry point command
169
+ docs/
170
+ workflow.md # Full orchestration documentation
171
+ README.md # Plugin overview and installation guide
172
+ ```
173
+
174
+ ## MCP Server Auto-Start Configuration
175
+
176
+ The `.mcp.json` at plugin root will auto-start the forge-pipeline-server:
177
+
178
+ ```json
179
+ {
180
+ "forge": {
181
+ "command": "node",
182
+ "args": ["${CLAUDE_PLUGIN_ROOT}/../dist/index.js"],
183
+ "env": {
184
+ "QDRANT_URL": "${QDRANT_URL}",
185
+ "FALKORDB_HOST": "${FALKORDB_HOST}",
186
+ "FALKORDB_PORT": "${FALKORDB_PORT}",
187
+ "FORGE_DB_PATH": "${FORGE_DB_PATH}"
188
+ }
189
+ }
190
+ }
191
+ ```
192
+
193
+ The `${CLAUDE_PLUGIN_ROOT}` resolves to the `plugin/` directory, so `../dist/index.js` reaches the compiled server. Environment variables with `${}` fallback to the user's shell environment or the server's internal defaults (e.g., Qdrant defaults to `localhost:6333`).
194
+
195
+ **Key design decision**: The plugin directory is a subdirectory of the server repo (`forge-pipeline-server/plugin/`), NOT a separate repo. This keeps agent prompts, server code, and tool registrations in the same repository, enabling atomic changes when a new tool requires a new agent prompt update.
196
+
197
+ ## How Agents Reference MCP Tools
198
+
199
+ When the forge MCP server is started via the plugin's `.mcp.json` with server name `forge`, Claude Code exposes its tools with the prefix `mcp__forge__`. Tool method names drop the `forge_` prefix to avoid double-forge. Agent prompts reference tools like:
200
+
201
+ - `mcp__forge__create_project`
202
+ - `mcp__forge__start_interview`
203
+ - `mcp__forge__submit_vision`
204
+ - `mcp__forge__start_architecture`
205
+ - `mcp__forge__submit_plan`
206
+ - `mcp__forge__start_implementation`
207
+ - `mcp__forge__submit_implementation`
208
+ - `mcp__forge__start_inspection`
209
+ - `mcp__forge__submit_verdict`
210
+ - `mcp__forge__collect_knowledge`
211
+ - `mcp__forge__search_knowledge`
212
+ - `mcp__forge__get_codebase_context`
213
+ - `mcp__forge__register`
214
+ - `mcp__forge__get_state`
215
+
216
+ Each agent prompt must include a "## MCP Tools" section listing the specific tools that agent uses, with brief descriptions. This serves as both documentation and a prompt-level contract.
217
+
218
+ **Tool naming note**: The server name in `.mcp.json` is `forge`, producing the prefix `mcp__forge__`. Tool method names are short (e.g. `create_project` not `forge_create_project`). This must be consistent across all agent prompts and the server's tool registrations.
219
+
220
+ ## User Stories
221
+
222
+ - **As a developer installing Forge for the first time**, I want to install one plugin and have the full agent pipeline working immediately, so that I do not need to manually copy agent files, configure MCP servers, or understand the internal structure.
223
+
224
+ - **As Adam migrating from the personal setup**, I want to delete forge-specific agents and skills from my `~/.claude/` directories and point to the plugin in the forge-pipeline-server repo, so that I have a single source of truth and can contribute improvements back to the repo.
225
+
226
+ - **As a developer starting a new project with Forge**, I want to type `/forge` and be guided through the Strategist interview, so that I do not need to know which agent to invoke or what the pipeline phases are.
227
+
228
+ - **As a developer resuming a Forge project**, I want the agents to call `forge_get_state` and pick up where I left off, so that session interruptions do not lose progress.
229
+
230
+ - **As a contributor to the forge-pipeline-server**, I want to update an agent prompt and the MCP server code in the same commit, so that tool changes and prompt changes stay in sync.
231
+
232
+ ## Constraints
233
+
234
+ - **Claude Code plugin format is the constraint.** The plugin must follow the exact directory structure: `.claude-plugin/plugin.json` at root, `agents/` with `.md` files, `skills/` with subdirectories containing `SKILL.md`, `commands/` with `.md` files, `.mcp.json` at root.
235
+ - **The MCP server must be pre-built.** The `.mcp.json` uses `node dist/index.js`, meaning the TypeScript must be compiled before the plugin works. This is acceptable for local dev (run `npm run build`), but will need consideration for distribution.
236
+ - **Environment variables for backing services.** The forge server gracefully degrades without Qdrant/FalkorDB, but full functionality requires them. The plugin cannot bundle these services -- they must be externally available.
237
+ - **Tool name prefix is determined by .mcp.json server name.** If the server name in `.mcp.json` is `forge-pipeline`, all tool references in agent prompts must use `mcp__forge-pipeline__` prefix. Changing this name would require updating every agent prompt.
238
+ - **Windows path compatibility.** The `${CLAUDE_PLUGIN_ROOT}/../dist/index.js` path traversal must work on Windows. Claude Code handles `${CLAUDE_PLUGIN_ROOT}` expansion, and Node.js resolves forward slashes on Windows, so this should work.
239
+
240
+ ## Risks and Mitigations
241
+
242
+ | Risk | Likelihood | Impact | Mitigation |
243
+ |------|-----------|--------|------------|
244
+ | `${CLAUDE_PLUGIN_ROOT}/../dist/` path traversal may not work in plugin sandbox | Medium | High | Test on all three platforms. If blocked, move plugin to repo root instead of subdirectory, or use a wrapper script. |
245
+ | MCP tool prefix changes if server name in .mcp.json changes | Low | High | Document the naming contract prominently. Add a build-time check that agent prompts reference valid tool names. |
246
+ | Agent prompts reference tools from OTHER MCP servers (e.g., `mcp__ruflo__memory_search`) that users may not have | High | Medium | Document optional MCP server dependencies in README. Make agent prompts gracefully handle missing tools by using conditional language ("if available, use..."). |
247
+ | Plugin auto-discovery loads stale agents from both plugin and personal `~/.claude/agents/` | Medium | Medium | Migration guide instructs users to remove forge agents from personal directory. Agent `name` field prevents duplicates (Claude Code deduplicates by name). |
248
+ | forge-pipeline-server `dist/` not built when plugin is first enabled | High | High | Add `postinstall` or `prepare` script. Document that `npm run build` is required. Consider pre-building in CI. |
249
+ | Large prompt sizes (some agents are 15-18KB) may hit context limits when multiple agents are loaded | Low | Medium | Claude Code loads agent prompts on-demand, not all at once. Monitor and trim if needed. |
250
+
251
+ ## Open Questions — RESOLVED
252
+
253
+ All open questions have been resolved by the user:
254
+
255
+ 1. **Plugin root**: `plugin/` subdirectory. Keeps plugin cleanly separated from server source.
256
+ 2. **Build step**: Commit `dist/` to git. Works immediately after clone, no build step needed.
257
+ 3. **External MCP refs**: Remove all external MCP references (ruflo, vexp). Agents only reference forge tools. Other integrations are additive, documented separately.
258
+ 4. **Tool prefix**: Server name is `forge` (not `forge-pipeline`). Tool METHOD names drop the `forge_` prefix to avoid double-forge. e.g. `create_project` not `forge_create_project`, yielding `mcp__forge__create_project`.
259
+
260
+ ### Tool Rename Map
261
+
262
+ | Old Name | New Name | MCP Full Name |
263
+ |----------|----------|---------------|
264
+ | `forge.register` | `register` | `mcp__forge__register` |
265
+ | `forge.init` | `init` | `mcp__forge__init` |
266
+ | `forge.list_repos` | `list_repos` | `mcp__forge__list_repos` |
267
+ | `forge.get_manifest` | `get_manifest` | `mcp__forge__get_manifest` |
268
+ | `forge.index_repo` | `index_repo` | `mcp__forge__index_repo` |
269
+ | `forge_create_project` | `create_project` | `mcp__forge__create_project` |
270
+ | `forge_get_state` | `get_state` | `mcp__forge__get_state` |
271
+ | `forge_start_interview` | `start_interview` | `mcp__forge__start_interview` |
272
+ | `forge_submit_vision` | `submit_vision` | `mcp__forge__submit_vision` |
273
+ | `forge_start_architecture` | `start_architecture` | `mcp__forge__start_architecture` |
274
+ | `forge_submit_plan` | `submit_plan` | `mcp__forge__submit_plan` |
275
+ | `forge_start_design` | `start_design` | `mcp__forge__start_design` |
276
+ | `forge_submit_design` | `submit_design` | `mcp__forge__submit_design` |
277
+ | `forge_start_qa_strategy` | `start_qa_strategy` | `mcp__forge__start_qa_strategy` |
278
+ | `forge_submit_test_plan` | `submit_test_plan` | `mcp__forge__submit_test_plan` |
279
+ | `forge_start_implementation` | `start_implementation` | `mcp__forge__start_implementation` |
280
+ | `forge_submit_implementation` | `submit_implementation` | `mcp__forge__submit_implementation` |
281
+ | `forge_start_inspection` | `start_inspection` | `mcp__forge__start_inspection` |
282
+ | `forge_submit_verdict` | `submit_verdict` | `mcp__forge__submit_verdict` |
283
+ | `forge_collect_knowledge` | `collect_knowledge` | `mcp__forge__collect_knowledge` |
284
+ | `forge_search_knowledge` | `search_knowledge` | `mcp__forge__search_knowledge` |
285
+ | `forge_get_codebase_context` | `get_codebase_context` | `mcp__forge__get_codebase_context` |
286
+ | `forge_get_project_history` | `get_project_history` | `mcp__forge__get_project_history` |
287
+ | `forge_get_patterns` | `get_patterns` | `mcp__forge__get_patterns` |
288
+ | `forge_get_gotchas` | `get_gotchas` | `mcp__forge__get_gotchas` |
289
+
290
+ ## Decision Log
291
+
292
+ | Date | Decision | Rationale | Decided By |
293
+ |------|----------|-----------|------------|
294
+ | 2026-02-26 | Plugin lives in `plugin/` subdirectory of forge-pipeline-server repo | Keeps plugin content separate from server source while enabling atomic commits. Single repo = single source of truth. | Strategist |
295
+ | 2026-02-26 | Use latest agent prompts from `~/.claude/agents/` (with Supervisor), not the stale plugin copy | The personal agents have been updated to reference the Supervisor and dynamic routing. The existing plugin copy is outdated. | Strategist |
296
+ | 2026-02-26 | graph-orchestrator skill included in plugin | Referenced by Supervisor agent for workflow graph execution. Part of the forge orchestration system. | Strategist |
297
+ | 2026-02-26 | vector-memory skill excluded from plugin | Deprecated in favor of the forge-pipeline-server's native Qdrant-based vector search. Supervisor agent prompt already marks it as deprecated. | Strategist |
298
+ | 2026-02-26 | Commit dist/ to git | Works immediately after clone with no build step. Slight repo size increase is acceptable for frictionless onboarding. | User |
299
+ | 2026-02-26 | Remove all external MCP references from agents | Agents only reference forge tools. Other integrations (ruflo, vexp) are additive and documented separately. Clean slate for new users. | User |
300
+ | 2026-02-26 | Server name is `forge`, tool methods drop `forge_` prefix | Avoids double-forge in full MCP names. `mcp__forge__create_project` is cleaner than `mcp__forge__forge_create_project`. Requires renaming all tool registrations in server code. | User |