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,393 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: knowledge-curation
|
|
3
|
+
description: >
|
|
4
|
+
This skill should be used when extracting, categorizing, and distributing learnings from
|
|
5
|
+
completed work. Used by the knowledge-keeper agent to manage memory across agents, CLAUDE.md
|
|
6
|
+
files, and project documentation.
|
|
7
|
+
user-invocable: false
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Knowledge Curation Skill
|
|
11
|
+
|
|
12
|
+
## Knowledge Extraction Methodology
|
|
13
|
+
|
|
14
|
+
After a Forge workflow completes (or at significant phase boundaries), conduct a systematic review of all outputs to identify reusable knowledge. This is not a passive activity — it requires active analysis, pattern recognition, and editorial judgment about what is worth preserving.
|
|
15
|
+
|
|
16
|
+
### Step 1: Review All Agent Outputs and Plan Documents
|
|
17
|
+
|
|
18
|
+
Read every document produced during the workflow:
|
|
19
|
+
|
|
20
|
+
- `docs/plans/YYYY-MM-DD-{TITLE}/vision.md` — for goals and constraints that shaped decisions.
|
|
21
|
+
- `docs/plans/YYYY-MM-DD-{TITLE}/architecture.md` — for technical design decisions and patterns.
|
|
22
|
+
- `docs/plans/YYYY-MM-DD-{TITLE}/test-plan.md` — for testing patterns and coverage strategies.
|
|
23
|
+
- `docs/plans/YYYY-MM-DD-{TITLE}/agent-output/*.md` — for per-agent deliverables, decisions, and discovered constraints.
|
|
24
|
+
- `docs/plans/YYYY-MM-DD-{TITLE}/escalations/*.md` — for blockers encountered and their resolutions.
|
|
25
|
+
- Any git commit messages from the workflow for implementation-level context.
|
|
26
|
+
|
|
27
|
+
Additionally, review the code changes themselves. Scan modified files for patterns that emerged during implementation — workarounds, patterns chosen, approaches rejected.
|
|
28
|
+
|
|
29
|
+
### Step 2: Identify Knowledge Items
|
|
30
|
+
|
|
31
|
+
Extract knowledge items in four categories:
|
|
32
|
+
|
|
33
|
+
#### Gotchas Discovered
|
|
34
|
+
|
|
35
|
+
A gotcha is a non-obvious behavior, limitation, or requirement that caused a problem or required a workaround. Gotchas are the highest-value knowledge items because they prevent future time waste.
|
|
36
|
+
|
|
37
|
+
Characteristics of a gotcha worth recording:
|
|
38
|
+
|
|
39
|
+
- It was not documented in official docs (or was buried and hard to find).
|
|
40
|
+
- It cost more than 10 minutes to discover or resolve.
|
|
41
|
+
- It would affect anyone working in this codebase, not just this specific feature.
|
|
42
|
+
- The fix is non-obvious — knowing the problem exists is the hard part; the fix follows naturally.
|
|
43
|
+
|
|
44
|
+
Examples of gotchas: SWC hoisting `require()` above dotenv initialization; Docker volume persistence causing auth failures; Drizzle requiring `db:generate` before `db:migrate`.
|
|
45
|
+
|
|
46
|
+
#### Patterns Confirmed
|
|
47
|
+
|
|
48
|
+
A pattern is an approach or architecture that was used successfully and should be replicated in similar situations. Patterns differ from gotchas in that they are prescriptive ("do this") rather than cautionary ("watch out for this").
|
|
49
|
+
|
|
50
|
+
Characteristics of a pattern worth recording:
|
|
51
|
+
|
|
52
|
+
- It was used across multiple modules or features, proving its generality.
|
|
53
|
+
- It solved a recurring problem in a clean, maintainable way.
|
|
54
|
+
- It differs from the "default" approach in a way that is not obvious but important.
|
|
55
|
+
|
|
56
|
+
Examples of patterns: Proxy-based Drizzle mock for chainable queries; global NestJS modules for cross-cutting concerns; circuit breaker pattern for multi-provider AI gateway.
|
|
57
|
+
|
|
58
|
+
#### Conventions Established
|
|
59
|
+
|
|
60
|
+
A convention is a naming, formatting, or structural standard that the team has adopted (explicitly or implicitly) and should be followed for consistency.
|
|
61
|
+
|
|
62
|
+
Characteristics of a convention worth recording:
|
|
63
|
+
|
|
64
|
+
- It affects file naming, directory structure, variable naming, database naming, or infrastructure naming.
|
|
65
|
+
- Inconsistency would cause confusion, integration issues, or maintenance burden.
|
|
66
|
+
- It is not enforced by a linter or type system (if it were, it would not need to be documented — the tool would catch violations).
|
|
67
|
+
|
|
68
|
+
Examples of conventions: Synapse naming table (kebab-case for K8s resources, specific ECR/Helm/namespace patterns); test naming pattern ("should [behavior] when [condition]").
|
|
69
|
+
|
|
70
|
+
#### Decisions Made
|
|
71
|
+
|
|
72
|
+
A decision is a one-time choice between alternatives, recorded with rationale so it is not revisited without new information. Decisions become the inputs for ADRs (Architectural Decision Records).
|
|
73
|
+
|
|
74
|
+
Characteristics of a decision worth recording:
|
|
75
|
+
|
|
76
|
+
- Multiple viable alternatives existed.
|
|
77
|
+
- The choice has long-term consequences (hard to reverse).
|
|
78
|
+
- The rationale is non-obvious — someone reviewing the codebase later would ask "why was it done this way?"
|
|
79
|
+
|
|
80
|
+
Examples of decisions: choosing `postgres` over `pg` for the database driver; choosing RS256 over HS256 for JWT signing; choosing WebSocket over SSE for real-time updates.
|
|
81
|
+
|
|
82
|
+
### Step 3: Categorize by Type
|
|
83
|
+
|
|
84
|
+
For each identified knowledge item, assign a type:
|
|
85
|
+
|
|
86
|
+
| Type | Description | Example |
|
|
87
|
+
|------|-------------|---------|
|
|
88
|
+
| `technical-gotcha` | Non-obvious behavior that causes problems | SWC require() hoisting |
|
|
89
|
+
| `architectural-pattern` | Proven approach for a recurring design problem | Circuit breaker for provider failover |
|
|
90
|
+
| `workflow-preference` | How the user/team prefers to work | Commit after each logical phase, not every file |
|
|
91
|
+
| `naming-convention` | Naming standards for consistency | Synapse naming table |
|
|
92
|
+
| `infrastructure-gotcha` | Non-obvious infra/DevOps behavior | Docker VHDX corruption at 96GB |
|
|
93
|
+
| `tooling-gotcha` | Non-obvious tool behavior | tsx watch breaks NestJS DI |
|
|
94
|
+
| `testing-pattern` | Testing approach that works well | Proxy-based Drizzle mock |
|
|
95
|
+
| `security-pattern` | Security-relevant approach | IRSA role naming and policy structure |
|
|
96
|
+
| `decision` | One-time architectural choice | postgres.js over pg driver |
|
|
97
|
+
|
|
98
|
+
### Step 4: Determine Audience
|
|
99
|
+
|
|
100
|
+
Not all knowledge belongs in the same place. Determine who benefits from each item:
|
|
101
|
+
|
|
102
|
+
- **Whole team**: knowledge that any developer working in this codebase needs. Goes in project CLAUDE.md.
|
|
103
|
+
- **Personal cross-project**: knowledge that is specific to the user's workflow or preferences but applies across projects. Goes in the user's global CLAUDE.md.
|
|
104
|
+
- **Personal persistent**: knowledge that the user should remember but that is not relevant to other developers. Goes in the user's Claude Code memory.
|
|
105
|
+
- **Project documentation**: knowledge that belongs in the repo as formal documentation (ADRs, runbooks, onboarding guides). Goes in `docs/`.
|
|
106
|
+
- **Agent-specific**: knowledge that individual Forge agents should internalize for better performance. Goes in agent prompt files or skill files.
|
|
107
|
+
|
|
108
|
+
## Knowledge Distribution Priority
|
|
109
|
+
|
|
110
|
+
Distribute knowledge to the location with the highest impact first. The priority order reflects how frequently each location is read and by whom.
|
|
111
|
+
|
|
112
|
+
### Priority 1: Project CLAUDE.md
|
|
113
|
+
|
|
114
|
+
**Path**: `{project-root}/CLAUDE.md`
|
|
115
|
+
|
|
116
|
+
**Audience**: every developer and every AI agent that works in this project.
|
|
117
|
+
|
|
118
|
+
**Impact**: highest. This file is loaded into every Claude Code session for this project. A gotcha recorded here prevents every future developer from hitting the same issue.
|
|
119
|
+
|
|
120
|
+
**What belongs here**:
|
|
121
|
+
|
|
122
|
+
- Technical gotchas specific to this project's stack and configuration.
|
|
123
|
+
- Naming conventions for this project (database, Helm, K8s, ECR, etc.).
|
|
124
|
+
- Patterns established in this codebase that differ from framework defaults.
|
|
125
|
+
- Infrastructure dependencies and constraints (cluster limits, service endpoints, credential sources).
|
|
126
|
+
- Build/test/deploy commands and gotchas.
|
|
127
|
+
|
|
128
|
+
**What does NOT belong here**:
|
|
129
|
+
|
|
130
|
+
- Personal preferences that only apply to one developer.
|
|
131
|
+
- General programming advice that any experienced developer knows.
|
|
132
|
+
- Temporary information (current sprint goals, in-progress work).
|
|
133
|
+
- Verbose explanations — link to docs for details, keep CLAUDE.md concise.
|
|
134
|
+
|
|
135
|
+
### Priority 2: User's Global CLAUDE.md
|
|
136
|
+
|
|
137
|
+
**Path**: `~/.claude/CLAUDE.md`
|
|
138
|
+
|
|
139
|
+
**Audience**: the user, across all projects.
|
|
140
|
+
|
|
141
|
+
**Impact**: high. Loaded into every Claude Code session for this user regardless of project. Captures cross-cutting personal workflow preferences.
|
|
142
|
+
|
|
143
|
+
**What belongs here**:
|
|
144
|
+
|
|
145
|
+
- Stack preferences (NestJS + Drizzle, not Express + Prisma).
|
|
146
|
+
- Workflow preferences (autonomous execution, parallel dispatch, commit cadence).
|
|
147
|
+
- Cross-project gotchas (SWC behavior, Docker VHDX management, PowerShell-via-Bash escaping).
|
|
148
|
+
- Naming conventions that span projects (Synapse naming table if it applies beyond one repo).
|
|
149
|
+
- IaC repo locations and the "never use CLI" rule.
|
|
150
|
+
|
|
151
|
+
**What does NOT belong here**:
|
|
152
|
+
|
|
153
|
+
- Project-specific configuration or conventions.
|
|
154
|
+
- Information that is already in a project CLAUDE.md (avoid duplication).
|
|
155
|
+
- Exhaustive lists — keep it scannable.
|
|
156
|
+
|
|
157
|
+
### Priority 3: User's Claude Code Memory
|
|
158
|
+
|
|
159
|
+
**Path**: `~/.claude/memory/`
|
|
160
|
+
|
|
161
|
+
**Audience**: the user's AI assistant, persistently.
|
|
162
|
+
|
|
163
|
+
**Impact**: moderate. Persists across sessions and projects but is not visible to team members.
|
|
164
|
+
|
|
165
|
+
**What belongs here**:
|
|
166
|
+
|
|
167
|
+
- Personal context that improves AI assistance: preferred explanation style, common tasks, frequently used commands.
|
|
168
|
+
- Reminders about past issues that recur sporadically.
|
|
169
|
+
- Context about the user's environment (Windows 11, specific tool versions, local paths).
|
|
170
|
+
|
|
171
|
+
### Priority 4: Project Documentation
|
|
172
|
+
|
|
173
|
+
**Path**: `{project-root}/docs/decisions/`, `{project-root}/docs/learnings/`
|
|
174
|
+
|
|
175
|
+
**Audience**: the development team, reviewable in PRs and onboarding.
|
|
176
|
+
|
|
177
|
+
**Impact**: moderate-to-low for daily development, high for onboarding and architectural review.
|
|
178
|
+
|
|
179
|
+
**What belongs here**:
|
|
180
|
+
|
|
181
|
+
- Architectural Decision Records (ADRs) — formal documentation of significant technical decisions.
|
|
182
|
+
- Learnings documents — longer-form writeups of complex problems and their solutions.
|
|
183
|
+
- Runbooks — step-by-step guides for operational procedures.
|
|
184
|
+
- Onboarding guides — what a new developer needs to know to be productive.
|
|
185
|
+
|
|
186
|
+
### Priority 5: Agent-Specific Memory
|
|
187
|
+
|
|
188
|
+
**Path**: Agent prompt files or skill files within the Forge plugin.
|
|
189
|
+
|
|
190
|
+
**Audience**: individual Forge agents.
|
|
191
|
+
|
|
192
|
+
**Impact**: low frequency (only affects Forge workflows) but high specificity (directly improves agent performance).
|
|
193
|
+
|
|
194
|
+
**What belongs here**:
|
|
195
|
+
|
|
196
|
+
- Agent-specific anti-patterns learned from past failures.
|
|
197
|
+
- Calibration data: which types of tasks this agent handles well vs. needs more guidance.
|
|
198
|
+
- Prompt refinements based on observed output quality.
|
|
199
|
+
|
|
200
|
+
## CLAUDE.md Writing Guidelines
|
|
201
|
+
|
|
202
|
+
CLAUDE.md is the most impactful knowledge distribution channel. Every word in it is loaded into every session. Write accordingly.
|
|
203
|
+
|
|
204
|
+
### Be Concise
|
|
205
|
+
|
|
206
|
+
Every line in CLAUDE.md costs tokens in every session. A 500-line CLAUDE.md loads 500 lines of context whether relevant or not. Optimize for density.
|
|
207
|
+
|
|
208
|
+
- One line per gotcha when possible. Use the pattern: **Bold title** — explanation with the "why."
|
|
209
|
+
- Use tables for structured data. Tables are denser than bullet lists for multi-field items.
|
|
210
|
+
- Eliminate filler words. Not "It is important to note that..." — just state the fact.
|
|
211
|
+
|
|
212
|
+
### Structure for Scannability
|
|
213
|
+
|
|
214
|
+
Group related items under clear headers. An agent looking for NestJS gotchas should find them all under `## NestJS + Drizzle Gotchas`, not scattered across the file.
|
|
215
|
+
|
|
216
|
+
Recommended section structure:
|
|
217
|
+
|
|
218
|
+
```markdown
|
|
219
|
+
## Stack
|
|
220
|
+
## Workflow Preferences
|
|
221
|
+
## {Stack} Gotchas Learned
|
|
222
|
+
## Infrastructure Gotchas Learned
|
|
223
|
+
## Naming Conventions
|
|
224
|
+
## {Feature} Patterns
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### Include the "Why"
|
|
228
|
+
|
|
229
|
+
A rule without rationale is a rule that will be ignored or misapplied.
|
|
230
|
+
|
|
231
|
+
Bad: `Use postgres driver, not pg.`
|
|
232
|
+
Good: `Use postgres (postgres.js) driver with Drizzle, not pg -- lighter, fewer deps.`
|
|
233
|
+
|
|
234
|
+
Bad: `Run db:generate before db:migrate.`
|
|
235
|
+
Good: `Drizzle migrations: must run db:generate before db:migrate -- there is no auto-generate on migrate.`
|
|
236
|
+
|
|
237
|
+
The "why" enables the reader to know when the rule applies and when it might not. Without it, the rule is cargo-culted.
|
|
238
|
+
|
|
239
|
+
### Remove Outdated Entries
|
|
240
|
+
|
|
241
|
+
Knowledge that is no longer true is actively harmful. It causes agents and developers to follow obsolete patterns, work around bugs that have been fixed, or avoid approaches that are now valid.
|
|
242
|
+
|
|
243
|
+
When curating knowledge:
|
|
244
|
+
|
|
245
|
+
- Check each existing entry against current project state. Has the dependency been updated? Has the bug been fixed? Has the convention changed?
|
|
246
|
+
- Remove entries that no longer apply. Do not just add new entries — prune old ones.
|
|
247
|
+
- If an entry is uncertain, mark it with a date: `(as of 2026-02-25)` so future curators know when it was last verified.
|
|
248
|
+
|
|
249
|
+
### Avoid Duplication
|
|
250
|
+
|
|
251
|
+
If the same knowledge appears in both the project CLAUDE.md and the user's global CLAUDE.md, it will be loaded twice in every session for that user in that project. Decide where it belongs based on audience:
|
|
252
|
+
|
|
253
|
+
- Specific to this project? Project CLAUDE.md only.
|
|
254
|
+
- Applies to the user across projects? Global CLAUDE.md only.
|
|
255
|
+
- Applies to the team AND is cross-project? This is rare — usually it belongs in the project CLAUDE.md with a brief mention in the global file linking to the convention.
|
|
256
|
+
|
|
257
|
+
## ADR (Architectural Decision Record) Format
|
|
258
|
+
|
|
259
|
+
For significant architectural decisions, create a formal ADR in:
|
|
260
|
+
|
|
261
|
+
```
|
|
262
|
+
docs/decisions/NNNN-{title}.md
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Where `NNNN` is a zero-padded sequential number and `{title}` is lowercase-kebab-case.
|
|
266
|
+
|
|
267
|
+
### ADR Template
|
|
268
|
+
|
|
269
|
+
```markdown
|
|
270
|
+
# NNNN. {Decision Title}
|
|
271
|
+
|
|
272
|
+
**Date**: YYYY-MM-DD
|
|
273
|
+
**Status**: Proposed | Accepted | Deprecated | Superseded by [NNNN]
|
|
274
|
+
**Deciders**: {who made the decision}
|
|
275
|
+
|
|
276
|
+
## Context
|
|
277
|
+
|
|
278
|
+
{What is the problem or situation that requires a decision? Include technical
|
|
279
|
+
constraints, business requirements, and relevant history.}
|
|
280
|
+
|
|
281
|
+
## Decision
|
|
282
|
+
|
|
283
|
+
{What was decided. State it clearly and unambiguously.}
|
|
284
|
+
|
|
285
|
+
## Alternatives Considered
|
|
286
|
+
|
|
287
|
+
### Option A: {name}
|
|
288
|
+
{Description, pros, cons}
|
|
289
|
+
|
|
290
|
+
### Option B: {name}
|
|
291
|
+
{Description, pros, cons}
|
|
292
|
+
|
|
293
|
+
[Additional options as needed]
|
|
294
|
+
|
|
295
|
+
## Consequences
|
|
296
|
+
|
|
297
|
+
### Positive
|
|
298
|
+
- {benefit 1}
|
|
299
|
+
- {benefit 2}
|
|
300
|
+
|
|
301
|
+
### Negative
|
|
302
|
+
- {tradeoff 1}
|
|
303
|
+
- {tradeoff 2}
|
|
304
|
+
|
|
305
|
+
### Risks
|
|
306
|
+
- {risk and mitigation}
|
|
307
|
+
|
|
308
|
+
## References
|
|
309
|
+
|
|
310
|
+
- {links to relevant documentation, RFCs, prior art}
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### When to Write an ADR
|
|
314
|
+
|
|
315
|
+
Create an ADR when:
|
|
316
|
+
|
|
317
|
+
- The decision affects system architecture (module boundaries, communication patterns, data storage).
|
|
318
|
+
- The decision is hard to reverse (database schema, public API shape, infrastructure topology).
|
|
319
|
+
- The decision was debated or multiple alternatives were seriously considered.
|
|
320
|
+
- The decision would surprise a new team member reviewing the codebase.
|
|
321
|
+
|
|
322
|
+
Do NOT write an ADR for:
|
|
323
|
+
|
|
324
|
+
- Trivial implementation choices (variable names, minor refactors).
|
|
325
|
+
- Decisions that are already enforced by tooling (linter rules, type system).
|
|
326
|
+
- Decisions that are obvious given the project's established patterns.
|
|
327
|
+
|
|
328
|
+
## When to Update vs. When to Create New Entries
|
|
329
|
+
|
|
330
|
+
### Update an Existing Entry When:
|
|
331
|
+
|
|
332
|
+
- New information refines an existing gotcha (additional detail, a better workaround, an updated version that changes behavior).
|
|
333
|
+
- A convention evolves (naming pattern changes from `dk-one-tools` to `dk-synapse`).
|
|
334
|
+
- A gotcha is resolved (dependency update fixes the bug — remove the workaround, note it is fixed).
|
|
335
|
+
|
|
336
|
+
### Create a New Entry When:
|
|
337
|
+
|
|
338
|
+
- An entirely new gotcha, pattern, or convention is discovered.
|
|
339
|
+
- A new category of knowledge emerges (e.g., first time working with a new technology).
|
|
340
|
+
- An existing decision is superseded (create a new ADR, mark the old one as superseded).
|
|
341
|
+
|
|
342
|
+
### Never:
|
|
343
|
+
|
|
344
|
+
- Create duplicate entries for the same knowledge item. If it exists, update it.
|
|
345
|
+
- Leave contradictory entries. If a new entry contradicts an old one, remove or update the old one.
|
|
346
|
+
- Add entries without checking for existing related entries first.
|
|
347
|
+
|
|
348
|
+
## Deduplication Protocol
|
|
349
|
+
|
|
350
|
+
Before adding any knowledge item, search for existing related entries:
|
|
351
|
+
|
|
352
|
+
1. **Search project CLAUDE.md** for keywords related to the new item.
|
|
353
|
+
2. **Search global CLAUDE.md** for the same keywords.
|
|
354
|
+
3. **Search `docs/decisions/`** for related ADRs.
|
|
355
|
+
4. **Search `docs/learnings/`** for related writeups.
|
|
356
|
+
|
|
357
|
+
If a related entry exists:
|
|
358
|
+
|
|
359
|
+
- If the new knowledge extends it, update the existing entry.
|
|
360
|
+
- If the new knowledge contradicts it, verify which is correct, then update or remove the outdated entry.
|
|
361
|
+
- If the new knowledge is a subset of it, do not add a new entry — the existing one already covers it.
|
|
362
|
+
|
|
363
|
+
## Verification Protocol
|
|
364
|
+
|
|
365
|
+
Before recording a knowledge item, verify it against actual project behavior. Do not record hearsay, assumptions, or outdated information.
|
|
366
|
+
|
|
367
|
+
### Verification Methods
|
|
368
|
+
|
|
369
|
+
- **For gotchas**: reproduce the issue. If it cannot be reproduced, it may have been fixed. Verify against the current dependency version and configuration.
|
|
370
|
+
- **For patterns**: confirm the pattern is actually used in the codebase. Search for its implementation. If it was planned but never implemented, note that distinction.
|
|
371
|
+
- **For conventions**: confirm the convention is followed consistently. If some files follow it and others do not, the convention is aspirational, not established. Note the inconsistency.
|
|
372
|
+
- **For decisions**: confirm the decision was actually implemented. If the architecture document says "use WebSocket" but the code uses polling, the decision was not implemented and should not be recorded as fact.
|
|
373
|
+
|
|
374
|
+
### Staleness Detection
|
|
375
|
+
|
|
376
|
+
Knowledge items become stale when:
|
|
377
|
+
|
|
378
|
+
- Dependencies are updated (new major version may fix bugs, change APIs).
|
|
379
|
+
- Infrastructure changes (cluster migration, new service mesh, updated Kubernetes version).
|
|
380
|
+
- Team practices evolve (workflow that was manual is now automated).
|
|
381
|
+
- Features are added or removed (gotchas for removed features are noise).
|
|
382
|
+
|
|
383
|
+
During curation, check the date on each existing entry. If an entry is older than 3 months with no verification, flag it for review. If older than 6 months, verify it or remove it.
|
|
384
|
+
|
|
385
|
+
## Curation Workflow Summary
|
|
386
|
+
|
|
387
|
+
1. **Extract**: review all workflow outputs and identify knowledge items.
|
|
388
|
+
2. **Categorize**: assign type (gotcha, pattern, convention, decision) and audience (team, personal, agent).
|
|
389
|
+
3. **Deduplicate**: search existing knowledge stores for related entries.
|
|
390
|
+
4. **Verify**: confirm the knowledge item against actual current behavior.
|
|
391
|
+
5. **Distribute**: write the item to the highest-priority appropriate location.
|
|
392
|
+
6. **Prune**: remove or update any existing entries that the new knowledge supersedes or contradicts.
|
|
393
|
+
7. **Report**: summarize what was curated and where it was distributed in the workflow handoff.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: learn
|
|
3
|
+
description: Save or search project learnings, decisions, and gotchas. Auto-detects whether to save or search based on your prompt.
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /learn — Project Memory
|
|
8
|
+
|
|
9
|
+
Save and search observations, decisions, and gotchas. One command, auto-detects intent.
|
|
10
|
+
|
|
11
|
+
## Intent Detection
|
|
12
|
+
|
|
13
|
+
### Save Intent
|
|
14
|
+
|
|
15
|
+
**Signals**: starts with "learn this:", "save:", "note:", contains "don't forget", "for next time", or the prompt is a declarative statement/fact.
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
/learn SWC hoists all require() calls above executable code in CJS output
|
|
19
|
+
/learn Decision: we chose postgres.js over pg for lighter deps
|
|
20
|
+
/learn save: the auth middleware must run before the rate limiter
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Action**: Call `mcp__dk-forge__save_observation` with the content.
|
|
24
|
+
|
|
25
|
+
Auto-classify from the content:
|
|
26
|
+
- "Decision: ..." → `type: semantic`, `category: decision`
|
|
27
|
+
- "Gotcha: ..." / "Watch out for ..." → `type: semantic`, `category: gotcha`
|
|
28
|
+
- "To do X, first ..." → `type: procedural`, `category: pattern`
|
|
29
|
+
- Plain statement → `type: semantic`
|
|
30
|
+
|
|
31
|
+
Parameters:
|
|
32
|
+
- **importance**: Default 0.5. Set higher (0.8+) for critical discoveries.
|
|
33
|
+
- **tags**: Infer stack/domain tags from content (e.g., `["nestjs", "drizzle"]`).
|
|
34
|
+
- **symbols**: Code symbols mentioned (e.g., `["AuthService"]`). Links to the code graph.
|
|
35
|
+
|
|
36
|
+
After saving, confirm with the observation ID.
|
|
37
|
+
|
|
38
|
+
### Search Intent
|
|
39
|
+
|
|
40
|
+
**Signals**: contains a question mark, starts with "what did we", "do we know", "remember when", "anything about", "last time we", or is phrased as a question.
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
/learn what did we find about authentication?
|
|
44
|
+
/learn anything about SWC issues?
|
|
45
|
+
/learn remember when we fixed the docker volume problem?
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Action**: Call `mcp__dk-forge__search_memory` with the query.
|
|
49
|
+
|
|
50
|
+
Present results with:
|
|
51
|
+
1. **Content** — the observation text.
|
|
52
|
+
2. **Category** — gotcha, decision, pattern, etc.
|
|
53
|
+
3. **When** — relative timestamp.
|
|
54
|
+
4. **Relevance score**.
|
|
55
|
+
|
|
56
|
+
### Session Context
|
|
57
|
+
|
|
58
|
+
**Signals**: "recent", "last session", "what happened", "where did we leave off".
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
/learn recent
|
|
62
|
+
/learn what happened last session?
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Action**: Call `mcp__dk-forge__get_session_context` to retrieve observations from current and recent sessions.
|
|
66
|
+
|
|
67
|
+
## Boosting
|
|
68
|
+
|
|
69
|
+
When a recalled learning proves valuable, call `mcp__dk-forge__boost_knowledge` with its ID to increase its visibility in future searches.
|