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.
- package/.claude/hooks/worktree-create.sh +64 -0
- package/.claude/hooks/worktree-remove.sh +57 -0
- package/.claude/settings.local.json +29 -0
- package/.forge/knowledge/conventions.yaml +1 -0
- package/.forge/knowledge/decisions.yaml +1 -0
- package/.forge/knowledge/gotchas.yaml +1 -0
- package/.forge/knowledge/patterns.yaml +1 -0
- package/.forge/manifest.yaml +6 -0
- package/CLAUDE.md +144 -0
- package/bin/setup-forge.sh +132 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +553 -0
- package/dist/cli.js.map +1 -0
- package/dist/context/codebase.d.ts +57 -0
- package/dist/context/codebase.d.ts.map +1 -0
- package/dist/context/codebase.js +301 -0
- package/dist/context/codebase.js.map +1 -0
- package/dist/context/injector.d.ts +147 -0
- package/dist/context/injector.d.ts.map +1 -0
- package/dist/context/injector.js +533 -0
- package/dist/context/injector.js.map +1 -0
- package/dist/context/memory.d.ts +32 -0
- package/dist/context/memory.d.ts.map +1 -0
- package/dist/context/memory.js +140 -0
- package/dist/context/memory.js.map +1 -0
- package/dist/context/session-index.d.ts +54 -0
- package/dist/context/session-index.d.ts.map +1 -0
- package/dist/context/session-index.js +265 -0
- package/dist/context/session-index.js.map +1 -0
- package/dist/context/session.d.ts +42 -0
- package/dist/context/session.d.ts.map +1 -0
- package/dist/context/session.js +121 -0
- package/dist/context/session.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/ingestion/chunker.d.ts +19 -0
- package/dist/ingestion/chunker.d.ts.map +1 -0
- package/dist/ingestion/chunker.js +189 -0
- package/dist/ingestion/chunker.js.map +1 -0
- package/dist/ingestion/embedder.d.ts +45 -0
- package/dist/ingestion/embedder.d.ts.map +1 -0
- package/dist/ingestion/embedder.js +152 -0
- package/dist/ingestion/embedder.js.map +1 -0
- package/dist/ingestion/git-analyzer.d.ts +77 -0
- package/dist/ingestion/git-analyzer.d.ts.map +1 -0
- package/dist/ingestion/git-analyzer.js +437 -0
- package/dist/ingestion/git-analyzer.js.map +1 -0
- package/dist/ingestion/indexer.d.ts +79 -0
- package/dist/ingestion/indexer.d.ts.map +1 -0
- package/dist/ingestion/indexer.js +766 -0
- package/dist/ingestion/indexer.js.map +1 -0
- package/dist/ingestion/markdown-chunker.d.ts +19 -0
- package/dist/ingestion/markdown-chunker.d.ts.map +1 -0
- package/dist/ingestion/markdown-chunker.js +243 -0
- package/dist/ingestion/markdown-chunker.js.map +1 -0
- package/dist/ingestion/markdown-knowledge.d.ts +21 -0
- package/dist/ingestion/markdown-knowledge.d.ts.map +1 -0
- package/dist/ingestion/markdown-knowledge.js +129 -0
- package/dist/ingestion/markdown-knowledge.js.map +1 -0
- package/dist/ingestion/parser.d.ts +20 -0
- package/dist/ingestion/parser.d.ts.map +1 -0
- package/dist/ingestion/parser.js +429 -0
- package/dist/ingestion/parser.js.map +1 -0
- package/dist/ingestion/watcher.d.ts +28 -0
- package/dist/ingestion/watcher.d.ts.map +1 -0
- package/dist/ingestion/watcher.js +147 -0
- package/dist/ingestion/watcher.js.map +1 -0
- package/dist/knowledge/hydrator.d.ts +37 -0
- package/dist/knowledge/hydrator.d.ts.map +1 -0
- package/dist/knowledge/hydrator.js +220 -0
- package/dist/knowledge/hydrator.js.map +1 -0
- package/dist/knowledge/registry.d.ts +129 -0
- package/dist/knowledge/registry.d.ts.map +1 -0
- package/dist/knowledge/registry.js +361 -0
- package/dist/knowledge/registry.js.map +1 -0
- package/dist/knowledge/search.d.ts +114 -0
- package/dist/knowledge/search.d.ts.map +1 -0
- package/dist/knowledge/search.js +428 -0
- package/dist/knowledge/search.js.map +1 -0
- package/dist/knowledge/store.d.ts +76 -0
- package/dist/knowledge/store.d.ts.map +1 -0
- package/dist/knowledge/store.js +230 -0
- package/dist/knowledge/store.js.map +1 -0
- package/dist/learning/confidence.d.ts +30 -0
- package/dist/learning/confidence.d.ts.map +1 -0
- package/dist/learning/confidence.js +165 -0
- package/dist/learning/confidence.js.map +1 -0
- package/dist/learning/patterns.d.ts +52 -0
- package/dist/learning/patterns.d.ts.map +1 -0
- package/dist/learning/patterns.js +290 -0
- package/dist/learning/patterns.js.map +1 -0
- package/dist/learning/trajectory.d.ts +55 -0
- package/dist/learning/trajectory.d.ts.map +1 -0
- package/dist/learning/trajectory.js +200 -0
- package/dist/learning/trajectory.js.map +1 -0
- package/dist/memory/memory-compat.d.ts +100 -0
- package/dist/memory/memory-compat.d.ts.map +1 -0
- package/dist/memory/memory-compat.js +146 -0
- package/dist/memory/memory-compat.js.map +1 -0
- package/dist/memory/observation-store.d.ts +57 -0
- package/dist/memory/observation-store.d.ts.map +1 -0
- package/dist/memory/observation-store.js +154 -0
- package/dist/memory/observation-store.js.map +1 -0
- package/dist/memory/session-tracker.d.ts +81 -0
- package/dist/memory/session-tracker.d.ts.map +1 -0
- package/dist/memory/session-tracker.js +262 -0
- package/dist/memory/session-tracker.js.map +1 -0
- package/dist/pipeline/engine.d.ts +179 -0
- package/dist/pipeline/engine.d.ts.map +1 -0
- package/dist/pipeline/engine.js +691 -0
- package/dist/pipeline/engine.js.map +1 -0
- package/dist/pipeline/events.d.ts +54 -0
- package/dist/pipeline/events.d.ts.map +1 -0
- package/dist/pipeline/events.js +157 -0
- package/dist/pipeline/events.js.map +1 -0
- package/dist/pipeline/parallel.d.ts +83 -0
- package/dist/pipeline/parallel.d.ts.map +1 -0
- package/dist/pipeline/parallel.js +277 -0
- package/dist/pipeline/parallel.js.map +1 -0
- package/dist/pipeline/state-machine.d.ts +65 -0
- package/dist/pipeline/state-machine.d.ts.map +1 -0
- package/dist/pipeline/state-machine.js +176 -0
- package/dist/pipeline/state-machine.js.map +1 -0
- package/dist/query/graph-queries.d.ts +84 -0
- package/dist/query/graph-queries.d.ts.map +1 -0
- package/dist/query/graph-queries.js +216 -0
- package/dist/query/graph-queries.js.map +1 -0
- package/dist/query/hybrid-search.d.ts +34 -0
- package/dist/query/hybrid-search.d.ts.map +1 -0
- package/dist/query/hybrid-search.js +263 -0
- package/dist/query/hybrid-search.js.map +1 -0
- package/dist/query/intent-detector.d.ts +35 -0
- package/dist/query/intent-detector.d.ts.map +1 -0
- package/dist/query/intent-detector.js +115 -0
- package/dist/query/intent-detector.js.map +1 -0
- package/dist/query/ranking.d.ts +57 -0
- package/dist/query/ranking.d.ts.map +1 -0
- package/dist/query/ranking.js +109 -0
- package/dist/query/ranking.js.map +1 -0
- package/dist/server.d.ts +3 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +291 -0
- package/dist/server.js.map +1 -0
- package/dist/storage/falkordb-store.d.ts +73 -0
- package/dist/storage/falkordb-store.d.ts.map +1 -0
- package/dist/storage/falkordb-store.js +346 -0
- package/dist/storage/falkordb-store.js.map +1 -0
- package/dist/storage/file-cache.d.ts +32 -0
- package/dist/storage/file-cache.d.ts.map +1 -0
- package/dist/storage/file-cache.js +115 -0
- package/dist/storage/file-cache.js.map +1 -0
- package/dist/storage/interfaces.d.ts +151 -0
- package/dist/storage/interfaces.d.ts.map +1 -0
- package/dist/storage/interfaces.js +7 -0
- package/dist/storage/interfaces.js.map +1 -0
- package/dist/storage/qdrant-store.d.ts +110 -0
- package/dist/storage/qdrant-store.d.ts.map +1 -0
- package/dist/storage/qdrant-store.js +467 -0
- package/dist/storage/qdrant-store.js.map +1 -0
- package/dist/storage/schema.d.ts +4 -0
- package/dist/storage/schema.d.ts.map +1 -0
- package/dist/storage/schema.js +136 -0
- package/dist/storage/schema.js.map +1 -0
- package/dist/storage/sqlite.d.ts +35 -0
- package/dist/storage/sqlite.d.ts.map +1 -0
- package/dist/storage/sqlite.js +132 -0
- package/dist/storage/sqlite.js.map +1 -0
- package/dist/tools/collaboration-tools.d.ts +111 -0
- package/dist/tools/collaboration-tools.d.ts.map +1 -0
- package/dist/tools/collaboration-tools.js +174 -0
- package/dist/tools/collaboration-tools.js.map +1 -0
- package/dist/tools/context-tools.d.ts +293 -0
- package/dist/tools/context-tools.d.ts.map +1 -0
- package/dist/tools/context-tools.js +437 -0
- package/dist/tools/context-tools.js.map +1 -0
- package/dist/tools/graph-tools.d.ts +129 -0
- package/dist/tools/graph-tools.d.ts.map +1 -0
- package/dist/tools/graph-tools.js +237 -0
- package/dist/tools/graph-tools.js.map +1 -0
- package/dist/tools/ingestion-tools.d.ts +96 -0
- package/dist/tools/ingestion-tools.d.ts.map +1 -0
- package/dist/tools/ingestion-tools.js +90 -0
- package/dist/tools/ingestion-tools.js.map +1 -0
- package/dist/tools/learning-tools.d.ts +168 -0
- package/dist/tools/learning-tools.d.ts.map +1 -0
- package/dist/tools/learning-tools.js +158 -0
- package/dist/tools/learning-tools.js.map +1 -0
- package/dist/tools/memory-tools.d.ts +183 -0
- package/dist/tools/memory-tools.d.ts.map +1 -0
- package/dist/tools/memory-tools.js +197 -0
- package/dist/tools/memory-tools.js.map +1 -0
- package/dist/tools/phase-tools.d.ts +954 -0
- package/dist/tools/phase-tools.d.ts.map +1 -0
- package/dist/tools/phase-tools.js +1215 -0
- package/dist/tools/phase-tools.js.map +1 -0
- package/dist/tools/pipeline-tools.d.ts +140 -0
- package/dist/tools/pipeline-tools.d.ts.map +1 -0
- package/dist/tools/pipeline-tools.js +162 -0
- package/dist/tools/pipeline-tools.js.map +1 -0
- package/dist/tools/registration-tools.d.ts +220 -0
- package/dist/tools/registration-tools.d.ts.map +1 -0
- package/dist/tools/registration-tools.js +391 -0
- package/dist/tools/registration-tools.js.map +1 -0
- package/dist/util/circuit-breaker.d.ts +75 -0
- package/dist/util/circuit-breaker.d.ts.map +1 -0
- package/dist/util/circuit-breaker.js +159 -0
- package/dist/util/circuit-breaker.js.map +1 -0
- package/dist/util/config.d.ts +23 -0
- package/dist/util/config.d.ts.map +1 -0
- package/dist/util/config.js +164 -0
- package/dist/util/config.js.map +1 -0
- package/dist/util/logger.d.ts +13 -0
- package/dist/util/logger.d.ts.map +1 -0
- package/dist/util/logger.js +45 -0
- package/dist/util/logger.js.map +1 -0
- package/dist/util/token-counter.d.ts +24 -0
- package/dist/util/token-counter.d.ts.map +1 -0
- package/dist/util/token-counter.js +48 -0
- package/dist/util/token-counter.js.map +1 -0
- package/dist/util/types.d.ts +525 -0
- package/dist/util/types.d.ts.map +1 -0
- package/dist/util/types.js +5 -0
- package/dist/util/types.js.map +1 -0
- package/docker-compose.yml +20 -0
- package/docs/plans/2026-02-27-swarm-coordination/architecture.md +203 -0
- package/docs/plans/2026-02-27-swarm-coordination/vision.md +57 -0
- package/docs/plans/completed/2026-02-26-forge-plugin-bundling/architecture.md +1 -0
- package/docs/plans/completed/2026-02-26-forge-plugin-bundling/vision.md +300 -0
- package/docs/plans/completed/2026-02-27-forge-swarm-learning/architecture.md +480 -0
- package/docs/plans/completed/2026-02-27-forge-swarm-learning/verification-checklist.md +462 -0
- package/docs/plans/completed/2026-02-27-git-history-atlassian/git-jira-plan.md +181 -0
- package/package.json +39 -0
- package/plugin/.claude-plugin/plugin.json +8 -0
- package/plugin/.mcp.json +15 -0
- package/plugin/README.md +134 -0
- package/plugin/agents/architect.md +367 -0
- package/plugin/agents/backend-specialist.md +263 -0
- package/plugin/agents/brainstormer.md +122 -0
- package/plugin/agents/data-specialist.md +266 -0
- package/plugin/agents/designer.md +408 -0
- package/plugin/agents/frontend-specialist.md +241 -0
- package/plugin/agents/inspector.md +406 -0
- package/plugin/agents/knowledge-keeper.md +443 -0
- package/plugin/agents/platform-engineer.md +326 -0
- package/plugin/agents/product-manager.md +268 -0
- package/plugin/agents/product-owner.md +438 -0
- package/plugin/agents/pulse-checker.md +73 -0
- package/plugin/agents/qa-strategist.md +500 -0
- package/plugin/agents/self-improver.md +310 -0
- package/plugin/agents/strategist.md +360 -0
- package/plugin/agents/supervisor.md +380 -0
- package/plugin/commands/brainstorm.md +25 -0
- package/plugin/commands/forge.md +88 -0
- package/plugin/docs/atlassian-integration.md +110 -0
- package/plugin/docs/workflow.md +126 -0
- package/plugin/skills/agent-development/.skillfish.json +10 -0
- package/plugin/skills/agent-development/SKILL.md +415 -0
- package/plugin/skills/agent-development/examples/agent-creation-prompt.md +238 -0
- package/plugin/skills/agent-development/examples/complete-agent-examples.md +427 -0
- package/plugin/skills/agent-development/references/agent-creation-system-prompt.md +207 -0
- package/plugin/skills/agent-development/references/system-prompt-design.md +411 -0
- package/plugin/skills/agent-development/references/triggering-examples.md +491 -0
- package/plugin/skills/agent-development/scripts/validate-agent.sh +217 -0
- package/plugin/skills/agent-handoff/SKILL.md +335 -0
- package/plugin/skills/anti-stub/SKILL.md +317 -0
- package/plugin/skills/brainstorm/SKILL.md +31 -0
- package/plugin/skills/debugging/SKILL.md +276 -0
- package/plugin/skills/fix/SKILL.md +62 -0
- package/plugin/skills/frontend-design/.skillfish.json +10 -0
- package/plugin/skills/frontend-design/SKILL.md +42 -0
- package/plugin/skills/gotchas/SKILL.md +61 -0
- package/plugin/skills/graph-orchestrator/SKILL.md +38 -0
- package/plugin/skills/history/SKILL.md +58 -0
- package/plugin/skills/impact/SKILL.md +59 -0
- package/plugin/skills/implementation-execution/SKILL.md +291 -0
- package/plugin/skills/index-repo/SKILL.md +55 -0
- package/plugin/skills/interviewing/SKILL.md +225 -0
- package/plugin/skills/knowledge-curation/SKILL.md +393 -0
- package/plugin/skills/learn/SKILL.md +69 -0
- package/plugin/skills/mcp-integration/.skillfish.json +10 -0
- package/plugin/skills/mcp-integration/SKILL.md +554 -0
- package/plugin/skills/mcp-integration/examples/http-server.json +20 -0
- package/plugin/skills/mcp-integration/examples/sse-server.json +19 -0
- package/plugin/skills/mcp-integration/examples/stdio-server.json +26 -0
- package/plugin/skills/mcp-integration/references/authentication.md +549 -0
- package/plugin/skills/mcp-integration/references/server-types.md +536 -0
- package/plugin/skills/mcp-integration/references/tool-usage.md +538 -0
- package/plugin/skills/nestjs/.skillfish.json +10 -0
- package/plugin/skills/nestjs/SKILL.md +669 -0
- package/plugin/skills/nestjs/drizzle-reference.md +1894 -0
- package/plugin/skills/nestjs/reference.md +1447 -0
- package/plugin/skills/nestjs/workflow-optimization.md +229 -0
- package/plugin/skills/parallel-dispatch/SKILL.md +308 -0
- package/plugin/skills/project-discovery/SKILL.md +304 -0
- package/plugin/skills/search/SKILL.md +56 -0
- package/plugin/skills/security-audit/SKILL.md +362 -0
- package/plugin/skills/skill-development/.skillfish.json +10 -0
- package/plugin/skills/skill-development/SKILL.md +637 -0
- package/plugin/skills/skill-development/references/skill-creator-original.md +209 -0
- package/plugin/skills/tdd/SKILL.md +273 -0
- package/plugin/skills/terminal-presentation/SKILL.md +395 -0
- package/plugin/skills/test-strategy/SKILL.md +365 -0
- package/plugin/skills/verification-protocol/SKILL.md +256 -0
- package/plugin/skills/visual-explainer/CHANGELOG.md +97 -0
- package/plugin/skills/visual-explainer/LICENSE +21 -0
- package/plugin/skills/visual-explainer/README.md +137 -0
- package/plugin/skills/visual-explainer/SKILL.md +352 -0
- package/plugin/skills/visual-explainer/banner.png +0 -0
- package/plugin/skills/visual-explainer/package.json +11 -0
- package/plugin/skills/visual-explainer/prompts/diff-review.md +68 -0
- package/plugin/skills/visual-explainer/prompts/fact-check.md +63 -0
- package/plugin/skills/visual-explainer/prompts/generate-slides.md +18 -0
- package/plugin/skills/visual-explainer/prompts/generate-web-diagram.md +10 -0
- package/plugin/skills/visual-explainer/prompts/plan-review.md +86 -0
- package/plugin/skills/visual-explainer/prompts/project-recap.md +61 -0
- package/plugin/skills/visual-explainer/references/css-patterns.md +1188 -0
- package/plugin/skills/visual-explainer/references/libraries.md +470 -0
- package/plugin/skills/visual-explainer/references/responsive-nav.md +212 -0
- package/plugin/skills/visual-explainer/references/slide-patterns.md +1403 -0
- package/plugin/skills/visual-explainer/templates/architecture.html +596 -0
- package/plugin/skills/visual-explainer/templates/data-table.html +540 -0
- package/plugin/skills/visual-explainer/templates/mermaid-flowchart.html +435 -0
- package/plugin/skills/visual-explainer/templates/slide-deck.html +913 -0
- package/src/cli.ts +655 -0
- package/src/context/.gitkeep +0 -0
- package/src/context/codebase.ts +393 -0
- package/src/context/injector.ts +797 -0
- package/src/context/memory.ts +187 -0
- package/src/context/session-index.ts +327 -0
- package/src/context/session.ts +152 -0
- package/src/index.ts +47 -0
- package/src/ingestion/.gitkeep +0 -0
- package/src/ingestion/chunker.ts +277 -0
- package/src/ingestion/embedder.ts +167 -0
- package/src/ingestion/git-analyzer.ts +545 -0
- package/src/ingestion/indexer.ts +984 -0
- package/src/ingestion/markdown-chunker.ts +337 -0
- package/src/ingestion/markdown-knowledge.ts +175 -0
- package/src/ingestion/parser.ts +475 -0
- package/src/ingestion/watcher.ts +182 -0
- package/src/knowledge/.gitkeep +0 -0
- package/src/knowledge/hydrator.ts +246 -0
- package/src/knowledge/registry.ts +463 -0
- package/src/knowledge/search.ts +565 -0
- package/src/knowledge/store.ts +262 -0
- package/src/learning/.gitkeep +0 -0
- package/src/learning/confidence.ts +193 -0
- package/src/learning/patterns.ts +360 -0
- package/src/learning/trajectory.ts +268 -0
- package/src/memory/.gitkeep +0 -0
- package/src/memory/memory-compat.ts +233 -0
- package/src/memory/observation-store.ts +224 -0
- package/src/memory/session-tracker.ts +332 -0
- package/src/pipeline/.gitkeep +0 -0
- package/src/pipeline/engine.ts +1139 -0
- package/src/pipeline/events.ts +253 -0
- package/src/pipeline/parallel.ts +394 -0
- package/src/pipeline/state-machine.ts +199 -0
- package/src/query/.gitkeep +0 -0
- package/src/query/graph-queries.ts +262 -0
- package/src/query/hybrid-search.ts +337 -0
- package/src/query/intent-detector.ts +131 -0
- package/src/query/ranking.ts +161 -0
- package/src/server.ts +352 -0
- package/src/storage/.gitkeep +0 -0
- package/src/storage/falkordb-store.ts +388 -0
- package/src/storage/file-cache.ts +141 -0
- package/src/storage/interfaces.ts +201 -0
- package/src/storage/qdrant-store.ts +557 -0
- package/src/storage/schema.ts +139 -0
- package/src/storage/sqlite.ts +168 -0
- package/src/tools/.gitkeep +0 -0
- package/src/tools/collaboration-tools.ts +208 -0
- package/src/tools/context-tools.ts +493 -0
- package/src/tools/graph-tools.ts +295 -0
- package/src/tools/ingestion-tools.ts +122 -0
- package/src/tools/learning-tools.ts +181 -0
- package/src/tools/memory-tools.ts +234 -0
- package/src/tools/phase-tools.ts +1452 -0
- package/src/tools/pipeline-tools.ts +188 -0
- package/src/tools/registration-tools.ts +450 -0
- package/src/util/.gitkeep +0 -0
- package/src/util/circuit-breaker.ts +193 -0
- package/src/util/config.ts +177 -0
- package/src/util/logger.ts +53 -0
- package/src/util/token-counter.ts +52 -0
- package/src/util/types.ts +710 -0
- package/tests/context/.gitkeep +0 -0
- package/tests/integration/.gitkeep +0 -0
- package/tests/knowledge/.gitkeep +0 -0
- package/tests/learning/.gitkeep +0 -0
- package/tests/pipeline/.gitkeep +0 -0
- package/tests/tools/.gitkeep +0 -0
- package/tsconfig.json +21 -0
- package/vitest.config.ts +10 -0
- package/vscode-extension/.vscodeignore +7 -0
- package/vscode-extension/README.md +43 -0
- package/vscode-extension/out/edge-collector.js +274 -0
- package/vscode-extension/out/edge-collector.js.map +1 -0
- package/vscode-extension/out/extension.js +264 -0
- package/vscode-extension/out/extension.js.map +1 -0
- package/vscode-extension/out/forge-client.js +318 -0
- package/vscode-extension/out/forge-client.js.map +1 -0
- package/vscode-extension/package-lock.json +59 -0
- package/vscode-extension/package.json +71 -0
- package/vscode-extension/src/edge-collector.ts +320 -0
- package/vscode-extension/src/extension.ts +269 -0
- package/vscode-extension/src/forge-client.ts +364 -0
- package/vscode-extension/tsconfig.json +19 -0
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
> **Status**: COMPLETE (2026-02-27). All 5 phases implemented. 12 new MCP tools added (22 -> 34), 5-signal scoring, auto-observations on all submit_* handlers, confidence tracking with decay, git history enrichment, Atlassian integration, VS Code extension, all 12 agent prompts updated. Executed via 10 parallel agents using `general-purpose` type (worktree isolation bypassed due to Windows detection bug). Archived to `docs/plans/completed/` on 2026-02-27.
|
|
2
|
+
|
|
3
|
+
# Plan: Forge 2-Way Query Engine — Swarm Learning Architecture
|
|
4
|
+
|
|
5
|
+
## Context
|
|
6
|
+
|
|
7
|
+
The forge pipeline server was built from the Graph RAG vision to replace vexp. The vector search, graph layer, AST parsing, hybrid scoring, and knowledge system are all implemented. But **most of the internal machinery is not exposed as MCP tools**:
|
|
8
|
+
|
|
9
|
+
- `QUERY_INBOUND_IMPACT` / `QUERY_OUTBOUND_IMPACT` Cypher queries exist in `graph-queries.ts` — **no MCP tool**
|
|
10
|
+
- `QUERY_SHORTEST_PATH` Cypher query exists — **no MCP tool**
|
|
11
|
+
- `observation-store.ts` has full `saveObservation()` with symbol linking — **no MCP tool**
|
|
12
|
+
- `session-tracker.ts` has `getRecentSessionObservations()`, `getSessionInfo()` — **no MCP tool**
|
|
13
|
+
- `confidence.ts` has `ConfidenceManager.boost()` and `decayAll()` — **never called**
|
|
14
|
+
- `intent-detector.ts` has `detectIntent()` + `getIntentStrategy()` — **bypassed** (hardcoded `'read'` at `context-tools.ts:131`)
|
|
15
|
+
- `MemoryBridge` has `saveMemory()` + `searchMemories()` — **only used in interview context injection**
|
|
16
|
+
|
|
17
|
+
The result is that forge has 22 MCP tools but agents can't access impact graphs, logic flows, session memory, or observation persistence. The knowledge confidence system exists but is inert. The intent detector exists but is bypassed.
|
|
18
|
+
|
|
19
|
+
**Goal**: Wire up all internal capabilities as MCP tools, add auto-observation during pipeline execution, activate confidence tracking, implement git history enrichment, and update all 12 agent prompts. Transform forge into a bidirectional query engine where agents pull context (Way 1) and push learnings back (Way 2).
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Phase 1: vexp Feature Parity — Expose Internal Code as MCP Tools
|
|
24
|
+
|
|
25
|
+
**Value**: Agents gain impact graphs, logic flows, session memory, and intent-aware search. Zero new algorithms needed — this is pure wiring.
|
|
26
|
+
|
|
27
|
+
### 1.1 Create `src/tools/memory-tools.ts` (NEW)
|
|
28
|
+
|
|
29
|
+
Three tools following the pattern in `context-tools.ts`:
|
|
30
|
+
|
|
31
|
+
**`save_observation`** — wraps `saveObservation()` from `src/memory/observation-store.ts:56`
|
|
32
|
+
- Schema: `{ content, symbols?[], repo_id?, importance?, tags?[], category?, type? }`
|
|
33
|
+
- Handler: calls `saveObservation()` with `getCurrentSessionId()` from `session-tracker.ts:32`
|
|
34
|
+
- Returns: `{ id, stored, linkedSymbols, unresolvedSymbols }`
|
|
35
|
+
|
|
36
|
+
**`search_memory`** — wraps `MemoryBridge.searchMemories()` from `src/context/memory.ts:46`
|
|
37
|
+
- Schema: `{ query, repo_id?, session_id?, limit?, score_threshold? }`
|
|
38
|
+
- Returns: `{ results: [{ content, created_at, relevance_score, session_id }] }`
|
|
39
|
+
|
|
40
|
+
**`get_session_context`** — wraps `getRecentSessionObservations()` from `src/memory/session-tracker.ts:177`
|
|
41
|
+
- Schema: `{ query?, session_count?, limit? }`
|
|
42
|
+
- Returns: `{ current_session: {...}, recent_sessions: [...groups] }`
|
|
43
|
+
- Also calls `persistSessionMarker()` (line 83) to ensure current session is discoverable
|
|
44
|
+
|
|
45
|
+
### 1.2 Create `src/tools/graph-tools.ts` (NEW)
|
|
46
|
+
|
|
47
|
+
Two tools:
|
|
48
|
+
|
|
49
|
+
**`get_impact_graph`** — wraps `QUERY_INBOUND_IMPACT` / `QUERY_OUTBOUND_IMPACT` from `src/query/graph-queries.ts:66-81`
|
|
50
|
+
- Schema: `{ symbol, repo_id, direction: 'inbound'|'outbound'|'both', depth? }`
|
|
51
|
+
- Handler: executes appropriate Cypher via `graphStore.query()`, parses raw FalkorDB response
|
|
52
|
+
- Returns: `{ symbol, direction, nodes: [...], edges: [...], total_nodes, total_edges }`
|
|
53
|
+
- Graceful degradation: returns `{ error: 'GRAPH_UNAVAILABLE' }` when FalkorDB is down
|
|
54
|
+
|
|
55
|
+
**`search_logic_flow`** — wraps `QUERY_SHORTEST_PATH` from `src/query/graph-queries.ts:90-96`
|
|
56
|
+
- Schema: `{ from_symbol, to_symbol, repo_id, max_depth? }`
|
|
57
|
+
- Returns: `{ from_symbol, to_symbol, paths: [...], connected: boolean }`
|
|
58
|
+
|
|
59
|
+
### 1.3 Wire intent detection into `get_codebase_context`
|
|
60
|
+
|
|
61
|
+
**Modify**: `src/tools/context-tools.ts`
|
|
62
|
+
- Import `detectIntent`, `getIntentStrategy` from `src/query/intent-detector.ts`
|
|
63
|
+
- Call `detectIntent(input.query)` to classify query
|
|
64
|
+
- Call `getIntentStrategy(intent)` to get weight adjustments
|
|
65
|
+
- Pass weights through to `codebaseContext.getContext()` (requires adding fields to `CodebaseContextOptions`)
|
|
66
|
+
- Return actual detected `query_intent` instead of hardcoded `'read'`
|
|
67
|
+
- Also populate `related_memories` by calling `memoryBridge.searchMemories()` (currently returns `[]` at line 130)
|
|
68
|
+
|
|
69
|
+
**Modify**: `src/context/codebase.ts` — Add to `CodebaseContextOptions` (line 28):
|
|
70
|
+
```typescript
|
|
71
|
+
vectorWeight?: number; // from intent strategy, default 0.6
|
|
72
|
+
graphWeight?: number; // from intent strategy, default 0.3
|
|
73
|
+
recencyWeight?: number; // from intent strategy, default 0.1
|
|
74
|
+
expandDepth?: number; // from intent strategy, default 2
|
|
75
|
+
```
|
|
76
|
+
In `getContext()` at line 76, destructure these from options and pass to `hybridSearch()` call at line 127-135:
|
|
77
|
+
```typescript
|
|
78
|
+
const searchResults = await hybridSearch(this.vectorStore, effectiveGraph, {
|
|
79
|
+
query,
|
|
80
|
+
repoId,
|
|
81
|
+
limit: maxResults * 2,
|
|
82
|
+
includeTests: options.includeTests ?? includeTests, // intent strategy can override
|
|
83
|
+
vectorWeight: options.vectorWeight,
|
|
84
|
+
graphWeight: options.graphWeight,
|
|
85
|
+
});
|
|
86
|
+
```
|
|
87
|
+
Note: `hybridSearch` already accepts `vectorWeight` and `graphWeight` in `HybridSearchOptions` (hybrid-search.ts:24-25).
|
|
88
|
+
|
|
89
|
+
### 1.4 Add `get_index_status` to `src/tools/registration-tools.ts`
|
|
90
|
+
|
|
91
|
+
- Schema: `{ repo_id? }`
|
|
92
|
+
- Consolidates: `vectorStore.getCounts()`, `graphStore.getCounts()`, `fileCache.getStats()`, `getUptimeSeconds()` from session-tracker, health status for each backend
|
|
93
|
+
- Returns: `{ repos, qdrant_health, falkordb_health, uptime_seconds, embedding_model, cache_stats }`
|
|
94
|
+
|
|
95
|
+
### 1.5 Wire into `src/server.ts`
|
|
96
|
+
|
|
97
|
+
- Import `createMemoryTools` and `createGraphTools`
|
|
98
|
+
- Create factories: `createMemoryTools(memoryBridge, vectorStore, graphStore)`, `createGraphTools(graphStore)`
|
|
99
|
+
- Spread into `allTools`
|
|
100
|
+
- Pass `memoryBridge` to `createContextTools()` (for `related_memories` in `get_codebase_context`)
|
|
101
|
+
|
|
102
|
+
### Phase 1 Files
|
|
103
|
+
|
|
104
|
+
| File | Action |
|
|
105
|
+
|------|--------|
|
|
106
|
+
| `src/tools/memory-tools.ts` | CREATE |
|
|
107
|
+
| `src/tools/graph-tools.ts` | CREATE |
|
|
108
|
+
| `src/tools/context-tools.ts` | MODIFY — intent detection + related_memories |
|
|
109
|
+
| `src/tools/registration-tools.ts` | MODIFY — add get_index_status |
|
|
110
|
+
| `src/context/codebase.ts` | MODIFY — accept weight overrides in options, pass to hybridSearch |
|
|
111
|
+
| `src/server.ts` | MODIFY — wire new tool factories |
|
|
112
|
+
|
|
113
|
+
**Tool count: 22 → 28** (+6: save_observation, search_memory, get_session_context, get_impact_graph, search_logic_flow, get_index_status)
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Phase 2: Swarm Learning — Auto-Observations + Confidence Tracking
|
|
118
|
+
|
|
119
|
+
**Value**: Agents automatically push learnings during pipeline execution. Knowledge items that prove useful gain confidence; unused ones decay. The system gets smarter over time.
|
|
120
|
+
|
|
121
|
+
### 2.1 Auto-observations in phase handlers
|
|
122
|
+
|
|
123
|
+
**Modify**: `src/tools/phase-tools.ts`
|
|
124
|
+
|
|
125
|
+
In each `submit_*` handler, after successfully storing the phase output in SQLite, fire-and-forget call to `saveObservation()`:
|
|
126
|
+
- `submit_vision`: save summary of vision (first 500 chars), `type: 'procedural'`, `category: 'vision'`, `importance: 0.6`
|
|
127
|
+
- `submit_plan`: save architecture summary, `category: 'architecture'`, `importance: 0.6`
|
|
128
|
+
- `submit_design`: save design summary, `category: 'design'`, `importance: 0.5`
|
|
129
|
+
- `submit_test_plan`: save test plan summary, `category: 'test_plan'`, `importance: 0.5`
|
|
130
|
+
- `submit_implementation`: save module completion summary, `category: 'implementation'`, `importance: 0.5`
|
|
131
|
+
- `submit_verdict`: save verdict + findings summary, `category: 'inspection'`, `importance: 0.7`
|
|
132
|
+
- All tagged with `['auto_observation', phase_name, project_id]`
|
|
133
|
+
- All wrapped in try/catch, logged on failure, **never block** the phase transition
|
|
134
|
+
|
|
135
|
+
Needs: import `saveObservation` from `observation-store.ts`, `getCurrentSessionId` from `session-tracker.ts`, and access to `vectorStore` + `graphStore` (pass through `createPhaseTools` factory as `createPhaseTools(engine, contextInjector, vectorStore, graphStore)`).
|
|
136
|
+
|
|
137
|
+
**CRITICAL**: Guard against `vectorStore === null` and `graphStore === null`. When either backend is unavailable, skip auto-observation silently (log at debug level, never throw).
|
|
138
|
+
|
|
139
|
+
### 2.2 Staleness detection on re-index
|
|
140
|
+
|
|
141
|
+
**Modify**: `src/ingestion/indexer.ts`
|
|
142
|
+
|
|
143
|
+
When a file is re-indexed and entities have changed (AST diff between old and new), call `MARK_SYMBOL_OBSERVATIONS_STALE` from `graph-queries.ts:170` for each changed symbol. This invalidates observations that reference modified code.
|
|
144
|
+
|
|
145
|
+
### 2.3 Wire confidence tracking
|
|
146
|
+
|
|
147
|
+
**Modify**: `src/context/injector.ts`
|
|
148
|
+
- Accept `ConfidenceManager` (from `src/learning/confidence.ts`) + `QdrantVectorStore` in constructor
|
|
149
|
+
- After each `knowledgeSearch.search*()` call that returns results, fire-and-forget `confidenceManager.boost()` for each result ID
|
|
150
|
+
- This means knowledge items actually used by agents see confidence rise automatically
|
|
151
|
+
|
|
152
|
+
**Modify**: `src/server.ts`
|
|
153
|
+
- Instantiate `ConfidenceManager`
|
|
154
|
+
- Pass to `ContextInjector` constructor
|
|
155
|
+
- Add periodic decay: `setInterval(() => confidenceManager.decayAll(vectorStore), 24 * 60 * 60 * 1000)` (daily)
|
|
156
|
+
|
|
157
|
+
### 2.4 Add `boost_knowledge` and `decay_knowledge` MCP tools
|
|
158
|
+
|
|
159
|
+
**Modify**: `src/tools/learning-tools.ts`
|
|
160
|
+
|
|
161
|
+
**`boost_knowledge`**: `{ knowledge_id, amount?, reason? }` — calls `confidenceManager.boost()`
|
|
162
|
+
**`decay_knowledge`**: `{ decay_rate? }` — calls `confidenceManager.decayAll()`
|
|
163
|
+
|
|
164
|
+
For Knowledge Keeper agent to use explicitly when it identifies valuable or outdated knowledge.
|
|
165
|
+
|
|
166
|
+
### Phase 2 Files
|
|
167
|
+
|
|
168
|
+
| File | Action |
|
|
169
|
+
|------|--------|
|
|
170
|
+
| `src/tools/phase-tools.ts` | MODIFY — auto-observation on each submit |
|
|
171
|
+
| `src/ingestion/indexer.ts` | MODIFY — mark stale observations on re-index |
|
|
172
|
+
| `src/context/injector.ts` | MODIFY — auto-boost on knowledge injection |
|
|
173
|
+
| `src/tools/learning-tools.ts` | MODIFY — add boost_knowledge, decay_knowledge |
|
|
174
|
+
| `src/server.ts` | MODIFY — wire ConfidenceManager, periodic decay |
|
|
175
|
+
|
|
176
|
+
**Tool count: 28 → 30** (+2: boost_knowledge, decay_knowledge)
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Phase 3: Git History Enrichment
|
|
181
|
+
|
|
182
|
+
**Value**: 4th scoring signal (hotspot), commit message search, file stability metrics. Implements git-jira-plan.md Part 1.
|
|
183
|
+
|
|
184
|
+
### 3.1 Types
|
|
185
|
+
|
|
186
|
+
**Modify**: `src/util/types.ts`
|
|
187
|
+
- Add `FileChangeStats`: `{ commitCount, stabilityScore, changeVelocity, lastCommitHash, lastCommitTs, recentMessages[] }`
|
|
188
|
+
- Add `CommitRecord`: `{ hash, message, author, timestamp, files[] }`
|
|
189
|
+
- Add `GitCommitPayload` for Qdrant: `{ repo_id, commit_hash, message, author, timestamp, file_paths[] }`
|
|
190
|
+
|
|
191
|
+
### 3.2 Enrich git analyzer
|
|
192
|
+
|
|
193
|
+
**Modify**: `src/ingestion/git-analyzer.ts`
|
|
194
|
+
- Add a SECOND `git log` call (do NOT modify the existing one used for co-modification parsing). New format: `git log --format="%H|%s|%an|%aI" --name-only` for subject, author, date
|
|
195
|
+
- Add `analyzeFileStats()` — per-file commit count, stability score (0-1), change velocity (-1 to +1)
|
|
196
|
+
- Add `extractCommitRecords()` — parse into `CommitRecord[]`, filter merge commits + bulk reformats (>50 files)
|
|
197
|
+
- Return `EnrichedGitAnalysisResult` extending `GitAnalysisResult` with `fileStats: Map<string, FileChangeStats>` and `commits: CommitRecord[]`
|
|
198
|
+
|
|
199
|
+
### 3.3 Qdrant git_commits collection
|
|
200
|
+
|
|
201
|
+
**Modify**: `src/storage/qdrant-store.ts`
|
|
202
|
+
- Add `ensureGitCommitsCollection()` in `ensureCollections()`
|
|
203
|
+
- Add `upsertGitCommits()`, `searchGitCommits()`, `deleteGitCommitsByRepo()` as **QdrantVectorStore-specific methods** (NOT on the `VectorStore` interface — follows existing pattern at indexer.ts:484 where concrete type is used via cast)
|
|
204
|
+
|
|
205
|
+
### 3.3b Write `commit_count` to FalkorDB File nodes
|
|
206
|
+
|
|
207
|
+
**Modify**: `src/ingestion/indexer.ts`
|
|
208
|
+
- After `runGitAnalysis()` returns `EnrichedGitAnalysisResult`, iterate `fileStats` map
|
|
209
|
+
- For each file with stats, call `graphStore.upsertNode('File', { path, repo_id }, { commit_count, stability_score, change_velocity, last_commit_hash, last_commit_ts })` to write git properties onto existing File nodes
|
|
210
|
+
- This provides the data source for Phase 3.5's hotspot scoring
|
|
211
|
+
|
|
212
|
+
### 3.4 4-signal ranking
|
|
213
|
+
|
|
214
|
+
**Modify**: `src/query/ranking.ts`
|
|
215
|
+
- Weights: `0.55 vector + 0.25 graph + 0.10 recency + 0.10 hotspot`
|
|
216
|
+
- Add `hotspotScore` and `hotspotWeight` to `computeScore()` (backward-compatible: defaults to 0/0.10)
|
|
217
|
+
- Add `hotspotScore` to `ScoredResult`
|
|
218
|
+
|
|
219
|
+
### 3.5 Hybrid search hotspot integration
|
|
220
|
+
|
|
221
|
+
**Modify**: `src/query/hybrid-search.ts`
|
|
222
|
+
- After graph expansion, fetch file hotspot scores from FalkorDB File node `commit_count` property
|
|
223
|
+
- Normalize: `hotspot = file.commit_count / max_commit_count_in_results`
|
|
224
|
+
- For `modify`/`debug`/`refactor` intent: pass hotspot. For `read` intent: pass 0
|
|
225
|
+
|
|
226
|
+
### 3.6 New graph queries
|
|
227
|
+
|
|
228
|
+
**Modify**: `src/query/graph-queries.ts`
|
|
229
|
+
- Add `QUERY_FILE_HOTSPOTS(repoId)` — top 100 files by commit_count
|
|
230
|
+
- Add `QUERY_FILE_STATS(filePath, repoId)` — single file stats
|
|
231
|
+
|
|
232
|
+
### 3.7 `get_git_context` MCP tool
|
|
233
|
+
|
|
234
|
+
**Modify**: `src/tools/context-tools.ts`
|
|
235
|
+
- Modes: `hotspots` | `commit_search` | `file_history`
|
|
236
|
+
- `hotspots`: top N files by change frequency + stability + velocity from FalkorDB
|
|
237
|
+
- `commit_search`: semantic search over commit messages in Qdrant `git_commits`
|
|
238
|
+
- `file_history`: last N commits for a specific file
|
|
239
|
+
|
|
240
|
+
### Phase 3 Files
|
|
241
|
+
|
|
242
|
+
| File | Action |
|
|
243
|
+
|------|--------|
|
|
244
|
+
| `src/util/types.ts` | MODIFY |
|
|
245
|
+
| `src/ingestion/git-analyzer.ts` | MODIFY |
|
|
246
|
+
| `src/ingestion/indexer.ts` | MODIFY — embed commit messages |
|
|
247
|
+
| `src/storage/qdrant-store.ts` | MODIFY — git_commits collection |
|
|
248
|
+
| `src/query/ranking.ts` | MODIFY — 4-signal scoring |
|
|
249
|
+
| `src/query/hybrid-search.ts` | MODIFY — hotspot integration |
|
|
250
|
+
| `src/query/graph-queries.ts` | MODIFY — hotspot queries |
|
|
251
|
+
| `src/tools/context-tools.ts` | MODIFY — get_git_context tool |
|
|
252
|
+
| `src/server.ts` | MODIFY — wire new tool |
|
|
253
|
+
|
|
254
|
+
**Tool count: 30 → 31** (+1: get_git_context)
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## Phase 4: 5-Signal Scoring + LSP Edge Ingestion + VS Code Extension
|
|
259
|
+
|
|
260
|
+
**Value**: Observation relevance becomes the 5th scoring signal. LSP edges enrich the graph beyond static parsing. A VS Code extension automatically feeds type-resolved call edges into forge.
|
|
261
|
+
|
|
262
|
+
### 4.1 5-signal scoring
|
|
263
|
+
|
|
264
|
+
**Modify**: `src/query/ranking.ts`
|
|
265
|
+
- Weights become intent-dependent:
|
|
266
|
+
|
|
267
|
+
| Intent | Vector | Graph | Recency | Hotspot | Observation |
|
|
268
|
+
|--------|--------|-------|---------|---------|-------------|
|
|
269
|
+
| read | 0.55 | 0.20 | 0.05 | 0.10 | 0.10 |
|
|
270
|
+
| modify | 0.50 | 0.20 | 0.08 | 0.12 | 0.10 |
|
|
271
|
+
| debug | 0.40 | 0.25 | 0.05 | 0.10 | 0.20 |
|
|
272
|
+
| refactor | 0.35 | 0.30 | 0.05 | 0.15 | 0.15 |
|
|
273
|
+
|
|
274
|
+
- Add `observationScore: number` to `ScoredResult` interface and `observationWeight: number` to `computeScore()` params
|
|
275
|
+
- Observation score = count of non-stale observations linked to file symbols, normalized by max in result set
|
|
276
|
+
- Query Qdrant observations collection per file in results (parallelized with graph expansion, ~1-5ms each on localhost)
|
|
277
|
+
|
|
278
|
+
### 4.2 `submit_lsp_edges` MCP tool
|
|
279
|
+
|
|
280
|
+
**Create**: `src/tools/ingestion-tools.ts`
|
|
281
|
+
- Schema: `{ repo_id, edges: [{ from_file, from_symbol, to_file, to_symbol, edge_type }] }`
|
|
282
|
+
- Handler: iterates edges, calls `graphStore.upsertEdge()` for each
|
|
283
|
+
- Returns: `{ accepted, failed }`
|
|
284
|
+
- Designed for the VS Code extension and CI pipelines
|
|
285
|
+
|
|
286
|
+
### 4.3 VS Code Extension — `forge-lsp-bridge`
|
|
287
|
+
|
|
288
|
+
**Create**: `vscode-extension/` directory at repo root (separate publishable extension)
|
|
289
|
+
|
|
290
|
+
Minimal VS Code extension that hooks into TypeScript Language Server and sends call/reference edges to forge:
|
|
291
|
+
|
|
292
|
+
- `vscode-extension/package.json` — extension manifest, activates on TS/JS files
|
|
293
|
+
- `vscode-extension/src/extension.ts` — entry point, registers document change listener
|
|
294
|
+
- `vscode-extension/src/edge-collector.ts` — on file save, queries TS language server for:
|
|
295
|
+
- Call hierarchy (`vscode.commands.executeCommand('vscode.prepareCallHierarchy')`)
|
|
296
|
+
- Type definitions and references
|
|
297
|
+
- Collects edges as `{ from_file, from_symbol, to_file, to_symbol, edge_type }`
|
|
298
|
+
- `vscode-extension/src/forge-client.ts` — sends batched edges to forge MCP via stdio or HTTP
|
|
299
|
+
- Debounced: collects edges for 5 seconds after each save, then sends batch
|
|
300
|
+
- Config: `forge.lspBridge.enabled` (default: true), `forge.lspBridge.repoId` (auto-detected from .forge/manifest.yaml)
|
|
301
|
+
- `vscode-extension/tsconfig.json`, `vscode-extension/.vscodeignore`
|
|
302
|
+
|
|
303
|
+
**Key design**: The extension does NOT replace forge's static AST parsing — it supplements it with runtime-accurate type-resolved edges that tree-sitter misses (indirect calls, generics, overloaded methods).
|
|
304
|
+
|
|
305
|
+
### Phase 4 Files
|
|
306
|
+
|
|
307
|
+
| File | Action |
|
|
308
|
+
|------|--------|
|
|
309
|
+
| `src/query/ranking.ts` | MODIFY — 5-signal weights |
|
|
310
|
+
| `src/query/hybrid-search.ts` | MODIFY — observation query |
|
|
311
|
+
| `src/query/intent-detector.ts` | MODIFY — 5-weight strategy tables |
|
|
312
|
+
| `src/tools/ingestion-tools.ts` | CREATE — submit_lsp_edges |
|
|
313
|
+
| `src/server.ts` | MODIFY — wire ingestion tools |
|
|
314
|
+
| `vscode-extension/` (entire directory) | CREATE — VS Code extension |
|
|
315
|
+
|
|
316
|
+
**Tool count: 31 → 32** (+1: submit_lsp_edges)
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## Phase 5: Agent Prompt Updates + Cross-Agent Collaboration
|
|
321
|
+
|
|
322
|
+
**Value**: All 12 agents know about and use the new tools. Agent-to-agent broadcasting enables real-time knowledge sharing during pipeline execution.
|
|
323
|
+
|
|
324
|
+
### 5.1 Update all 12 agent prompts
|
|
325
|
+
|
|
326
|
+
Add "Memory & Observation Tools" + "Graph Analysis Tools" sections to each agent in `plugin/agents/`:
|
|
327
|
+
|
|
328
|
+
**Agents that actively push observations** (produce learnings):
|
|
329
|
+
- `architect.md` — save architectural decisions, blast radius findings
|
|
330
|
+
- `inspector.md` — save findings, anti-patterns, verification results
|
|
331
|
+
- `knowledge-keeper.md` — save curated knowledge, route to appropriate store
|
|
332
|
+
- `backend-specialist.md`, `frontend-specialist.md`, `data-specialist.md`, `platform-engineer.md` — save implementation gotchas
|
|
333
|
+
|
|
334
|
+
**Agents that actively pull observations** (consume context):
|
|
335
|
+
- `strategist.md` — `search_memory` for similar past projects
|
|
336
|
+
- `supervisor.md` — `get_session_context` for what's been learned so far
|
|
337
|
+
- `architect.md` — `get_impact_graph` for blast radius, `search_logic_flow` for execution paths
|
|
338
|
+
- `inspector.md` — `get_git_context` for hotspot-aware verification
|
|
339
|
+
|
|
340
|
+
### 5.2 Agent broadcast primitive
|
|
341
|
+
|
|
342
|
+
**Create**: `src/tools/collaboration-tools.ts`
|
|
343
|
+
|
|
344
|
+
**`broadcast_finding`**: `{ project_id, content, severity: 'info'|'warning'|'critical', target_agents?[], symbols?[] }`
|
|
345
|
+
- Saves as observation with `type: 'working'`, `category: 'agent_broadcast'`, `tags: ['broadcast', project_id]`
|
|
346
|
+
- Also records in SQLite `pipeline_events` as `agent_broadcast` event type
|
|
347
|
+
|
|
348
|
+
**`get_broadcasts`**: `{ project_id, since?, severity? }`
|
|
349
|
+
- Queries recent broadcasts for the project
|
|
350
|
+
|
|
351
|
+
**Modify**: `src/context/injector.ts` — include recent broadcasts when assembling phase context
|
|
352
|
+
|
|
353
|
+
### 5.3 Atlassian Integration (from git-jira-plan.md Part 2)
|
|
354
|
+
|
|
355
|
+
Plugin-level only — no server code changes.
|
|
356
|
+
|
|
357
|
+
**Modify**: `plugin/.mcp.json` — add `atlassian` server:
|
|
358
|
+
```json
|
|
359
|
+
"atlassian": {
|
|
360
|
+
"command": "uvx",
|
|
361
|
+
"args": ["mcp-atlassian"],
|
|
362
|
+
"env": { "JIRA_URL": "${JIRA_URL}", "JIRA_USERNAME": "${JIRA_USERNAME}", "JIRA_API_TOKEN": "${JIRA_API_TOKEN}" }
|
|
363
|
+
}
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
**Update 7 agent prompts** with optional Atlassian sections (graceful — skip if unavailable):
|
|
367
|
+
- `strategist.md` — pull linked Jira issue, sprint context pre-interview; comment post-vision
|
|
368
|
+
- `architect.md` — check blocking issues, linked PRs; comment post-plan
|
|
369
|
+
- `inspector.md` — check acceptance criteria; comment pass/fail + transition issue
|
|
370
|
+
- `knowledge-keeper.md` — pull ticket changelog for decision history
|
|
371
|
+
- `product-manager.md` — pull existing stories/epics to avoid duplicate requirements
|
|
372
|
+
- `supervisor.md` — check sprint capacity for routing priority
|
|
373
|
+
- `platform-engineer.md` — CI pipeline status (future Bitbucket)
|
|
374
|
+
|
|
375
|
+
**Create**: `plugin/docs/atlassian-integration.md` — setup guide
|
|
376
|
+
|
|
377
|
+
**Graceful degradation**: Every Atlassian section wrapped in "## Atlassian Context (Optional)" with "If unavailable, skip without error."
|
|
378
|
+
|
|
379
|
+
### 5.4 Extend `create_project` for Jira context
|
|
380
|
+
|
|
381
|
+
**Modify**: `src/tools/pipeline-tools.ts`
|
|
382
|
+
- Add optional `jira_ticket` and `jira_epic` fields to `createProjectSchema`
|
|
383
|
+
- Store in project metadata JSON
|
|
384
|
+
- Returned by `get_state` — agents auto-discover ticket key
|
|
385
|
+
|
|
386
|
+
### Phase 5 Files
|
|
387
|
+
|
|
388
|
+
| File | Action |
|
|
389
|
+
|------|--------|
|
|
390
|
+
| `plugin/agents/*.md` (12 files) | MODIFY — new tool sections + Atlassian |
|
|
391
|
+
| `plugin/.mcp.json` | MODIFY — add atlassian server |
|
|
392
|
+
| `plugin/docs/atlassian-integration.md` | CREATE — setup guide |
|
|
393
|
+
| `src/tools/collaboration-tools.ts` | CREATE — broadcast_finding, get_broadcasts |
|
|
394
|
+
| `src/tools/pipeline-tools.ts` | MODIFY — jira_ticket, jira_epic fields |
|
|
395
|
+
| `src/context/injector.ts` | MODIFY — broadcast injection |
|
|
396
|
+
| `src/util/types.ts` | MODIFY — add agent_broadcast event type |
|
|
397
|
+
| `src/server.ts` | MODIFY — wire collaboration tools |
|
|
398
|
+
|
|
399
|
+
**Tool count: 32 → 34** (+2: broadcast_finding, get_broadcasts)
|
|
400
|
+
|
|
401
|
+
---
|
|
402
|
+
|
|
403
|
+
## Phase Dependencies
|
|
404
|
+
|
|
405
|
+
```
|
|
406
|
+
Phase 1 (vexp parity) — no dependencies, all items parallelizable
|
|
407
|
+
|
|
|
408
|
+
v
|
|
409
|
+
Phase 2 (swarm learning) — depends on Phase 1 (needs save_observation tool)
|
|
410
|
+
|
|
|
411
|
+
v
|
|
412
|
+
Phase 3 (git enrichment) — independent of Phase 2, can run in parallel
|
|
413
|
+
|
|
|
414
|
+
+-----+-----+
|
|
415
|
+
| |
|
|
416
|
+
v v
|
|
417
|
+
Phase 4 Phase 5
|
|
418
|
+
(5-signal) (agent prompts + collaboration)
|
|
419
|
+
depends on Phase 5 depends on Phase 1 (tools must exist before prompts reference them)
|
|
420
|
+
Phase 2+3 Phase 5 Atlassian section is independent of all other phases
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
**Parallelism opportunities:**
|
|
424
|
+
- Phase 1: all 4 new files are independent of each other
|
|
425
|
+
- Phase 2 and Phase 3 can overlap (Phase 2 needs Phase 1 done; Phase 3 is independent)
|
|
426
|
+
- Phase 5 agent prompts can start after Phase 1 (for graph/memory tools) and expand after later phases
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
## Existing Code to Reuse (NOT rebuild)
|
|
431
|
+
|
|
432
|
+
| Capability | File:Line | Status |
|
|
433
|
+
|-----------|-----------|--------|
|
|
434
|
+
| `saveObservation()` | `src/memory/observation-store.ts:56` | Fully implemented, needs MCP wrapper |
|
|
435
|
+
| `getRecentSessionObservations()` | `src/memory/session-tracker.ts:177` | Fully implemented, needs MCP wrapper |
|
|
436
|
+
| `getCurrentSessionId()` | `src/memory/session-tracker.ts:32` | Working |
|
|
437
|
+
| `persistSessionMarker()` | `src/memory/session-tracker.ts:83` | Working |
|
|
438
|
+
| `getSessionInfo()` | `src/memory/session-tracker.ts:320` | Working |
|
|
439
|
+
| `MemoryBridge.searchMemories()` | `src/context/memory.ts:46` | Working, used only in interview injection |
|
|
440
|
+
| `MemoryBridge.saveMemory()` | `src/context/memory.ts:123` | Working, never called |
|
|
441
|
+
| `QUERY_INBOUND_IMPACT` | `src/query/graph-queries.ts:66` | Working Cypher, no MCP tool |
|
|
442
|
+
| `QUERY_OUTBOUND_IMPACT` | `src/query/graph-queries.ts:76` | Working Cypher, no MCP tool |
|
|
443
|
+
| `QUERY_SHORTEST_PATH` | `src/query/graph-queries.ts:90` | Working Cypher, no MCP tool |
|
|
444
|
+
| `UPSERT_OBSERVATION` | `src/query/graph-queries.ts:136` | Used by observation-store |
|
|
445
|
+
| `LINK_OBSERVATION_TO_SYMBOL` | `src/query/graph-queries.ts:153` | Used by observation-store |
|
|
446
|
+
| `MARK_SYMBOL_OBSERVATIONS_STALE` | `src/query/graph-queries.ts:170` | Exists, never called |
|
|
447
|
+
| `detectIntent()` | `src/query/intent-detector.ts:39` | Working, never called from tools |
|
|
448
|
+
| `getIntentStrategy()` | `src/query/intent-detector.ts:70` | Working, never called from tools |
|
|
449
|
+
| `ConfidenceManager.boost()` | `src/learning/confidence.ts:147` | Fully implemented, never called |
|
|
450
|
+
| `ConfidenceManager.decayAll()` | `src/learning/confidence.ts:66` | Fully implemented, never called |
|
|
451
|
+
| `buildSkeleton()` | `src/context/codebase.ts:308` | Working |
|
|
452
|
+
|
|
453
|
+
---
|
|
454
|
+
|
|
455
|
+
## Verification
|
|
456
|
+
|
|
457
|
+
### After Phase 1
|
|
458
|
+
1. `npm run build` succeeds
|
|
459
|
+
2. `npm test` passes
|
|
460
|
+
3. Call `mcp__dk-forge__save_observation` with `{ content: "test observation", symbols: ["createForgeServer"], repo_id: "..." }` — returns `{ stored: true, linkedSymbols: [...] }`
|
|
461
|
+
4. Call `mcp__dk-forge__search_memory` with `{ query: "test observation" }` — returns the saved observation
|
|
462
|
+
5. Call `mcp__dk-forge__get_session_context` — returns current session info + recent observations
|
|
463
|
+
6. Call `mcp__dk-forge__get_impact_graph` with `{ symbol: "createForgeServer", repo_id: "...", direction: "inbound" }` — returns callers
|
|
464
|
+
7. Call `mcp__dk-forge__search_logic_flow` with two known connected symbols — returns path
|
|
465
|
+
8. Call `mcp__dk-forge__get_codebase_context` with a debug-style query — verify `query_intent` is `'debug'` (not `'read'`)
|
|
466
|
+
|
|
467
|
+
### After Phase 2
|
|
468
|
+
9. Run a `/forge new test-project` through to `submit_verdict` — verify observations were auto-created (search for `tags: ['auto_observation']`)
|
|
469
|
+
10. Verify `boostConfidence` is being called by checking logs for "ConfidenceManager.boost: boosted"
|
|
470
|
+
11. Re-index a repo with a modified file — verify stale observations appear in search with `is_stale: true`
|
|
471
|
+
|
|
472
|
+
### After Phase 3
|
|
473
|
+
12. Call `mcp__dk-forge__get_git_context` with `mode: 'hotspots'` — returns files sorted by commit frequency
|
|
474
|
+
13. Call `mcp__dk-forge__get_git_context` with `mode: 'commit_search', query: 'rebrand'` — returns relevant commits
|
|
475
|
+
14. Call `mcp__dk-forge__get_codebase_context` — verify `match_reason` includes hotspot info for frequently-changed files
|
|
476
|
+
|
|
477
|
+
### After All Phases
|
|
478
|
+
15. Rebuild dist: `npm run build`
|
|
479
|
+
16. Full pipeline run with `/forge new integration-test` — verify all agents can access new tools
|
|
480
|
+
17. Verify tool count matches expected (34 total)
|