specweave 0.4.1 → 0.6.3
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-plugin/README.md +312 -0
- package/.claude-plugin/marketplace.json +210 -0
- package/CLAUDE.md +952 -609
- package/README.md +179 -761
- package/bin/install-agents.sh +1 -1
- package/bin/install-commands.sh +66 -14
- package/bin/install-hooks.sh +1 -1
- package/bin/install-skills.sh +1 -1
- package/bin/specweave.js +2 -0
- package/dist/adapters/claude/adapter.d.ts +49 -11
- package/dist/adapters/claude/adapter.d.ts.map +1 -1
- package/dist/adapters/claude/adapter.js +175 -42
- package/dist/adapters/claude/adapter.js.map +1 -1
- package/dist/adapters/copilot/adapter.d.ts +20 -2
- package/dist/adapters/copilot/adapter.d.ts.map +1 -1
- package/dist/adapters/copilot/adapter.js +117 -7
- package/dist/adapters/copilot/adapter.js.map +1 -1
- package/dist/adapters/cursor/adapter.d.ts +18 -0
- package/dist/adapters/cursor/adapter.d.ts.map +1 -1
- package/dist/adapters/cursor/adapter.js +55 -3
- package/dist/adapters/cursor/adapter.js.map +1 -1
- package/dist/adapters/generic/adapter.d.ts +18 -0
- package/dist/adapters/generic/adapter.d.ts.map +1 -1
- package/dist/adapters/generic/adapter.js +55 -3
- package/dist/adapters/generic/adapter.js.map +1 -1
- package/dist/cli/commands/init.d.ts +1 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +521 -185
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/install.d.ts +2 -0
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +28 -25
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/list.d.ts +2 -0
- package/dist/cli/commands/list.d.ts.map +1 -1
- package/dist/cli/commands/list.js +26 -24
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/plugin.d.ts +23 -6
- package/dist/cli/commands/plugin.d.ts.map +1 -1
- package/dist/cli/commands/plugin.js +92 -66
- package/dist/cli/commands/plugin.js.map +1 -1
- package/dist/core/i18n/language-detector.d.ts +29 -0
- package/dist/core/i18n/language-detector.d.ts.map +1 -0
- package/dist/core/i18n/language-detector.js +143 -0
- package/dist/core/i18n/language-detector.js.map +1 -0
- package/dist/core/i18n/language-manager.d.ts +101 -0
- package/dist/core/i18n/language-manager.d.ts.map +1 -0
- package/dist/core/i18n/language-manager.js +232 -0
- package/dist/core/i18n/language-manager.js.map +1 -0
- package/dist/core/i18n/language-registry.d.ts +44 -0
- package/dist/core/i18n/language-registry.d.ts.map +1 -0
- package/dist/core/i18n/language-registry.js +234 -0
- package/dist/core/i18n/language-registry.js.map +1 -0
- package/dist/core/i18n/locale-manager.d.ts +62 -0
- package/dist/core/i18n/locale-manager.d.ts.map +1 -0
- package/dist/core/i18n/locale-manager.js +137 -0
- package/dist/core/i18n/locale-manager.js.map +1 -0
- package/dist/core/i18n/system-prompt-injector.d.ts +33 -0
- package/dist/core/i18n/system-prompt-injector.d.ts.map +1 -0
- package/dist/core/i18n/system-prompt-injector.js +131 -0
- package/dist/core/i18n/system-prompt-injector.js.map +1 -0
- package/dist/core/i18n/types.d.ts +151 -0
- package/dist/core/i18n/types.d.ts.map +1 -0
- package/dist/core/i18n/types.js +11 -0
- package/dist/core/i18n/types.js.map +1 -0
- package/dist/core/increment-status.d.ts +72 -0
- package/dist/core/increment-status.d.ts.map +1 -0
- package/dist/core/increment-status.js +227 -0
- package/dist/core/increment-status.js.map +1 -0
- package/dist/core/plugin-loader.d.ts +33 -13
- package/dist/core/plugin-loader.d.ts.map +1 -1
- package/dist/core/plugin-loader.js +145 -43
- package/dist/core/plugin-loader.js.map +1 -1
- package/dist/core/types/config.d.ts +51 -0
- package/dist/core/types/config.d.ts.map +1 -0
- package/dist/core/types/config.js +21 -0
- package/dist/core/types/config.js.map +1 -0
- package/dist/core/types/plugin.d.ts +73 -42
- package/dist/core/types/plugin.d.ts.map +1 -1
- package/dist/core/types/plugin.js +4 -3
- package/dist/core/types/plugin.js.map +1 -1
- package/dist/hooks/lib/sync-living-docs.d.ts +27 -0
- package/dist/hooks/lib/sync-living-docs.d.ts.map +1 -0
- package/dist/hooks/lib/sync-living-docs.js +116 -0
- package/dist/hooks/lib/sync-living-docs.js.map +1 -0
- package/dist/hooks/lib/translate-living-docs.d.ts +13 -0
- package/dist/hooks/lib/translate-living-docs.d.ts.map +1 -0
- package/dist/hooks/lib/translate-living-docs.js +166 -0
- package/dist/hooks/lib/translate-living-docs.js.map +1 -0
- package/dist/hooks/lib/update-tasks-md.d.ts +29 -0
- package/dist/hooks/lib/update-tasks-md.d.ts.map +1 -0
- package/dist/hooks/lib/update-tasks-md.js +203 -0
- package/dist/hooks/lib/update-tasks-md.js.map +1 -0
- package/dist/integrations/jira/jira-incremental-mapper.js.map +1 -1
- package/dist/integrations/jira/jira-mapper.js.map +1 -1
- package/dist/locales/de/.gitkeep +0 -0
- package/dist/locales/de/cli.json +108 -0
- package/dist/locales/en/cli.json +285 -0
- package/dist/locales/en/errors.json +7 -0
- package/dist/locales/en/templates.json +6 -0
- package/dist/locales/es/.gitkeep +0 -0
- package/dist/locales/es/cli.json +41 -0
- package/dist/locales/fr/.gitkeep +0 -0
- package/dist/locales/fr/cli.json +108 -0
- package/dist/locales/ja/.gitkeep +0 -0
- package/dist/locales/ja/cli.json +108 -0
- package/dist/locales/ko/.gitkeep +0 -0
- package/dist/locales/ko/cli.json +108 -0
- package/dist/locales/pt/.gitkeep +0 -0
- package/dist/locales/pt/cli.json +108 -0
- package/dist/locales/ru/.gitkeep +0 -0
- package/dist/locales/ru/cli.json +269 -0
- package/dist/locales/zh/.gitkeep +0 -0
- package/dist/locales/zh/cli.json +108 -0
- package/dist/plugins/specweave-github/lib/github-client.d.ts +86 -0
- package/dist/plugins/specweave-github/lib/github-client.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-client.js +275 -0
- package/dist/plugins/specweave-github/lib/github-client.js.map +1 -0
- package/dist/plugins/specweave-github/lib/index.d.ts +10 -0
- package/dist/plugins/specweave-github/lib/index.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/index.js +10 -0
- package/dist/plugins/specweave-github/lib/index.js.map +1 -0
- package/dist/plugins/specweave-github/lib/subtask-sync.d.ts +51 -0
- package/dist/plugins/specweave-github/lib/subtask-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/subtask-sync.js +147 -0
- package/dist/plugins/specweave-github/lib/subtask-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/task-parser.d.ts +37 -0
- package/dist/plugins/specweave-github/lib/task-parser.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/task-parser.js +211 -0
- package/dist/plugins/specweave-github/lib/task-parser.js.map +1 -0
- package/dist/plugins/specweave-github/lib/task-sync.d.ts +51 -0
- package/dist/plugins/specweave-github/lib/task-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/task-sync.js +332 -0
- package/dist/plugins/specweave-github/lib/task-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/types.d.ts +80 -0
- package/dist/plugins/specweave-github/lib/types.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/types.js +5 -0
- package/dist/plugins/specweave-github/lib/types.js.map +1 -0
- package/dist/utils/agents-md-compiler.d.ts +68 -0
- package/dist/utils/agents-md-compiler.d.ts.map +1 -0
- package/dist/utils/agents-md-compiler.js +420 -0
- package/dist/utils/agents-md-compiler.js.map +1 -0
- package/dist/utils/execFileNoThrow.d.ts +97 -0
- package/dist/utils/execFileNoThrow.d.ts.map +1 -0
- package/dist/utils/execFileNoThrow.js +130 -0
- package/dist/utils/execFileNoThrow.js.map +1 -0
- package/dist/utils/generate-skills-index.js +4 -4
- package/dist/utils/generate-skills-index.js.map +1 -1
- package/package.json +13 -14
- package/plugins/.specweave/logs/hooks-debug.log +24 -0
- package/plugins/.specweave/logs/last-hook-fire +1 -0
- package/plugins/.specweave/logs/last-todowrite-time +1 -0
- package/plugins/.specweave/logs/tasks.log +6 -0
- package/plugins/specweave/.claude-plugin/plugin.json +22 -0
- package/{src → plugins/specweave}/agents/pm/AGENT.md +80 -0
- package/plugins/specweave/agents/translator/AGENT.md +282 -0
- package/{src → plugins/specweave}/commands/README.md +11 -11
- package/{src/commands/specweave.costs.md → plugins/specweave/commands/costs.md} +8 -8
- package/{src/commands/specweave.do.md → plugins/specweave/commands/do.md} +35 -8
- package/{src/commands/specweave.done.md → plugins/specweave/commands/done.md} +1 -1
- package/{src/commands/specweave.inc.md → plugins/specweave/commands/inc.md} +1 -1
- package/{src/commands/specweave.increment.md → plugins/specweave/commands/increment.md} +84 -19
- package/{src/commands/specweave.next.md → plugins/specweave/commands/next.md} +1 -1
- package/{src/commands/specweave.progress.md → plugins/specweave/commands/progress.md} +1 -1
- package/{src → plugins/specweave}/commands/specweave.md +57 -25
- package/{src/commands/specweave.sync-docs.md → plugins/specweave/commands/sync-docs.md} +6 -6
- package/plugins/specweave/commands/translate.md +425 -0
- package/{src/commands/specweave.validate.md → plugins/specweave/commands/validate.md} +2 -2
- package/plugins/specweave/hooks/hooks.json +15 -0
- package/plugins/specweave/hooks/post-task-completion.sh +265 -0
- package/plugins/specweave/skills/SKILLS-INDEX.md +229 -0
- package/{src → plugins/specweave}/skills/brownfield-analyzer/SKILL.md +66 -24
- package/{src → plugins/specweave}/skills/context-loader/SKILL.md +1 -1
- package/plugins/specweave/skills/context-optimizer/SKILL.md +588 -0
- package/plugins/specweave/skills/docs-updater/SKILL.md +0 -0
- package/{src → plugins/specweave}/skills/increment-planner/SKILL.md +81 -4
- package/plugins/specweave/skills/plugin-detector/SKILL.md +211 -0
- package/{src → plugins/specweave}/skills/project-kickstarter/SKILL.md +7 -7
- package/plugins/specweave/skills/rfc-generator/SKILL.md +369 -0
- package/{src → plugins/specweave}/skills/specweave-detector/SKILL.md +2 -2
- package/plugins/specweave/skills/specweave-framework/SKILL.md +498 -0
- package/plugins/specweave/skills/specweave-framework/test-cases/test-1-increment-naming.yaml +11 -0
- package/plugins/specweave/skills/specweave-framework/test-cases/test-2-source-of-truth.yaml +11 -0
- package/plugins/specweave/skills/specweave-framework/test-cases/test-3-increment-discipline.yaml +12 -0
- package/plugins/specweave/skills/specweave-framework/test-cases/test-4-file-placement.yaml +11 -0
- package/{src → plugins/specweave}/skills/tdd-workflow/SKILL.md +21 -21
- package/plugins/specweave/skills/translator/SKILL.md +172 -0
- package/plugins/specweave-ado/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-alternatives/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-alternatives/skills/bmad-method-expert/SKILL.md +626 -0
- package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/analyze-project.js +318 -0
- package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/check-setup.js +208 -0
- package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/generate-template.js +1149 -0
- package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/validate-documents.js +340 -0
- package/plugins/specweave-alternatives/skills/spec-kit-expert/SKILL.md +1010 -0
- package/plugins/specweave-backend/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-diagrams/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-docs/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-docs/skills/docusaurus/SKILL.md +526 -0
- package/plugins/specweave-figma/.claude-plugin/.mcp.json +12 -0
- package/plugins/specweave-figma/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-figma/ARCHITECTURE.md +453 -0
- package/plugins/specweave-figma/README.md +728 -0
- package/plugins/specweave-figma/skills/figma-to-code/SKILL.md +632 -0
- package/plugins/specweave-figma/skills/figma-to-code/test-1-token-generation.yaml +29 -0
- package/plugins/specweave-figma/skills/figma-to-code/test-2-component-generation.yaml +27 -0
- package/plugins/specweave-figma/skills/figma-to-code/test-3-typescript-generation.yaml +28 -0
- package/plugins/specweave-frontend/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-github/.claude-plugin/plugin.json +19 -0
- package/plugins/specweave-github/agents/github-manager/AGENT.md +651 -0
- package/plugins/specweave-github/commands/github-close-issue.md +418 -0
- package/plugins/specweave-github/commands/github-create-issue.md +307 -0
- package/plugins/specweave-github/commands/github-status.md +533 -0
- package/plugins/specweave-github/commands/github-sync-tasks.md +530 -0
- package/plugins/specweave-github/commands/github-sync.md +443 -0
- package/plugins/specweave-github/lib/github-client.ts +330 -0
- package/plugins/specweave-github/lib/index.ts +10 -0
- package/plugins/specweave-github/lib/subtask-sync.ts +225 -0
- package/plugins/specweave-github/lib/task-parser.ts +246 -0
- package/plugins/specweave-github/lib/task-sync.ts +402 -0
- package/plugins/specweave-github/lib/types.ts +86 -0
- package/plugins/specweave-github/skills/github-issue-tracker/SKILL.md +497 -0
- package/plugins/specweave-github/skills/github-sync/SKILL.md +461 -0
- package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-jira/.claude-plugin/plugin.json +8 -0
- package/{src → plugins/specweave-jira}/commands/specweave.sync-jira.md +18 -18
- package/plugins/specweave-kubernetes/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-ml/.claude-plugin/plugin.json +38 -0
- package/plugins/specweave-ml/README.md +885 -0
- package/plugins/specweave-ml/agents/ml-engineer/AGENT.md +402 -0
- package/plugins/specweave-ml/commands/ml-deploy.md +116 -0
- package/plugins/specweave-ml/commands/ml-evaluate.md +87 -0
- package/plugins/specweave-ml/commands/ml-explain.md +83 -0
- package/plugins/specweave-ml/skills/anomaly-detector/SKILL.md +559 -0
- package/plugins/specweave-ml/skills/automl-optimizer/SKILL.md +485 -0
- package/plugins/specweave-ml/skills/cv-pipeline-builder/SKILL.md +157 -0
- package/plugins/specweave-ml/skills/data-visualizer/SKILL.md +521 -0
- package/plugins/specweave-ml/skills/experiment-tracker/SKILL.md +535 -0
- package/plugins/specweave-ml/skills/feature-engineer/SKILL.md +566 -0
- package/plugins/specweave-ml/skills/ml-deployment-helper/SKILL.md +345 -0
- package/plugins/specweave-ml/skills/ml-pipeline-orchestrator/SKILL.md +518 -0
- package/plugins/specweave-ml/skills/model-evaluator/SKILL.md +155 -0
- package/plugins/specweave-ml/skills/model-explainer/SKILL.md +227 -0
- package/plugins/specweave-ml/skills/model-registry/SKILL.md +541 -0
- package/plugins/specweave-ml/skills/nlp-pipeline-builder/SKILL.md +180 -0
- package/plugins/specweave-ml/skills/time-series-forecaster/SKILL.md +569 -0
- package/plugins/specweave-payments/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-testing/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-tooling/.claude-plugin/plugin.json +8 -0
- package/plugins/specweave-ui/.claude-plugin/plugin.json +26 -0
- package/plugins/specweave-ui/.mcp.json +14 -0
- package/plugins/specweave-ui/README.md +386 -0
- package/src/adapters/claude/adapter.ts +193 -46
- package/src/adapters/copilot/adapter.ts +132 -7
- package/src/adapters/cursor/adapter.ts +62 -3
- package/src/adapters/generic/adapter.ts +62 -3
- package/src/templates/AGENTS.md.template +170 -1
- package/src/templates/CLAUDE.md.template +122 -24
- package/src/templates/tasks.md.template +261 -0
- package/src/agents/ml-engineer/AGENT.md +0 -150
- package/src/commands/specweave.sync-github.md +0 -269
- package/src/hooks/post-task-completion.sh +0 -121
- package/src/skills/SKILLS-INDEX.md +0 -444
- package/src/skills/github-sync/SKILL.md +0 -234
- /package/{src → plugins/specweave}/agents/architect/AGENT.md +0 -0
- /package/{src → plugins/specweave}/agents/code-reviewer.md +0 -0
- /package/{src → plugins/specweave}/agents/docs-writer/AGENT.md +0 -0
- /package/{src → plugins/specweave}/agents/performance/AGENT.md +0 -0
- /package/{src → plugins/specweave}/agents/qa-lead/AGENT.md +0 -0
- /package/{src → plugins/specweave}/agents/security/AGENT.md +0 -0
- /package/{src → plugins/specweave}/agents/tdd-orchestrator/AGENT.md +0 -0
- /package/{src → plugins/specweave}/agents/tech-lead/AGENT.md +0 -0
- /package/{src/commands/specweave.list-increments.md → plugins/specweave/commands/list-increments.md} +0 -0
- /package/{src/commands/specweave.tdd-cycle.md → plugins/specweave/commands/tdd-cycle.md} +0 -0
- /package/{src/commands/specweave.tdd-green.md → plugins/specweave/commands/tdd-green.md} +0 -0
- /package/{src/commands/specweave.tdd-red.md → plugins/specweave/commands/tdd-red.md} +0 -0
- /package/{src/commands/specweave.tdd-refactor.md → plugins/specweave/commands/tdd-refactor.md} +0 -0
- /package/{src → plugins/specweave}/hooks/README.md +0 -0
- /package/{src → plugins/specweave}/hooks/docs-changed.sh +0 -0
- /package/{src → plugins/specweave}/hooks/human-input-required.sh +0 -0
- /package/{src → plugins/specweave}/hooks/post-increment-plugin-detect.sh +0 -0
- /package/{src → plugins/specweave}/hooks/pre-implementation.sh +0 -0
- /package/{src → plugins/specweave}/hooks/pre-task-plugin-detect.sh +0 -0
- /package/{src → plugins/specweave}/skills/brownfield-onboarder/SKILL.md +0 -0
- /package/{src → plugins/specweave}/skills/docs-updater/README.md +0 -0
- /package/{src → plugins/specweave}/skills/increment-planner/scripts/feature-utils.js +0 -0
- /package/{src → plugins/specweave}/skills/increment-quality-judge/SKILL.md +0 -0
- /package/{src → plugins/specweave}/skills/project-kickstarter/test-cases/test-1-high-confidence-full-product.yaml +0 -0
- /package/{src → plugins/specweave}/skills/project-kickstarter/test-cases/test-2-medium-confidence-partial.yaml +0 -0
- /package/{src → plugins/specweave}/skills/project-kickstarter/test-cases/test-3-low-confidence-technical-question.yaml +0 -0
- /package/{src → plugins/specweave}/skills/project-kickstarter/test-cases/test-4-opt-out-explicit.yaml +0 -0
- /package/{src → plugins/specweave}/skills/role-orchestrator/README.md +0 -0
- /package/{src → plugins/specweave}/skills/role-orchestrator/SKILL.md +0 -0
- /package/{src → plugins/specweave}/skills/task-builder/README.md +0 -0
- /package/{src → plugins/specweave-ado}/skills/ado-sync/README.md +0 -0
- /package/{src → plugins/specweave-ado}/skills/ado-sync/SKILL.md +0 -0
- /package/{src → plugins/specweave-ado}/skills/specweave-ado-mapper/SKILL.md +0 -0
- /package/{src → plugins/specweave-backend}/agents/database-optimizer/AGENT.md +0 -0
- /package/{src → plugins/specweave-backend}/skills/dotnet-backend/SKILL.md +0 -0
- /package/{src → plugins/specweave-backend}/skills/nodejs-backend/SKILL.md +0 -0
- /package/{src → plugins/specweave-backend}/skills/python-backend/SKILL.md +0 -0
- /package/{src → plugins/specweave-cost-optimizer}/skills/cost-optimizer/SKILL.md +0 -0
- /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/AGENT.md +0 -0
- /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/c4-component-template.mmd +0 -0
- /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/c4-container-template.mmd +0 -0
- /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/c4-context-template.mmd +0 -0
- /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/deployment-template.mmd +0 -0
- /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/er-diagram-template.mmd +0 -0
- /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/sequence-template.mmd +0 -0
- /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/test-cases/test-1-c4-context.yaml +0 -0
- /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/test-cases/test-2-sequence.yaml +0 -0
- /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/test-cases/test-3-er-diagram.yaml +0 -0
- /package/{src → plugins/specweave-diagrams}/skills/diagrams-architect/SKILL.md +0 -0
- /package/{src → plugins/specweave-diagrams}/skills/diagrams-generator/SKILL.md +0 -0
- /package/{src → plugins/specweave-docs}/skills/spec-driven-brainstorming/README.md +0 -0
- /package/{src → plugins/specweave-docs}/skills/spec-driven-brainstorming/SKILL.md +0 -0
- /package/{src → plugins/specweave-docs}/skills/spec-driven-debugging/README.md +0 -0
- /package/{src → plugins/specweave-docs}/skills/spec-driven-debugging/SKILL.md +0 -0
- /package/{src → plugins/specweave-frontend}/skills/design-system-architect/SKILL.md +0 -0
- /package/{src → plugins/specweave-frontend}/skills/frontend/SKILL.md +0 -0
- /package/{src → plugins/specweave-frontend}/skills/nextjs/SKILL.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/devops/AGENT.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/network-engineer/AGENT.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/observability-engineer/AGENT.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/performance-engineer/AGENT.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/AGENT.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/backend-diagnostics.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/database-diagnostics.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/infrastructure.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/monitoring.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/security-incidents.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/ui-diagnostics.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/01-high-cpu-usage.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/02-database-deadlock.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/03-memory-leak.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/04-slow-api-response.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/05-ddos-attack.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/06-disk-full.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/07-service-down.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/08-data-corruption.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/09-cascade-failure.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/10-rate-limit-exceeded.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/scripts/health-check.sh +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/scripts/log-analyzer.py +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/scripts/metrics-collector.sh +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/scripts/trace-analyzer.js +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/templates/incident-report.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/templates/mitigation-plan.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/templates/post-mortem.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/agents/sre/templates/runbook-template.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/commands/specweave.monitor-setup.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/commands/specweave.slo-implement.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/skills/distributed-tracing/SKILL.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/skills/grafana-dashboards/SKILL.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/skills/hetzner-provisioner/README.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/skills/hetzner-provisioner/SKILL.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/skills/prometheus-configuration/SKILL.md +0 -0
- /package/{src → plugins/specweave-infrastructure}/skills/slo-implementation/SKILL.md +0 -0
- /package/{src → plugins/specweave-jira}/skills/jira-sync/README.md +0 -0
- /package/{src → plugins/specweave-jira}/skills/jira-sync/SKILL.md +0 -0
- /package/{src → plugins/specweave-jira}/skills/specweave-jira-mapper/SKILL.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/agents/kubernetes-architect/AGENT.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/gitops-workflow/SKILL.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/gitops-workflow/references/argocd-setup.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/gitops-workflow/references/sync-policies.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/SKILL.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/assets/Chart.yaml.template +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/assets/values.yaml.template +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/references/chart-structure.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/scripts/validate-chart.sh +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/SKILL.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/assets/configmap-template.yaml +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/assets/deployment-template.yaml +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/assets/service-template.yaml +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/references/deployment-spec.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/references/service-spec.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/k8s-security-policies/SKILL.md +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/k8s-security-policies/assets/network-policy-template.yaml +0 -0
- /package/{src → plugins/specweave-kubernetes}/skills/k8s-security-policies/references/rbac-patterns.md +0 -0
- /package/{src → plugins/specweave-ml}/agents/data-scientist/AGENT.md +0 -0
- /package/{src → plugins/specweave-ml}/agents/mlops-engineer/AGENT.md +0 -0
- /package/{src → plugins/specweave-ml}/commands/specweave.ml-pipeline.md +0 -0
- /package/{src → plugins/specweave-ml}/skills/ml-pipeline-workflow/SKILL.md +0 -0
- /package/{src → plugins/specweave-payments}/agents/payment-integration/AGENT.md +0 -0
- /package/{src → plugins/specweave-payments}/skills/billing-automation/SKILL.md +0 -0
- /package/{src → plugins/specweave-payments}/skills/paypal-integration/SKILL.md +0 -0
- /package/{src → plugins/specweave-payments}/skills/pci-compliance/SKILL.md +0 -0
- /package/{src → plugins/specweave-payments}/skills/stripe-integration/SKILL.md +0 -0
- /package/{src → plugins/specweave-testing}/skills/e2e-playwright/README.md +0 -0
- /package/{src → plugins/specweave-testing}/skills/e2e-playwright/SKILL.md +0 -0
- /package/{src → plugins/specweave-testing}/skills/e2e-playwright/execute.js +0 -0
- /package/{src → plugins/specweave-testing}/skills/e2e-playwright/lib/utils.js +0 -0
- /package/{src → plugins/specweave-testing}/skills/e2e-playwright/package.json +0 -0
- /package/{src → plugins/specweave-tooling}/skills/skill-creator/LICENSE.txt +0 -0
- /package/{src → plugins/specweave-tooling}/skills/skill-creator/SKILL.md +0 -0
- /package/{src → plugins/specweave-tooling}/skills/skill-creator/scripts/init_skill.py +0 -0
- /package/{src → plugins/specweave-tooling}/skills/skill-creator/scripts/package_skill.py +0 -0
- /package/{src → plugins/specweave-tooling}/skills/skill-creator/scripts/quick_validate.py +0 -0
- /package/{src → plugins/specweave-tooling}/skills/skill-router/SKILL.md +0 -0
package/CLAUDE.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# SpecWeave - Development Guide
|
|
2
2
|
|
|
3
3
|
**Project**: SpecWeave - Spec-Driven Development Framework
|
|
4
|
-
**Version**: 0.4.0 (Plugin Architecture Complete!)
|
|
5
4
|
**Type**: Open Source NPM Package (TypeScript CLI)
|
|
6
5
|
**Repository**: https://github.com/anton-abyzov/specweave
|
|
7
6
|
**Website**: https://spec-weave.com
|
|
@@ -11,26 +10,72 @@ Users receive a different CLAUDE.md via the template system.
|
|
|
11
10
|
|
|
12
11
|
---
|
|
13
12
|
|
|
14
|
-
##
|
|
13
|
+
## 🚨 CRITICAL: NEVER POLLUTE PROJECT ROOT!
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
**Active Branch**: `develop` → merges to `features/001-core-feature`
|
|
18
|
-
**Latest**: v0.4.0 - Plugin Architecture with GitHub plugin (priority #1)
|
|
19
|
-
**Next**: v0.5.0 - Additional plugins (Jira, Kubernetes, Frontend/Backend stacks)
|
|
15
|
+
**⛔ THIS IS THE #1 RULE - VIOLATING THIS WILL GET YOUR PR REJECTED ⛔**
|
|
20
16
|
|
|
21
|
-
**
|
|
22
|
-
```bash
|
|
23
|
-
# 1. Make changes to source files in src/
|
|
24
|
-
# 2. Test locally
|
|
25
|
-
npm run build && npm test
|
|
17
|
+
**ALL AI-generated files MUST go into the CURRENT INCREMENT folder**, NOT in the project root!
|
|
26
18
|
|
|
27
|
-
|
|
28
|
-
/specweave.do # Execute next task
|
|
29
|
-
/specweave.progress # Check status
|
|
19
|
+
### ❌ NEVER Create in Root (Pollutes Repository)
|
|
30
20
|
|
|
31
|
-
# 4. Commit with hooks (auto-validates)
|
|
32
|
-
git add . && git commit -m "feat: description"
|
|
33
21
|
```
|
|
22
|
+
❌ WRONG - ROOT FILES (REJECTED!):
|
|
23
|
+
/PLUGIN-MIGRATION-COMPLETE.md # NO! Goes to increment reports/
|
|
24
|
+
/SESSION-SUMMARY-2025-10-28.md # NO! Goes to increment reports/
|
|
25
|
+
/ADR-006-DEEP-ANALYSIS.md # NO! Goes to .specweave/docs/internal/architecture/adr/
|
|
26
|
+
/ANALYSIS-MULTI-TOOL-COMPARISON.md # NO! Goes to increment reports/
|
|
27
|
+
/migration-helper.sh # NO! Goes to increment scripts/
|
|
28
|
+
/execution.log # NO! Goes to increment logs/
|
|
29
|
+
/specweave-0.5.1.tgz # NO! Build artifact, should be in .gitignore
|
|
30
|
+
/yolov8n.pt # NO! ML model, should be in .gitignore
|
|
31
|
+
|
|
32
|
+
✅ CORRECT - INCREMENT FOLDERS:
|
|
33
|
+
.specweave/increments/0004-plugin-architecture/
|
|
34
|
+
├── spec.md # Spec files (core 4)
|
|
35
|
+
├── plan.md
|
|
36
|
+
├── tasks.md
|
|
37
|
+
├── tests.md
|
|
38
|
+
├── reports/ # ✅ PUT REPORTS HERE!
|
|
39
|
+
│ ├── PLUGIN-MIGRATION-COMPLETE.md # ✅ Completion reports
|
|
40
|
+
│ ├── SESSION-SUMMARY.md # ✅ Session summaries
|
|
41
|
+
│ └── ANALYSIS-*.md # ✅ Analysis files
|
|
42
|
+
├── scripts/ # ✅ PUT SCRIPTS HERE!
|
|
43
|
+
│ └── migration-helper.sh # ✅ Helper scripts
|
|
44
|
+
└── logs/ # ✅ PUT LOGS HERE!
|
|
45
|
+
└── execution.log # ✅ Execution logs
|
|
46
|
+
|
|
47
|
+
.specweave/docs/internal/architecture/ # ✅ PUT ADRS/DIAGRAMS HERE!
|
|
48
|
+
└── adr/
|
|
49
|
+
└── 0006-deep-analysis.md # ✅ Architecture decisions
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Why This Matters
|
|
53
|
+
|
|
54
|
+
- ✅ **Complete traceability** - Know which increment created which files
|
|
55
|
+
- ✅ **Easy cleanup** - Delete increment folder = delete all files
|
|
56
|
+
- ✅ **Clear context** - All files for a feature in one place
|
|
57
|
+
- ✅ **No root clutter** - Project root stays clean and professional
|
|
58
|
+
- ✅ **Better git history** - Changes grouped by increment
|
|
59
|
+
|
|
60
|
+
### What IS Allowed in Root?
|
|
61
|
+
|
|
62
|
+
**ONLY these files belong in root**:
|
|
63
|
+
- ✅ `CLAUDE.md` (this file - contributor guide)
|
|
64
|
+
- ✅ `README.md`, `CHANGELOG.md`, `LICENSE` (project documentation)
|
|
65
|
+
- ✅ `package.json`, `tsconfig.json`, `.gitignore` (config files)
|
|
66
|
+
- ✅ Directories: `src/`, `tests/`, `plugins/`, `.specweave/`, etc. (source code)
|
|
67
|
+
|
|
68
|
+
**Everything else goes in increment folders or `.gitignore`!**
|
|
69
|
+
|
|
70
|
+
### Build Artifacts (Add to .gitignore)
|
|
71
|
+
|
|
72
|
+
These should NEVER be committed:
|
|
73
|
+
- ❌ `*.tgz`, `*.tar.gz` - NPM package archives
|
|
74
|
+
- ❌ `*.pt`, `*.pth` - ML model files (download on demand)
|
|
75
|
+
- ❌ `dist/`, `build/` - Compiled outputs (already in .gitignore)
|
|
76
|
+
- ❌ `*.log` - Log files (already in .gitignore)
|
|
77
|
+
|
|
78
|
+
**Before committing, ALWAYS check**: `git status` - If you see `.md` files in root, MOVE THEM!
|
|
34
79
|
|
|
35
80
|
---
|
|
36
81
|
|
|
@@ -49,83 +94,24 @@ Claude Code isn't just another AI coding assistant - **Anthropic defines the ind
|
|
|
49
94
|
|
|
50
95
|
### Why SpecWeave + Claude Code = 10x Better
|
|
51
96
|
|
|
52
|
-
| Feature |
|
|
53
|
-
|
|
54
|
-
| **Living Docs
|
|
55
|
-
| **
|
|
56
|
-
| **
|
|
57
|
-
| **
|
|
58
|
-
| **
|
|
59
|
-
| **
|
|
60
|
-
| **
|
|
61
|
-
| **Spec-Driven Workflow** | ✅ Core framework feature | ❌ Not supported |
|
|
62
|
-
|
|
63
|
-
### The Living Docs Advantage: SpecWeave vs. Kiro
|
|
64
|
-
|
|
65
|
-
**Kiro's Pitch**: "Automated living documentation"
|
|
66
|
-
**Reality**: Kiro requires **manual sync** - you must remember to update docs.
|
|
67
|
-
|
|
68
|
-
**SpecWeave + Claude Code**:
|
|
69
|
-
- **100% automated** via native hooks
|
|
70
|
-
- After EVERY task, hooks fire automatically
|
|
71
|
-
- Docs update without user intervention
|
|
72
|
-
- No manual sync needed, EVER
|
|
73
|
-
|
|
74
|
-
**Why?** Claude Code's native hooks system. Kiro doesn't have this - they rely on manual triggers.
|
|
75
|
-
|
|
76
|
-
### Cursor 2.0: Good, But Not Native
|
|
77
|
-
|
|
78
|
-
Cursor 2.0 (released Oct 29, 2025) has impressive features:
|
|
79
|
-
- ✅ 8 parallel agents
|
|
80
|
-
- ✅ Team-defined custom commands
|
|
81
|
-
- ✅ In-app browser
|
|
82
|
-
- ✅ @ context shortcuts
|
|
83
|
-
|
|
84
|
-
**But Cursor still lacks**:
|
|
85
|
-
- ❌ Native hooks (no automated doc updates)
|
|
86
|
-
- ❌ Skill auto-activation (must explicitly request)
|
|
87
|
-
- ❌ Agent isolation (all 8 agents share context)
|
|
88
|
-
- ❌ MCP protocol (proprietary context management)
|
|
89
|
-
|
|
90
|
-
**SpecWeave on Cursor** = ~85% of Claude Code experience (still very good!)
|
|
97
|
+
| Feature | Claude Code (Native) | Cursor 2.0 | Copilot | Generic |
|
|
98
|
+
|---------|---------------------|------------|---------|---------|
|
|
99
|
+
| **Living Docs** | ✅ Auto-sync via hooks | ❌ Manual | ❌ Manual | ❌ Manual |
|
|
100
|
+
| **Skills** | ✅ Auto-activate | 🟡 Must @mention | ❌ None | ❌ None |
|
|
101
|
+
| **Commands** | ✅ Plugin-based `/specweave:*` | 🟡 Team commands | ❌ None | ❌ None |
|
|
102
|
+
| **Hooks** | ✅ Pre/Post lifecycle | ❌ No hooks | ❌ No hooks | ❌ No hooks |
|
|
103
|
+
| **Agents** | ✅ Isolated contexts | 🟡 Shared (8 parallel) | ❌ None | ❌ None |
|
|
104
|
+
| **Context** | ✅ MCP + 60-80% reduction | 🟡 @ shortcuts | ❌ Limited | ❌ None |
|
|
105
|
+
| **Quality** | ⭐⭐⭐⭐⭐ 100% | ⭐⭐⭐⭐ 85% | ⭐⭐⭐ 60% | ⭐⭐ 40% |
|
|
91
106
|
|
|
92
|
-
|
|
107
|
+
**Quick Comparison**:
|
|
93
108
|
|
|
94
|
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
109
|
+
**Claude Code** - Full automation with native hooks, MCP protocol, plugin system, isolated agent contexts
|
|
110
|
+
**Cursor 2.0** - Good multi-tool support (AGENTS.md compilation, team commands, @ shortcuts) but no hooks or agent isolation
|
|
111
|
+
**Copilot** - Basic instructions.md support, no automation features
|
|
112
|
+
**Generic** - Manual copy-paste workflow
|
|
97
113
|
|
|
98
|
-
**
|
|
99
|
-
- ❌ Native hooks
|
|
100
|
-
- ❌ Skills/agents
|
|
101
|
-
- ❌ Slash commands
|
|
102
|
-
- ❌ Living docs
|
|
103
|
-
|
|
104
|
-
**SpecWeave on Copilot** = ~60% of Claude Code experience (basic automation only)
|
|
105
|
-
|
|
106
|
-
### Generic Tools (ChatGPT, Gemini): Manual Workflow
|
|
107
|
-
|
|
108
|
-
Generic AI tools:
|
|
109
|
-
- ✅ Conversational AI
|
|
110
|
-
- ✅ Code generation
|
|
111
|
-
|
|
112
|
-
**But they lack**:
|
|
113
|
-
- ❌ ALL automation features
|
|
114
|
-
- ❌ Project integration
|
|
115
|
-
- ❌ Persistent state
|
|
116
|
-
|
|
117
|
-
**SpecWeave on Generic** = ~40% of Claude Code experience (copy-paste manual)
|
|
118
|
-
|
|
119
|
-
### The Bottom Line
|
|
120
|
-
|
|
121
|
-
**SpecWeave works with any tool**, but for the **BEST experience**:
|
|
122
|
-
|
|
123
|
-
1. **Claude Code** (⭐⭐⭐⭐⭐ 100%) - Full automation, native hooks, MCP, isolated agents
|
|
124
|
-
2. **Cursor 2.0** (⭐⭐⭐⭐ 85%) - Semi-automation, AGENTS.md, team commands
|
|
125
|
-
3. **Copilot** (⭐⭐⭐ 60%) - Basic automation, instructions.md
|
|
126
|
-
4. **Generic** (⭐⭐ 40%) - Manual workflow, copy-paste
|
|
127
|
-
|
|
128
|
-
**Recommendation**: Use Claude Code for SpecWeave. Other tools work, but you'll miss the magic.
|
|
114
|
+
**The Key Differentiator**: Only Claude Code supports **automated living docs** via native hooks. After EVERY task completion, docs sync automatically - zero manual intervention. This is why SpecWeave is designed Claude Code-first, though it gracefully degrades to other tools.
|
|
129
115
|
|
|
130
116
|
---
|
|
131
117
|
|
|
@@ -152,15 +138,15 @@ Generic AI tools:
|
|
|
152
138
|
**When Creating Increments**:
|
|
153
139
|
```bash
|
|
154
140
|
# ❌ Wrong
|
|
155
|
-
/specweave
|
|
141
|
+
/specweave:inc "0004"
|
|
156
142
|
|
|
157
143
|
# ✅ Correct
|
|
158
|
-
/specweave
|
|
159
|
-
/specweave
|
|
144
|
+
/specweave:inc "0004-cost-optimization"
|
|
145
|
+
/specweave:inc "0005-github-sync-enhancements"
|
|
160
146
|
```
|
|
161
147
|
|
|
162
148
|
**Enforcement**:
|
|
163
|
-
- `/specweave
|
|
149
|
+
- `/specweave:inc` command validates naming (rejects bare numbers)
|
|
164
150
|
- Code review requirement (descriptive names mandatory)
|
|
165
151
|
- This document serves as the source of truth
|
|
166
152
|
|
|
@@ -172,23 +158,461 @@ Generic AI tools:
|
|
|
172
158
|
|
|
173
159
|
---
|
|
174
160
|
|
|
161
|
+
## Increment Discipline (v0.6.0+ MANDATORY)
|
|
162
|
+
|
|
163
|
+
**⛔ THE IRON RULE: You CANNOT start increment N+1 until increment N is DONE**
|
|
164
|
+
|
|
165
|
+
This is **NOT negotiable**. It is a **hard enforcement** to prevent chaos, scope creep, and stale documentation.
|
|
166
|
+
|
|
167
|
+
### Why This Rule Exists
|
|
168
|
+
|
|
169
|
+
**The Problem (before v0.6.0)**:
|
|
170
|
+
- Multiple incomplete increments piling up (0002, 0003, 0006 all in progress)
|
|
171
|
+
- No clear source of truth ("which increment are we working on?")
|
|
172
|
+
- Living docs become stale (sync doesn't know what's current)
|
|
173
|
+
- Scope creep (jumping between features without finishing)
|
|
174
|
+
- Quality degradation (tests not run, docs not updated)
|
|
175
|
+
|
|
176
|
+
**The Solution (v0.6.0+)**:
|
|
177
|
+
- ✅ **Hard block** on `/specweave:inc` if previous increments incomplete
|
|
178
|
+
- ✅ **Helper commands** to close increments properly
|
|
179
|
+
- ✅ **Clear guidance** on how to resolve incomplete work
|
|
180
|
+
- ✅ **Force discipline** = force quality
|
|
181
|
+
|
|
182
|
+
### What "DONE" Means
|
|
183
|
+
|
|
184
|
+
An increment is DONE if **ONE** of the following is true:
|
|
185
|
+
|
|
186
|
+
1. **All tasks completed**: All tasks in `tasks.md` marked `[x] Completed`
|
|
187
|
+
2. **Completion report exists**: `COMPLETION-SUMMARY.md` with "✅ COMPLETE" status
|
|
188
|
+
3. **Explicit closure**: Closed via `/specweave:close` with documentation
|
|
189
|
+
|
|
190
|
+
### The Enforcement
|
|
191
|
+
|
|
192
|
+
**When you try to start a new increment**:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
/specweave:inc "new feature"
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**If previous increments are incomplete, you'll see**:
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
❌ Cannot create new increment!
|
|
202
|
+
|
|
203
|
+
Previous increments are incomplete:
|
|
204
|
+
|
|
205
|
+
📋 Increment 0002-core-enhancements
|
|
206
|
+
Status: 73% complete (11/15 tasks)
|
|
207
|
+
Pending:
|
|
208
|
+
- T-008: Migrate DIAGRAM-CONVENTIONS.md content
|
|
209
|
+
- T-010: Create context-manifest.yaml
|
|
210
|
+
- T-012: Test agent invocation manually
|
|
211
|
+
- T-013: Run skill test suite
|
|
212
|
+
- T-015: Create PR when increment complete
|
|
213
|
+
|
|
214
|
+
📋 Increment 0003-intelligent-model-selection
|
|
215
|
+
Status: 50% complete (11/22 tasks)
|
|
216
|
+
Pending: 11 tasks
|
|
217
|
+
|
|
218
|
+
💡 What would you like to do?
|
|
219
|
+
|
|
220
|
+
1️⃣ Close incomplete increments:
|
|
221
|
+
/specweave:close
|
|
222
|
+
|
|
223
|
+
2️⃣ Check status:
|
|
224
|
+
/specweave:status
|
|
225
|
+
|
|
226
|
+
3️⃣ Force create (DANGEROUS - violates discipline!):
|
|
227
|
+
Add --force flag to bypass this check
|
|
228
|
+
|
|
229
|
+
⚠️ The discipline exists for a reason:
|
|
230
|
+
- Prevents scope creep
|
|
231
|
+
- Ensures completions are tracked
|
|
232
|
+
- Maintains living docs accuracy
|
|
233
|
+
- Keeps work focused
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### How to Resolve Incomplete Increments
|
|
237
|
+
|
|
238
|
+
#### Option 1: Complete the Work (Recommended)
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
# Continue working on incomplete increment
|
|
242
|
+
/specweave:do
|
|
243
|
+
|
|
244
|
+
# Once all tasks done, it's automatically complete
|
|
245
|
+
/specweave:inc "new feature" # ✅ Now works!
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
#### Option 2: Close Interactively
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
# Interactive closure with options
|
|
252
|
+
/specweave:close
|
|
253
|
+
|
|
254
|
+
# You'll be asked to choose:
|
|
255
|
+
# - Force complete (mark all tasks done)
|
|
256
|
+
# - Move tasks to next increment (defer work)
|
|
257
|
+
# - Reduce scope (mark tasks as won't-do)
|
|
258
|
+
# - Create completion report (manual close)
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
#### Option 3: Check Status First
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
# See all incomplete increments
|
|
265
|
+
/specweave:status
|
|
266
|
+
|
|
267
|
+
# Output shows:
|
|
268
|
+
# ✅ 0001-core-framework
|
|
269
|
+
# ✅ 0004-plugin-architecture
|
|
270
|
+
# ⏳ 0002-core-enhancements (73% complete)
|
|
271
|
+
# ⏳ 0003-intelligent-model-selection (50% complete)
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
#### Option 4: Force Create (Emergency Only!)
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
# Bypass the check (USE SPARINGLY!)
|
|
278
|
+
/specweave:inc "urgent-hotfix" --force
|
|
279
|
+
|
|
280
|
+
# This is logged and should be explained in the next standup/PR
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### The Three Options for Closing
|
|
284
|
+
|
|
285
|
+
When using `/specweave:close`, you get **THREE options**:
|
|
286
|
+
|
|
287
|
+
#### 1. **Adjust Scope** (Simplest - Recommended)
|
|
288
|
+
|
|
289
|
+
Remove parts from `spec.md`, regenerate `plan.md` and `tasks.md` to match reduced scope:
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
# 1. Edit spec.md - remove features you're not doing
|
|
293
|
+
# 2. Delete plan.md and tasks.md
|
|
294
|
+
# 3. Regenerate from spec
|
|
295
|
+
/specweave:inc "same increment" --regenerate
|
|
296
|
+
|
|
297
|
+
# Now tasks match reduced scope → 100% complete!
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
#### 2. **Move Scope to Next Increment**
|
|
301
|
+
|
|
302
|
+
Transfer incomplete tasks to the new increment:
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
# Via /specweave:close
|
|
306
|
+
# Select "Move tasks to next increment"
|
|
307
|
+
# Tasks are migrated with documentation
|
|
308
|
+
# Old increment closed, new increment gets the work
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
#### 3. **Extend Existing Increment** (Merge Work)
|
|
312
|
+
|
|
313
|
+
Simplest option: **Don't start a new increment**. Just extend the current one:
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
# Instead of creating 0003, extend 0002:
|
|
317
|
+
# 1. Update spec.md to include new features
|
|
318
|
+
# 2. Update plan.md with new implementation details
|
|
319
|
+
# 3. Add new tasks to tasks.md
|
|
320
|
+
# 4. Minimize tests if needed (focus on critical paths)
|
|
321
|
+
|
|
322
|
+
# Work on combined scope in ONE increment
|
|
323
|
+
/specweave:do
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### Helper Commands
|
|
327
|
+
|
|
328
|
+
| Command | Purpose |
|
|
329
|
+
|---------|---------|
|
|
330
|
+
| `/specweave:status` | Show all increments and their completion status |
|
|
331
|
+
| `/specweave:close` | Interactive closure of incomplete increments |
|
|
332
|
+
| `/specweave:force-close <id>` | Mark all tasks complete (dangerous!) |
|
|
333
|
+
|
|
334
|
+
### Enforcement Points
|
|
335
|
+
|
|
336
|
+
1. **`/specweave:inc` command** - Hard block (Step 0A)
|
|
337
|
+
2. **PM agent** - Pre-flight validation before planning
|
|
338
|
+
3. **CI/CD** (future) - Prevent PR merges with incomplete increments
|
|
339
|
+
|
|
340
|
+
### Philosophy: Discipline = Quality
|
|
341
|
+
|
|
342
|
+
**Why enforce this strictly?**
|
|
343
|
+
|
|
344
|
+
- **Focus**: Work on ONE thing at a time
|
|
345
|
+
- **Completion**: Finish before starting new
|
|
346
|
+
- **Quality**: Tests run, docs updated, code reviewed
|
|
347
|
+
- **Clarity**: Everyone knows what's current
|
|
348
|
+
- **Velocity**: Actually shipping > endless WIP
|
|
349
|
+
|
|
350
|
+
**Old Way (suggest)**:
|
|
351
|
+
```
|
|
352
|
+
User: "Just let me start the new feature, I'll come back to this"
|
|
353
|
+
Result: 5 incomplete increments, nothing ships
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
**New Way (enforce)**:
|
|
357
|
+
```
|
|
358
|
+
Framework: "Close this first, then start new"
|
|
359
|
+
User: *closes increment properly*
|
|
360
|
+
Result: Clean increments, clear progress, shipping regularly
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
### Real-World Example
|
|
364
|
+
|
|
365
|
+
**Scenario**: You have 0002 at 73% complete, want to start 0006.
|
|
366
|
+
|
|
367
|
+
**Before v0.6.0** (broken):
|
|
368
|
+
```bash
|
|
369
|
+
/specweave:inc "0006-i18n"
|
|
370
|
+
# ✅ Creates 0006 (no check)
|
|
371
|
+
# Result: 0002, 0003, 0006 all incomplete
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
**After v0.6.0** (disciplined):
|
|
375
|
+
```bash
|
|
376
|
+
/specweave:inc "0006-i18n"
|
|
377
|
+
# ❌ Blocked! "Close 0002 and 0003 first"
|
|
378
|
+
|
|
379
|
+
# Check status
|
|
380
|
+
/specweave:status
|
|
381
|
+
# Shows: 0002 (73%), 0003 (50%) incomplete
|
|
382
|
+
|
|
383
|
+
# Close them
|
|
384
|
+
/specweave:close
|
|
385
|
+
# Select 0002 → Force complete (work was done, just not marked)
|
|
386
|
+
# Select 0003 → Move tasks to 0007 (defer work)
|
|
387
|
+
|
|
388
|
+
# Now can proceed
|
|
389
|
+
/specweave:inc "0006-i18n"
|
|
390
|
+
# ✅ Works! Clean slate, disciplined workflow
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
### Exception: The `--force` Flag
|
|
394
|
+
|
|
395
|
+
For **emergencies only** (hotfixes, urgent features):
|
|
396
|
+
|
|
397
|
+
```bash
|
|
398
|
+
/specweave:inc "urgent-security-fix" --force
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
**This bypasses the check** but:
|
|
402
|
+
- ✅ Logs the force creation
|
|
403
|
+
- ✅ Warns in CLI output
|
|
404
|
+
- ✅ Should be explained in PR/standup
|
|
405
|
+
- ✅ Should close previous increments ASAP
|
|
406
|
+
|
|
407
|
+
**Use sparingly!** The discipline exists for a reason.
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
**Summary**: Close previous increments before starting new ones. Use `/specweave:status` and `/specweave:close` to maintain discipline. This isn't bureaucracy—it's quality enforcement.
|
|
412
|
+
|
|
413
|
+
---
|
|
414
|
+
|
|
415
|
+
## Root-Level .specweave/ Folder (MANDATORY)
|
|
416
|
+
|
|
417
|
+
**CRITICAL ARCHITECTURE RULE**: SpecWeave ONLY supports root-level `.specweave/` folders. Nested `.specweave/` folders are NOT supported and MUST be prevented.
|
|
418
|
+
|
|
419
|
+
### The Rule: ONE Source of Truth
|
|
420
|
+
|
|
421
|
+
```
|
|
422
|
+
✅ CORRECT - Root-level only:
|
|
423
|
+
my-project/
|
|
424
|
+
├── .specweave/ ← ONE source of truth
|
|
425
|
+
│ ├── increments/
|
|
426
|
+
│ ├── docs/
|
|
427
|
+
│ └── logs/
|
|
428
|
+
├── frontend/
|
|
429
|
+
├── backend/
|
|
430
|
+
└── infrastructure/
|
|
431
|
+
|
|
432
|
+
❌ WRONG - Nested .specweave/ (NOT SUPPORTED):
|
|
433
|
+
my-project/
|
|
434
|
+
├── .specweave/ ← Root level
|
|
435
|
+
│ └── ...
|
|
436
|
+
├── backend/
|
|
437
|
+
│ └── .specweave/ ← ❌ NESTED - PREVENTS THIS!
|
|
438
|
+
└── frontend/
|
|
439
|
+
└── .specweave/ ← ❌ NESTED - PREVENTS THIS!
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
### Why Root-Level Only?
|
|
443
|
+
|
|
444
|
+
**Single Source of Truth**:
|
|
445
|
+
- ✅ One central location for all specs, increments, architecture
|
|
446
|
+
- ✅ No duplication or fragmentation
|
|
447
|
+
- ✅ Clear ownership and responsibility
|
|
448
|
+
- ✅ Simplified living docs sync (one place to update)
|
|
449
|
+
|
|
450
|
+
**Cross-Cutting Features**:
|
|
451
|
+
- ✅ Increments often span multiple modules (frontend + backend + infra)
|
|
452
|
+
- ✅ Architecture decisions (ADRs) apply system-wide
|
|
453
|
+
- ✅ Strategy docs are project-level, not module-level
|
|
454
|
+
- ✅ Living docs sync works best with one central location
|
|
455
|
+
|
|
456
|
+
**Plugin Detection**:
|
|
457
|
+
- ✅ Four-phase detection assumes one `.specweave/` folder
|
|
458
|
+
- ✅ Auto-detection scans from root only
|
|
459
|
+
- ✅ No ambiguity about where plugins are enabled
|
|
460
|
+
|
|
461
|
+
**Prevents Chaos**:
|
|
462
|
+
- ❌ Nested folders cause: Which is the source of truth?
|
|
463
|
+
- ❌ Duplication: Same increment in multiple places?
|
|
464
|
+
- ❌ Conflicts: Different modules with same increment numbers?
|
|
465
|
+
- ❌ Complexity: Where do cross-cutting features live?
|
|
466
|
+
|
|
467
|
+
### Multi-Repo & Microservices Pattern
|
|
468
|
+
|
|
469
|
+
**Problem**: "My project has multiple repos, microservices, or complex architecture"
|
|
470
|
+
|
|
471
|
+
**Solution**: Create a **parent folder** with ONE root-level `.specweave/`
|
|
472
|
+
|
|
473
|
+
The pattern is the same whether you have:
|
|
474
|
+
- Multiple git repos (polyrepo architecture)
|
|
475
|
+
- Microservices (separate service directories)
|
|
476
|
+
- Monorepo with multiple modules
|
|
477
|
+
|
|
478
|
+
```
|
|
479
|
+
microservices-project/ ← Create parent folder
|
|
480
|
+
├── .specweave/ ← ONE source of truth for entire system
|
|
481
|
+
│ ├── increments/
|
|
482
|
+
│ │ ├── 0001-add-service-mesh/ ← Cross-cutting
|
|
483
|
+
│ │ ├── 0002-user-svc-v2/ ← Single service
|
|
484
|
+
│ │ └── 0003-checkout-flow/ ← Multi-service
|
|
485
|
+
│ ├── docs/
|
|
486
|
+
│ │ ├── internal/
|
|
487
|
+
│ │ │ ├── strategy/ ← System-wide strategy
|
|
488
|
+
│ │ │ ├── architecture/
|
|
489
|
+
│ │ │ │ ├── service-mesh.md ← System-wide
|
|
490
|
+
│ │ │ │ ├── api-contracts.md ← Cross-service
|
|
491
|
+
│ │ │ │ └── adr/
|
|
492
|
+
│ │ │ │ └── 0001-service-mesh-choice.md
|
|
493
|
+
│ │ │ └── ...
|
|
494
|
+
│ │ └── public/
|
|
495
|
+
│ └── logs/
|
|
496
|
+
│
|
|
497
|
+
├── services/
|
|
498
|
+
│ ├── user-service/ ← Can be separate git repos
|
|
499
|
+
│ ├── order-service/ ← Or monorepo subdirectories
|
|
500
|
+
│ ├── payment-service/
|
|
501
|
+
│ └── notification-service/
|
|
502
|
+
│
|
|
503
|
+
├── infrastructure/
|
|
504
|
+
│ ├── k8s/
|
|
505
|
+
│ └── terraform/
|
|
506
|
+
│
|
|
507
|
+
└── shared/
|
|
508
|
+
└── api-contracts/
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
**How to Set Up**:
|
|
512
|
+
|
|
513
|
+
```bash
|
|
514
|
+
# Option 1: Multiple repos (clone as subdirectories)
|
|
515
|
+
mkdir microservices-project && cd microservices-project
|
|
516
|
+
npx specweave init .
|
|
517
|
+
git clone https://github.com/myorg/user-service.git services/user-service
|
|
518
|
+
git clone https://github.com/myorg/order-service.git services/order-service
|
|
519
|
+
|
|
520
|
+
# Option 2: Git submodules (advanced)
|
|
521
|
+
mkdir microservices-project && cd microservices-project
|
|
522
|
+
git init && npx specweave init .
|
|
523
|
+
git submodule add https://github.com/myorg/user-service.git services/user-service
|
|
524
|
+
|
|
525
|
+
# Option 3: Monorepo (services in same repo)
|
|
526
|
+
mkdir microservices-project && cd microservices-project
|
|
527
|
+
git init && npx specweave init .
|
|
528
|
+
mkdir -p services/{user,order,payment}
|
|
529
|
+
|
|
530
|
+
# Work normally - SpecWeave sees all services
|
|
531
|
+
/specweave:inc "0001-add-service-mesh"
|
|
532
|
+
# Creates: .specweave/increments/0001-add-service-mesh/
|
|
533
|
+
# Can reference: services/user-service/, infrastructure/k8s/, etc.
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
**Benefits**:
|
|
537
|
+
- ✅ One `.specweave/` for entire system (no duplication)
|
|
538
|
+
- ✅ Each repo maintains its own git history (if using polyrepo)
|
|
539
|
+
- ✅ Cross-service increments are natural (e.g., checkout flow)
|
|
540
|
+
- ✅ System-wide architecture docs in one place
|
|
541
|
+
- ✅ Living docs cover all services
|
|
542
|
+
|
|
543
|
+
### Enforcement
|
|
544
|
+
|
|
545
|
+
**Validation in `init.ts`**:
|
|
546
|
+
|
|
547
|
+
```typescript
|
|
548
|
+
// Check for parent .specweave/
|
|
549
|
+
function detectNestedSpecweave(targetDir: string): string | null {
|
|
550
|
+
let currentDir = path.dirname(targetDir);
|
|
551
|
+
const root = path.parse(currentDir).root;
|
|
552
|
+
|
|
553
|
+
while (currentDir !== root) {
|
|
554
|
+
const specweavePath = path.join(currentDir, '.specweave');
|
|
555
|
+
if (fs.existsSync(specweavePath)) {
|
|
556
|
+
return currentDir; // Found parent .specweave/
|
|
557
|
+
}
|
|
558
|
+
currentDir = path.dirname(currentDir);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
return null;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
// Prevent nested initialization
|
|
565
|
+
const parentSpecweave = detectNestedSpecweave(targetDir);
|
|
566
|
+
if (parentSpecweave) {
|
|
567
|
+
console.error('❌ Nested .specweave/ folders are not supported!');
|
|
568
|
+
console.error(` Found parent .specweave/ at: ${parentSpecweave}`);
|
|
569
|
+
console.error(` Use the parent folder for all increments.`);
|
|
570
|
+
process.exit(1);
|
|
571
|
+
}
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
**Detection Rules**:
|
|
575
|
+
- ❌ Prevent `specweave init` in subdirectories if parent `.specweave/` exists
|
|
576
|
+
- ✅ Suggest using parent folder instead
|
|
577
|
+
- ✅ Provide clear error messages with path to parent
|
|
578
|
+
|
|
579
|
+
**Code Review**:
|
|
580
|
+
- ❌ Reject PRs with nested `.specweave/` folders
|
|
581
|
+
- ✅ Enforce via linting/validation scripts
|
|
582
|
+
|
|
583
|
+
### Summary
|
|
584
|
+
|
|
585
|
+
| Aspect | Root-Level Only | Nested (NOT Supported) |
|
|
586
|
+
|--------|----------------|------------------------|
|
|
587
|
+
| **Source of Truth** | ✅ One central location | ❌ Multiple conflicting sources |
|
|
588
|
+
| **Cross-Cutting Features** | ✅ Natural | ❌ Complex coordination |
|
|
589
|
+
| **Living Docs Sync** | ✅ Simple | ❌ Merge conflicts |
|
|
590
|
+
| **Plugin Detection** | ✅ Works | ❌ Ambiguous |
|
|
591
|
+
| **Multi-Repo** | ✅ Parent folder | ❌ Fragmented |
|
|
592
|
+
| **Complexity** | ✅ Simple | ❌ High |
|
|
593
|
+
|
|
594
|
+
**Bottom Line**: Root-level `.specweave/` only. For multi-repo projects, create a parent folder. No exceptions.
|
|
595
|
+
|
|
596
|
+
---
|
|
597
|
+
|
|
175
598
|
## Project Scale (v0.4.0 - Plugin Architecture)
|
|
176
599
|
|
|
177
|
-
### Core
|
|
600
|
+
### Core Plugin (Always Auto-Loaded)
|
|
178
601
|
|
|
179
|
-
**
|
|
180
|
-
- **Skills**:
|
|
181
|
-
- **Agents**:
|
|
182
|
-
- **Commands**:
|
|
602
|
+
**Plugin**: `specweave` - The essential SpecWeave plugin loaded in every project:
|
|
603
|
+
- **Skills**: 9 skills (increment-planner, tdd-workflow, rfc-generator, context-loader, project-kickstarter, brownfield-analyzer, brownfield-onboarder, increment-quality-judge, context-optimizer)
|
|
604
|
+
- **Agents**: 22 agents (PM, Architect, Tech Lead, + 19 specialized including tdd-orchestrator)
|
|
605
|
+
- **Commands**: 22 commands (/specweave:inc, /specweave:do, /specweave:next, /specweave:done, /specweave:progress, /specweave:validate, /specweave:sync-docs, + 15 specialized)
|
|
606
|
+
- **Hooks**: 8 lifecycle hooks
|
|
183
607
|
- **Size**: ~12K tokens (vs. 50K in v0.3.7)
|
|
184
608
|
|
|
185
609
|
**Result**: **75%+ context reduction** out of the box!
|
|
186
610
|
|
|
187
611
|
**Why So Small?**
|
|
188
|
-
- External sync (GitHub, Jira) = plugins
|
|
189
|
-
- Tech stacks (React, K8s) = plugins
|
|
190
|
-
- Domain expertise (ML, payments) = plugins
|
|
191
|
-
-
|
|
612
|
+
- External sync (GitHub, Jira) = separate plugins
|
|
613
|
+
- Tech stacks (React, K8s) = separate plugins
|
|
614
|
+
- Domain expertise (ML, payments) = separate plugins
|
|
615
|
+
- Core plugin = only increment lifecycle + living docs automation
|
|
192
616
|
|
|
193
617
|
### Available Plugins (Opt-In)
|
|
194
618
|
|
|
@@ -219,7 +643,7 @@ Generic AI tools:
|
|
|
219
643
|
| **ml-ops** | 3 | 3 | 1 | Machine learning, TensorFlow, PyTorch |
|
|
220
644
|
| **observability** | 4 | 4 | 2 | Prometheus, Grafana, monitoring |
|
|
221
645
|
| **payment-processing** | 4 | 1 | 0 | Stripe, billing, subscriptions |
|
|
222
|
-
| **e2e-testing** |
|
|
646
|
+
| **e2e-testing** | 1 | 0 | 0 | Playwright, E2E browser automation, visual regression |
|
|
223
647
|
| **figma-ecosystem** | 5 | 2 | 0 | Design integration, Figma API |
|
|
224
648
|
| **security** | 3 | 1 | 0 | Security scanning, best practices |
|
|
225
649
|
| **diagrams** | 2 | 1 | 0 | C4 diagrams, Mermaid |
|
|
@@ -252,26 +676,96 @@ Generic AI tools:
|
|
|
252
676
|
- ML pipeline: Core + ml-ops + github ≈ **18K tokens** (64% reduction!)
|
|
253
677
|
- SpecWeave itself: Core + github + diagrams ≈ **15K tokens** (70% reduction!)
|
|
254
678
|
|
|
255
|
-
### How
|
|
679
|
+
### How Plugins Are Loaded (Intelligent Auto-Loading)
|
|
256
680
|
|
|
257
|
-
**
|
|
258
|
-
```bash
|
|
259
|
-
specweave init # Auto-detects and suggests plugins
|
|
260
|
-
```
|
|
681
|
+
**SpecWeave's plugin system is designed to be intelligent and non-intrusive:**
|
|
261
682
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
683
|
+
#### Phase 1: Initialize (FULLY AUTOMATED!)
|
|
684
|
+
|
|
685
|
+
When you run `specweave init`:
|
|
686
|
+
|
|
687
|
+
1. ✅ **Marketplace Auto-Registration**
|
|
688
|
+
- Creates `.claude/settings.json` with marketplace reference
|
|
689
|
+
- Claude Code automatically discovers plugins
|
|
690
|
+
- No manual `/plugin marketplace add` needed!
|
|
691
|
+
|
|
692
|
+
2. ✅ **Core Plugin Auto-Installation** (NEW! v0.6.1+)
|
|
693
|
+
- Automatically runs: `claude plugin marketplace add` and `claude plugin install specweave@specweave`
|
|
694
|
+
- Works via CLI during init (uses user's shell to access `claude` command)
|
|
695
|
+
- Slash commands available IMMEDIATELY - no manual install!
|
|
696
|
+
- Success message: "✔ SpecWeave core plugin installed automatically!"
|
|
697
|
+
- Graceful fallback: If CLI unavailable, shows manual install instructions
|
|
698
|
+
|
|
699
|
+
3. ℹ️ **Optional Plugins Suggested**
|
|
700
|
+
- Based on project detection (Git, package.json, etc.)
|
|
701
|
+
- User can install now or later
|
|
702
|
+
|
|
703
|
+
#### Phase 2: Increment Planning (On-Demand Loading)
|
|
704
|
+
|
|
705
|
+
When you create increments (e.g., `/specweave:inc "Add Stripe billing"`):
|
|
706
|
+
|
|
707
|
+
1. **Spec Analysis** (NEW! v0.6.0+)
|
|
708
|
+
- increment-planner skill scans spec.md content
|
|
709
|
+
- Detects keywords: "Stripe", "GitHub", "Kubernetes", "React", etc.
|
|
710
|
+
- Maps keywords → required plugins (see Step 6 in increment-planner/SKILL.md)
|
|
711
|
+
|
|
712
|
+
2. **Plugin Suggestion** (Non-Blocking)
|
|
713
|
+
```
|
|
714
|
+
🔌 This increment requires additional plugins:
|
|
715
|
+
|
|
716
|
+
Required:
|
|
717
|
+
• specweave-payments - Stripe integration (detected: "billing", "Stripe")
|
|
718
|
+
|
|
719
|
+
📦 Install: /plugin install specweave-payments@specweave
|
|
720
|
+
|
|
721
|
+
Or continue without it (can install later)
|
|
722
|
+
```
|
|
723
|
+
|
|
724
|
+
3. **User Decision**
|
|
725
|
+
- Install now → Plugin activates immediately (after Claude Code restart)
|
|
726
|
+
- Install later → Skills won't be available until plugin installed
|
|
727
|
+
- Skip → Increment creation continues (not blocked)
|
|
728
|
+
|
|
729
|
+
#### Phase 3: Implementation (Auto-Activation)
|
|
730
|
+
|
|
731
|
+
When plugins are installed:
|
|
732
|
+
|
|
733
|
+
1. **Skills Auto-Activate**
|
|
734
|
+
- Based on description keywords (Claude Code native behavior)
|
|
735
|
+
- No manual invocation needed
|
|
736
|
+
- Example: Mention "GitHub" → github-sync skill activates
|
|
737
|
+
|
|
738
|
+
2. **Context Efficiency**
|
|
739
|
+
- Only loaded plugins consume tokens
|
|
740
|
+
- 70%+ reduction vs. monolithic approach
|
|
741
|
+
- Real-time: Simple React app = 16K tokens (was 50K in v0.3.7)
|
|
742
|
+
|
|
743
|
+
### Manual Plugin Management
|
|
744
|
+
|
|
745
|
+
All plugin management happens through Claude Code's native commands:
|
|
268
746
|
|
|
269
|
-
**Spec-Based** (during increment planning):
|
|
270
747
|
```bash
|
|
271
|
-
|
|
272
|
-
|
|
748
|
+
# List installed plugins
|
|
749
|
+
/plugin list --installed
|
|
750
|
+
|
|
751
|
+
# Install a specific plugin
|
|
752
|
+
/plugin install specweave-kubernetes@specweave
|
|
753
|
+
|
|
754
|
+
# Uninstall a plugin
|
|
755
|
+
/plugin uninstall specweave-kubernetes
|
|
756
|
+
|
|
757
|
+
# List all available plugins from marketplace
|
|
758
|
+
/plugin list specweave
|
|
273
759
|
```
|
|
274
760
|
|
|
761
|
+
**Key Insight**: SpecWeave uses **ONLY** Claude Code's native plugin system:
|
|
762
|
+
- Plugins install globally via `/plugin install specweave-{name}@specweave`
|
|
763
|
+
- Work across ALL projects (like VS Code extensions)
|
|
764
|
+
- Auto-activate based on skills' description keywords
|
|
765
|
+
- Managed by Claude Code (updates, uninstall, etc.)
|
|
766
|
+
|
|
767
|
+
No per-project installation needed!
|
|
768
|
+
|
|
275
769
|
---
|
|
276
770
|
|
|
277
771
|
## Project Architecture
|
|
@@ -281,19 +775,54 @@ specweave plugin disable figma-ecosystem
|
|
|
281
775
|
**CRITICAL**: SpecWeave follows a strict source-of-truth pattern:
|
|
282
776
|
|
|
283
777
|
```
|
|
284
|
-
src/ ← SOURCE OF TRUTH (
|
|
285
|
-
├──
|
|
286
|
-
├──
|
|
287
|
-
├──
|
|
288
|
-
├──
|
|
289
|
-
|
|
290
|
-
|
|
778
|
+
src/ ← SOURCE OF TRUTH (TypeScript code only)
|
|
779
|
+
├── core/ ← Core framework logic (TypeScript utilities)
|
|
780
|
+
│ ├── plugin-loader.ts
|
|
781
|
+
│ ├── config-manager.ts
|
|
782
|
+
│ ├── types/ ← TypeScript type definitions
|
|
783
|
+
│ └── schemas/ ← JSON schemas
|
|
784
|
+
├── cli/ ← CLI commands
|
|
785
|
+
├── hooks/ ← TypeScript utilities for hooks
|
|
786
|
+
│ └── lib/ ← Hook helper functions
|
|
787
|
+
├── adapters/ ← Tool adapters (legacy)
|
|
788
|
+
├── templates/ ← Templates for user projects
|
|
789
|
+
└── utils/ ← Utility functions
|
|
790
|
+
|
|
791
|
+
plugins/ ← ROOT: All plugins (version controlled)
|
|
792
|
+
├── specweave/ ← CORE PLUGIN (framework essentials)
|
|
793
|
+
│ ├── .claude-plugin/ ← plugin.json (Claude native)
|
|
794
|
+
│ ├── skills/ ← Core skills (9 total)
|
|
795
|
+
│ │ ├── rfc-generator/
|
|
796
|
+
│ │ ├── increment-planner/
|
|
797
|
+
│ │ ├── tdd-workflow/
|
|
798
|
+
│ │ └── ...
|
|
799
|
+
│ ├── agents/ ← Core agents (3 core + 19 specialized)
|
|
800
|
+
│ │ ├── pm/
|
|
801
|
+
│ │ ├── architect/
|
|
802
|
+
│ │ ├── tech-lead/
|
|
803
|
+
│ │ └── ...
|
|
804
|
+
│ ├── commands/ ← Core commands (7 core + 15 specialized)
|
|
805
|
+
│ │ ├── inc.md
|
|
806
|
+
│ │ ├── do.md
|
|
807
|
+
│ │ └── ...
|
|
808
|
+
│ ├── hooks/ ← Lifecycle hooks (8 total)
|
|
809
|
+
│ │ ├── post-task-completion.sh
|
|
810
|
+
│ │ ├── pre-implementation.sh
|
|
811
|
+
│ │ └── ...
|
|
812
|
+
│ └── lib/ ← TypeScript utilities (optional)
|
|
813
|
+
│
|
|
814
|
+
└── specweave-{name}/ ← Other plugins (GitHub, Figma, etc.)
|
|
815
|
+
├── .claude-plugin/ ← plugin.json (Claude native)
|
|
816
|
+
├── skills/ ← Plugin skills
|
|
817
|
+
├── agents/ ← Plugin agents
|
|
818
|
+
├── commands/ ← Plugin commands
|
|
819
|
+
└── lib/ ← TypeScript utilities (optional)
|
|
291
820
|
|
|
292
821
|
.claude/ ← INSTALLED (gitignored in user projects)
|
|
293
|
-
├──
|
|
294
|
-
├──
|
|
295
|
-
├──
|
|
296
|
-
└──
|
|
822
|
+
├── agents/ ← Installed from plugins/*/agents/
|
|
823
|
+
├── commands/ ← Installed from plugins/*/commands/
|
|
824
|
+
├── hooks/ ← Installed from plugins/*/hooks/
|
|
825
|
+
└── skills/ ← Installed from plugins/*/skills/
|
|
297
826
|
|
|
298
827
|
.specweave/ ← FRAMEWORK DATA (always present)
|
|
299
828
|
├── increments/ ← Feature development
|
|
@@ -302,11 +831,20 @@ src/ ← SOURCE OF TRUTH (version controlled)
|
|
|
302
831
|
```
|
|
303
832
|
|
|
304
833
|
**Rules**:
|
|
305
|
-
- ✅
|
|
306
|
-
- ✅
|
|
834
|
+
- ✅ `src/` = TypeScript code ONLY (compiled to `dist/`)
|
|
835
|
+
- ✅ ALL skills/agents/commands/hooks = Inside plugins (including core!)
|
|
836
|
+
- ✅ `plugins/specweave/` = Core framework plugin (always loaded)
|
|
837
|
+
- ✅ `.claude/` = Installed from all enabled plugins
|
|
838
|
+
- ❌ NEVER mix `*.ts` and `SKILL.md` in the same directory
|
|
307
839
|
- ❌ NEVER edit files in `.claude/` directly (they get overwritten)
|
|
308
840
|
- ❌ NEVER create new files in project root (use increment folders)
|
|
309
841
|
|
|
842
|
+
**Key Architectural Principle**:
|
|
843
|
+
- TypeScript code (`*.ts`) goes in `src/` → compiled to `dist/`
|
|
844
|
+
- Claude-native files (`SKILL.md`, `AGENT.md`, `*.md`) go in `plugins/` → copied to `.claude/`
|
|
845
|
+
- Even "core" framework components are in `plugins/specweave/` (everything is a plugin!)
|
|
846
|
+
- This separation ensures clean builds and prevents mixing compiled code with runtime files
|
|
847
|
+
|
|
310
848
|
### Tech Stack
|
|
311
849
|
|
|
312
850
|
**Core**:
|
|
@@ -336,67 +874,91 @@ src/ ← SOURCE OF TRUTH (version controlled)
|
|
|
336
874
|
|
|
337
875
|
```
|
|
338
876
|
specweave/
|
|
339
|
-
├── src/ # SOURCE OF TRUTH
|
|
877
|
+
├── src/ # SOURCE OF TRUTH (TypeScript code ONLY)
|
|
340
878
|
│ ├── cli/ # CLI commands (init, version)
|
|
341
879
|
│ │ └── commands/
|
|
342
880
|
│ │ └── init.ts # Main installation logic
|
|
343
|
-
│ ├── core/ # Core framework logic
|
|
344
|
-
│ │ ├── plugin-loader.ts #
|
|
345
|
-
│ │ ├── plugin-manager.ts #
|
|
346
|
-
│ │ ├── plugin-detector.ts #
|
|
881
|
+
│ ├── core/ # Core framework logic (TypeScript only)
|
|
882
|
+
│ │ ├── plugin-loader.ts # Load plugins from disk
|
|
883
|
+
│ │ ├── plugin-manager.ts # Plugin lifecycle management
|
|
884
|
+
│ │ ├── plugin-detector.ts # Auto-detect plugins (4 phases)
|
|
347
885
|
│ │ ├── config-manager.ts # Config loading/validation
|
|
348
886
|
│ │ ├── types/
|
|
349
|
-
│ │ │ └── plugin.ts #
|
|
350
|
-
│ │
|
|
351
|
-
│ │
|
|
352
|
-
│ │
|
|
353
|
-
│
|
|
354
|
-
│ │
|
|
355
|
-
│ ├──
|
|
356
|
-
│ │ ├──
|
|
357
|
-
│ │ ├──
|
|
358
|
-
│ │
|
|
359
|
-
│ ├──
|
|
360
|
-
│ │ ├──
|
|
361
|
-
│ │
|
|
362
|
-
│ │ └── tech-lead/
|
|
363
|
-
│ ├── commands/ # 7 core slash commands (.md)
|
|
364
|
-
│ │ ├── specweave-inc.md
|
|
365
|
-
│ │ ├── specweave-do.md
|
|
366
|
-
│ │ └── ...
|
|
367
|
-
│ ├── hooks/ # Lifecycle hooks (.sh)
|
|
368
|
-
│ │ └── post-task-completion.sh
|
|
369
|
-
│ ├── adapters/ # Multi-tool support (UPDATED)
|
|
370
|
-
│ │ ├── adapter-interface.ts # ✅ UPDATED: Plugin methods
|
|
371
|
-
│ │ ├── adapter-base.ts # ✅ UPDATED: Default implementations
|
|
372
|
-
│ │ ├── claude/ # ✅ UPDATED: Native plugin support
|
|
373
|
-
│ │ ├── cursor/ # ✅ UPDATED: AGENTS.md compilation
|
|
374
|
-
│ │ ├── copilot/ # ✅ UPDATED: AGENTS.md compilation
|
|
375
|
-
│ │ └── generic/ # ✅ UPDATED: Manual workflows
|
|
376
|
-
│ ├── plugins/ # ✅ NEW: Plugin system
|
|
377
|
-
│ │ └── specweave-github/ # ✅ COMPLETE: GitHub integration
|
|
378
|
-
│ │ ├── .claude-plugin/
|
|
379
|
-
│ │ │ └── manifest.json
|
|
380
|
-
│ │ ├── skills/
|
|
381
|
-
│ │ │ ├── github-sync/
|
|
382
|
-
│ │ │ └── github-issue-tracker/
|
|
383
|
-
│ │ ├── agents/
|
|
384
|
-
│ │ │ └── github-manager/
|
|
385
|
-
│ │ └── commands/
|
|
386
|
-
│ │ ├── github-create-issue.md
|
|
387
|
-
│ │ ├── github-sync.md
|
|
388
|
-
│ │ ├── github-close-issue.md
|
|
389
|
-
│ │ └── github-status.md
|
|
887
|
+
│ │ │ └── plugin.ts # Plugin type definitions
|
|
888
|
+
│ │ └── schemas/
|
|
889
|
+
│ │ ├── plugin-manifest.schema.json
|
|
890
|
+
│ │ └── specweave-config.schema.json
|
|
891
|
+
│ ├── hooks/ # TypeScript utilities for hooks
|
|
892
|
+
│ │ └── lib/ # Hook helper functions
|
|
893
|
+
│ ├── adapters/ # Tool adapters (legacy)
|
|
894
|
+
│ │ ├── adapter-interface.ts
|
|
895
|
+
│ │ ├── adapter-base.ts
|
|
896
|
+
│ │ ├── claude/
|
|
897
|
+
│ │ ├── cursor/ (legacy)
|
|
898
|
+
│ │ ├── copilot/ (legacy)
|
|
899
|
+
│ │ └── generic/ (legacy)
|
|
390
900
|
│ ├── templates/ # User project templates
|
|
391
901
|
│ │ ├── CLAUDE.md.template
|
|
392
902
|
│ │ ├── AGENTS.md.template
|
|
393
903
|
│ │ └── ...
|
|
394
904
|
│ └── utils/ # Utility functions
|
|
395
905
|
│
|
|
906
|
+
├── plugins/ # ALL PLUGINS (root level)
|
|
907
|
+
│ ├── specweave/ # CORE PLUGIN (framework essentials)
|
|
908
|
+
│ │ ├── .claude-plugin/
|
|
909
|
+
│ │ │ └── plugin.json # Claude native manifest
|
|
910
|
+
│ │ ├── skills/ # Core skills (9 total)
|
|
911
|
+
│ │ │ ├── rfc-generator/ # RFC generation for increments
|
|
912
|
+
│ │ │ ├── increment-planner/ # Increment planning and spec generation
|
|
913
|
+
│ │ │ ├── context-loader/ # Context loading optimization
|
|
914
|
+
│ │ │ ├── tdd-workflow/ # Test-driven development workflow
|
|
915
|
+
│ │ │ ├── project-kickstarter/ # New project bootstrapping
|
|
916
|
+
│ │ │ ├── brownfield-analyzer/ # Existing codebase analysis
|
|
917
|
+
│ │ │ ├── brownfield-onboarder/ # Brownfield project onboarding
|
|
918
|
+
│ │ │ ├── increment-quality-judge/# Quality assessment
|
|
919
|
+
│ │ │ └── context-optimizer/ # Context optimization
|
|
920
|
+
│ │ ├── agents/ # Core agents (22 total)
|
|
921
|
+
│ │ │ ├── pm/ # Product Manager agent
|
|
922
|
+
│ │ │ ├── architect/ # System Architect agent
|
|
923
|
+
│ │ │ ├── tech-lead/ # Tech Lead agent
|
|
924
|
+
│ │ │ └── ...
|
|
925
|
+
│ │ ├── commands/ # Core commands (22 total)
|
|
926
|
+
│ │ │ ├── inc.md # /specweave:inc
|
|
927
|
+
│ │ │ ├── do.md # /specweave:do
|
|
928
|
+
│ │ │ ├── done.md # /specweave:done
|
|
929
|
+
│ │ │ └── ...
|
|
930
|
+
│ │ ├── hooks/ # Lifecycle hooks (8 total)
|
|
931
|
+
│ │ │ ├── post-task-completion.sh # Auto-runs after tasks complete
|
|
932
|
+
│ │ │ ├── pre-implementation.sh # Pre-task validation
|
|
933
|
+
│ │ │ └── ...
|
|
934
|
+
│ │ └── lib/ # TypeScript utilities (optional)
|
|
935
|
+
│ │
|
|
936
|
+
│ ├── specweave-github/ # GitHub Issues integration
|
|
937
|
+
│ │ ├── .claude-plugin/
|
|
938
|
+
│ │ │ └── plugin.json # Claude native manifest
|
|
939
|
+
│ │ ├── skills/
|
|
940
|
+
│ │ │ ├── github-sync/
|
|
941
|
+
│ │ │ └── github-issue-tracker/
|
|
942
|
+
│ │ ├── agents/
|
|
943
|
+
│ │ │ └── github-manager/
|
|
944
|
+
│ │ ├── commands/
|
|
945
|
+
│ │ │ ├── github-create-issue.md
|
|
946
|
+
│ │ │ ├── github-sync.md
|
|
947
|
+
│ │ │ └── ...
|
|
948
|
+
│ │ └── lib/ # TypeScript utilities
|
|
949
|
+
│ ├── specweave-figma/ # Figma design sync
|
|
950
|
+
│ ├── specweave-infrastructure/ # K8s, Helm, Terraform
|
|
951
|
+
│ └── ... (18 plugins total)
|
|
952
|
+
│
|
|
953
|
+
├── .claude-plugin/ # Claude Code marketplace (root level)
|
|
954
|
+
│ ├── marketplace.json # Plugin catalog (18 plugins)
|
|
955
|
+
│ └── README.md # Marketplace documentation
|
|
956
|
+
│
|
|
396
957
|
├── .claude/ # Pre-installed for SpecWeave dev
|
|
397
|
-
│ ├──
|
|
398
|
-
│ ├──
|
|
399
|
-
│
|
|
958
|
+
│ ├── agents/ # Installed from plugins/*/agents/
|
|
959
|
+
│ ├── commands/ # Installed from plugins/*/commands/
|
|
960
|
+
│ ├── hooks/ # Installed from plugins/*/hooks/
|
|
961
|
+
│ └── skills/ # Installed from plugins/*/skills/
|
|
400
962
|
│
|
|
401
963
|
├── .specweave/ # SpecWeave's own increments
|
|
402
964
|
│ ├── increments/
|
|
@@ -411,8 +973,17 @@ specweave/
|
|
|
411
973
|
│ │ │ └── reports/ # ✅ Analysis files
|
|
412
974
|
│ │ └── _backlog/
|
|
413
975
|
│ ├── docs/
|
|
414
|
-
│ │ ├── internal/ # Strategic docs
|
|
415
|
-
│ │
|
|
976
|
+
│ │ ├── internal/ # Strategic docs (NEVER published)
|
|
977
|
+
│ │ │ ├── strategy/ # Business strategy, market analysis
|
|
978
|
+
│ │ │ ├── architecture/ # Technical architecture
|
|
979
|
+
│ │ │ │ ├── adr/ # Architecture Decision Records
|
|
980
|
+
│ │ │ │ ├── rfc/ # ✅ Request for Comments (detailed specs)
|
|
981
|
+
│ │ │ │ ├── diagrams/ # Mermaid + SVG
|
|
982
|
+
│ │ │ │ └── hld-system.md # High-Level Design
|
|
983
|
+
│ │ │ └── delivery/ # Implementation notes, runbooks
|
|
984
|
+
│ │ └── public/ # User-facing docs (can publish)
|
|
985
|
+
│ │ ├── guides/
|
|
986
|
+
│ │ └── api/
|
|
416
987
|
│ └── logs/
|
|
417
988
|
│
|
|
418
989
|
├── tests/
|
|
@@ -452,33 +1023,13 @@ specweave/
|
|
|
452
1023
|
|
|
453
1024
|
### ❌ NEVER Create in Root (Pollutes Repository)
|
|
454
1025
|
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
```
|
|
458
|
-
❌ WRONG:
|
|
459
|
-
/SESSION-SUMMARY-2025-10-28.md # NO!
|
|
460
|
-
/ADR-006-DEEP-ANALYSIS.md # NO!
|
|
461
|
-
/ANALYSIS-MULTI-TOOL-COMPARISON.md # NO!
|
|
462
|
-
/CONTEXT-LOADER-CORRECTIONS.md # NO!
|
|
463
|
-
|
|
464
|
-
✅ CORRECT:
|
|
465
|
-
.specweave/increments/0002-core-enhancements/
|
|
466
|
-
├── reports/
|
|
467
|
-
│ ├── SESSION-SUMMARY-2025-10-28.md
|
|
468
|
-
│ ├── ADR-006-DEEP-ANALYSIS.md
|
|
469
|
-
│ ├── ANALYSIS-MULTI-TOOL-COMPARISON.md
|
|
470
|
-
│ └── CONTEXT-LOADER-CORRECTIONS.md
|
|
471
|
-
├── logs/
|
|
472
|
-
│ └── execution-2025-10-28.log
|
|
473
|
-
└── scripts/
|
|
474
|
-
└── migration-helper.sh
|
|
475
|
-
```
|
|
1026
|
+
**See comprehensive rules at top of document**: [🚨 CRITICAL: NEVER POLLUTE PROJECT ROOT!](#-critical-never-pollute-project-root)
|
|
476
1027
|
|
|
477
|
-
**
|
|
478
|
-
- ✅
|
|
479
|
-
- ✅
|
|
480
|
-
-
|
|
481
|
-
-
|
|
1028
|
+
**Quick summary**:
|
|
1029
|
+
- ✅ ALL AI-generated files → increment folders (`.specweave/increments/####/reports/`, `logs/`, `scripts/`)
|
|
1030
|
+
- ✅ Architecture decisions → `.specweave/docs/internal/architecture/adr/`
|
|
1031
|
+
- ❌ NEVER create `.md` files, scripts, or logs in project root
|
|
1032
|
+
- ❌ Build artifacts (`.tgz`, `.pt`, etc.) → add to `.gitignore`
|
|
482
1033
|
|
|
483
1034
|
### Runtime Artifacts (NOT Source Controlled)
|
|
484
1035
|
|
|
@@ -508,51 +1059,50 @@ All AI-generated files MUST go into increment folders:
|
|
|
508
1059
|
|
|
509
1060
|
### Making Changes
|
|
510
1061
|
|
|
511
|
-
**
|
|
1062
|
+
**ALL components belong to plugins** (following [Claude Code's plugin system](https://docs.claude.com/en/docs/claude-code/plugins)).
|
|
1063
|
+
|
|
1064
|
+
**1. Editing Skills** (any plugin):
|
|
512
1065
|
```bash
|
|
513
|
-
#
|
|
514
|
-
vim
|
|
1066
|
+
# Core plugin (auto-loaded):
|
|
1067
|
+
vim plugins/specweave/skills/rfc-generator/SKILL.md
|
|
515
1068
|
|
|
516
|
-
#
|
|
517
|
-
|
|
1069
|
+
# Other plugins (opt-in):
|
|
1070
|
+
vim plugins/specweave-github/skills/github-sync/SKILL.md
|
|
518
1071
|
|
|
519
|
-
#
|
|
520
|
-
/context-loader-test
|
|
1072
|
+
# Skills auto-activate based on description keywords
|
|
521
1073
|
```
|
|
522
1074
|
|
|
523
|
-
**2. Agents** (
|
|
1075
|
+
**2. Editing Agents** (any plugin):
|
|
524
1076
|
```bash
|
|
525
|
-
#
|
|
526
|
-
vim
|
|
1077
|
+
# Core plugin (auto-loaded):
|
|
1078
|
+
vim plugins/specweave/agents/pm/AGENT.md
|
|
527
1079
|
|
|
528
|
-
#
|
|
529
|
-
|
|
1080
|
+
# Other plugins (opt-in):
|
|
1081
|
+
vim plugins/specweave-github/agents/github-manager/AGENT.md
|
|
530
1082
|
|
|
531
1083
|
# Test by invoking via Task tool
|
|
532
1084
|
```
|
|
533
1085
|
|
|
534
|
-
**3. Commands** (
|
|
1086
|
+
**3. Editing Commands** (any plugin):
|
|
535
1087
|
```bash
|
|
536
|
-
#
|
|
537
|
-
vim
|
|
1088
|
+
# Core plugin (auto-loaded):
|
|
1089
|
+
vim plugins/specweave/commands/do.md
|
|
538
1090
|
|
|
539
|
-
#
|
|
540
|
-
|
|
1091
|
+
# Other plugins (opt-in):
|
|
1092
|
+
vim plugins/specweave-github/commands/github-sync.md
|
|
541
1093
|
|
|
542
|
-
# Test
|
|
543
|
-
/specweave.do
|
|
1094
|
+
# Test via /command-name
|
|
544
1095
|
```
|
|
545
1096
|
|
|
546
|
-
**4.
|
|
1097
|
+
**4. Creating New Plugins** (see "Plugins" section below for complete instructions)
|
|
1098
|
+
|
|
1099
|
+
**5. Editing Framework Code** (`src/core/`, `src/cli/`):
|
|
547
1100
|
```bash
|
|
548
|
-
# Edit TypeScript
|
|
1101
|
+
# Edit TypeScript (config manager, plugin loader, etc.)
|
|
549
1102
|
vim src/core/config-manager.ts
|
|
550
1103
|
|
|
551
|
-
# Build
|
|
552
|
-
npm run build
|
|
553
|
-
|
|
554
|
-
# Test
|
|
555
|
-
npm test
|
|
1104
|
+
# Build and test
|
|
1105
|
+
npm run build && npm test
|
|
556
1106
|
```
|
|
557
1107
|
|
|
558
1108
|
### Testing Strategy
|
|
@@ -567,10 +1117,10 @@ npm test
|
|
|
567
1117
|
- Test coverage plans per increment
|
|
568
1118
|
- TC-XXXX test case IDs
|
|
569
1119
|
|
|
570
|
-
3. **Skill Tests** (`
|
|
571
|
-
-
|
|
1120
|
+
3. **Skill Tests** (`tests/specs/{skill-name}/` or `tests/integration/{skill-name}/`)
|
|
1121
|
+
- Test cases for skill functionality
|
|
572
1122
|
- Minimum 3 test cases per skill
|
|
573
|
-
- Run via: `npm run test:
|
|
1123
|
+
- Run via: `npm run test:integration`
|
|
574
1124
|
|
|
575
1125
|
4. **Code Tests** (`tests/`)
|
|
576
1126
|
- **E2E (Playwright)**: MANDATORY for UI features
|
|
@@ -590,339 +1140,182 @@ npm test
|
|
|
590
1140
|
|
|
591
1141
|
### Hooks and Automation
|
|
592
1142
|
|
|
593
|
-
**Post-Task Completion Hook** (`.claude/hooks/post-task-completion.sh`):
|
|
594
|
-
|
|
595
|
-
-
|
|
596
|
-
- ✅
|
|
1143
|
+
**Post-Task Completion Hook v2.0** (`.claude/hooks/post-task-completion.sh`):
|
|
1144
|
+
|
|
1145
|
+
**Smart Session-End Detection**:
|
|
1146
|
+
- ✅ Tracks inactivity gaps between TodoWrite calls
|
|
1147
|
+
- ✅ Only plays sound when session is TRULY ending (15s+ inactivity after all tasks complete)
|
|
1148
|
+
- ✅ Skips sound during rapid work (Claude creating multiple todo lists)
|
|
1149
|
+
- ✅ Enhanced logging with decision reasoning in `.specweave/logs/hooks-debug.log`
|
|
1150
|
+
- ✅ Debouncing prevents duplicate hook fires
|
|
1151
|
+
|
|
1152
|
+
**How It Works**:
|
|
1153
|
+
```
|
|
1154
|
+
Problem: Claude creates multiple todo lists in one conversation
|
|
1155
|
+
- List 1: [A, B, C] → completes → sound plays ❌
|
|
1156
|
+
- List 2: [D, E] → completes 30s later → sound plays again ❌
|
|
1157
|
+
- User hears sounds while Claude is still working!
|
|
1158
|
+
|
|
1159
|
+
Solution: Inactivity-based detection
|
|
1160
|
+
- 10:00:00 - Task done (gap: 5s) → skip sound
|
|
1161
|
+
- 10:00:05 - Task done (gap: 5s) → skip sound
|
|
1162
|
+
- 10:00:10 - All done (gap: 5s) → skip sound (rapid work)
|
|
1163
|
+
- ... (15+ seconds pass)
|
|
1164
|
+
- 10:01:00 - All done (gap: 50s) → PLAY SOUND! ✅ (session ending)
|
|
1165
|
+
```
|
|
1166
|
+
|
|
1167
|
+
**Configuration** (`src/hooks/post-task-completion.sh`):
|
|
1168
|
+
- `INACTIVITY_THRESHOLD=15` - Seconds of inactivity to assume session ending (adjustable)
|
|
1169
|
+
- `DEBOUNCE_SECONDS=2` - Prevents duplicate hook fires
|
|
597
1170
|
|
|
598
1171
|
**Manual Actions** (Claude MUST do after each task):
|
|
599
1172
|
- Update `CLAUDE.md` when structure changes
|
|
600
1173
|
- Update `README.md` for user-facing changes
|
|
601
1174
|
- Update `CHANGELOG.md` for API changes
|
|
602
1175
|
|
|
603
|
-
**Living Docs Sync** (after `/specweave
|
|
604
|
-
- Run `/sync-docs update`
|
|
1176
|
+
**Living Docs Sync** (after `/specweave:do` completes):
|
|
1177
|
+
- Run `/specweave:sync-docs update`
|
|
605
1178
|
- Updates `.specweave/docs/` with implementation learnings
|
|
606
1179
|
- Updates ADRs from Proposed → Accepted
|
|
607
1180
|
|
|
608
1181
|
---
|
|
609
1182
|
|
|
610
|
-
##
|
|
1183
|
+
## Plugins
|
|
611
1184
|
|
|
612
|
-
|
|
1185
|
+
**SpecWeave is built 100% on [Claude Code's native plugin system](https://docs.claude.com/en/docs/claude-code/plugins)**.
|
|
613
1186
|
|
|
614
|
-
|
|
615
|
-
- Reduces context usage by 60-80%
|
|
616
|
-
- Enables community contributions
|
|
617
|
-
- Maintains multi-tool support (Claude, Cursor, Copilot, Generic)
|
|
618
|
-
- Preserves Claude Code's native advantages
|
|
1187
|
+
### Architecture: Everything is a Plugin
|
|
619
1188
|
|
|
620
|
-
|
|
1189
|
+
**Critical Understanding**: SpecWeave doesn't have a "core framework" separate from plugins. Instead:
|
|
621
1190
|
|
|
622
1191
|
```
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
├─ Automated via hooks (living docs)? → CORE
|
|
629
|
-
└─ Nice-to-have but not essential? → PLUGIN
|
|
1192
|
+
SpecWeave = Collection of Claude Code Plugins
|
|
1193
|
+
├── specweave (auto-loaded) ← The "framework" IS a plugin
|
|
1194
|
+
├── specweave-github (opt-in)
|
|
1195
|
+
├── specweave-figma (opt-in)
|
|
1196
|
+
└── ...all other plugins (opt-in)
|
|
630
1197
|
```
|
|
631
1198
|
|
|
632
|
-
|
|
1199
|
+
**What this means**:
|
|
1200
|
+
- ✅ `specweave` is a Claude Code plugin (happens to auto-load)
|
|
1201
|
+
- ✅ All plugins follow identical structure (`.claude-plugin/plugin.json`, `skills/`, `agents/`, `commands/`)
|
|
1202
|
+
- ✅ Adding a skill = adding it to a plugin (always)
|
|
1203
|
+
- ❌ There are NO "core framework components" outside plugins
|
|
633
1204
|
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
│ ├── k8s-deployer/
|
|
640
|
-
│ │ ├── SKILL.md
|
|
641
|
-
│ │ └── test-cases/
|
|
642
|
-
│ ├── helm-manager/
|
|
643
|
-
│ └── k8s-troubleshooter/
|
|
644
|
-
├── agents/
|
|
645
|
-
│ └── devops/
|
|
646
|
-
│ └── AGENT.md
|
|
647
|
-
├── commands/
|
|
648
|
-
│ └── k8s-deploy.md
|
|
649
|
-
└── README.md
|
|
650
|
-
```
|
|
1205
|
+
**Why this matters**:
|
|
1206
|
+
- Uniform architecture (no special cases)
|
|
1207
|
+
- All plugins discoverable via Claude Code's plugin system
|
|
1208
|
+
- Easy to extend (just add another plugin)
|
|
1209
|
+
- Future-proof (follows Anthropic's standards)
|
|
651
1210
|
|
|
652
|
-
|
|
1211
|
+
**Further reading**:
|
|
1212
|
+
- 📖 [Claude Code Plugin Docs](https://docs.claude.com/en/docs/claude-code/plugins)
|
|
1213
|
+
- 📖 [Plugin Reference](https://docs.claude.com/en/docs/claude-code/plugins-reference)
|
|
1214
|
+
- 📖 [Plugin Marketplaces](https://docs.claude.com/en/docs/claude-code/plugin-marketplaces)
|
|
653
1215
|
|
|
654
|
-
|
|
655
|
-
{
|
|
656
|
-
"name": "specweave-kubernetes",
|
|
657
|
-
"version": "1.0.0",
|
|
658
|
-
"description": "Kubernetes deployment and management",
|
|
659
|
-
"author": "SpecWeave Team",
|
|
660
|
-
"license": "MIT",
|
|
661
|
-
"specweave_core_version": ">=0.4.0",
|
|
662
|
-
|
|
663
|
-
"auto_detect": {
|
|
664
|
-
"files": ["kubernetes/", "k8s/", "helm/"],
|
|
665
|
-
"packages": ["@kubernetes/client-node"],
|
|
666
|
-
"env_vars": ["KUBECONFIG"]
|
|
667
|
-
},
|
|
668
|
-
|
|
669
|
-
"provides": {
|
|
670
|
-
"skills": ["k8s-deployer", "helm-manager", "k8s-troubleshooter"],
|
|
671
|
-
"agents": ["devops"],
|
|
672
|
-
"commands": ["specweave.k8s.deploy"]
|
|
673
|
-
},
|
|
674
|
-
|
|
675
|
-
"triggers": ["kubernetes", "k8s", "kubectl", "helm", "pod", "deployment"]
|
|
676
|
-
}
|
|
677
|
-
```
|
|
1216
|
+
### Available SpecWeave Plugins
|
|
678
1217
|
|
|
679
|
-
|
|
1218
|
+
**Location**: `plugins/` (root level)
|
|
680
1219
|
|
|
681
|
-
**
|
|
682
|
-
-
|
|
683
|
-
-
|
|
684
|
-
-
|
|
685
|
-
- Quality: ⭐⭐⭐⭐⭐ (100%)
|
|
1220
|
+
**Discovery**:
|
|
1221
|
+
- Browse all plugins: `ls plugins/` or check [.claude-plugin/marketplace.json](/.claude-plugin/marketplace.json)
|
|
1222
|
+
- Live catalog: See `.claude-plugin/README.md` for current marketplace contents
|
|
1223
|
+
- Auto-detection during `specweave init` suggests relevant plugins
|
|
686
1224
|
|
|
687
|
-
**
|
|
688
|
-
|
|
689
|
-
-
|
|
690
|
-
-
|
|
691
|
-
-
|
|
1225
|
+
**Plugin Structure** (all follow same pattern):
|
|
1226
|
+
```
|
|
1227
|
+
plugins/specweave-{name}/
|
|
1228
|
+
├── .claude-plugin/plugin.json # Claude native manifest
|
|
1229
|
+
├── skills/ # Auto-activating capabilities (SKILL.md files)
|
|
1230
|
+
├── agents/ # Specialized AI agents (AGENT.md files)
|
|
1231
|
+
├── commands/ # Slash commands (.md files)
|
|
1232
|
+
└── lib/ # TypeScript utilities (optional)
|
|
1233
|
+
```
|
|
692
1234
|
|
|
693
|
-
**
|
|
694
|
-
-
|
|
695
|
-
-
|
|
696
|
-
-
|
|
1235
|
+
**Key Plugins** (for reference):
|
|
1236
|
+
- `specweave` - Framework essentials (always loaded)
|
|
1237
|
+
- `specweave-github` - GitHub Issues integration
|
|
1238
|
+
- `specweave-{frontend|backend|infrastructure}` - Tech stack plugins
|
|
697
1239
|
|
|
698
|
-
**
|
|
699
|
-
- Appends plugin to `SPECWEAVE-MANUAL.md`
|
|
700
|
-
- User copy-pastes relevant sections
|
|
701
|
-
- Quality: ⭐⭐ (40%)
|
|
1240
|
+
**For complete list**: Check `plugins/` directory or marketplace.json
|
|
702
1241
|
|
|
703
|
-
###
|
|
1242
|
+
### Plugin Decision Tree
|
|
704
1243
|
|
|
705
|
-
|
|
706
|
-
- Scans `package.json`, directories, env vars
|
|
707
|
-
- Suggests plugins: "Found React. Enable frontend-stack? (Y/n)"
|
|
1244
|
+
**Key Insight**: In Claude Code's plugin system, EVERYTHING is a plugin. The only question is: **Which plugin does this belong to?**
|
|
708
1245
|
|
|
709
|
-
|
|
710
|
-
- Analyzes increment description for keywords
|
|
711
|
-
- Suggests before creating spec: "This needs kubernetes plugin. Enable? (Y/n)"
|
|
1246
|
+
**Decision**: Which plugin should contain this feature?
|
|
712
1247
|
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
1248
|
+
```
|
|
1249
|
+
Is this feature...
|
|
1250
|
+
├─ Used by EVERY project? → specweave (auto-loaded)
|
|
1251
|
+
│ Examples: increment-planner, rfc-generator, tdd-workflow, PM/Architect agents
|
|
1252
|
+
│
|
|
1253
|
+
├─ Part of increment lifecycle? → specweave (auto-loaded)
|
|
1254
|
+
│ Examples: /specweave:inc, /specweave:do, living docs hooks
|
|
1255
|
+
│
|
|
1256
|
+
├─ Tech stack specific? → New plugin: specweave-{stack}
|
|
1257
|
+
│ Examples: specweave-frontend (React, Next.js), specweave-kubernetes
|
|
1258
|
+
│
|
|
1259
|
+
├─ Domain expertise? → New plugin: specweave-{domain}
|
|
1260
|
+
│ Examples: specweave-ml (TensorFlow), specweave-payments (Stripe)
|
|
1261
|
+
│
|
|
1262
|
+
├─ External integration? → New plugin: specweave-{tool}
|
|
1263
|
+
│ Examples: specweave-github, specweave-jira, specweave-figma
|
|
1264
|
+
│
|
|
1265
|
+
└─ Optional enhancement? → New plugin: specweave-{feature}
|
|
1266
|
+
Examples: specweave-diagrams, specweave-cost-optimizer
|
|
1267
|
+
```
|
|
716
1268
|
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
1269
|
+
**Plugin Structure** (all follow Claude Code's standard):
|
|
1270
|
+
```
|
|
1271
|
+
plugins/specweave-{name}/
|
|
1272
|
+
├── .claude-plugin/plugin.json # Required
|
|
1273
|
+
├── skills/ # Optional
|
|
1274
|
+
├── agents/ # Optional
|
|
1275
|
+
├── commands/ # Optional
|
|
1276
|
+
└── hooks/ # Optional
|
|
1277
|
+
```
|
|
720
1278
|
|
|
721
|
-
|
|
1279
|
+
**Result**: Core plugin stayed at ~12K tokens (75% smaller than v0.3.7!)
|
|
722
1280
|
|
|
723
|
-
|
|
1281
|
+
### Adding a New Plugin (Contributors)
|
|
724
1282
|
|
|
1283
|
+
**Create New Plugin**:
|
|
725
1284
|
```bash
|
|
726
|
-
# 1. Create structure
|
|
727
|
-
mkdir -p
|
|
1285
|
+
# 1. Create plugin structure
|
|
1286
|
+
mkdir -p plugins/specweave-myplugin/{.claude-plugin,skills,agents,commands,lib}
|
|
728
1287
|
|
|
729
|
-
# 2. Create
|
|
730
|
-
cat >
|
|
1288
|
+
# 2. Create plugin.json (Claude native format)
|
|
1289
|
+
cat > plugins/specweave-myplugin/.claude-plugin/plugin.json << 'EOF'
|
|
731
1290
|
{
|
|
732
|
-
"name": "specweave-
|
|
1291
|
+
"name": "specweave-myplugin",
|
|
1292
|
+
"description": "What it does and when to use it",
|
|
733
1293
|
"version": "1.0.0",
|
|
734
|
-
"
|
|
735
|
-
"provides": {
|
|
736
|
-
"skills": ["skill-name"],
|
|
737
|
-
"agents": ["agent-name"],
|
|
738
|
-
"commands": ["command-name"]
|
|
739
|
-
},
|
|
740
|
-
"triggers": ["keyword1", "keyword2"]
|
|
1294
|
+
"author": {"name": "Your Name"}
|
|
741
1295
|
}
|
|
742
1296
|
EOF
|
|
743
1297
|
|
|
744
|
-
# 3. Add
|
|
745
|
-
|
|
746
|
-
#
|
|
747
|
-
|
|
1298
|
+
# 3. Add components (see Claude docs for format):
|
|
1299
|
+
# - skills/my-skill/SKILL.md
|
|
1300
|
+
# - agents/my-agent/AGENT.md
|
|
1301
|
+
# - commands/my-command.md
|
|
1302
|
+
# - lib/my-utility.ts (optional)
|
|
1303
|
+
|
|
1304
|
+
# 4. Add to marketplace
|
|
1305
|
+
vim .claude-plugin/marketplace.json
|
|
1306
|
+
# Add entry:
|
|
1307
|
+
# {
|
|
1308
|
+
# "name": "specweave-myplugin",
|
|
1309
|
+
# "description": "What it does and when to use it",
|
|
1310
|
+
# "source": "../plugins/specweave-myplugin"
|
|
1311
|
+
# }
|
|
1312
|
+
|
|
1313
|
+
# 5. Test locally
|
|
1314
|
+
/plugin marketplace add ./.claude-plugin
|
|
1315
|
+
/plugin install myplugin@marketplace
|
|
748
1316
|
```
|
|
749
1317
|
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
If you fork a community plugin (e.g., from wshobson/agents):
|
|
753
|
-
|
|
754
|
-
```json
|
|
755
|
-
{
|
|
756
|
-
"name": "specweave-observability",
|
|
757
|
-
"version": "1.0.0",
|
|
758
|
-
"description": "Observability & monitoring for SpecWeave",
|
|
759
|
-
|
|
760
|
-
"credits": {
|
|
761
|
-
"based_on": "https://github.com/wshobson/agents/observability-monitoring",
|
|
762
|
-
"original_author": "Seth Hobson",
|
|
763
|
-
"license": "MIT",
|
|
764
|
-
"modifications": [
|
|
765
|
-
"Adapted for SpecWeave increment lifecycle",
|
|
766
|
-
"Added /sync-docs integration",
|
|
767
|
-
"SpecWeave naming conventions"
|
|
768
|
-
]
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
```
|
|
772
|
-
|
|
773
|
-
**Requirements**:
|
|
774
|
-
- ✅ Clear attribution in manifest
|
|
775
|
-
- ✅ Same or compatible open-source license
|
|
776
|
-
- ✅ Document modifications made
|
|
777
|
-
- ✅ Link to upstream prominently
|
|
778
|
-
- ✅ Contribute improvements back (if possible)
|
|
779
|
-
|
|
780
|
-
### Marketplace Publication
|
|
781
|
-
|
|
782
|
-
SpecWeave publishes plugins to **two places**:
|
|
783
|
-
|
|
784
|
-
1. **NPM Package** (primary):
|
|
785
|
-
- Full SpecWeave framework with plugin system
|
|
786
|
-
- `npm install -g specweave`
|
|
787
|
-
|
|
788
|
-
2. **Anthropic Marketplace** (secondary):
|
|
789
|
-
- Individual plugins for standalone use
|
|
790
|
-
- `/plugin marketplace add specweave/marketplace`
|
|
791
|
-
- Works without full framework
|
|
792
|
-
|
|
793
|
-
**Publishing a Plugin to Marketplace**:
|
|
794
|
-
|
|
795
|
-
```bash
|
|
796
|
-
# 1. Copy plugin to marketplace repo
|
|
797
|
-
cp -r src/plugins/kubernetes marketplace/plugins/
|
|
798
|
-
|
|
799
|
-
# 2. Update marketplace manifest
|
|
800
|
-
# marketplace/.claude-plugin/marketplace.json
|
|
801
|
-
|
|
802
|
-
# 3. Tag release
|
|
803
|
-
git tag kubernetes-v1.0.0
|
|
804
|
-
git push --tags
|
|
805
|
-
|
|
806
|
-
# 4. Test installation
|
|
807
|
-
/plugin marketplace add specweave/marketplace
|
|
808
|
-
/plugin install kubernetes
|
|
809
|
-
```
|
|
810
|
-
|
|
811
|
-
---
|
|
812
|
-
|
|
813
|
-
## Current Work (Increment 0004)
|
|
814
|
-
|
|
815
|
-
**Increment**: 0004-plugin-architecture
|
|
816
|
-
**Title**: Plugin Architecture - Modular, Context-Efficient, Multi-Tool Support
|
|
817
|
-
**Status**: ✅ COMPLETE (Foundation + GitHub plugin)
|
|
818
|
-
**Priority**: P0
|
|
819
|
-
**Started**: 2025-10-31
|
|
820
|
-
**Completed**: 2025-10-31
|
|
821
|
-
|
|
822
|
-
**Summary**:
|
|
823
|
-
Successfully implemented modular plugin architecture with 60-80% context reduction, multi-tool support (Claude/Cursor/Copilot/Generic), and production-ready GitHub plugin. Core framework is complete and extensible for future plugins.
|
|
824
|
-
|
|
825
|
-
**Key Achievements**:
|
|
826
|
-
- ✅ **Core Plugin System** (T-001 to T-007):
|
|
827
|
-
- Plugin type definitions (Plugin, PluginManifest, Skill, Agent, Command)
|
|
828
|
-
- JSON Schema validation (plugin-manifest.schema.json, specweave-config.schema.json)
|
|
829
|
-
- PluginLoader (manifest validation, component loading, integrity checks)
|
|
830
|
-
- PluginManager (lifecycle management, dependency resolution, config management)
|
|
831
|
-
- PluginDetector (4-phase detection: init/spec/task/git-diff)
|
|
832
|
-
|
|
833
|
-
- ✅ **Multi-Tool Adapter Support** (T-008 to T-010):
|
|
834
|
-
- Claude adapter: Native `.claude/` installation
|
|
835
|
-
- Cursor adapter: AGENTS.md compilation with HTML markers
|
|
836
|
-
- Copilot adapter: AGENTS.md compilation with HTML markers
|
|
837
|
-
- Generic adapter: AGENTS.md for manual workflows
|
|
838
|
-
|
|
839
|
-
- ✅ **GitHub Plugin** (T-013 to T-022):
|
|
840
|
-
- 2 skills: github-sync, github-issue-tracker
|
|
841
|
-
- 1 agent: github-manager (GitHub CLI specialist)
|
|
842
|
-
- 4 commands: create-issue, sync, close-issue, status
|
|
843
|
-
- Auto-detection: `.git/` + `github.com` remote + `GITHUB_TOKEN`
|
|
844
|
-
- Production-ready manifest with proper dependencies
|
|
845
|
-
|
|
846
|
-
- ✅ **Build & Configuration**:
|
|
847
|
-
- TypeScript compilation successful (all errors resolved)
|
|
848
|
-
- Updated .gitignore for plugin caching
|
|
849
|
-
- Ajv dependency added for JSON Schema validation
|
|
850
|
-
- ESM module compatibility maintained
|
|
851
|
-
|
|
852
|
-
**Context Reduction Achieved**:
|
|
853
|
-
- Basic project: 50K → 12K tokens (76% reduction!)
|
|
854
|
-
- React app: 50K → 16K tokens (68% reduction!)
|
|
855
|
-
- Backend API: 50K → 15K tokens (70% reduction!)
|
|
856
|
-
|
|
857
|
-
**Files Implemented**:
|
|
858
|
-
- `src/core/types/plugin.ts` - Complete type system
|
|
859
|
-
- `src/core/schemas/plugin-manifest.schema.json` - Manifest validation
|
|
860
|
-
- `src/core/schemas/specweave-config.schema.json` - Config validation
|
|
861
|
-
- `src/core/plugin-loader.ts` - Plugin loading & validation
|
|
862
|
-
- `src/core/plugin-manager.ts` - Lifecycle & dependency management
|
|
863
|
-
- `src/core/plugin-detector.ts` - Auto-detection system
|
|
864
|
-
- `src/adapters/*/adapter.ts` - Multi-tool plugin compilation
|
|
865
|
-
- `src/plugins/specweave-github/` - Complete GitHub plugin
|
|
866
|
-
|
|
867
|
-
**Next Steps**:
|
|
868
|
-
1. ✅ Foundation complete - ready for additional plugins!
|
|
869
|
-
2. 🔮 Future plugins (separate increments):
|
|
870
|
-
- specweave-jira (JIRA integration)
|
|
871
|
-
- specweave-ado (Azure DevOps)
|
|
872
|
-
- specweave-frontend-stack (React/Vue/Angular)
|
|
873
|
-
- specweave-backend-stack (Node/Python/.NET)
|
|
874
|
-
|
|
875
|
-
---
|
|
876
|
-
|
|
877
|
-
## Previous Work (Increment 0003)
|
|
878
|
-
|
|
879
|
-
**Increment**: 0003-intelligent-model-selection
|
|
880
|
-
**Title**: Intelligent Model Selection - Automatic Cost Optimization
|
|
881
|
-
**Status**: Planned (just created, ready to implement)
|
|
882
|
-
**Priority**: P1
|
|
883
|
-
**Started**: 2025-10-30
|
|
884
|
-
|
|
885
|
-
**Summary**:
|
|
886
|
-
Implement automatic cost optimization by intelligently routing work to Sonnet 4.5 (planning/analysis) vs Haiku 4.5 (execution), following Anthropic's official guidance. Expected 60-70% cost savings.
|
|
887
|
-
|
|
888
|
-
**Key Features**:
|
|
889
|
-
- ✅ Spec.md created (8 user stories, complete product requirements)
|
|
890
|
-
- ✅ Plan.md created (comprehensive technical architecture)
|
|
891
|
-
- ✅ Tasks.md created (22 implementation tasks)
|
|
892
|
-
- ✅ Tests.md created (100+ test cases, quality validation)
|
|
893
|
-
|
|
894
|
-
**Three-Layer System**:
|
|
895
|
-
1. **Agent Model Preferences** - Each agent declares optimal model (Sonnet/Haiku/Auto)
|
|
896
|
-
2. **Phase Detection** - Analyze user intent to detect planning vs execution
|
|
897
|
-
3. **Cost Tracking** - Real-time cost visibility with savings calculations
|
|
898
|
-
|
|
899
|
-
**Files to Focus On**:
|
|
900
|
-
- `.specweave/increments/0003-intelligent-model-selection/spec.md`
|
|
901
|
-
- `.specweave/increments/0003-intelligent-model-selection/plan.md`
|
|
902
|
-
- `.specweave/increments/0003-intelligent-model-selection/tasks.md`
|
|
903
|
-
- `.specweave/increments/0003-intelligent-model-selection/tests.md`
|
|
904
|
-
|
|
905
|
-
**Next Steps**:
|
|
906
|
-
1. Execute Task T-001: Create type definitions
|
|
907
|
-
2. Execute Task T-002: Create pricing constants
|
|
908
|
-
3. Execute Task T-003: Implement AgentModelManager
|
|
909
|
-
4. Continue through all 22 tasks
|
|
910
|
-
|
|
911
|
-
---
|
|
912
|
-
|
|
913
|
-
## Previous Work (Increment 0002)
|
|
914
|
-
|
|
915
|
-
**Increment**: 0002-core-enhancements
|
|
916
|
-
**Title**: Core Framework Enhancements - Multi-Tool Support & Diagram Agents
|
|
917
|
-
**Status**: Completed (testing phase)
|
|
918
|
-
**Priority**: P1
|
|
919
|
-
**Started**: 2025-10-27
|
|
920
|
-
|
|
921
|
-
**Key Achievements**:
|
|
922
|
-
- ✅ Migrated commands to dot notation (`specweave.xxx`)
|
|
923
|
-
- ✅ Diagram generation agents (C4, Sequence, ER)
|
|
924
|
-
- ✅ Fixed context documentation
|
|
925
|
-
- ✅ Corrected ADR-0002 (context loading architecture)
|
|
1318
|
+
**See**: [.claude-plugin/README.md](/.claude-plugin/README.md) for marketplace documentation
|
|
926
1319
|
|
|
927
1320
|
---
|
|
928
1321
|
|
|
@@ -946,7 +1339,7 @@ Implement automatic cost optimization by intelligently routing work to Sonnet 4.
|
|
|
946
1339
|
|
|
947
1340
|
### 4. Incremental Development
|
|
948
1341
|
- Work in small, measurable increments
|
|
949
|
-
- Use SpecWeave's own workflow (`/specweave
|
|
1342
|
+
- Use SpecWeave's own workflow (`/specweave:inc`, `/specweave:do`, etc.)
|
|
950
1343
|
- All work traces back to specs
|
|
951
1344
|
|
|
952
1345
|
### 5. Adapter-First Design
|
|
@@ -985,94 +1378,44 @@ git push origin develop --tags
|
|
|
985
1378
|
|
|
986
1379
|
---
|
|
987
1380
|
|
|
988
|
-
## Adapter System
|
|
989
|
-
|
|
990
|
-
SpecWeave supports multiple AI coding tools via adapters:
|
|
991
|
-
|
|
992
|
-
**Supported Tools**:
|
|
993
|
-
- ✅ Claude Code (best-in-class, native support)
|
|
994
|
-
- ✅ Cursor (via `.cursorrules` + Markdown commands)
|
|
995
|
-
- ✅ GitHub Copilot (via `.github/copilot/instructions.md`)
|
|
996
|
-
- ⏳ Generic (Markdown-only, for ChatGPT/Gemini/etc.)
|
|
997
|
-
- 🔮 Windsurf (planned)
|
|
998
|
-
|
|
999
|
-
**Adapter Pattern**:
|
|
1000
|
-
```
|
|
1001
|
-
src/adapters/
|
|
1002
|
-
├── claude/ # Claude Code native (slash commands, agents)
|
|
1003
|
-
│ ├── adapter.ts
|
|
1004
|
-
│ └── README.md
|
|
1005
|
-
├── cursor/ # Cursor (.cursorrules)
|
|
1006
|
-
│ ├── adapter.ts
|
|
1007
|
-
│ └── README.md
|
|
1008
|
-
├── copilot/ # GitHub Copilot (instructions.md)
|
|
1009
|
-
│ ├── adapter.ts
|
|
1010
|
-
│ └── README.md
|
|
1011
|
-
└── generic/ # Generic Markdown (all others)
|
|
1012
|
-
├── adapter.ts
|
|
1013
|
-
└── SPECWEAVE-MANUAL.md
|
|
1014
|
-
```
|
|
1015
|
-
|
|
1016
|
-
**Auto-Detection**:
|
|
1017
|
-
- Detects user's AI tool during `specweave init`
|
|
1018
|
-
- Installs appropriate adapter
|
|
1019
|
-
- Falls back to generic if unknown
|
|
1020
|
-
|
|
1021
|
-
---
|
|
1022
|
-
|
|
1023
|
-
## Common Tasks
|
|
1381
|
+
## Adapter System (Legacy)
|
|
1024
1382
|
|
|
1025
|
-
|
|
1383
|
+
**SpecWeave is Claude Code-first** - The framework is designed specifically for Claude Code's native capabilities.
|
|
1026
1384
|
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
mkdir -p src/skills/my-new-skill/test-cases
|
|
1385
|
+
**Primary Tool**:
|
|
1386
|
+
- ✅ **Claude Code** - Native support (slash commands, agents, skills, hooks, MCP)
|
|
1030
1387
|
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
description: What it does and when to activate
|
|
1036
|
-
---
|
|
1388
|
+
**Legacy Multi-Tool Support** (may be removed):
|
|
1389
|
+
- ⚠️ Cursor (via `.cursorrules` + AGENTS.md compilation)
|
|
1390
|
+
- ⚠️ GitHub Copilot (via `.github/copilot/instructions.md`)
|
|
1391
|
+
- ⚠️ Generic (Markdown-only, for ChatGPT/Gemini/etc.)
|
|
1037
1392
|
|
|
1038
|
-
|
|
1393
|
+
**Why Claude-First?**
|
|
1394
|
+
The adapter system was originally designed to support multiple tools, but this added significant complexity without meaningful benefit. Claude Code provides:
|
|
1395
|
+
- ✅ **Native plugin marketplace** - No compilation needed
|
|
1396
|
+
- ✅ **Auto-activating skills** - No manual @ mentions
|
|
1397
|
+
- ✅ **Isolated agent contexts** - True role separation
|
|
1398
|
+
- ✅ **Pre/post lifecycle hooks** - Automated living docs sync
|
|
1399
|
+
- ✅ **MCP protocol** - Industry standard for context management
|
|
1039
1400
|
|
|
1040
|
-
|
|
1041
|
-
EOF
|
|
1401
|
+
Other tools simply can't match these capabilities. The adapters remain in the codebase for now but are considered legacy and may be removed in a future version.
|
|
1042
1402
|
|
|
1043
|
-
|
|
1044
|
-
vim src/skills/my-new-skill/test-cases/test-1-basic.yaml
|
|
1403
|
+
**See**: "Why Claude Code is Best-in-Class" section above for detailed comparison
|
|
1045
1404
|
|
|
1046
|
-
# 4. Install locally
|
|
1047
|
-
npm run install:skills
|
|
1048
|
-
|
|
1049
|
-
# 5. Test
|
|
1050
|
-
# Ask Claude something that matches the skill's description
|
|
1051
|
-
```
|
|
1052
|
-
|
|
1053
|
-
### Add a New Command
|
|
1054
|
-
|
|
1055
|
-
```bash
|
|
1056
|
-
# 1. Create command file
|
|
1057
|
-
cat > src/commands/specweave.newcmd.md << 'EOF'
|
|
1058
|
-
---
|
|
1059
|
-
name: newcmd
|
|
1060
|
-
description: Short description
|
|
1061
1405
|
---
|
|
1062
1406
|
|
|
1063
|
-
|
|
1407
|
+
## Common Tasks
|
|
1064
1408
|
|
|
1065
|
-
|
|
1066
|
-
EOF
|
|
1409
|
+
### Adding Skills, Agents, or Commands
|
|
1067
1410
|
|
|
1068
|
-
|
|
1069
|
-
npm run install:all
|
|
1411
|
+
**All components go into plugins** (see "Plugins" section above for complete instructions).
|
|
1070
1412
|
|
|
1071
|
-
|
|
1072
|
-
/specweave
|
|
1413
|
+
**Quick reference**:
|
|
1414
|
+
- **Core components**: `plugins/specweave/{skills|agents|commands|hooks}/`
|
|
1415
|
+
- **Plugin components**: `plugins/specweave-{name}/{skills|agents|commands}/`
|
|
1416
|
+
- **Tests**: `tests/integration/{component-name}/` or `tests/unit/`
|
|
1073
1417
|
|
|
1074
|
-
|
|
1075
|
-
```
|
|
1418
|
+
**For detailed instructions**: See "Adding a New Plugin (Contributors)" section above (line ~1250)
|
|
1076
1419
|
|
|
1077
1420
|
### Update Documentation
|
|
1078
1421
|
|
|
@@ -1138,12 +1481,12 @@ cd docs-site && npm run build
|
|
|
1138
1481
|
## Quick Reference
|
|
1139
1482
|
|
|
1140
1483
|
**Commands (for SpecWeave development)**:
|
|
1141
|
-
- `/specweave
|
|
1142
|
-
- `/specweave
|
|
1143
|
-
- `/specweave
|
|
1144
|
-
- `/specweave
|
|
1145
|
-
- `/specweave
|
|
1146
|
-
- `/sync-docs update` - Sync living docs
|
|
1484
|
+
- `/specweave:inc "feature"` - Plan new increment
|
|
1485
|
+
- `/specweave:do` - Execute tasks (smart resume)
|
|
1486
|
+
- `/specweave:progress` - Check status
|
|
1487
|
+
- `/specweave:validate 0002` - Validate increment
|
|
1488
|
+
- `/specweave:done 0002` - Close increment
|
|
1489
|
+
- `/specweave:sync-docs update` - Sync living docs
|
|
1147
1490
|
|
|
1148
1491
|
**Build & Test**:
|
|
1149
1492
|
- `npm run build` - Compile TypeScript
|