@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,52 @@
|
|
|
1
|
+
version: '3.8'
|
|
2
|
+
|
|
3
|
+
services:
|
|
4
|
+
postgres:
|
|
5
|
+
image: postgres:16-alpine
|
|
6
|
+
container_name: boss-postgres
|
|
7
|
+
environment:
|
|
8
|
+
POSTGRES_USER: boss
|
|
9
|
+
POSTGRES_PASSWORD: bosssecret
|
|
10
|
+
POSTGRES_DB: boss_knowledge
|
|
11
|
+
ports:
|
|
12
|
+
- "5432:5432"
|
|
13
|
+
volumes:
|
|
14
|
+
- postgres_data:/var/lib/postgresql/data
|
|
15
|
+
healthcheck:
|
|
16
|
+
test: ["CMD-SHELL", "pg_isready -U boss"]
|
|
17
|
+
interval: 10s
|
|
18
|
+
timeout: 5s
|
|
19
|
+
retries: 5
|
|
20
|
+
|
|
21
|
+
qdrant:
|
|
22
|
+
image: qdrant/qdrant:latest
|
|
23
|
+
container_name: boss-qdrant
|
|
24
|
+
ports:
|
|
25
|
+
- "6333:6333"
|
|
26
|
+
- "6334:6334"
|
|
27
|
+
volumes:
|
|
28
|
+
- qdrant_data:/qdrant/storage
|
|
29
|
+
healthcheck:
|
|
30
|
+
test: ["CMD", "curl", "-f", "http://localhost:6333/health"]
|
|
31
|
+
interval: 10s
|
|
32
|
+
timeout: 5s
|
|
33
|
+
retries: 5
|
|
34
|
+
|
|
35
|
+
embeddings:
|
|
36
|
+
image: ghcr.io/huggingface/text-embeddings-inference:latest
|
|
37
|
+
container_name: boss-embeddings
|
|
38
|
+
ports:
|
|
39
|
+
- "8080:80"
|
|
40
|
+
environment:
|
|
41
|
+
- MODEL_ID=BAAI/bge-large-en-v1.5
|
|
42
|
+
- MAX_BATCH_SIZE=32
|
|
43
|
+
healthcheck:
|
|
44
|
+
test: ["CMD", "curl", "-f", "http://localhost/health"]
|
|
45
|
+
interval: 10s
|
|
46
|
+
timeout: 5s
|
|
47
|
+
retries: 5
|
|
48
|
+
|
|
49
|
+
volumes:
|
|
50
|
+
postgres_data:
|
|
51
|
+
qdrant_data:
|
|
52
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Commit message validation hook
|
|
3
|
+
# Strictly enforces Conventional Commits v1.0.0 specification
|
|
4
|
+
# See: https://www.conventionalcommits.org/en/v1.0.0/
|
|
5
|
+
|
|
6
|
+
. "$(dirname "$0")/_/husky.sh"
|
|
7
|
+
|
|
8
|
+
commit_msg=$(cat "$1")
|
|
9
|
+
|
|
10
|
+
# Extract the first line (subject line)
|
|
11
|
+
first_line=$(echo "$commit_msg" | head -n1)
|
|
12
|
+
|
|
13
|
+
# Validate format: <type>[optional scope][optional !]: <description>
|
|
14
|
+
# According to spec: "Commits MUST be prefixed with a type, which consists of a noun,
|
|
15
|
+
# feat, fix, etc., followed by the OPTIONAL scope, OPTIONAL !, and REQUIRED terminal colon and space."
|
|
16
|
+
|
|
17
|
+
# Pattern breakdown:
|
|
18
|
+
# - Type: lowercase word (feat, fix, docs, style, refactor, test, chore, perf, ci, build, revert, etc.)
|
|
19
|
+
# - Optional scope: (word) - noun in parentheses
|
|
20
|
+
# - Optional !: for breaking changes
|
|
21
|
+
# - Required: : (colon) followed by space
|
|
22
|
+
# - Description: rest of the line (at least one character)
|
|
23
|
+
if ! echo "$first_line" | grep -qE "^[a-z]+(\\([a-z0-9-]+\\))?(!)?: .+"; then
|
|
24
|
+
echo "❌ Invalid commit message format!"
|
|
25
|
+
echo ""
|
|
26
|
+
echo "Commit messages MUST follow Conventional Commits v1.0.0 specification:"
|
|
27
|
+
echo " <type>[optional scope][optional !]: <description>"
|
|
28
|
+
echo ""
|
|
29
|
+
echo "Required format:"
|
|
30
|
+
echo " type(scope): description"
|
|
31
|
+
echo " type!: description (breaking change)"
|
|
32
|
+
echo " type(scope)!: description (breaking change with scope)"
|
|
33
|
+
echo ""
|
|
34
|
+
echo "Common types:"
|
|
35
|
+
echo " feat: A new feature"
|
|
36
|
+
echo " fix: A bug fix"
|
|
37
|
+
echo " docs: Documentation only changes"
|
|
38
|
+
echo " style: Changes that do not affect code meaning (formatting, etc.)"
|
|
39
|
+
echo " refactor: Code change that neither fixes a bug nor adds a feature"
|
|
40
|
+
echo " perf: Performance improvement"
|
|
41
|
+
echo " test: Adding or updating tests"
|
|
42
|
+
echo " chore: Changes to build process or auxiliary tools"
|
|
43
|
+
echo " ci: Changes to CI configuration"
|
|
44
|
+
echo " build: Changes to build system or dependencies"
|
|
45
|
+
echo " revert: Reverts a previous commit"
|
|
46
|
+
echo ""
|
|
47
|
+
echo "Examples:"
|
|
48
|
+
echo " ✅ feat(orchestrator): add retry logic"
|
|
49
|
+
echo " ✅ fix(agents): handle container errors"
|
|
50
|
+
echo " ✅ docs: update architecture guide"
|
|
51
|
+
echo " ✅ feat!: change API signature"
|
|
52
|
+
echo " ✅ fix(api)!: remove deprecated endpoint"
|
|
53
|
+
echo " ❌ update code (missing type)"
|
|
54
|
+
echo " ❌ feat:fix bug (missing space after colon)"
|
|
55
|
+
echo " ❌ FEAT: add feature (type should be lowercase)"
|
|
56
|
+
echo ""
|
|
57
|
+
echo "Your message:"
|
|
58
|
+
echo " $first_line"
|
|
59
|
+
echo ""
|
|
60
|
+
echo "Full specification: https://www.conventionalcommits.org/en/v1.0.0/"
|
|
61
|
+
exit 1
|
|
62
|
+
fi
|
|
63
|
+
|
|
64
|
+
# Validate minimum description length (at least 3 characters after colon and space)
|
|
65
|
+
description=$(echo "$first_line" | sed -E 's/^[a-z]+(\\([a-z0-9-]+\\))?(!)?: //')
|
|
66
|
+
if [ ${#description} -lt 3 ]; then
|
|
67
|
+
echo "❌ Commit description too short (minimum 3 characters)"
|
|
68
|
+
echo ""
|
|
69
|
+
echo "Your description: '$description'"
|
|
70
|
+
exit 1
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
# Validate maximum length for first line (recommended 72 characters per spec)
|
|
74
|
+
# Note: Spec doesn't require this, but it's a best practice
|
|
75
|
+
if [ ${#first_line} -gt 100 ]; then
|
|
76
|
+
echo "⚠️ Warning: First line of commit message exceeds 100 characters"
|
|
77
|
+
echo " Recommended: Keep first line under 72 characters for better readability"
|
|
78
|
+
echo " Your first line: ${#first_line} characters"
|
|
79
|
+
echo ""
|
|
80
|
+
echo " Consider breaking into multiple lines:"
|
|
81
|
+
echo " type(scope): short summary"
|
|
82
|
+
echo ""
|
|
83
|
+
echo " Longer description can go in the body."
|
|
84
|
+
echo ""
|
|
85
|
+
fi
|
|
86
|
+
|
|
87
|
+
# Validate that type is lowercase (spec says case insensitive, but lowercase is conventional)
|
|
88
|
+
type=$(echo "$first_line" | sed -E 's/^([a-z]+).*/\\1/')
|
|
89
|
+
if ! echo "$type" | grep -qE '^[a-z]+$'; then
|
|
90
|
+
echo "⚠️ Warning: Commit type should be lowercase"
|
|
91
|
+
echo " Found: '$type'"
|
|
92
|
+
echo ""
|
|
93
|
+
fi
|
|
94
|
+
|
|
95
|
+
# Check for BREAKING CHANGE footer (if body exists)
|
|
96
|
+
if echo "$commit_msg" | grep -qiE "^BREAKING CHANGE:"; then
|
|
97
|
+
echo "ℹ️ Breaking change detected in footer"
|
|
98
|
+
echo " Consider using '!' in type prefix for consistency"
|
|
99
|
+
fi
|
|
100
|
+
|
|
101
|
+
echo "✅ Commit message follows Conventional Commits specification"
|
|
102
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Pre-commit hook script
|
|
3
|
+
#
|
|
4
|
+
# Runs static analysis on staged files only to ensure code quality
|
|
5
|
+
# before commits. Fast enough to run on every commit.
|
|
6
|
+
|
|
7
|
+
set -e
|
|
8
|
+
|
|
9
|
+
echo "🔍 Running pre-commit checks..."
|
|
10
|
+
|
|
11
|
+
# Run lint-staged (handles staged files only: ESLint, Prettier, TypeScript)
|
|
12
|
+
# lint-staged is configured in package.json to run on staged files
|
|
13
|
+
echo " ✓ Running lint-staged (ESLint + Prettier + TypeScript on staged files)..."
|
|
14
|
+
pnpm exec lint-staged
|
|
15
|
+
|
|
16
|
+
# Run tests for changed files
|
|
17
|
+
echo ""
|
|
18
|
+
bash scripts/test-changed.sh
|
|
19
|
+
|
|
20
|
+
echo "✅ Pre-commit checks passed!"
|
|
21
|
+
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Pre-push hook
|
|
3
|
+
# Prevents direct pushes to main and validates code before push
|
|
4
|
+
|
|
5
|
+
# Get the current branch name
|
|
6
|
+
current_branch=$(git symbolic-ref --short HEAD 2>/dev/null)
|
|
7
|
+
|
|
8
|
+
# Prevent direct pushes to main (including initial push)
|
|
9
|
+
FIRST_PUSH_TO_MAIN=false
|
|
10
|
+
if [ "$current_branch" = "main" ]; then
|
|
11
|
+
# Check if this is the very first push (no remote main exists yet)
|
|
12
|
+
if ! git ls-remote --heads origin main > /dev/null 2>&1; then
|
|
13
|
+
echo "⚠️ Warning: This appears to be the first push to main"
|
|
14
|
+
echo " For initial setup, empty main is allowed, but main branch protection will be enforced after setup"
|
|
15
|
+
echo " Future pushes to main will be blocked - use feature branches and PRs instead"
|
|
16
|
+
FIRST_PUSH_TO_MAIN=true
|
|
17
|
+
|
|
18
|
+
# Check if main branch is empty (only empty commit or minimal files like README/.gitignore)
|
|
19
|
+
# Count non-trivial files (exclude .gitignore, README.md, LICENSE, etc.)
|
|
20
|
+
file_count=$(git ls-tree -r HEAD --name-only 2>/dev/null | grep -v -E '^(README\.md|LICENSE|\.gitignore|\.gitattributes)$' | wc -l | tr -d ' ')
|
|
21
|
+
|
|
22
|
+
if [ "$file_count" -eq 0 ]; then
|
|
23
|
+
echo "✅ Main branch is empty - skipping validation checks for initial empty push"
|
|
24
|
+
echo "✅ Pre-push validation passed!"
|
|
25
|
+
exit 0
|
|
26
|
+
else
|
|
27
|
+
echo "⚠️ Main branch contains files - validation checks will run"
|
|
28
|
+
fi
|
|
29
|
+
else
|
|
30
|
+
echo "❌ Direct push to main is not allowed!"
|
|
31
|
+
echo ""
|
|
32
|
+
echo "Please create a feature branch and submit a PR instead:"
|
|
33
|
+
echo " git checkout -b feature/your-feature-name"
|
|
34
|
+
echo " git push -u origin feature/your-feature-name"
|
|
35
|
+
echo " gh pr create # or use GitHub UI"
|
|
36
|
+
echo ""
|
|
37
|
+
echo "For emergency hotfixes, see: docs/emergency-bypass-procedure.md"
|
|
38
|
+
exit 1
|
|
39
|
+
fi
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
echo "🔍 Running pre-push validation..."
|
|
43
|
+
|
|
44
|
+
# Run comprehensive checks
|
|
45
|
+
echo " ✓ Running typecheck..."
|
|
46
|
+
if ! pnpm typecheck > /dev/null 2>&1; then
|
|
47
|
+
echo "❌ TypeScript errors detected. Fix them before pushing."
|
|
48
|
+
pnpm typecheck
|
|
49
|
+
exit 1
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
# Run linting
|
|
53
|
+
echo " ✓ Running lint check..."
|
|
54
|
+
if ! pnpm lint > /dev/null 2>&1; then
|
|
55
|
+
echo "❌ Linting errors detected. Fix them before pushing."
|
|
56
|
+
pnpm lint
|
|
57
|
+
exit 1
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
# Run security checks
|
|
61
|
+
echo " ✓ Running security checks..."
|
|
62
|
+
if ! bash scripts/security-check.sh; then
|
|
63
|
+
echo "❌ Security checks failed. Review and fix before pushing."
|
|
64
|
+
exit 1
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
# Run unit tests (fast, exclude integration tests)
|
|
68
|
+
echo " ✓ Running unit tests..."
|
|
69
|
+
if ! pnpm test:unit > /dev/null 2>&1; then
|
|
70
|
+
echo "❌ Unit tests failing. Fix them before pushing."
|
|
71
|
+
pnpm test:unit
|
|
72
|
+
exit 1
|
|
73
|
+
fi
|
|
74
|
+
|
|
75
|
+
# Check for unused exports (warn only, not blocking)
|
|
76
|
+
echo " ✓ Checking for unused exports..."
|
|
77
|
+
if ! pnpm check:unused > /dev/null 2>&1; then
|
|
78
|
+
echo "⚠️ Warning: Unused exports detected. Run 'pnpm check:unused' for details."
|
|
79
|
+
echo " (This is a warning, not blocking)"
|
|
80
|
+
fi
|
|
81
|
+
|
|
82
|
+
# Warn if no tests in staged commits (skip for first empty push to main)
|
|
83
|
+
if [ "$FIRST_PUSH_TO_MAIN" != "true" ]; then
|
|
84
|
+
echo " ✓ Checking for tests..."
|
|
85
|
+
# Check if remote branch exists (for first push, it won't)
|
|
86
|
+
if git ls-remote --heads origin $current_branch > /dev/null 2>&1; then
|
|
87
|
+
# Remote branch exists - check diff
|
|
88
|
+
test_files=$(git diff origin/$current_branch..HEAD --name-only 2>/dev/null | grep -E '\.(test|spec)\.(ts|tsx|js|jsx)$' || true)
|
|
89
|
+
else
|
|
90
|
+
# First push - check all files in HEAD for test files
|
|
91
|
+
# Use git ls-tree to check committed files
|
|
92
|
+
test_files=$(git ls-tree -r HEAD --name-only 2>/dev/null | grep -E '\.(test|spec)\.(ts|tsx|js|jsx)$' || true)
|
|
93
|
+
fi
|
|
94
|
+
|
|
95
|
+
# If test_files is empty, try alternative detection methods
|
|
96
|
+
if [ -z "$test_files" ]; then
|
|
97
|
+
# Method 1: Check all files in HEAD
|
|
98
|
+
all_files=$(git ls-tree -r HEAD --name-only 2>/dev/null || true)
|
|
99
|
+
if [ -n "$all_files" ]; then
|
|
100
|
+
test_files_alt=$(echo "$all_files" | grep -E '\.(test|spec)\.(ts|tsx|js|jsx)$' || true)
|
|
101
|
+
if [ -n "$test_files_alt" ]; then
|
|
102
|
+
test_files="$test_files_alt"
|
|
103
|
+
fi
|
|
104
|
+
fi
|
|
105
|
+
|
|
106
|
+
# Method 2: If still empty, check working directory (for uncommitted test files)
|
|
107
|
+
if [ -z "$test_files" ]; then
|
|
108
|
+
test_files_wd=$(find . -type f \( -name "*.test.ts" -o -name "*.test.tsx" -o -name "*.test.js" -o -name "*.test.jsx" -o -name "*.spec.ts" -o -name "*.spec.tsx" -o -name "*.spec.js" -o -name "*.spec.jsx" \) ! -path "*/node_modules/*" ! -path "*/.git/*" 2>/dev/null | head -5 || true)
|
|
109
|
+
if [ -n "$test_files_wd" ]; then
|
|
110
|
+
# Only use working directory files if they're tracked by git
|
|
111
|
+
for file in $test_files_wd; do
|
|
112
|
+
if git ls-files --error-unmatch "$file" >/dev/null 2>&1; then
|
|
113
|
+
test_files="${test_files:+$test_files }$file"
|
|
114
|
+
fi
|
|
115
|
+
done
|
|
116
|
+
fi
|
|
117
|
+
fi
|
|
118
|
+
fi
|
|
119
|
+
|
|
120
|
+
if [ -z "$test_files" ]; then
|
|
121
|
+
echo "⚠️ Warning: No test files in commits being pushed"
|
|
122
|
+
echo " TDD Constitution requires tests before implementation"
|
|
123
|
+
# Allow bypass only in CI environments, but block in all other cases (including BOSS automated pushes)
|
|
124
|
+
if [ -n "${CI:-}" ]; then
|
|
125
|
+
echo " (Allowing in CI environment, but tests should still be added)"
|
|
126
|
+
elif [ -t 0 ]; then
|
|
127
|
+
# Interactive terminal - ask user
|
|
128
|
+
echo " Continue? (y/N)"
|
|
129
|
+
read -r response
|
|
130
|
+
if [ "$response" != "y" ]; then
|
|
131
|
+
echo "Push cancelled. Add tests first!"
|
|
132
|
+
exit 1
|
|
133
|
+
fi
|
|
134
|
+
else
|
|
135
|
+
# Non-interactive but not CI (e.g., BOSS automated push) - block it
|
|
136
|
+
echo "❌ Push blocked: TDD Constitution requires tests before implementation"
|
|
137
|
+
echo " Add test files and commit them before pushing."
|
|
138
|
+
echo " Expected pattern: *.test.ts, *.test.tsx, *.spec.ts, *.spec.tsx (or .js/.jsx variants)"
|
|
139
|
+
exit 1
|
|
140
|
+
fi
|
|
141
|
+
else
|
|
142
|
+
# Show found test files (limit to first 3 to avoid clutter)
|
|
143
|
+
test_file_count=$(echo "$test_files" | wc -l | tr -d ' ')
|
|
144
|
+
if [ "$test_file_count" -le 3 ]; then
|
|
145
|
+
echo " ✓ Found test files: $(echo "$test_files" | tr '\n' ' ')"
|
|
146
|
+
else
|
|
147
|
+
echo " ✓ Found $test_file_count test files (showing first 3): $(echo "$test_files" | head -3 | tr '\n' ' ')"
|
|
148
|
+
fi
|
|
149
|
+
fi
|
|
150
|
+
fi
|
|
151
|
+
|
|
152
|
+
echo "✅ Pre-push validation passed!"
|
|
153
|
+
echo ""
|
|
154
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Security check script
|
|
3
|
+
# Runs basic security checks before push
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
# Check for common security issues in staged files
|
|
8
|
+
staged_files=$(git diff --cached --name-only --diff-filter=ACM || true)
|
|
9
|
+
|
|
10
|
+
if [ -z "$staged_files" ]; then
|
|
11
|
+
# If no staged files, check all tracked files
|
|
12
|
+
staged_files=$(git ls-files || true)
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
# Check for hardcoded secrets (basic check)
|
|
16
|
+
if echo "$staged_files" | xargs grep -lE '(password|secret|api_key|private_key|access_token)\s*[:=]\s*["'\''][^"'\'']+["'\'']' 2>/dev/null; then
|
|
17
|
+
echo "⚠️ Warning: Potential hardcoded secrets detected"
|
|
18
|
+
echo " Review the files above for sensitive information"
|
|
19
|
+
echo " (This is a basic check, review manually)"
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
# Check for TODO/FIXME comments that might indicate security issues
|
|
23
|
+
if echo "$staged_files" | xargs grep -lE 'TODO.*(security|auth|password|secret|vulnerability)' 2>/dev/null; then
|
|
24
|
+
echo "⚠️ Warning: Security-related TODOs found"
|
|
25
|
+
echo " Review and address before pushing"
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
# If npm audit is available, run it (non-blocking)
|
|
29
|
+
if command -v pnpm &> /dev/null; then
|
|
30
|
+
if pnpm audit --audit-level=moderate 2>/dev/null | grep -qE '(moderate|high|critical)'; then
|
|
31
|
+
echo "⚠️ Warning: Security vulnerabilities found in dependencies"
|
|
32
|
+
echo " Run 'pnpm audit' for details"
|
|
33
|
+
echo " Run 'pnpm audit fix' to attempt automatic fixes"
|
|
34
|
+
# Don't block, just warn
|
|
35
|
+
fi
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
echo "✅ Security checks passed"
|
|
39
|
+
exit 0
|
|
40
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Test changed files script
|
|
3
|
+
# Runs tests related to staged TypeScript files
|
|
4
|
+
# Only runs if tests are fast enough (optional optimization)
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
# Get list of staged TypeScript files
|
|
9
|
+
changed_files=$(git diff --cached --name-only --diff-filter=ACM | grep '\.ts$' || true)
|
|
10
|
+
|
|
11
|
+
if [ -z "$changed_files" ]; then
|
|
12
|
+
echo "ℹ️ No TypeScript files changed, skipping tests"
|
|
13
|
+
exit 0
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
# Find related test files (exclude e2e, integration, and container tests)
|
|
17
|
+
test_files=""
|
|
18
|
+
for file in $changed_files; do
|
|
19
|
+
# Skip e2e and integration tests - too slow for pre-commit
|
|
20
|
+
if echo "$file" | grep -qE '(tests/(e2e|integration)/|\.(e2e|integration)\.test\.ts$)'; then
|
|
21
|
+
continue
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
# Skip if file is already a test file
|
|
25
|
+
if echo "$file" | grep -q '\.test\.ts$'; then
|
|
26
|
+
# Skip container tests that require Docker
|
|
27
|
+
if echo "$file" | grep -qE '(mock-container|container.*test)'; then
|
|
28
|
+
echo " ⏭️ Skipping $file (requires containers/Docker)"
|
|
29
|
+
continue
|
|
30
|
+
fi
|
|
31
|
+
if [ -f "$file" ]; then
|
|
32
|
+
test_files="$test_files $file"
|
|
33
|
+
fi
|
|
34
|
+
continue
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
# Convert src/foo/bar.ts -> tests/foo/bar.test.ts
|
|
38
|
+
test_file=$(echo "$file" | sed 's|^src/|tests/|' | sed 's|\.ts$|.test.ts|')
|
|
39
|
+
|
|
40
|
+
if [ -f "$test_file" ]; then
|
|
41
|
+
# Skip e2e and integration tests - too slow for pre-commit
|
|
42
|
+
if echo "$test_file" | grep -qE 'tests/(e2e|integration)/'; then
|
|
43
|
+
echo " ⏭️ Skipping $test_file (e2e/integration test)"
|
|
44
|
+
continue
|
|
45
|
+
fi
|
|
46
|
+
# Skip container tests that require Docker
|
|
47
|
+
if echo "$test_file" | grep -qE '(mock-container|container.*test)'; then
|
|
48
|
+
echo " ⏭️ Skipping $test_file (requires containers/Docker)"
|
|
49
|
+
continue
|
|
50
|
+
fi
|
|
51
|
+
test_files="$test_files $test_file"
|
|
52
|
+
fi
|
|
53
|
+
done
|
|
54
|
+
|
|
55
|
+
if [ -z "$test_files" ]; then
|
|
56
|
+
echo "ℹ️ No related test files found for changed files"
|
|
57
|
+
exit 0
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
echo "🧪 Running tests for changed files..."
|
|
61
|
+
for test_file in $test_files; do
|
|
62
|
+
echo " Running: $test_file"
|
|
63
|
+
done
|
|
64
|
+
|
|
65
|
+
# Run the tests and capture output
|
|
66
|
+
test_output=$(pnpm vitest run $test_files --reporter=dot 2>&1 || true)
|
|
67
|
+
echo "$test_output"
|
|
68
|
+
|
|
69
|
+
# Check if tests actually passed (look for test summary before potential worker cleanup crash)
|
|
70
|
+
if echo "$test_output" | grep -q "✓.*tests"; then
|
|
71
|
+
# Tests passed, check for actual test failures
|
|
72
|
+
if echo "$test_output" | grep -qE "(✗|FAIL|failed)"; then
|
|
73
|
+
echo "❌ Tests for changed files failed"
|
|
74
|
+
exit 1
|
|
75
|
+
else
|
|
76
|
+
echo "✅ Tests for changed files passed"
|
|
77
|
+
exit 0
|
|
78
|
+
fi
|
|
79
|
+
else
|
|
80
|
+
# No test summary found, something went wrong
|
|
81
|
+
echo "❌ Tests for changed files failed"
|
|
82
|
+
exit 1
|
|
83
|
+
fi
|
|
84
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: BOSS CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, develop]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main, develop]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
ci:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Setup Node.js
|
|
16
|
+
uses: actions/setup-node@v4
|
|
17
|
+
with:
|
|
18
|
+
node-version: '22'
|
|
19
|
+
|
|
20
|
+
- name: Setup pnpm
|
|
21
|
+
uses: pnpm/action-setup@v2
|
|
22
|
+
with:
|
|
23
|
+
version: latest
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: pnpm install --frozen-lockfile
|
|
27
|
+
|
|
28
|
+
- name: Type check
|
|
29
|
+
run: pnpm typecheck
|
|
30
|
+
|
|
31
|
+
- name: Lint
|
|
32
|
+
run: pnpm lint
|
|
33
|
+
|
|
34
|
+
- name: Test
|
|
35
|
+
run: pnpm test
|
|
36
|
+
|
|
37
|
+
- name: Coverage
|
|
38
|
+
run: pnpm test:coverage
|
|
39
|
+
continue-on-error: true
|
|
40
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: BOSS Quality Gates
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, synchronize, reopened]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
quality-gates:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v4
|
|
12
|
+
|
|
13
|
+
- name: Setup Node.js
|
|
14
|
+
uses: actions/setup-node@v4
|
|
15
|
+
with:
|
|
16
|
+
node-version: '22'
|
|
17
|
+
|
|
18
|
+
- name: Setup pnpm
|
|
19
|
+
uses: pnpm/action-setup@v2
|
|
20
|
+
with:
|
|
21
|
+
version: latest
|
|
22
|
+
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: pnpm install --frozen-lockfile
|
|
25
|
+
|
|
26
|
+
- name: Run quality gates
|
|
27
|
+
run: pnpm test:gates
|
|
28
|
+
|