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,291 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: implementation-execution
|
|
3
|
+
description: This skill should be used when executing an implementation plan -- writing code, building features, creating modules. Used by frontend-specialist, backend-specialist, and data-specialist agents to follow plans with discipline and quality.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Implementation Execution Skill
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Provide a disciplined, quality-focused methodology for executing implementation plans. Apply this skill when writing code, building features, creating modules, or implementing any concrete deliverable from an architecture or design plan. The methodology ensures that implementation agents produce real, working, connected code -- never stubs, never placeholders, never "implement later" shortcuts.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Pre-Implementation: Read Before Writing
|
|
16
|
+
|
|
17
|
+
### Read the Full Plan
|
|
18
|
+
|
|
19
|
+
Before writing a single line of code, read the ENTIRE plan document that governs this implementation task. Not just the section relevant to the current module -- the full plan, including:
|
|
20
|
+
|
|
21
|
+
- **Vision document**: Understand the "why" behind every requirement.
|
|
22
|
+
- **Requirements document**: Understand the specific acceptance criteria.
|
|
23
|
+
- **Architecture document**: Understand the module boundaries, API contracts, data models, and integration points.
|
|
24
|
+
- **XD plan** (if frontend): Understand the design system, component hierarchy, and interaction patterns.
|
|
25
|
+
|
|
26
|
+
Do not skim. Do not read only the section assigned. Context from other sections prevents integration failures.
|
|
27
|
+
|
|
28
|
+
### Read the Project CLAUDE.md
|
|
29
|
+
|
|
30
|
+
Before starting implementation, read the project's `CLAUDE.md` file (if one exists) and the user's global `CLAUDE.md`. These contain learned gotchas, stack-specific traps, and patterns that are not obvious from the codebase alone. Apply every relevant gotcha.
|
|
31
|
+
|
|
32
|
+
**Known critical gotchas to internalize**:
|
|
33
|
+
- SWC hoists all `require()` above executable code -- never read `process.env` at module top-level.
|
|
34
|
+
- Use lazy initialization (Proxy or getter) for anything that reads environment variables.
|
|
35
|
+
- `dotenv.config()` must execute in `main.ts` before NestJS bootstrap.
|
|
36
|
+
- Default imports for `jwks-rsa` and `jsonwebtoken`, not namespace imports.
|
|
37
|
+
- `postgres` (postgres.js) driver, not `pg`.
|
|
38
|
+
- `db:generate` before `db:migrate` -- no auto-generate.
|
|
39
|
+
- Export interfaces used as service return types.
|
|
40
|
+
|
|
41
|
+
### Read the Existing Codebase
|
|
42
|
+
|
|
43
|
+
Before creating any new file, use the **project-discovery** skill (or its key steps) to understand:
|
|
44
|
+
- Naming conventions in the existing codebase.
|
|
45
|
+
- File organization patterns.
|
|
46
|
+
- Import patterns (aliases, barrel exports).
|
|
47
|
+
- Error handling patterns.
|
|
48
|
+
- Testing patterns.
|
|
49
|
+
|
|
50
|
+
New code must match existing patterns exactly. Do not introduce new conventions unless the plan explicitly calls for it.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Implementation Methodology: Incremental Build
|
|
55
|
+
|
|
56
|
+
### Build the Smallest Working Unit First
|
|
57
|
+
|
|
58
|
+
Never attempt to build an entire feature in one pass. Break the work into the smallest unit that can independently compile and be verified:
|
|
59
|
+
|
|
60
|
+
1. **Schema first**: If the feature needs database tables, define the Drizzle schema and generate the migration. Verify the migration applies cleanly.
|
|
61
|
+
2. **Service layer second**: Write the service that queries the schema. Verify it compiles and the types resolve.
|
|
62
|
+
3. **Controller third**: Write the controller that exposes the service. Verify the route registers and returns data.
|
|
63
|
+
4. **Integration fourth**: Wire the module into the app module. Verify end-to-end request flow.
|
|
64
|
+
5. **Frontend last** (if applicable): Build the UI that calls the API. Verify the full stack works together.
|
|
65
|
+
|
|
66
|
+
At each step, verify before proceeding. Do not stack unverified layers.
|
|
67
|
+
|
|
68
|
+
### Verification at Each Step
|
|
69
|
+
|
|
70
|
+
After completing each incremental unit:
|
|
71
|
+
- **Compile check**: Does `tsc --noEmit` pass? Does the project build without errors?
|
|
72
|
+
- **Runtime check**: Does the application start? Does the new route/module register?
|
|
73
|
+
- **Functional check**: Does the feature return correct data for a basic happy-path case?
|
|
74
|
+
- **Test check**: Does the corresponding test pass?
|
|
75
|
+
|
|
76
|
+
If any check fails, fix it before moving to the next unit. Do not accumulate failures.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Anti-Stub Discipline
|
|
81
|
+
|
|
82
|
+
This is the most critical rule of implementation execution. Violations are treated as blockers.
|
|
83
|
+
|
|
84
|
+
### What Constitutes a Stub
|
|
85
|
+
|
|
86
|
+
A stub is any code that does not perform its stated function. This includes:
|
|
87
|
+
|
|
88
|
+
- Functions that return hardcoded values instead of querying real data sources.
|
|
89
|
+
- API endpoints that return mock JSON instead of calling real services.
|
|
90
|
+
- Components that render placeholder text ("Lorem ipsum," "Coming soon," "TODO") instead of real content.
|
|
91
|
+
- Error handlers that catch and swallow errors, log nothing, and return generic messages.
|
|
92
|
+
- Services that call `console.log` instead of performing real operations.
|
|
93
|
+
- Database queries that are commented out with a hardcoded return value.
|
|
94
|
+
- Any code containing `TODO`, `FIXME`, `HACK`, `XXX`, or `PLACEHOLDER` in production files.
|
|
95
|
+
- Test files that contain `it.skip`, `it.todo`, or empty test bodies.
|
|
96
|
+
|
|
97
|
+
### The Anti-Stub Standard
|
|
98
|
+
|
|
99
|
+
Every function must perform its real operation:
|
|
100
|
+
- **API endpoints** must call real services, which call real data stores, and return real data.
|
|
101
|
+
- **Services** must contain real business logic, real validation, real error handling.
|
|
102
|
+
- **Components** must render real content from real data sources with real styling.
|
|
103
|
+
- **Error handlers** must catch specific error types, log meaningful messages, and return appropriate HTTP status codes with descriptive error bodies.
|
|
104
|
+
- **Tests** must make real assertions against real behavior. A test that always passes is worse than no test.
|
|
105
|
+
|
|
106
|
+
### When Partial Implementation Is Acceptable
|
|
107
|
+
|
|
108
|
+
The only acceptable form of incomplete code is when the plan explicitly stages work across phases and a later phase will complete the implementation. In this case:
|
|
109
|
+
- The incomplete code must still compile and not break the application.
|
|
110
|
+
- The incomplete area must be documented in the plan's "Remaining Work" section.
|
|
111
|
+
- The code must NOT contain `TODO` comments -- instead, the plan document tracks what remains.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Connection Verification
|
|
116
|
+
|
|
117
|
+
After building any component, verify that it connects correctly to adjacent components.
|
|
118
|
+
|
|
119
|
+
### Backend Connection Checks
|
|
120
|
+
|
|
121
|
+
- After writing a service, verify the controller can call it and return data.
|
|
122
|
+
- After writing a controller, verify the module exports it and the route is reachable.
|
|
123
|
+
- After writing a database schema, verify the service can query it and the types align.
|
|
124
|
+
- After writing a guard or interceptor, verify it is applied to the correct routes and functions correctly.
|
|
125
|
+
- After writing a module, verify it is imported by the app module (or a parent feature module) and its providers resolve.
|
|
126
|
+
|
|
127
|
+
### Frontend Connection Checks
|
|
128
|
+
|
|
129
|
+
- After writing an API client function, verify it calls the correct backend endpoint with the correct method and payload.
|
|
130
|
+
- After writing a component, verify it receives the correct props and renders the correct data.
|
|
131
|
+
- After writing a state manager (store, context, reducer), verify components read and write state correctly.
|
|
132
|
+
- After writing a route, verify navigation reaches the correct component with the correct parameters.
|
|
133
|
+
|
|
134
|
+
### Cross-Stack Connection Checks
|
|
135
|
+
|
|
136
|
+
- After writing a backend endpoint, verify the frontend API client calls it correctly.
|
|
137
|
+
- After changing a response shape, verify the frontend type definitions and rendering logic are updated.
|
|
138
|
+
- After changing a database schema, verify the service queries, DTOs, and API contracts are updated.
|
|
139
|
+
|
|
140
|
+
Never assume connections work. Verify explicitly by reading both sides of every integration boundary.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## File Creation Discipline
|
|
145
|
+
|
|
146
|
+
### Prefer Editing Existing Files
|
|
147
|
+
|
|
148
|
+
Before creating a new file, check whether an existing file should be modified instead. Common mistakes:
|
|
149
|
+
- Creating a new utility file when an existing `utils/` module already has a similar function.
|
|
150
|
+
- Creating a new DTO file when the existing DTO file for that module should be extended.
|
|
151
|
+
- Creating a new test file when the existing test file should have additional test cases.
|
|
152
|
+
|
|
153
|
+
### When New Files Are Necessary
|
|
154
|
+
|
|
155
|
+
Create new files only when:
|
|
156
|
+
- The plan explicitly calls for a new module, service, controller, or component.
|
|
157
|
+
- The existing file would become too large (> 300 lines) with the addition.
|
|
158
|
+
- The new code has a distinctly different responsibility from the existing file.
|
|
159
|
+
|
|
160
|
+
### File Naming
|
|
161
|
+
|
|
162
|
+
Follow the project's existing naming conventions exactly. If the project uses:
|
|
163
|
+
- `kebab-case.service.ts` -- use that pattern.
|
|
164
|
+
- `PascalCase.controller.ts` -- use that pattern.
|
|
165
|
+
- `{feature}.{type}.ts` -- use that pattern.
|
|
166
|
+
|
|
167
|
+
Never introduce a new naming convention. Match what exists.
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Import Hygiene
|
|
172
|
+
|
|
173
|
+
### Verify All Imports Resolve
|
|
174
|
+
|
|
175
|
+
After writing or modifying any file, verify that:
|
|
176
|
+
- Every import statement references a file that exists.
|
|
177
|
+
- Every imported symbol is exported by the source file.
|
|
178
|
+
- No circular dependencies are introduced (Module A imports B which imports A).
|
|
179
|
+
|
|
180
|
+
### Import Order Convention
|
|
181
|
+
|
|
182
|
+
Follow the project's existing import order. If no convention exists, use:
|
|
183
|
+
1. Node.js built-in modules (`fs`, `path`, `crypto`)
|
|
184
|
+
2. External packages (`@nestjs/core`, `drizzle-orm`)
|
|
185
|
+
3. Internal shared modules (`@/common`, `@/shared`)
|
|
186
|
+
4. Local module imports (`./dto`, `./service`)
|
|
187
|
+
|
|
188
|
+
Separate each group with a blank line.
|
|
189
|
+
|
|
190
|
+
### Barrel Export Maintenance
|
|
191
|
+
|
|
192
|
+
If the project uses barrel exports (`index.ts`), update them when adding new exports. A new service, DTO, or component that is not added to its module's barrel export will cause import failures in consuming modules.
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Error Handling
|
|
197
|
+
|
|
198
|
+
### Real Error Handling Standards
|
|
199
|
+
|
|
200
|
+
Every function that can fail must handle failure explicitly:
|
|
201
|
+
|
|
202
|
+
- **Database queries**: Catch connection errors, constraint violations, and not-found conditions. Return appropriate error responses for each.
|
|
203
|
+
- **External API calls**: Handle timeout, 4xx, 5xx, and network failure cases. Implement retry logic where appropriate (with exponential backoff, not infinite retries).
|
|
204
|
+
- **User input**: Validate all input at the controller layer using DTOs with class-validator decorators (or the project's validation approach). Never trust client input.
|
|
205
|
+
- **Business logic**: Throw typed exceptions (`NotFoundException`, `ConflictException`, `ForbiddenException`) that map to correct HTTP status codes.
|
|
206
|
+
- **Async operations**: Handle promise rejections. Never leave an `async` function without error handling on awaited calls.
|
|
207
|
+
|
|
208
|
+
### What NOT to Do
|
|
209
|
+
|
|
210
|
+
- Never catch an error and return a generic "Something went wrong" message.
|
|
211
|
+
- Never catch an error and silently swallow it (`catch (e) {}`).
|
|
212
|
+
- Never use `console.log` as the sole error handling mechanism.
|
|
213
|
+
- Never throw raw `Error` objects when a typed NestJS exception is appropriate.
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Reporting
|
|
218
|
+
|
|
219
|
+
After completing an implementation unit (a module, a feature, or a phase), write a brief implementation report as a terminal message using the **terminal-presentation** skill:
|
|
220
|
+
|
|
221
|
+
```
|
|
222
|
+
--- {AGENT ROLE} ---
|
|
223
|
+
Phase: Implementation
|
|
224
|
+
Status: {Complete | In Progress | Blocked}
|
|
225
|
+
|
|
226
|
+
## Built
|
|
227
|
+
- {Module/feature name}: {One-line description of what it does}
|
|
228
|
+
- {Module/feature name}: {One-line description of what it does}
|
|
229
|
+
|
|
230
|
+
## Connections Verified
|
|
231
|
+
- {Endpoint} -> {Service} -> {Database}: Working
|
|
232
|
+
- {Component} -> {API Client} -> {Endpoint}: Working
|
|
233
|
+
|
|
234
|
+
## Tests
|
|
235
|
+
- {Test file}: {N} tests passing
|
|
236
|
+
|
|
237
|
+
## Remaining
|
|
238
|
+
- {What is left to build, if anything}
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## Testing Alongside Implementation
|
|
246
|
+
|
|
247
|
+
Write tests immediately after completing each unit, not all tests at the end.
|
|
248
|
+
|
|
249
|
+
### Test-per-Unit Pattern
|
|
250
|
+
|
|
251
|
+
1. Build the schema. Write a test that verifies the schema compiles and migrations apply.
|
|
252
|
+
2. Build the service. Write a test that verifies the service returns correct data for happy-path and error cases.
|
|
253
|
+
3. Build the controller. Write a test that verifies HTTP requests return correct responses.
|
|
254
|
+
4. Build the component. Write a test that verifies rendering with expected props.
|
|
255
|
+
|
|
256
|
+
### Test Quality Standards
|
|
257
|
+
|
|
258
|
+
- Every test must make at least one meaningful assertion.
|
|
259
|
+
- Tests must fail if the implementation is wrong. Write the assertion first, verify it would fail with a stub, then verify it passes with real code.
|
|
260
|
+
- Use realistic test data, not `{ id: 1, name: 'test' }`. Use data that resembles production (real names, real email formats, realistic quantities).
|
|
261
|
+
- Mock only external boundaries (database, HTTP clients, third-party services). Do not mock the code under test.
|
|
262
|
+
- For NestJS services, use the Proxy-based Drizzle mock pattern established in the project (if applicable) for chainable query mocking.
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## The "Done" Standard
|
|
267
|
+
|
|
268
|
+
Never claim "done" without meeting ALL of these criteria:
|
|
269
|
+
|
|
270
|
+
1. **The code compiles** without errors (`tsc --noEmit` or equivalent).
|
|
271
|
+
2. **The application starts** without runtime errors.
|
|
272
|
+
3. **All tests pass** -- both new tests and existing tests.
|
|
273
|
+
4. **Connections are verified** -- every integration boundary has been checked.
|
|
274
|
+
5. **No stubs remain** -- a search for TODO, FIXME, placeholder, mock (in production code), stub, hardcoded returns zero results in the implementation.
|
|
275
|
+
6. **The implementation matches the plan** -- every requirement in the assigned section is implemented.
|
|
276
|
+
7. **An implementation report has been written** -- the team knows what was built and what it connects to.
|
|
277
|
+
|
|
278
|
+
If any criterion is not met, the work is not done. Fix it before reporting completion.
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## Anti-Patterns to Avoid
|
|
283
|
+
|
|
284
|
+
- **Plan deviation without approval**: Never implement something different from what the plan specifies. If the plan is wrong, raise it with the Architect -- do not silently diverge.
|
|
285
|
+
- **Big-bang implementation**: Never write an entire feature before compiling or testing. Build incrementally.
|
|
286
|
+
- **Copy-paste without understanding**: Never copy code from another module without understanding what it does and adapting it to the current context.
|
|
287
|
+
- **Optimizing prematurely**: Build for correctness first. Optimize only when the plan calls for it or profiling reveals a bottleneck.
|
|
288
|
+
- **Ignoring existing patterns**: Never introduce a new way of doing something that the codebase already does a different way. Match existing patterns.
|
|
289
|
+
- **Claiming done without running**: Never report completion based on reading the code. Run it. Test it. Verify it.
|
|
290
|
+
- **Swallowing errors to make tests pass**: If a test fails, fix the implementation, not the test. If the test is wrong, fix the test with a comment explaining why, not by deleting the assertion.
|
|
291
|
+
- **Leaving orphaned code**: If refactoring changes an interface, update ALL callers. If deleting a function, remove ALL imports of that function. Use search to verify zero remaining references.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: index-repo
|
|
3
|
+
description: Register and index a repo with Forge for intelligent code search, knowledge tracking, and graph analysis.
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /index-repo — Register & Index a Repository
|
|
8
|
+
|
|
9
|
+
One-shot onboarding: register a repository with Forge and index it for intelligent code search, knowledge tracking, and graph analysis.
|
|
10
|
+
|
|
11
|
+
## Behavior
|
|
12
|
+
|
|
13
|
+
### Quick Setup (default)
|
|
14
|
+
|
|
15
|
+
1. Check if `.forge/manifest.yaml` exists. If not, run `mcp__dk-forge__init` to create it.
|
|
16
|
+
2. Run `mcp__dk-forge__register` to register the repo with the Forge server.
|
|
17
|
+
3. Run `mcp__dk-forge__index_repo` to index the codebase (chunks code, generates embeddings, builds graph).
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/index-repo
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### With Options
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
/index-repo name:my-project stack:nestjs,typescript
|
|
27
|
+
/index-repo force (re-index even if already indexed)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Status Check
|
|
31
|
+
|
|
32
|
+
To check current index status: call `mcp__dk-forge__get_index_status`.
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
/index-repo status
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Init Parameters
|
|
39
|
+
|
|
40
|
+
When initializing a new repo, infer these from the codebase:
|
|
41
|
+
- **name**: From `package.json` name, directory name, or user input.
|
|
42
|
+
- **stack**: Detect from package.json dependencies, file extensions, config files (e.g., `tsconfig.json` → typescript, `nest-cli.json` → nestjs).
|
|
43
|
+
- **sharing**: Default `private`. Set `team` or `public` if the user requests it.
|
|
44
|
+
|
|
45
|
+
## What Indexing Provides
|
|
46
|
+
|
|
47
|
+
After indexing, the repo gains access to:
|
|
48
|
+
- **`/search`** — 5-signal ranked code search (vector + graph + recency + hotspot + observations).
|
|
49
|
+
- **`/impact`** — call graph traversal for dependency analysis.
|
|
50
|
+
- **`/history`** — semantic git commit search and hotspot analysis.
|
|
51
|
+
- **`/gotchas`** — known pitfalls and patterns from past pipeline runs.
|
|
52
|
+
|
|
53
|
+
## Re-Indexing
|
|
54
|
+
|
|
55
|
+
Run with `force: true` to re-index after significant codebase changes. The indexer is incremental but a force re-index ensures fresh embeddings.
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: interviewing
|
|
3
|
+
description: This skill should be used when conducting structured interviews with users for vision capture, requirements elicitation, design discovery, or architecture confirmation. Used by the strategist, product-manager, designer, and architect agents.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Interviewing Skill
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Provide a disciplined, structured methodology for conducting user interviews within the Forge agent system. Apply this skill whenever an agent must gather information from the user -- whether for vision capture, requirements elicitation, design discovery, or architecture confirmation. The methodology ensures interviews are focused, efficient, and produce actionable, documented outcomes.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Cardinal Rule: One Question at a Time
|
|
16
|
+
|
|
17
|
+
Never present multiple questions in a single message. Every message to the user must contain exactly ONE question or decision point. This is non-negotiable.
|
|
18
|
+
|
|
19
|
+
**Why**: Multiple questions cause the user to skim, answer partially, skip the hardest question, or give shallow answers to all. One question at a time forces depth, reduces cognitive load, and produces higher-quality signal.
|
|
20
|
+
|
|
21
|
+
**The only exception**: When presenting a recap for confirmation, multiple items may appear in a single message because the user is reviewing, not generating answers.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Question Format: Multi-Choice Over Open-Ended
|
|
26
|
+
|
|
27
|
+
Prefer multi-choice questions over open-ended questions whenever the answer space is bounded. Multi-choice options reduce the user's cognitive load from "generate an answer" to "evaluate and select."
|
|
28
|
+
|
|
29
|
+
### How to Structure Options
|
|
30
|
+
|
|
31
|
+
- Present 2-5 concrete options, each with a brief description of what it means and its implications.
|
|
32
|
+
- Include a description label for each option, not just bare keywords. "A) Monorepo -- all services in one repository, shared tooling, atomic commits across services" is better than "A) Monorepo."
|
|
33
|
+
- Always include a final option for "None of these / something else" to avoid forcing the user into a false choice.
|
|
34
|
+
- When one option is clearly recommended, mark it explicitly: "(recommended)" or "(default if you have no preference)."
|
|
35
|
+
- When options have trade-offs, present a brief pro/con for each rather than burying the trade-off.
|
|
36
|
+
|
|
37
|
+
### When Open-Ended Is Appropriate
|
|
38
|
+
|
|
39
|
+
Use open-ended questions when:
|
|
40
|
+
- The answer space is truly unbounded (e.g., "What problem are you trying to solve?").
|
|
41
|
+
- The user's framing matters more than specific details (e.g., "How do you think about this feature's priority?").
|
|
42
|
+
- Prior answers have not yet narrowed the space enough for options.
|
|
43
|
+
|
|
44
|
+
Even with open-ended questions, provide context or a framing sentence to anchor the user's thinking: "You mentioned this is for internal teams. When you say 'internal,' are you thinking of engineering only, or all departments?"
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Interview Phases
|
|
49
|
+
|
|
50
|
+
Every interview follows four phases in order. Do not skip phases, but adapt the depth of each phase based on how much is already known.
|
|
51
|
+
|
|
52
|
+
### Phase 1: Discovery
|
|
53
|
+
|
|
54
|
+
**Goal**: Understand the broad landscape -- the problem, the context, the stakeholders, and the user's mental model.
|
|
55
|
+
|
|
56
|
+
- Start with the highest-level question: what is being built, for whom, and why.
|
|
57
|
+
- Ask about prior art: has this been attempted before? Are there existing systems, processes, or workarounds?
|
|
58
|
+
- Identify stakeholders: who benefits, who is affected, who has opinions.
|
|
59
|
+
- Surface constraints early: timeline, budget, technology mandates, team capacity.
|
|
60
|
+
- Do not dive into specifics yet. Resist the temptation to explore technical details during discovery.
|
|
61
|
+
|
|
62
|
+
**Typical question count**: 4-8 questions.
|
|
63
|
+
|
|
64
|
+
### Phase 2: Clarification
|
|
65
|
+
|
|
66
|
+
**Goal**: Drill into the specifics surfaced during discovery. Turn vague statements into concrete, actionable requirements.
|
|
67
|
+
|
|
68
|
+
- For each discovery answer that was broad or ambiguous, ask a follow-up that narrows it to something implementable.
|
|
69
|
+
- Probe for edge cases: "You said users can upload files. What happens if the file is 500MB? What about unsupported formats?"
|
|
70
|
+
- Probe for priorities: "You listed five features. If you could only ship two this iteration, which two?"
|
|
71
|
+
- Probe for implicit assumptions: "You said 'fast.' What does fast mean to you -- sub-second page loads? Real-time updates? Same-day processing?"
|
|
72
|
+
- Use context framing before each question: "Based on what you said about X, I want to clarify Y."
|
|
73
|
+
|
|
74
|
+
**Typical question count**: 5-12 questions, depending on complexity.
|
|
75
|
+
|
|
76
|
+
### Phase 3: Confirmation
|
|
77
|
+
|
|
78
|
+
**Goal**: Verify understanding by presenting a structured summary and asking the user to confirm, correct, or amend.
|
|
79
|
+
|
|
80
|
+
- Present a decision recap (see "Decision Recaps" section below) that summarizes all key findings from the interview.
|
|
81
|
+
- Walk through each major point and ask: "Does this accurately capture your intent?"
|
|
82
|
+
- For any corrections, ask one follow-up question to clarify, then update the recap.
|
|
83
|
+
- Do not proceed to documentation until the user explicitly confirms the recap.
|
|
84
|
+
|
|
85
|
+
**Typical question count**: 1-3 questions (recap + corrections).
|
|
86
|
+
|
|
87
|
+
### Phase 4: Documentation
|
|
88
|
+
|
|
89
|
+
**Goal**: Write all confirmed findings to the appropriate plan document.
|
|
90
|
+
|
|
91
|
+
- Write findings to the plan document specified by the invoking agent (e.g., `vision.md`, `requirements.md`, `xd-plan.md`, `architecture.md`).
|
|
92
|
+
- Use the document structure specified by the invoking agent.
|
|
93
|
+
- Include a "Decision Log" entry for every decision made during the interview, with date, decision, rationale, and who decided.
|
|
94
|
+
- Surface any open questions that the interview did not resolve -- these go into an "Open Questions" section and may need to be revisited.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Progressive Depth
|
|
99
|
+
|
|
100
|
+
Start every interview at the broadest level and narrow progressively based on the user's answers. Never jump to detail before establishing context.
|
|
101
|
+
|
|
102
|
+
**The depth rule**: each question should be one level deeper than the previous question within its topic. If the user answered "We need user authentication," the next question within that topic should be about authentication specifically (e.g., "What identity providers do you need to support?"), not about database schema for auth tokens.
|
|
103
|
+
|
|
104
|
+
**Cross-topic transitions**: When moving to a new topic, signal the transition explicitly: "That covers the authentication requirements. Now, let me ask about data storage."
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Context Framing
|
|
109
|
+
|
|
110
|
+
Before every question (after the first), provide a brief context sentence that connects the question to what the user has already said. This serves three purposes:
|
|
111
|
+
|
|
112
|
+
1. **Demonstrates active listening**: The user sees that their previous answers were heard and integrated.
|
|
113
|
+
2. **Provides momentum**: The interview feels like a conversation building toward a goal, not a disconnected interrogation.
|
|
114
|
+
3. **Catches misunderstandings early**: If the framing is wrong, the user will correct it before answering the new question.
|
|
115
|
+
|
|
116
|
+
**Pattern**: "Based on [what you said about X], I want to explore [Y]. [Question]?"
|
|
117
|
+
|
|
118
|
+
**Example**: "Based on your requirement for real-time collaboration, I want to understand the concurrency model. When two users edit the same document simultaneously, should their changes merge automatically, or should one user's changes take priority?"
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Decision Recaps
|
|
123
|
+
|
|
124
|
+
At the end of each interview round (and at the end of the full interview), present a structured recap of all decisions and findings. The recap format must be:
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Interview Recap
|
|
130
|
+
|
|
131
|
+
> Round {N} Summary
|
|
132
|
+
|
|
133
|
+
### Decisions Confirmed
|
|
134
|
+
- **{Topic}**: {Decision} -- {Brief rationale}
|
|
135
|
+
- **{Topic}**: {Decision} -- {Brief rationale}
|
|
136
|
+
|
|
137
|
+
### Open Questions (Deferred)
|
|
138
|
+
- {Question}: {Why it is deferred, when it should be resolved}
|
|
139
|
+
|
|
140
|
+
### Scope Boundaries
|
|
141
|
+
- **In Scope**: {List}
|
|
142
|
+
- **Out of Scope**: {List}
|
|
143
|
+
|
|
144
|
+
### Next Steps
|
|
145
|
+
- {What happens next based on these decisions}
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Present the recap using the **terminal-presentation** skill for clear formatting. Ask the user to confirm: "Does this accurately capture what we discussed? Anything to correct or add?"
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Handling "I Don't Know" Answers
|
|
155
|
+
|
|
156
|
+
When the user responds with "I don't know," "not sure," "whatever you think," or similar deflections:
|
|
157
|
+
|
|
158
|
+
1. **Do not skip the topic.** An unresolved decision becomes an implicit decision that nobody owns.
|
|
159
|
+
2. **Offer a default with reasoning.** "If you have no strong preference, the standard approach for this is X because Y. Shall I go with that?"
|
|
160
|
+
3. **Label the default clearly in documentation.** Any decision made by default (rather than explicit user choice) must be marked in the decision log: "Decision: X (default -- user deferred to agent recommendation). Rationale: Y."
|
|
161
|
+
4. **Set a review trigger.** If the default has significant downstream impact, note it as a review item: "This default should be revisited before production deployment."
|
|
162
|
+
|
|
163
|
+
Never accept "I don't know" and move on without documenting what was decided by default.
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Handling Scope Creep During Interviews
|
|
168
|
+
|
|
169
|
+
When the user introduces a topic or requirement that is outside the scope of the current interview:
|
|
170
|
+
|
|
171
|
+
1. **Acknowledge it immediately.** "That is an interesting point about X."
|
|
172
|
+
2. **Capture it visibly.** "I am noting that down as a potential future consideration."
|
|
173
|
+
3. **Do not explore it.** Do not ask follow-up questions about the out-of-scope item. Do not let it redirect the interview.
|
|
174
|
+
4. **Redirect back to scope.** "For this interview, let me stay focused on Y. We can circle back to X in a future session."
|
|
175
|
+
5. **Document it.** Add the out-of-scope item to the "Deferred / Out of Scope" section of the plan document with a note about when it might be revisited.
|
|
176
|
+
|
|
177
|
+
The goal is to honor the user's idea without letting it hijack the interview's focus.
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Adaptive Depth: When to Probe vs. When to Accept
|
|
182
|
+
|
|
183
|
+
Not every answer requires deep follow-up. Use these heuristics to decide:
|
|
184
|
+
|
|
185
|
+
### Probe Deeper When:
|
|
186
|
+
- The answer is ambiguous or could be interpreted multiple ways.
|
|
187
|
+
- The answer has significant architectural or cost implications that the user may not have considered.
|
|
188
|
+
- The answer contradicts a previous answer or an established pattern.
|
|
189
|
+
- The answer uses vague quantifiers ("a lot," "sometimes," "most users") that need grounding.
|
|
190
|
+
- The topic is a known risk area (security, data migration, performance, authorization).
|
|
191
|
+
|
|
192
|
+
### Accept and Move On When:
|
|
193
|
+
- The answer is concrete, specific, and internally consistent.
|
|
194
|
+
- The answer aligns with established project patterns or prior decisions.
|
|
195
|
+
- The answer covers a low-risk area where the default is well-understood.
|
|
196
|
+
- The user signals impatience with a topic ("Yeah, the standard way is fine").
|
|
197
|
+
- Further depth would not change the implementation approach.
|
|
198
|
+
|
|
199
|
+
### Explicit Depth Signals from the User:
|
|
200
|
+
- "Plow through" / "just make it work" / "default is fine" = Accept the answer, apply sensible defaults, document them, and move on. Reduce remaining question count.
|
|
201
|
+
- "Let me think about that" / "good question" = The user is engaged. Allow a moment, then offer options to help structure their thinking.
|
|
202
|
+
- "That is out of scope" / "not this iteration" = Capture it in the deferred section and move on immediately.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Output Requirements
|
|
207
|
+
|
|
208
|
+
Every interview must produce written output. Never conduct an interview that ends with only a verbal summary.
|
|
209
|
+
|
|
210
|
+
1. **Primary output**: Write all findings to the plan document specified by the invoking agent. Use the document structure that agent expects.
|
|
211
|
+
2. **Decision log**: Every decision made during the interview gets a log entry with date, decision, rationale, and decider (user or agent-default).
|
|
212
|
+
3. **Open questions**: Any unresolved topics go into an "Open Questions" section with notes on when and how they should be resolved.
|
|
213
|
+
4. **Deferred items**: Any scope creep items captured during the interview go into a "Deferred / Out of Scope" section.
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Anti-Patterns to Avoid
|
|
218
|
+
|
|
219
|
+
- **Question dumping**: Never present more than one question per message. This is the most common and most damaging violation.
|
|
220
|
+
- **Leading questions**: Do not embed the "right" answer in the question. "Don't you think we should use WebSockets?" is a leading question. "What communication pattern fits best here: polling, SSE, or WebSockets?" is a neutral question.
|
|
221
|
+
- **Jargon without context**: If using a technical term, define it briefly unless the user has already demonstrated familiarity. "Should we use CQRS -- that is, separating the read and write models -- for this service?"
|
|
222
|
+
- **Ignoring prior answers**: Never ask a question whose answer was already given in a previous response. Re-read the full interview context before each question.
|
|
223
|
+
- **Interviewing past the point of value**: If the user has given enough information to proceed, stop interviewing. Do not ask questions for the sake of completeness when the answers will not change the plan.
|
|
224
|
+
- **Skipping the recap**: Always present a confirmation recap. Never go straight from questions to documentation without user confirmation.
|
|
225
|
+
- **Treating "I don't know" as "skip"**: Always offer a default and document it.
|