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,276 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debugging
|
|
3
|
+
description: This skill should be used when encountering bugs, test failures, unexpected behavior, or error messages during development. Used by all implementation agents to systematically diagnose and fix issues rather than guessing.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Debugging Skill
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Provide a systematic, evidence-based methodology for diagnosing and fixing bugs, test failures, and unexpected behavior. Apply this skill whenever something does not work as expected — a test fails, an error appears, a feature behaves incorrectly, or a system produces unexpected output. The methodology eliminates guessing, prevents wasted effort, and ensures fixes address root causes rather than symptoms.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Cardinal Rule: Do Not Guess
|
|
16
|
+
|
|
17
|
+
Never make a change to fix a bug without first understanding why the bug occurs. Guessing leads to:
|
|
18
|
+
|
|
19
|
+
- Changes that mask the bug without fixing it.
|
|
20
|
+
- Multiple simultaneous changes that make it impossible to determine which one helped.
|
|
21
|
+
- New bugs introduced by speculative fixes.
|
|
22
|
+
- Wasted time when the guess is wrong and the debugging cycle restarts.
|
|
23
|
+
|
|
24
|
+
Every fix must be preceded by a hypothesis that is supported by evidence. "I think this might fix it" is not a hypothesis. "The JWT validation fails because the issuer claim does not match the configured issuer URL due to a trailing slash difference" is a hypothesis.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## The Seven-Step Debugging Method
|
|
29
|
+
|
|
30
|
+
### Step 1: REPRODUCE
|
|
31
|
+
|
|
32
|
+
Confirm the bug exists and establish a reliable reproduction path.
|
|
33
|
+
|
|
34
|
+
- Get the exact error message. Copy it verbatim. Do not paraphrase or summarize — exact wording matters because error messages are searchable and specific.
|
|
35
|
+
- Get the exact steps to reproduce: what command was run, what input was provided, what sequence of actions led to the failure.
|
|
36
|
+
- Reproduce the bug locally. If the bug only occurs in a specific environment, identify the environmental difference (env vars, database state, network configuration, dependency versions).
|
|
37
|
+
- If the bug is intermittent, identify the conditions under which it occurs and does not occur. Intermittent bugs are usually race conditions, caching issues, or state-dependent failures.
|
|
38
|
+
|
|
39
|
+
**Do not proceed until the bug is reproducible.** A bug that cannot be reproduced cannot be verified as fixed.
|
|
40
|
+
|
|
41
|
+
### Step 2: ISOLATE
|
|
42
|
+
|
|
43
|
+
Narrow the scope from "something is broken" to "this specific thing is broken."
|
|
44
|
+
|
|
45
|
+
- **Binary search the call stack**: Start at the entry point (API endpoint, event handler, user action). Trace the execution path. Identify where the actual behavior diverges from expected behavior. Check the halfway point first — is the data correct there? If yes, the bug is downstream. If no, the bug is upstream. Continue halving.
|
|
46
|
+
- **Isolate the layer**: Is the bug in the controller, the service, the database query, the external API call, the data transformation, or the response serialization? Each layer can be tested independently.
|
|
47
|
+
- **Isolate the input**: Does the bug occur with all inputs or only specific ones? Narrow the input to the minimal reproduction case. A bug that occurs with one specific email address is easier to diagnose than one that "sometimes fails."
|
|
48
|
+
- **Check recent changes**: If the code worked before and does not work now, identify what changed. Use `git log`, `git diff`, and `git bisect` to narrow the introducing commit. This is often the fastest path to isolation.
|
|
49
|
+
|
|
50
|
+
### Step 3: UNDERSTAND
|
|
51
|
+
|
|
52
|
+
Read the code around the failure point. Read it carefully, line by line.
|
|
53
|
+
|
|
54
|
+
- Read the actual error message. Not a summary. Not what was expected. The actual message. Many debugging sessions are extended by hours because the developer glanced at the error and assumed they understood it.
|
|
55
|
+
- Read the stack trace from top to bottom. The top frame is the point of failure. The frames below show how execution arrived there. Look for the transition from framework code to application code — that transition is usually where the bug lives.
|
|
56
|
+
- Read the function that failed. Read its callers. Read its dependencies. Understand the flow of data through the failure point.
|
|
57
|
+
- Check the types: is a value `undefined` when it should be a string? Is an array empty when it should have elements? Is a number `NaN`? Type mismatches are the most common category of runtime bugs.
|
|
58
|
+
|
|
59
|
+
### Step 4: HYPOTHESIZE
|
|
60
|
+
|
|
61
|
+
Form ONE specific, testable hypothesis about the root cause.
|
|
62
|
+
|
|
63
|
+
A good hypothesis:
|
|
64
|
+
- Identifies a specific location (file, function, line).
|
|
65
|
+
- Identifies a specific mechanism (wrong variable, missing null check, incorrect type conversion, race condition).
|
|
66
|
+
- Predicts what the fix would look like (even roughly).
|
|
67
|
+
- Is falsifiable — there is an observation that would prove it wrong.
|
|
68
|
+
|
|
69
|
+
A bad hypothesis:
|
|
70
|
+
- "Something is wrong with the authentication." (Too vague — where? what?)
|
|
71
|
+
- "The database is broken." (Too broad — which query? what failure mode?)
|
|
72
|
+
- "It might be a timing issue." (Untestable without specifics.)
|
|
73
|
+
|
|
74
|
+
Form only one hypothesis at a time. Do not maintain a mental list of five possibilities and try to test them all simultaneously.
|
|
75
|
+
|
|
76
|
+
### Step 5: VERIFY
|
|
77
|
+
|
|
78
|
+
Test the hypothesis with a targeted observation.
|
|
79
|
+
|
|
80
|
+
- Add a single log statement or breakpoint at the hypothesized failure point. Check if the variable has the expected value. Check if the code path executes at all.
|
|
81
|
+
- Make no other changes. The goal is to observe, not to fix. If the observation confirms the hypothesis, proceed to the fix. If the observation refutes the hypothesis, return to Step 4 with the new information.
|
|
82
|
+
- For hypotheses about data flow: log the value at the point of creation, at any transformation points, and at the point of consumption. The transformation where the value changes from correct to incorrect is the bug location.
|
|
83
|
+
- For hypotheses about control flow: log entry and exit of suspected functions. Confirm the code path matches expectations.
|
|
84
|
+
|
|
85
|
+
**The verification rule**: the evidence must either clearly support or clearly refute the hypothesis. If the result is ambiguous, the observation point was wrong — add a more targeted observation.
|
|
86
|
+
|
|
87
|
+
### Step 6: FIX
|
|
88
|
+
|
|
89
|
+
Make the smallest change that fixes the root cause.
|
|
90
|
+
|
|
91
|
+
- Fix the root cause, not the symptom. If a function receives `undefined` because the caller passes the wrong argument, fix the caller — do not add a null check in the function (unless the function's contract should accept undefined).
|
|
92
|
+
- Make exactly one change. If the fix requires multiple changes, make them one at a time and verify after each one.
|
|
93
|
+
- Do not "fix" adjacent code that is not related to the bug. Unrelated changes in a bug fix create confusion in the commit history and risk introducing new bugs.
|
|
94
|
+
- Remove any debugging artifacts (log statements, breakpoints) before finalizing the fix.
|
|
95
|
+
|
|
96
|
+
### Step 7: VERIFY FIX
|
|
97
|
+
|
|
98
|
+
Confirm the fix resolves the bug and does not introduce regressions.
|
|
99
|
+
|
|
100
|
+
- Run the original reproduction steps. The bug must no longer occur.
|
|
101
|
+
- Run all related tests. They must pass.
|
|
102
|
+
- Run the full test suite if practical. If the full suite is too slow, run at minimum the test suite for the affected module and any modules that depend on it.
|
|
103
|
+
- If the bug was discovered without a test, write a test that reproduces the bug (fails without the fix, passes with it). This prevents the bug from recurring.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Common Debugging Pitfalls
|
|
108
|
+
|
|
109
|
+
### Fixing Symptoms Instead of Root Causes
|
|
110
|
+
|
|
111
|
+
Symptom: "The API returns 500 when the user has no profile."
|
|
112
|
+
Bad fix: Catch the 500 and return 200 with an empty response.
|
|
113
|
+
Good fix: Find why a missing profile causes a crash (null dereference in the profile serializer) and handle the null case properly.
|
|
114
|
+
|
|
115
|
+
The symptom fix hides the bug. The root cause fix eliminates it.
|
|
116
|
+
|
|
117
|
+
### Making Multiple Changes at Once
|
|
118
|
+
|
|
119
|
+
When debugging, make ONE change at a time. If the bug disappears after making three changes simultaneously, it is unknown which change fixed it — and the other two changes may introduce latent bugs.
|
|
120
|
+
|
|
121
|
+
If the temptation to make multiple changes is strong, write them all down, then apply them one at a time, testing after each.
|
|
122
|
+
|
|
123
|
+
### Not Reading the Actual Error Message
|
|
124
|
+
|
|
125
|
+
Error messages are written by developers who encountered the same situation. They contain specific information: the operation that failed, the expected state, the actual state, and often a suggestion. Read the entire message before taking action.
|
|
126
|
+
|
|
127
|
+
Common error messages that are often misread:
|
|
128
|
+
- `Cannot read property 'x' of undefined` — the object is undefined, not the property. Find why the object is undefined.
|
|
129
|
+
- `Module not found` — check the import path, not the module's existence. Typos, wrong relative paths, and missing index files are the usual causes.
|
|
130
|
+
- `Connection refused` — the target service is not running or is on the wrong port. Check the service, not the client code.
|
|
131
|
+
|
|
132
|
+
### Assuming Instead of Verifying
|
|
133
|
+
|
|
134
|
+
"The environment variable is set." — Verify it. Log `process.env.THE_VAR` and check.
|
|
135
|
+
"The database has the record." — Verify it. Query the database directly.
|
|
136
|
+
"The function is being called." — Verify it. Add a log at the first line.
|
|
137
|
+
"The request is reaching the server." — Verify it. Check server logs.
|
|
138
|
+
|
|
139
|
+
Every assumption is a potential false assumption. Verify the ones that matter.
|
|
140
|
+
|
|
141
|
+
### Not Checking for the Same Bug Elsewhere
|
|
142
|
+
|
|
143
|
+
If a bug exists because a specific pattern is wrong (e.g., a missing null check), search the codebase for the same pattern. The same bug likely exists in every location where the pattern appears.
|
|
144
|
+
|
|
145
|
+
Use grep/ripgrep to search for the buggy pattern and fix all occurrences, not just the one that was reported.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## NestJS-Specific Debugging
|
|
150
|
+
|
|
151
|
+
### SWC Hoisting Issues
|
|
152
|
+
|
|
153
|
+
**Symptom**: Environment variables are `undefined` at runtime even though they are set in `.env` files.
|
|
154
|
+
|
|
155
|
+
**Root cause**: SWC (the NestJS compiler) hoists all `require()` calls above executable code in CommonJS output. Any module that reads `process.env` at the top level (outside a function) executes before `dotenv.config()` has been called, even if `dotenv.config()` appears earlier in the source.
|
|
156
|
+
|
|
157
|
+
**Diagnosis**: Check if the failing module has a top-level `process.env` read:
|
|
158
|
+
```typescript
|
|
159
|
+
// This reads env at module load time — BEFORE dotenv runs
|
|
160
|
+
const databaseUrl = process.env.DATABASE_URL!;
|
|
161
|
+
const sql = postgres(databaseUrl);
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**Fix**: Defer environment variable reads until first use, via a Proxy, a getter function, or lazy initialization inside the provider factory.
|
|
165
|
+
|
|
166
|
+
### Dependency Injection Failures
|
|
167
|
+
|
|
168
|
+
**Symptom**: `Nest can't resolve dependencies of the XService (?, YService)`. The `?` indicates the missing dependency.
|
|
169
|
+
|
|
170
|
+
**Diagnosis checklist**:
|
|
171
|
+
1. Is the missing dependency decorated with `@Injectable()`?
|
|
172
|
+
2. Is the module that provides the missing dependency imported in the consuming module's `imports` array?
|
|
173
|
+
3. If the dependency is provided with a custom token (e.g., `'DRIZZLE'`), is the `@Inject('DRIZZLE')` decorator present on the constructor parameter?
|
|
174
|
+
4. Is there a circular dependency between modules? NestJS cannot resolve circular module imports without `forwardRef()`.
|
|
175
|
+
|
|
176
|
+
**Fix**: Address the specific gap identified in the checklist. Do not scatter `@Global()` decorators to make the error go away — that hides architectural problems.
|
|
177
|
+
|
|
178
|
+
### Circular Dependencies
|
|
179
|
+
|
|
180
|
+
**Symptom**: `A circular dependency has been detected` or, more insidiously, silent `undefined` injection where a service is injected as `undefined`.
|
|
181
|
+
|
|
182
|
+
**Diagnosis**: Trace the import chain. Module A imports Module B, which imports Module A. Or Service A injects Service B, which injects Service A.
|
|
183
|
+
|
|
184
|
+
**Fix options**:
|
|
185
|
+
1. Use `forwardRef(() => ModuleName)` in the module imports if the circular dependency is architecturally intentional.
|
|
186
|
+
2. Extract the shared logic into a third module that both A and B depend on (preferred — eliminates the cycle).
|
|
187
|
+
3. Use events or message patterns to decouple the services rather than direct injection.
|
|
188
|
+
|
|
189
|
+
### Migration Errors
|
|
190
|
+
|
|
191
|
+
**Symptom**: `relation "table_name" already exists` or `column "x" of relation "y" does not exist` after schema changes.
|
|
192
|
+
|
|
193
|
+
**Diagnosis**: Check if `db:generate` was run after schema changes. Drizzle does not auto-generate migrations on `db:migrate` — the generate step must run first.
|
|
194
|
+
|
|
195
|
+
**Fix**: Run `db:generate` to create the migration file, inspect it for correctness, then run `db:migrate`.
|
|
196
|
+
|
|
197
|
+
### Import Style Errors
|
|
198
|
+
|
|
199
|
+
**Symptom**: `jwt.verify is not a function` or `jwksClient is not a function` at runtime.
|
|
200
|
+
|
|
201
|
+
**Root cause**: In CommonJS mode (which NestJS requires), packages like `jsonwebtoken` and `jwks-rsa` export their default differently. Namespace imports (`import * as jwt from 'jsonwebtoken'`) produce the wrong shape.
|
|
202
|
+
|
|
203
|
+
**Fix**: Use default imports: `import jwt from 'jsonwebtoken'`, `import jwksClient from 'jwks-rsa'`.
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Debugging Test Failures
|
|
208
|
+
|
|
209
|
+
Test failures are bugs in either the test or the production code. Apply the same seven-step method:
|
|
210
|
+
|
|
211
|
+
1. **Read the failure message**: What was expected? What was received? In which test?
|
|
212
|
+
2. **Isolate the test**: Run only the failing test. Does it fail in isolation? If it only fails when run with other tests, there is a test pollution issue (shared state, missing cleanup).
|
|
213
|
+
3. **Check if the test is correct**: Is the test's expectation actually correct? Is the test setup adequate? Sometimes the test is wrong, not the code.
|
|
214
|
+
4. **Check if the test is testing the right thing**: Is the test interacting with the real code or with a mock? A test that passes with a mock but fails with real code reveals a mock that does not match the real implementation.
|
|
215
|
+
5. **Trace the execution**: Add targeted logging in the code under test to see what actually happens during the test run.
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## When to Escalate
|
|
220
|
+
|
|
221
|
+
If three specific hypotheses have been tested and refuted, step back. The problem framing may be wrong.
|
|
222
|
+
|
|
223
|
+
**Reframing questions**:
|
|
224
|
+
- "Am I looking at the right component?" — Is the bug actually in a different service, a middleware, a proxy, or a configuration?
|
|
225
|
+
- "Am I looking at the right layer?" — Is this a code bug, a configuration bug, an infrastructure bug, or a data bug?
|
|
226
|
+
- "Am I looking at the right time?" — Does the bug occur during request processing, during initialization, during shutdown, or during a background job?
|
|
227
|
+
- "Is this actually a bug?" — Is the behavior incorrect, or is the expectation wrong? Check the requirements.
|
|
228
|
+
|
|
229
|
+
If reframing does not help after a fourth hypothesis, document everything that has been tried, the evidence gathered, and the hypotheses tested. Present this documentation when seeking help. "I tried X, Y, Z and here is what I observed" is infinitely more useful than "it doesn't work."
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Debugging Tools and Techniques
|
|
234
|
+
|
|
235
|
+
### Log-Based Debugging
|
|
236
|
+
|
|
237
|
+
When adding diagnostic logs:
|
|
238
|
+
- Log at the boundary of the suspected failure zone, not everywhere.
|
|
239
|
+
- Include the variable values, not just "reached here."
|
|
240
|
+
- Use structured logging: `logger.debug({ userId, tokenExp, now }, 'JWT validation check')` is better than `console.log('checking jwt')`.
|
|
241
|
+
- Remove all diagnostic logs before committing the fix.
|
|
242
|
+
|
|
243
|
+
### Git Bisect
|
|
244
|
+
|
|
245
|
+
When a feature that previously worked is now broken and the introducing commit is unknown:
|
|
246
|
+
|
|
247
|
+
1. Identify a known-good commit (where the feature works).
|
|
248
|
+
2. Run `git bisect start`, `git bisect bad` (current), `git bisect good <good-commit>`.
|
|
249
|
+
3. Git checks out a midpoint commit. Test the feature. Mark as `good` or `bad`.
|
|
250
|
+
4. Repeat until git identifies the introducing commit.
|
|
251
|
+
|
|
252
|
+
This finds the introducing commit in O(log n) steps rather than O(n) manual checks.
|
|
253
|
+
|
|
254
|
+
### Minimal Reproduction
|
|
255
|
+
|
|
256
|
+
When a bug is complex or environment-dependent, create a minimal reproduction:
|
|
257
|
+
|
|
258
|
+
1. Start with a clean project or test file.
|
|
259
|
+
2. Add only the code necessary to trigger the bug.
|
|
260
|
+
3. Strip away everything else: other modules, unrelated configuration, extra dependencies.
|
|
261
|
+
|
|
262
|
+
The minimal reproduction either reveals the bug immediately (because the stripped-down context makes it obvious) or proves that the bug depends on something in the larger context (which narrows the scope).
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## Post-Fix Checklist
|
|
267
|
+
|
|
268
|
+
After fixing any bug, complete this checklist before considering the work done:
|
|
269
|
+
|
|
270
|
+
- [ ] The original reproduction steps no longer trigger the bug.
|
|
271
|
+
- [ ] A regression test exists that fails without the fix and passes with it.
|
|
272
|
+
- [ ] All existing tests still pass.
|
|
273
|
+
- [ ] All diagnostic logging and debugging artifacts have been removed.
|
|
274
|
+
- [ ] The same buggy pattern has been searched for and fixed elsewhere in the codebase.
|
|
275
|
+
- [ ] The fix addresses the root cause, not just the symptom.
|
|
276
|
+
- [ ] The fix is the smallest change necessary — no unrelated improvements bundled in.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fix
|
|
3
|
+
description: Detect and fix issues in your current changes — reads git diff, checks known gotchas, runs build and lint, fixes iteratively.
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /fix — Context-Aware Code Fixer
|
|
8
|
+
|
|
9
|
+
Detect and fix issues in the current changeset by combining git diff context, repo stack knowledge, known gotchas, and build/lint output.
|
|
10
|
+
|
|
11
|
+
## Context Gathering (run in parallel)
|
|
12
|
+
|
|
13
|
+
1. **Current changeset**: Run `git diff` and `git diff --cached` to see what's changed.
|
|
14
|
+
2. **Repo stack**: Call `mcp__dk-forge__get_manifest` to read the repo's `.forge/manifest.yaml` for stack tags (e.g., nestjs, react, typescript).
|
|
15
|
+
3. **Known gotchas**: Call `mcp__dk-forge__get_gotchas` filtered by the repo's stack tags — surface pitfalls relevant to the current tech.
|
|
16
|
+
4. **Build output**: Run the repo's build command (detect from `package.json` scripts — typically `npm run build` or `npx tsc --noEmit`) and capture errors.
|
|
17
|
+
5. **Lint output**: Run the repo's lint command (typically `npm run lint` or `npx eslint .`) and capture warnings/errors.
|
|
18
|
+
|
|
19
|
+
## Fix Strategy
|
|
20
|
+
|
|
21
|
+
### Build Errors (highest priority)
|
|
22
|
+
- Parse TypeScript/compiler errors from build output.
|
|
23
|
+
- Cross-reference with gotchas — many build failures have known solutions.
|
|
24
|
+
- Fix type errors, missing imports, incorrect module resolution.
|
|
25
|
+
|
|
26
|
+
### Lint Errors
|
|
27
|
+
- Parse ESLint/Prettier output.
|
|
28
|
+
- Auto-fix what's auto-fixable (`--fix` flag).
|
|
29
|
+
- For remaining errors, apply manual fixes based on the rule and context.
|
|
30
|
+
|
|
31
|
+
### Changeset Review
|
|
32
|
+
- Review the diff for common mistakes:
|
|
33
|
+
- Missing null checks on new code paths.
|
|
34
|
+
- Unused imports added.
|
|
35
|
+
- Console.log/debugger statements left in.
|
|
36
|
+
- Inconsistent naming with existing conventions.
|
|
37
|
+
- Cross-reference changed files with `get_gotchas` for stack-specific pitfalls.
|
|
38
|
+
|
|
39
|
+
### Stack-Specific Checks
|
|
40
|
+
|
|
41
|
+
Adapt checks based on detected stack:
|
|
42
|
+
|
|
43
|
+
**NestJS**: Verify decorator metadata, check DI wiring, validate module imports/exports.
|
|
44
|
+
**React**: Check hook rules, verify key props in lists, validate prop types.
|
|
45
|
+
**TypeScript**: Verify strict mode compliance, check for `any` type leaks.
|
|
46
|
+
**Drizzle**: Validate schema changes have corresponding migrations.
|
|
47
|
+
|
|
48
|
+
## Execution
|
|
49
|
+
|
|
50
|
+
1. Gather all context in parallel.
|
|
51
|
+
2. Prioritize: build errors → lint errors → changeset issues.
|
|
52
|
+
3. Fix each issue, explaining what was wrong and why.
|
|
53
|
+
4. Re-run build and lint after fixes to verify resolution.
|
|
54
|
+
5. If new issues surface from fixes, iterate (max 3 rounds).
|
|
55
|
+
|
|
56
|
+
## Output
|
|
57
|
+
|
|
58
|
+
Report what was fixed:
|
|
59
|
+
- Number of build errors resolved.
|
|
60
|
+
- Number of lint issues resolved.
|
|
61
|
+
- Any manual issues flagged for user review.
|
|
62
|
+
- Remaining issues that could not be auto-fixed.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-design
|
|
3
|
+
description: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
|
|
4
|
+
license: Complete terms in LICENSE.txt
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
|
|
8
|
+
|
|
9
|
+
The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints.
|
|
10
|
+
|
|
11
|
+
## Design Thinking
|
|
12
|
+
|
|
13
|
+
Before coding, understand the context and commit to a BOLD aesthetic direction:
|
|
14
|
+
- **Purpose**: What problem does this interface solve? Who uses it?
|
|
15
|
+
- **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc. There are so many flavors to choose from. Use these for inspiration but design one that is true to the aesthetic direction.
|
|
16
|
+
- **Constraints**: Technical requirements (framework, performance, accessibility).
|
|
17
|
+
- **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember?
|
|
18
|
+
|
|
19
|
+
**CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work - the key is intentionality, not intensity.
|
|
20
|
+
|
|
21
|
+
Then implement working code (HTML/CSS/JS, React, Vue, etc.) that is:
|
|
22
|
+
- Production-grade and functional
|
|
23
|
+
- Visually striking and memorable
|
|
24
|
+
- Cohesive with a clear aesthetic point-of-view
|
|
25
|
+
- Meticulously refined in every detail
|
|
26
|
+
|
|
27
|
+
## Frontend Aesthetics Guidelines
|
|
28
|
+
|
|
29
|
+
Focus on:
|
|
30
|
+
- **Typography**: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font.
|
|
31
|
+
- **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
|
|
32
|
+
- **Motion**: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise.
|
|
33
|
+
- **Spatial Composition**: Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
|
|
34
|
+
- **Backgrounds & Visual Details**: Create atmosphere and depth rather than defaulting to solid colors. Add contextual effects and textures that match the overall aesthetic. Apply creative forms like gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, and grain overlays.
|
|
35
|
+
|
|
36
|
+
NEVER use generic AI-generated aesthetics like overused font families (Inter, Roboto, Arial, system fonts), cliched color schemes (particularly purple gradients on white backgrounds), predictable layouts and component patterns, and cookie-cutter design that lacks context-specific character.
|
|
37
|
+
|
|
38
|
+
Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices (Space Grotesk, for example) across generations.
|
|
39
|
+
|
|
40
|
+
**IMPORTANT**: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
|
|
41
|
+
|
|
42
|
+
Remember: Claude is capable of extraordinary creative work. Don't hold back, show what can truly be created when thinking outside the box and committing fully to a distinctive vision.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gotchas
|
|
3
|
+
description: Surface known pitfalls, patterns, and past decisions before you start coding. Avoid repeating old mistakes.
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /gotchas — Known Pitfalls & Patterns
|
|
8
|
+
|
|
9
|
+
Surface known gotchas, established patterns, and past decisions before starting work. Avoids repeating mistakes that previous pipeline runs or developers have already discovered.
|
|
10
|
+
|
|
11
|
+
## Behavior
|
|
12
|
+
|
|
13
|
+
### Gotchas (default)
|
|
14
|
+
|
|
15
|
+
Call `mcp__dk-forge__get_gotchas` to retrieve known pitfalls.
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
/gotchas
|
|
19
|
+
/gotchas stack:nestjs
|
|
20
|
+
/gotchas stack:react,typescript
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Optionally filter by stack tags to get relevant gotchas only.
|
|
24
|
+
|
|
25
|
+
### Patterns
|
|
26
|
+
|
|
27
|
+
When the user asks about established patterns, call `mcp__dk-forge__get_patterns`.
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
/gotchas patterns
|
|
31
|
+
/gotchas how do we handle errors
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Targeted Search
|
|
35
|
+
|
|
36
|
+
When the user asks about a specific topic, call `mcp__dk-forge__search_knowledge` with the query.
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
/gotchas authentication
|
|
40
|
+
/gotchas database migrations
|
|
41
|
+
/gotchas docker deployment
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Output Format
|
|
45
|
+
|
|
46
|
+
Present each item with:
|
|
47
|
+
1. **Title/summary** — what the gotcha or pattern is.
|
|
48
|
+
2. **Confidence score** — how well-established this knowledge is (0-1).
|
|
49
|
+
3. **Context** — where this was discovered (which pipeline run, which repo).
|
|
50
|
+
4. **Actionable advice** — what to do or avoid.
|
|
51
|
+
|
|
52
|
+
## When to Use
|
|
53
|
+
|
|
54
|
+
- **Before starting implementation** — check gotchas for the relevant stack/domain.
|
|
55
|
+
- **When hitting a strange error** — search for known issues.
|
|
56
|
+
- **When making architectural decisions** — check past decisions and their rationale.
|
|
57
|
+
- **During code review** — verify the approach aligns with established patterns.
|
|
58
|
+
|
|
59
|
+
## Boosting Knowledge
|
|
60
|
+
|
|
61
|
+
When a gotcha proves valuable (it saved time or prevented a bug), call `mcp__dk-forge__boost_knowledge` with the knowledge item ID to increase its confidence score. This makes it more visible in future searches.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: graph-orchestrator
|
|
3
|
+
description: This skill enables graph-based orchestration for multi-agent workflows, inspired by LangGraph. Define agent nodes, edges with conditions, and execute stateful flows with cycles and parallelism.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
This skill enables graph-based orchestration for multi-agent workflows, inspired by LangGraph. Define agent nodes, edges with conditions, and execute stateful flows with cycles and parallelism.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
### 1. Define Graph
|
|
12
|
+
- Nodes: Agents or functions
|
|
13
|
+
- Edges: Transitions with conditions
|
|
14
|
+
- State: JSON object passed between nodes
|
|
15
|
+
|
|
16
|
+
### 2. Execute Graph
|
|
17
|
+
- Start from entry node
|
|
18
|
+
- Route based on state/conditions
|
|
19
|
+
- Handle cycles (max iterations)
|
|
20
|
+
|
|
21
|
+
### 3. Persist State
|
|
22
|
+
- Checkpoint to JSON file
|
|
23
|
+
|
|
24
|
+
## Setup
|
|
25
|
+
- Use Python dicts for graph definition
|
|
26
|
+
- Conditions as lambda functions
|
|
27
|
+
|
|
28
|
+
## Usage in Supervisor
|
|
29
|
+
- Define workflow graphs
|
|
30
|
+
- Execute with current state
|
|
31
|
+
- Update state after each node
|
|
32
|
+
|
|
33
|
+
## Anti-Patterns
|
|
34
|
+
- Avoid infinite cycles
|
|
35
|
+
- Keep graphs simple
|
|
36
|
+
|
|
37
|
+
## References
|
|
38
|
+
- LangGraph: https://github.com/langchain-ai/langgraph
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: history
|
|
3
|
+
description: Git intelligence — find hotspots, search commits by meaning, and trace file evolution.
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /history — Git Intelligence
|
|
8
|
+
|
|
9
|
+
Query indexed git history with semantic search over commit messages, hotspot analysis, and file change velocity. More powerful than raw `git log` — uses indexed data with vector similarity for natural language queries.
|
|
10
|
+
|
|
11
|
+
## Modes
|
|
12
|
+
|
|
13
|
+
### Hotspots (default for bare `/history`)
|
|
14
|
+
|
|
15
|
+
Call `mcp__dk-forge__get_git_context` with `mode: "hotspots"`.
|
|
16
|
+
|
|
17
|
+
Shows the most frequently changed files — these are complexity magnets and likely sources of bugs.
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/history
|
|
21
|
+
/history hotspots
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Commit Search
|
|
25
|
+
|
|
26
|
+
Call `mcp__dk-forge__get_git_context` with `mode: "commit_search"` and the user's query.
|
|
27
|
+
|
|
28
|
+
Semantic search over commit messages — find commits by intent, not just keyword.
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
/history why was auth refactored
|
|
32
|
+
/history commits about performance
|
|
33
|
+
/history when did we add caching
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### File History
|
|
37
|
+
|
|
38
|
+
Call `mcp__dk-forge__get_git_context` with `mode: "file_history"` and `file_path`.
|
|
39
|
+
|
|
40
|
+
See the commit history for a specific file.
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
/history src/auth/auth.service.ts
|
|
44
|
+
/history file src/pipeline/engine.ts
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Output Format
|
|
48
|
+
|
|
49
|
+
- **Hotspots**: Ranked list of files by change frequency, with change count and last-modified date.
|
|
50
|
+
- **Commit search**: Matching commits with hash, message, author, date, and files changed.
|
|
51
|
+
- **File history**: Chronological commit list for the file with messages and authors.
|
|
52
|
+
|
|
53
|
+
## Use Cases
|
|
54
|
+
|
|
55
|
+
- **Where should I look first?** — Hotspots show the most active (and often most fragile) code.
|
|
56
|
+
- **Why does this code look like this?** — Commit search finds the reasoning behind changes.
|
|
57
|
+
- **Who knows about this?** — File history shows who has been working on a file.
|
|
58
|
+
- **When did this break?** — Narrow down when a behavior changed by searching commit messages.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: impact
|
|
3
|
+
description: Analyze code dependencies — who calls this function, what breaks if you change it, how data flows between symbols.
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /impact — Dependency & Call Graph Analysis
|
|
8
|
+
|
|
9
|
+
Analyze code dependencies by traversing the actual call/import graph. Far more accurate than text search for understanding who uses a symbol, what depends on it, and what would break if it changes.
|
|
10
|
+
|
|
11
|
+
## Prerequisites
|
|
12
|
+
|
|
13
|
+
The repo must be registered and indexed. FalkorDB graph store provides the richest results; without it, falls back to vector-based similarity.
|
|
14
|
+
|
|
15
|
+
## Behavior
|
|
16
|
+
|
|
17
|
+
### Impact Analysis (default)
|
|
18
|
+
|
|
19
|
+
Call `mcp__dk-forge__get_impact_graph` with the symbol name.
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
/impact UserService
|
|
23
|
+
/impact handleAuthentication
|
|
24
|
+
/impact DatabaseModule
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Parameters:**
|
|
28
|
+
- `direction: "inbound"` — who calls/imports this symbol (callers, dependents).
|
|
29
|
+
- `direction: "outbound"` — what does this symbol call/import (callees, dependencies).
|
|
30
|
+
- `direction: "both"` — full picture (default).
|
|
31
|
+
- `depth` — how many levels to traverse (1-5, default 3).
|
|
32
|
+
|
|
33
|
+
### Flow Tracing
|
|
34
|
+
|
|
35
|
+
When the user asks "how does data flow from A to B", call `mcp__dk-forge__search_logic_flow`.
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
/impact flow from AuthController to DatabaseService
|
|
39
|
+
/impact trace UserDTO to API response
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
This finds the shortest path between two symbols in the call/dependency graph.
|
|
43
|
+
|
|
44
|
+
## Output Format
|
|
45
|
+
|
|
46
|
+
Present results as a dependency tree:
|
|
47
|
+
1. **The symbol** at the center.
|
|
48
|
+
2. **Inbound edges** — callers grouped by file.
|
|
49
|
+
3. **Outbound edges** — callees grouped by file.
|
|
50
|
+
4. **Blast radius** — count of transitive dependents to convey change risk.
|
|
51
|
+
|
|
52
|
+
For flow traces, present the path as a chain: `A → B → C → D` with file paths.
|
|
53
|
+
|
|
54
|
+
## Use Cases
|
|
55
|
+
|
|
56
|
+
- **Before refactoring**: Understand what breaks if a function signature changes.
|
|
57
|
+
- **During code review**: Verify a change doesn't have unintended downstream effects.
|
|
58
|
+
- **Understanding architecture**: Map how modules connect without reading every file.
|
|
59
|
+
- **Change risk assessment**: Count dependents to gauge the blast radius of a change.
|