@glxmart/boss-cli 1.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +134 -0
- package/assets/claude-folder/agents/.gitkeep +0 -0
- package/assets/claude-folder/commands/boss-commands.md +138 -0
- package/assets/claude-folder/rules/boss-workflow.md +33 -0
- package/assets/claude-folder/rules/code-style.md +23 -0
- package/assets/claude-folder/rules/security.md +22 -0
- package/assets/claude-folder/rules/testing.md +32 -0
- package/assets/claude-folder/settings.local.json +88 -0
- package/assets/claude-folder/skills/.gitkeep +0 -0
- package/assets/claude-md/docs/container-use.md +140 -0
- package/assets/claude-md/docs/github-operations.md +238 -0
- package/assets/claude-md/docs/initialization.md +186 -0
- package/assets/claude-md/docs/quality-standards.md +15 -0
- package/assets/claude-md/docs/spec-kit.md +46 -0
- package/assets/claude-md/docs/workers.md +174 -0
- package/assets/claude-md/docs/workflow.md +140 -0
- package/assets/claude-md/template.md +812 -0
- package/assets/docker-compose/docker-compose.yml +52 -0
- package/assets/git-hooks/commit-msg.sh +102 -0
- package/assets/git-hooks/pre-commit-check.sh +21 -0
- package/assets/git-hooks/pre-commit.sh +6 -0
- package/assets/git-hooks/pre-push.sh +154 -0
- package/assets/git-hooks/security-check.sh +40 -0
- package/assets/git-hooks/test-changed.sh +84 -0
- package/assets/github-workflows/CODEOWNERS +3 -0
- package/assets/github-workflows/boss-ci.yml +40 -0
- package/assets/github-workflows/boss-gates.yml +28 -0
- package/assets/start-boss-sh/start-boss.sh +471 -0
- package/assets/template-docs/api-service-fastify.md +98 -0
- package/assets/template-docs/blank.md +91 -0
- package/assets/template-docs/nextjs-app-turbo.md +102 -0
- package/assets/template-docs/t3-app.md +106 -0
- package/assets/template-loader/README.md +28 -0
- package/assets/template-loader/eslint.config.node.js +28 -0
- package/assets/template-loader/eslint.config.react.js +47 -0
- package/assets/template-loader/gitignore +42 -0
- package/assets/template-loader/index.test.ts +10 -0
- package/assets/template-loader/index.ts +13 -0
- package/assets/template-loader/prettierignore +8 -0
- package/assets/template-loader/vitest.config.ts +19 -0
- package/assets/worker-configs/architect/.claude/commands/.gitkeep +0 -0
- package/assets/worker-configs/architect/.claude/skills/.gitkeep +0 -0
- package/assets/worker-configs/architect/CLAUDE.md +106 -0
- package/assets/worker-configs/clarifier/.claude/commands/.gitkeep +1 -0
- package/assets/worker-configs/clarifier/.claude/skills/.gitkeep +1 -0
- package/assets/worker-configs/clarifier/CLAUDE.md +112 -0
- package/assets/worker-configs/code-reviewer/CLAUDE.md +113 -0
- package/assets/worker-configs/consolidator/.claude/commands/.gitkeep +1 -0
- package/assets/worker-configs/consolidator/.claude/skills/.gitkeep +1 -0
- package/assets/worker-configs/consolidator/CLAUDE.md +114 -0
- package/assets/worker-configs/developer-backend/.claude/commands/.gitkeep +1 -0
- package/assets/worker-configs/developer-backend/.claude/skills/.gitkeep +1 -0
- package/assets/worker-configs/developer-backend/CLAUDE.md +116 -0
- package/assets/worker-configs/developer-frontend/.claude/commands/.gitkeep +1 -0
- package/assets/worker-configs/developer-frontend/.claude/skills/.gitkeep +1 -0
- package/assets/worker-configs/developer-frontend/CLAUDE.md +116 -0
- package/assets/worker-configs/developer-fullstack/.claude/commands/.gitkeep +1 -0
- package/assets/worker-configs/developer-fullstack/.claude/skills/.gitkeep +1 -0
- package/assets/worker-configs/developer-fullstack/CLAUDE.md +116 -0
- package/assets/worker-configs/devops-engineer/CLAUDE.md +111 -0
- package/assets/worker-configs/planner/.claude/commands/.gitkeep +1 -0
- package/assets/worker-configs/planner/.claude/skills/.gitkeep +1 -0
- package/assets/worker-configs/planner/CLAUDE.md +111 -0
- package/assets/worker-configs/product-owner/CLAUDE.md +108 -0
- package/assets/worker-configs/reviewer/.claude/commands/.gitkeep +1 -0
- package/assets/worker-configs/reviewer/.claude/skills/.gitkeep +1 -0
- package/assets/worker-configs/reviewer/CLAUDE.md +110 -0
- package/assets/worker-configs/security-engineer/CLAUDE.md +109 -0
- package/assets/worker-configs/spec-writer/.claude/commands/.gitkeep +1 -0
- package/assets/worker-configs/spec-writer/.claude/skills/.gitkeep +1 -0
- package/assets/worker-configs/spec-writer/CLAUDE.md +110 -0
- package/assets/worker-configs/technical-writer/CLAUDE.md +107 -0
- package/assets/worker-configs/tester/CLAUDE.md +110 -0
- package/dist/assets/claude-folder/agents/.gitkeep +0 -0
- package/dist/assets/claude-folder/commands/boss-commands.md +138 -0
- package/dist/assets/claude-folder/rules/boss-workflow.md +33 -0
- package/dist/assets/claude-folder/rules/code-style.md +23 -0
- package/dist/assets/claude-folder/rules/security.md +22 -0
- package/dist/assets/claude-folder/rules/testing.md +32 -0
- package/dist/assets/claude-folder/settings.local.json +88 -0
- package/dist/assets/claude-folder/skills/.gitkeep +0 -0
- package/dist/assets/claude-md/docs/container-use.md +140 -0
- package/dist/assets/claude-md/docs/github-operations.md +238 -0
- package/dist/assets/claude-md/docs/initialization.md +186 -0
- package/dist/assets/claude-md/docs/quality-standards.md +15 -0
- package/dist/assets/claude-md/docs/spec-kit.md +46 -0
- package/dist/assets/claude-md/docs/workers.md +174 -0
- package/dist/assets/claude-md/docs/workflow.md +140 -0
- package/dist/assets/claude-md/template.md +812 -0
- package/dist/assets/docker-compose/docker-compose.yml +52 -0
- package/dist/assets/git-hooks/commit-msg.sh +102 -0
- package/dist/assets/git-hooks/pre-commit-check.sh +21 -0
- package/dist/assets/git-hooks/pre-commit.sh +6 -0
- package/dist/assets/git-hooks/pre-push.sh +154 -0
- package/dist/assets/git-hooks/security-check.sh +40 -0
- package/dist/assets/git-hooks/test-changed.sh +84 -0
- package/dist/assets/github-workflows/CODEOWNERS +3 -0
- package/dist/assets/github-workflows/boss-ci.yml +40 -0
- package/dist/assets/github-workflows/boss-gates.yml +28 -0
- package/dist/assets/start-boss-sh/start-boss.sh +471 -0
- package/dist/assets/template-docs/api-service-fastify.md +98 -0
- package/dist/assets/template-docs/blank.md +91 -0
- package/dist/assets/template-docs/nextjs-app-turbo.md +102 -0
- package/dist/assets/template-docs/t3-app.md +106 -0
- package/dist/assets/template-loader/README.md +28 -0
- package/dist/assets/template-loader/eslint.config.node.js +28 -0
- package/dist/assets/template-loader/eslint.config.react.js +47 -0
- package/dist/assets/template-loader/gitignore +42 -0
- package/dist/assets/template-loader/index.test.ts +10 -0
- package/dist/assets/template-loader/index.ts +13 -0
- package/dist/assets/template-loader/prettierignore +8 -0
- package/dist/assets/template-loader/vitest.config.ts +19 -0
- package/dist/assets/worker-configs/architect/.claude/commands/.gitkeep +0 -0
- package/dist/assets/worker-configs/architect/.claude/skills/.gitkeep +0 -0
- package/dist/assets/worker-configs/architect/CLAUDE.md +106 -0
- package/dist/assets/worker-configs/clarifier/.claude/commands/.gitkeep +1 -0
- package/dist/assets/worker-configs/clarifier/.claude/skills/.gitkeep +1 -0
- package/dist/assets/worker-configs/clarifier/CLAUDE.md +112 -0
- package/dist/assets/worker-configs/code-reviewer/CLAUDE.md +113 -0
- package/dist/assets/worker-configs/consolidator/.claude/commands/.gitkeep +1 -0
- package/dist/assets/worker-configs/consolidator/.claude/skills/.gitkeep +1 -0
- package/dist/assets/worker-configs/consolidator/CLAUDE.md +114 -0
- package/dist/assets/worker-configs/developer-backend/.claude/commands/.gitkeep +1 -0
- package/dist/assets/worker-configs/developer-backend/.claude/skills/.gitkeep +1 -0
- package/dist/assets/worker-configs/developer-backend/CLAUDE.md +116 -0
- package/dist/assets/worker-configs/developer-frontend/.claude/commands/.gitkeep +1 -0
- package/dist/assets/worker-configs/developer-frontend/.claude/skills/.gitkeep +1 -0
- package/dist/assets/worker-configs/developer-frontend/CLAUDE.md +116 -0
- package/dist/assets/worker-configs/developer-fullstack/.claude/commands/.gitkeep +1 -0
- package/dist/assets/worker-configs/developer-fullstack/.claude/skills/.gitkeep +1 -0
- package/dist/assets/worker-configs/developer-fullstack/CLAUDE.md +116 -0
- package/dist/assets/worker-configs/devops-engineer/CLAUDE.md +111 -0
- package/dist/assets/worker-configs/planner/.claude/commands/.gitkeep +1 -0
- package/dist/assets/worker-configs/planner/.claude/skills/.gitkeep +1 -0
- package/dist/assets/worker-configs/planner/CLAUDE.md +111 -0
- package/dist/assets/worker-configs/product-owner/CLAUDE.md +108 -0
- package/dist/assets/worker-configs/reviewer/.claude/commands/.gitkeep +1 -0
- package/dist/assets/worker-configs/reviewer/.claude/skills/.gitkeep +1 -0
- package/dist/assets/worker-configs/reviewer/CLAUDE.md +110 -0
- package/dist/assets/worker-configs/security-engineer/CLAUDE.md +109 -0
- package/dist/assets/worker-configs/spec-writer/.claude/commands/.gitkeep +1 -0
- package/dist/assets/worker-configs/spec-writer/.claude/skills/.gitkeep +1 -0
- package/dist/assets/worker-configs/spec-writer/CLAUDE.md +110 -0
- package/dist/assets/worker-configs/technical-writer/CLAUDE.md +107 -0
- package/dist/assets/worker-configs/tester/CLAUDE.md +110 -0
- package/dist/commands/__tests__/bootstrap.test.d.ts +2 -0
- package/dist/commands/__tests__/bootstrap.test.d.ts.map +1 -0
- package/dist/commands/__tests__/bootstrap.test.js +379 -0
- package/dist/commands/__tests__/bootstrap.test.js.map +1 -0
- package/dist/commands/__tests__/doctor.test.d.ts +2 -0
- package/dist/commands/__tests__/doctor.test.d.ts.map +1 -0
- package/dist/commands/__tests__/doctor.test.js +13 -0
- package/dist/commands/__tests__/doctor.test.js.map +1 -0
- package/dist/commands/bootstrap.d.ts +3 -0
- package/dist/commands/bootstrap.d.ts.map +1 -0
- package/dist/commands/bootstrap.js +390 -0
- package/dist/commands/bootstrap.js.map +1 -0
- package/dist/commands/doctor.d.ts +2 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +171 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/templates.d.ts +2 -0
- package/dist/commands/templates.d.ts.map +1 -0
- package/dist/commands/templates.js +12 -0
- package/dist/commands/templates.js.map +1 -0
- package/dist/constants.d.ts +23 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +23 -0
- package/dist/constants.js.map +1 -0
- package/dist/generators/__tests__/boss-config.test.d.ts +2 -0
- package/dist/generators/__tests__/boss-config.test.d.ts.map +1 -0
- package/dist/generators/__tests__/boss-config.test.js +61 -0
- package/dist/generators/__tests__/boss-config.test.js.map +1 -0
- package/dist/generators/__tests__/claude-folder.test.d.ts +2 -0
- package/dist/generators/__tests__/claude-folder.test.d.ts.map +1 -0
- package/dist/generators/__tests__/claude-folder.test.js +128 -0
- package/dist/generators/__tests__/claude-folder.test.js.map +1 -0
- package/dist/generators/__tests__/claude-md.test.d.ts +2 -0
- package/dist/generators/__tests__/claude-md.test.d.ts.map +1 -0
- package/dist/generators/__tests__/claude-md.test.js +55 -0
- package/dist/generators/__tests__/claude-md.test.js.map +1 -0
- package/dist/generators/__tests__/container-use-config.test.d.ts +2 -0
- package/dist/generators/__tests__/container-use-config.test.d.ts.map +1 -0
- package/dist/generators/__tests__/container-use-config.test.js +80 -0
- package/dist/generators/__tests__/container-use-config.test.js.map +1 -0
- package/dist/generators/__tests__/docker-compose.test.d.ts +2 -0
- package/dist/generators/__tests__/docker-compose.test.d.ts.map +1 -0
- package/dist/generators/__tests__/docker-compose.test.js +39 -0
- package/dist/generators/__tests__/docker-compose.test.js.map +1 -0
- package/dist/generators/__tests__/git-hooks.test.d.ts +2 -0
- package/dist/generators/__tests__/git-hooks.test.d.ts.map +1 -0
- package/dist/generators/__tests__/git-hooks.test.js +118 -0
- package/dist/generators/__tests__/git-hooks.test.js.map +1 -0
- package/dist/generators/__tests__/github-workflows.test.d.ts +2 -0
- package/dist/generators/__tests__/github-workflows.test.d.ts.map +1 -0
- package/dist/generators/__tests__/github-workflows.test.js +86 -0
- package/dist/generators/__tests__/github-workflows.test.js.map +1 -0
- package/dist/generators/__tests__/mcp-config.test.d.ts +2 -0
- package/dist/generators/__tests__/mcp-config.test.d.ts.map +1 -0
- package/dist/generators/__tests__/mcp-config.test.js +131 -0
- package/dist/generators/__tests__/mcp-config.test.js.map +1 -0
- package/dist/generators/__tests__/project-structure.test.d.ts +2 -0
- package/dist/generators/__tests__/project-structure.test.d.ts.map +1 -0
- package/dist/generators/__tests__/project-structure.test.js +40 -0
- package/dist/generators/__tests__/project-structure.test.js.map +1 -0
- package/dist/generators/__tests__/quality-gates.test.d.ts +2 -0
- package/dist/generators/__tests__/quality-gates.test.d.ts.map +1 -0
- package/dist/generators/__tests__/quality-gates.test.js +71 -0
- package/dist/generators/__tests__/quality-gates.test.js.map +1 -0
- package/dist/generators/__tests__/specify-structure.test.d.ts +2 -0
- package/dist/generators/__tests__/specify-structure.test.d.ts.map +1 -0
- package/dist/generators/__tests__/specify-structure.test.js +63 -0
- package/dist/generators/__tests__/specify-structure.test.js.map +1 -0
- package/dist/generators/__tests__/start-boss-sh.test.d.ts +2 -0
- package/dist/generators/__tests__/start-boss-sh.test.d.ts.map +1 -0
- package/dist/generators/__tests__/start-boss-sh.test.js +36 -0
- package/dist/generators/__tests__/start-boss-sh.test.js.map +1 -0
- package/dist/generators/__tests__/template-docs.test.d.ts +2 -0
- package/dist/generators/__tests__/template-docs.test.d.ts.map +1 -0
- package/dist/generators/__tests__/template-docs.test.js +92 -0
- package/dist/generators/__tests__/template-docs.test.js.map +1 -0
- package/dist/generators/__tests__/template-loader.test.d.ts +2 -0
- package/dist/generators/__tests__/template-loader.test.d.ts.map +1 -0
- package/dist/generators/__tests__/template-loader.test.js +215 -0
- package/dist/generators/__tests__/template-loader.test.js.map +1 -0
- package/dist/generators/__tests__/worker-configs.test.d.ts +2 -0
- package/dist/generators/__tests__/worker-configs.test.d.ts.map +1 -0
- package/dist/generators/__tests__/worker-configs.test.js +122 -0
- package/dist/generators/__tests__/worker-configs.test.js.map +1 -0
- package/dist/generators/boss-config.d.ts +3 -0
- package/dist/generators/boss-config.d.ts.map +1 -0
- package/dist/generators/boss-config.js +242 -0
- package/dist/generators/boss-config.js.map +1 -0
- package/dist/generators/claude-folder.d.ts +3 -0
- package/dist/generators/claude-folder.d.ts.map +1 -0
- package/dist/generators/claude-folder.js +94 -0
- package/dist/generators/claude-folder.js.map +1 -0
- package/dist/generators/claude-md.d.ts +3 -0
- package/dist/generators/claude-md.d.ts.map +1 -0
- package/dist/generators/claude-md.js +64 -0
- package/dist/generators/claude-md.js.map +1 -0
- package/dist/generators/container-use-config.d.ts +13 -0
- package/dist/generators/container-use-config.d.ts.map +1 -0
- package/dist/generators/container-use-config.js +60 -0
- package/dist/generators/container-use-config.js.map +1 -0
- package/dist/generators/docker-compose.d.ts +2 -0
- package/dist/generators/docker-compose.d.ts.map +1 -0
- package/dist/generators/docker-compose.js +8 -0
- package/dist/generators/docker-compose.js.map +1 -0
- package/dist/generators/git-hooks.d.ts +3 -0
- package/dist/generators/git-hooks.d.ts.map +1 -0
- package/dist/generators/git-hooks.js +58 -0
- package/dist/generators/git-hooks.js.map +1 -0
- package/dist/generators/github-workflows.d.ts +3 -0
- package/dist/generators/github-workflows.d.ts.map +1 -0
- package/dist/generators/github-workflows.js +27 -0
- package/dist/generators/github-workflows.js.map +1 -0
- package/dist/generators/mcp-config.d.ts +3 -0
- package/dist/generators/mcp-config.d.ts.map +1 -0
- package/dist/generators/mcp-config.js +183 -0
- package/dist/generators/mcp-config.js.map +1 -0
- package/dist/generators/project-structure.d.ts +3 -0
- package/dist/generators/project-structure.d.ts.map +1 -0
- package/dist/generators/project-structure.js +24 -0
- package/dist/generators/project-structure.js.map +1 -0
- package/dist/generators/quality-gates.d.ts +3 -0
- package/dist/generators/quality-gates.d.ts.map +1 -0
- package/dist/generators/quality-gates.js +32 -0
- package/dist/generators/quality-gates.js.map +1 -0
- package/dist/generators/specify-structure.d.ts +2 -0
- package/dist/generators/specify-structure.d.ts.map +1 -0
- package/dist/generators/specify-structure.js +43 -0
- package/dist/generators/specify-structure.js.map +1 -0
- package/dist/generators/start-boss-sh.d.ts +2 -0
- package/dist/generators/start-boss-sh.d.ts.map +1 -0
- package/dist/generators/start-boss-sh.js +10 -0
- package/dist/generators/start-boss-sh.js.map +1 -0
- package/dist/generators/template-docs.d.ts +3 -0
- package/dist/generators/template-docs.d.ts.map +1 -0
- package/dist/generators/template-docs.js +19 -0
- package/dist/generators/template-docs.js.map +1 -0
- package/dist/generators/template-loader.d.ts +3 -0
- package/dist/generators/template-loader.d.ts.map +1 -0
- package/dist/generators/template-loader.js +308 -0
- package/dist/generators/template-loader.js.map +1 -0
- package/dist/generators/worker-configs.d.ts +3 -0
- package/dist/generators/worker-configs.d.ts.map +1 -0
- package/dist/generators/worker-configs.js +119 -0
- package/dist/generators/worker-configs.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +57 -0
- package/dist/index.js.map +1 -0
- package/dist/presets/__tests__/quality-presets.test.d.ts +2 -0
- package/dist/presets/__tests__/quality-presets.test.d.ts.map +1 -0
- package/dist/presets/__tests__/quality-presets.test.js +152 -0
- package/dist/presets/__tests__/quality-presets.test.js.map +1 -0
- package/dist/presets/quality-presets.d.ts +3 -0
- package/dist/presets/quality-presets.d.ts.map +1 -0
- package/dist/presets/quality-presets.js +65 -0
- package/dist/presets/quality-presets.js.map +1 -0
- package/dist/types/index.d.ts +42 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/__tests__/file-system.test.d.ts +2 -0
- package/dist/utils/__tests__/file-system.test.d.ts.map +1 -0
- package/dist/utils/__tests__/file-system.test.js +83 -0
- package/dist/utils/__tests__/file-system.test.js.map +1 -0
- package/dist/utils/__tests__/git.test.d.ts +2 -0
- package/dist/utils/__tests__/git.test.d.ts.map +1 -0
- package/dist/utils/__tests__/git.test.js +79 -0
- package/dist/utils/__tests__/git.test.js.map +1 -0
- package/dist/utils/__tests__/template-loader.test.d.ts +2 -0
- package/dist/utils/__tests__/template-loader.test.d.ts.map +1 -0
- package/dist/utils/__tests__/template-loader.test.js +109 -0
- package/dist/utils/__tests__/template-loader.test.js.map +1 -0
- package/dist/utils/__tests__/validators.test.d.ts +2 -0
- package/dist/utils/__tests__/validators.test.d.ts.map +1 -0
- package/dist/utils/__tests__/validators.test.js +118 -0
- package/dist/utils/__tests__/validators.test.js.map +1 -0
- package/dist/utils/file-system.d.ts +8 -0
- package/dist/utils/file-system.d.ts.map +1 -0
- package/dist/utils/file-system.js +54 -0
- package/dist/utils/file-system.js.map +1 -0
- package/dist/utils/git.d.ts +7 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +98 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/logger.d.ts +13 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +42 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/prompts.d.ts +18 -0
- package/dist/utils/prompts.d.ts.map +1 -0
- package/dist/utils/prompts.js +197 -0
- package/dist/utils/prompts.js.map +1 -0
- package/dist/utils/template-loader.d.ts +18 -0
- package/dist/utils/template-loader.d.ts.map +1 -0
- package/dist/utils/template-loader.js +92 -0
- package/dist/utils/template-loader.js.map +1 -0
- package/dist/utils/validators.d.ts +21 -0
- package/dist/utils/validators.d.ts.map +1 -0
- package/dist/utils/validators.js +50 -0
- package/dist/utils/validators.js.map +1 -0
- package/package.json +79 -0
- package/templates/spec-kit/README.md +17 -0
- package/templates/spec-kit/memory/constitution.md +50 -0
- package/templates/spec-kit/scripts/bash/check-prerequisites.sh +166 -0
- package/templates/spec-kit/scripts/bash/common.sh +156 -0
- package/templates/spec-kit/scripts/bash/create-new-feature.sh +297 -0
- package/templates/spec-kit/scripts/bash/setup-plan.sh +61 -0
- package/templates/spec-kit/scripts/bash/update-agent-context.sh +799 -0
- package/templates/spec-kit/scripts/powershell/check-prerequisites.ps1 +148 -0
- package/templates/spec-kit/scripts/powershell/common.ps1 +137 -0
- package/templates/spec-kit/scripts/powershell/create-new-feature.ps1 +283 -0
- package/templates/spec-kit/scripts/powershell/setup-plan.ps1 +61 -0
- package/templates/spec-kit/scripts/powershell/update-agent-context.ps1 +448 -0
- package/templates/spec-kit/src/specify_cli/__init__.py +1369 -0
- package/templates/spec-kit/templates/agent-file-template.md +28 -0
- package/templates/spec-kit/templates/checklist-template.md +40 -0
- package/templates/spec-kit/templates/commands/analyze.md +187 -0
- package/templates/spec-kit/templates/commands/checklist.md +297 -0
- package/templates/spec-kit/templates/commands/clarify.md +184 -0
- package/templates/spec-kit/templates/commands/constitution.md +82 -0
- package/templates/spec-kit/templates/commands/implement.md +138 -0
- package/templates/spec-kit/templates/commands/plan.md +95 -0
- package/templates/spec-kit/templates/commands/specify.md +261 -0
- package/templates/spec-kit/templates/commands/tasks.md +140 -0
- package/templates/spec-kit/templates/commands/taskstoissues.md +33 -0
- package/templates/spec-kit/templates/plan-template.md +104 -0
- package/templates/spec-kit/templates/spec-template.md +115 -0
- package/templates/spec-kit/templates/tasks-template.md +251 -0
- package/templates/spec-kit/templates/vscode-settings.json +14 -0
- package/templates/t3-app/README.md +41 -0
- package/templates/t3-app/base/README.md +29 -0
- package/templates/t3-app/base/_gitignore +47 -0
- package/templates/t3-app/base/next-env.d.ts +5 -0
- package/templates/t3-app/base/next.config.js +22 -0
- package/templates/t3-app/base/package.json +26 -0
- package/templates/t3-app/base/public/favicon.ico +0 -0
- package/templates/t3-app/base/src/env.js +40 -0
- package/templates/t3-app/base/src/styles/globals.css +16 -0
- package/templates/t3-app/base/tsconfig.json +42 -0
- package/templates/t3-app/extras/config/_eslint.base.js +45 -0
- package/templates/t3-app/extras/config/_eslint.drizzle.js +58 -0
- package/templates/t3-app/extras/config/_prettier.config.js +2 -0
- package/templates/t3-app/extras/config/_tailwind.prettier.config.js +4 -0
- package/templates/t3-app/extras/config/biome.jsonc +69 -0
- package/templates/t3-app/extras/config/drizzle-config-mysql.ts +12 -0
- package/templates/t3-app/extras/config/drizzle-config-postgres.ts +12 -0
- package/templates/t3-app/extras/config/drizzle-config-sqlite.ts +12 -0
- package/templates/t3-app/extras/config/next-config-appdir.js +10 -0
- package/templates/t3-app/extras/config/postcss.config.js +5 -0
- package/templates/t3-app/extras/pnpm/_npmrc +2 -0
- package/templates/t3-app/extras/prisma/schema/base-planetscale.prisma +25 -0
- package/templates/t3-app/extras/prisma/schema/base.prisma +21 -0
- package/templates/t3-app/extras/prisma/schema/with-auth-planetscale.prisma +79 -0
- package/templates/t3-app/extras/prisma/schema/with-auth.prisma +75 -0
- package/templates/t3-app/extras/prisma/schema/with-better-auth-planetscale.prisma +90 -0
- package/templates/t3-app/extras/prisma/schema/with-better-auth.prisma +89 -0
- package/templates/t3-app/extras/src/app/_components/post-tw.tsx +50 -0
- package/templates/t3-app/extras/src/app/_components/post.tsx +54 -0
- package/templates/t3-app/extras/src/app/api/auth/[...all]/route.ts +5 -0
- package/templates/t3-app/extras/src/app/api/auth/[...nextauth]/route.ts +3 -0
- package/templates/t3-app/extras/src/app/api/trpc/[trpc]/route.ts +34 -0
- package/templates/t3-app/extras/src/app/layout/base.tsx +24 -0
- package/templates/t3-app/extras/src/app/layout/with-trpc-tw.tsx +29 -0
- package/templates/t3-app/extras/src/app/layout/with-trpc.tsx +28 -0
- package/templates/t3-app/extras/src/app/layout/with-tw.tsx +25 -0
- package/templates/t3-app/extras/src/app/page/base.tsx +39 -0
- package/templates/t3-app/extras/src/app/page/with-auth-trpc-tw.tsx +69 -0
- package/templates/t3-app/extras/src/app/page/with-auth-trpc.tsx +70 -0
- package/templates/t3-app/extras/src/app/page/with-better-auth-trpc-tw.tsx +105 -0
- package/templates/t3-app/extras/src/app/page/with-better-auth-trpc.tsx +103 -0
- package/templates/t3-app/extras/src/app/page/with-better-auth-tw.tsx +90 -0
- package/templates/t3-app/extras/src/app/page/with-better-auth.tsx +88 -0
- package/templates/t3-app/extras/src/app/page/with-trpc-tw.tsx +53 -0
- package/templates/t3-app/extras/src/app/page/with-trpc.tsx +54 -0
- package/templates/t3-app/extras/src/app/page/with-tw.tsx +37 -0
- package/templates/t3-app/extras/src/env/with-auth-db-planetscale.js +58 -0
- package/templates/t3-app/extras/src/env/with-auth-db.js +52 -0
- package/templates/t3-app/extras/src/env/with-auth.js +51 -0
- package/templates/t3-app/extras/src/env/with-better-auth-db-planetscale.js +58 -0
- package/templates/t3-app/extras/src/env/with-better-auth-db.js +50 -0
- package/templates/t3-app/extras/src/env/with-better-auth.js +49 -0
- package/templates/t3-app/extras/src/env/with-db-planetscale.js +50 -0
- package/templates/t3-app/extras/src/env/with-db.js +44 -0
- package/templates/t3-app/extras/src/index.module.css +177 -0
- package/templates/t3-app/extras/src/pages/_app/base.tsx +18 -0
- package/templates/t3-app/extras/src/pages/_app/with-auth-trpc-tw.tsx +27 -0
- package/templates/t3-app/extras/src/pages/_app/with-auth-trpc.tsx +27 -0
- package/templates/t3-app/extras/src/pages/_app/with-auth-tw.tsx +25 -0
- package/templates/t3-app/extras/src/pages/_app/with-auth.tsx +25 -0
- package/templates/t3-app/extras/src/pages/_app/with-better-auth-trpc-tw.tsx +20 -0
- package/templates/t3-app/extras/src/pages/_app/with-better-auth-trpc.tsx +20 -0
- package/templates/t3-app/extras/src/pages/_app/with-trpc-tw.tsx +20 -0
- package/templates/t3-app/extras/src/pages/_app/with-trpc.tsx +20 -0
- package/templates/t3-app/extras/src/pages/_app/with-tw.tsx +18 -0
- package/templates/t3-app/extras/src/pages/api/auth/[...all].ts +8 -0
- package/templates/t3-app/extras/src/pages/api/trpc/[trpc].ts +19 -0
- package/templates/t3-app/extras/src/pages/index/base.tsx +47 -0
- package/templates/t3-app/extras/src/pages/index/with-auth-trpc-tw.tsx +81 -0
- package/templates/t3-app/extras/src/pages/index/with-auth-trpc.tsx +82 -0
- package/templates/t3-app/extras/src/pages/index/with-better-auth-trpc-tw.tsx +99 -0
- package/templates/t3-app/extras/src/pages/index/with-better-auth-trpc.tsx +100 -0
- package/templates/t3-app/extras/src/pages/index/with-better-auth-tw.tsx +87 -0
- package/templates/t3-app/extras/src/pages/index/with-better-auth.tsx +88 -0
- package/templates/t3-app/extras/src/pages/index/with-trpc-tw.tsx +52 -0
- package/templates/t3-app/extras/src/pages/index/with-trpc.tsx +53 -0
- package/templates/t3-app/extras/src/pages/index/with-tw.tsx +45 -0
- package/templates/t3-app/extras/src/server/api/root.ts +23 -0
- package/templates/t3-app/extras/src/server/api/routers/post/base.ts +40 -0
- package/templates/t3-app/extras/src/server/api/routers/post/with-auth-drizzle.ts +39 -0
- package/templates/t3-app/extras/src/server/api/routers/post/with-auth-prisma.ts +41 -0
- package/templates/t3-app/extras/src/server/api/routers/post/with-auth.ts +37 -0
- package/templates/t3-app/extras/src/server/api/routers/post/with-drizzle.ts +30 -0
- package/templates/t3-app/extras/src/server/api/routers/post/with-prisma.ts +31 -0
- package/templates/t3-app/extras/src/server/api/trpc-app/base.ts +103 -0
- package/templates/t3-app/extras/src/server/api/trpc-app/with-auth-db.ts +133 -0
- package/templates/t3-app/extras/src/server/api/trpc-app/with-auth.ts +130 -0
- package/templates/t3-app/extras/src/server/api/trpc-app/with-better-auth-db.ts +134 -0
- package/templates/t3-app/extras/src/server/api/trpc-app/with-better-auth.ts +131 -0
- package/templates/t3-app/extras/src/server/api/trpc-app/with-db.ts +106 -0
- package/templates/t3-app/extras/src/server/api/trpc-pages/base.ts +122 -0
- package/templates/t3-app/extras/src/server/api/trpc-pages/with-auth-db.ts +160 -0
- package/templates/t3-app/extras/src/server/api/trpc-pages/with-auth.ts +158 -0
- package/templates/t3-app/extras/src/server/api/trpc-pages/with-better-auth-db.ts +168 -0
- package/templates/t3-app/extras/src/server/api/trpc-pages/with-better-auth.ts +166 -0
- package/templates/t3-app/extras/src/server/api/trpc-pages/with-db.ts +125 -0
- package/templates/t3-app/extras/src/server/auth/config/base.ts +52 -0
- package/templates/t3-app/extras/src/server/auth/config/with-drizzle.ts +67 -0
- package/templates/t3-app/extras/src/server/auth/config/with-prisma.ts +56 -0
- package/templates/t3-app/extras/src/server/auth/index.ts +10 -0
- package/templates/t3-app/extras/src/server/better-auth/client.ts +5 -0
- package/templates/t3-app/extras/src/server/better-auth/config/base.ts +12 -0
- package/templates/t3-app/extras/src/server/better-auth/config/with-drizzle.ts +26 -0
- package/templates/t3-app/extras/src/server/better-auth/config/with-prisma.ts +26 -0
- package/templates/t3-app/extras/src/server/better-auth/index.ts +1 -0
- package/templates/t3-app/extras/src/server/better-auth/server.ts +7 -0
- package/templates/t3-app/extras/src/server/db/db-prisma-planetscale.ts +19 -0
- package/templates/t3-app/extras/src/server/db/db-prisma.ts +16 -0
- package/templates/t3-app/extras/src/server/db/index-drizzle/with-mysql.ts +18 -0
- package/templates/t3-app/extras/src/server/db/index-drizzle/with-planetscale.ts +7 -0
- package/templates/t3-app/extras/src/server/db/index-drizzle/with-postgres.ts +18 -0
- package/templates/t3-app/extras/src/server/db/index-drizzle/with-sqlite.ts +19 -0
- package/templates/t3-app/extras/src/server/db/schema-drizzle/base-mysql.ts +26 -0
- package/templates/t3-app/extras/src/server/db/schema-drizzle/base-planetscale.ts +26 -0
- package/templates/t3-app/extras/src/server/db/schema-drizzle/base-postgres.ts +26 -0
- package/templates/t3-app/extras/src/server/db/schema-drizzle/base-sqlite.ts +27 -0
- package/templates/t3-app/extras/src/server/db/schema-drizzle/with-auth-mysql.ts +111 -0
- package/templates/t3-app/extras/src/server/db/schema-drizzle/with-auth-planetscale.ts +100 -0
- package/templates/t3-app/extras/src/server/db/schema-drizzle/with-auth-postgres.ts +108 -0
- package/templates/t3-app/extras/src/server/db/schema-drizzle/with-auth-sqlite.ts +105 -0
- package/templates/t3-app/extras/src/server/db/schema-drizzle/with-better-auth-mysql.ts +106 -0
- package/templates/t3-app/extras/src/server/db/schema-drizzle/with-better-auth-planetscale.ts +106 -0
- package/templates/t3-app/extras/src/server/db/schema-drizzle/with-better-auth-postgres.ts +105 -0
- package/templates/t3-app/extras/src/server/db/schema-drizzle/with-better-auth-sqlite.ts +134 -0
- package/templates/t3-app/extras/src/styles/globals.css +6 -0
- package/templates/t3-app/extras/src/trpc/query-client.ts +25 -0
- package/templates/t3-app/extras/src/trpc/react.tsx +78 -0
- package/templates/t3-app/extras/src/trpc/server.ts +30 -0
- package/templates/t3-app/extras/src/utils/api.ts +68 -0
- package/templates/t3-app/extras/start-database/mysql.sh +86 -0
- package/templates/t3-app/extras/start-database/postgres.sh +88 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the path to the assets folder
|
|
3
|
+
* Works in both development (src/) and production (dist/) environments
|
|
4
|
+
*/
|
|
5
|
+
export declare function getAssetPath(relativePath: string, baseDir?: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Load a template file and interpolate variables
|
|
8
|
+
* @param assetPath Relative path from assets/ folder (e.g., "git-hooks/pre-commit.sh")
|
|
9
|
+
* @param variables Variables to interpolate in the template
|
|
10
|
+
* @param baseDir Optional base directory for testing
|
|
11
|
+
*/
|
|
12
|
+
export declare function loadTemplate(assetPath: string, variables?: Record<string, any>, baseDir?: string): Promise<string>;
|
|
13
|
+
/**
|
|
14
|
+
* Discover all worker folders in assets/worker-configs/
|
|
15
|
+
* @param baseDir Optional base directory for testing
|
|
16
|
+
*/
|
|
17
|
+
export declare function discoverWorkers(baseDir?: string): Promise<string[]>;
|
|
18
|
+
//# sourceMappingURL=template-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-loader.d.ts","sourceRoot":"","sources":["../../src/utils/template-loader.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAW3E;AAsCD;;;;;GAKG;AACH,wBAAsB,YAAY,CAChC,SAAS,EAAE,MAAM,EACjB,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EACnC,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,CAAC,CASjB;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAwBzE"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
3
|
+
import fs from 'fs-extra';
|
|
4
|
+
import { promises as fsPromises } from 'fs';
|
|
5
|
+
import { readFile } from './file-system.js';
|
|
6
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
+
const __dirname = path.dirname(__filename);
|
|
8
|
+
/**
|
|
9
|
+
* Get the path to the assets folder
|
|
10
|
+
* Works in both development (src/) and production (dist/) environments
|
|
11
|
+
*/
|
|
12
|
+
export function getAssetPath(relativePath, baseDir) {
|
|
13
|
+
// If baseDir is provided (for testing), use it
|
|
14
|
+
if (baseDir) {
|
|
15
|
+
return path.join(baseDir, 'assets', relativePath);
|
|
16
|
+
}
|
|
17
|
+
// In development: src/utils/ -> assets is at boss-cli/assets/
|
|
18
|
+
// In production: dist/utils/ -> assets is at boss-cli/assets/
|
|
19
|
+
// Go up from utils/ to boss-cli/ root, then to assets/
|
|
20
|
+
const bossCliRoot = path.resolve(__dirname, '../..');
|
|
21
|
+
return path.join(bossCliRoot, 'assets', relativePath);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Resolve nested object property path (e.g., "config.name" -> config.name)
|
|
25
|
+
*/
|
|
26
|
+
function resolveNestedProperty(obj, path) {
|
|
27
|
+
return path.split('.').reduce((current, prop) => {
|
|
28
|
+
if (current === null || current === undefined) {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
return current[prop];
|
|
32
|
+
}, obj);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Interpolate variables in template string
|
|
36
|
+
* Supports: ${variable} and ${config.property}
|
|
37
|
+
*/
|
|
38
|
+
function interpolateTemplate(template, variables) {
|
|
39
|
+
return template.replace(/\$\{([^}]+)\}/g, (match, varPath) => {
|
|
40
|
+
const trimmedPath = varPath.trim();
|
|
41
|
+
// Try direct property first
|
|
42
|
+
if (variables[trimmedPath] !== undefined) {
|
|
43
|
+
return String(variables[trimmedPath]);
|
|
44
|
+
}
|
|
45
|
+
// Try nested property (e.g., config.name)
|
|
46
|
+
const value = resolveNestedProperty(variables, trimmedPath);
|
|
47
|
+
if (value !== undefined && value !== null) {
|
|
48
|
+
return String(value);
|
|
49
|
+
}
|
|
50
|
+
// If not found, return the original placeholder
|
|
51
|
+
return match;
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Load a template file and interpolate variables
|
|
56
|
+
* @param assetPath Relative path from assets/ folder (e.g., "git-hooks/pre-commit.sh")
|
|
57
|
+
* @param variables Variables to interpolate in the template
|
|
58
|
+
* @param baseDir Optional base directory for testing
|
|
59
|
+
*/
|
|
60
|
+
export async function loadTemplate(assetPath, variables = {}, baseDir) {
|
|
61
|
+
const fullPath = getAssetPath(assetPath, baseDir);
|
|
62
|
+
if (!(await fs.pathExists(fullPath))) {
|
|
63
|
+
throw new Error(`Template file not found: ${fullPath}`);
|
|
64
|
+
}
|
|
65
|
+
const template = await readFile(fullPath);
|
|
66
|
+
return interpolateTemplate(template, variables);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Discover all worker folders in assets/worker-configs/
|
|
70
|
+
* @param baseDir Optional base directory for testing
|
|
71
|
+
*/
|
|
72
|
+
export async function discoverWorkers(baseDir) {
|
|
73
|
+
const workerConfigsPath = getAssetPath('worker-configs', baseDir);
|
|
74
|
+
// Return empty array if directory doesn't exist
|
|
75
|
+
if (!(await fs.pathExists(workerConfigsPath))) {
|
|
76
|
+
return [];
|
|
77
|
+
}
|
|
78
|
+
const entries = await fsPromises.readdir(workerConfigsPath, { withFileTypes: true });
|
|
79
|
+
const workers = [];
|
|
80
|
+
for (const entry of entries) {
|
|
81
|
+
// Filter out hidden files and common non-worker directories
|
|
82
|
+
if (entry.name.startsWith('.') || entry.name === 'node_modules') {
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
// Only include directories
|
|
86
|
+
if (entry.isDirectory()) {
|
|
87
|
+
workers.push(entry.name);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return workers.sort(); // Return sorted for consistency
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=template-loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-loader.js","sourceRoot":"","sources":["../../src/utils/template-loader.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare function validateProjectName(name: string): {
|
|
2
|
+
valid: boolean;
|
|
3
|
+
error?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function validateProjectDirectory(dir: string): Promise<{
|
|
6
|
+
valid: boolean;
|
|
7
|
+
error?: string;
|
|
8
|
+
}>;
|
|
9
|
+
export declare function validateTemplate(template: string): {
|
|
10
|
+
valid: boolean;
|
|
11
|
+
error?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function validateQualityPreset(quality: string): {
|
|
14
|
+
valid: boolean;
|
|
15
|
+
error?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function validateMCPScope(scope: string): {
|
|
18
|
+
valid: boolean;
|
|
19
|
+
error?: string;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=validators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/utils/validators.ts"],"names":[],"mappings":"AAGA,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAcpF;AAED,wBAAsB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAgBvG;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAMrF;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAMzF;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAMlF"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
export function validateProjectName(name) {
|
|
4
|
+
if (!name || name.trim().length === 0) {
|
|
5
|
+
return { valid: false, error: 'Project name is required' };
|
|
6
|
+
}
|
|
7
|
+
if (!/^[a-z0-9-]+$/.test(name)) {
|
|
8
|
+
return { valid: false, error: 'Project name must contain only lowercase letters, numbers, and hyphens' };
|
|
9
|
+
}
|
|
10
|
+
if (name.startsWith('-') || name.endsWith('-')) {
|
|
11
|
+
return { valid: false, error: 'Project name cannot start or end with a hyphen' };
|
|
12
|
+
}
|
|
13
|
+
return { valid: true };
|
|
14
|
+
}
|
|
15
|
+
export async function validateProjectDirectory(dir) {
|
|
16
|
+
const fullPath = path.resolve(dir);
|
|
17
|
+
if (await fs.pathExists(fullPath)) {
|
|
18
|
+
const stats = await fs.stat(fullPath);
|
|
19
|
+
if (!stats.isDirectory()) {
|
|
20
|
+
return { valid: false, error: `Path exists but is not a directory: ${fullPath}` };
|
|
21
|
+
}
|
|
22
|
+
const files = await fs.readdir(fullPath);
|
|
23
|
+
if (files.length > 0) {
|
|
24
|
+
return { valid: false, error: `Directory is not empty: ${fullPath}` };
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return { valid: true };
|
|
28
|
+
}
|
|
29
|
+
export function validateTemplate(template) {
|
|
30
|
+
const validTemplates = ['nextjs-app-turbo', 'api-service-fastify', 'blank', 't3-app'];
|
|
31
|
+
if (!validTemplates.includes(template)) {
|
|
32
|
+
return { valid: false, error: `Invalid template: ${template}. Must be one of: ${validTemplates.join(', ')}` };
|
|
33
|
+
}
|
|
34
|
+
return { valid: true };
|
|
35
|
+
}
|
|
36
|
+
export function validateQualityPreset(quality) {
|
|
37
|
+
const validPresets = ['startup', 'production', 'enterprise'];
|
|
38
|
+
if (!validPresets.includes(quality)) {
|
|
39
|
+
return { valid: false, error: `Invalid quality preset: ${quality}. Must be one of: ${validPresets.join(', ')}` };
|
|
40
|
+
}
|
|
41
|
+
return { valid: true };
|
|
42
|
+
}
|
|
43
|
+
export function validateMCPScope(scope) {
|
|
44
|
+
const validScopes = ['user', 'project', 'both'];
|
|
45
|
+
if (!validScopes.includes(scope)) {
|
|
46
|
+
return { valid: false, error: `Invalid MCP scope: ${scope}. Must be one of: ${validScopes.join(', ')}` };
|
|
47
|
+
}
|
|
48
|
+
return { valid: true };
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=validators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/utils/validators.ts"],"names":[],"mappings":"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"}
|
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@glxmart/boss-cli",
|
|
3
|
+
"version": "1.0.0-beta.0",
|
|
4
|
+
"description": "BOSS Bootstrap CLI - Scaffold new BOSS projects with complete configuration",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"boss": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=18.0.0",
|
|
12
|
+
"pnpm": ">=8.0.0"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"boss",
|
|
16
|
+
"bootstrap",
|
|
17
|
+
"cli",
|
|
18
|
+
"scaffold"
|
|
19
|
+
],
|
|
20
|
+
"author": "glxmart",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public",
|
|
24
|
+
"registry": "https://registry.npmjs.org/"
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "https://github.com/glxmart/boss.git",
|
|
29
|
+
"directory": "boss-cli"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https://github.com/glxmart/boss/tree/main/boss-cli#readme",
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": "https://github.com/glxmart/boss/issues"
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist",
|
|
37
|
+
"assets",
|
|
38
|
+
"templates",
|
|
39
|
+
"README.md",
|
|
40
|
+
"LICENSE"
|
|
41
|
+
],
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"chalk": "^5.3.0",
|
|
44
|
+
"commander": "^11.0.0",
|
|
45
|
+
"execa": "^8.0.0",
|
|
46
|
+
"fs-extra": "^11.1.0",
|
|
47
|
+
"handlebars": "^4.7.0",
|
|
48
|
+
"inquirer": "^9.2.0",
|
|
49
|
+
"js-yaml": "^4.1.0",
|
|
50
|
+
"ora": "^7.0.0",
|
|
51
|
+
"@glxmart/conductor-mcp": "0.1.0-beta.0"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@eslint/js": "^9.18.0",
|
|
55
|
+
"@types/fs-extra": "^11.0.0",
|
|
56
|
+
"@types/inquirer": "^9.0.0",
|
|
57
|
+
"@types/js-yaml": "^4.0.9",
|
|
58
|
+
"@types/node": "^20.0.0",
|
|
59
|
+
"@vitest/coverage-v8": "^4.0.0",
|
|
60
|
+
"eslint": "^9.18.0",
|
|
61
|
+
"tsx": "^4.7.0",
|
|
62
|
+
"typescript": "^5.3.0",
|
|
63
|
+
"typescript-eslint": "^8.20.0",
|
|
64
|
+
"vitest": "^4.0.0"
|
|
65
|
+
},
|
|
66
|
+
"scripts": {
|
|
67
|
+
"build": "tsc && cp -r assets dist/",
|
|
68
|
+
"dev": "tsx watch src/index.ts",
|
|
69
|
+
"start": "node dist/index.js",
|
|
70
|
+
"lint": "eslint .",
|
|
71
|
+
"lint:fix": "eslint . --fix",
|
|
72
|
+
"test": "vitest run",
|
|
73
|
+
"test:watch": "vitest",
|
|
74
|
+
"test:coverage": "vitest run --coverage",
|
|
75
|
+
"test:integration": "vitest run --config vitest.integration.config.ts",
|
|
76
|
+
"test:local": "bash test-local.sh",
|
|
77
|
+
"debug:spawn": "bash scripts/debug-worker-spawn.sh"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Spec-Kit Bundle
|
|
2
|
+
|
|
3
|
+
This directory contains the bundled Spec-Kit structure (v0.0.90) that will be copied to each BOSS project during bootstrap.
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
|
|
7
|
+
- `templates/` - Spec-Kit template files
|
|
8
|
+
- `scripts/` - Spec-Kit scripts (speckit.* commands)
|
|
9
|
+
- `memory/` - Spec-Kit memory structure (constitution template)
|
|
10
|
+
- `src/specify_cli/` - Spec-Kit Python CLI code (if needed)
|
|
11
|
+
|
|
12
|
+
## Version
|
|
13
|
+
|
|
14
|
+
Spec-Kit v0.0.90 downloaded from https://github.com/github/spec-kit/releases/tag/v0.0.90
|
|
15
|
+
|
|
16
|
+
The bootstrap process will copy this entire structure to `.specify/` in each new project.
|
|
17
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# [PROJECT_NAME] Constitution
|
|
2
|
+
<!-- Example: Spec Constitution, TaskFlow Constitution, etc. -->
|
|
3
|
+
|
|
4
|
+
## Core Principles
|
|
5
|
+
|
|
6
|
+
### [PRINCIPLE_1_NAME]
|
|
7
|
+
<!-- Example: I. Library-First -->
|
|
8
|
+
[PRINCIPLE_1_DESCRIPTION]
|
|
9
|
+
<!-- Example: Every feature starts as a standalone library; Libraries must be self-contained, independently testable, documented; Clear purpose required - no organizational-only libraries -->
|
|
10
|
+
|
|
11
|
+
### [PRINCIPLE_2_NAME]
|
|
12
|
+
<!-- Example: II. CLI Interface -->
|
|
13
|
+
[PRINCIPLE_2_DESCRIPTION]
|
|
14
|
+
<!-- Example: Every library exposes functionality via CLI; Text in/out protocol: stdin/args → stdout, errors → stderr; Support JSON + human-readable formats -->
|
|
15
|
+
|
|
16
|
+
### [PRINCIPLE_3_NAME]
|
|
17
|
+
<!-- Example: III. Test-First (NON-NEGOTIABLE) -->
|
|
18
|
+
[PRINCIPLE_3_DESCRIPTION]
|
|
19
|
+
<!-- Example: TDD mandatory: Tests written → User approved → Tests fail → Then implement; Red-Green-Refactor cycle strictly enforced -->
|
|
20
|
+
|
|
21
|
+
### [PRINCIPLE_4_NAME]
|
|
22
|
+
<!-- Example: IV. Integration Testing -->
|
|
23
|
+
[PRINCIPLE_4_DESCRIPTION]
|
|
24
|
+
<!-- Example: Focus areas requiring integration tests: New library contract tests, Contract changes, Inter-service communication, Shared schemas -->
|
|
25
|
+
|
|
26
|
+
### [PRINCIPLE_5_NAME]
|
|
27
|
+
<!-- Example: V. Observability, VI. Versioning & Breaking Changes, VII. Simplicity -->
|
|
28
|
+
[PRINCIPLE_5_DESCRIPTION]
|
|
29
|
+
<!-- Example: Text I/O ensures debuggability; Structured logging required; Or: MAJOR.MINOR.BUILD format; Or: Start simple, YAGNI principles -->
|
|
30
|
+
|
|
31
|
+
## [SECTION_2_NAME]
|
|
32
|
+
<!-- Example: Additional Constraints, Security Requirements, Performance Standards, etc. -->
|
|
33
|
+
|
|
34
|
+
[SECTION_2_CONTENT]
|
|
35
|
+
<!-- Example: Technology stack requirements, compliance standards, deployment policies, etc. -->
|
|
36
|
+
|
|
37
|
+
## [SECTION_3_NAME]
|
|
38
|
+
<!-- Example: Development Workflow, Review Process, Quality Gates, etc. -->
|
|
39
|
+
|
|
40
|
+
[SECTION_3_CONTENT]
|
|
41
|
+
<!-- Example: Code review requirements, testing gates, deployment approval process, etc. -->
|
|
42
|
+
|
|
43
|
+
## Governance
|
|
44
|
+
<!-- Example: Constitution supersedes all other practices; Amendments require documentation, approval, migration plan -->
|
|
45
|
+
|
|
46
|
+
[GOVERNANCE_RULES]
|
|
47
|
+
<!-- Example: All PRs/reviews must verify compliance; Complexity must be justified; Use [GUIDANCE_FILE] for runtime development guidance -->
|
|
48
|
+
|
|
49
|
+
**Version**: [CONSTITUTION_VERSION] | **Ratified**: [RATIFICATION_DATE] | **Last Amended**: [LAST_AMENDED_DATE]
|
|
50
|
+
<!-- Example: Version: 2.1.1 | Ratified: 2025-06-13 | Last Amended: 2025-07-16 -->
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
# Consolidated prerequisite checking script
|
|
4
|
+
#
|
|
5
|
+
# This script provides unified prerequisite checking for Spec-Driven Development workflow.
|
|
6
|
+
# It replaces the functionality previously spread across multiple scripts.
|
|
7
|
+
#
|
|
8
|
+
# Usage: ./check-prerequisites.sh [OPTIONS]
|
|
9
|
+
#
|
|
10
|
+
# OPTIONS:
|
|
11
|
+
# --json Output in JSON format
|
|
12
|
+
# --require-tasks Require tasks.md to exist (for implementation phase)
|
|
13
|
+
# --include-tasks Include tasks.md in AVAILABLE_DOCS list
|
|
14
|
+
# --paths-only Only output path variables (no validation)
|
|
15
|
+
# --help, -h Show help message
|
|
16
|
+
#
|
|
17
|
+
# OUTPUTS:
|
|
18
|
+
# JSON mode: {"FEATURE_DIR":"...", "AVAILABLE_DOCS":["..."]}
|
|
19
|
+
# Text mode: FEATURE_DIR:... \n AVAILABLE_DOCS: \n ✓/✗ file.md
|
|
20
|
+
# Paths only: REPO_ROOT: ... \n BRANCH: ... \n FEATURE_DIR: ... etc.
|
|
21
|
+
|
|
22
|
+
set -e
|
|
23
|
+
|
|
24
|
+
# Parse command line arguments
|
|
25
|
+
JSON_MODE=false
|
|
26
|
+
REQUIRE_TASKS=false
|
|
27
|
+
INCLUDE_TASKS=false
|
|
28
|
+
PATHS_ONLY=false
|
|
29
|
+
|
|
30
|
+
for arg in "$@"; do
|
|
31
|
+
case "$arg" in
|
|
32
|
+
--json)
|
|
33
|
+
JSON_MODE=true
|
|
34
|
+
;;
|
|
35
|
+
--require-tasks)
|
|
36
|
+
REQUIRE_TASKS=true
|
|
37
|
+
;;
|
|
38
|
+
--include-tasks)
|
|
39
|
+
INCLUDE_TASKS=true
|
|
40
|
+
;;
|
|
41
|
+
--paths-only)
|
|
42
|
+
PATHS_ONLY=true
|
|
43
|
+
;;
|
|
44
|
+
--help|-h)
|
|
45
|
+
cat << 'EOF'
|
|
46
|
+
Usage: check-prerequisites.sh [OPTIONS]
|
|
47
|
+
|
|
48
|
+
Consolidated prerequisite checking for Spec-Driven Development workflow.
|
|
49
|
+
|
|
50
|
+
OPTIONS:
|
|
51
|
+
--json Output in JSON format
|
|
52
|
+
--require-tasks Require tasks.md to exist (for implementation phase)
|
|
53
|
+
--include-tasks Include tasks.md in AVAILABLE_DOCS list
|
|
54
|
+
--paths-only Only output path variables (no prerequisite validation)
|
|
55
|
+
--help, -h Show this help message
|
|
56
|
+
|
|
57
|
+
EXAMPLES:
|
|
58
|
+
# Check task prerequisites (plan.md required)
|
|
59
|
+
./check-prerequisites.sh --json
|
|
60
|
+
|
|
61
|
+
# Check implementation prerequisites (plan.md + tasks.md required)
|
|
62
|
+
./check-prerequisites.sh --json --require-tasks --include-tasks
|
|
63
|
+
|
|
64
|
+
# Get feature paths only (no validation)
|
|
65
|
+
./check-prerequisites.sh --paths-only
|
|
66
|
+
|
|
67
|
+
EOF
|
|
68
|
+
exit 0
|
|
69
|
+
;;
|
|
70
|
+
*)
|
|
71
|
+
echo "ERROR: Unknown option '$arg'. Use --help for usage information." >&2
|
|
72
|
+
exit 1
|
|
73
|
+
;;
|
|
74
|
+
esac
|
|
75
|
+
done
|
|
76
|
+
|
|
77
|
+
# Source common functions
|
|
78
|
+
SCRIPT_DIR="$(CDPATH="" cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
79
|
+
source "$SCRIPT_DIR/common.sh"
|
|
80
|
+
|
|
81
|
+
# Get feature paths and validate branch
|
|
82
|
+
eval $(get_feature_paths)
|
|
83
|
+
check_feature_branch "$CURRENT_BRANCH" "$HAS_GIT" || exit 1
|
|
84
|
+
|
|
85
|
+
# If paths-only mode, output paths and exit (support JSON + paths-only combined)
|
|
86
|
+
if $PATHS_ONLY; then
|
|
87
|
+
if $JSON_MODE; then
|
|
88
|
+
# Minimal JSON paths payload (no validation performed)
|
|
89
|
+
printf '{"REPO_ROOT":"%s","BRANCH":"%s","FEATURE_DIR":"%s","FEATURE_SPEC":"%s","IMPL_PLAN":"%s","TASKS":"%s"}\n' \
|
|
90
|
+
"$REPO_ROOT" "$CURRENT_BRANCH" "$FEATURE_DIR" "$FEATURE_SPEC" "$IMPL_PLAN" "$TASKS"
|
|
91
|
+
else
|
|
92
|
+
echo "REPO_ROOT: $REPO_ROOT"
|
|
93
|
+
echo "BRANCH: $CURRENT_BRANCH"
|
|
94
|
+
echo "FEATURE_DIR: $FEATURE_DIR"
|
|
95
|
+
echo "FEATURE_SPEC: $FEATURE_SPEC"
|
|
96
|
+
echo "IMPL_PLAN: $IMPL_PLAN"
|
|
97
|
+
echo "TASKS: $TASKS"
|
|
98
|
+
fi
|
|
99
|
+
exit 0
|
|
100
|
+
fi
|
|
101
|
+
|
|
102
|
+
# Validate required directories and files
|
|
103
|
+
if [[ ! -d "$FEATURE_DIR" ]]; then
|
|
104
|
+
echo "ERROR: Feature directory not found: $FEATURE_DIR" >&2
|
|
105
|
+
echo "Run /speckit.specify first to create the feature structure." >&2
|
|
106
|
+
exit 1
|
|
107
|
+
fi
|
|
108
|
+
|
|
109
|
+
if [[ ! -f "$IMPL_PLAN" ]]; then
|
|
110
|
+
echo "ERROR: plan.md not found in $FEATURE_DIR" >&2
|
|
111
|
+
echo "Run /speckit.plan first to create the implementation plan." >&2
|
|
112
|
+
exit 1
|
|
113
|
+
fi
|
|
114
|
+
|
|
115
|
+
# Check for tasks.md if required
|
|
116
|
+
if $REQUIRE_TASKS && [[ ! -f "$TASKS" ]]; then
|
|
117
|
+
echo "ERROR: tasks.md not found in $FEATURE_DIR" >&2
|
|
118
|
+
echo "Run /speckit.tasks first to create the task list." >&2
|
|
119
|
+
exit 1
|
|
120
|
+
fi
|
|
121
|
+
|
|
122
|
+
# Build list of available documents
|
|
123
|
+
docs=()
|
|
124
|
+
|
|
125
|
+
# Always check these optional docs
|
|
126
|
+
[[ -f "$RESEARCH" ]] && docs+=("research.md")
|
|
127
|
+
[[ -f "$DATA_MODEL" ]] && docs+=("data-model.md")
|
|
128
|
+
|
|
129
|
+
# Check contracts directory (only if it exists and has files)
|
|
130
|
+
if [[ -d "$CONTRACTS_DIR" ]] && [[ -n "$(ls -A "$CONTRACTS_DIR" 2>/dev/null)" ]]; then
|
|
131
|
+
docs+=("contracts/")
|
|
132
|
+
fi
|
|
133
|
+
|
|
134
|
+
[[ -f "$QUICKSTART" ]] && docs+=("quickstart.md")
|
|
135
|
+
|
|
136
|
+
# Include tasks.md if requested and it exists
|
|
137
|
+
if $INCLUDE_TASKS && [[ -f "$TASKS" ]]; then
|
|
138
|
+
docs+=("tasks.md")
|
|
139
|
+
fi
|
|
140
|
+
|
|
141
|
+
# Output results
|
|
142
|
+
if $JSON_MODE; then
|
|
143
|
+
# Build JSON array of documents
|
|
144
|
+
if [[ ${#docs[@]} -eq 0 ]]; then
|
|
145
|
+
json_docs="[]"
|
|
146
|
+
else
|
|
147
|
+
json_docs=$(printf '"%s",' "${docs[@]}")
|
|
148
|
+
json_docs="[${json_docs%,}]"
|
|
149
|
+
fi
|
|
150
|
+
|
|
151
|
+
printf '{"FEATURE_DIR":"%s","AVAILABLE_DOCS":%s}\n' "$FEATURE_DIR" "$json_docs"
|
|
152
|
+
else
|
|
153
|
+
# Text output
|
|
154
|
+
echo "FEATURE_DIR:$FEATURE_DIR"
|
|
155
|
+
echo "AVAILABLE_DOCS:"
|
|
156
|
+
|
|
157
|
+
# Show status of each potential document
|
|
158
|
+
check_file "$RESEARCH" "research.md"
|
|
159
|
+
check_file "$DATA_MODEL" "data-model.md"
|
|
160
|
+
check_dir "$CONTRACTS_DIR" "contracts/"
|
|
161
|
+
check_file "$QUICKSTART" "quickstart.md"
|
|
162
|
+
|
|
163
|
+
if $INCLUDE_TASKS; then
|
|
164
|
+
check_file "$TASKS" "tasks.md"
|
|
165
|
+
fi
|
|
166
|
+
fi
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Common functions and variables for all scripts
|
|
3
|
+
|
|
4
|
+
# Get repository root, with fallback for non-git repositories
|
|
5
|
+
get_repo_root() {
|
|
6
|
+
if git rev-parse --show-toplevel >/dev/null 2>&1; then
|
|
7
|
+
git rev-parse --show-toplevel
|
|
8
|
+
else
|
|
9
|
+
# Fall back to script location for non-git repos
|
|
10
|
+
local script_dir="$(CDPATH="" cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
11
|
+
(cd "$script_dir/../../.." && pwd)
|
|
12
|
+
fi
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
# Get current branch, with fallback for non-git repositories
|
|
16
|
+
get_current_branch() {
|
|
17
|
+
# First check if SPECIFY_FEATURE environment variable is set
|
|
18
|
+
if [[ -n "${SPECIFY_FEATURE:-}" ]]; then
|
|
19
|
+
echo "$SPECIFY_FEATURE"
|
|
20
|
+
return
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
# Then check git if available
|
|
24
|
+
if git rev-parse --abbrev-ref HEAD >/dev/null 2>&1; then
|
|
25
|
+
git rev-parse --abbrev-ref HEAD
|
|
26
|
+
return
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
# For non-git repos, try to find the latest feature directory
|
|
30
|
+
local repo_root=$(get_repo_root)
|
|
31
|
+
local specs_dir="$repo_root/specs"
|
|
32
|
+
|
|
33
|
+
if [[ -d "$specs_dir" ]]; then
|
|
34
|
+
local latest_feature=""
|
|
35
|
+
local highest=0
|
|
36
|
+
|
|
37
|
+
for dir in "$specs_dir"/*; do
|
|
38
|
+
if [[ -d "$dir" ]]; then
|
|
39
|
+
local dirname=$(basename "$dir")
|
|
40
|
+
if [[ "$dirname" =~ ^([0-9]{3})- ]]; then
|
|
41
|
+
local number=${BASH_REMATCH[1]}
|
|
42
|
+
number=$((10#$number))
|
|
43
|
+
if [[ "$number" -gt "$highest" ]]; then
|
|
44
|
+
highest=$number
|
|
45
|
+
latest_feature=$dirname
|
|
46
|
+
fi
|
|
47
|
+
fi
|
|
48
|
+
fi
|
|
49
|
+
done
|
|
50
|
+
|
|
51
|
+
if [[ -n "$latest_feature" ]]; then
|
|
52
|
+
echo "$latest_feature"
|
|
53
|
+
return
|
|
54
|
+
fi
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
echo "main" # Final fallback
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
# Check if we have git available
|
|
61
|
+
has_git() {
|
|
62
|
+
git rev-parse --show-toplevel >/dev/null 2>&1
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
check_feature_branch() {
|
|
66
|
+
local branch="$1"
|
|
67
|
+
local has_git_repo="$2"
|
|
68
|
+
|
|
69
|
+
# For non-git repos, we can't enforce branch naming but still provide output
|
|
70
|
+
if [[ "$has_git_repo" != "true" ]]; then
|
|
71
|
+
echo "[specify] Warning: Git repository not detected; skipped branch validation" >&2
|
|
72
|
+
return 0
|
|
73
|
+
fi
|
|
74
|
+
|
|
75
|
+
if [[ ! "$branch" =~ ^[0-9]{3}- ]]; then
|
|
76
|
+
echo "ERROR: Not on a feature branch. Current branch: $branch" >&2
|
|
77
|
+
echo "Feature branches should be named like: 001-feature-name" >&2
|
|
78
|
+
return 1
|
|
79
|
+
fi
|
|
80
|
+
|
|
81
|
+
return 0
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
get_feature_dir() { echo "$1/specs/$2"; }
|
|
85
|
+
|
|
86
|
+
# Find feature directory by numeric prefix instead of exact branch match
|
|
87
|
+
# This allows multiple branches to work on the same spec (e.g., 004-fix-bug, 004-add-feature)
|
|
88
|
+
find_feature_dir_by_prefix() {
|
|
89
|
+
local repo_root="$1"
|
|
90
|
+
local branch_name="$2"
|
|
91
|
+
local specs_dir="$repo_root/specs"
|
|
92
|
+
|
|
93
|
+
# Extract numeric prefix from branch (e.g., "004" from "004-whatever")
|
|
94
|
+
if [[ ! "$branch_name" =~ ^([0-9]{3})- ]]; then
|
|
95
|
+
# If branch doesn't have numeric prefix, fall back to exact match
|
|
96
|
+
echo "$specs_dir/$branch_name"
|
|
97
|
+
return
|
|
98
|
+
fi
|
|
99
|
+
|
|
100
|
+
local prefix="${BASH_REMATCH[1]}"
|
|
101
|
+
|
|
102
|
+
# Search for directories in specs/ that start with this prefix
|
|
103
|
+
local matches=()
|
|
104
|
+
if [[ -d "$specs_dir" ]]; then
|
|
105
|
+
for dir in "$specs_dir"/"$prefix"-*; do
|
|
106
|
+
if [[ -d "$dir" ]]; then
|
|
107
|
+
matches+=("$(basename "$dir")")
|
|
108
|
+
fi
|
|
109
|
+
done
|
|
110
|
+
fi
|
|
111
|
+
|
|
112
|
+
# Handle results
|
|
113
|
+
if [[ ${#matches[@]} -eq 0 ]]; then
|
|
114
|
+
# No match found - return the branch name path (will fail later with clear error)
|
|
115
|
+
echo "$specs_dir/$branch_name"
|
|
116
|
+
elif [[ ${#matches[@]} -eq 1 ]]; then
|
|
117
|
+
# Exactly one match - perfect!
|
|
118
|
+
echo "$specs_dir/${matches[0]}"
|
|
119
|
+
else
|
|
120
|
+
# Multiple matches - this shouldn't happen with proper naming convention
|
|
121
|
+
echo "ERROR: Multiple spec directories found with prefix '$prefix': ${matches[*]}" >&2
|
|
122
|
+
echo "Please ensure only one spec directory exists per numeric prefix." >&2
|
|
123
|
+
echo "$specs_dir/$branch_name" # Return something to avoid breaking the script
|
|
124
|
+
fi
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
get_feature_paths() {
|
|
128
|
+
local repo_root=$(get_repo_root)
|
|
129
|
+
local current_branch=$(get_current_branch)
|
|
130
|
+
local has_git_repo="false"
|
|
131
|
+
|
|
132
|
+
if has_git; then
|
|
133
|
+
has_git_repo="true"
|
|
134
|
+
fi
|
|
135
|
+
|
|
136
|
+
# Use prefix-based lookup to support multiple branches per spec
|
|
137
|
+
local feature_dir=$(find_feature_dir_by_prefix "$repo_root" "$current_branch")
|
|
138
|
+
|
|
139
|
+
cat <<EOF
|
|
140
|
+
REPO_ROOT='$repo_root'
|
|
141
|
+
CURRENT_BRANCH='$current_branch'
|
|
142
|
+
HAS_GIT='$has_git_repo'
|
|
143
|
+
FEATURE_DIR='$feature_dir'
|
|
144
|
+
FEATURE_SPEC='$feature_dir/spec.md'
|
|
145
|
+
IMPL_PLAN='$feature_dir/plan.md'
|
|
146
|
+
TASKS='$feature_dir/tasks.md'
|
|
147
|
+
RESEARCH='$feature_dir/research.md'
|
|
148
|
+
DATA_MODEL='$feature_dir/data-model.md'
|
|
149
|
+
QUICKSTART='$feature_dir/quickstart.md'
|
|
150
|
+
CONTRACTS_DIR='$feature_dir/contracts'
|
|
151
|
+
EOF
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
check_file() { [[ -f "$1" ]] && echo " ✓ $2" || echo " ✗ $2"; }
|
|
155
|
+
check_dir() { [[ -d "$1" && -n $(ls -A "$1" 2>/dev/null) ]] && echo " ✓ $2" || echo " ✗ $2"; }
|
|
156
|
+
|