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
|
@@ -12,6 +12,9 @@ import * as path from 'path';
|
|
|
12
12
|
import fs from 'fs-extra';
|
|
13
13
|
import { AdapterBase } from '../adapter-base.js';
|
|
14
14
|
import { AdapterOptions, AdapterFile } from '../adapter-interface.js';
|
|
15
|
+
import type { Plugin } from '../../core/types/plugin.js';
|
|
16
|
+
import { LanguageManager, getSystemPromptForLanguage } from '../../core/i18n/language-manager.js';
|
|
17
|
+
import type { SupportedLanguage, I18nConfig } from '../../core/i18n/types.js';
|
|
15
18
|
|
|
16
19
|
export class ClaudeAdapter extends AdapterBase {
|
|
17
20
|
name = 'claude';
|
|
@@ -38,56 +41,50 @@ export class ClaudeAdapter extends AdapterBase {
|
|
|
38
41
|
/**
|
|
39
42
|
* Get files to install for Claude adapter
|
|
40
43
|
*
|
|
41
|
-
* Claude
|
|
42
|
-
*
|
|
43
|
-
* - Agents to .claude/agents/ (specialized roles)
|
|
44
|
-
* - Commands to .claude/commands/ (slash commands)
|
|
45
|
-
* - Hooks to .claude/hooks/ (auto-update mechanisms)
|
|
44
|
+
* Claude Code v0.5.0+ uses native plugin loading via marketplace.
|
|
45
|
+
* No file copying needed!
|
|
46
46
|
*/
|
|
47
47
|
getFiles(): AdapterFile[] {
|
|
48
|
-
return [
|
|
49
|
-
{
|
|
50
|
-
sourcePath: 'README.md',
|
|
51
|
-
targetPath: '.claude/README.md',
|
|
52
|
-
description: 'Claude adapter documentation'
|
|
53
|
-
}
|
|
54
|
-
// Note: Skills, agents, commands, hooks are installed via npm scripts
|
|
55
|
-
// (install:skills, install:agents) - not copied here
|
|
56
|
-
];
|
|
48
|
+
return []; // No files to copy - native loading!
|
|
57
49
|
}
|
|
58
50
|
|
|
59
51
|
/**
|
|
60
52
|
* Install Claude adapter
|
|
61
53
|
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
54
|
+
* Claude Code v0.5.0+ uses native plugin system with marketplace.
|
|
55
|
+
* Installation steps:
|
|
56
|
+
* 1. Create .specweave/ structure (project data)
|
|
57
|
+
* 2. Show marketplace installation instructions
|
|
58
|
+
* 3. User adds marketplace: /plugin marketplace add anton-abyzov/specweave
|
|
59
|
+
* 4. User installs plugins: /plugin install specweave-core@specweave
|
|
68
60
|
*/
|
|
69
61
|
async install(options: AdapterOptions): Promise<void> {
|
|
70
|
-
console.log('\nš¦ Installing Claude Code Adapter (
|
|
71
|
-
|
|
72
|
-
// Ensure .claude directory exists
|
|
73
|
-
const claudeDir = path.join(options.projectPath, '.claude');
|
|
74
|
-
await fs.ensureDir(claudeDir);
|
|
75
|
-
|
|
76
|
-
// Create subdirectories
|
|
77
|
-
await fs.ensureDir(path.join(claudeDir, 'skills'));
|
|
78
|
-
await fs.ensureDir(path.join(claudeDir, 'agents'));
|
|
79
|
-
await fs.ensureDir(path.join(claudeDir, 'commands'));
|
|
80
|
-
await fs.ensureDir(path.join(claudeDir, 'hooks'));
|
|
62
|
+
console.log('\nš¦ Installing Claude Code Adapter (Native Plugin System)\n');
|
|
81
63
|
|
|
82
|
-
//
|
|
83
|
-
|
|
64
|
+
// Create .specweave/ structure (project data only)
|
|
65
|
+
const specweaveDir = path.join(options.projectPath, '.specweave');
|
|
66
|
+
await fs.ensureDir(specweaveDir);
|
|
67
|
+
await fs.ensureDir(path.join(specweaveDir, 'increments'));
|
|
68
|
+
await fs.ensureDir(path.join(specweaveDir, 'increments', '_backlog'));
|
|
69
|
+
await fs.ensureDir(path.join(specweaveDir, 'docs', 'internal', 'strategy'));
|
|
70
|
+
await fs.ensureDir(path.join(specweaveDir, 'docs', 'internal', 'architecture', 'adr'));
|
|
71
|
+
await fs.ensureDir(path.join(specweaveDir, 'docs', 'internal', 'architecture', 'rfc'));
|
|
72
|
+
await fs.ensureDir(path.join(specweaveDir, 'docs', 'internal', 'architecture', 'diagrams'));
|
|
73
|
+
await fs.ensureDir(path.join(specweaveDir, 'docs', 'internal', 'delivery'));
|
|
74
|
+
await fs.ensureDir(path.join(specweaveDir, 'docs', 'public', 'guides'));
|
|
75
|
+
await fs.ensureDir(path.join(specweaveDir, 'logs'));
|
|
84
76
|
|
|
85
|
-
console.log('\n
|
|
86
|
-
console.log('\nš Next steps:');
|
|
87
|
-
console.log('
|
|
88
|
-
console.log('
|
|
89
|
-
console.log('
|
|
90
|
-
console.log('
|
|
77
|
+
console.log('\nā
Created .specweave/ structure');
|
|
78
|
+
console.log('\nš Next steps - Install SpecWeave plugins:');
|
|
79
|
+
console.log('\n 1ļøā£ Add SpecWeave marketplace:');
|
|
80
|
+
console.log(' /plugin marketplace add anton-abyzov/specweave');
|
|
81
|
+
console.log('\n 2ļøā£ Install SpecWeave core:');
|
|
82
|
+
console.log(' /plugin install specweave-core@specweave');
|
|
83
|
+
console.log('\n 3ļøā£ (Optional) Install GitHub plugin:');
|
|
84
|
+
console.log(' /plugin install specweave-github@specweave');
|
|
85
|
+
console.log('\n 4ļøā£ Start using SpecWeave:');
|
|
86
|
+
console.log(' /specweave.inc "create a todo app"');
|
|
87
|
+
console.log('\nš” Tip: Plugins load natively - no file copying needed!');
|
|
91
88
|
}
|
|
92
89
|
|
|
93
90
|
/**
|
|
@@ -154,4 +151,318 @@ You're ready to build with SpecWeave on Claude Code!
|
|
|
154
151
|
For complete documentation, see: .claude/README.md
|
|
155
152
|
`;
|
|
156
153
|
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Check if Claude adapter supports plugins
|
|
157
|
+
*
|
|
158
|
+
* Claude Code has FULL plugin support via native .claude/ directory
|
|
159
|
+
*
|
|
160
|
+
* @returns boolean Always true
|
|
161
|
+
*/
|
|
162
|
+
supportsPlugins(): boolean {
|
|
163
|
+
return true;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Check if Claude Code native plugin system is available
|
|
168
|
+
*
|
|
169
|
+
* Detects if /plugin commands are supported in current Claude Code version
|
|
170
|
+
*
|
|
171
|
+
* @returns boolean True if native plugin commands available
|
|
172
|
+
*/
|
|
173
|
+
async supportsNativePlugins(): Promise<boolean> {
|
|
174
|
+
// Check if .claude/plugins directory exists (indicates native plugin support)
|
|
175
|
+
const projectPath = process.cwd();
|
|
176
|
+
const nativePluginsDir = path.join(projectPath, '.claude', 'plugins');
|
|
177
|
+
|
|
178
|
+
if (await fs.pathExists(nativePluginsDir)) {
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// Check if plugin.json format is present in any installed plugins
|
|
183
|
+
const claudeDir = path.join(projectPath, '.claude');
|
|
184
|
+
if (await fs.pathExists(claudeDir)) {
|
|
185
|
+
const entries = await fs.readdir(claudeDir, { withFileTypes: true });
|
|
186
|
+
for (const entry of entries) {
|
|
187
|
+
if (entry.isDirectory()) {
|
|
188
|
+
const pluginJsonPath = path.join(claudeDir, entry.name, '.claude-plugin', 'plugin.json');
|
|
189
|
+
if (await fs.pathExists(pluginJsonPath)) {
|
|
190
|
+
return true;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return false;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Get installation instructions based on available plugin system
|
|
201
|
+
*
|
|
202
|
+
* Returns instructions for either:
|
|
203
|
+
* - Native /plugin commands (if supported)
|
|
204
|
+
* - SpecWeave CLI fallback (always available)
|
|
205
|
+
*
|
|
206
|
+
* @param pluginName Name of plugin to install
|
|
207
|
+
* @returns Installation instructions
|
|
208
|
+
*/
|
|
209
|
+
async getPluginInstallInstructions(pluginName: string): Promise<string> {
|
|
210
|
+
const hasNativePlugins = await this.supportsNativePlugins();
|
|
211
|
+
|
|
212
|
+
if (hasNativePlugins) {
|
|
213
|
+
return `
|
|
214
|
+
Installation Options:
|
|
215
|
+
|
|
216
|
+
Option 1 (Recommended): Native Claude Code
|
|
217
|
+
/plugin marketplace add specweave/marketplace
|
|
218
|
+
/plugin install ${pluginName}@specweave
|
|
219
|
+
|
|
220
|
+
Option 2: SpecWeave CLI
|
|
221
|
+
specweave plugin install ${pluginName}
|
|
222
|
+
|
|
223
|
+
Both methods install the same plugin - choose based on preference!
|
|
224
|
+
`.trim();
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
return `
|
|
228
|
+
Installation:
|
|
229
|
+
specweave plugin install ${pluginName}
|
|
230
|
+
|
|
231
|
+
Note: Native /plugin commands not detected in your Claude Code version.
|
|
232
|
+
Using SpecWeave CLI for plugin management.
|
|
233
|
+
`.trim();
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Read language configuration from project config
|
|
238
|
+
*
|
|
239
|
+
* @returns Language setting from config, defaults to 'en'
|
|
240
|
+
*/
|
|
241
|
+
private async getLanguageConfig(): Promise<SupportedLanguage> {
|
|
242
|
+
const projectPath = process.cwd();
|
|
243
|
+
const configPath = path.join(projectPath, '.specweave', 'config.json');
|
|
244
|
+
|
|
245
|
+
if (!(await fs.pathExists(configPath))) {
|
|
246
|
+
return 'en'; // Default to English if no config
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
try {
|
|
250
|
+
const config = await fs.readJson(configPath);
|
|
251
|
+
return (config.language as SupportedLanguage) || 'en';
|
|
252
|
+
} catch (error) {
|
|
253
|
+
console.warn('ā ļø Could not read language from config, defaulting to English');
|
|
254
|
+
return 'en';
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Inject system prompt for non-English languages
|
|
260
|
+
*
|
|
261
|
+
* Prepends language instruction to markdown content if language !== 'en'
|
|
262
|
+
*
|
|
263
|
+
* @param content Original markdown content
|
|
264
|
+
* @param language Target language
|
|
265
|
+
* @returns Modified content with system prompt (or unchanged if English)
|
|
266
|
+
*/
|
|
267
|
+
private injectSystemPrompt(content: string, language: SupportedLanguage): string {
|
|
268
|
+
if (language === 'en') {
|
|
269
|
+
return content; // No changes for English - preserve default behavior
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// Get system prompt for target language
|
|
273
|
+
const systemPrompt = getSystemPromptForLanguage(language);
|
|
274
|
+
|
|
275
|
+
// Inject system prompt at the top (after YAML frontmatter if present)
|
|
276
|
+
if (content.startsWith('---')) {
|
|
277
|
+
// Has YAML frontmatter - inject after closing ---
|
|
278
|
+
const endOfFrontmatter = content.indexOf('---', 3);
|
|
279
|
+
if (endOfFrontmatter !== -1) {
|
|
280
|
+
const frontmatter = content.substring(0, endOfFrontmatter + 3);
|
|
281
|
+
const body = content.substring(endOfFrontmatter + 3);
|
|
282
|
+
return `${frontmatter}\n\n${systemPrompt}\n${body}`;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// No frontmatter - inject at the very top
|
|
287
|
+
return `${systemPrompt}\n\n${content}`;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Compile and install a plugin for Claude Code
|
|
292
|
+
*
|
|
293
|
+
* Claude uses native plugin installation:
|
|
294
|
+
* - Copy skills to .claude/skills/{plugin-name}/{skill-name}/
|
|
295
|
+
* - Copy agents to .claude/agents/{plugin-name}/{agent-name}/
|
|
296
|
+
* - Copy commands to .claude/commands/
|
|
297
|
+
*
|
|
298
|
+
* Supports both:
|
|
299
|
+
* - Native /plugin install (if Claude Code supports it)
|
|
300
|
+
* - SpecWeave CLI fallback (always available)
|
|
301
|
+
*
|
|
302
|
+
* NEW: Injects system prompts for non-English languages
|
|
303
|
+
*
|
|
304
|
+
* @param plugin Plugin to install
|
|
305
|
+
*/
|
|
306
|
+
async compilePlugin(plugin: Plugin): Promise<void> {
|
|
307
|
+
const projectPath = process.cwd();
|
|
308
|
+
const claudeDir = path.join(projectPath, '.claude');
|
|
309
|
+
|
|
310
|
+
console.log(`\nš¦ Installing plugin: ${plugin.manifest.name}`);
|
|
311
|
+
|
|
312
|
+
// Get language configuration for system prompt injection
|
|
313
|
+
const language = await this.getLanguageConfig();
|
|
314
|
+
if (language !== 'en') {
|
|
315
|
+
console.log(` š Language: ${language} (system prompts will be injected)`);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
// Check for native plugin support
|
|
319
|
+
const hasNativePlugins = await this.supportsNativePlugins();
|
|
320
|
+
if (hasNativePlugins) {
|
|
321
|
+
console.log(' š” Tip: You can also use native /plugin commands:');
|
|
322
|
+
console.log(` /plugin marketplace add specweave/marketplace`);
|
|
323
|
+
console.log(` /plugin install ${plugin.manifest.name.replace('specweave-', '')}@specweave`);
|
|
324
|
+
console.log('');
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
// Ensure base directories exist
|
|
328
|
+
await fs.ensureDir(path.join(claudeDir, 'skills'));
|
|
329
|
+
await fs.ensureDir(path.join(claudeDir, 'agents'));
|
|
330
|
+
await fs.ensureDir(path.join(claudeDir, 'commands'));
|
|
331
|
+
|
|
332
|
+
// Install skills
|
|
333
|
+
for (const skill of plugin.skills) {
|
|
334
|
+
const targetPath = path.join(claudeDir, 'skills', skill.name);
|
|
335
|
+
await fs.ensureDir(targetPath);
|
|
336
|
+
|
|
337
|
+
// Copy SKILL.md (with language injection if needed)
|
|
338
|
+
const skillMdPath = path.join(skill.path, 'SKILL.md');
|
|
339
|
+
if (await fs.pathExists(skillMdPath)) {
|
|
340
|
+
const content = await fs.readFile(skillMdPath, 'utf-8');
|
|
341
|
+
const modifiedContent = this.injectSystemPrompt(content, language);
|
|
342
|
+
await fs.writeFile(path.join(targetPath, 'SKILL.md'), modifiedContent, 'utf-8');
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
// Copy test cases if they exist
|
|
346
|
+
const testCasesDir = path.join(skill.path, 'test-cases');
|
|
347
|
+
if (await fs.pathExists(testCasesDir)) {
|
|
348
|
+
await fs.copy(testCasesDir, path.join(targetPath, 'test-cases'));
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
console.log(` ā Skill: ${skill.name}`);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
// Install agents
|
|
355
|
+
for (const agent of plugin.agents) {
|
|
356
|
+
const targetPath = path.join(claudeDir, 'agents', agent.name);
|
|
357
|
+
await fs.ensureDir(targetPath);
|
|
358
|
+
|
|
359
|
+
// Copy AGENT.md (with language injection if needed)
|
|
360
|
+
const agentMdPath = path.join(agent.path, 'AGENT.md');
|
|
361
|
+
if (await fs.pathExists(agentMdPath)) {
|
|
362
|
+
const content = await fs.readFile(agentMdPath, 'utf-8');
|
|
363
|
+
const modifiedContent = this.injectSystemPrompt(content, language);
|
|
364
|
+
await fs.writeFile(path.join(targetPath, 'AGENT.md'), modifiedContent, 'utf-8');
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
console.log(` ā Agent: ${agent.name}`);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// Install commands
|
|
371
|
+
for (const command of plugin.commands) {
|
|
372
|
+
// Commands use their full name as filename
|
|
373
|
+
const fileName = command.name.replace(/\./g, '-') + '.md';
|
|
374
|
+
const targetPath = path.join(claudeDir, 'commands', fileName);
|
|
375
|
+
|
|
376
|
+
if (await fs.pathExists(command.path)) {
|
|
377
|
+
const content = await fs.readFile(command.path, 'utf-8');
|
|
378
|
+
const modifiedContent = this.injectSystemPrompt(content, language);
|
|
379
|
+
await fs.writeFile(targetPath, modifiedContent, 'utf-8');
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
console.log(` ā Command: /${command.name}`);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
console.log(`\nā
Plugin ${plugin.manifest.name} installed!`);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Unload a plugin from Claude Code
|
|
390
|
+
*
|
|
391
|
+
* Removes plugin files from .claude/ directory
|
|
392
|
+
*
|
|
393
|
+
* @param pluginName Name of plugin to unload
|
|
394
|
+
*/
|
|
395
|
+
async unloadPlugin(pluginName: string): Promise<void> {
|
|
396
|
+
const projectPath = process.cwd();
|
|
397
|
+
const claudeDir = path.join(projectPath, '.claude');
|
|
398
|
+
|
|
399
|
+
console.log(`\nšļø Unloading plugin: ${pluginName}`);
|
|
400
|
+
|
|
401
|
+
// Read plugin manifest to know what to remove
|
|
402
|
+
const pluginsDir = path.join(projectPath, 'src', 'plugins');
|
|
403
|
+
const pluginPath = path.join(pluginsDir, pluginName);
|
|
404
|
+
|
|
405
|
+
if (!(await fs.pathExists(pluginPath))) {
|
|
406
|
+
console.warn(`ā ļø Plugin ${pluginName} not found`);
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
// Load plugin to get its components
|
|
411
|
+
const { PluginLoader } = await import('../../core/plugin-loader.js');
|
|
412
|
+
const loader = new PluginLoader();
|
|
413
|
+
const plugin = await loader.loadFromDirectory(pluginPath);
|
|
414
|
+
|
|
415
|
+
// Remove skills
|
|
416
|
+
for (const skill of plugin.skills) {
|
|
417
|
+
const skillPath = path.join(claudeDir, 'skills', skill.name);
|
|
418
|
+
if (await fs.pathExists(skillPath)) {
|
|
419
|
+
await fs.remove(skillPath);
|
|
420
|
+
console.log(` ā Removed skill: ${skill.name}`);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
// Remove agents
|
|
425
|
+
for (const agent of plugin.agents) {
|
|
426
|
+
const agentPath = path.join(claudeDir, 'agents', agent.name);
|
|
427
|
+
if (await fs.pathExists(agentPath)) {
|
|
428
|
+
await fs.remove(agentPath);
|
|
429
|
+
console.log(` ā Removed agent: ${agent.name}`);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
// Remove commands
|
|
434
|
+
for (const command of plugin.commands) {
|
|
435
|
+
const fileName = command.name.replace(/\./g, '-') + '.md';
|
|
436
|
+
const commandPath = path.join(claudeDir, 'commands', fileName);
|
|
437
|
+
if (await fs.pathExists(commandPath)) {
|
|
438
|
+
await fs.remove(commandPath);
|
|
439
|
+
console.log(` ā Removed command: /${command.name}`);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
console.log(`\nā
Plugin ${pluginName} unloaded!`);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Get list of installed plugins
|
|
448
|
+
*
|
|
449
|
+
* Returns plugin names that are currently installed in .claude/
|
|
450
|
+
*
|
|
451
|
+
* @returns Array of installed plugin names
|
|
452
|
+
*/
|
|
453
|
+
async getInstalledPlugins(): Promise<string[]> {
|
|
454
|
+
const projectPath = process.cwd();
|
|
455
|
+
const configPath = path.join(projectPath, '.specweave', 'config.yaml');
|
|
456
|
+
|
|
457
|
+
if (!(await fs.pathExists(configPath))) {
|
|
458
|
+
return [];
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
// Read config to get enabled plugins
|
|
462
|
+
const yaml = await import('js-yaml');
|
|
463
|
+
const content = await fs.readFile(configPath, 'utf-8');
|
|
464
|
+
const config = yaml.load(content) as any;
|
|
465
|
+
|
|
466
|
+
return config.plugins?.enabled || [];
|
|
467
|
+
}
|
|
157
468
|
}
|