specweave 0.16.5 → 0.16.11
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/marketplace.json +22 -0
- package/CLAUDE.md +45 -26
- package/bin/fix-marketplace-errors.sh +136 -0
- package/dist/cli/commands/sync-spec-commits.d.ts +9 -0
- package/dist/cli/commands/sync-spec-commits.d.ts.map +1 -0
- package/dist/cli/commands/sync-spec-commits.js +186 -0
- package/dist/cli/commands/sync-spec-commits.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/index.d.ts.map +1 -1
- package/dist/cli/helpers/issue-tracker/index.js +21 -0
- package/dist/cli/helpers/issue-tracker/index.js.map +1 -1
- package/dist/core/agent-model-manager.d.ts +52 -0
- package/dist/core/agent-model-manager.d.ts.map +1 -0
- package/dist/core/agent-model-manager.js +120 -0
- package/dist/core/agent-model-manager.js.map +1 -0
- package/dist/core/comment-builder.d.ts +57 -0
- package/dist/core/comment-builder.d.ts.map +1 -0
- package/dist/core/comment-builder.js +239 -0
- package/dist/core/comment-builder.js.map +1 -0
- package/dist/core/model-selector.d.ts +57 -0
- package/dist/core/model-selector.d.ts.map +1 -0
- package/dist/core/model-selector.js +115 -0
- package/dist/core/model-selector.js.map +1 -0
- package/dist/core/phase-detector.d.ts +62 -0
- package/dist/core/phase-detector.d.ts.map +1 -0
- package/dist/core/phase-detector.js +229 -0
- package/dist/core/phase-detector.js.map +1 -0
- package/dist/core/spec-task-mapper.d.ts +71 -0
- package/dist/core/spec-task-mapper.d.ts.map +1 -0
- package/dist/core/spec-task-mapper.js +208 -0
- package/dist/core/spec-task-mapper.js.map +1 -0
- package/dist/hooks/lib/git-diff-analyzer.d.ts +89 -0
- package/dist/hooks/lib/git-diff-analyzer.d.ts.map +1 -0
- package/dist/hooks/lib/git-diff-analyzer.js +226 -0
- package/dist/hooks/lib/git-diff-analyzer.js.map +1 -0
- package/dist/hooks/lib/invoke-translator-skill.d.ts +60 -0
- package/dist/hooks/lib/invoke-translator-skill.d.ts.map +1 -0
- package/dist/hooks/lib/invoke-translator-skill.js +201 -0
- package/dist/hooks/lib/invoke-translator-skill.js.map +1 -0
- package/dist/hooks/lib/prepare-reflection-context.d.ts +42 -0
- package/dist/hooks/lib/prepare-reflection-context.d.ts.map +1 -0
- package/dist/hooks/lib/prepare-reflection-context.js +123 -0
- package/dist/hooks/lib/prepare-reflection-context.js.map +1 -0
- package/dist/hooks/lib/reflection-config-loader.d.ts +45 -0
- package/dist/hooks/lib/reflection-config-loader.d.ts.map +1 -0
- package/dist/hooks/lib/reflection-config-loader.js +132 -0
- package/dist/hooks/lib/reflection-config-loader.js.map +1 -0
- package/dist/hooks/lib/reflection-parser.d.ts +33 -0
- package/dist/hooks/lib/reflection-parser.d.ts.map +1 -0
- package/dist/hooks/lib/reflection-parser.js +419 -0
- package/dist/hooks/lib/reflection-parser.js.map +1 -0
- package/dist/hooks/lib/reflection-prompt-builder.d.ts +56 -0
- package/dist/hooks/lib/reflection-prompt-builder.d.ts.map +1 -0
- package/dist/hooks/lib/reflection-prompt-builder.js +239 -0
- package/dist/hooks/lib/reflection-prompt-builder.js.map +1 -0
- package/dist/hooks/lib/reflection-storage.d.ts +64 -0
- package/dist/hooks/lib/reflection-storage.d.ts.map +1 -0
- package/dist/hooks/lib/reflection-storage.js +305 -0
- package/dist/hooks/lib/reflection-storage.js.map +1 -0
- package/dist/hooks/lib/run-self-reflection.d.ts +43 -0
- package/dist/hooks/lib/run-self-reflection.d.ts.map +1 -0
- package/dist/hooks/lib/run-self-reflection.js +203 -0
- package/dist/hooks/lib/run-self-reflection.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-file.d.ts +59 -0
- package/dist/hooks/lib/translate-file.d.ts.map +1 -0
- package/dist/hooks/lib/translate-file.js +350 -0
- package/dist/hooks/lib/translate-file.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 +175 -0
- package/dist/hooks/lib/translate-living-docs.js.map +1 -0
- package/dist/hooks/lib/types/reflection-types.d.ts +164 -0
- package/dist/hooks/lib/types/reflection-types.d.ts.map +1 -0
- package/dist/hooks/lib/types/reflection-types.js +73 -0
- package/dist/hooks/lib/types/reflection-types.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/plugins/specweave/lib/hooks/git-diff-analyzer.d.ts +89 -0
- package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.d.ts.map +1 -0
- package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.js +226 -0
- package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.js.map +1 -0
- package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.d.ts +60 -0
- package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.d.ts.map +1 -0
- package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.js +201 -0
- package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.js.map +1 -0
- package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.d.ts +42 -0
- package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.d.ts.map +1 -0
- package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.js +123 -0
- package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.js.map +1 -0
- package/dist/plugins/specweave/lib/hooks/reflection-config-loader.d.ts +45 -0
- package/dist/plugins/specweave/lib/hooks/reflection-config-loader.d.ts.map +1 -0
- package/dist/plugins/specweave/lib/hooks/reflection-config-loader.js +132 -0
- package/dist/plugins/specweave/lib/hooks/reflection-config-loader.js.map +1 -0
- package/dist/plugins/specweave/lib/hooks/reflection-parser.d.ts +33 -0
- package/dist/plugins/specweave/lib/hooks/reflection-parser.d.ts.map +1 -0
- package/dist/plugins/specweave/lib/hooks/reflection-parser.js +419 -0
- package/dist/plugins/specweave/lib/hooks/reflection-parser.js.map +1 -0
- package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.d.ts +56 -0
- package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.d.ts.map +1 -0
- package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.js +239 -0
- package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.js.map +1 -0
- package/dist/plugins/specweave/lib/hooks/reflection-storage.d.ts +64 -0
- package/dist/plugins/specweave/lib/hooks/reflection-storage.d.ts.map +1 -0
- package/dist/plugins/specweave/lib/hooks/reflection-storage.js +305 -0
- package/dist/plugins/specweave/lib/hooks/reflection-storage.js.map +1 -0
- package/dist/plugins/specweave/lib/hooks/run-self-reflection.d.ts +43 -0
- package/dist/plugins/specweave/lib/hooks/run-self-reflection.d.ts.map +1 -0
- package/dist/plugins/specweave/lib/hooks/run-self-reflection.js +203 -0
- package/dist/plugins/specweave/lib/hooks/run-self-reflection.js.map +1 -0
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts +27 -0
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts.map +1 -0
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.js +144 -0
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.js.map +1 -0
- package/dist/plugins/specweave/lib/hooks/translate-file.d.ts +59 -0
- package/dist/plugins/specweave/lib/hooks/translate-file.d.ts.map +1 -0
- package/dist/plugins/specweave/lib/hooks/translate-file.js +350 -0
- package/dist/plugins/specweave/lib/hooks/translate-file.js.map +1 -0
- package/dist/plugins/specweave/lib/hooks/translate-living-docs.d.ts +13 -0
- package/dist/plugins/specweave/lib/hooks/translate-living-docs.d.ts.map +1 -0
- package/dist/plugins/specweave/lib/hooks/translate-living-docs.js +175 -0
- package/dist/plugins/specweave/lib/hooks/translate-living-docs.js.map +1 -0
- package/dist/plugins/specweave/lib/hooks/types/reflection-types.d.ts +164 -0
- package/dist/plugins/specweave/lib/hooks/types/reflection-types.d.ts.map +1 -0
- package/dist/plugins/specweave/lib/hooks/types/reflection-types.js +73 -0
- package/dist/plugins/specweave/lib/hooks/types/reflection-types.js.map +1 -0
- package/dist/plugins/specweave/lib/hooks/update-tasks-md.d.ts +29 -0
- package/dist/plugins/specweave/lib/hooks/update-tasks-md.d.ts.map +1 -0
- package/dist/plugins/specweave/lib/hooks/update-tasks-md.js +203 -0
- package/dist/plugins/specweave/lib/hooks/update-tasks-md.js.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-board-resolver.d.ts +94 -0
- package/dist/plugins/specweave-ado/lib/ado-board-resolver.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-board-resolver.js +219 -0
- package/dist/plugins/specweave-ado/lib/ado-board-resolver.js.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-client-v2.d.ts +134 -0
- package/dist/plugins/specweave-ado/lib/ado-client-v2.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-client-v2.js +478 -0
- package/dist/plugins/specweave-ado/lib/ado-client-v2.js.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-client.d.ts +112 -0
- package/dist/plugins/specweave-ado/lib/ado-client.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-client.js +272 -0
- package/dist/plugins/specweave-ado/lib/ado-client.js.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-hierarchical-sync.d.ts +40 -0
- package/dist/plugins/specweave-ado/lib/ado-hierarchical-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-hierarchical-sync.js +370 -0
- package/dist/plugins/specweave-ado/lib/ado-hierarchical-sync.js.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-multi-project-sync.d.ts +149 -0
- package/dist/plugins/specweave-ado/lib/ado-multi-project-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-multi-project-sync.js +517 -0
- package/dist/plugins/specweave-ado/lib/ado-multi-project-sync.js.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-project-detector.d.ts +72 -0
- package/dist/plugins/specweave-ado/lib/ado-project-detector.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-project-detector.js +416 -0
- package/dist/plugins/specweave-ado/lib/ado-project-detector.js.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-spec-commit-sync.d.ts +38 -0
- package/dist/plugins/specweave-ado/lib/ado-spec-commit-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-spec-commit-sync.js +210 -0
- package/dist/plugins/specweave-ado/lib/ado-spec-commit-sync.js.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-spec-content-sync.d.ts +28 -0
- package/dist/plugins/specweave-ado/lib/ado-spec-content-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-spec-content-sync.js +241 -0
- package/dist/plugins/specweave-ado/lib/ado-spec-content-sync.js.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-spec-sync.d.ts +100 -0
- package/dist/plugins/specweave-ado/lib/ado-spec-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-spec-sync.js +471 -0
- package/dist/plugins/specweave-ado/lib/ado-spec-sync.js.map +1 -0
- package/dist/plugins/specweave-ado/lib/conflict-resolver.d.ts +99 -0
- package/dist/plugins/specweave-ado/lib/conflict-resolver.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/conflict-resolver.js +331 -0
- package/dist/plugins/specweave-ado/lib/conflict-resolver.js.map +1 -0
- package/dist/plugins/specweave-ado/lib/project-selector.d.ts +42 -0
- package/dist/plugins/specweave-ado/lib/project-selector.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/project-selector.js +211 -0
- package/dist/plugins/specweave-ado/lib/project-selector.js.map +1 -0
- package/dist/plugins/specweave-github/lib/cli-sync-increment-changes.d.ts +12 -0
- package/dist/plugins/specweave-github/lib/cli-sync-increment-changes.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/cli-sync-increment-changes.js +28 -0
- package/dist/plugins/specweave-github/lib/cli-sync-increment-changes.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-board-resolver.d.ts +54 -0
- package/dist/plugins/specweave-github/lib/github-board-resolver.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-board-resolver.js +122 -0
- package/dist/plugins/specweave-github/lib/github-board-resolver.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-client-v2.d.ts +104 -0
- package/dist/plugins/specweave-github/lib/github-client-v2.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-client-v2.js +408 -0
- package/dist/plugins/specweave-github/lib/github-client-v2.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-client.d.ts +96 -0
- package/dist/plugins/specweave-github/lib/github-client.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-client.js +299 -0
- package/dist/plugins/specweave-github/lib/github-client.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-hierarchical-sync.d.ts +29 -0
- package/dist/plugins/specweave-github/lib/github-hierarchical-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-hierarchical-sync.js +268 -0
- package/dist/plugins/specweave-github/lib/github-hierarchical-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-issue-updater.d.ts +61 -0
- package/dist/plugins/specweave-github/lib/github-issue-updater.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-issue-updater.js +327 -0
- package/dist/plugins/specweave-github/lib/github-issue-updater.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-multi-project-sync.d.ts +126 -0
- package/dist/plugins/specweave-github/lib/github-multi-project-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-multi-project-sync.js +420 -0
- package/dist/plugins/specweave-github/lib/github-multi-project-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-spec-commit-sync.d.ts +37 -0
- package/dist/plugins/specweave-github/lib/github-spec-commit-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-spec-commit-sync.js +209 -0
- package/dist/plugins/specweave-github/lib/github-spec-commit-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-spec-content-sync.d.ts +28 -0
- package/dist/plugins/specweave-github/lib/github-spec-content-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-spec-content-sync.js +195 -0
- package/dist/plugins/specweave-github/lib/github-spec-content-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-spec-sync.d.ts +108 -0
- package/dist/plugins/specweave-github/lib/github-spec-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-spec-sync.js +505 -0
- package/dist/plugins/specweave-github/lib/github-spec-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-sync-bidirectional.d.ts +36 -0
- package/dist/plugins/specweave-github/lib/github-sync-bidirectional.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js +228 -0
- package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-sync-increment-changes.d.ts +18 -0
- package/dist/plugins/specweave-github/lib/github-sync-increment-changes.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-sync-increment-changes.js +287 -0
- package/dist/plugins/specweave-github/lib/github-sync-increment-changes.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/repo-selector.d.ts +49 -0
- package/dist/plugins/specweave-github/lib/repo-selector.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/repo-selector.js +216 -0
- package/dist/plugins/specweave-github/lib/repo-selector.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/plugins/specweave-jira/lib/jira-board-resolver.d.ts +50 -0
- package/dist/plugins/specweave-jira/lib/jira-board-resolver.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-board-resolver.js +84 -0
- package/dist/plugins/specweave-jira/lib/jira-board-resolver.js.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-hierarchical-sync.d.ts +33 -0
- package/dist/plugins/specweave-jira/lib/jira-hierarchical-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-hierarchical-sync.js +206 -0
- package/dist/plugins/specweave-jira/lib/jira-hierarchical-sync.js.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-multi-project-sync.d.ts +95 -0
- package/dist/plugins/specweave-jira/lib/jira-multi-project-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-multi-project-sync.js +301 -0
- package/dist/plugins/specweave-jira/lib/jira-multi-project-sync.js.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-spec-commit-sync.d.ts +43 -0
- package/dist/plugins/specweave-jira/lib/jira-spec-commit-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-spec-commit-sync.js +282 -0
- package/dist/plugins/specweave-jira/lib/jira-spec-commit-sync.js.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-spec-content-sync.d.ts +33 -0
- package/dist/plugins/specweave-jira/lib/jira-spec-content-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-spec-content-sync.js +294 -0
- package/dist/plugins/specweave-jira/lib/jira-spec-content-sync.js.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-spec-sync.d.ts +105 -0
- package/dist/plugins/specweave-jira/lib/jira-spec-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-spec-sync.js +456 -0
- package/dist/plugins/specweave-jira/lib/jira-spec-sync.js.map +1 -0
- package/dist/plugins/specweave-jira/lib/project-selector.d.ts +42 -0
- package/dist/plugins/specweave-jira/lib/project-selector.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/project-selector.js +216 -0
- package/dist/plugins/specweave-jira/lib/project-selector.js.map +1 -0
- package/dist/plugins/specweave-jira/lib/reorganization-detector.d.ts +67 -0
- package/dist/plugins/specweave-jira/lib/reorganization-detector.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/reorganization-detector.js +252 -0
- package/dist/plugins/specweave-jira/lib/reorganization-detector.js.map +1 -0
- package/dist/plugins/specweave-jira/lib/setup-wizard.d.ts +29 -0
- package/dist/plugins/specweave-jira/lib/setup-wizard.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/setup-wizard.js +219 -0
- package/dist/plugins/specweave-jira/lib/setup-wizard.js.map +1 -0
- package/dist/plugins/specweave-release/lib/dashboard-generator.d.ts +23 -0
- package/dist/plugins/specweave-release/lib/dashboard-generator.d.ts.map +1 -0
- package/dist/plugins/specweave-release/lib/dashboard-generator.js +258 -0
- package/dist/plugins/specweave-release/lib/dashboard-generator.js.map +1 -0
- package/dist/plugins/specweave-release/lib/dora-tracker.d.ts +82 -0
- package/dist/plugins/specweave-release/lib/dora-tracker.d.ts.map +1 -0
- package/dist/plugins/specweave-release/lib/dora-tracker.js +279 -0
- package/dist/plugins/specweave-release/lib/dora-tracker.js.map +1 -0
- package/dist/project-mapper.js +272 -0
- package/dist/scripts/split-spec-by-project.js +105 -0
- package/dist/spec-splitter.js +283 -0
- package/dist/src/adapters/adapter-base.d.ts +71 -0
- package/dist/src/adapters/adapter-base.d.ts.map +1 -0
- package/dist/src/adapters/adapter-base.js +139 -0
- package/dist/src/adapters/adapter-base.js.map +1 -0
- package/dist/src/adapters/adapter-interface.d.ts +149 -0
- package/dist/src/adapters/adapter-interface.d.ts.map +1 -0
- package/dist/src/adapters/adapter-interface.js +8 -0
- package/dist/src/adapters/adapter-interface.js.map +1 -0
- package/dist/src/adapters/adapter-loader.d.ts +91 -0
- package/dist/src/adapters/adapter-loader.d.ts.map +1 -0
- package/dist/src/adapters/adapter-loader.js +238 -0
- package/dist/src/adapters/adapter-loader.js.map +1 -0
- package/dist/src/adapters/agents-md-generator.d.ts +48 -0
- package/dist/src/adapters/agents-md-generator.d.ts.map +1 -0
- package/dist/src/adapters/agents-md-generator.js +193 -0
- package/dist/src/adapters/agents-md-generator.js.map +1 -0
- package/dist/src/adapters/claude/adapter.d.ts +128 -0
- package/dist/src/adapters/claude/adapter.d.ts.map +1 -0
- package/dist/src/adapters/claude/adapter.js +415 -0
- package/dist/src/adapters/claude/adapter.js.map +1 -0
- package/dist/src/adapters/claude-md-generator.d.ts +78 -0
- package/dist/src/adapters/claude-md-generator.d.ts.map +1 -0
- package/dist/src/adapters/claude-md-generator.js +307 -0
- package/dist/src/adapters/claude-md-generator.js.map +1 -0
- package/dist/src/adapters/codex/adapter.d.ts +50 -0
- package/dist/src/adapters/codex/adapter.d.ts.map +1 -0
- package/dist/src/adapters/codex/adapter.js +316 -0
- package/dist/src/adapters/codex/adapter.js.map +1 -0
- package/dist/src/adapters/cursor/adapter.d.ts +98 -0
- package/dist/src/adapters/cursor/adapter.d.ts.map +1 -0
- package/dist/src/adapters/cursor/adapter.js +406 -0
- package/dist/src/adapters/cursor/adapter.js.map +1 -0
- package/dist/src/adapters/doc-generator.d.ts +69 -0
- package/dist/src/adapters/doc-generator.d.ts.map +1 -0
- package/dist/src/adapters/doc-generator.js +247 -0
- package/dist/src/adapters/doc-generator.js.map +1 -0
- package/dist/src/adapters/gemini/adapter.d.ts +50 -0
- package/dist/src/adapters/gemini/adapter.d.ts.map +1 -0
- package/dist/src/adapters/gemini/adapter.js +281 -0
- package/dist/src/adapters/gemini/adapter.js.map +1 -0
- package/dist/src/adapters/generic/adapter.d.ts +86 -0
- package/dist/src/adapters/generic/adapter.d.ts.map +1 -0
- package/dist/src/adapters/generic/adapter.js +338 -0
- package/dist/src/adapters/generic/adapter.js.map +1 -0
- package/dist/src/cli/commands/abandon.d.ts +13 -0
- package/dist/src/cli/commands/abandon.d.ts.map +1 -0
- package/dist/src/cli/commands/abandon.js +15 -0
- package/dist/src/cli/commands/abandon.js.map +1 -0
- package/dist/src/cli/commands/check-discipline.d.ts +16 -0
- package/dist/src/cli/commands/check-discipline.d.ts.map +1 -0
- package/dist/src/cli/commands/check-discipline.js +79 -0
- package/dist/src/cli/commands/check-discipline.js.map +1 -0
- package/dist/src/cli/commands/import-docs.d.ts +21 -0
- package/dist/src/cli/commands/import-docs.d.ts.map +1 -0
- package/dist/src/cli/commands/import-docs.js +146 -0
- package/dist/src/cli/commands/import-docs.js.map +1 -0
- package/dist/src/cli/commands/init-multiproject.d.ts +11 -0
- package/dist/src/cli/commands/init-multiproject.d.ts.map +1 -0
- package/dist/src/cli/commands/init-multiproject.js +202 -0
- package/dist/src/cli/commands/init-multiproject.js.map +1 -0
- package/dist/src/cli/commands/init.d.ts +10 -0
- package/dist/src/cli/commands/init.d.ts.map +1 -0
- package/dist/src/cli/commands/init.js +1328 -0
- package/dist/src/cli/commands/init.js.map +1 -0
- package/dist/src/cli/commands/install.d.ts +9 -0
- package/dist/src/cli/commands/install.d.ts.map +1 -0
- package/dist/src/cli/commands/install.js +127 -0
- package/dist/src/cli/commands/install.js.map +1 -0
- package/dist/src/cli/commands/list.d.ts +8 -0
- package/dist/src/cli/commands/list.d.ts.map +1 -0
- package/dist/src/cli/commands/list.js +119 -0
- package/dist/src/cli/commands/list.js.map +1 -0
- package/dist/src/cli/commands/migrate-to-multiproject.d.ts +37 -0
- package/dist/src/cli/commands/migrate-to-multiproject.d.ts.map +1 -0
- package/dist/src/cli/commands/migrate-to-multiproject.js +189 -0
- package/dist/src/cli/commands/migrate-to-multiproject.js.map +1 -0
- package/dist/src/cli/commands/migrate-to-profiles.d.ts +25 -0
- package/dist/src/cli/commands/migrate-to-profiles.d.ts.map +1 -0
- package/dist/src/cli/commands/migrate-to-profiles.js +348 -0
- package/dist/src/cli/commands/migrate-to-profiles.js.map +1 -0
- package/dist/src/cli/commands/pause.d.ts +13 -0
- package/dist/src/cli/commands/pause.d.ts.map +1 -0
- package/dist/src/cli/commands/pause.js +15 -0
- package/dist/src/cli/commands/pause.js.map +1 -0
- package/dist/src/cli/commands/qa.d.ts +54 -0
- package/dist/src/cli/commands/qa.d.ts.map +1 -0
- package/dist/src/cli/commands/qa.js +98 -0
- package/dist/src/cli/commands/qa.js.map +1 -0
- package/dist/src/cli/commands/resume.d.ts +12 -0
- package/dist/src/cli/commands/resume.d.ts.map +1 -0
- package/dist/src/cli/commands/resume.js +14 -0
- package/dist/src/cli/commands/resume.js.map +1 -0
- package/dist/src/cli/commands/status-line.d.ts +14 -0
- package/dist/src/cli/commands/status-line.d.ts.map +1 -0
- package/dist/src/cli/commands/status-line.js +75 -0
- package/dist/src/cli/commands/status-line.js.map +1 -0
- package/dist/src/cli/commands/status.d.ts +12 -0
- package/dist/src/cli/commands/status.d.ts.map +1 -0
- package/dist/src/cli/commands/status.js +23 -0
- package/dist/src/cli/commands/status.js.map +1 -0
- package/dist/src/cli/commands/switch-project.d.ts +13 -0
- package/dist/src/cli/commands/switch-project.d.ts.map +1 -0
- package/dist/src/cli/commands/switch-project.js +91 -0
- package/dist/src/cli/commands/switch-project.js.map +1 -0
- package/dist/src/cli/commands/sync-spec-commits.d.ts +9 -0
- package/dist/src/cli/commands/sync-spec-commits.d.ts.map +1 -0
- package/dist/src/cli/commands/sync-spec-commits.js +186 -0
- package/dist/src/cli/commands/sync-spec-commits.js.map +1 -0
- package/dist/src/cli/commands/sync-spec-content.d.ts +13 -0
- package/dist/src/cli/commands/sync-spec-content.d.ts.map +1 -0
- package/dist/src/cli/commands/sync-spec-content.js +223 -0
- package/dist/src/cli/commands/sync-spec-content.js.map +1 -0
- package/dist/src/cli/commands/validate-jira.d.ts +35 -0
- package/dist/src/cli/commands/validate-jira.d.ts.map +1 -0
- package/dist/src/cli/commands/validate-jira.js +112 -0
- package/dist/src/cli/commands/validate-jira.js.map +1 -0
- package/dist/src/cli/commands/validate-plugins.d.ts +41 -0
- package/dist/src/cli/commands/validate-plugins.d.ts.map +1 -0
- package/dist/src/cli/commands/validate-plugins.js +171 -0
- package/dist/src/cli/commands/validate-plugins.js.map +1 -0
- package/dist/src/cli/helpers/github/increment-profile-selector.d.ts +47 -0
- package/dist/src/cli/helpers/github/increment-profile-selector.d.ts.map +1 -0
- package/dist/src/cli/helpers/github/increment-profile-selector.js +186 -0
- package/dist/src/cli/helpers/github/increment-profile-selector.js.map +1 -0
- package/dist/src/cli/helpers/github/profile-manager.d.ts +119 -0
- package/dist/src/cli/helpers/github/profile-manager.d.ts.map +1 -0
- package/dist/src/cli/helpers/github/profile-manager.js +311 -0
- package/dist/src/cli/helpers/github/profile-manager.js.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/ado.d.ts +57 -0
- package/dist/src/cli/helpers/issue-tracker/ado.d.ts.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/ado.js +243 -0
- package/dist/src/cli/helpers/issue-tracker/ado.js.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/github-multi-repo.d.ts +86 -0
- package/dist/src/cli/helpers/issue-tracker/github-multi-repo.d.ts.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/github-multi-repo.js +417 -0
- package/dist/src/cli/helpers/issue-tracker/github-multi-repo.js.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/github.d.ts +80 -0
- package/dist/src/cli/helpers/issue-tracker/github.d.ts.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/github.js +324 -0
- package/dist/src/cli/helpers/issue-tracker/github.js.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/index.d.ts +22 -0
- package/dist/src/cli/helpers/issue-tracker/index.d.ts.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/index.js +575 -0
- package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/jira.d.ts +61 -0
- package/dist/src/cli/helpers/issue-tracker/jira.d.ts.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/jira.js +404 -0
- package/dist/src/cli/helpers/issue-tracker/jira.js.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/types.d.ts +108 -0
- package/dist/src/cli/helpers/issue-tracker/types.d.ts.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/types.js +16 -0
- package/dist/src/cli/helpers/issue-tracker/types.js.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/utils.d.ts +120 -0
- package/dist/src/cli/helpers/issue-tracker/utils.d.ts.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/utils.js +293 -0
- package/dist/src/cli/helpers/issue-tracker/utils.js.map +1 -0
- package/dist/src/core/agent-model-manager.d.ts +52 -0
- package/dist/src/core/agent-model-manager.d.ts.map +1 -0
- package/dist/src/core/agent-model-manager.js +120 -0
- package/dist/src/core/agent-model-manager.js.map +1 -0
- package/dist/src/core/brownfield/analyzer.d.ts +86 -0
- package/dist/src/core/brownfield/analyzer.d.ts.map +1 -0
- package/dist/src/core/brownfield/analyzer.js +365 -0
- package/dist/src/core/brownfield/analyzer.js.map +1 -0
- package/dist/src/core/brownfield/importer.d.ts +76 -0
- package/dist/src/core/brownfield/importer.d.ts.map +1 -0
- package/dist/src/core/brownfield/importer.js +287 -0
- package/dist/src/core/brownfield/importer.js.map +1 -0
- package/dist/src/core/comment-builder.d.ts +57 -0
- package/dist/src/core/comment-builder.d.ts.map +1 -0
- package/dist/src/core/comment-builder.js +239 -0
- package/dist/src/core/comment-builder.js.map +1 -0
- package/dist/src/core/config-manager.d.ts +47 -0
- package/dist/src/core/config-manager.d.ts.map +1 -0
- package/dist/src/core/config-manager.js +136 -0
- package/dist/src/core/config-manager.js.map +1 -0
- package/dist/src/core/cost-tracker.d.ts +108 -0
- package/dist/src/core/cost-tracker.d.ts.map +1 -0
- package/dist/src/core/cost-tracker.js +281 -0
- package/dist/src/core/cost-tracker.js.map +1 -0
- package/dist/src/core/credentials-manager.d.ts +107 -0
- package/dist/src/core/credentials-manager.d.ts.map +1 -0
- package/dist/src/core/credentials-manager.js +457 -0
- package/dist/src/core/credentials-manager.js.map +1 -0
- package/dist/src/core/i18n/language-detector.d.ts +29 -0
- package/dist/src/core/i18n/language-detector.d.ts.map +1 -0
- package/dist/src/core/i18n/language-detector.js +143 -0
- package/dist/src/core/i18n/language-detector.js.map +1 -0
- package/dist/src/core/i18n/language-manager.d.ts +101 -0
- package/dist/src/core/i18n/language-manager.d.ts.map +1 -0
- package/dist/src/core/i18n/language-manager.js +232 -0
- package/dist/src/core/i18n/language-manager.js.map +1 -0
- package/dist/src/core/i18n/language-registry.d.ts +44 -0
- package/dist/src/core/i18n/language-registry.d.ts.map +1 -0
- package/dist/src/core/i18n/language-registry.js +234 -0
- package/dist/src/core/i18n/language-registry.js.map +1 -0
- package/dist/src/core/i18n/locale-manager.d.ts +62 -0
- package/dist/src/core/i18n/locale-manager.d.ts.map +1 -0
- package/dist/src/core/i18n/locale-manager.js +137 -0
- package/dist/src/core/i18n/locale-manager.js.map +1 -0
- package/dist/src/core/i18n/system-prompt-injector.d.ts +33 -0
- package/dist/src/core/i18n/system-prompt-injector.d.ts.map +1 -0
- package/dist/src/core/i18n/system-prompt-injector.js +131 -0
- package/dist/src/core/i18n/system-prompt-injector.js.map +1 -0
- package/dist/src/core/i18n/types.d.ts +151 -0
- package/dist/src/core/i18n/types.d.ts.map +1 -0
- package/dist/src/core/i18n/types.js +11 -0
- package/dist/src/core/i18n/types.js.map +1 -0
- package/dist/src/core/increment/active-increment-manager.d.ts +79 -0
- package/dist/src/core/increment/active-increment-manager.d.ts.map +1 -0
- package/dist/src/core/increment/active-increment-manager.js +153 -0
- package/dist/src/core/increment/active-increment-manager.js.map +1 -0
- package/dist/src/core/increment/discipline-checker.d.ts +60 -0
- package/dist/src/core/increment/discipline-checker.d.ts.map +1 -0
- package/dist/src/core/increment/discipline-checker.js +274 -0
- package/dist/src/core/increment/discipline-checker.js.map +1 -0
- package/dist/src/core/increment/limits.d.ts +68 -0
- package/dist/src/core/increment/limits.d.ts.map +1 -0
- package/dist/src/core/increment/limits.js +224 -0
- package/dist/src/core/increment/limits.js.map +1 -0
- package/dist/src/core/increment/metadata-manager.d.ts +116 -0
- package/dist/src/core/increment/metadata-manager.d.ts.map +1 -0
- package/dist/src/core/increment/metadata-manager.js +335 -0
- package/dist/src/core/increment/metadata-manager.js.map +1 -0
- package/dist/src/core/increment/metadata-validator.d.ts +33 -0
- package/dist/src/core/increment/metadata-validator.d.ts.map +1 -0
- package/dist/src/core/increment/metadata-validator.js +147 -0
- package/dist/src/core/increment/metadata-validator.js.map +1 -0
- package/dist/src/core/increment/status-commands.d.ts +43 -0
- package/dist/src/core/increment/status-commands.d.ts.map +1 -0
- package/dist/src/core/increment/status-commands.js +277 -0
- package/dist/src/core/increment/status-commands.js.map +1 -0
- package/dist/src/core/increment/types.d.ts +88 -0
- package/dist/src/core/increment/types.d.ts.map +1 -0
- package/dist/src/core/increment/types.js +8 -0
- package/dist/src/core/increment/types.js.map +1 -0
- package/dist/src/core/increment-status.d.ts +72 -0
- package/dist/src/core/increment-status.d.ts.map +1 -0
- package/dist/src/core/increment-status.js +227 -0
- package/dist/src/core/increment-status.js.map +1 -0
- package/dist/src/core/model-selector.d.ts +57 -0
- package/dist/src/core/model-selector.d.ts.map +1 -0
- package/dist/src/core/model-selector.js +115 -0
- package/dist/src/core/model-selector.js.map +1 -0
- package/dist/src/core/phase-detector.d.ts +62 -0
- package/dist/src/core/phase-detector.d.ts.map +1 -0
- package/dist/src/core/phase-detector.js +229 -0
- package/dist/src/core/phase-detector.js.map +1 -0
- package/dist/src/core/plugin-loader.d.ts +131 -0
- package/dist/src/core/plugin-loader.d.ts.map +1 -0
- package/dist/src/core/plugin-loader.js +421 -0
- package/dist/src/core/plugin-loader.js.map +1 -0
- package/dist/src/core/project-manager.d.ts +122 -0
- package/dist/src/core/project-manager.d.ts.map +1 -0
- package/dist/src/core/project-manager.js +539 -0
- package/dist/src/core/project-manager.js.map +1 -0
- package/dist/src/core/project-structure-detector.d.ts +92 -0
- package/dist/src/core/project-structure-detector.d.ts.map +1 -0
- package/dist/src/core/project-structure-detector.js +289 -0
- package/dist/src/core/project-structure-detector.js.map +1 -0
- package/dist/src/core/qa/qa-runner.d.ts +16 -0
- package/dist/src/core/qa/qa-runner.d.ts.map +1 -0
- package/dist/src/core/qa/qa-runner.js +422 -0
- package/dist/src/core/qa/qa-runner.js.map +1 -0
- package/dist/src/core/qa/quality-gate-decider.d.ts +53 -0
- package/dist/src/core/qa/quality-gate-decider.d.ts.map +1 -0
- package/dist/src/core/qa/quality-gate-decider.js +268 -0
- package/dist/src/core/qa/quality-gate-decider.js.map +1 -0
- package/dist/src/core/qa/risk-calculator.d.ts +126 -0
- package/dist/src/core/qa/risk-calculator.d.ts.map +1 -0
- package/dist/src/core/qa/risk-calculator.js +247 -0
- package/dist/src/core/qa/risk-calculator.js.map +1 -0
- package/dist/src/core/qa/types.d.ts +315 -0
- package/dist/src/core/qa/types.d.ts.map +1 -0
- package/dist/src/core/qa/types.js +8 -0
- package/dist/src/core/qa/types.js.map +1 -0
- package/dist/src/core/repo-structure/github-validator.d.ts +75 -0
- package/dist/src/core/repo-structure/github-validator.d.ts.map +1 -0
- package/dist/src/core/repo-structure/github-validator.js +166 -0
- package/dist/src/core/repo-structure/github-validator.js.map +1 -0
- package/dist/src/core/repo-structure/prompt-consolidator.d.ts +70 -0
- package/dist/src/core/repo-structure/prompt-consolidator.d.ts.map +1 -0
- package/dist/src/core/repo-structure/prompt-consolidator.js +180 -0
- package/dist/src/core/repo-structure/prompt-consolidator.js.map +1 -0
- package/dist/src/core/repo-structure/repo-id-generator.d.ts +79 -0
- package/dist/src/core/repo-structure/repo-id-generator.d.ts.map +1 -0
- package/dist/src/core/repo-structure/repo-id-generator.js +135 -0
- package/dist/src/core/repo-structure/repo-id-generator.js.map +1 -0
- package/dist/src/core/repo-structure/repo-structure-manager.d.ts +105 -0
- package/dist/src/core/repo-structure/repo-structure-manager.d.ts.map +1 -0
- package/dist/src/core/repo-structure/repo-structure-manager.js +878 -0
- package/dist/src/core/repo-structure/repo-structure-manager.js.map +1 -0
- package/dist/src/core/repo-structure/setup-state-manager.d.ts +125 -0
- package/dist/src/core/repo-structure/setup-state-manager.d.ts.map +1 -0
- package/dist/src/core/repo-structure/setup-state-manager.js +233 -0
- package/dist/src/core/repo-structure/setup-state-manager.js.map +1 -0
- package/dist/src/core/repo-structure/setup-summary.d.ts +36 -0
- package/dist/src/core/repo-structure/setup-summary.d.ts.map +1 -0
- package/dist/src/core/repo-structure/setup-summary.js +190 -0
- package/dist/src/core/repo-structure/setup-summary.js.map +1 -0
- package/dist/src/core/rfc-generator-v2.d.ts +149 -0
- package/dist/src/core/rfc-generator-v2.d.ts.map +1 -0
- package/dist/src/core/rfc-generator-v2.js +399 -0
- package/dist/src/core/rfc-generator-v2.js.map +1 -0
- package/dist/src/core/spec-content-sync.d.ts +78 -0
- package/dist/src/core/spec-content-sync.d.ts.map +1 -0
- package/dist/src/core/spec-content-sync.js +222 -0
- package/dist/src/core/spec-content-sync.js.map +1 -0
- package/dist/src/core/spec-task-mapper.d.ts +71 -0
- package/dist/src/core/spec-task-mapper.d.ts.map +1 -0
- package/dist/src/core/spec-task-mapper.js +208 -0
- package/dist/src/core/spec-task-mapper.js.map +1 -0
- package/dist/src/core/specs/spec-metadata-manager.d.ts +72 -0
- package/dist/src/core/specs/spec-metadata-manager.d.ts.map +1 -0
- package/dist/src/core/specs/spec-metadata-manager.js +364 -0
- package/dist/src/core/specs/spec-metadata-manager.js.map +1 -0
- package/dist/src/core/specs/spec-parser.d.ts +66 -0
- package/dist/src/core/specs/spec-parser.d.ts.map +1 -0
- package/dist/src/core/specs/spec-parser.js +276 -0
- package/dist/src/core/specs/spec-parser.js.map +1 -0
- package/dist/src/core/status-line/status-line-manager.d.ts +62 -0
- package/dist/src/core/status-line/status-line-manager.d.ts.map +1 -0
- package/dist/src/core/status-line/status-line-manager.js +169 -0
- package/dist/src/core/status-line/status-line-manager.js.map +1 -0
- package/dist/src/core/status-line/types.d.ts +50 -0
- package/dist/src/core/status-line/types.d.ts.map +1 -0
- package/dist/src/core/status-line/types.js +17 -0
- package/dist/src/core/status-line/types.js.map +1 -0
- package/dist/src/core/sync/bidirectional-engine.d.ts +110 -0
- package/dist/src/core/sync/bidirectional-engine.d.ts.map +1 -0
- package/dist/src/core/sync/bidirectional-engine.js +356 -0
- package/dist/src/core/sync/bidirectional-engine.js.map +1 -0
- package/dist/src/core/sync/folder-mapper.d.ts +71 -0
- package/dist/src/core/sync/folder-mapper.d.ts.map +1 -0
- package/dist/src/core/sync/folder-mapper.js +203 -0
- package/dist/src/core/sync/folder-mapper.js.map +1 -0
- package/dist/src/core/sync/profile-manager.d.ts +72 -0
- package/dist/src/core/sync/profile-manager.d.ts.map +1 -0
- package/dist/src/core/sync/profile-manager.js +338 -0
- package/dist/src/core/sync/profile-manager.js.map +1 -0
- package/dist/src/core/sync/profile-selector.d.ts +52 -0
- package/dist/src/core/sync/profile-selector.d.ts.map +1 -0
- package/dist/src/core/sync/profile-selector.js +179 -0
- package/dist/src/core/sync/profile-selector.js.map +1 -0
- package/dist/src/core/sync/profile-validator.d.ts +52 -0
- package/dist/src/core/sync/profile-validator.d.ts.map +1 -0
- package/dist/src/core/sync/profile-validator.js +170 -0
- package/dist/src/core/sync/profile-validator.js.map +1 -0
- package/dist/src/core/sync/project-context.d.ts +81 -0
- package/dist/src/core/sync/project-context.d.ts.map +1 -0
- package/dist/src/core/sync/project-context.js +354 -0
- package/dist/src/core/sync/project-context.js.map +1 -0
- package/dist/src/core/sync/rate-limiter.d.ts +116 -0
- package/dist/src/core/sync/rate-limiter.d.ts.map +1 -0
- package/dist/src/core/sync/rate-limiter.js +308 -0
- package/dist/src/core/sync/rate-limiter.js.map +1 -0
- package/dist/src/core/sync/time-range-selector.d.ts +48 -0
- package/dist/src/core/sync/time-range-selector.d.ts.map +1 -0
- package/dist/src/core/sync/time-range-selector.js +224 -0
- package/dist/src/core/sync/time-range-selector.js.map +1 -0
- package/dist/src/core/types/config.d.ts +90 -0
- package/dist/src/core/types/config.d.ts.map +1 -0
- package/dist/src/core/types/config.js +44 -0
- package/dist/src/core/types/config.js.map +1 -0
- package/dist/src/core/types/increment-metadata.d.ts +120 -0
- package/dist/src/core/types/increment-metadata.d.ts.map +1 -0
- package/dist/src/core/types/increment-metadata.js +138 -0
- package/dist/src/core/types/increment-metadata.js.map +1 -0
- package/dist/src/core/types/plugin.d.ts +283 -0
- package/dist/src/core/types/plugin.d.ts.map +1 -0
- package/dist/src/core/types/plugin.js +49 -0
- package/dist/src/core/types/plugin.js.map +1 -0
- package/dist/src/core/types/spec-metadata.d.ts +229 -0
- package/dist/src/core/types/spec-metadata.d.ts.map +1 -0
- package/dist/src/core/types/spec-metadata.js +14 -0
- package/dist/src/core/types/spec-metadata.js.map +1 -0
- package/dist/src/core/types/sync-profile.d.ts +349 -0
- package/dist/src/core/types/sync-profile.d.ts.map +1 -0
- package/dist/src/core/types/sync-profile.js +79 -0
- package/dist/src/core/types/sync-profile.js.map +1 -0
- package/dist/src/hooks/lib/git-diff-analyzer.d.ts +89 -0
- package/dist/src/hooks/lib/git-diff-analyzer.d.ts.map +1 -0
- package/dist/src/hooks/lib/git-diff-analyzer.js +226 -0
- package/dist/src/hooks/lib/git-diff-analyzer.js.map +1 -0
- package/dist/src/hooks/lib/invoke-translator-skill.d.ts +60 -0
- package/dist/src/hooks/lib/invoke-translator-skill.d.ts.map +1 -0
- package/dist/src/hooks/lib/invoke-translator-skill.js +201 -0
- package/dist/src/hooks/lib/invoke-translator-skill.js.map +1 -0
- package/dist/src/hooks/lib/prepare-reflection-context.d.ts +42 -0
- package/dist/src/hooks/lib/prepare-reflection-context.d.ts.map +1 -0
- package/dist/src/hooks/lib/prepare-reflection-context.js +123 -0
- package/dist/src/hooks/lib/prepare-reflection-context.js.map +1 -0
- package/dist/src/hooks/lib/reflection-config-loader.d.ts +45 -0
- package/dist/src/hooks/lib/reflection-config-loader.d.ts.map +1 -0
- package/dist/src/hooks/lib/reflection-config-loader.js +132 -0
- package/dist/src/hooks/lib/reflection-config-loader.js.map +1 -0
- package/dist/src/hooks/lib/reflection-parser.d.ts +33 -0
- package/dist/src/hooks/lib/reflection-parser.d.ts.map +1 -0
- package/dist/src/hooks/lib/reflection-parser.js +419 -0
- package/dist/src/hooks/lib/reflection-parser.js.map +1 -0
- package/dist/src/hooks/lib/reflection-prompt-builder.d.ts +56 -0
- package/dist/src/hooks/lib/reflection-prompt-builder.d.ts.map +1 -0
- package/dist/src/hooks/lib/reflection-prompt-builder.js +239 -0
- package/dist/src/hooks/lib/reflection-prompt-builder.js.map +1 -0
- package/dist/src/hooks/lib/reflection-storage.d.ts +64 -0
- package/dist/src/hooks/lib/reflection-storage.d.ts.map +1 -0
- package/dist/src/hooks/lib/reflection-storage.js +305 -0
- package/dist/src/hooks/lib/reflection-storage.js.map +1 -0
- package/dist/src/hooks/lib/run-self-reflection.d.ts +43 -0
- package/dist/src/hooks/lib/run-self-reflection.d.ts.map +1 -0
- package/dist/src/hooks/lib/run-self-reflection.js +203 -0
- package/dist/src/hooks/lib/run-self-reflection.js.map +1 -0
- package/dist/src/hooks/lib/sync-living-docs.d.ts +27 -0
- package/dist/src/hooks/lib/sync-living-docs.d.ts.map +1 -0
- package/dist/src/hooks/lib/sync-living-docs.js +116 -0
- package/dist/src/hooks/lib/sync-living-docs.js.map +1 -0
- package/dist/src/hooks/lib/translate-file.d.ts +59 -0
- package/dist/src/hooks/lib/translate-file.d.ts.map +1 -0
- package/dist/src/hooks/lib/translate-file.js +350 -0
- package/dist/src/hooks/lib/translate-file.js.map +1 -0
- package/dist/src/hooks/lib/translate-living-docs.d.ts +13 -0
- package/dist/src/hooks/lib/translate-living-docs.d.ts.map +1 -0
- package/dist/src/hooks/lib/translate-living-docs.js +175 -0
- package/dist/src/hooks/lib/translate-living-docs.js.map +1 -0
- package/dist/src/hooks/lib/types/reflection-types.d.ts +164 -0
- package/dist/src/hooks/lib/types/reflection-types.d.ts.map +1 -0
- package/dist/src/hooks/lib/types/reflection-types.js +73 -0
- package/dist/src/hooks/lib/types/reflection-types.js.map +1 -0
- package/dist/src/hooks/lib/update-tasks-md.d.ts +29 -0
- package/dist/src/hooks/lib/update-tasks-md.d.ts.map +1 -0
- package/dist/src/hooks/lib/update-tasks-md.js +203 -0
- package/dist/src/hooks/lib/update-tasks-md.js.map +1 -0
- package/dist/src/integrations/ado/ado-client.d.ts +127 -0
- package/dist/src/integrations/ado/ado-client.d.ts.map +1 -0
- package/dist/src/integrations/ado/ado-client.js +416 -0
- package/dist/src/integrations/ado/ado-client.js.map +1 -0
- package/dist/src/integrations/jira/jira-client.d.ts +139 -0
- package/dist/src/integrations/jira/jira-client.d.ts.map +1 -0
- package/dist/src/integrations/jira/jira-client.js +386 -0
- package/dist/src/integrations/jira/jira-client.js.map +1 -0
- package/dist/src/integrations/jira/jira-incremental-mapper.d.ts +75 -0
- package/dist/src/integrations/jira/jira-incremental-mapper.d.ts.map +1 -0
- package/dist/src/integrations/jira/jira-incremental-mapper.js +474 -0
- package/dist/src/integrations/jira/jira-incremental-mapper.js.map +1 -0
- package/dist/src/integrations/jira/jira-mapper.d.ts +105 -0
- package/dist/src/integrations/jira/jira-mapper.d.ts.map +1 -0
- package/dist/src/integrations/jira/jira-mapper.js +494 -0
- package/dist/src/integrations/jira/jira-mapper.js.map +1 -0
- package/dist/src/metrics/calculators/change-failure-rate.d.ts +22 -0
- package/dist/src/metrics/calculators/change-failure-rate.d.ts.map +1 -0
- package/dist/src/metrics/calculators/change-failure-rate.js +70 -0
- package/dist/src/metrics/calculators/change-failure-rate.js.map +1 -0
- package/dist/src/metrics/calculators/deployment-frequency.d.ts +20 -0
- package/dist/src/metrics/calculators/deployment-frequency.d.ts.map +1 -0
- package/dist/src/metrics/calculators/deployment-frequency.js +61 -0
- package/dist/src/metrics/calculators/deployment-frequency.js.map +1 -0
- package/dist/src/metrics/calculators/lead-time.d.ts +22 -0
- package/dist/src/metrics/calculators/lead-time.d.ts.map +1 -0
- package/dist/src/metrics/calculators/lead-time.js +82 -0
- package/dist/src/metrics/calculators/lead-time.js.map +1 -0
- package/dist/src/metrics/calculators/mttr.d.ts +21 -0
- package/dist/src/metrics/calculators/mttr.d.ts.map +1 -0
- package/dist/src/metrics/calculators/mttr.js +60 -0
- package/dist/src/metrics/calculators/mttr.js.map +1 -0
- package/dist/src/metrics/dora-calculator.d.ts +28 -0
- package/dist/src/metrics/dora-calculator.d.ts.map +1 -0
- package/dist/src/metrics/dora-calculator.js +117 -0
- package/dist/src/metrics/dora-calculator.js.map +1 -0
- package/dist/src/metrics/github-client.d.ts +51 -0
- package/dist/src/metrics/github-client.d.ts.map +1 -0
- package/dist/src/metrics/github-client.js +133 -0
- package/dist/src/metrics/github-client.js.map +1 -0
- package/dist/src/metrics/report-generator.d.ts +17 -0
- package/dist/src/metrics/report-generator.d.ts.map +1 -0
- package/dist/src/metrics/report-generator.js +403 -0
- package/dist/src/metrics/report-generator.js.map +1 -0
- package/dist/src/metrics/types.d.ts +112 -0
- package/dist/src/metrics/types.d.ts.map +1 -0
- package/dist/src/metrics/types.js +10 -0
- package/dist/src/metrics/types.js.map +1 -0
- package/dist/src/metrics/utils/percentile.d.ts +25 -0
- package/dist/src/metrics/utils/percentile.d.ts.map +1 -0
- package/dist/src/metrics/utils/percentile.js +46 -0
- package/dist/src/metrics/utils/percentile.js.map +1 -0
- package/dist/src/metrics/utils/tier-classifier.d.ts +61 -0
- package/dist/src/metrics/utils/tier-classifier.d.ts.map +1 -0
- package/dist/src/metrics/utils/tier-classifier.js +100 -0
- package/dist/src/metrics/utils/tier-classifier.js.map +1 -0
- package/dist/src/testing/test-generator.d.ts +117 -0
- package/dist/src/testing/test-generator.d.ts.map +1 -0
- package/dist/src/testing/test-generator.js +370 -0
- package/dist/src/testing/test-generator.js.map +1 -0
- package/dist/src/types/cost-tracking.d.ts +43 -0
- package/dist/src/types/cost-tracking.d.ts.map +1 -0
- package/dist/src/types/cost-tracking.js +8 -0
- package/dist/src/types/cost-tracking.js.map +1 -0
- package/dist/src/types/model-selection.d.ts +53 -0
- package/dist/src/types/model-selection.d.ts.map +1 -0
- package/dist/src/types/model-selection.js +12 -0
- package/dist/src/types/model-selection.js.map +1 -0
- package/dist/src/utils/agents-md-compiler.d.ts +68 -0
- package/dist/src/utils/agents-md-compiler.d.ts.map +1 -0
- package/dist/src/utils/agents-md-compiler.js +420 -0
- package/dist/src/utils/agents-md-compiler.js.map +1 -0
- package/dist/src/utils/auth-helpers.d.ts +58 -0
- package/dist/src/utils/auth-helpers.d.ts.map +1 -0
- package/dist/src/utils/auth-helpers.js +108 -0
- package/dist/src/utils/auth-helpers.js.map +1 -0
- package/dist/src/utils/auto-install.d.ts +47 -0
- package/dist/src/utils/auto-install.d.ts.map +1 -0
- package/dist/src/utils/auto-install.js +211 -0
- package/dist/src/utils/auto-install.js.map +1 -0
- package/dist/src/utils/claude-cli-detector.d.ts +75 -0
- package/dist/src/utils/claude-cli-detector.d.ts.map +1 -0
- package/dist/src/utils/claude-cli-detector.js +285 -0
- package/dist/src/utils/claude-cli-detector.js.map +1 -0
- package/dist/src/utils/cost-reporter.d.ts +58 -0
- package/dist/src/utils/cost-reporter.d.ts.map +1 -0
- package/dist/src/utils/cost-reporter.js +224 -0
- package/dist/src/utils/cost-reporter.js.map +1 -0
- package/dist/src/utils/docs-preview/config-generator.d.ts +46 -0
- package/dist/src/utils/docs-preview/config-generator.d.ts.map +1 -0
- package/dist/src/utils/docs-preview/config-generator.js +377 -0
- package/dist/src/utils/docs-preview/config-generator.js.map +1 -0
- package/dist/src/utils/docs-preview/docusaurus-setup.d.ts +38 -0
- package/dist/src/utils/docs-preview/docusaurus-setup.d.ts.map +1 -0
- package/dist/src/utils/docs-preview/docusaurus-setup.js +177 -0
- package/dist/src/utils/docs-preview/docusaurus-setup.js.map +1 -0
- package/dist/src/utils/docs-preview/index.d.ts +7 -0
- package/dist/src/utils/docs-preview/index.d.ts.map +1 -0
- package/dist/src/utils/docs-preview/index.js +7 -0
- package/dist/src/utils/docs-preview/index.js.map +1 -0
- package/dist/src/utils/docs-preview/package-installer.d.ts +42 -0
- package/dist/src/utils/docs-preview/package-installer.d.ts.map +1 -0
- package/dist/src/utils/docs-preview/package-installer.js +182 -0
- package/dist/src/utils/docs-preview/package-installer.js.map +1 -0
- package/dist/src/utils/docs-preview/server-manager.d.ts +30 -0
- package/dist/src/utils/docs-preview/server-manager.d.ts.map +1 -0
- package/dist/src/utils/docs-preview/server-manager.js +212 -0
- package/dist/src/utils/docs-preview/server-manager.js.map +1 -0
- package/dist/src/utils/docs-preview/sidebar-builder.d.ts +32 -0
- package/dist/src/utils/docs-preview/sidebar-builder.d.ts.map +1 -0
- package/dist/src/utils/docs-preview/sidebar-builder.js +202 -0
- package/dist/src/utils/docs-preview/sidebar-builder.js.map +1 -0
- package/dist/src/utils/docs-preview/types.d.ts +57 -0
- package/dist/src/utils/docs-preview/types.d.ts.map +1 -0
- package/dist/src/utils/docs-preview/types.js +2 -0
- package/dist/src/utils/docs-preview/types.js.map +1 -0
- package/dist/src/utils/env-file-generator.d.ts +54 -0
- package/dist/src/utils/env-file-generator.d.ts.map +1 -0
- package/dist/src/utils/env-file-generator.js +196 -0
- package/dist/src/utils/env-file-generator.js.map +1 -0
- package/dist/src/utils/env-file.d.ts +88 -0
- package/dist/src/utils/env-file.d.ts.map +1 -0
- package/dist/src/utils/env-file.js +180 -0
- package/dist/src/utils/env-file.js.map +1 -0
- package/dist/src/utils/env-multi-project-parser.d.ts +220 -0
- package/dist/src/utils/env-multi-project-parser.d.ts.map +1 -0
- package/dist/src/utils/env-multi-project-parser.js +401 -0
- package/dist/src/utils/env-multi-project-parser.js.map +1 -0
- package/dist/src/utils/esm-helpers.d.ts +50 -0
- package/dist/src/utils/esm-helpers.d.ts.map +1 -0
- package/dist/src/utils/esm-helpers.js +57 -0
- package/dist/src/utils/esm-helpers.js.map +1 -0
- package/dist/src/utils/execFileNoThrow.d.ts +99 -0
- package/dist/src/utils/execFileNoThrow.d.ts.map +1 -0
- package/dist/src/utils/execFileNoThrow.js +137 -0
- package/dist/src/utils/execFileNoThrow.js.map +1 -0
- package/dist/src/utils/external-resource-validator.d.ts +194 -0
- package/dist/src/utils/external-resource-validator.d.ts.map +1 -0
- package/dist/src/utils/external-resource-validator.js +953 -0
- package/dist/src/utils/external-resource-validator.js.map +1 -0
- package/dist/src/utils/generate-skills-index.d.ts +24 -0
- package/dist/src/utils/generate-skills-index.d.ts.map +1 -0
- package/dist/src/utils/generate-skills-index.js +410 -0
- package/dist/src/utils/generate-skills-index.js.map +1 -0
- package/dist/src/utils/git-detector.d.ts +84 -0
- package/dist/src/utils/git-detector.d.ts.map +1 -0
- package/dist/src/utils/git-detector.js +233 -0
- package/dist/src/utils/git-detector.js.map +1 -0
- package/dist/src/utils/git-utils.d.ts +74 -0
- package/dist/src/utils/git-utils.d.ts.map +1 -0
- package/dist/src/utils/git-utils.js +272 -0
- package/dist/src/utils/git-utils.js.map +1 -0
- package/dist/src/utils/model-selection.d.ts +75 -0
- package/dist/src/utils/model-selection.d.ts.map +1 -0
- package/dist/src/utils/model-selection.js +204 -0
- package/dist/src/utils/model-selection.js.map +1 -0
- package/dist/src/utils/plugin-validator.d.ts +161 -0
- package/dist/src/utils/plugin-validator.d.ts.map +1 -0
- package/dist/src/utils/plugin-validator.js +558 -0
- package/dist/src/utils/plugin-validator.js.map +1 -0
- package/dist/src/utils/pricing-constants.d.ts +70 -0
- package/dist/src/utils/pricing-constants.d.ts.map +1 -0
- package/dist/src/utils/pricing-constants.js +71 -0
- package/dist/src/utils/pricing-constants.js.map +1 -0
- package/dist/src/utils/project-detection.d.ts +141 -0
- package/dist/src/utils/project-detection.d.ts.map +1 -0
- package/dist/src/utils/project-detection.js +321 -0
- package/dist/src/utils/project-detection.js.map +1 -0
- package/dist/src/utils/project-mapper.d.ts +92 -0
- package/dist/src/utils/project-mapper.d.ts.map +1 -0
- package/dist/src/utils/project-mapper.js +276 -0
- package/dist/src/utils/project-mapper.js.map +1 -0
- package/dist/src/utils/spec-splitter.d.ts +75 -0
- package/dist/src/utils/spec-splitter.d.ts.map +1 -0
- package/dist/src/utils/spec-splitter.js +332 -0
- package/dist/src/utils/spec-splitter.js.map +1 -0
- package/dist/src/utils/string-utils.d.ts +40 -0
- package/dist/src/utils/string-utils.d.ts.map +1 -0
- package/dist/src/utils/string-utils.js +58 -0
- package/dist/src/utils/string-utils.js.map +1 -0
- package/dist/src/utils/translation.d.ts +187 -0
- package/dist/src/utils/translation.d.ts.map +1 -0
- package/dist/src/utils/translation.js +414 -0
- package/dist/src/utils/translation.js.map +1 -0
- package/dist/utils/git-utils.d.ts +74 -0
- package/dist/utils/git-utils.d.ts.map +1 -0
- package/dist/utils/git-utils.js +272 -0
- package/dist/utils/git-utils.js.map +1 -0
- package/package.json +3 -2
- package/plugins/specweave/hooks/lib/sync-spec-content.sh +149 -0
- package/plugins/specweave/hooks/post-increment-planning.sh +37 -1
- package/plugins/specweave/lib/hooks/git-diff-analyzer.js +213 -129
- package/plugins/specweave/lib/hooks/invoke-translator-skill.js +192 -146
- package/plugins/specweave/lib/hooks/prepare-reflection-context.js +116 -103
- package/plugins/specweave/lib/hooks/reflection-config-loader.js +125 -85
- package/plugins/specweave/lib/hooks/reflection-parser.js +385 -267
- package/plugins/specweave/lib/hooks/reflection-prompt-builder.js +226 -169
- package/plugins/specweave/lib/hooks/reflection-storage.js +297 -223
- package/plugins/specweave/lib/hooks/run-self-reflection.js +191 -120
- package/plugins/specweave/lib/hooks/sync-living-docs.js +129 -87
- package/plugins/specweave/lib/hooks/translate-file.js +300 -239
- package/plugins/specweave/lib/hooks/translate-living-docs.js +144 -88
- package/plugins/specweave/lib/hooks/types/reflection-types.js +72 -57
- package/plugins/specweave/lib/hooks/update-tasks-md.js +179 -117
- package/plugins/specweave-ado/agents/ado-multi-project-mapper/AGENT.md +521 -0
- package/plugins/specweave-ado/agents/ado-sync-judge/AGENT.md +418 -0
- package/plugins/specweave-ado/hooks/post-living-docs-update.sh +353 -0
- package/plugins/specweave-ado/hooks/post-task-completion.sh +22 -0
- package/plugins/specweave-ado/lib/ado-board-resolver.js +205 -135
- package/plugins/specweave-ado/lib/ado-client-v2.d.ts +15 -5
- package/plugins/specweave-ado/lib/ado-client-v2.d.ts.map +1 -1
- package/plugins/specweave-ado/lib/ado-client-v2.js +449 -406
- package/plugins/specweave-ado/lib/ado-client-v2.js.map +1 -1
- package/plugins/specweave-ado/lib/ado-client-v2.ts +43 -51
- package/plugins/specweave-ado/lib/ado-hierarchical-sync.js +335 -223
- package/plugins/specweave-ado/lib/ado-project-detector.js +469 -0
- package/plugins/specweave-ado/lib/ado-project-detector.ts +510 -0
- package/plugins/specweave-ado/lib/ado-spec-commit-sync.d.js +0 -0
- package/plugins/specweave-ado/lib/ado-spec-commit-sync.d.ts +38 -0
- package/plugins/specweave-ado/lib/ado-spec-commit-sync.d.ts.map +1 -0
- package/plugins/specweave-ado/lib/ado-spec-commit-sync.js +210 -0
- package/plugins/specweave-ado/lib/ado-spec-commit-sync.js.map +1 -0
- package/plugins/specweave-ado/lib/ado-spec-commit-sync.ts +288 -0
- package/plugins/specweave-ado/lib/ado-spec-content-sync.js +205 -0
- package/plugins/specweave-ado/lib/ado-spec-content-sync.ts +313 -0
- package/plugins/specweave-ado/lib/ado-spec-sync.js +414 -380
- package/plugins/specweave-ado/lib/conflict-resolver.js +297 -0
- package/plugins/specweave-ado/lib/conflict-resolver.ts +443 -0
- package/plugins/specweave-ado/lib/project-selector.js +196 -168
- package/plugins/specweave-ado/skills/ado-multi-project/SKILL.md +541 -0
- package/plugins/specweave-ado/skills/ado-resource-validator/SKILL.md +880 -0
- package/plugins/specweave-github/hooks/post-task-completion.sh +22 -0
- package/plugins/specweave-github/lib/cli-sync-increment-changes.js +20 -9
- package/plugins/specweave-github/lib/github-board-resolver.js +115 -69
- package/plugins/specweave-github/lib/github-client-v2.js +389 -400
- package/plugins/specweave-github/lib/github-client-v2.js.map +1 -1
- package/plugins/specweave-github/lib/github-client-v2.ts +13 -13
- package/plugins/specweave-github/lib/github-client.js +280 -246
- package/plugins/specweave-github/lib/github-hierarchical-sync.js +251 -168
- package/plugins/specweave-github/lib/github-issue-updater.js +4 -4
- package/plugins/specweave-github/lib/github-issue-updater.ts +4 -4
- package/plugins/specweave-github/lib/github-spec-commit-sync.d.js +0 -0
- package/plugins/specweave-github/lib/github-spec-commit-sync.d.ts +37 -0
- package/plugins/specweave-github/lib/github-spec-commit-sync.d.ts.map +1 -0
- package/plugins/specweave-github/lib/github-spec-commit-sync.js +209 -0
- package/plugins/specweave-github/lib/github-spec-commit-sync.js.map +1 -0
- package/plugins/specweave-github/lib/github-spec-commit-sync.ts +285 -0
- package/plugins/specweave-github/lib/github-spec-content-sync.js +169 -0
- package/plugins/specweave-github/lib/github-spec-content-sync.ts +255 -0
- package/plugins/specweave-github/lib/github-spec-sync.js +420 -379
- package/plugins/specweave-github/lib/github-sync-bidirectional.js +2 -2
- package/plugins/specweave-github/lib/github-sync-bidirectional.ts +2 -2
- package/plugins/specweave-github/lib/github-sync-increment-changes.js +4 -4
- package/plugins/specweave-github/lib/github-sync-increment-changes.ts +4 -4
- package/plugins/specweave-github/lib/index.js +10 -11
- package/plugins/specweave-github/lib/repo-selector.js +201 -174
- package/plugins/specweave-github/lib/subtask-sync.js +125 -132
- package/plugins/specweave-github/lib/task-parser.js +207 -191
- package/plugins/specweave-github/lib/task-sync.js +296 -344
- package/plugins/specweave-github/lib/types.js +5 -0
- package/plugins/specweave-jira/hooks/post-task-completion.sh +22 -0
- package/plugins/specweave-jira/lib/jira-board-resolver.js +79 -50
- package/plugins/specweave-jira/lib/jira-hierarchical-sync.js +191 -119
- package/plugins/specweave-jira/lib/jira-spec-commit-sync.d.js +0 -0
- package/plugins/specweave-jira/lib/jira-spec-commit-sync.d.ts +43 -0
- package/plugins/specweave-jira/lib/jira-spec-commit-sync.d.ts.map +1 -0
- package/plugins/specweave-jira/lib/jira-spec-commit-sync.js +282 -0
- package/plugins/specweave-jira/lib/jira-spec-commit-sync.js.map +1 -0
- package/plugins/specweave-jira/lib/jira-spec-commit-sync.ts +368 -0
- package/plugins/specweave-jira/lib/jira-spec-content-sync.js +260 -0
- package/plugins/specweave-jira/lib/jira-spec-content-sync.ts +367 -0
- package/plugins/specweave-jira/lib/jira-spec-sync.js +405 -366
- package/plugins/specweave-jira/lib/project-selector.js +201 -172
- package/plugins/specweave-jira/lib/reorganization-detector.js +237 -202
- package/plugins/specweave-jira/lib/setup-wizard.js +204 -162
- package/plugins/specweave-mobile/.claude-plugin/plugin.json +25 -0
- package/plugins/specweave-mobile/README.md +337 -0
- package/plugins/specweave-mobile/agents/mobile-architect/AGENT.md +642 -0
- package/plugins/specweave-mobile/skills/device-testing/SKILL.md +609 -0
- package/plugins/specweave-mobile/skills/expo-workflow/SKILL.md +440 -0
- package/plugins/specweave-mobile/skills/metro-bundler/SKILL.md +614 -0
- package/plugins/specweave-mobile/skills/mobile-debugging/SKILL.md +536 -0
- package/plugins/specweave-mobile/skills/native-modules/SKILL.md +573 -0
- package/plugins/specweave-mobile/skills/performance-optimization/SKILL.md +550 -0
- package/plugins/specweave-mobile/skills/react-native-setup/SKILL.md +216 -0
- package/plugins/specweave-release/.claude-plugin/plugin.json +41 -0
- package/plugins/specweave-release/IMPLEMENTATION.md +449 -0
- package/plugins/specweave-release/README.md +509 -0
- package/plugins/specweave-release/agents/release-manager/AGENT.md +672 -0
- package/plugins/specweave-release/commands/specweave-release-align.md +505 -0
- package/plugins/specweave-release/commands/specweave-release-init.md +430 -0
- package/plugins/specweave-release/commands/specweave-release-platform.md +439 -0
- package/plugins/specweave-release/commands/specweave-release-rc.md +495 -0
- package/plugins/specweave-release/hooks/hooks.json +15 -0
- package/plugins/specweave-release/hooks/post-task-completion.sh +110 -0
- package/plugins/specweave-release/lib/dashboard-generator.js +232 -0
- package/plugins/specweave-release/lib/dashboard-generator.ts +294 -0
- package/plugins/specweave-release/lib/dora-tracker.js +200 -0
- package/plugins/specweave-release/lib/dora-tracker.ts +361 -0
- package/plugins/specweave-release/skills/rc-manager/SKILL.md +660 -0
- package/plugins/specweave-release/skills/release-coordinator/SKILL.md +535 -0
- package/plugins/specweave-release/skills/release-strategy-advisor/SKILL.md +473 -0
- package/plugins/specweave-release/skills/version-aligner/SKILL.md +579 -0
- package/src/templates/CLAUDE.md.template +24 -0
|
@@ -0,0 +1,1328 @@
|
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
import os from 'os';
|
|
4
|
+
import chalk from 'chalk';
|
|
5
|
+
import ora from 'ora';
|
|
6
|
+
import inquirer from 'inquirer';
|
|
7
|
+
import { execFileNoThrowSync } from '../../utils/execFileNoThrow.js';
|
|
8
|
+
import { detectClaudeCli, getClaudeCliDiagnostic, getClaudeCliSuggestions } from '../../utils/claude-cli-detector.js';
|
|
9
|
+
import { AdapterLoader } from '../../adapters/adapter-loader.js';
|
|
10
|
+
import { ClaudeMdGenerator } from '../../adapters/claude-md-generator.js';
|
|
11
|
+
import { AgentsMdGenerator } from '../../adapters/agents-md-generator.js';
|
|
12
|
+
import { getDirname } from '../../utils/esm-helpers.js';
|
|
13
|
+
import { LanguageManager, isLanguageSupported, getSupportedLanguages } from '../../core/i18n/language-manager.js';
|
|
14
|
+
import { getLocaleManager } from '../../core/i18n/locale-manager.js';
|
|
15
|
+
const __dirname = getDirname(import.meta.url);
|
|
16
|
+
import { readEnvFile, parseEnvFile } from '../../utils/env-file.js';
|
|
17
|
+
/**
|
|
18
|
+
* Detect if we're in the SpecWeave framework repository itself
|
|
19
|
+
* (development mode vs. user project mode)
|
|
20
|
+
*
|
|
21
|
+
* @param targetDir - Directory to check
|
|
22
|
+
* @returns true if this is the SpecWeave framework repo
|
|
23
|
+
*/
|
|
24
|
+
async function isSpecWeaveFrameworkRepo(targetDir) {
|
|
25
|
+
try {
|
|
26
|
+
const packageJsonPath = path.join(targetDir, 'package.json');
|
|
27
|
+
if (!fs.existsSync(packageJsonPath)) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
const packageJson = await fs.readJson(packageJsonPath);
|
|
31
|
+
// Check if this is the specweave package itself
|
|
32
|
+
return packageJson.name === 'specweave';
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Create Multi-Project Folders based on Issue Tracker Configuration
|
|
40
|
+
*
|
|
41
|
+
* After issue tracker setup, this function:
|
|
42
|
+
* 1. Reads .env file to detect multi-project configuration (JIRA_PROJECTS, ADO_PROJECTS, etc.)
|
|
43
|
+
* 2. Reads config.json to get sync profiles
|
|
44
|
+
* 3. For each sync profile, creates project-specific folders
|
|
45
|
+
*
|
|
46
|
+
* Examples:
|
|
47
|
+
* - JIRA with JIRA_PROJECTS=FE,BE → Creates .specweave/docs/internal/projects/fe/ and /be/
|
|
48
|
+
* - ADO with ADO_PROJECTS=Frontend,Backend → Creates /frontend/ and /backend/
|
|
49
|
+
* - GitHub (single repo) → Creates /default/ folder
|
|
50
|
+
*
|
|
51
|
+
* @param targetDir - Project root directory
|
|
52
|
+
*/
|
|
53
|
+
async function createMultiProjectFolders(targetDir) {
|
|
54
|
+
const envPath = path.join(targetDir, '.env');
|
|
55
|
+
const configPath = path.join(targetDir, '.specweave', 'config.json');
|
|
56
|
+
// Skip if no .env or config.json
|
|
57
|
+
if (!fs.existsSync(envPath)) {
|
|
58
|
+
return; // No issue tracker configured
|
|
59
|
+
}
|
|
60
|
+
// Read and parse .env file
|
|
61
|
+
const envContent = readEnvFile(envPath);
|
|
62
|
+
const envVars = parseEnvFile(envContent);
|
|
63
|
+
// Detect multi-project configuration
|
|
64
|
+
const jiraProjects = envVars.JIRA_PROJECTS?.split(',').map((p) => p.trim()).filter(Boolean);
|
|
65
|
+
const adoProjects = envVars.ADO_PROJECTS?.split(',').map((p) => p.trim()).filter(Boolean);
|
|
66
|
+
const jiraStrategy = envVars.JIRA_STRATEGY;
|
|
67
|
+
const adoStrategy = envVars.ADO_STRATEGY;
|
|
68
|
+
// If no multi-project config, skip
|
|
69
|
+
if (!jiraProjects?.length && !adoProjects?.length) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
// Create sync profile if not exists
|
|
73
|
+
let config = {};
|
|
74
|
+
if (fs.existsSync(configPath)) {
|
|
75
|
+
config = await fs.readJson(configPath);
|
|
76
|
+
}
|
|
77
|
+
// Initialize sync config if missing
|
|
78
|
+
if (!config.sync) {
|
|
79
|
+
config.sync = {
|
|
80
|
+
enabled: true,
|
|
81
|
+
profiles: {},
|
|
82
|
+
activeProfile: null,
|
|
83
|
+
settings: {
|
|
84
|
+
autoCreateIssue: true,
|
|
85
|
+
syncDirection: 'bidirectional'
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
// Create JIRA sync profile from .env
|
|
90
|
+
if (jiraProjects?.length && jiraStrategy === 'project-per-team') {
|
|
91
|
+
const profileId = 'jira-default';
|
|
92
|
+
if (!config.sync.profiles[profileId]) {
|
|
93
|
+
const jiraProfile = {
|
|
94
|
+
provider: 'jira',
|
|
95
|
+
displayName: 'Jira Default',
|
|
96
|
+
config: {
|
|
97
|
+
domain: envVars.JIRA_DOMAIN || '',
|
|
98
|
+
projects: jiraProjects // Multi-project support
|
|
99
|
+
},
|
|
100
|
+
timeRange: {
|
|
101
|
+
default: '1M',
|
|
102
|
+
max: '6M'
|
|
103
|
+
},
|
|
104
|
+
rateLimits: {
|
|
105
|
+
maxItemsPerSync: 500,
|
|
106
|
+
warnThreshold: 100
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
config.sync.profiles[profileId] = jiraProfile;
|
|
110
|
+
config.sync.activeProfile = profileId;
|
|
111
|
+
// Save config
|
|
112
|
+
await fs.writeJson(configPath, config, { spaces: 2 });
|
|
113
|
+
console.log(chalk.blue('\n📁 Creating Multi-Project Folders'));
|
|
114
|
+
console.log(chalk.gray(` Detected: ${jiraProjects.length} Jira projects (${jiraProjects.join(', ')})`));
|
|
115
|
+
// Create project-specific folders following v0.8.0+ architecture
|
|
116
|
+
// Structure: .specweave/docs/internal/projects/{project-id}/{specs,modules,team,architecture,legacy}
|
|
117
|
+
for (const projectKey of jiraProjects) {
|
|
118
|
+
const projectId = projectKey.toLowerCase(); // FE → fe, BE → be
|
|
119
|
+
const projectBasePath = path.join(targetDir, '.specweave', 'docs', 'internal', 'projects', projectId);
|
|
120
|
+
// Create full project structure
|
|
121
|
+
const projectSubfolders = [
|
|
122
|
+
path.join(projectBasePath, 'specs'), // Living docs specs
|
|
123
|
+
path.join(projectBasePath, 'modules'), // Module/component documentation
|
|
124
|
+
path.join(projectBasePath, 'team'), // Team playbooks
|
|
125
|
+
path.join(projectBasePath, 'architecture'), // Project-specific ADRs
|
|
126
|
+
path.join(projectBasePath, 'legacy') // Brownfield imports
|
|
127
|
+
];
|
|
128
|
+
for (const subfolder of projectSubfolders) {
|
|
129
|
+
if (!fs.existsSync(subfolder)) {
|
|
130
|
+
fs.mkdirSync(subfolder, { recursive: true });
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
console.log(chalk.green(` ✓ Created project: ${projectKey} → projects/${projectId}/`));
|
|
134
|
+
}
|
|
135
|
+
console.log('');
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
// ADO multi-project support (future)
|
|
139
|
+
if (adoProjects?.length && adoStrategy === 'project-per-team') {
|
|
140
|
+
// TODO: Implement ADO multi-project folder creation
|
|
141
|
+
// Similar logic to JIRA above
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
export async function initCommand(projectName, options = {}) {
|
|
145
|
+
// Validate and normalize language option
|
|
146
|
+
const language = options.language?.toLowerCase() || 'en';
|
|
147
|
+
// Validate language if provided
|
|
148
|
+
if (options.language && !isLanguageSupported(language)) {
|
|
149
|
+
const locale = getLocaleManager('en'); // Use English for error messages about invalid language
|
|
150
|
+
console.error(chalk.red(`\n${locale.t('cli', 'init.errors.invalidLanguage', { language: options.language })}`));
|
|
151
|
+
console.error(chalk.yellow(`${locale.t('cli', 'init.errors.supportedLanguages', { languages: getSupportedLanguages().join(', ') })}\n`));
|
|
152
|
+
process.exit(1);
|
|
153
|
+
}
|
|
154
|
+
// Initialize LanguageManager and LocaleManager
|
|
155
|
+
const i18n = new LanguageManager({ defaultLanguage: language });
|
|
156
|
+
const locale = getLocaleManager(language);
|
|
157
|
+
// Display welcome message in user's language
|
|
158
|
+
console.log(chalk.blue.bold(`\n${locale.t('cli', 'init.welcome')}\n`));
|
|
159
|
+
let targetDir;
|
|
160
|
+
let finalProjectName;
|
|
161
|
+
let usedDotNotation = false;
|
|
162
|
+
let continueExisting = false; // Track if user chose to continue with existing project
|
|
163
|
+
// Handle "." for current directory initialization
|
|
164
|
+
if (projectName === '.') {
|
|
165
|
+
usedDotNotation = true;
|
|
166
|
+
targetDir = process.cwd();
|
|
167
|
+
// CRITICAL SAFETY CHECK: Prevent initialization in home directory
|
|
168
|
+
const homeDir = os.homedir();
|
|
169
|
+
if (path.resolve(targetDir) === path.resolve(homeDir)) {
|
|
170
|
+
console.log('');
|
|
171
|
+
console.log(chalk.red.bold('❌ DANGEROUS: Cannot initialize SpecWeave in home directory!'));
|
|
172
|
+
console.log('');
|
|
173
|
+
console.log(chalk.yellow(' Your home directory contains ALL your projects.'));
|
|
174
|
+
console.log(chalk.yellow(' Initializing here would treat everything as one project.'));
|
|
175
|
+
console.log('');
|
|
176
|
+
console.log(chalk.cyan('💡 What to do instead:'));
|
|
177
|
+
console.log(chalk.white(' 1. Create a project directory:'));
|
|
178
|
+
console.log(chalk.gray(' mkdir ~/Projects/my-project'));
|
|
179
|
+
console.log(chalk.white(' 2. Navigate to it:'));
|
|
180
|
+
console.log(chalk.gray(' cd ~/Projects/my-project'));
|
|
181
|
+
console.log(chalk.white(' 3. Initialize:'));
|
|
182
|
+
console.log(chalk.gray(' specweave init .'));
|
|
183
|
+
console.log('');
|
|
184
|
+
console.log(chalk.white(' Or use a project name:'));
|
|
185
|
+
console.log(chalk.gray(' specweave init my-project'));
|
|
186
|
+
console.log('');
|
|
187
|
+
process.exit(1);
|
|
188
|
+
}
|
|
189
|
+
const dirName = path.basename(targetDir);
|
|
190
|
+
// Validate directory name is suitable for project name
|
|
191
|
+
if (!/^[a-z0-9-]+$/.test(dirName)) {
|
|
192
|
+
console.log(chalk.yellow(`\n${locale.t('cli', 'init.warnings.invalidDirName', { dirName })}`));
|
|
193
|
+
const suggestedName = dirName.toLowerCase().replace(/[^a-z0-9-]/g, '-');
|
|
194
|
+
const { name } = await inquirer.prompt([
|
|
195
|
+
{
|
|
196
|
+
type: 'input',
|
|
197
|
+
name: 'name',
|
|
198
|
+
message: 'Project name (for templates):',
|
|
199
|
+
default: suggestedName,
|
|
200
|
+
validate: (input) => {
|
|
201
|
+
if (/^[a-z0-9-]+$/.test(input))
|
|
202
|
+
return true;
|
|
203
|
+
return 'Project name must be lowercase letters, numbers, and hyphens only';
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
]);
|
|
207
|
+
finalProjectName = name;
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
finalProjectName = dirName;
|
|
211
|
+
}
|
|
212
|
+
// Safety: Warn if directory is not empty
|
|
213
|
+
const allFiles = fs.readdirSync(targetDir);
|
|
214
|
+
const existingFiles = allFiles.filter(f => !f.startsWith('.')); // Ignore hidden files
|
|
215
|
+
if (existingFiles.length > 0 && !options.force) {
|
|
216
|
+
console.log(chalk.yellow(`\n${locale.t('cli', 'init.warnings.directoryNotEmpty', { count: existingFiles.length, plural: existingFiles.length === 1 ? '' : 's' })}`));
|
|
217
|
+
const { confirm } = await inquirer.prompt([
|
|
218
|
+
{
|
|
219
|
+
type: 'confirm',
|
|
220
|
+
name: 'confirm',
|
|
221
|
+
message: 'Initialize SpecWeave in current directory?',
|
|
222
|
+
default: false,
|
|
223
|
+
},
|
|
224
|
+
]);
|
|
225
|
+
if (!confirm) {
|
|
226
|
+
console.log(chalk.yellow(locale.t('cli', 'init.errors.cancelled')));
|
|
227
|
+
process.exit(0);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
// Check if .specweave already exists - SMART RE-INITIALIZATION
|
|
231
|
+
if (fs.existsSync(path.join(targetDir, '.specweave'))) {
|
|
232
|
+
console.log(chalk.blue('\n📦 Existing SpecWeave project detected!'));
|
|
233
|
+
console.log(chalk.gray(' Found .specweave/ folder with your increments, docs, and configuration.\n'));
|
|
234
|
+
let action;
|
|
235
|
+
if (options.force) {
|
|
236
|
+
// Force mode: Skip interactive prompt and do fresh start
|
|
237
|
+
action = 'fresh';
|
|
238
|
+
console.log(chalk.yellow(' 🔄 Force mode: Performing fresh start (removing existing .specweave/)'));
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
// Interactive mode: Ask user what to do
|
|
242
|
+
const result = await inquirer.prompt([
|
|
243
|
+
{
|
|
244
|
+
type: 'list',
|
|
245
|
+
name: 'action',
|
|
246
|
+
message: 'What would you like to do?',
|
|
247
|
+
choices: [
|
|
248
|
+
{
|
|
249
|
+
name: '✨ Continue working (keep all existing increments, docs, and history)',
|
|
250
|
+
value: 'continue',
|
|
251
|
+
short: 'Continue'
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
name: '🔄 Fresh start (delete .specweave/ and start from scratch)',
|
|
255
|
+
value: 'fresh',
|
|
256
|
+
short: 'Fresh start'
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
name: '❌ Cancel (exit without changes)',
|
|
260
|
+
value: 'cancel',
|
|
261
|
+
short: 'Cancel'
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
default: 'continue'
|
|
265
|
+
},
|
|
266
|
+
]);
|
|
267
|
+
action = result.action;
|
|
268
|
+
}
|
|
269
|
+
if (action === 'cancel') {
|
|
270
|
+
console.log(chalk.yellow('\n⏸️ Initialization cancelled. No changes made.'));
|
|
271
|
+
process.exit(0);
|
|
272
|
+
}
|
|
273
|
+
if (action === 'fresh') {
|
|
274
|
+
if (!options.force) {
|
|
275
|
+
// Interactive mode: Ask for confirmation
|
|
276
|
+
console.log(chalk.yellow('\n⚠️ WARNING: This will DELETE all increments, docs, and configuration!'));
|
|
277
|
+
const { confirmFresh } = await inquirer.prompt([
|
|
278
|
+
{
|
|
279
|
+
type: 'confirm',
|
|
280
|
+
name: 'confirmFresh',
|
|
281
|
+
message: 'Are you sure you want to start fresh? (all .specweave/ content will be lost)',
|
|
282
|
+
default: false,
|
|
283
|
+
},
|
|
284
|
+
]);
|
|
285
|
+
if (!confirmFresh) {
|
|
286
|
+
console.log(chalk.yellow('\n⏸️ Fresh start cancelled. No changes made.'));
|
|
287
|
+
process.exit(0);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
// Delete .specweave/ for fresh start
|
|
291
|
+
fs.removeSync(path.join(targetDir, '.specweave'));
|
|
292
|
+
console.log(chalk.blue(' ♻️ Removed .specweave/ (fresh start)'));
|
|
293
|
+
// NOTE: No need to delete .claude/ - marketplace is GLOBAL, not per-project
|
|
294
|
+
console.log(chalk.green(' ✅ Starting fresh - will create new .specweave/ structure\n'));
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
// Continue working - keep everything
|
|
298
|
+
continueExisting = true;
|
|
299
|
+
console.log(chalk.green('\n✅ Continuing with existing project'));
|
|
300
|
+
console.log(chalk.gray(' → Keeping all increments, docs, and history'));
|
|
301
|
+
console.log(chalk.gray(' → Config will be updated if needed\n'));
|
|
302
|
+
// NOTE: No need to refresh .claude/settings.json - marketplace is GLOBAL via CLI
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
// Original behavior: create subdirectory
|
|
308
|
+
// 1. Get project name if not provided
|
|
309
|
+
if (!projectName) {
|
|
310
|
+
const answers = await inquirer.prompt([
|
|
311
|
+
{
|
|
312
|
+
type: 'input',
|
|
313
|
+
name: 'projectName',
|
|
314
|
+
message: 'Project name:',
|
|
315
|
+
default: 'my-saas',
|
|
316
|
+
validate: (input) => {
|
|
317
|
+
if (/^[a-z0-9-]+$/.test(input))
|
|
318
|
+
return true;
|
|
319
|
+
return 'Project name must be lowercase letters, numbers, and hyphens only';
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
]);
|
|
323
|
+
projectName = answers.projectName;
|
|
324
|
+
}
|
|
325
|
+
targetDir = path.resolve(process.cwd(), projectName);
|
|
326
|
+
finalProjectName = projectName;
|
|
327
|
+
// 2. Check if directory exists
|
|
328
|
+
if (fs.existsSync(targetDir)) {
|
|
329
|
+
// Brownfield-safe: Check what's in the directory
|
|
330
|
+
const allFiles = fs.readdirSync(targetDir);
|
|
331
|
+
const existingFiles = allFiles.filter(f => !f.startsWith('.')); // Ignore hidden files
|
|
332
|
+
const hasSpecweave = fs.existsSync(path.join(targetDir, '.specweave'));
|
|
333
|
+
if (existingFiles.length > 0 || hasSpecweave) {
|
|
334
|
+
console.log(chalk.yellow(`\nDirectory ${projectName} exists with ${existingFiles.length} file(s).`));
|
|
335
|
+
if (hasSpecweave) {
|
|
336
|
+
// SMART RE-INITIALIZATION (same as current directory case)
|
|
337
|
+
console.log(chalk.blue('\n📦 Existing SpecWeave project detected!'));
|
|
338
|
+
console.log(chalk.gray(' Found .specweave/ folder with your increments, docs, and configuration.\n'));
|
|
339
|
+
const { action } = await inquirer.prompt([
|
|
340
|
+
{
|
|
341
|
+
type: 'list',
|
|
342
|
+
name: 'action',
|
|
343
|
+
message: 'What would you like to do?',
|
|
344
|
+
choices: [
|
|
345
|
+
{
|
|
346
|
+
name: '✨ Continue working (keep all existing increments, docs, and history)',
|
|
347
|
+
value: 'continue',
|
|
348
|
+
short: 'Continue'
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
name: '🔄 Fresh start (delete .specweave/ and start from scratch)',
|
|
352
|
+
value: 'fresh',
|
|
353
|
+
short: 'Fresh start'
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
name: '❌ Cancel (exit without changes)',
|
|
357
|
+
value: 'cancel',
|
|
358
|
+
short: 'Cancel'
|
|
359
|
+
}
|
|
360
|
+
],
|
|
361
|
+
default: 'continue'
|
|
362
|
+
},
|
|
363
|
+
]);
|
|
364
|
+
if (action === 'cancel') {
|
|
365
|
+
console.log(chalk.yellow('\n⏸️ Initialization cancelled. No changes made.'));
|
|
366
|
+
process.exit(0);
|
|
367
|
+
}
|
|
368
|
+
if (action === 'fresh') {
|
|
369
|
+
console.log(chalk.yellow('\n⚠️ WARNING: This will DELETE all increments, docs, and configuration!'));
|
|
370
|
+
const { confirmFresh } = await inquirer.prompt([
|
|
371
|
+
{
|
|
372
|
+
type: 'confirm',
|
|
373
|
+
name: 'confirmFresh',
|
|
374
|
+
message: 'Are you sure you want to start fresh? (all .specweave/ content will be lost)',
|
|
375
|
+
default: false,
|
|
376
|
+
},
|
|
377
|
+
]);
|
|
378
|
+
if (!confirmFresh) {
|
|
379
|
+
console.log(chalk.yellow('\n⏸️ Fresh start cancelled. No changes made.'));
|
|
380
|
+
process.exit(0);
|
|
381
|
+
}
|
|
382
|
+
// Delete .specweave/ for fresh start
|
|
383
|
+
fs.removeSync(path.join(targetDir, '.specweave'));
|
|
384
|
+
console.log(chalk.blue(' ♻️ Removed .specweave/ (fresh start)'));
|
|
385
|
+
// NOTE: No need to delete .claude/ - marketplace is GLOBAL, not per-project
|
|
386
|
+
console.log(chalk.green(' ✅ Starting fresh - will create new .specweave/ structure\n'));
|
|
387
|
+
}
|
|
388
|
+
else {
|
|
389
|
+
// Continue working - keep everything
|
|
390
|
+
continueExisting = true;
|
|
391
|
+
console.log(chalk.green('\n✅ Continuing with existing project'));
|
|
392
|
+
console.log(chalk.gray(' → Keeping all increments, docs, and history'));
|
|
393
|
+
console.log(chalk.gray(' → Config will be updated if needed\n'));
|
|
394
|
+
// NOTE: No need to refresh .claude/settings.json - marketplace is GLOBAL via CLI
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
else {
|
|
398
|
+
// No .specweave/ folder, just brownfield directory with files
|
|
399
|
+
const { initExisting } = await inquirer.prompt([
|
|
400
|
+
{
|
|
401
|
+
type: 'confirm',
|
|
402
|
+
name: 'initExisting',
|
|
403
|
+
message: 'Initialize SpecWeave in existing directory (non-destructive)?',
|
|
404
|
+
default: false,
|
|
405
|
+
},
|
|
406
|
+
]);
|
|
407
|
+
if (!initExisting) {
|
|
408
|
+
console.log(chalk.yellow(locale.t('cli', 'init.errors.cancelled')));
|
|
409
|
+
process.exit(0);
|
|
410
|
+
}
|
|
411
|
+
console.log(chalk.green(' ✅ Initializing in existing directory (brownfield-safe)\n'));
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
else {
|
|
416
|
+
fs.mkdirSync(targetDir, { recursive: true });
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
// 3. Check for nested .specweave/ (CRITICAL: prevent nested folders)
|
|
420
|
+
const parentSpecweaveFolders = detectNestedSpecweave(targetDir);
|
|
421
|
+
if (parentSpecweaveFolders && parentSpecweaveFolders.length > 0) {
|
|
422
|
+
console.log('');
|
|
423
|
+
console.log(chalk.red.bold(locale.t('cli', 'init.errors.nestedNotSupported')));
|
|
424
|
+
console.log('');
|
|
425
|
+
// Check if home directory has .specweave/ (special warning)
|
|
426
|
+
const homeDirFolder = parentSpecweaveFolders.find(f => f.isHomeDir);
|
|
427
|
+
if (homeDirFolder) {
|
|
428
|
+
console.log(chalk.red.bold(' ⚠️ CRITICAL: Found .specweave/ in HOME DIRECTORY!'));
|
|
429
|
+
console.log(chalk.yellow(` ${homeDirFolder.path}`));
|
|
430
|
+
console.log('');
|
|
431
|
+
console.log(chalk.yellow(' This is ALMOST ALWAYS a mistake!'));
|
|
432
|
+
console.log(chalk.gray(' • Your home directory should NOT be a SpecWeave project'));
|
|
433
|
+
console.log(chalk.gray(' • This treats ALL your files as one giant project'));
|
|
434
|
+
console.log(chalk.gray(' • You likely ran "specweave init ." from home by accident'));
|
|
435
|
+
console.log('');
|
|
436
|
+
console.log(chalk.cyan.bold(' 💡 Quick fix:'));
|
|
437
|
+
console.log(chalk.white(` rm -rf "${homeDirFolder.path}/.specweave"`));
|
|
438
|
+
console.log(chalk.gray(' Then try your command again'));
|
|
439
|
+
console.log('');
|
|
440
|
+
}
|
|
441
|
+
// Show all found .specweave/ folders
|
|
442
|
+
if (parentSpecweaveFolders.length === 1 && !homeDirFolder) {
|
|
443
|
+
console.log(chalk.yellow(` ${locale.t('cli', 'init.errors.parentFound')}`));
|
|
444
|
+
console.log(chalk.white(` ${parentSpecweaveFolders[0].path}`));
|
|
445
|
+
}
|
|
446
|
+
else if (!homeDirFolder) {
|
|
447
|
+
console.log(chalk.yellow(` Found ${parentSpecweaveFolders.length} parent .specweave/ folders:`));
|
|
448
|
+
console.log('');
|
|
449
|
+
// Sort by depth (closest first)
|
|
450
|
+
const sortedFolders = [...parentSpecweaveFolders].sort((a, b) => a.depth - b.depth);
|
|
451
|
+
sortedFolders.forEach((folder, index) => {
|
|
452
|
+
const marker = index === 0 ? chalk.green('✓ CLOSEST') : chalk.gray(` ${folder.depth} level${folder.depth > 1 ? 's' : ''} up`);
|
|
453
|
+
console.log(` ${marker}: ${chalk.white(folder.path)}`);
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
console.log('');
|
|
457
|
+
console.log(chalk.cyan(` ${locale.t('cli', 'init.info.nestedEnforcement')}`));
|
|
458
|
+
console.log(chalk.gray(` ${locale.t('cli', 'init.info.nestedBullet1')}`));
|
|
459
|
+
console.log(chalk.gray(` ${locale.t('cli', 'init.info.nestedBullet2')}`));
|
|
460
|
+
console.log(chalk.gray(` ${locale.t('cli', 'init.info.nestedBullet3')}`));
|
|
461
|
+
console.log('');
|
|
462
|
+
// Suggest using the CLOSEST folder (most relevant)
|
|
463
|
+
const closestFolder = parentSpecweaveFolders.reduce((closest, current) => current.depth < closest.depth ? current : closest);
|
|
464
|
+
console.log(chalk.cyan(` ${locale.t('cli', 'init.info.nestedToFix')}`));
|
|
465
|
+
console.log(chalk.green.bold(` Recommended: Use the CLOSEST .specweave/ folder`));
|
|
466
|
+
console.log(chalk.white(` ${locale.t('cli', 'init.nestedCdCommand', { path: closestFolder.path })}`));
|
|
467
|
+
console.log(chalk.white(` ${locale.t('cli', 'init.nestedIncCommand')}`));
|
|
468
|
+
console.log('');
|
|
469
|
+
// Provide cleanup option if user has multiple unnecessary folders
|
|
470
|
+
if (parentSpecweaveFolders.length > 1) {
|
|
471
|
+
console.log(chalk.yellow.bold(` 💡 Tip: Multiple .specweave/ folders detected`));
|
|
472
|
+
console.log(chalk.gray(` If some are unnecessary, consider removing them:`));
|
|
473
|
+
console.log('');
|
|
474
|
+
parentSpecweaveFolders.forEach(folder => {
|
|
475
|
+
console.log(chalk.gray(` rm -rf "${folder.path}/.specweave" # Remove if not needed`));
|
|
476
|
+
});
|
|
477
|
+
console.log('');
|
|
478
|
+
}
|
|
479
|
+
process.exit(1);
|
|
480
|
+
}
|
|
481
|
+
const spinner = ora('Creating SpecWeave project...').start();
|
|
482
|
+
try {
|
|
483
|
+
// 4. Detect or select tool
|
|
484
|
+
const adapterLoader = new AdapterLoader();
|
|
485
|
+
let toolName;
|
|
486
|
+
if (options.adapter) {
|
|
487
|
+
// User explicitly chose a tool via --adapter flag
|
|
488
|
+
toolName = options.adapter;
|
|
489
|
+
spinner.text = `Using ${toolName}...`;
|
|
490
|
+
}
|
|
491
|
+
else {
|
|
492
|
+
// SMART CHECK: If continuing existing project, read existing adapter from config
|
|
493
|
+
let existingAdapter = null;
|
|
494
|
+
if (continueExisting) {
|
|
495
|
+
const existingConfigPath = path.join(targetDir, '.specweave', 'config.json');
|
|
496
|
+
if (fs.existsSync(existingConfigPath)) {
|
|
497
|
+
try {
|
|
498
|
+
const existingConfig = fs.readJsonSync(existingConfigPath);
|
|
499
|
+
existingAdapter = existingConfig?.adapters?.default || null;
|
|
500
|
+
}
|
|
501
|
+
catch (error) {
|
|
502
|
+
// Invalid config, will proceed with detection
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
// Detect tool and always ask user (even if matches existing config)
|
|
507
|
+
const detectedTool = await adapterLoader.detectTool();
|
|
508
|
+
spinner.stop();
|
|
509
|
+
console.log('');
|
|
510
|
+
console.log(chalk.cyan(`🔍 ${locale.t('cli', 'init.toolDetection.header')}`));
|
|
511
|
+
// Show existing adapter if present
|
|
512
|
+
if (existingAdapter) {
|
|
513
|
+
console.log(chalk.blue(` 📋 Current adapter: ${existingAdapter}`));
|
|
514
|
+
if (existingAdapter === detectedTool) {
|
|
515
|
+
console.log(chalk.gray(` Detected tool matches current config`));
|
|
516
|
+
}
|
|
517
|
+
else {
|
|
518
|
+
console.log(chalk.yellow(` ⚠️ Detected tool (${detectedTool}) differs from config`));
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
else {
|
|
522
|
+
// No existing adapter (new project)
|
|
523
|
+
if (detectedTool === 'claude') {
|
|
524
|
+
console.log(chalk.gray(` Recommended: ${detectedTool} (no other tool detected)`));
|
|
525
|
+
}
|
|
526
|
+
else {
|
|
527
|
+
console.log(chalk.gray(` ${locale.t('cli', 'init.toolDetection.detected', { tool: detectedTool })}`));
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
console.log('');
|
|
531
|
+
// Check if running in CI/non-interactive environment
|
|
532
|
+
const isCI = process.env.CI === 'true' ||
|
|
533
|
+
process.env.GITHUB_ACTIONS === 'true' ||
|
|
534
|
+
process.env.GITLAB_CI === 'true' ||
|
|
535
|
+
process.env.CIRCLECI === 'true' ||
|
|
536
|
+
!process.stdin.isTTY;
|
|
537
|
+
let confirmTool = true; // Default to yes
|
|
538
|
+
if (isCI) {
|
|
539
|
+
// In CI, automatically use detected tool without prompting
|
|
540
|
+
console.log(chalk.gray(` ${locale.t('cli', 'init.toolDetection.ciAutoConfirm', { tool: detectedTool })}`));
|
|
541
|
+
toolName = detectedTool;
|
|
542
|
+
}
|
|
543
|
+
else {
|
|
544
|
+
// Interactive mode - ask for confirmation
|
|
545
|
+
const response = await inquirer.prompt([
|
|
546
|
+
{
|
|
547
|
+
type: 'confirm',
|
|
548
|
+
name: 'confirmTool',
|
|
549
|
+
message: locale.t('cli', 'init.toolDetection.confirmPrompt', { tool: detectedTool }),
|
|
550
|
+
default: true
|
|
551
|
+
}
|
|
552
|
+
]);
|
|
553
|
+
confirmTool = response.confirmTool;
|
|
554
|
+
}
|
|
555
|
+
if (!confirmTool) {
|
|
556
|
+
// Let user choose from available tools
|
|
557
|
+
const { selectedTool } = await inquirer.prompt([
|
|
558
|
+
{
|
|
559
|
+
type: 'list',
|
|
560
|
+
name: 'selectedTool',
|
|
561
|
+
message: locale.t('cli', 'init.toolDetection.selectPrompt'),
|
|
562
|
+
choices: [
|
|
563
|
+
{ name: `Claude Code (Recommended - Full automation)`, value: 'claude' },
|
|
564
|
+
{ name: 'Cursor (Partial - AGENTS.md compilation, team commands, less reliable)', value: 'cursor' },
|
|
565
|
+
{ name: 'Other (Copilot, ChatGPT, Gemini - Limited: no hooks, manual workflow, high context usage)', value: 'generic' }
|
|
566
|
+
]
|
|
567
|
+
}
|
|
568
|
+
]);
|
|
569
|
+
toolName = selectedTool;
|
|
570
|
+
}
|
|
571
|
+
else {
|
|
572
|
+
// User confirmed detected tool
|
|
573
|
+
toolName = detectedTool;
|
|
574
|
+
}
|
|
575
|
+
spinner.start(`Using ${toolName}...`);
|
|
576
|
+
}
|
|
577
|
+
// 4. Create directory structure (adapter-specific)
|
|
578
|
+
// Skip if continuing with existing project (directories already exist)
|
|
579
|
+
if (!continueExisting) {
|
|
580
|
+
createDirectoryStructure(targetDir, toolName);
|
|
581
|
+
spinner.text = 'Directory structure created...';
|
|
582
|
+
}
|
|
583
|
+
else {
|
|
584
|
+
spinner.text = 'Using existing directory structure...';
|
|
585
|
+
}
|
|
586
|
+
// 5. Configure GitHub marketplace for Claude Code
|
|
587
|
+
// ✅ NEW APPROACH: Claude Code fetches plugins from GitHub (no local copying!)
|
|
588
|
+
if (toolName === 'claude') {
|
|
589
|
+
try {
|
|
590
|
+
spinner.text = 'Configuring GitHub marketplace...';
|
|
591
|
+
// Settings.json will be created by setupClaudePluginAutoRegistration()
|
|
592
|
+
// No need to copy marketplace or plugins - everything is fetched from GitHub
|
|
593
|
+
spinner.succeed('GitHub marketplace configured');
|
|
594
|
+
console.log(chalk.gray(` ✓ Marketplace: github.com/anton-abyzov/specweave/.claude-plugin`));
|
|
595
|
+
console.log(chalk.gray(` ✓ Plugins fetch on-demand (no local copies = faster init)`));
|
|
596
|
+
}
|
|
597
|
+
catch (error) {
|
|
598
|
+
// Log errors in debug mode for troubleshooting
|
|
599
|
+
if (process.env.DEBUG) {
|
|
600
|
+
spinner.stop();
|
|
601
|
+
console.error(chalk.red(`\n❌ Marketplace setup error: ${error instanceof Error ? error.message : String(error)}`));
|
|
602
|
+
if (error instanceof Error && error.stack) {
|
|
603
|
+
console.error(chalk.gray(error.stack));
|
|
604
|
+
}
|
|
605
|
+
spinner.start();
|
|
606
|
+
}
|
|
607
|
+
console.warn(chalk.yellow(`\n${locale.t('cli', 'init.warnings.marketplaceCopyFailed')}`));
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
// 6. Copy base templates (config, README, CLAUDE.md - same for all)
|
|
611
|
+
// Skip if continuing with existing project (files already exist)
|
|
612
|
+
if (!continueExisting) {
|
|
613
|
+
const templatesDir = findSourceDir('templates');
|
|
614
|
+
await copyTemplates(templatesDir, targetDir, finalProjectName, language);
|
|
615
|
+
spinner.text = 'Base templates copied...';
|
|
616
|
+
}
|
|
617
|
+
else {
|
|
618
|
+
spinner.text = 'Skipping template copying (using existing files)...';
|
|
619
|
+
}
|
|
620
|
+
// 6. Install based on tool
|
|
621
|
+
if (toolName === 'claude') {
|
|
622
|
+
// DEFAULT: Native Claude Code plugins (installed globally via /plugin install)
|
|
623
|
+
// No per-project copying needed - plugins work across all projects!
|
|
624
|
+
spinner.text = 'Configuring for Claude Code...';
|
|
625
|
+
console.log(`\n${locale.t('cli', 'init.claudeNativeComplete')}`);
|
|
626
|
+
console.log(` ${locale.t('cli', 'init.claudeNativeBenefits')}`);
|
|
627
|
+
}
|
|
628
|
+
else {
|
|
629
|
+
// Use adapter for non-Claude tools
|
|
630
|
+
spinner.text = `Installing ${toolName} adapter...`;
|
|
631
|
+
const adapter = adapterLoader.getAdapter(toolName);
|
|
632
|
+
if (!adapter) {
|
|
633
|
+
throw new Error(`Adapter not found: ${toolName}`);
|
|
634
|
+
}
|
|
635
|
+
await adapterLoader.checkRequirements(toolName);
|
|
636
|
+
await adapter.install({
|
|
637
|
+
projectPath: targetDir,
|
|
638
|
+
projectName: finalProjectName,
|
|
639
|
+
techStack: options.techStack ? { language: options.techStack } : undefined,
|
|
640
|
+
docsApproach: 'incremental'
|
|
641
|
+
});
|
|
642
|
+
// 6. Copy plugins/ folder for non-Claude adapters
|
|
643
|
+
// CRITICAL: Copilot/Cursor/Generic need local plugins/ folder!
|
|
644
|
+
// AGENTS.md instructs AI to read plugins/specweave/commands/*.md
|
|
645
|
+
// Without this folder, those commands don't exist in the project!
|
|
646
|
+
if (toolName !== 'claude') {
|
|
647
|
+
spinner.start('Copying plugins folder for command execution...');
|
|
648
|
+
try {
|
|
649
|
+
const specweavePackageRoot = findPackageRoot(__dirname);
|
|
650
|
+
if (specweavePackageRoot) {
|
|
651
|
+
const sourcePluginsDir = path.join(specweavePackageRoot, 'plugins');
|
|
652
|
+
const targetPluginsDir = path.join(targetDir, 'plugins');
|
|
653
|
+
if (fs.existsSync(sourcePluginsDir)) {
|
|
654
|
+
// Copy entire plugins/ folder from SpecWeave package to user project
|
|
655
|
+
fs.copySync(sourcePluginsDir, targetPluginsDir, {
|
|
656
|
+
overwrite: true,
|
|
657
|
+
filter: (src) => {
|
|
658
|
+
// Exclude .DS_Store and other hidden files
|
|
659
|
+
const basename = path.basename(src);
|
|
660
|
+
return !basename.startsWith('.');
|
|
661
|
+
}
|
|
662
|
+
});
|
|
663
|
+
spinner.succeed('Plugins folder copied successfully');
|
|
664
|
+
console.log(chalk.green(' ✔ AI can now execute SpecWeave commands'));
|
|
665
|
+
console.log(chalk.gray(' → Copilot/Cursor will read plugins/specweave/commands/*.md'));
|
|
666
|
+
}
|
|
667
|
+
else {
|
|
668
|
+
spinner.warn('Could not find plugins/ in SpecWeave package');
|
|
669
|
+
console.log(chalk.yellow(' → Command execution may not work without plugins/ folder'));
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
else {
|
|
673
|
+
spinner.warn('Could not locate SpecWeave package');
|
|
674
|
+
console.log(chalk.yellow(' → Skipping plugins/ folder copy'));
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
catch (error) {
|
|
678
|
+
spinner.warn('Could not copy plugins folder');
|
|
679
|
+
console.log(chalk.yellow(` ${error instanceof Error ? error.message : error}`));
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
// 7. Install core plugin for non-Claude adapters
|
|
683
|
+
// CRITICAL: Cursor/Copilot/Generic need plugin files in project!
|
|
684
|
+
// Claude uses plugin system (global), but others need local files for AGENTS.md/instructions.md
|
|
685
|
+
try {
|
|
686
|
+
spinner.start('Installing SpecWeave core plugin...');
|
|
687
|
+
// Load core plugin from plugins/specweave/
|
|
688
|
+
const corePluginPath = findSourceDir('plugins/specweave');
|
|
689
|
+
const { PluginLoader } = await import('../../core/plugin-loader.js');
|
|
690
|
+
const loader = new PluginLoader();
|
|
691
|
+
const corePlugin = await loader.loadFromDirectory(corePluginPath);
|
|
692
|
+
// Compile for adapter (Cursor → AGENTS.md, Copilot → instructions.md, etc.)
|
|
693
|
+
if (adapter.supportsPlugins()) {
|
|
694
|
+
await adapter.compilePlugin(corePlugin);
|
|
695
|
+
spinner.succeed('SpecWeave core plugin installed');
|
|
696
|
+
console.log(chalk.green(' ✔ Skills, agents, commands added to project'));
|
|
697
|
+
console.log(chalk.gray(` → ${corePlugin.skills.length} skills, ${corePlugin.agents.length} agents, ${corePlugin.commands.length} commands`));
|
|
698
|
+
}
|
|
699
|
+
else {
|
|
700
|
+
spinner.warn('Adapter does not support plugins');
|
|
701
|
+
console.log(chalk.yellow(' → Core functionality may be limited'));
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
catch (error) {
|
|
705
|
+
spinner.warn('Could not install core plugin');
|
|
706
|
+
console.log(chalk.yellow(` ${error instanceof Error ? error.message : error}`));
|
|
707
|
+
console.log(chalk.gray(' → You can manually reference plugin files if needed'));
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
// 9. Initialize git (skip if .git already exists)
|
|
711
|
+
const gitDir = path.join(targetDir, '.git');
|
|
712
|
+
if (!fs.existsSync(gitDir)) {
|
|
713
|
+
// Use secure command execution for git commands
|
|
714
|
+
const gitInitResult = execFileNoThrowSync('git', ['init'], { cwd: targetDir, shell: false });
|
|
715
|
+
if (gitInitResult.success) {
|
|
716
|
+
spinner.text = 'Git repository initialized...';
|
|
717
|
+
}
|
|
718
|
+
else {
|
|
719
|
+
spinner.warn('Git initialization skipped (git not found)');
|
|
720
|
+
}
|
|
721
|
+
// 10. Create initial commit (if git init succeeded)
|
|
722
|
+
if (gitInitResult.success) {
|
|
723
|
+
const gitAddResult = execFileNoThrowSync('git', ['add', '.'], { cwd: targetDir, shell: false });
|
|
724
|
+
if (gitAddResult.success) {
|
|
725
|
+
const gitCommitResult = execFileNoThrowSync('git', [
|
|
726
|
+
'commit',
|
|
727
|
+
'-m',
|
|
728
|
+
'Initial commit with SpecWeave'
|
|
729
|
+
], { cwd: targetDir, shell: false });
|
|
730
|
+
if (gitCommitResult.success) {
|
|
731
|
+
spinner.text = 'Initial commit created...';
|
|
732
|
+
}
|
|
733
|
+
// Git commit might fail if no user configured - that's ok, no need to warn
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
else {
|
|
738
|
+
spinner.text = 'Using existing Git repository...';
|
|
739
|
+
}
|
|
740
|
+
spinner.succeed('SpecWeave project created successfully!');
|
|
741
|
+
// 11. Show tool-specific next steps
|
|
742
|
+
if (toolName !== 'claude') {
|
|
743
|
+
const adapter = adapterLoader.getAdapter(toolName);
|
|
744
|
+
if (adapter) {
|
|
745
|
+
await adapter.postInstall({
|
|
746
|
+
projectPath: targetDir,
|
|
747
|
+
projectName: finalProjectName,
|
|
748
|
+
techStack: options.techStack ? { language: options.techStack } : undefined,
|
|
749
|
+
docsApproach: 'incremental'
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
// 13. Create config.json with language setting
|
|
754
|
+
createConfigFile(targetDir, finalProjectName, toolName, language, false);
|
|
755
|
+
// 14. AUTO-INSTALL ALL PLUGINS via Claude CLI (Breaking Change: No selective loading)
|
|
756
|
+
// NOTE: We do NOT create .claude/settings.json - marketplace registration via CLI is GLOBAL
|
|
757
|
+
// and persists across all projects. settings.json would be redundant.
|
|
758
|
+
let autoInstallSucceeded = false;
|
|
759
|
+
if (toolName === 'claude') {
|
|
760
|
+
// Pre-flight check: Is Claude CLI available? (ROBUST CHECK)
|
|
761
|
+
const claudeStatus = detectClaudeCli();
|
|
762
|
+
if (!claudeStatus.available) {
|
|
763
|
+
// Claude CLI NOT working → explain clearly with actionable diagnostics
|
|
764
|
+
const diagnostic = getClaudeCliDiagnostic(claudeStatus);
|
|
765
|
+
const suggestions = getClaudeCliSuggestions(claudeStatus);
|
|
766
|
+
spinner.warn(diagnostic);
|
|
767
|
+
console.log('');
|
|
768
|
+
console.log(chalk.yellow.bold('⚠️ Claude Code CLI Issue Detected'));
|
|
769
|
+
console.log('');
|
|
770
|
+
// Show detailed diagnostic info with MORE context
|
|
771
|
+
if (claudeStatus.commandExists) {
|
|
772
|
+
console.log(chalk.white('Found command in PATH, but verification failed:'));
|
|
773
|
+
console.log('');
|
|
774
|
+
if (claudeStatus.commandPath) {
|
|
775
|
+
console.log(chalk.gray(` Path: ${claudeStatus.commandPath}`));
|
|
776
|
+
}
|
|
777
|
+
if (claudeStatus.exitCode !== undefined) {
|
|
778
|
+
console.log(chalk.gray(` Exit code: ${claudeStatus.exitCode}`));
|
|
779
|
+
}
|
|
780
|
+
console.log(chalk.gray(` Issue: ${claudeStatus.error}`));
|
|
781
|
+
console.log('');
|
|
782
|
+
// Explain what this likely means
|
|
783
|
+
if (claudeStatus.error === 'version_check_failed') {
|
|
784
|
+
console.log(chalk.yellow('⚠️ This likely means:'));
|
|
785
|
+
console.log(chalk.gray(' • You have a DIFFERENT tool named "claude" in PATH'));
|
|
786
|
+
console.log(chalk.gray(' • It\'s not the Claude Code CLI from Anthropic'));
|
|
787
|
+
console.log(chalk.gray(' • The command exists but doesn\'t respond to --version'));
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
else {
|
|
791
|
+
console.log(chalk.white('Claude CLI not found in PATH'));
|
|
792
|
+
}
|
|
793
|
+
console.log('');
|
|
794
|
+
// Show actionable suggestions
|
|
795
|
+
console.log(chalk.cyan('💡 How to fix:'));
|
|
796
|
+
console.log('');
|
|
797
|
+
suggestions.forEach(suggestion => {
|
|
798
|
+
console.log(chalk.gray(` ${suggestion}`));
|
|
799
|
+
});
|
|
800
|
+
console.log('');
|
|
801
|
+
// Only show alternatives if user is NOT using Claude already
|
|
802
|
+
if (claudeStatus.error === 'command_not_found') {
|
|
803
|
+
console.log(chalk.cyan('Alternative Options:'));
|
|
804
|
+
console.log('');
|
|
805
|
+
console.log(chalk.white('1️⃣ Use Claude Code IDE (no CLI needed):'));
|
|
806
|
+
console.log(chalk.gray(' → Open this project in Claude Code'));
|
|
807
|
+
console.log(chalk.gray(' → Run: /plugin install specweave'));
|
|
808
|
+
console.log(chalk.gray(' → Works immediately, no npm installation!'));
|
|
809
|
+
console.log('');
|
|
810
|
+
console.log(chalk.white('2️⃣ Use Different AI Tool:'));
|
|
811
|
+
console.log(chalk.gray(' → Run: specweave init --adapter cursor'));
|
|
812
|
+
console.log(chalk.gray(' → Works without Claude CLI'));
|
|
813
|
+
console.log(chalk.gray(' → Less automation but no CLI dependency'));
|
|
814
|
+
console.log('');
|
|
815
|
+
}
|
|
816
|
+
autoInstallSucceeded = false;
|
|
817
|
+
}
|
|
818
|
+
else {
|
|
819
|
+
// Claude CLI available → install ALL plugins from marketplace
|
|
820
|
+
try {
|
|
821
|
+
// Step 1: FORCE marketplace refresh - remove and re-add from GitHub
|
|
822
|
+
spinner.start('Refreshing SpecWeave marketplace...');
|
|
823
|
+
const listResult = execFileNoThrowSync('claude', [
|
|
824
|
+
'plugin',
|
|
825
|
+
'marketplace',
|
|
826
|
+
'list'
|
|
827
|
+
]);
|
|
828
|
+
const marketplaceExists = listResult.success &&
|
|
829
|
+
(listResult.stdout || '').toLowerCase().includes('specweave');
|
|
830
|
+
if (marketplaceExists) {
|
|
831
|
+
// Always remove existing marketplace to ensure fresh install
|
|
832
|
+
execFileNoThrowSync('claude', [
|
|
833
|
+
'plugin',
|
|
834
|
+
'marketplace',
|
|
835
|
+
'remove',
|
|
836
|
+
'specweave'
|
|
837
|
+
]);
|
|
838
|
+
console.log(chalk.blue(' 🔄 Removed existing marketplace'));
|
|
839
|
+
}
|
|
840
|
+
// Add marketplace from GitHub (always fresh)
|
|
841
|
+
const addResult = execFileNoThrowSync('claude', [
|
|
842
|
+
'plugin',
|
|
843
|
+
'marketplace',
|
|
844
|
+
'add',
|
|
845
|
+
'anton-abyzov/specweave'
|
|
846
|
+
]);
|
|
847
|
+
if (!addResult.success) {
|
|
848
|
+
throw new Error('Failed to add marketplace from GitHub');
|
|
849
|
+
}
|
|
850
|
+
console.log(chalk.green(' ✔ Marketplace registered from GitHub'));
|
|
851
|
+
spinner.succeed('SpecWeave marketplace refreshed');
|
|
852
|
+
// Step 2: Load marketplace.json to get ALL available plugins
|
|
853
|
+
spinner.start('Loading available plugins...');
|
|
854
|
+
const marketplaceJsonPath = findSourceDir('.claude-plugin/marketplace.json');
|
|
855
|
+
if (!fs.existsSync(marketplaceJsonPath)) {
|
|
856
|
+
throw new Error('marketplace.json not found - cannot determine plugins to install');
|
|
857
|
+
}
|
|
858
|
+
const marketplace = JSON.parse(fs.readFileSync(marketplaceJsonPath, 'utf-8'));
|
|
859
|
+
const allPlugins = marketplace.plugins || [];
|
|
860
|
+
if (allPlugins.length === 0) {
|
|
861
|
+
throw new Error('No plugins found in marketplace.json');
|
|
862
|
+
}
|
|
863
|
+
console.log(chalk.blue(` 📦 Found ${allPlugins.length} plugins to install`));
|
|
864
|
+
spinner.succeed(`Found ${allPlugins.length} plugins`);
|
|
865
|
+
// Step 3: Install ALL plugins (no selective loading!)
|
|
866
|
+
let successCount = 0;
|
|
867
|
+
let failCount = 0;
|
|
868
|
+
const failedPlugins = [];
|
|
869
|
+
for (const plugin of allPlugins) {
|
|
870
|
+
const pluginName = plugin.name;
|
|
871
|
+
spinner.start(`Installing ${pluginName}...`);
|
|
872
|
+
const installResult = execFileNoThrowSync('claude', [
|
|
873
|
+
'plugin',
|
|
874
|
+
'install',
|
|
875
|
+
pluginName
|
|
876
|
+
]);
|
|
877
|
+
if (installResult.success) {
|
|
878
|
+
successCount++;
|
|
879
|
+
spinner.succeed(`${pluginName} installed`);
|
|
880
|
+
}
|
|
881
|
+
else {
|
|
882
|
+
failCount++;
|
|
883
|
+
failedPlugins.push(pluginName);
|
|
884
|
+
spinner.warn(`${pluginName} failed (will continue)`);
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
// Step 4: Report results
|
|
888
|
+
console.log('');
|
|
889
|
+
console.log(chalk.green.bold(`✅ Plugin Installation Complete`));
|
|
890
|
+
console.log(chalk.white(` Installed: ${successCount}/${allPlugins.length} plugins`));
|
|
891
|
+
if (failCount > 0) {
|
|
892
|
+
console.log(chalk.yellow(` Failed: ${failCount} plugins`));
|
|
893
|
+
console.log(chalk.gray(` Failed plugins: ${failedPlugins.join(', ')}`));
|
|
894
|
+
console.log(chalk.gray(` → You can install these manually later`));
|
|
895
|
+
}
|
|
896
|
+
console.log('');
|
|
897
|
+
console.log(chalk.cyan('📋 Available capabilities:'));
|
|
898
|
+
console.log(chalk.gray(' • /specweave:increment - Plan new features'));
|
|
899
|
+
console.log(chalk.gray(' • /specweave:do - Execute tasks'));
|
|
900
|
+
console.log(chalk.gray(' • /specweave-github:sync - GitHub integration'));
|
|
901
|
+
console.log(chalk.gray(' • /specweave-jira:sync - JIRA integration'));
|
|
902
|
+
console.log(chalk.gray(' • /specweave:docs preview - Documentation preview'));
|
|
903
|
+
console.log(chalk.gray(' • ...and more!'));
|
|
904
|
+
autoInstallSucceeded = successCount > 0;
|
|
905
|
+
}
|
|
906
|
+
catch (error) {
|
|
907
|
+
// Installation failed - provide helpful diagnostics
|
|
908
|
+
spinner.warn('Could not auto-install plugins');
|
|
909
|
+
console.log('');
|
|
910
|
+
// Diagnose error and provide actionable hints
|
|
911
|
+
if (error.message.includes('not found') || error.message.includes('ENOENT')) {
|
|
912
|
+
console.log(chalk.yellow(' Reason: Claude CLI found but command failed'));
|
|
913
|
+
console.log(chalk.gray(' → Try manually: /plugin install specweave'));
|
|
914
|
+
}
|
|
915
|
+
else if (error.message.includes('EACCES') || error.message.includes('permission')) {
|
|
916
|
+
console.log(chalk.yellow(' Reason: Permission denied'));
|
|
917
|
+
console.log(chalk.gray(' → Check file permissions or run with appropriate access'));
|
|
918
|
+
}
|
|
919
|
+
else if (error.message.includes('ECONNREFUSED') || error.message.includes('network')) {
|
|
920
|
+
console.log(chalk.yellow(' Reason: Network error'));
|
|
921
|
+
console.log(chalk.gray(' → Check internet connection and try again'));
|
|
922
|
+
}
|
|
923
|
+
else if (process.env.DEBUG) {
|
|
924
|
+
console.log(chalk.gray(` Error: ${error.message}`));
|
|
925
|
+
}
|
|
926
|
+
console.log('');
|
|
927
|
+
console.log(chalk.cyan('📦 Manual installation:'));
|
|
928
|
+
console.log(chalk.white(' /plugin install specweave'));
|
|
929
|
+
console.log(chalk.white(' /plugin install specweave-github'));
|
|
930
|
+
console.log(chalk.white(' ...etc.'));
|
|
931
|
+
console.log('');
|
|
932
|
+
autoInstallSucceeded = false;
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
// 10.5 Issue Tracker Integration (CRITICAL!)
|
|
936
|
+
// MUST happen AFTER plugin installation is complete
|
|
937
|
+
// Asks user: Which tracker? (GitHub/Jira/ADO/None)
|
|
938
|
+
// Collects credentials and runs smart validation
|
|
939
|
+
//
|
|
940
|
+
// NEW: Always run for ALL projects (including framework repo)
|
|
941
|
+
// Detects existing config and asks user if they want to change it
|
|
942
|
+
const isFrameworkRepo = await isSpecWeaveFrameworkRepo(targetDir);
|
|
943
|
+
try {
|
|
944
|
+
const { setupIssueTracker } = await import('../helpers/issue-tracker/index.js');
|
|
945
|
+
// Check if sync config already exists
|
|
946
|
+
const configPath = path.join(targetDir, '.specweave', 'config.json');
|
|
947
|
+
let existingTracker = null;
|
|
948
|
+
if (fs.existsSync(configPath)) {
|
|
949
|
+
const config = await fs.readJson(configPath);
|
|
950
|
+
if (config.sync?.activeProfile && config.sync?.profiles) {
|
|
951
|
+
const activeProfile = config.sync.profiles[config.sync.activeProfile];
|
|
952
|
+
if (activeProfile?.provider) {
|
|
953
|
+
existingTracker = activeProfile.provider;
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
if (existingTracker) {
|
|
958
|
+
// Existing config detected - ask if user wants to reconfigure
|
|
959
|
+
console.log(chalk.blue('\n🔍 Existing Issue Tracker Configuration Detected'));
|
|
960
|
+
console.log(chalk.gray(` Current: ${existingTracker.charAt(0).toUpperCase() + existingTracker.slice(1)}`));
|
|
961
|
+
console.log('');
|
|
962
|
+
const { reconfigure } = await inquirer.prompt([{
|
|
963
|
+
type: 'confirm',
|
|
964
|
+
name: 'reconfigure',
|
|
965
|
+
message: 'Do you want to reconfigure your issue tracker?',
|
|
966
|
+
default: false
|
|
967
|
+
}]);
|
|
968
|
+
if (!reconfigure) {
|
|
969
|
+
console.log(chalk.gray(' ✓ Keeping existing configuration\n'));
|
|
970
|
+
}
|
|
971
|
+
else {
|
|
972
|
+
// User wants to reconfigure - run setup
|
|
973
|
+
await setupIssueTracker({
|
|
974
|
+
projectPath: targetDir,
|
|
975
|
+
language: language,
|
|
976
|
+
maxRetries: 3,
|
|
977
|
+
isFrameworkRepo
|
|
978
|
+
});
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
else {
|
|
982
|
+
// No existing config - run setup
|
|
983
|
+
if (isFrameworkRepo) {
|
|
984
|
+
console.log(chalk.blue('\n🔍 Detected SpecWeave framework repository'));
|
|
985
|
+
console.log(chalk.gray(' Recommended: Configure GitHub sync for automatic bidirectional sync'));
|
|
986
|
+
console.log('');
|
|
987
|
+
}
|
|
988
|
+
await setupIssueTracker({
|
|
989
|
+
projectPath: targetDir,
|
|
990
|
+
language: language,
|
|
991
|
+
maxRetries: 3,
|
|
992
|
+
isFrameworkRepo
|
|
993
|
+
});
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
catch (error) {
|
|
997
|
+
// Non-critical error - log but continue
|
|
998
|
+
if (process.env.DEBUG) {
|
|
999
|
+
console.error(chalk.red(`\n❌ Issue tracker setup error: ${error.message}`));
|
|
1000
|
+
}
|
|
1001
|
+
console.log(chalk.yellow('\n⚠️ Issue tracker setup skipped (can configure later)'));
|
|
1002
|
+
}
|
|
1003
|
+
// 10.6 Create Multi-Project Folders (JIRA/ADO/GitHub)
|
|
1004
|
+
// After issue tracker setup, read .env and create project-specific folders
|
|
1005
|
+
try {
|
|
1006
|
+
await createMultiProjectFolders(targetDir);
|
|
1007
|
+
}
|
|
1008
|
+
catch (error) {
|
|
1009
|
+
// Non-critical - folders can be created manually later
|
|
1010
|
+
if (process.env.DEBUG) {
|
|
1011
|
+
console.error(chalk.yellow(`\n⚠️ Multi-project folder creation skipped: ${error.message}`));
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
showNextSteps(finalProjectName, toolName, language, usedDotNotation, toolName === 'claude' ? autoInstallSucceeded : undefined);
|
|
1016
|
+
}
|
|
1017
|
+
catch (error) {
|
|
1018
|
+
spinner.fail('Failed to create project');
|
|
1019
|
+
console.error(chalk.red(`\n${locale.t('cli', 'init.genericError')}`), error);
|
|
1020
|
+
process.exit(1);
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
function createDirectoryStructure(targetDir, adapterName) {
|
|
1024
|
+
const directories = [
|
|
1025
|
+
// Core increment structure
|
|
1026
|
+
'.specweave/increments',
|
|
1027
|
+
// 6-pillar documentation structure
|
|
1028
|
+
'.specweave/docs/internal/strategy', // Business specs (WHAT, WHY)
|
|
1029
|
+
'.specweave/docs/internal/specs', // Feature specifications (detailed requirements)
|
|
1030
|
+
'.specweave/docs/internal/architecture', // Technical design (HOW)
|
|
1031
|
+
'.specweave/docs/internal/architecture/adr', // Architecture Decision Records
|
|
1032
|
+
'.specweave/docs/internal/architecture/diagrams', // Architecture diagrams
|
|
1033
|
+
'.specweave/docs/internal/delivery', // Roadmap, CI/CD, guides
|
|
1034
|
+
'.specweave/docs/internal/operations', // Runbooks, SLOs
|
|
1035
|
+
'.specweave/docs/internal/governance', // Security, compliance
|
|
1036
|
+
'.specweave/docs/public', // Published documentation
|
|
1037
|
+
];
|
|
1038
|
+
// NOTE: We do NOT create .claude/ folder anymore!
|
|
1039
|
+
// Marketplace registration is GLOBAL via CLI, not per-project.
|
|
1040
|
+
// Non-Claude adapters still use plugins/ folder (copied separately)
|
|
1041
|
+
directories.forEach((dir) => {
|
|
1042
|
+
fs.mkdirSync(path.join(targetDir, dir), { recursive: true });
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
async function copyTemplates(templatesDir, targetDir, projectName, language = 'en') {
|
|
1046
|
+
const locale = getLocaleManager(language);
|
|
1047
|
+
// Verify templates directory exists
|
|
1048
|
+
if (!fs.existsSync(templatesDir)) {
|
|
1049
|
+
console.error(chalk.red(`\n${locale.t('cli', 'init.errors.templatesNotFound', { path: templatesDir })}`));
|
|
1050
|
+
const packageRoot = findPackageRoot(__dirname);
|
|
1051
|
+
if (packageRoot) {
|
|
1052
|
+
console.error(chalk.red(` ${locale.t('cli', 'init.errors.packageRoot', { root: packageRoot })}`));
|
|
1053
|
+
console.error(chalk.red(` ${locale.t('cli', 'init.errors.tryingAlternate')}`));
|
|
1054
|
+
// Try src/templates as fallback
|
|
1055
|
+
const altPath = path.join(packageRoot, 'src', 'templates');
|
|
1056
|
+
if (fs.existsSync(altPath)) {
|
|
1057
|
+
console.error(chalk.yellow(` ${locale.t('cli', 'init.errors.foundTemplatesAt', { path: altPath })}`));
|
|
1058
|
+
templatesDir = altPath;
|
|
1059
|
+
}
|
|
1060
|
+
else {
|
|
1061
|
+
throw new Error('Failed to locate templates directory');
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
else {
|
|
1065
|
+
throw new Error('Failed to locate templates directory and package root');
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
// Copy README.md
|
|
1069
|
+
const readmeTemplate = path.join(templatesDir, 'README.md.template');
|
|
1070
|
+
if (fs.existsSync(readmeTemplate)) {
|
|
1071
|
+
let readme = fs.readFileSync(readmeTemplate, 'utf-8');
|
|
1072
|
+
readme = readme.replace(/{{PROJECT_NAME}}/g, projectName);
|
|
1073
|
+
fs.writeFileSync(path.join(targetDir, 'README.md'), readme);
|
|
1074
|
+
}
|
|
1075
|
+
// Generate CLAUDE.md - PRIMARY instruction file for Claude Code
|
|
1076
|
+
// CRITICAL: Claude Code ONLY reads CLAUDE.md (NOT AGENTS.md!)
|
|
1077
|
+
// This is the native/baseline experience - skills, agents, hooks, slash commands
|
|
1078
|
+
const skillsDir = findSourceDir('skills');
|
|
1079
|
+
const agentsDir = findSourceDir('agents');
|
|
1080
|
+
const commandsDir = findSourceDir('commands');
|
|
1081
|
+
const claudeMdTemplatePath = path.normalize(path.join(templatesDir, 'CLAUDE.md.template'));
|
|
1082
|
+
const claudeGen = new ClaudeMdGenerator(skillsDir, agentsDir, commandsDir);
|
|
1083
|
+
const claudeMd = await claudeGen.generate({
|
|
1084
|
+
projectName,
|
|
1085
|
+
projectPath: targetDir,
|
|
1086
|
+
templatePath: fs.existsSync(claudeMdTemplatePath) ? claudeMdTemplatePath : undefined
|
|
1087
|
+
});
|
|
1088
|
+
fs.writeFileSync(path.join(targetDir, 'CLAUDE.md'), claudeMd);
|
|
1089
|
+
// Generate AGENTS.md - Universal file for ALL OTHER AI tools
|
|
1090
|
+
// Following agents.md standard: https://agents.md/
|
|
1091
|
+
// Used by: Cursor, Gemini CLI, Codex, GitHub Copilot, and ANY non-Claude tool
|
|
1092
|
+
// NOTE: Claude Code does NOT read this file - it only reads CLAUDE.md above
|
|
1093
|
+
// Replaces: .cursorrules, instructions.md, and other tool-specific files
|
|
1094
|
+
const agentsMdTemplatePath = path.normalize(path.join(templatesDir, 'AGENTS.md.template'));
|
|
1095
|
+
const agentsGen = new AgentsMdGenerator(skillsDir, agentsDir, commandsDir);
|
|
1096
|
+
const agentsMd = await agentsGen.generate({
|
|
1097
|
+
projectName,
|
|
1098
|
+
projectPath: targetDir,
|
|
1099
|
+
templatePath: fs.existsSync(agentsMdTemplatePath) ? agentsMdTemplatePath : undefined
|
|
1100
|
+
});
|
|
1101
|
+
fs.writeFileSync(path.join(targetDir, 'AGENTS.md'), agentsMd);
|
|
1102
|
+
// Copy .gitignore
|
|
1103
|
+
const gitignoreTemplate = path.join(templatesDir, '.gitignore.template');
|
|
1104
|
+
if (fs.existsSync(gitignoreTemplate)) {
|
|
1105
|
+
fs.copyFileSync(gitignoreTemplate, path.join(targetDir, '.gitignore'));
|
|
1106
|
+
}
|
|
1107
|
+
// Copy .gitattributes (forces LF line endings on all platforms, prevents Windows CRLF warnings)
|
|
1108
|
+
const gitattributesTemplate = path.join(templatesDir, '.gitattributes.template');
|
|
1109
|
+
if (fs.existsSync(gitattributesTemplate)) {
|
|
1110
|
+
fs.copyFileSync(gitattributesTemplate, path.join(targetDir, '.gitattributes'));
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
/**
|
|
1114
|
+
* Detect ALL parent directories that contain .specweave/ folders
|
|
1115
|
+
* SpecWeave ONLY supports root-level .specweave/ folders
|
|
1116
|
+
* Nested .specweave/ folders are NOT supported
|
|
1117
|
+
*
|
|
1118
|
+
* @param targetDir - Directory where user wants to initialize
|
|
1119
|
+
* @returns Array of paths to parent .specweave/ folders with depth info, or null if none found
|
|
1120
|
+
*/
|
|
1121
|
+
function detectNestedSpecweave(targetDir) {
|
|
1122
|
+
const foundFolders = [];
|
|
1123
|
+
const homeDir = os.homedir();
|
|
1124
|
+
// Start from parent of target directory
|
|
1125
|
+
let currentDir = path.dirname(path.resolve(targetDir));
|
|
1126
|
+
const root = path.parse(currentDir).root;
|
|
1127
|
+
let depth = 1;
|
|
1128
|
+
// Walk up the directory tree and find ALL .specweave/ folders
|
|
1129
|
+
while (currentDir !== root) {
|
|
1130
|
+
const specweavePath = path.join(currentDir, '.specweave');
|
|
1131
|
+
// Check if .specweave/ exists at this level
|
|
1132
|
+
if (fs.existsSync(specweavePath)) {
|
|
1133
|
+
const isHomeDir = path.resolve(currentDir) === path.resolve(homeDir);
|
|
1134
|
+
foundFolders.push({ path: currentDir, depth, isHomeDir });
|
|
1135
|
+
}
|
|
1136
|
+
// Move up one level
|
|
1137
|
+
const parentDir = path.dirname(currentDir);
|
|
1138
|
+
if (parentDir === currentDir)
|
|
1139
|
+
break; // Reached root
|
|
1140
|
+
currentDir = parentDir;
|
|
1141
|
+
depth++;
|
|
1142
|
+
}
|
|
1143
|
+
return foundFolders.length > 0 ? foundFolders : null;
|
|
1144
|
+
}
|
|
1145
|
+
/**
|
|
1146
|
+
* Find the package root by walking up the directory tree looking for package.json
|
|
1147
|
+
* This works reliably on all platforms including Windows with UNC paths
|
|
1148
|
+
*/
|
|
1149
|
+
function findPackageRoot(startDir) {
|
|
1150
|
+
let currentDir = startDir;
|
|
1151
|
+
const root = path.parse(currentDir).root;
|
|
1152
|
+
while (currentDir !== root) {
|
|
1153
|
+
const packageJsonPath = path.join(currentDir, 'package.json');
|
|
1154
|
+
if (fs.existsSync(packageJsonPath)) {
|
|
1155
|
+
try {
|
|
1156
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
1157
|
+
// Verify this is the specweave package
|
|
1158
|
+
if (packageJson.name === 'specweave') {
|
|
1159
|
+
return currentDir;
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
catch (error) {
|
|
1163
|
+
// Not a valid package.json, continue searching
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
const parentDir = path.dirname(currentDir);
|
|
1167
|
+
if (parentDir === currentDir)
|
|
1168
|
+
break; // Reached root
|
|
1169
|
+
currentDir = parentDir;
|
|
1170
|
+
}
|
|
1171
|
+
return null;
|
|
1172
|
+
}
|
|
1173
|
+
/**
|
|
1174
|
+
* Find the source directory, trying multiple possible locations
|
|
1175
|
+
* Handles both development and installed package scenarios
|
|
1176
|
+
* Windows-compatible with proper path normalization
|
|
1177
|
+
*/
|
|
1178
|
+
function findSourceDir(relativePath) {
|
|
1179
|
+
// First, try to find package root by walking up from __dirname
|
|
1180
|
+
const packageRoot = findPackageRoot(__dirname);
|
|
1181
|
+
if (packageRoot) {
|
|
1182
|
+
// Try directly in package root FIRST (for plugins/, .claude-plugin/)
|
|
1183
|
+
// This is critical because package.json includes these folders for npm publish
|
|
1184
|
+
const rootPath = path.normalize(path.join(packageRoot, relativePath));
|
|
1185
|
+
if (fs.existsSync(rootPath)) {
|
|
1186
|
+
return rootPath;
|
|
1187
|
+
}
|
|
1188
|
+
// Try src/ directory (for templates/, utils/, etc.)
|
|
1189
|
+
const srcPath = path.normalize(path.join(packageRoot, 'src', relativePath));
|
|
1190
|
+
if (fs.existsSync(srcPath)) {
|
|
1191
|
+
return srcPath;
|
|
1192
|
+
}
|
|
1193
|
+
// Try dist/ directory (fallback for compiled outputs)
|
|
1194
|
+
const distPath = path.normalize(path.join(packageRoot, 'dist', relativePath));
|
|
1195
|
+
if (fs.existsSync(distPath)) {
|
|
1196
|
+
return distPath;
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
// Fallback: Try multiple possible locations relative to __dirname
|
|
1200
|
+
const possiblePaths = [
|
|
1201
|
+
// Development: dist/cli/commands -> src/
|
|
1202
|
+
path.normalize(path.join(__dirname, '../../..', relativePath)),
|
|
1203
|
+
// Installed: node_modules/specweave/dist/cli/commands -> node_modules/specweave/src/
|
|
1204
|
+
path.normalize(path.join(__dirname, '../../../src', relativePath)),
|
|
1205
|
+
// Alternative: go up from dist/ to package root, then to src/
|
|
1206
|
+
path.normalize(path.join(__dirname, '../../..', 'src', relativePath)),
|
|
1207
|
+
// Absolute from package root (for global installs)
|
|
1208
|
+
path.resolve(__dirname, '../../../src', relativePath),
|
|
1209
|
+
];
|
|
1210
|
+
for (const testPath of possiblePaths) {
|
|
1211
|
+
if (fs.existsSync(testPath)) {
|
|
1212
|
+
return testPath;
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
// If nothing found, return the first path and let the caller handle the error
|
|
1216
|
+
return possiblePaths[0];
|
|
1217
|
+
}
|
|
1218
|
+
/**
|
|
1219
|
+
* Create .specweave/config.json with project settings
|
|
1220
|
+
*/
|
|
1221
|
+
function createConfigFile(targetDir, projectName, adapter, language, enableDocsPreview = true) {
|
|
1222
|
+
const configPath = path.join(targetDir, '.specweave', 'config.json');
|
|
1223
|
+
const config = {
|
|
1224
|
+
project: {
|
|
1225
|
+
name: projectName,
|
|
1226
|
+
version: '0.1.0',
|
|
1227
|
+
},
|
|
1228
|
+
adapters: {
|
|
1229
|
+
default: adapter,
|
|
1230
|
+
},
|
|
1231
|
+
// Documentation preview settings (for Claude Code only)
|
|
1232
|
+
...(adapter === 'claude' && {
|
|
1233
|
+
documentation: {
|
|
1234
|
+
preview: {
|
|
1235
|
+
enabled: enableDocsPreview,
|
|
1236
|
+
autoInstall: false, // Lazy install on first use
|
|
1237
|
+
port: 3015, // Internal docs (avoid port 3000 - used by React/Next.js/Vite)
|
|
1238
|
+
openBrowser: true,
|
|
1239
|
+
theme: 'default',
|
|
1240
|
+
excludeFolders: ['legacy', 'node_modules']
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
}),
|
|
1244
|
+
// Only include language if non-English
|
|
1245
|
+
...(language !== 'en' && {
|
|
1246
|
+
language,
|
|
1247
|
+
translation: {
|
|
1248
|
+
method: 'in-session',
|
|
1249
|
+
autoTranslateLivingDocs: false,
|
|
1250
|
+
keepFrameworkTerms: true,
|
|
1251
|
+
keepTechnicalTerms: true,
|
|
1252
|
+
translateCodeComments: true,
|
|
1253
|
+
translateVariableNames: false,
|
|
1254
|
+
},
|
|
1255
|
+
}),
|
|
1256
|
+
};
|
|
1257
|
+
fs.writeJsonSync(configPath, config, { spaces: 2 });
|
|
1258
|
+
}
|
|
1259
|
+
/**
|
|
1260
|
+
* REMOVED: setupClaudePluginAutoRegistration()
|
|
1261
|
+
*
|
|
1262
|
+
* Previously created .claude/settings.json with extraKnownMarketplaces,
|
|
1263
|
+
* but this is redundant because:
|
|
1264
|
+
*
|
|
1265
|
+
* 1. CLI marketplace registration is GLOBAL (persists across all projects)
|
|
1266
|
+
* 2. settings.json is per-project and unnecessary for our use case
|
|
1267
|
+
* 3. We use `claude plugin marketplace add` which registers globally
|
|
1268
|
+
*
|
|
1269
|
+
* Removed in favor of pure CLI approach (lines 687-883)
|
|
1270
|
+
*/
|
|
1271
|
+
function showNextSteps(projectName, adapterName, language, usedDotNotation = false, pluginAutoInstalled = false) {
|
|
1272
|
+
const locale = getLocaleManager(language);
|
|
1273
|
+
console.log('');
|
|
1274
|
+
console.log(chalk.cyan.bold(locale.t('cli', 'init.nextSteps.header')));
|
|
1275
|
+
console.log('');
|
|
1276
|
+
let stepNumber = 1;
|
|
1277
|
+
// Only show "cd" step if we created a subdirectory
|
|
1278
|
+
if (!usedDotNotation) {
|
|
1279
|
+
console.log(` ${stepNumber}. ${chalk.white(locale.t('cli', 'init.nextSteps.cd', { projectName }))}`);
|
|
1280
|
+
console.log('');
|
|
1281
|
+
stepNumber++;
|
|
1282
|
+
}
|
|
1283
|
+
// Adapter-specific instructions
|
|
1284
|
+
if (adapterName === 'claude') {
|
|
1285
|
+
console.log(` ${stepNumber}. ${chalk.white(locale.t('cli', 'init.nextSteps.claude.step1'))}`);
|
|
1286
|
+
console.log('');
|
|
1287
|
+
stepNumber++;
|
|
1288
|
+
// Only show manual install if auto-install failed
|
|
1289
|
+
if (!pluginAutoInstalled) {
|
|
1290
|
+
console.log(` ${stepNumber}. ${chalk.yellow.bold('⚠️ ' + locale.t('cli', 'init.nextSteps.claude.step2'))}`);
|
|
1291
|
+
console.log(` ${chalk.cyan.bold(locale.t('cli', 'init.nextSteps.claude.installCore'))}`);
|
|
1292
|
+
console.log(` ${chalk.gray('↑ Required for slash commands like /specweave:increment')}`);
|
|
1293
|
+
console.log('');
|
|
1294
|
+
stepNumber++;
|
|
1295
|
+
}
|
|
1296
|
+
console.log(` ${stepNumber}. ${chalk.white('All plugins are already installed!')}`);
|
|
1297
|
+
console.log(` ${chalk.gray('✔ All 19+ SpecWeave plugins installed automatically')}`);
|
|
1298
|
+
console.log(` ${chalk.gray('✔ No need to install additional plugins manually')}`);
|
|
1299
|
+
console.log(` ${chalk.gray('✔ Full capabilities available immediately')}`);
|
|
1300
|
+
console.log('');
|
|
1301
|
+
stepNumber++;
|
|
1302
|
+
console.log(` ${stepNumber}. ${chalk.white(locale.t('cli', 'init.nextSteps.claude.step4'))}`);
|
|
1303
|
+
console.log(` ${chalk.cyan(locale.t('cli', 'init.nextSteps.claude.example'))}`);
|
|
1304
|
+
console.log(` ${chalk.gray(locale.t('cli', 'init.nextSteps.claude.autoActivate'))}`);
|
|
1305
|
+
}
|
|
1306
|
+
else if (adapterName === 'cursor') {
|
|
1307
|
+
console.log(` ${stepNumber}. ${chalk.white(locale.t('cli', 'init.nextSteps.cursor.step1'))}`);
|
|
1308
|
+
console.log('');
|
|
1309
|
+
console.log(` ${stepNumber + 1}. ${chalk.white(locale.t('cli', 'init.nextSteps.cursor.step2'))}`);
|
|
1310
|
+
console.log(` ${locale.t('cli', 'init.nextSteps.cursor.guide')}`);
|
|
1311
|
+
console.log('');
|
|
1312
|
+
console.log(` ${stepNumber + 2}. ${chalk.white(locale.t('cli', 'init.nextSteps.cursor.step3'))}`);
|
|
1313
|
+
console.log(` ${locale.t('cli', 'init.nextSteps.cursor.shortcuts')}`);
|
|
1314
|
+
}
|
|
1315
|
+
else if (adapterName === 'generic') {
|
|
1316
|
+
console.log(` ${stepNumber}. ${chalk.white(locale.t('cli', 'init.nextSteps.generic.step1'))}`);
|
|
1317
|
+
console.log('');
|
|
1318
|
+
console.log(` ${stepNumber + 1}. ${chalk.white(locale.t('cli', 'init.nextSteps.generic.step2'))}`);
|
|
1319
|
+
console.log(` ${locale.t('cli', 'init.nextSteps.generic.compatibility')}`);
|
|
1320
|
+
}
|
|
1321
|
+
console.log('');
|
|
1322
|
+
console.log(chalk.green.bold(locale.t('cli', 'init.nextSteps.footer')));
|
|
1323
|
+
console.log('');
|
|
1324
|
+
console.log(chalk.gray(locale.t('cli', 'init.nextSteps.docsLink')));
|
|
1325
|
+
console.log(chalk.gray(locale.t('cli', 'init.nextSteps.githubLink')));
|
|
1326
|
+
console.log('');
|
|
1327
|
+
}
|
|
1328
|
+
//# sourceMappingURL=init.js.map
|