specweave 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/README.md +325 -0
- package/.claude-plugin/marketplace.json +210 -0
- package/CLAUDE.md +1000 -252
- package/README.md +273 -180
- 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 +18 -0
- package/dist/adapters/adapter-base.d.ts +21 -0
- package/dist/adapters/adapter-base.d.ts.map +1 -1
- package/dist/adapters/adapter-base.js +28 -0
- package/dist/adapters/adapter-base.js.map +1 -1
- package/dist/adapters/adapter-interface.d.ts +41 -0
- package/dist/adapters/adapter-interface.d.ts.map +1 -1
- package/dist/adapters/claude/adapter.d.ts +85 -11
- package/dist/adapters/claude/adapter.d.ts.map +1 -1
- package/dist/adapters/claude/adapter.js +305 -37
- package/dist/adapters/claude/adapter.js.map +1 -1
- package/dist/adapters/copilot/adapter.d.ts +45 -2
- package/dist/adapters/copilot/adapter.d.ts.map +1 -1
- package/dist/adapters/copilot/adapter.js +226 -4
- package/dist/adapters/copilot/adapter.js.map +1 -1
- package/dist/adapters/cursor/adapter.d.ts +54 -0
- package/dist/adapters/cursor/adapter.d.ts.map +1 -1
- package/dist/adapters/cursor/adapter.js +192 -0
- package/dist/adapters/cursor/adapter.js.map +1 -1
- package/dist/adapters/generic/adapter.d.ts +43 -0
- package/dist/adapters/generic/adapter.d.ts.map +1 -1
- package/dist/adapters/generic/adapter.js +163 -0
- 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 +392 -123
- 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 +43 -0
- package/dist/cli/commands/plugin.d.ts.map +1 -0
- package/dist/cli/commands/plugin.js +307 -0
- package/dist/cli/commands/plugin.js.map +1 -0
- 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-detector.d.ts +96 -0
- package/dist/core/plugin-detector.d.ts.map +1 -0
- package/dist/core/plugin-detector.js +349 -0
- package/dist/core/plugin-detector.js.map +1 -0
- package/dist/core/plugin-loader.d.ts +131 -0
- package/dist/core/plugin-loader.d.ts.map +1 -0
- package/dist/core/plugin-loader.js +421 -0
- package/dist/core/plugin-loader.js.map +1 -0
- package/dist/core/plugin-manager.d.ts +144 -0
- package/dist/core/plugin-manager.d.ts.map +1 -0
- package/dist/core/plugin-manager.js +393 -0
- package/dist/core/plugin-manager.js.map +1 -0
- package/dist/core/schemas/plugin-manifest.schema.json +253 -0
- 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 +283 -0
- package/dist/core/types/plugin.d.ts.map +1 -0
- package/dist/core/types/plugin.js +49 -0
- package/dist/core/types/plugin.js.map +1 -0
- 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.d.ts +2 -2
- package/dist/integrations/jira/jira-mapper.js +2 -2
- 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 +269 -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/generate-skills-index.js +4 -4
- package/dist/utils/generate-skills-index.js.map +1 -1
- package/package.json +24 -21
- 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-core/.claude-plugin/plugin.json +25 -0
- package/{src → plugins/specweave-core}/agents/pm/AGENT.md +80 -0
- package/plugins/specweave-core/agents/translator/AGENT.md +282 -0
- package/{src → plugins/specweave-core}/commands/README.md +11 -11
- package/{src → plugins/specweave-core}/commands/specweave.costs.md +7 -7
- package/{src → plugins/specweave-core}/commands/specweave.do.md +34 -7
- package/{src → plugins/specweave-core}/commands/specweave.increment.md +131 -22
- package/{src → plugins/specweave-core}/commands/specweave.md +49 -17
- package/{src → plugins/specweave-core}/commands/specweave.sync-docs.md +5 -5
- package/plugins/specweave-core/commands/specweave.translate.md +425 -0
- package/{src → plugins/specweave-core}/commands/specweave.validate.md +1 -1
- package/plugins/specweave-core/hooks/hooks.json +13 -0
- package/plugins/specweave-core/hooks/post-increment-plugin-detect.sh +142 -0
- package/plugins/specweave-core/hooks/post-task-completion.sh +265 -0
- package/plugins/specweave-core/hooks/pre-task-plugin-detect.sh +96 -0
- package/plugins/specweave-core/skills/SKILLS-INDEX.md +229 -0
- package/{src → plugins/specweave-core}/skills/brownfield-analyzer/SKILL.md +66 -24
- package/{src → plugins/specweave-core}/skills/context-loader/SKILL.md +1 -1
- package/plugins/specweave-core/skills/context-optimizer/SKILL.md +588 -0
- package/plugins/specweave-core/skills/docs-updater/SKILL.md +0 -0
- package/{src → plugins/specweave-core}/skills/increment-planner/SKILL.md +81 -4
- package/plugins/specweave-core/skills/plugin-detector/SKILL.md +211 -0
- package/{src → plugins/specweave-core}/skills/project-kickstarter/SKILL.md +7 -7
- package/plugins/specweave-core/skills/rfc-generator/SKILL.md +369 -0
- package/{src → plugins/specweave-core}/skills/specweave-detector/SKILL.md +2 -2
- package/plugins/specweave-core/skills/specweave-framework/SKILL.md +498 -0
- package/plugins/specweave-core/skills/specweave-framework/test-cases/test-1-increment-naming.yaml +11 -0
- package/plugins/specweave-core/skills/specweave-framework/test-cases/test-2-source-of-truth.yaml +11 -0
- package/plugins/specweave-core/skills/specweave-framework/test-cases/test-3-increment-discipline.yaml +12 -0
- package/plugins/specweave-core/skills/specweave-framework/test-cases/test-4-file-placement.yaml +11 -0
- package/{src → plugins/specweave-core}/skills/tdd-workflow/SKILL.md +20 -20
- package/plugins/specweave-core/skills/translator/SKILL.md +172 -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 +8 -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 +39 -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 +106 -0
- package/plugins/specweave-ui/.mcp.json +14 -0
- package/plugins/specweave-ui/README.md +386 -0
- package/src/adapters/adapter-base.ts +33 -0
- package/src/adapters/adapter-interface.ts +46 -0
- package/src/adapters/claude/adapter.ts +350 -39
- package/src/adapters/copilot/adapter.ts +267 -4
- package/src/adapters/cursor/adapter.ts +229 -0
- package/src/adapters/generic/adapter.ts +196 -0
- 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 -79
- package/src/skills/SKILLS-INDEX.md +0 -444
- package/src/skills/github-sync/SKILL.md +0 -234
- /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-core}/agents/architect/AGENT.md +0 -0
- /package/{src → plugins/specweave-core}/agents/code-reviewer.md +0 -0
- /package/{src → plugins/specweave-core}/agents/docs-writer/AGENT.md +0 -0
- /package/{src → plugins/specweave-core}/agents/performance/AGENT.md +0 -0
- /package/{src → plugins/specweave-core}/agents/qa-lead/AGENT.md +0 -0
- /package/{src → plugins/specweave-core}/agents/security/AGENT.md +0 -0
- /package/{src → plugins/specweave-core}/agents/tdd-orchestrator/AGENT.md +0 -0
- /package/{src → plugins/specweave-core}/agents/tech-lead/AGENT.md +0 -0
- /package/{src → plugins/specweave-core}/commands/specweave.done.md +0 -0
- /package/{src → plugins/specweave-core}/commands/specweave.inc.md +0 -0
- /package/{src → plugins/specweave-core}/commands/specweave.list-increments.md +0 -0
- /package/{src → plugins/specweave-core}/commands/specweave.next.md +0 -0
- /package/{src → plugins/specweave-core}/commands/specweave.progress.md +0 -0
- /package/{src → plugins/specweave-core}/commands/specweave.tdd-cycle.md +0 -0
- /package/{src → plugins/specweave-core}/commands/specweave.tdd-green.md +0 -0
- /package/{src → plugins/specweave-core}/commands/specweave.tdd-red.md +0 -0
- /package/{src → plugins/specweave-core}/commands/specweave.tdd-refactor.md +0 -0
- /package/{src → plugins/specweave-core}/hooks/README.md +0 -0
- /package/{src → plugins/specweave-core}/hooks/docs-changed.sh +0 -0
- /package/{src → plugins/specweave-core}/hooks/human-input-required.sh +0 -0
- /package/{src → plugins/specweave-core}/hooks/pre-implementation.sh +0 -0
- /package/{src → plugins/specweave-core}/skills/brownfield-onboarder/SKILL.md +0 -0
- /package/{src → plugins/specweave-core}/skills/docs-updater/README.md +0 -0
- /package/{src → plugins/specweave-core}/skills/increment-planner/scripts/feature-utils.js +0 -0
- /package/{src → plugins/specweave-core}/skills/increment-quality-judge/SKILL.md +0 -0
- /package/{src → plugins/specweave-core}/skills/project-kickstarter/test-cases/test-1-high-confidence-full-product.yaml +0 -0
- /package/{src → plugins/specweave-core}/skills/project-kickstarter/test-cases/test-2-medium-confidence-partial.yaml +0 -0
- /package/{src → plugins/specweave-core}/skills/project-kickstarter/test-cases/test-3-low-confidence-technical-question.yaml +0 -0
- /package/{src → plugins/specweave-core}/skills/project-kickstarter/test-cases/test-4-opt-out-explicit.yaml +0 -0
- /package/{src → plugins/specweave-core}/skills/role-orchestrator/README.md +0 -0
- /package/{src → plugins/specweave-core}/skills/role-orchestrator/SKILL.md +0 -0
- /package/{src → plugins/specweave-core}/skills/task-builder/README.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,8 @@
|
|
|
1
1
|
# SpecWeave - Development Guide
|
|
2
2
|
|
|
3
3
|
**Project**: SpecWeave - Spec-Driven Development Framework
|
|
4
|
-
**Version**: 0.
|
|
4
|
+
**Version**: 0.6.0 (LLM-Native i18n Complete! - Ready for Release)
|
|
5
|
+
**NPM Version**: 0.5.1 (Latest Published)
|
|
5
6
|
**Type**: Open Source NPM Package (TypeScript CLI)
|
|
6
7
|
**Repository**: https://github.com/anton-abyzov/specweave
|
|
7
8
|
**Website**: https://spec-weave.com
|
|
@@ -11,26 +12,108 @@ Users receive a different CLAUDE.md via the template system.
|
|
|
11
12
|
|
|
12
13
|
---
|
|
13
14
|
|
|
14
|
-
##
|
|
15
|
+
## 🚨 CRITICAL: NEVER POLLUTE PROJECT ROOT!
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
**Active Branch**: `develop` → merges to `features/001-core-feature`
|
|
18
|
-
**Latest**: v0.3.7 - Fixed Windows installation (defaults to claude instead of generic)
|
|
19
|
-
**Next**: v0.4.0 - Intelligent cost optimization with Haiku 4.5 + Sonnet 4.5
|
|
17
|
+
**⛔ THIS IS THE #1 RULE - VIOLATING THIS WILL GET YOUR PR REJECTED ⛔**
|
|
20
18
|
|
|
21
|
-
**
|
|
22
|
-
```bash
|
|
23
|
-
# 1. Make changes to source files in src/
|
|
24
|
-
# 2. Test locally
|
|
25
|
-
npm run build && npm test
|
|
19
|
+
**ALL AI-generated files MUST go into the CURRENT INCREMENT folder**, NOT in the project root!
|
|
26
20
|
|
|
27
|
-
|
|
28
|
-
/specweave.do # Execute next task
|
|
29
|
-
/specweave.progress # Check status
|
|
21
|
+
### ❌ NEVER Create in Root (Pollutes Repository)
|
|
30
22
|
|
|
31
|
-
# 4. Commit with hooks (auto-validates)
|
|
32
|
-
git add . && git commit -m "feat: description"
|
|
33
23
|
```
|
|
24
|
+
❌ WRONG - ROOT FILES (REJECTED!):
|
|
25
|
+
/PLUGIN-MIGRATION-COMPLETE.md # NO! Goes to increment reports/
|
|
26
|
+
/SESSION-SUMMARY-2025-10-28.md # NO! Goes to increment reports/
|
|
27
|
+
/ADR-006-DEEP-ANALYSIS.md # NO! Goes to .specweave/docs/internal/architecture/adr/
|
|
28
|
+
/ANALYSIS-MULTI-TOOL-COMPARISON.md # NO! Goes to increment reports/
|
|
29
|
+
/migration-helper.sh # NO! Goes to increment scripts/
|
|
30
|
+
/execution.log # NO! Goes to increment logs/
|
|
31
|
+
/specweave-0.5.1.tgz # NO! Build artifact, should be in .gitignore
|
|
32
|
+
/yolov8n.pt # NO! ML model, should be in .gitignore
|
|
33
|
+
|
|
34
|
+
✅ CORRECT - INCREMENT FOLDERS:
|
|
35
|
+
.specweave/increments/0004-plugin-architecture/
|
|
36
|
+
├── spec.md # Spec files (core 4)
|
|
37
|
+
├── plan.md
|
|
38
|
+
├── tasks.md
|
|
39
|
+
├── tests.md
|
|
40
|
+
├── reports/ # ✅ PUT REPORTS HERE!
|
|
41
|
+
│ ├── PLUGIN-MIGRATION-COMPLETE.md # ✅ Completion reports
|
|
42
|
+
│ ├── SESSION-SUMMARY.md # ✅ Session summaries
|
|
43
|
+
│ └── ANALYSIS-*.md # ✅ Analysis files
|
|
44
|
+
├── scripts/ # ✅ PUT SCRIPTS HERE!
|
|
45
|
+
│ └── migration-helper.sh # ✅ Helper scripts
|
|
46
|
+
└── logs/ # ✅ PUT LOGS HERE!
|
|
47
|
+
└── execution.log # ✅ Execution logs
|
|
48
|
+
|
|
49
|
+
.specweave/docs/internal/architecture/ # ✅ PUT ADRS/DIAGRAMS HERE!
|
|
50
|
+
└── adr/
|
|
51
|
+
└── 0006-deep-analysis.md # ✅ Architecture decisions
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Why This Matters
|
|
55
|
+
|
|
56
|
+
- ✅ **Complete traceability** - Know which increment created which files
|
|
57
|
+
- ✅ **Easy cleanup** - Delete increment folder = delete all files
|
|
58
|
+
- ✅ **Clear context** - All files for a feature in one place
|
|
59
|
+
- ✅ **No root clutter** - Project root stays clean and professional
|
|
60
|
+
- ✅ **Better git history** - Changes grouped by increment
|
|
61
|
+
|
|
62
|
+
### What IS Allowed in Root?
|
|
63
|
+
|
|
64
|
+
**ONLY these files belong in root**:
|
|
65
|
+
- ✅ `CLAUDE.md` (this file - contributor guide)
|
|
66
|
+
- ✅ `README.md`, `CHANGELOG.md`, `LICENSE` (project documentation)
|
|
67
|
+
- ✅ `package.json`, `tsconfig.json`, `.gitignore` (config files)
|
|
68
|
+
- ✅ Directories: `src/`, `tests/`, `plugins/`, `.specweave/`, etc. (source code)
|
|
69
|
+
|
|
70
|
+
**Everything else goes in increment folders or `.gitignore`!**
|
|
71
|
+
|
|
72
|
+
### Build Artifacts (Add to .gitignore)
|
|
73
|
+
|
|
74
|
+
These should NEVER be committed:
|
|
75
|
+
- ❌ `*.tgz`, `*.tar.gz` - NPM package archives
|
|
76
|
+
- ❌ `*.pt`, `*.pth` - ML model files (download on demand)
|
|
77
|
+
- ❌ `dist/`, `build/` - Compiled outputs (already in .gitignore)
|
|
78
|
+
- ❌ `*.log` - Log files (already in .gitignore)
|
|
79
|
+
|
|
80
|
+
**Before committing, ALWAYS check**: `git status` - If you see `.md` files in root, MOVE THEM!
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Why Claude Code is Best-in-Class
|
|
85
|
+
|
|
86
|
+
**CRITICAL**: SpecWeave is designed for Claude Code FIRST. Other tools are supported but with reduced capabilities.
|
|
87
|
+
|
|
88
|
+
### Anthropic Sets the Standards
|
|
89
|
+
|
|
90
|
+
Claude Code isn't just another AI coding assistant - **Anthropic defines the industry standards**:
|
|
91
|
+
|
|
92
|
+
1. **MCP (Model Context Protocol)** - Industry standard for context management
|
|
93
|
+
2. **Skills** - Proven pattern for auto-activating capabilities
|
|
94
|
+
3. **Agents** - Proven pattern for role-based, isolated workflows
|
|
95
|
+
4. **Hooks** - Proven pattern for lifecycle automation
|
|
96
|
+
|
|
97
|
+
### Why SpecWeave + Claude Code = 10x Better
|
|
98
|
+
|
|
99
|
+
| Feature | Claude Code (Native) | Cursor 2.0 | Copilot | Generic |
|
|
100
|
+
|---------|---------------------|------------|---------|---------|
|
|
101
|
+
| **Living Docs** | ✅ Auto-sync via hooks | ❌ Manual | ❌ Manual | ❌ Manual |
|
|
102
|
+
| **Skills** | ✅ Auto-activate | 🟡 Must @mention | ❌ None | ❌ None |
|
|
103
|
+
| **Commands** | ✅ Plugin-based `/specweave:*` | 🟡 Team commands | ❌ None | ❌ None |
|
|
104
|
+
| **Hooks** | ✅ Pre/Post lifecycle | ❌ No hooks | ❌ No hooks | ❌ No hooks |
|
|
105
|
+
| **Agents** | ✅ Isolated contexts | 🟡 Shared (8 parallel) | ❌ None | ❌ None |
|
|
106
|
+
| **Context** | ✅ MCP + 60-80% reduction | 🟡 @ shortcuts | ❌ Limited | ❌ None |
|
|
107
|
+
| **Quality** | ⭐⭐⭐⭐⭐ 100% | ⭐⭐⭐⭐ 85% | ⭐⭐⭐ 60% | ⭐⭐ 40% |
|
|
108
|
+
|
|
109
|
+
**Quick Comparison**:
|
|
110
|
+
|
|
111
|
+
**Claude Code** - Full automation with native hooks, MCP protocol, plugin system, isolated agent contexts
|
|
112
|
+
**Cursor 2.0** - Good multi-tool support (AGENTS.md compilation, team commands, @ shortcuts) but no hooks or agent isolation
|
|
113
|
+
**Copilot** - Basic instructions.md support, no automation features
|
|
114
|
+
**Generic** - Manual copy-paste workflow
|
|
115
|
+
|
|
116
|
+
**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.
|
|
34
117
|
|
|
35
118
|
---
|
|
36
119
|
|
|
@@ -57,15 +140,15 @@ git add . && git commit -m "feat: description"
|
|
|
57
140
|
**When Creating Increments**:
|
|
58
141
|
```bash
|
|
59
142
|
# ❌ Wrong
|
|
60
|
-
/specweave
|
|
143
|
+
/specweave:inc "0004"
|
|
61
144
|
|
|
62
145
|
# ✅ Correct
|
|
63
|
-
/specweave
|
|
64
|
-
/specweave
|
|
146
|
+
/specweave:inc "0004-cost-optimization"
|
|
147
|
+
/specweave:inc "0005-github-sync-enhancements"
|
|
65
148
|
```
|
|
66
149
|
|
|
67
150
|
**Enforcement**:
|
|
68
|
-
- `/specweave
|
|
151
|
+
- `/specweave:inc` command validates naming (rejects bare numbers)
|
|
69
152
|
- Code review requirement (descriptive names mandatory)
|
|
70
153
|
- This document serves as the source of truth
|
|
71
154
|
|
|
@@ -77,19 +160,543 @@ git add . && git commit -m "feat: description"
|
|
|
77
160
|
|
|
78
161
|
---
|
|
79
162
|
|
|
80
|
-
##
|
|
163
|
+
## Increment Discipline (v0.6.0+ MANDATORY)
|
|
164
|
+
|
|
165
|
+
**⛔ THE IRON RULE: You CANNOT start increment N+1 until increment N is DONE**
|
|
166
|
+
|
|
167
|
+
This is **NOT negotiable**. It is a **hard enforcement** to prevent chaos, scope creep, and stale documentation.
|
|
168
|
+
|
|
169
|
+
### Why This Rule Exists
|
|
170
|
+
|
|
171
|
+
**The Problem (before v0.6.0)**:
|
|
172
|
+
- Multiple incomplete increments piling up (0002, 0003, 0006 all in progress)
|
|
173
|
+
- No clear source of truth ("which increment are we working on?")
|
|
174
|
+
- Living docs become stale (sync doesn't know what's current)
|
|
175
|
+
- Scope creep (jumping between features without finishing)
|
|
176
|
+
- Quality degradation (tests not run, docs not updated)
|
|
177
|
+
|
|
178
|
+
**The Solution (v0.6.0+)**:
|
|
179
|
+
- ✅ **Hard block** on `/specweave:inc` if previous increments incomplete
|
|
180
|
+
- ✅ **Helper commands** to close increments properly
|
|
181
|
+
- ✅ **Clear guidance** on how to resolve incomplete work
|
|
182
|
+
- ✅ **Force discipline** = force quality
|
|
183
|
+
|
|
184
|
+
### What "DONE" Means
|
|
185
|
+
|
|
186
|
+
An increment is DONE if **ONE** of the following is true:
|
|
187
|
+
|
|
188
|
+
1. **All tasks completed**: All tasks in `tasks.md` marked `[x] Completed`
|
|
189
|
+
2. **Completion report exists**: `COMPLETION-SUMMARY.md` with "✅ COMPLETE" status
|
|
190
|
+
3. **Explicit closure**: Closed via `/specweave:close` with documentation
|
|
191
|
+
|
|
192
|
+
### The Enforcement
|
|
193
|
+
|
|
194
|
+
**When you try to start a new increment**:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
/specweave:inc "new feature"
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
**If previous increments are incomplete, you'll see**:
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
❌ Cannot create new increment!
|
|
204
|
+
|
|
205
|
+
Previous increments are incomplete:
|
|
206
|
+
|
|
207
|
+
📋 Increment 0002-core-enhancements
|
|
208
|
+
Status: 73% complete (11/15 tasks)
|
|
209
|
+
Pending:
|
|
210
|
+
- T-008: Migrate DIAGRAM-CONVENTIONS.md content
|
|
211
|
+
- T-010: Create context-manifest.yaml
|
|
212
|
+
- T-012: Test agent invocation manually
|
|
213
|
+
- T-013: Run skill test suite
|
|
214
|
+
- T-015: Create PR when increment complete
|
|
215
|
+
|
|
216
|
+
📋 Increment 0003-intelligent-model-selection
|
|
217
|
+
Status: 50% complete (11/22 tasks)
|
|
218
|
+
Pending: 11 tasks
|
|
219
|
+
|
|
220
|
+
💡 What would you like to do?
|
|
221
|
+
|
|
222
|
+
1️⃣ Close incomplete increments:
|
|
223
|
+
/specweave:close
|
|
224
|
+
|
|
225
|
+
2️⃣ Check status:
|
|
226
|
+
/specweave:status
|
|
227
|
+
|
|
228
|
+
3️⃣ Force create (DANGEROUS - violates discipline!):
|
|
229
|
+
Add --force flag to bypass this check
|
|
230
|
+
|
|
231
|
+
⚠️ The discipline exists for a reason:
|
|
232
|
+
- Prevents scope creep
|
|
233
|
+
- Ensures completions are tracked
|
|
234
|
+
- Maintains living docs accuracy
|
|
235
|
+
- Keeps work focused
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### How to Resolve Incomplete Increments
|
|
239
|
+
|
|
240
|
+
#### Option 1: Complete the Work (Recommended)
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
# Continue working on incomplete increment
|
|
244
|
+
/specweave:do
|
|
245
|
+
|
|
246
|
+
# Once all tasks done, it's automatically complete
|
|
247
|
+
/specweave:inc "new feature" # ✅ Now works!
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
#### Option 2: Close Interactively
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
# Interactive closure with options
|
|
254
|
+
/specweave:close
|
|
255
|
+
|
|
256
|
+
# You'll be asked to choose:
|
|
257
|
+
# - Force complete (mark all tasks done)
|
|
258
|
+
# - Move tasks to next increment (defer work)
|
|
259
|
+
# - Reduce scope (mark tasks as won't-do)
|
|
260
|
+
# - Create completion report (manual close)
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
#### Option 3: Check Status First
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
# See all incomplete increments
|
|
267
|
+
/specweave:status
|
|
268
|
+
|
|
269
|
+
# Output shows:
|
|
270
|
+
# ✅ 0001-core-framework
|
|
271
|
+
# ✅ 0004-plugin-architecture
|
|
272
|
+
# ⏳ 0002-core-enhancements (73% complete)
|
|
273
|
+
# ⏳ 0003-intelligent-model-selection (50% complete)
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
#### Option 4: Force Create (Emergency Only!)
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
# Bypass the check (USE SPARINGLY!)
|
|
280
|
+
/specweave:inc "urgent-hotfix" --force
|
|
281
|
+
|
|
282
|
+
# This is logged and should be explained in the next standup/PR
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### The Three Options for Closing
|
|
286
|
+
|
|
287
|
+
When using `/specweave:close`, you get **THREE options**:
|
|
288
|
+
|
|
289
|
+
#### 1. **Adjust Scope** (Simplest - Recommended)
|
|
290
|
+
|
|
291
|
+
Remove parts from `spec.md`, regenerate `plan.md` and `tasks.md` to match reduced scope:
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
# 1. Edit spec.md - remove features you're not doing
|
|
295
|
+
# 2. Delete plan.md and tasks.md
|
|
296
|
+
# 3. Regenerate from spec
|
|
297
|
+
/specweave:inc "same increment" --regenerate
|
|
298
|
+
|
|
299
|
+
# Now tasks match reduced scope → 100% complete!
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
#### 2. **Move Scope to Next Increment**
|
|
303
|
+
|
|
304
|
+
Transfer incomplete tasks to the new increment:
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
# Via /specweave:close
|
|
308
|
+
# Select "Move tasks to next increment"
|
|
309
|
+
# Tasks are migrated with documentation
|
|
310
|
+
# Old increment closed, new increment gets the work
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
#### 3. **Extend Existing Increment** (Merge Work)
|
|
314
|
+
|
|
315
|
+
Simplest option: **Don't start a new increment**. Just extend the current one:
|
|
316
|
+
|
|
317
|
+
```bash
|
|
318
|
+
# Instead of creating 0003, extend 0002:
|
|
319
|
+
# 1. Update spec.md to include new features
|
|
320
|
+
# 2. Update plan.md with new implementation details
|
|
321
|
+
# 3. Add new tasks to tasks.md
|
|
322
|
+
# 4. Minimize tests if needed (focus on critical paths)
|
|
323
|
+
|
|
324
|
+
# Work on combined scope in ONE increment
|
|
325
|
+
/specweave:do
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
### Helper Commands
|
|
329
|
+
|
|
330
|
+
| Command | Purpose |
|
|
331
|
+
|---------|---------|
|
|
332
|
+
| `/specweave:status` | Show all increments and their completion status |
|
|
333
|
+
| `/specweave:close` | Interactive closure of incomplete increments |
|
|
334
|
+
| `/specweave:force-close <id>` | Mark all tasks complete (dangerous!) |
|
|
335
|
+
|
|
336
|
+
### Enforcement Points
|
|
337
|
+
|
|
338
|
+
1. **`/specweave:inc` command** - Hard block (Step 0A)
|
|
339
|
+
2. **PM agent** - Pre-flight validation before planning
|
|
340
|
+
3. **CI/CD** (future) - Prevent PR merges with incomplete increments
|
|
341
|
+
|
|
342
|
+
### Philosophy: Discipline = Quality
|
|
343
|
+
|
|
344
|
+
**Why enforce this strictly?**
|
|
345
|
+
|
|
346
|
+
- **Focus**: Work on ONE thing at a time
|
|
347
|
+
- **Completion**: Finish before starting new
|
|
348
|
+
- **Quality**: Tests run, docs updated, code reviewed
|
|
349
|
+
- **Clarity**: Everyone knows what's current
|
|
350
|
+
- **Velocity**: Actually shipping > endless WIP
|
|
351
|
+
|
|
352
|
+
**Old Way (suggest)**:
|
|
353
|
+
```
|
|
354
|
+
User: "Just let me start the new feature, I'll come back to this"
|
|
355
|
+
Result: 5 incomplete increments, nothing ships
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
**New Way (enforce)**:
|
|
359
|
+
```
|
|
360
|
+
Framework: "Close this first, then start new"
|
|
361
|
+
User: *closes increment properly*
|
|
362
|
+
Result: Clean increments, clear progress, shipping regularly
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
### Real-World Example
|
|
366
|
+
|
|
367
|
+
**Scenario**: You have 0002 at 73% complete, want to start 0006.
|
|
368
|
+
|
|
369
|
+
**Before v0.6.0** (broken):
|
|
370
|
+
```bash
|
|
371
|
+
/specweave:inc "0006-i18n"
|
|
372
|
+
# ✅ Creates 0006 (no check)
|
|
373
|
+
# Result: 0002, 0003, 0006 all incomplete
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
**After v0.6.0** (disciplined):
|
|
377
|
+
```bash
|
|
378
|
+
/specweave:inc "0006-i18n"
|
|
379
|
+
# ❌ Blocked! "Close 0002 and 0003 first"
|
|
380
|
+
|
|
381
|
+
# Check status
|
|
382
|
+
/specweave:status
|
|
383
|
+
# Shows: 0002 (73%), 0003 (50%) incomplete
|
|
384
|
+
|
|
385
|
+
# Close them
|
|
386
|
+
/specweave:close
|
|
387
|
+
# Select 0002 → Force complete (work was done, just not marked)
|
|
388
|
+
# Select 0003 → Move tasks to 0007 (defer work)
|
|
389
|
+
|
|
390
|
+
# Now can proceed
|
|
391
|
+
/specweave:inc "0006-i18n"
|
|
392
|
+
# ✅ Works! Clean slate, disciplined workflow
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
### Exception: The `--force` Flag
|
|
396
|
+
|
|
397
|
+
For **emergencies only** (hotfixes, urgent features):
|
|
398
|
+
|
|
399
|
+
```bash
|
|
400
|
+
/specweave:inc "urgent-security-fix" --force
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
**This bypasses the check** but:
|
|
404
|
+
- ✅ Logs the force creation
|
|
405
|
+
- ✅ Warns in CLI output
|
|
406
|
+
- ✅ Should be explained in PR/standup
|
|
407
|
+
- ✅ Should close previous increments ASAP
|
|
408
|
+
|
|
409
|
+
**Use sparingly!** The discipline exists for a reason.
|
|
410
|
+
|
|
411
|
+
---
|
|
412
|
+
|
|
413
|
+
**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.
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
## Root-Level .specweave/ Folder (MANDATORY)
|
|
418
|
+
|
|
419
|
+
**CRITICAL ARCHITECTURE RULE**: SpecWeave ONLY supports root-level `.specweave/` folders. Nested `.specweave/` folders are NOT supported and MUST be prevented.
|
|
420
|
+
|
|
421
|
+
### The Rule: ONE Source of Truth
|
|
422
|
+
|
|
423
|
+
```
|
|
424
|
+
✅ CORRECT - Root-level only:
|
|
425
|
+
my-project/
|
|
426
|
+
├── .specweave/ ← ONE source of truth
|
|
427
|
+
│ ├── increments/
|
|
428
|
+
│ ├── docs/
|
|
429
|
+
│ └── logs/
|
|
430
|
+
├── frontend/
|
|
431
|
+
├── backend/
|
|
432
|
+
└── infrastructure/
|
|
433
|
+
|
|
434
|
+
❌ WRONG - Nested .specweave/ (NOT SUPPORTED):
|
|
435
|
+
my-project/
|
|
436
|
+
├── .specweave/ ← Root level
|
|
437
|
+
│ └── ...
|
|
438
|
+
├── backend/
|
|
439
|
+
│ └── .specweave/ ← ❌ NESTED - PREVENTS THIS!
|
|
440
|
+
└── frontend/
|
|
441
|
+
└── .specweave/ ← ❌ NESTED - PREVENTS THIS!
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
### Why Root-Level Only?
|
|
445
|
+
|
|
446
|
+
**Single Source of Truth**:
|
|
447
|
+
- ✅ One central location for all specs, increments, architecture
|
|
448
|
+
- ✅ No duplication or fragmentation
|
|
449
|
+
- ✅ Clear ownership and responsibility
|
|
450
|
+
- ✅ Simplified living docs sync (one place to update)
|
|
451
|
+
|
|
452
|
+
**Cross-Cutting Features**:
|
|
453
|
+
- ✅ Increments often span multiple modules (frontend + backend + infra)
|
|
454
|
+
- ✅ Architecture decisions (ADRs) apply system-wide
|
|
455
|
+
- ✅ Strategy docs are project-level, not module-level
|
|
456
|
+
- ✅ Living docs sync works best with one central location
|
|
457
|
+
|
|
458
|
+
**Plugin Detection**:
|
|
459
|
+
- ✅ Four-phase detection assumes one `.specweave/` folder
|
|
460
|
+
- ✅ Auto-detection scans from root only
|
|
461
|
+
- ✅ No ambiguity about where plugins are enabled
|
|
462
|
+
|
|
463
|
+
**Prevents Chaos**:
|
|
464
|
+
- ❌ Nested folders cause: Which is the source of truth?
|
|
465
|
+
- ❌ Duplication: Same increment in multiple places?
|
|
466
|
+
- ❌ Conflicts: Different modules with same increment numbers?
|
|
467
|
+
- ❌ Complexity: Where do cross-cutting features live?
|
|
468
|
+
|
|
469
|
+
### Multi-Repo & Microservices Pattern
|
|
470
|
+
|
|
471
|
+
**Problem**: "My project has multiple repos, microservices, or complex architecture"
|
|
472
|
+
|
|
473
|
+
**Solution**: Create a **parent folder** with ONE root-level `.specweave/`
|
|
474
|
+
|
|
475
|
+
The pattern is the same whether you have:
|
|
476
|
+
- Multiple git repos (polyrepo architecture)
|
|
477
|
+
- Microservices (separate service directories)
|
|
478
|
+
- Monorepo with multiple modules
|
|
479
|
+
|
|
480
|
+
```
|
|
481
|
+
microservices-project/ ← Create parent folder
|
|
482
|
+
├── .specweave/ ← ONE source of truth for entire system
|
|
483
|
+
│ ├── increments/
|
|
484
|
+
│ │ ├── 0001-add-service-mesh/ ← Cross-cutting
|
|
485
|
+
│ │ ├── 0002-user-svc-v2/ ← Single service
|
|
486
|
+
│ │ └── 0003-checkout-flow/ ← Multi-service
|
|
487
|
+
│ ├── docs/
|
|
488
|
+
│ │ ├── internal/
|
|
489
|
+
│ │ │ ├── strategy/ ← System-wide strategy
|
|
490
|
+
│ │ │ ├── architecture/
|
|
491
|
+
│ │ │ │ ├── service-mesh.md ← System-wide
|
|
492
|
+
│ │ │ │ ├── api-contracts.md ← Cross-service
|
|
493
|
+
│ │ │ │ └── adr/
|
|
494
|
+
│ │ │ │ └── 0001-service-mesh-choice.md
|
|
495
|
+
│ │ │ └── ...
|
|
496
|
+
│ │ └── public/
|
|
497
|
+
│ └── logs/
|
|
498
|
+
│
|
|
499
|
+
├── services/
|
|
500
|
+
│ ├── user-service/ ← Can be separate git repos
|
|
501
|
+
│ ├── order-service/ ← Or monorepo subdirectories
|
|
502
|
+
│ ├── payment-service/
|
|
503
|
+
│ └── notification-service/
|
|
504
|
+
│
|
|
505
|
+
├── infrastructure/
|
|
506
|
+
│ ├── k8s/
|
|
507
|
+
│ └── terraform/
|
|
508
|
+
│
|
|
509
|
+
└── shared/
|
|
510
|
+
└── api-contracts/
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
**How to Set Up**:
|
|
514
|
+
|
|
515
|
+
```bash
|
|
516
|
+
# Option 1: Multiple repos (clone as subdirectories)
|
|
517
|
+
mkdir microservices-project && cd microservices-project
|
|
518
|
+
npx specweave init .
|
|
519
|
+
git clone https://github.com/myorg/user-service.git services/user-service
|
|
520
|
+
git clone https://github.com/myorg/order-service.git services/order-service
|
|
521
|
+
|
|
522
|
+
# Option 2: Git submodules (advanced)
|
|
523
|
+
mkdir microservices-project && cd microservices-project
|
|
524
|
+
git init && npx specweave init .
|
|
525
|
+
git submodule add https://github.com/myorg/user-service.git services/user-service
|
|
526
|
+
|
|
527
|
+
# Option 3: Monorepo (services in same repo)
|
|
528
|
+
mkdir microservices-project && cd microservices-project
|
|
529
|
+
git init && npx specweave init .
|
|
530
|
+
mkdir -p services/{user,order,payment}
|
|
531
|
+
|
|
532
|
+
# Work normally - SpecWeave sees all services
|
|
533
|
+
/specweave:inc "0001-add-service-mesh"
|
|
534
|
+
# Creates: .specweave/increments/0001-add-service-mesh/
|
|
535
|
+
# Can reference: services/user-service/, infrastructure/k8s/, etc.
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
**Benefits**:
|
|
539
|
+
- ✅ One `.specweave/` for entire system (no duplication)
|
|
540
|
+
- ✅ Each repo maintains its own git history (if using polyrepo)
|
|
541
|
+
- ✅ Cross-service increments are natural (e.g., checkout flow)
|
|
542
|
+
- ✅ System-wide architecture docs in one place
|
|
543
|
+
- ✅ Living docs cover all services
|
|
544
|
+
|
|
545
|
+
### Enforcement
|
|
546
|
+
|
|
547
|
+
**Validation in `init.ts`**:
|
|
548
|
+
|
|
549
|
+
```typescript
|
|
550
|
+
// Check for parent .specweave/
|
|
551
|
+
function detectNestedSpecweave(targetDir: string): string | null {
|
|
552
|
+
let currentDir = path.dirname(targetDir);
|
|
553
|
+
const root = path.parse(currentDir).root;
|
|
554
|
+
|
|
555
|
+
while (currentDir !== root) {
|
|
556
|
+
const specweavePath = path.join(currentDir, '.specweave');
|
|
557
|
+
if (fs.existsSync(specweavePath)) {
|
|
558
|
+
return currentDir; // Found parent .specweave/
|
|
559
|
+
}
|
|
560
|
+
currentDir = path.dirname(currentDir);
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
return null;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
// Prevent nested initialization
|
|
567
|
+
const parentSpecweave = detectNestedSpecweave(targetDir);
|
|
568
|
+
if (parentSpecweave) {
|
|
569
|
+
console.error('❌ Nested .specweave/ folders are not supported!');
|
|
570
|
+
console.error(` Found parent .specweave/ at: ${parentSpecweave}`);
|
|
571
|
+
console.error(` Use the parent folder for all increments.`);
|
|
572
|
+
process.exit(1);
|
|
573
|
+
}
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
**Detection Rules**:
|
|
577
|
+
- ❌ Prevent `specweave init` in subdirectories if parent `.specweave/` exists
|
|
578
|
+
- ✅ Suggest using parent folder instead
|
|
579
|
+
- ✅ Provide clear error messages with path to parent
|
|
580
|
+
|
|
581
|
+
**Code Review**:
|
|
582
|
+
- ❌ Reject PRs with nested `.specweave/` folders
|
|
583
|
+
- ✅ Enforce via linting/validation scripts
|
|
584
|
+
|
|
585
|
+
### Summary
|
|
586
|
+
|
|
587
|
+
| Aspect | Root-Level Only | Nested (NOT Supported) |
|
|
588
|
+
|--------|----------------|------------------------|
|
|
589
|
+
| **Source of Truth** | ✅ One central location | ❌ Multiple conflicting sources |
|
|
590
|
+
| **Cross-Cutting Features** | ✅ Natural | ❌ Complex coordination |
|
|
591
|
+
| **Living Docs Sync** | ✅ Simple | ❌ Merge conflicts |
|
|
592
|
+
| **Plugin Detection** | ✅ Works | ❌ Ambiguous |
|
|
593
|
+
| **Multi-Repo** | ✅ Parent folder | ❌ Fragmented |
|
|
594
|
+
| **Complexity** | ✅ Simple | ❌ High |
|
|
595
|
+
|
|
596
|
+
**Bottom Line**: Root-level `.specweave/` only. For multi-repo projects, create a parent folder. No exceptions.
|
|
597
|
+
|
|
598
|
+
---
|
|
599
|
+
|
|
600
|
+
## Project Scale (v0.4.0 - Plugin Architecture)
|
|
601
|
+
|
|
602
|
+
### Core Plugin (Always Auto-Loaded)
|
|
603
|
+
|
|
604
|
+
**Plugin**: `specweave-core` - The essential SpecWeave plugin loaded in every project:
|
|
605
|
+
- **Skills**: 9 skills (increment-planner, tdd-workflow, rfc-generator, context-loader, project-kickstarter, brownfield-analyzer, brownfield-onboarder, increment-quality-judge, context-optimizer)
|
|
606
|
+
- **Agents**: 22 agents (PM, Architect, Tech Lead, + 19 specialized including tdd-orchestrator)
|
|
607
|
+
- **Commands**: 22 commands (/specweave:inc, /specweave:do, /specweave:next, /specweave:done, /specweave:progress, /specweave:validate, /specweave:sync-docs, + 15 specialized)
|
|
608
|
+
- **Hooks**: 8 lifecycle hooks
|
|
609
|
+
- **Size**: ~12K tokens (vs. 50K in v0.3.7)
|
|
610
|
+
|
|
611
|
+
**Result**: **75%+ context reduction** out of the box!
|
|
612
|
+
|
|
613
|
+
**Why So Small?**
|
|
614
|
+
- External sync (GitHub, Jira) = separate plugins
|
|
615
|
+
- Tech stacks (React, K8s) = separate plugins
|
|
616
|
+
- Domain expertise (ML, payments) = separate plugins
|
|
617
|
+
- Core plugin = only increment lifecycle + living docs automation
|
|
618
|
+
|
|
619
|
+
### Available Plugins (Opt-In)
|
|
620
|
+
|
|
621
|
+
**Implemented Plugins** (v0.4.0):
|
|
622
|
+
|
|
623
|
+
| Plugin | Skills | Agents | Commands | Status |
|
|
624
|
+
|--------|--------|--------|----------|--------|
|
|
625
|
+
| **specweave-github** | 2 | 1 | 4 | ✅ COMPLETE |
|
|
626
|
+
|
|
627
|
+
**GitHub Plugin Features:**
|
|
628
|
+
- github-sync: Bidirectional increment ↔ issue sync
|
|
629
|
+
- github-issue-tracker: Task-level progress tracking
|
|
630
|
+
- github-manager agent: AI specialist for GitHub CLI
|
|
631
|
+
- Commands: create-issue, sync, close-issue, status
|
|
632
|
+
- Auto-detects: `.git/`, `github.com` remote, `GITHUB_TOKEN`
|
|
633
|
+
|
|
634
|
+
**Planned Plugins** (future releases):
|
|
635
|
+
|
|
636
|
+
| Plugin | Skills | Agents | Commands | Use When |
|
|
637
|
+
|--------|--------|--------|----------|----------|
|
|
638
|
+
| **frontend-stack** | 5 | 1 | 0 | React, Next.js, design systems |
|
|
639
|
+
| **kubernetes** | 3 | 1 | 2 | Deploying to K8s, Helm |
|
|
640
|
+
|
|
641
|
+
**Domain Plugins**:
|
|
642
|
+
|
|
643
|
+
| Plugin | Skills | Agents | Commands | Use When |
|
|
644
|
+
|--------|--------|--------|----------|----------|
|
|
645
|
+
| **ml-ops** | 3 | 3 | 1 | Machine learning, TensorFlow, PyTorch |
|
|
646
|
+
| **observability** | 4 | 4 | 2 | Prometheus, Grafana, monitoring |
|
|
647
|
+
| **payment-processing** | 4 | 1 | 0 | Stripe, billing, subscriptions |
|
|
648
|
+
| **e2e-testing** | 1 | 0 | 0 | Playwright, E2E browser automation, visual regression |
|
|
649
|
+
| **figma-ecosystem** | 5 | 2 | 0 | Design integration, Figma API |
|
|
650
|
+
| **security** | 3 | 1 | 0 | Security scanning, best practices |
|
|
651
|
+
| **diagrams** | 2 | 1 | 0 | C4 diagrams, Mermaid |
|
|
81
652
|
|
|
82
|
-
**
|
|
83
|
-
- **Skills**: 44 (31 core + 13 new from external plugins)
|
|
84
|
-
- **Agents**: 20 (10 core + 10 new specialized agents)
|
|
85
|
-
- **Commands**: 18 (/specweave.* commands)
|
|
653
|
+
**Backend Stacks**:
|
|
86
654
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
|
|
655
|
+
| Plugin | Skills | Agents | Commands | Use When |
|
|
656
|
+
|--------|--------|--------|----------|----------|
|
|
657
|
+
| **nodejs-backend** | 1 | 1 | 0 | Express, Fastify, NestJS |
|
|
658
|
+
| **python-backend** | 1 | 1 | 0 | FastAPI, Django, Flask |
|
|
659
|
+
| **dotnet-backend** | 1 | 1 | 0 | ASP.NET Core, EF Core |
|
|
660
|
+
|
|
661
|
+
**Enterprise Sync** (Alternative to GitHub):
|
|
662
|
+
|
|
663
|
+
| Plugin | Skills | Agents | Commands | Use When |
|
|
664
|
+
|--------|--------|--------|----------|----------|
|
|
665
|
+
| **jira-sync** | 1 | 1 | 2 | JIRA project tracking |
|
|
666
|
+
| **ado-sync** | 1 | 1 | 2 | Azure DevOps tracking |
|
|
667
|
+
|
|
668
|
+
### Context Efficiency Examples
|
|
669
|
+
|
|
670
|
+
**Before (v0.3.7)** - Monolithic:
|
|
671
|
+
- Simple React app: Loads ALL 44 skills + 20 agents ≈ **50K tokens**
|
|
672
|
+
- Backend API: Loads ALL 44 skills + 20 agents ≈ **50K tokens**
|
|
673
|
+
- ML pipeline: Loads ALL 44 skills + 20 agents ≈ **50K tokens**
|
|
674
|
+
|
|
675
|
+
**After (v0.4.0)** - Modular:
|
|
676
|
+
- Simple React app: Core + frontend-stack + github ≈ **16K tokens** (68% reduction!)
|
|
677
|
+
- Backend API: Core + nodejs-backend + github ≈ **15K tokens** (70% reduction!)
|
|
678
|
+
- ML pipeline: Core + ml-ops + github ≈ **18K tokens** (64% reduction!)
|
|
679
|
+
- SpecWeave itself: Core + github + diagrams ≈ **15K tokens** (70% reduction!)
|
|
680
|
+
|
|
681
|
+
### How to Enable Plugins
|
|
682
|
+
|
|
683
|
+
**Auto-Detection** (recommended):
|
|
684
|
+
```bash
|
|
685
|
+
specweave init # Auto-detects and suggests plugins
|
|
686
|
+
```
|
|
687
|
+
|
|
688
|
+
**Manual**:
|
|
689
|
+
```bash
|
|
690
|
+
specweave plugin list # See all available
|
|
691
|
+
specweave plugin enable kubernetes
|
|
692
|
+
specweave plugin disable figma-ecosystem
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
**Spec-Based** (during increment planning):
|
|
696
|
+
```bash
|
|
697
|
+
/specweave:inc "deploy to Kubernetes"
|
|
698
|
+
# → Suggests kubernetes plugin before creating spec
|
|
699
|
+
```
|
|
93
700
|
|
|
94
701
|
---
|
|
95
702
|
|
|
@@ -100,19 +707,54 @@ git add . && git commit -m "feat: description"
|
|
|
100
707
|
**CRITICAL**: SpecWeave follows a strict source-of-truth pattern:
|
|
101
708
|
|
|
102
709
|
```
|
|
103
|
-
src/ ← SOURCE OF TRUTH (
|
|
104
|
-
├──
|
|
105
|
-
├──
|
|
106
|
-
├──
|
|
107
|
-
├──
|
|
108
|
-
|
|
109
|
-
|
|
710
|
+
src/ ← SOURCE OF TRUTH (TypeScript code only)
|
|
711
|
+
├── core/ ← Core framework logic (TypeScript utilities)
|
|
712
|
+
│ ├── plugin-loader.ts
|
|
713
|
+
│ ├── config-manager.ts
|
|
714
|
+
│ ├── types/ ← TypeScript type definitions
|
|
715
|
+
│ └── schemas/ ← JSON schemas
|
|
716
|
+
├── cli/ ← CLI commands
|
|
717
|
+
├── hooks/ ← TypeScript utilities for hooks
|
|
718
|
+
│ └── lib/ ← Hook helper functions
|
|
719
|
+
├── adapters/ ← Tool adapters (legacy)
|
|
720
|
+
├── templates/ ← Templates for user projects
|
|
721
|
+
└── utils/ ← Utility functions
|
|
722
|
+
|
|
723
|
+
plugins/ ← ROOT: All plugins (version controlled)
|
|
724
|
+
├── specweave-core/ ← CORE PLUGIN (framework essentials)
|
|
725
|
+
│ ├── .claude-plugin/ ← plugin.json (Claude native)
|
|
726
|
+
│ ├── skills/ ← Core skills (9 total)
|
|
727
|
+
│ │ ├── rfc-generator/
|
|
728
|
+
│ │ ├── increment-planner/
|
|
729
|
+
│ │ ├── tdd-workflow/
|
|
730
|
+
│ │ └── ...
|
|
731
|
+
│ ├── agents/ ← Core agents (3 core + 19 specialized)
|
|
732
|
+
│ │ ├── pm/
|
|
733
|
+
│ │ ├── architect/
|
|
734
|
+
│ │ ├── tech-lead/
|
|
735
|
+
│ │ └── ...
|
|
736
|
+
│ ├── commands/ ← Core commands (7 core + 15 specialized)
|
|
737
|
+
│ │ ├── specweave.inc.md
|
|
738
|
+
│ │ ├── specweave.do.md
|
|
739
|
+
│ │ └── ...
|
|
740
|
+
│ ├── hooks/ ← Lifecycle hooks (8 total)
|
|
741
|
+
│ │ ├── post-task-completion.sh
|
|
742
|
+
│ │ ├── pre-implementation.sh
|
|
743
|
+
│ │ └── ...
|
|
744
|
+
│ └── lib/ ← TypeScript utilities (optional)
|
|
745
|
+
│
|
|
746
|
+
└── specweave-{name}/ ← Other plugins (GitHub, Figma, etc.)
|
|
747
|
+
├── .claude-plugin/ ← plugin.json (Claude native)
|
|
748
|
+
├── skills/ ← Plugin skills
|
|
749
|
+
├── agents/ ← Plugin agents
|
|
750
|
+
├── commands/ ← Plugin commands
|
|
751
|
+
└── lib/ ← TypeScript utilities (optional)
|
|
110
752
|
|
|
111
753
|
.claude/ ← INSTALLED (gitignored in user projects)
|
|
112
|
-
├──
|
|
113
|
-
├──
|
|
114
|
-
├──
|
|
115
|
-
└──
|
|
754
|
+
├── agents/ ← Installed from plugins/*/agents/
|
|
755
|
+
├── commands/ ← Installed from plugins/*/commands/
|
|
756
|
+
├── hooks/ ← Installed from plugins/*/hooks/
|
|
757
|
+
└── skills/ ← Installed from plugins/*/skills/
|
|
116
758
|
|
|
117
759
|
.specweave/ ← FRAMEWORK DATA (always present)
|
|
118
760
|
├── increments/ ← Feature development
|
|
@@ -121,11 +763,20 @@ src/ ← SOURCE OF TRUTH (version controlled)
|
|
|
121
763
|
```
|
|
122
764
|
|
|
123
765
|
**Rules**:
|
|
124
|
-
- ✅
|
|
125
|
-
- ✅
|
|
766
|
+
- ✅ `src/` = TypeScript code ONLY (compiled to `dist/`)
|
|
767
|
+
- ✅ ALL skills/agents/commands/hooks = Inside plugins (including core!)
|
|
768
|
+
- ✅ `plugins/specweave-core/` = Core framework plugin (always loaded)
|
|
769
|
+
- ✅ `.claude/` = Installed from all enabled plugins
|
|
770
|
+
- ❌ NEVER mix `*.ts` and `SKILL.md` in the same directory
|
|
126
771
|
- ❌ NEVER edit files in `.claude/` directly (they get overwritten)
|
|
127
772
|
- ❌ NEVER create new files in project root (use increment folders)
|
|
128
773
|
|
|
774
|
+
**Key Architectural Principle**:
|
|
775
|
+
- TypeScript code (`*.ts`) goes in `src/` → compiled to `dist/`
|
|
776
|
+
- Claude-native files (`SKILL.md`, `AGENT.md`, `*.md`) go in `plugins/` → copied to `.claude/`
|
|
777
|
+
- Even "core" framework components are in `plugins/specweave-core/` (everything is a plugin!)
|
|
778
|
+
- This separation ensures clean builds and prevents mixing compiled code with runtime files
|
|
779
|
+
|
|
129
780
|
### Tech Stack
|
|
130
781
|
|
|
131
782
|
**Core**:
|
|
@@ -155,42 +806,91 @@ src/ ← SOURCE OF TRUTH (version controlled)
|
|
|
155
806
|
|
|
156
807
|
```
|
|
157
808
|
specweave/
|
|
158
|
-
├── src/ # SOURCE OF TRUTH
|
|
809
|
+
├── src/ # SOURCE OF TRUTH (TypeScript code ONLY)
|
|
159
810
|
│ ├── cli/ # CLI commands (init, version)
|
|
160
811
|
│ │ └── commands/
|
|
161
812
|
│ │ └── init.ts # Main installation logic
|
|
162
|
-
│ ├── core/ # Core framework logic
|
|
813
|
+
│ ├── core/ # Core framework logic (TypeScript only)
|
|
814
|
+
│ │ ├── plugin-loader.ts # Load plugins from disk
|
|
815
|
+
│ │ ├── plugin-manager.ts # Plugin lifecycle management
|
|
816
|
+
│ │ ├── plugin-detector.ts # Auto-detect plugins (4 phases)
|
|
163
817
|
│ │ ├── config-manager.ts # Config loading/validation
|
|
164
|
-
│ │
|
|
165
|
-
│
|
|
166
|
-
│ │
|
|
167
|
-
│ │
|
|
168
|
-
│ │
|
|
169
|
-
│ ├──
|
|
170
|
-
│ │
|
|
171
|
-
│
|
|
172
|
-
│ │
|
|
173
|
-
│ ├──
|
|
174
|
-
│ │ ├── specweave.inc.md
|
|
175
|
-
│ │ ├── specweave.do.md
|
|
176
|
-
│ │ └── ...
|
|
177
|
-
│ ├── hooks/ # Lifecycle hooks (.sh)
|
|
178
|
-
│ │ └── post-task-completion.sh
|
|
179
|
-
│ ├── adapters/ # Multi-tool support
|
|
818
|
+
│ │ ├── types/
|
|
819
|
+
│ │ │ └── plugin.ts # Plugin type definitions
|
|
820
|
+
│ │ └── schemas/
|
|
821
|
+
│ │ ├── plugin-manifest.schema.json
|
|
822
|
+
│ │ └── specweave-config.schema.json
|
|
823
|
+
│ ├── hooks/ # TypeScript utilities for hooks
|
|
824
|
+
│ │ └── lib/ # Hook helper functions
|
|
825
|
+
│ ├── adapters/ # Tool adapters (legacy)
|
|
826
|
+
│ │ ├── adapter-interface.ts
|
|
827
|
+
│ │ ├── adapter-base.ts
|
|
180
828
|
│ │ ├── claude/
|
|
181
|
-
│ │ ├── cursor/
|
|
182
|
-
│ │ ├── copilot/
|
|
183
|
-
│ │ └── generic/
|
|
829
|
+
│ │ ├── cursor/ (legacy)
|
|
830
|
+
│ │ ├── copilot/ (legacy)
|
|
831
|
+
│ │ └── generic/ (legacy)
|
|
184
832
|
│ ├── templates/ # User project templates
|
|
185
833
|
│ │ ├── CLAUDE.md.template
|
|
186
834
|
│ │ ├── AGENTS.md.template
|
|
187
835
|
│ │ └── ...
|
|
188
836
|
│ └── utils/ # Utility functions
|
|
189
837
|
│
|
|
838
|
+
├── plugins/ # ALL PLUGINS (root level)
|
|
839
|
+
│ ├── specweave-core/ # CORE PLUGIN (framework essentials)
|
|
840
|
+
│ │ ├── .claude-plugin/
|
|
841
|
+
│ │ │ └── plugin.json # Claude native manifest
|
|
842
|
+
│ │ ├── skills/ # Core skills (9 total)
|
|
843
|
+
│ │ │ ├── rfc-generator/ # RFC generation for increments
|
|
844
|
+
│ │ │ ├── increment-planner/ # Increment planning and spec generation
|
|
845
|
+
│ │ │ ├── context-loader/ # Context loading optimization
|
|
846
|
+
│ │ │ ├── tdd-workflow/ # Test-driven development workflow
|
|
847
|
+
│ │ │ ├── project-kickstarter/ # New project bootstrapping
|
|
848
|
+
│ │ │ ├── brownfield-analyzer/ # Existing codebase analysis
|
|
849
|
+
│ │ │ ├── brownfield-onboarder/ # Brownfield project onboarding
|
|
850
|
+
│ │ │ ├── increment-quality-judge/# Quality assessment
|
|
851
|
+
│ │ │ └── context-optimizer/ # Context optimization
|
|
852
|
+
│ │ ├── agents/ # Core agents (22 total)
|
|
853
|
+
│ │ │ ├── pm/ # Product Manager agent
|
|
854
|
+
│ │ │ ├── architect/ # System Architect agent
|
|
855
|
+
│ │ │ ├── tech-lead/ # Tech Lead agent
|
|
856
|
+
│ │ │ └── ...
|
|
857
|
+
│ │ ├── commands/ # Core commands (22 total)
|
|
858
|
+
│ │ │ ├── specweave.inc.md # /specweave:inc
|
|
859
|
+
│ │ │ ├── specweave.do.md # /specweave:do
|
|
860
|
+
│ │ │ ├── specweave.done.md # /specweave:done
|
|
861
|
+
│ │ │ └── ...
|
|
862
|
+
│ │ ├── hooks/ # Lifecycle hooks (8 total)
|
|
863
|
+
│ │ │ ├── post-task-completion.sh # Auto-runs after tasks complete
|
|
864
|
+
│ │ │ ├── pre-implementation.sh # Pre-task validation
|
|
865
|
+
│ │ │ └── ...
|
|
866
|
+
│ │ └── lib/ # TypeScript utilities (optional)
|
|
867
|
+
│ │
|
|
868
|
+
│ ├── specweave-github/ # GitHub Issues integration
|
|
869
|
+
│ │ ├── .claude-plugin/
|
|
870
|
+
│ │ │ └── plugin.json # Claude native manifest
|
|
871
|
+
│ │ ├── skills/
|
|
872
|
+
│ │ │ ├── github-sync/
|
|
873
|
+
│ │ │ └── github-issue-tracker/
|
|
874
|
+
│ │ ├── agents/
|
|
875
|
+
│ │ │ └── github-manager/
|
|
876
|
+
│ │ ├── commands/
|
|
877
|
+
│ │ │ ├── github-create-issue.md
|
|
878
|
+
│ │ │ ├── github-sync.md
|
|
879
|
+
│ │ │ └── ...
|
|
880
|
+
│ │ └── lib/ # TypeScript utilities
|
|
881
|
+
│ ├── specweave-figma/ # Figma design sync
|
|
882
|
+
│ ├── specweave-infrastructure/ # K8s, Helm, Terraform
|
|
883
|
+
│ └── ... (18 plugins total)
|
|
884
|
+
│
|
|
885
|
+
├── .claude-plugin/ # Claude Code marketplace (root level)
|
|
886
|
+
│ ├── marketplace.json # Plugin catalog (18 plugins)
|
|
887
|
+
│ └── README.md # Marketplace documentation
|
|
888
|
+
│
|
|
190
889
|
├── .claude/ # Pre-installed for SpecWeave dev
|
|
191
|
-
│ ├──
|
|
192
|
-
│ ├──
|
|
193
|
-
│
|
|
890
|
+
│ ├── agents/ # Installed from plugins/*/agents/
|
|
891
|
+
│ ├── commands/ # Installed from plugins/*/commands/
|
|
892
|
+
│ ├── hooks/ # Installed from plugins/*/hooks/
|
|
893
|
+
│ └── skills/ # Installed from plugins/*/skills/
|
|
194
894
|
│
|
|
195
895
|
├── .specweave/ # SpecWeave's own increments
|
|
196
896
|
│ ├── increments/
|
|
@@ -205,8 +905,17 @@ specweave/
|
|
|
205
905
|
│ │ │ └── reports/ # ✅ Analysis files
|
|
206
906
|
│ │ └── _backlog/
|
|
207
907
|
│ ├── docs/
|
|
208
|
-
│ │ ├── internal/ # Strategic docs
|
|
209
|
-
│ │
|
|
908
|
+
│ │ ├── internal/ # Strategic docs (NEVER published)
|
|
909
|
+
│ │ │ ├── strategy/ # Business strategy, market analysis
|
|
910
|
+
│ │ │ ├── architecture/ # Technical architecture
|
|
911
|
+
│ │ │ │ ├── adr/ # Architecture Decision Records
|
|
912
|
+
│ │ │ │ ├── rfc/ # ✅ Request for Comments (detailed specs)
|
|
913
|
+
│ │ │ │ ├── diagrams/ # Mermaid + SVG
|
|
914
|
+
│ │ │ │ └── hld-system.md # High-Level Design
|
|
915
|
+
│ │ │ └── delivery/ # Implementation notes, runbooks
|
|
916
|
+
│ │ └── public/ # User-facing docs (can publish)
|
|
917
|
+
│ │ ├── guides/
|
|
918
|
+
│ │ └── api/
|
|
210
919
|
│ └── logs/
|
|
211
920
|
│
|
|
212
921
|
├── tests/
|
|
@@ -246,33 +955,13 @@ specweave/
|
|
|
246
955
|
|
|
247
956
|
### ❌ NEVER Create in Root (Pollutes Repository)
|
|
248
957
|
|
|
249
|
-
|
|
958
|
+
**See comprehensive rules at top of document**: [🚨 CRITICAL: NEVER POLLUTE PROJECT ROOT!](#-critical-never-pollute-project-root)
|
|
250
959
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
/CONTEXT-LOADER-CORRECTIONS.md # NO!
|
|
257
|
-
|
|
258
|
-
✅ CORRECT:
|
|
259
|
-
.specweave/increments/0002-core-enhancements/
|
|
260
|
-
├── reports/
|
|
261
|
-
│ ├── SESSION-SUMMARY-2025-10-28.md
|
|
262
|
-
│ ├── ADR-006-DEEP-ANALYSIS.md
|
|
263
|
-
│ ├── ANALYSIS-MULTI-TOOL-COMPARISON.md
|
|
264
|
-
│ └── CONTEXT-LOADER-CORRECTIONS.md
|
|
265
|
-
├── logs/
|
|
266
|
-
│ └── execution-2025-10-28.log
|
|
267
|
-
└── scripts/
|
|
268
|
-
└── migration-helper.sh
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
**Why?**
|
|
272
|
-
- ✅ Complete traceability (which increment created which files)
|
|
273
|
-
- ✅ Easy cleanup (delete increment folder = delete all files)
|
|
274
|
-
- ✅ Clear context (all files for a feature in one place)
|
|
275
|
-
- ✅ No root clutter
|
|
960
|
+
**Quick summary**:
|
|
961
|
+
- ✅ ALL AI-generated files → increment folders (`.specweave/increments/####/reports/`, `logs/`, `scripts/`)
|
|
962
|
+
- ✅ Architecture decisions → `.specweave/docs/internal/architecture/adr/`
|
|
963
|
+
- ❌ NEVER create `.md` files, scripts, or logs in project root
|
|
964
|
+
- ❌ Build artifacts (`.tgz`, `.pt`, etc.) → add to `.gitignore`
|
|
276
965
|
|
|
277
966
|
### Runtime Artifacts (NOT Source Controlled)
|
|
278
967
|
|
|
@@ -302,51 +991,50 @@ All AI-generated files MUST go into increment folders:
|
|
|
302
991
|
|
|
303
992
|
### Making Changes
|
|
304
993
|
|
|
305
|
-
**
|
|
994
|
+
**ALL components belong to plugins** (following [Claude Code's plugin system](https://docs.claude.com/en/docs/claude-code/plugins)).
|
|
995
|
+
|
|
996
|
+
**1. Editing Skills** (any plugin):
|
|
306
997
|
```bash
|
|
307
|
-
#
|
|
308
|
-
vim
|
|
998
|
+
# Core plugin (auto-loaded):
|
|
999
|
+
vim plugins/specweave-core/skills/rfc-generator/SKILL.md
|
|
309
1000
|
|
|
310
|
-
#
|
|
311
|
-
|
|
1001
|
+
# Other plugins (opt-in):
|
|
1002
|
+
vim plugins/specweave-github/skills/github-sync/SKILL.md
|
|
312
1003
|
|
|
313
|
-
#
|
|
314
|
-
/context-loader-test
|
|
1004
|
+
# Skills auto-activate based on description keywords
|
|
315
1005
|
```
|
|
316
1006
|
|
|
317
|
-
**2. Agents** (
|
|
1007
|
+
**2. Editing Agents** (any plugin):
|
|
318
1008
|
```bash
|
|
319
|
-
#
|
|
320
|
-
vim
|
|
1009
|
+
# Core plugin (auto-loaded):
|
|
1010
|
+
vim plugins/specweave-core/agents/pm/AGENT.md
|
|
321
1011
|
|
|
322
|
-
#
|
|
323
|
-
|
|
1012
|
+
# Other plugins (opt-in):
|
|
1013
|
+
vim plugins/specweave-github/agents/github-manager/AGENT.md
|
|
324
1014
|
|
|
325
1015
|
# Test by invoking via Task tool
|
|
326
1016
|
```
|
|
327
1017
|
|
|
328
|
-
**3. Commands** (
|
|
1018
|
+
**3. Editing Commands** (any plugin):
|
|
329
1019
|
```bash
|
|
330
|
-
#
|
|
331
|
-
vim
|
|
1020
|
+
# Core plugin (auto-loaded):
|
|
1021
|
+
vim plugins/specweave-core/commands/specweave.do.md
|
|
332
1022
|
|
|
333
|
-
#
|
|
334
|
-
|
|
1023
|
+
# Other plugins (opt-in):
|
|
1024
|
+
vim plugins/specweave-github/commands/github-sync.md
|
|
335
1025
|
|
|
336
|
-
# Test
|
|
337
|
-
/specweave.do
|
|
1026
|
+
# Test via /command-name
|
|
338
1027
|
```
|
|
339
1028
|
|
|
340
|
-
**4.
|
|
1029
|
+
**4. Creating New Plugins** (see "Plugins" section below for complete instructions)
|
|
1030
|
+
|
|
1031
|
+
**5. Editing Framework Code** (`src/core/`, `src/cli/`):
|
|
341
1032
|
```bash
|
|
342
|
-
# Edit TypeScript
|
|
1033
|
+
# Edit TypeScript (config manager, plugin loader, etc.)
|
|
343
1034
|
vim src/core/config-manager.ts
|
|
344
1035
|
|
|
345
|
-
# Build
|
|
346
|
-
npm run build
|
|
347
|
-
|
|
348
|
-
# Test
|
|
349
|
-
npm test
|
|
1036
|
+
# Build and test
|
|
1037
|
+
npm run build && npm test
|
|
350
1038
|
```
|
|
351
1039
|
|
|
352
1040
|
### Testing Strategy
|
|
@@ -361,10 +1049,10 @@ npm test
|
|
|
361
1049
|
- Test coverage plans per increment
|
|
362
1050
|
- TC-XXXX test case IDs
|
|
363
1051
|
|
|
364
|
-
3. **Skill Tests** (`
|
|
365
|
-
-
|
|
1052
|
+
3. **Skill Tests** (`tests/specs/{skill-name}/` or `tests/integration/{skill-name}/`)
|
|
1053
|
+
- Test cases for skill functionality
|
|
366
1054
|
- Minimum 3 test cases per skill
|
|
367
|
-
- Run via: `npm run test:
|
|
1055
|
+
- Run via: `npm run test:integration`
|
|
368
1056
|
|
|
369
1057
|
4. **Code Tests** (`tests/`)
|
|
370
1058
|
- **E2E (Playwright)**: MANDATORY for UI features
|
|
@@ -384,72 +1072,182 @@ npm test
|
|
|
384
1072
|
|
|
385
1073
|
### Hooks and Automation
|
|
386
1074
|
|
|
387
|
-
**Post-Task Completion Hook** (`.claude/hooks/post-task-completion.sh`):
|
|
388
|
-
|
|
389
|
-
-
|
|
390
|
-
- ✅
|
|
1075
|
+
**Post-Task Completion Hook v2.0** (`.claude/hooks/post-task-completion.sh`):
|
|
1076
|
+
|
|
1077
|
+
**Smart Session-End Detection**:
|
|
1078
|
+
- ✅ Tracks inactivity gaps between TodoWrite calls
|
|
1079
|
+
- ✅ Only plays sound when session is TRULY ending (15s+ inactivity after all tasks complete)
|
|
1080
|
+
- ✅ Skips sound during rapid work (Claude creating multiple todo lists)
|
|
1081
|
+
- ✅ Enhanced logging with decision reasoning in `.specweave/logs/hooks-debug.log`
|
|
1082
|
+
- ✅ Debouncing prevents duplicate hook fires
|
|
1083
|
+
|
|
1084
|
+
**How It Works**:
|
|
1085
|
+
```
|
|
1086
|
+
Problem: Claude creates multiple todo lists in one conversation
|
|
1087
|
+
- List 1: [A, B, C] → completes → sound plays ❌
|
|
1088
|
+
- List 2: [D, E] → completes 30s later → sound plays again ❌
|
|
1089
|
+
- User hears sounds while Claude is still working!
|
|
1090
|
+
|
|
1091
|
+
Solution: Inactivity-based detection
|
|
1092
|
+
- 10:00:00 - Task done (gap: 5s) → skip sound
|
|
1093
|
+
- 10:00:05 - Task done (gap: 5s) → skip sound
|
|
1094
|
+
- 10:00:10 - All done (gap: 5s) → skip sound (rapid work)
|
|
1095
|
+
- ... (15+ seconds pass)
|
|
1096
|
+
- 10:01:00 - All done (gap: 50s) → PLAY SOUND! ✅ (session ending)
|
|
1097
|
+
```
|
|
1098
|
+
|
|
1099
|
+
**Configuration** (`src/hooks/post-task-completion.sh`):
|
|
1100
|
+
- `INACTIVITY_THRESHOLD=15` - Seconds of inactivity to assume session ending (adjustable)
|
|
1101
|
+
- `DEBOUNCE_SECONDS=2` - Prevents duplicate hook fires
|
|
391
1102
|
|
|
392
1103
|
**Manual Actions** (Claude MUST do after each task):
|
|
393
1104
|
- Update `CLAUDE.md` when structure changes
|
|
394
1105
|
- Update `README.md` for user-facing changes
|
|
395
1106
|
- Update `CHANGELOG.md` for API changes
|
|
396
1107
|
|
|
397
|
-
**Living Docs Sync** (after `/specweave
|
|
398
|
-
- Run `/sync-docs update`
|
|
1108
|
+
**Living Docs Sync** (after `/specweave:do` completes):
|
|
1109
|
+
- Run `/specweave:sync-docs update`
|
|
399
1110
|
- Updates `.specweave/docs/` with implementation learnings
|
|
400
1111
|
- Updates ADRs from Proposed → Accepted
|
|
401
1112
|
|
|
402
1113
|
---
|
|
403
1114
|
|
|
404
|
-
##
|
|
1115
|
+
## Plugins
|
|
405
1116
|
|
|
406
|
-
**
|
|
407
|
-
**Title**: Intelligent Model Selection - Automatic Cost Optimization
|
|
408
|
-
**Status**: Planned (just created, ready to implement)
|
|
409
|
-
**Priority**: P1
|
|
410
|
-
**Started**: 2025-10-30
|
|
1117
|
+
**SpecWeave is built 100% on [Claude Code's native plugin system](https://docs.claude.com/en/docs/claude-code/plugins)**.
|
|
411
1118
|
|
|
412
|
-
|
|
413
|
-
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.
|
|
1119
|
+
### Architecture: Everything is a Plugin
|
|
414
1120
|
|
|
415
|
-
**
|
|
416
|
-
- ✅ Spec.md created (8 user stories, complete product requirements)
|
|
417
|
-
- ✅ Plan.md created (comprehensive technical architecture)
|
|
418
|
-
- ✅ Tasks.md created (22 implementation tasks)
|
|
419
|
-
- ✅ Tests.md created (100+ test cases, quality validation)
|
|
1121
|
+
**Critical Understanding**: SpecWeave doesn't have a "core framework" separate from plugins. Instead:
|
|
420
1122
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
1123
|
+
```
|
|
1124
|
+
SpecWeave = Collection of Claude Code Plugins
|
|
1125
|
+
├── specweave-core (auto-loaded) ← The "framework" IS a plugin
|
|
1126
|
+
├── specweave-github (opt-in)
|
|
1127
|
+
├── specweave-figma (opt-in)
|
|
1128
|
+
└── ...all other plugins (opt-in)
|
|
1129
|
+
```
|
|
425
1130
|
|
|
426
|
-
**
|
|
427
|
-
-
|
|
428
|
-
- `.
|
|
429
|
-
-
|
|
430
|
-
-
|
|
1131
|
+
**What this means**:
|
|
1132
|
+
- ✅ `specweave-core` is a Claude Code plugin (happens to auto-load)
|
|
1133
|
+
- ✅ All plugins follow identical structure (`.claude-plugin/plugin.json`, `skills/`, `agents/`, `commands/`)
|
|
1134
|
+
- ✅ Adding a skill = adding it to a plugin (always)
|
|
1135
|
+
- ❌ There are NO "core framework components" outside plugins
|
|
431
1136
|
|
|
432
|
-
**
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
1137
|
+
**Why this matters**:
|
|
1138
|
+
- Uniform architecture (no special cases)
|
|
1139
|
+
- All plugins discoverable via Claude Code's plugin system
|
|
1140
|
+
- Easy to extend (just add another plugin)
|
|
1141
|
+
- Future-proof (follows Anthropic's standards)
|
|
437
1142
|
|
|
438
|
-
|
|
1143
|
+
**Further reading**:
|
|
1144
|
+
- 📖 [Claude Code Plugin Docs](https://docs.claude.com/en/docs/claude-code/plugins)
|
|
1145
|
+
- 📖 [Plugin Reference](https://docs.claude.com/en/docs/claude-code/plugins-reference)
|
|
1146
|
+
- 📖 [Plugin Marketplaces](https://docs.claude.com/en/docs/claude-code/plugin-marketplaces)
|
|
1147
|
+
|
|
1148
|
+
### Available SpecWeave Plugins
|
|
1149
|
+
|
|
1150
|
+
**Location**: `plugins/` (root level)
|
|
1151
|
+
|
|
1152
|
+
**Discovery**:
|
|
1153
|
+
- Browse all plugins: `ls plugins/` or check [.claude-plugin/marketplace.json](/.claude-plugin/marketplace.json)
|
|
1154
|
+
- Live catalog: See `.claude-plugin/README.md` for current marketplace contents
|
|
1155
|
+
- Auto-detection during `specweave init` suggests relevant plugins
|
|
1156
|
+
|
|
1157
|
+
**Plugin Structure** (all follow same pattern):
|
|
1158
|
+
```
|
|
1159
|
+
plugins/specweave-{name}/
|
|
1160
|
+
├── .claude-plugin/plugin.json # Claude native manifest
|
|
1161
|
+
├── skills/ # Auto-activating capabilities (SKILL.md files)
|
|
1162
|
+
├── agents/ # Specialized AI agents (AGENT.md files)
|
|
1163
|
+
├── commands/ # Slash commands (.md files)
|
|
1164
|
+
└── lib/ # TypeScript utilities (optional)
|
|
1165
|
+
```
|
|
1166
|
+
|
|
1167
|
+
**Key Plugins** (for reference):
|
|
1168
|
+
- `specweave-core` - Framework essentials (always loaded)
|
|
1169
|
+
- `specweave-github` - GitHub Issues integration
|
|
1170
|
+
- `specweave-{frontend|backend|infrastructure}` - Tech stack plugins
|
|
1171
|
+
|
|
1172
|
+
**For complete list**: Check `plugins/` directory or marketplace.json
|
|
1173
|
+
|
|
1174
|
+
### Plugin Decision Tree
|
|
1175
|
+
|
|
1176
|
+
**Key Insight**: In Claude Code's plugin system, EVERYTHING is a plugin. The only question is: **Which plugin does this belong to?**
|
|
1177
|
+
|
|
1178
|
+
**Decision**: Which plugin should contain this feature?
|
|
1179
|
+
|
|
1180
|
+
```
|
|
1181
|
+
Is this feature...
|
|
1182
|
+
├─ Used by EVERY project? → specweave-core (auto-loaded)
|
|
1183
|
+
│ Examples: increment-planner, rfc-generator, tdd-workflow, PM/Architect agents
|
|
1184
|
+
│
|
|
1185
|
+
├─ Part of increment lifecycle? → specweave-core (auto-loaded)
|
|
1186
|
+
│ Examples: /specweave:inc, /specweave:do, living docs hooks
|
|
1187
|
+
│
|
|
1188
|
+
├─ Tech stack specific? → New plugin: specweave-{stack}
|
|
1189
|
+
│ Examples: specweave-frontend (React, Next.js), specweave-kubernetes
|
|
1190
|
+
│
|
|
1191
|
+
├─ Domain expertise? → New plugin: specweave-{domain}
|
|
1192
|
+
│ Examples: specweave-ml (TensorFlow), specweave-payments (Stripe)
|
|
1193
|
+
│
|
|
1194
|
+
├─ External integration? → New plugin: specweave-{tool}
|
|
1195
|
+
│ Examples: specweave-github, specweave-jira, specweave-figma
|
|
1196
|
+
│
|
|
1197
|
+
└─ Optional enhancement? → New plugin: specweave-{feature}
|
|
1198
|
+
Examples: specweave-diagrams, specweave-cost-optimizer
|
|
1199
|
+
```
|
|
1200
|
+
|
|
1201
|
+
**Plugin Structure** (all follow Claude Code's standard):
|
|
1202
|
+
```
|
|
1203
|
+
plugins/specweave-{name}/
|
|
1204
|
+
├── .claude-plugin/plugin.json # Required
|
|
1205
|
+
├── skills/ # Optional
|
|
1206
|
+
├── agents/ # Optional
|
|
1207
|
+
├── commands/ # Optional
|
|
1208
|
+
└── hooks/ # Optional
|
|
1209
|
+
```
|
|
1210
|
+
|
|
1211
|
+
**Result**: Core plugin stayed at ~12K tokens (75% smaller than v0.3.7!)
|
|
1212
|
+
|
|
1213
|
+
### Adding a New Plugin (Contributors)
|
|
439
1214
|
|
|
440
|
-
|
|
1215
|
+
**Create New Plugin**:
|
|
1216
|
+
```bash
|
|
1217
|
+
# 1. Create plugin structure
|
|
1218
|
+
mkdir -p plugins/specweave-myplugin/{.claude-plugin,skills,agents,commands,lib}
|
|
1219
|
+
|
|
1220
|
+
# 2. Create plugin.json (Claude native format)
|
|
1221
|
+
cat > plugins/specweave-myplugin/.claude-plugin/plugin.json << 'EOF'
|
|
1222
|
+
{
|
|
1223
|
+
"name": "specweave-myplugin",
|
|
1224
|
+
"description": "What it does and when to use it",
|
|
1225
|
+
"version": "1.0.0",
|
|
1226
|
+
"author": {"name": "Your Name"}
|
|
1227
|
+
}
|
|
1228
|
+
EOF
|
|
441
1229
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
1230
|
+
# 3. Add components (see Claude docs for format):
|
|
1231
|
+
# - skills/my-skill/SKILL.md
|
|
1232
|
+
# - agents/my-agent/AGENT.md
|
|
1233
|
+
# - commands/my-command.md
|
|
1234
|
+
# - lib/my-utility.ts (optional)
|
|
1235
|
+
|
|
1236
|
+
# 4. Add to marketplace
|
|
1237
|
+
vim .claude-plugin/marketplace.json
|
|
1238
|
+
# Add entry:
|
|
1239
|
+
# {
|
|
1240
|
+
# "name": "specweave-myplugin",
|
|
1241
|
+
# "description": "What it does and when to use it",
|
|
1242
|
+
# "source": "../plugins/specweave-myplugin"
|
|
1243
|
+
# }
|
|
1244
|
+
|
|
1245
|
+
# 5. Test locally
|
|
1246
|
+
/plugin marketplace add ./.claude-plugin
|
|
1247
|
+
/plugin install myplugin@marketplace
|
|
1248
|
+
```
|
|
447
1249
|
|
|
448
|
-
**
|
|
449
|
-
- ✅ Migrated commands to dot notation (`specweave.xxx`)
|
|
450
|
-
- ✅ Diagram generation agents (C4, Sequence, ER)
|
|
451
|
-
- ✅ Fixed context documentation
|
|
452
|
-
- ✅ Corrected ADR-0002 (context loading architecture)
|
|
1250
|
+
**See**: [.claude-plugin/README.md](/.claude-plugin/README.md) for marketplace documentation
|
|
453
1251
|
|
|
454
1252
|
---
|
|
455
1253
|
|
|
@@ -473,7 +1271,7 @@ Implement automatic cost optimization by intelligently routing work to Sonnet 4.
|
|
|
473
1271
|
|
|
474
1272
|
### 4. Incremental Development
|
|
475
1273
|
- Work in small, measurable increments
|
|
476
|
-
- Use SpecWeave's own workflow (`/specweave
|
|
1274
|
+
- Use SpecWeave's own workflow (`/specweave:inc`, `/specweave:do`, etc.)
|
|
477
1275
|
- All work traces back to specs
|
|
478
1276
|
|
|
479
1277
|
### 5. Adapter-First Design
|
|
@@ -512,94 +1310,44 @@ git push origin develop --tags
|
|
|
512
1310
|
|
|
513
1311
|
---
|
|
514
1312
|
|
|
515
|
-
## Adapter System
|
|
1313
|
+
## Adapter System (Legacy)
|
|
516
1314
|
|
|
517
|
-
SpecWeave
|
|
1315
|
+
**SpecWeave is Claude Code-first** - The framework is designed specifically for Claude Code's native capabilities.
|
|
518
1316
|
|
|
519
|
-
**
|
|
520
|
-
- ✅ Claude Code (
|
|
521
|
-
- ✅ Cursor (via `.cursorrules` + Markdown commands)
|
|
522
|
-
- ✅ GitHub Copilot (via `.github/copilot/instructions.md`)
|
|
523
|
-
- ⏳ Generic (Markdown-only, for ChatGPT/Gemini/etc.)
|
|
524
|
-
- 🔮 Windsurf (planned)
|
|
1317
|
+
**Primary Tool**:
|
|
1318
|
+
- ✅ **Claude Code** - Native support (slash commands, agents, skills, hooks, MCP)
|
|
525
1319
|
|
|
526
|
-
**
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
│ ├── adapter.ts
|
|
531
|
-
│ └── README.md
|
|
532
|
-
├── cursor/ # Cursor (.cursorrules)
|
|
533
|
-
│ ├── adapter.ts
|
|
534
|
-
│ └── README.md
|
|
535
|
-
├── copilot/ # GitHub Copilot (instructions.md)
|
|
536
|
-
│ ├── adapter.ts
|
|
537
|
-
│ └── README.md
|
|
538
|
-
└── generic/ # Generic Markdown (all others)
|
|
539
|
-
├── adapter.ts
|
|
540
|
-
└── SPECWEAVE-MANUAL.md
|
|
541
|
-
```
|
|
1320
|
+
**Legacy Multi-Tool Support** (may be removed):
|
|
1321
|
+
- ⚠️ Cursor (via `.cursorrules` + AGENTS.md compilation)
|
|
1322
|
+
- ⚠️ GitHub Copilot (via `.github/copilot/instructions.md`)
|
|
1323
|
+
- ⚠️ Generic (Markdown-only, for ChatGPT/Gemini/etc.)
|
|
542
1324
|
|
|
543
|
-
**
|
|
544
|
-
|
|
545
|
-
-
|
|
546
|
-
-
|
|
1325
|
+
**Why Claude-First?**
|
|
1326
|
+
The adapter system was originally designed to support multiple tools, but this added significant complexity without meaningful benefit. Claude Code provides:
|
|
1327
|
+
- ✅ **Native plugin marketplace** - No compilation needed
|
|
1328
|
+
- ✅ **Auto-activating skills** - No manual @ mentions
|
|
1329
|
+
- ✅ **Isolated agent contexts** - True role separation
|
|
1330
|
+
- ✅ **Pre/post lifecycle hooks** - Automated living docs sync
|
|
1331
|
+
- ✅ **MCP protocol** - Industry standard for context management
|
|
547
1332
|
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
## Common Tasks
|
|
1333
|
+
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.
|
|
551
1334
|
|
|
552
|
-
|
|
1335
|
+
**See**: "Why Claude Code is Best-in-Class" section above for detailed comparison
|
|
553
1336
|
|
|
554
|
-
```bash
|
|
555
|
-
# 1. Create skill directory
|
|
556
|
-
mkdir -p src/skills/my-new-skill/test-cases
|
|
557
|
-
|
|
558
|
-
# 2. Create SKILL.md
|
|
559
|
-
cat > src/skills/my-new-skill/SKILL.md << 'EOF'
|
|
560
|
-
---
|
|
561
|
-
name: my-new-skill
|
|
562
|
-
description: What it does and when to activate
|
|
563
1337
|
---
|
|
564
1338
|
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
Content here...
|
|
568
|
-
EOF
|
|
569
|
-
|
|
570
|
-
# 3. Add test cases (minimum 3)
|
|
571
|
-
vim src/skills/my-new-skill/test-cases/test-1-basic.yaml
|
|
572
|
-
|
|
573
|
-
# 4. Install locally
|
|
574
|
-
npm run install:skills
|
|
575
|
-
|
|
576
|
-
# 5. Test
|
|
577
|
-
# Ask Claude something that matches the skill's description
|
|
578
|
-
```
|
|
579
|
-
|
|
580
|
-
### Add a New Command
|
|
581
|
-
|
|
582
|
-
```bash
|
|
583
|
-
# 1. Create command file
|
|
584
|
-
cat > src/commands/specweave.newcmd.md << 'EOF'
|
|
585
|
-
---
|
|
586
|
-
name: newcmd
|
|
587
|
-
description: Short description
|
|
588
|
-
---
|
|
589
|
-
|
|
590
|
-
# New Command
|
|
1339
|
+
## Common Tasks
|
|
591
1340
|
|
|
592
|
-
|
|
593
|
-
EOF
|
|
1341
|
+
### Adding Skills, Agents, or Commands
|
|
594
1342
|
|
|
595
|
-
|
|
596
|
-
npm run install:all
|
|
1343
|
+
**All components go into plugins** (see "Plugins" section above for complete instructions).
|
|
597
1344
|
|
|
598
|
-
|
|
599
|
-
/specweave
|
|
1345
|
+
**Quick reference**:
|
|
1346
|
+
- **Core components**: `plugins/specweave-core/{skills|agents|commands|hooks}/`
|
|
1347
|
+
- **Plugin components**: `plugins/specweave-{name}/{skills|agents|commands}/`
|
|
1348
|
+
- **Tests**: `tests/integration/{component-name}/` or `tests/unit/`
|
|
600
1349
|
|
|
601
|
-
|
|
602
|
-
```
|
|
1350
|
+
**For detailed instructions**: See "Adding a New Plugin (Contributors)" section above (line ~1250)
|
|
603
1351
|
|
|
604
1352
|
### Update Documentation
|
|
605
1353
|
|
|
@@ -665,12 +1413,12 @@ cd docs-site && npm run build
|
|
|
665
1413
|
## Quick Reference
|
|
666
1414
|
|
|
667
1415
|
**Commands (for SpecWeave development)**:
|
|
668
|
-
- `/specweave
|
|
669
|
-
- `/specweave
|
|
670
|
-
- `/specweave
|
|
671
|
-
- `/specweave
|
|
672
|
-
- `/specweave
|
|
673
|
-
- `/sync-docs update` - Sync living docs
|
|
1416
|
+
- `/specweave:inc "feature"` - Plan new increment
|
|
1417
|
+
- `/specweave:do` - Execute tasks (smart resume)
|
|
1418
|
+
- `/specweave:progress` - Check status
|
|
1419
|
+
- `/specweave:validate 0002` - Validate increment
|
|
1420
|
+
- `/specweave:done 0002` - Close increment
|
|
1421
|
+
- `/specweave:sync-docs update` - Sync living docs
|
|
674
1422
|
|
|
675
1423
|
**Build & Test**:
|
|
676
1424
|
- `npm run build` - Compile TypeScript
|