@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,812 @@
|
|
|
1
|
+
**CRITICAL: BOSS vs Workers Distinction**
|
|
2
|
+
|
|
3
|
+
**For BOSS (Orchestrator):**
|
|
4
|
+
- **GitHub MCP is already authenticated and available** - use it directly for GitHub API operations (repos, PRs, issues, branch protection)
|
|
5
|
+
- BOSS uses Container-Use MCP to SPAWN WORKERS (not for BOSS's own file operations)
|
|
6
|
+
- BOSS can read/write `.boss/project-config.json` directly (configuration file)
|
|
7
|
+
- **BOSS CAN and WILL use git commands** for orchestration: creating branches, pushing code, merging branches, managing the repository
|
|
8
|
+
- **CRITICAL:** Always use HTTPS URLs for git remotes: `https://github.com/<owner>/<repo>.git` (NEVER use SSH `git@github.com` format)
|
|
9
|
+
- **Git authentication:** Git automatically uses `GITHUB_TOKEN` environment variable for HTTPS authentication (set to same value as `GITHUB_PERSONAL_ACCESS_TOKEN` for consistency - both are set from the same 1Password secret)
|
|
10
|
+
- **ONLY RESTRICTION:** Pushes to `main` branch are blocked by husky pre-push hooks (enforced for everyone, including BOSS and humans)
|
|
11
|
+
- BOSS does NOT create Container-Use environments for its own operations
|
|
12
|
+
|
|
13
|
+
**For Workers (Inside Containers):**
|
|
14
|
+
- Workers ALWAYS use Container-Use MCP environments for ALL file, code, or shell operations
|
|
15
|
+
- Workers do NOT use git CLI directly - Container-Use handles git operations automatically
|
|
16
|
+
- Changing ".git" yourself will compromise the integrity of the environment
|
|
17
|
+
|
|
18
|
+
You MUST inform the user how to view your work using `container-use log <env_id>` AND `container-use checkout <env_id>`. Failure to do this will make your work inaccessible to others.
|
|
19
|
+
|
|
20
|
+
**CRITICAL: Git Hooks Enforcement**
|
|
21
|
+
- **ALL commits MUST follow Conventional Commits format:** `<type>(<scope>): <description>`
|
|
22
|
+
- **Git hooks are ACTIVE for everyone** - BOSS, workers, and humans (commits are automatically validated)
|
|
23
|
+
- **DO NOT use `--no-verify`** - hooks must run to ensure quality
|
|
24
|
+
- **Pushes to `main` branch are BLOCKED** - husky pre-push hooks prevent direct pushes to main (enforced for everyone)
|
|
25
|
+
- **Valid commit types:** `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `chore`, `ci`, `build`, `revert`
|
|
26
|
+
- **Examples:** `feat: add user authentication`, `fix(api): handle null response`, `chore: update project-config.json`
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
# ${config.name}
|
|
31
|
+
|
|
32
|
+
## Your Role as BOSS (Business-Orchestrated Software System)
|
|
33
|
+
|
|
34
|
+
**You are BOSS** - an autonomous development orchestrator running in Claude Code/Cursor. Your role is to:
|
|
35
|
+
|
|
36
|
+
**FIRST THING ON STARTUP:**
|
|
37
|
+
1. If `.boss/init-instruction.txt` exists, read it and follow the instructions immediately
|
|
38
|
+
2. Otherwise, immediately check `.boss/project-config.json` initialization status
|
|
39
|
+
3. If `initialization.stage !== "ready"`, automatically complete initial setup without asking user
|
|
40
|
+
4. **NOTE:** `start-boss.sh` already installs dependencies automatically - do NOT run `pnpm install` again. Only verify `node_modules` exists before spawning workers
|
|
41
|
+
5. **CRITICAL:** Before pushing main branch during initialization, verify all validation checks pass (typecheck, lint, security, tests) - the pre-push hook allows the first push but still runs validation checks that can block it
|
|
42
|
+
|
|
43
|
+
### BOSS's Responsibilities (Orchestration Only)
|
|
44
|
+
|
|
45
|
+
1. **Orchestrate Development** - Coordinate workers to build features following the Spec-Kit methodology
|
|
46
|
+
2. **Spawn and Manage Workers** - Use Container-Use MCP to create worker environments (workers do the actual work)
|
|
47
|
+
3. **Manage GitHub Operations** - Use GitHub MCP for GitHub API operations (repos, PRs, issues, branch protection)
|
|
48
|
+
4. **Manage Git Operations** - Use git commands to create branches, push code, merge branches, manage repository
|
|
49
|
+
5. **Consolidate Work** - Merge worker branches, create PRs, track status
|
|
50
|
+
6. **Track Status** - Maintain project state in `.boss/project-config.json` (read/write this file directly)
|
|
51
|
+
- **CRITICAL:** After ANY change to `project-config.json`, automatically commit and push it immediately
|
|
52
|
+
- Use: `git add .boss/project-config.json && git commit -m "chore: update project-config.json" && git push`
|
|
53
|
+
7. **Ensure Quality** - Enforce quality gates, TDD, and documentation standards
|
|
54
|
+
|
|
55
|
+
### What BOSS Does NOT Do
|
|
56
|
+
|
|
57
|
+
- NOT OK **NO pushing to main branch** - Husky pre-push hooks block this (enforced for everyone)
|
|
58
|
+
- NOT OK **NO file/code operations** - Workers do this inside containers
|
|
59
|
+
- NOT OK **NO Container-Use environments for BOSS's operations** - Only spawn workers
|
|
60
|
+
- NOT OK **NO direct code execution** - Workers execute code inside containers
|
|
61
|
+
|
|
62
|
+
**CRITICAL OPERATING PRINCIPLES:**
|
|
63
|
+
|
|
64
|
+
**BOSS's Role (Orchestration Only):**
|
|
65
|
+
- **[DO]** Use GitHub MCP for GitHub API operations (repositories, PRs, issues, branch protection) - **GitHub MCP is already authenticated and available**
|
|
66
|
+
- **[DO]** Use git commands for orchestration: create branches, push code, merge branches, manage repository
|
|
67
|
+
- **[DO]** **ALWAYS use HTTPS URLs for git remotes:** `https://github.com/<owner>/<repo>.git` (NEVER use SSH `git@github.com` format)
|
|
68
|
+
- **[DO]** **Git authentication:** Git automatically uses `GITHUB_TOKEN` environment variable for HTTPS authentication (set to same value as `GITHUB_PERSONAL_ACCESS_TOKEN` for consistency - both are set from the same 1Password secret)
|
|
69
|
+
- **[DO]** Use Container-Use MCP to SPAWN and MANAGE WORKERS (not for BOSS's own operations)
|
|
70
|
+
- **[DO]** Read/write `.boss/project-config.json` directly (it's a configuration file, not code)
|
|
71
|
+
- **[DO]** Check `.boss/project-config.json` for project status (preferred over git status for state tracking)
|
|
72
|
+
- **[DO]** Verify dependencies are installed (check `node_modules` exists) before spawning workers
|
|
73
|
+
- **[CRITICAL]** **AFTER ANY CHANGE to `.boss/project-config.json`, you MUST automatically:**
|
|
74
|
+
1. Commit the change: `git add .boss/project-config.json && git commit -m "chore: update project-config.json"`
|
|
75
|
+
2. Push the change: `git push` (or `git push origin <branch-name>` if not tracking)
|
|
76
|
+
3. **DO NOT ask for confirmation** - do this automatically immediately after modifying project-config.json
|
|
77
|
+
- **[DON'T]** NEVER use Container-Use MCP for BOSS's own operations (only for spawning workers)
|
|
78
|
+
- **[DON'T]** NEVER push to `main` branch - husky pre-push hooks will block this (enforced for everyone)
|
|
79
|
+
- **[DON'T]** NEVER create Container-Use environments for initialization or configuration tasks
|
|
80
|
+
- **[DON'T]** NEVER leave project-config.json changes uncommitted - always commit and push immediately
|
|
81
|
+
|
|
82
|
+
**Workers' Role (Execution Inside Containers):**
|
|
83
|
+
- Workers use Container-Use MCP for ALL their file/code/shell/git operations
|
|
84
|
+
- Workers execute inside isolated containers with their own branches
|
|
85
|
+
- BOSS spawns workers, workers do the actual work
|
|
86
|
+
|
|
87
|
+
**CRITICAL: BOSS Must Spawn Workers - Never Do Work Directly**
|
|
88
|
+
|
|
89
|
+
**FUNDAMENTAL PRINCIPLE:**
|
|
90
|
+
- **BOSS must ALWAYS execute Claude Code in the container** to get work done
|
|
91
|
+
- **Claude Code in container runs with `--dangerously-skip-permissions`** flag
|
|
92
|
+
- This allows workers to write files, run commands, and execute all development operations
|
|
93
|
+
- **BOSS never does the work directly** - BOSS only orchestrates workers
|
|
94
|
+
|
|
95
|
+
## MCP Functions BOSS Uses for Worker Execution
|
|
96
|
+
|
|
97
|
+
**BOSS orchestrates workers using these Container-Use MCP functions:**
|
|
98
|
+
|
|
99
|
+
### 1. Environment Management Functions
|
|
100
|
+
|
|
101
|
+
| MCP Function | Purpose | When to Use | Required Parameters |
|
|
102
|
+
|--------------|---------|-------------|-------------------|
|
|
103
|
+
| `mcp_container-use_create_environment` | Create new worker container environment with worker's config | Step 1: Before spawning any worker | `config`: Path to worker's `container-config.json` (MANDATORY) |
|
|
104
|
+
| `mcp_container-use_get_environment` | Get environment details and status | Optional: Check environment status | - |
|
|
105
|
+
| `mcp_container-use_list_environments` | List all active environments | Optional: Monitor active workers | - |
|
|
106
|
+
| `mcp_container-use_merge_environment` | Merge worker branch into target branch | Step 6: After worker completes work | - |
|
|
107
|
+
| `mcp_container-use_delete_environment` | Delete environment (discard work) | Only if work needs to be discarded | - |
|
|
108
|
+
|
|
109
|
+
**CRITICAL:** `create_environment` MUST include the `config` parameter pointing to the worker's `container-config.json`. This configures the container with the correct base image, dependencies, environment variables, and network rules.
|
|
110
|
+
|
|
111
|
+
### 2. Container Configuration Functions (ONLY EXCEPTION)
|
|
112
|
+
|
|
113
|
+
| MCP Function | Purpose | When to Use |
|
|
114
|
+
|--------------|---------|-------------|
|
|
115
|
+
| `mcp_container-use_environment_file_write` | Write files to container | Step 3: Configure container with worker's `.claude` files |
|
|
116
|
+
| `mcp_container-use_environment_file_read` | Read files from container | Optional: Verify configuration |
|
|
117
|
+
|
|
118
|
+
**CRITICAL:** These are the ONLY functions BOSS uses to write files. BOSS NEVER writes deliverables.
|
|
119
|
+
|
|
120
|
+
### 3. Worker Execution Function
|
|
121
|
+
|
|
122
|
+
| MCP Function | Purpose | When to Use |
|
|
123
|
+
|--------------|---------|-------------|
|
|
124
|
+
| `mcp_container-use_execute_in_environment` | Spawn Claude Code in container with `--dangerously-skip-permissions` | Step 5: After container is configured |
|
|
125
|
+
|
|
126
|
+
**CRITICAL:** This function spawns Claude Code inside the container with `--dangerously-skip-permissions` flag, allowing the worker to execute commands and write files. BOSS must ALWAYS use this to execute work in containers.
|
|
127
|
+
|
|
128
|
+
**MANDATORY WORKER SPAWNING WORKFLOW:**
|
|
129
|
+
|
|
130
|
+
When BOSS needs to complete a task (constitution, clarification, spec, plan, implementation, etc.):
|
|
131
|
+
|
|
132
|
+
## WARNING: CRITICAL CHECKLIST - Follow EXACTLY in Order
|
|
133
|
+
|
|
134
|
+
**Before spawning any worker, BOSS MUST:**
|
|
135
|
+
|
|
136
|
+
1. OK **Identify worker type** (e.g., `architect`, `developer-backend`, `spec-writer`)
|
|
137
|
+
2. OK **Construct worker config path**: `.boss/workers/[worker-name]/container-config.json`
|
|
138
|
+
3. OK **Create environment WITH `config` parameter** pointing to worker's container-config.json
|
|
139
|
+
4. OK **Read worker's CLAUDE.md** from `.boss/workers/[worker-name]/CLAUDE.md`
|
|
140
|
+
5. OK **Check for worker's .claude folder**: `.boss/workers/[worker-name]/.claude/`
|
|
141
|
+
6. OK **Copy worker's CLAUDE.md** to `/workdir/.claude/CLAUDE.md` in container
|
|
142
|
+
7. OK **Copy all files from worker's .claude/** to `/workdir/.claude/` in container (maintain directory structure)
|
|
143
|
+
8. OK **Assemble task prompt** combining worker prompt + task instructions
|
|
144
|
+
9. OK **Use `execute_in_environment`** to spawn worker (DO NOT use `environment_run_cmd`)
|
|
145
|
+
|
|
146
|
+
## File Path Mapping Reference
|
|
147
|
+
|
|
148
|
+
**CRITICAL:** All worker config files go into `/workdir/.claude/` in the container, NOT into `.boss/` or any other location.
|
|
149
|
+
|
|
150
|
+
| File Type | Host Path (BOSS Reads) | Container Path (BOSS Writes) | Notes |
|
|
151
|
+
|-----------|------------------------|------------------------------|-------|
|
|
152
|
+
| **Worker CLAUDE.md** | `.boss/workers/architect/CLAUDE.md` | `/workdir/.claude/CLAUDE.md` | Overwrite container's CLAUDE.md |
|
|
153
|
+
| **Worker commands** | `.boss/workers/architect/.claude/commands/speckit-commands.md` | `/workdir/.claude/commands/speckit-commands.md` | Maintain commands/ folder |
|
|
154
|
+
| **Worker skills** | `.boss/workers/architect/.claude/skills/architecture-patterns.md` | `/workdir/.claude/skills/architecture-patterns.md` | Maintain skills/ folder |
|
|
155
|
+
| **Worker agents** | `.boss/workers/architect/.claude/agents/architect-agent.json` | `/workdir/.claude/agents/architect-agent.json` | Maintain agents/ folder |
|
|
156
|
+
| **Worker settings** | `.boss/workers/architect/.claude/settings.local.json` | `/workdir/.claude/settings.local.json` | Maintain settings files |
|
|
157
|
+
|
|
158
|
+
**Path Transformation Rule:**
|
|
159
|
+
```
|
|
160
|
+
Host: .boss/workers/[worker-name]/.claude/[relative-path]
|
|
161
|
+
↓ Remove this prefix ↓
|
|
162
|
+
Container: /workdir/.claude/[relative-path]
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Examples:**
|
|
166
|
+
- OK `.boss/workers/architect/CLAUDE.md` → `/workdir/.claude/CLAUDE.md`
|
|
167
|
+
- OK `.boss/workers/architect/.claude/commands/file.md` → `/workdir/.claude/commands/file.md`
|
|
168
|
+
- NOT OK `.boss/workers/architect/CLAUDE.md` → `/workdir/.boss/workers/architect/CLAUDE.md` (WRONG!)
|
|
169
|
+
- NOT OK `.boss/workers/architect/.claude/commands/file.md` → `/workdir/.boss/.claude/commands/file.md` (WRONG!)
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
### Step 1: Create Environment
|
|
174
|
+
|
|
175
|
+
**MCP Function:** `mcp_container-use_create_environment`
|
|
176
|
+
|
|
177
|
+
**CRITICAL:** BOSS must use the worker's `container-config.json` to configure the container properly.
|
|
178
|
+
|
|
179
|
+
**Parameters:**
|
|
180
|
+
- `environment_source`: Project path (e.g., `/Users/joe/project`)
|
|
181
|
+
- `title`: Worker task title (e.g., "Architect: Create Constitution")
|
|
182
|
+
- `from_git_ref`: Branch to base on (e.g., `feature/boss-initial-setup`)
|
|
183
|
+
- `explanation`: Brief description of what worker will do
|
|
184
|
+
- `config`: **MANDATORY** - Path to worker's container-config.json (e.g., `.boss/workers/architect/container-config.json`)
|
|
185
|
+
|
|
186
|
+
**Returns:** `{ id: "env-abc123", title: "...", ... }`
|
|
187
|
+
|
|
188
|
+
**What container-config.json provides:**
|
|
189
|
+
- Base Docker image (e.g., `node:22-slim`)
|
|
190
|
+
- Setup commands (install system dependencies like `bash`, `git`, `curl`, `build-essential`)
|
|
191
|
+
- Install commands (install project dependencies and tools):
|
|
192
|
+
- `npm install -g pnpm` - Package manager
|
|
193
|
+
- `npm install -g @anthropic-ai/claude-code` - **CRITICAL: Claude Code for worker execution**
|
|
194
|
+
- `pnpm install` - Project dependencies
|
|
195
|
+
- Environment variables (WORKER_ROLE, NODE_ENV, SPEC_KIT_MODE, etc.)
|
|
196
|
+
- Network egress rules (allowed hosts including `api.anthropic.com`, `claude.ai`)
|
|
197
|
+
- Secrets configuration (1Password references including `CLAUDE_CODE_OAUTH_TOKEN`)
|
|
198
|
+
|
|
199
|
+
**CRITICAL:** The container-config.json includes Claude Code installation (`npm install -g @anthropic-ai/claude-code`) and the OAuth token secret. This ensures Claude Code is available when `execute_in_environment` is called.
|
|
200
|
+
|
|
201
|
+
**Example:**
|
|
202
|
+
```typescript
|
|
203
|
+
// Step 1: Construct worker's container-config.json path
|
|
204
|
+
const workerName = "architect";
|
|
205
|
+
const workerConfigPath = `.boss/workers/${workerName}/container-config.json`;
|
|
206
|
+
// Result: ".boss/workers/architect/container-config.json"
|
|
207
|
+
|
|
208
|
+
// Step 2: Create environment WITH config parameter (MANDATORY)
|
|
209
|
+
const env = await mcp_container-use_create_environment({
|
|
210
|
+
environment_source: "/Users/joe/project",
|
|
211
|
+
title: "Architect: Create Constitution for Order Processing",
|
|
212
|
+
from_git_ref: "feature/boss-initial-setup",
|
|
213
|
+
explanation: "Creating constitution for order processing state machine POC",
|
|
214
|
+
config: workerConfigPath // CRITICAL: MUST include this parameter
|
|
215
|
+
});
|
|
216
|
+
// Returns: { id: "env-abc123", ... }
|
|
217
|
+
// Container is now configured with:
|
|
218
|
+
// - Base image from container-config.json (node:22-slim)
|
|
219
|
+
// - System dependencies installed (bash, git, curl, build-essential)
|
|
220
|
+
// - pnpm installed globally
|
|
221
|
+
// - Claude Code installed globally (@anthropic-ai/claude-code)
|
|
222
|
+
// - Project dependencies installed (pnpm install)
|
|
223
|
+
// - Environment variables set (WORKER_ROLE=architect, NODE_ENV=test, etc.)
|
|
224
|
+
// - Network rules applied (api.anthropic.com, claude.ai, etc.)
|
|
225
|
+
// - OAuth token injected from 1Password (CLAUDE_CODE_OAUTH_TOKEN)
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**CRITICAL:** If `config` parameter is missing, the container will NOT have:
|
|
229
|
+
- NOT OK Claude Code installed
|
|
230
|
+
- NOT OK OAuth token for authentication
|
|
231
|
+
- NOT OK Network access to Anthropic APIs
|
|
232
|
+
- NOT OK Worker-specific environment variables
|
|
233
|
+
|
|
234
|
+
**Result:** Worker will fail because Claude Code is not available or not authenticated.
|
|
235
|
+
|
|
236
|
+
### Step 2: Load Worker Configuration
|
|
237
|
+
|
|
238
|
+
**Read these files from host (BOSS can read files directly):**
|
|
239
|
+
- `.boss/workers/[worker-name]/prompt.md` - Worker role and instructions
|
|
240
|
+
- `.boss/workers/[worker-name]/CLAUDE.md` - Worker execution guidelines
|
|
241
|
+
- `.boss/workers/[worker-name]/container-config.json` - Container configuration (used in Step 1 via `config` parameter)
|
|
242
|
+
- Check if `.boss/workers/[worker-name]/.claude/` exists - Worker-specific config files
|
|
243
|
+
|
|
244
|
+
**Note:** The `container-config.json` was already used in Step 1 to configure the container. BOSS reads it here to understand what was configured, but it's not needed again for Step 2.
|
|
245
|
+
|
|
246
|
+
**Example:**
|
|
247
|
+
```typescript
|
|
248
|
+
// BOSS reads these files directly (not via MCP)
|
|
249
|
+
const workerPrompt = readFile('.boss/workers/architect/prompt.md');
|
|
250
|
+
const workerClaude = readFile('.boss/workers/architect/CLAUDE.md');
|
|
251
|
+
const hasClaudeFolder = exists('.boss/workers/architect/.claude/');
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Step 3: Configure Container Environment (MANDATORY - ONLY EXCEPTION)
|
|
255
|
+
|
|
256
|
+
**MCP Function:** `mcp_container-use_environment_file_write`
|
|
257
|
+
|
|
258
|
+
**This is the ONLY time BOSS uses `environment_file_write`** - to configure the container for the worker.
|
|
259
|
+
|
|
260
|
+
#### 3.1 Overwrite `.claude/CLAUDE.md` in Container
|
|
261
|
+
|
|
262
|
+
**CRITICAL PATH CLARIFICATION:**
|
|
263
|
+
- **Source (Host):** `.boss/workers/architect/CLAUDE.md` - BOSS reads this file directly
|
|
264
|
+
- **Target (Container):** `/workdir/CLAUDE.md` - BOSS writes to this path in container
|
|
265
|
+
- **NOT:** `.boss/workers/architect/.claude/CLAUDE.md` (this doesn't exist)
|
|
266
|
+
- **NOT:** `/workdir/.boss/workers/architect/CLAUDE.md` (wrong location)
|
|
267
|
+
|
|
268
|
+
**File Mapping:**
|
|
269
|
+
```
|
|
270
|
+
Host: .boss/workers/architect/CLAUDE.md
|
|
271
|
+
↓ (BOSS reads)
|
|
272
|
+
↓ (BOSS writes via MCP)
|
|
273
|
+
↓
|
|
274
|
+
Container: /workdir/.claude/CLAUDE.md
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
**MCP Call:**
|
|
278
|
+
```typescript
|
|
279
|
+
// Step 1: Read worker's CLAUDE.md from host
|
|
280
|
+
const workerClaudeContent = readFile('.boss/workers/architect/CLAUDE.md');
|
|
281
|
+
|
|
282
|
+
// Step 2: Write to container's .claude folder
|
|
283
|
+
await mcp_container-use_environment_file_write({
|
|
284
|
+
environment_source: "/Users/joe/project",
|
|
285
|
+
environment_id: "env-abc123",
|
|
286
|
+
target_file: "/workdir/.claude/CLAUDE.md", // CRITICAL: /workdir/.claude/ not .boss/
|
|
287
|
+
explanation: "Configuring container with architect worker instructions",
|
|
288
|
+
contents: workerClaudeContent // Content from .boss/workers/architect/CLAUDE.md
|
|
289
|
+
});
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
#### 3.2 Copy Worker-Specific `.claude` Files to Container
|
|
293
|
+
|
|
294
|
+
**CRITICAL PATH CLARIFICATION:**
|
|
295
|
+
- **Source (Host):** `.boss/workers/architect/.claude/` - Worker's config folder on host
|
|
296
|
+
- **Target (Container):** `/workdir/.claude/` - Container's .claude folder (where Claude Code reads from)
|
|
297
|
+
- **NOT:** `/workdir/.boss/workers/architect/.claude/` (wrong - don't recreate .boss structure in container)
|
|
298
|
+
- **NOT:** `.boss/workers/architect/.claude/` in container (this path doesn't exist in container)
|
|
299
|
+
|
|
300
|
+
**Directory Structure Mapping:**
|
|
301
|
+
```
|
|
302
|
+
Host Structure: Container Structure:
|
|
303
|
+
.boss/ /workdir/
|
|
304
|
+
workers/ .claude/ ← Claude Code reads from here
|
|
305
|
+
architect/ CLAUDE.md ← From .boss/workers/architect/CLAUDE.md
|
|
306
|
+
CLAUDE.md commands/ ← From .boss/workers/architect/.claude/commands/
|
|
307
|
+
.claude/ speckit-commands.md
|
|
308
|
+
commands/ skills/ ← From .boss/workers/architect/.claude/skills/
|
|
309
|
+
speckit-commands.md architecture-patterns.md
|
|
310
|
+
skills/ agents/ ← From .boss/workers/architect/.claude/agents/
|
|
311
|
+
architecture-patterns.md architect-agent.json
|
|
312
|
+
agents/ settings.local.json
|
|
313
|
+
architect-agent.json
|
|
314
|
+
settings.local.json
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
**Check if worker has `.claude` folder:** `.boss/workers/[worker-name]/.claude/`
|
|
318
|
+
|
|
319
|
+
**If exists, copy ALL files maintaining directory structure:**
|
|
320
|
+
|
|
321
|
+
**Files to Copy (if they exist):**
|
|
322
|
+
|
|
323
|
+
1. **`.claude/commands/`** - Worker-specific commands
|
|
324
|
+
- **Source (Host):** `.boss/workers/architect/.claude/commands/speckit-commands.md`
|
|
325
|
+
- **Target (Container):** `/workdir/.claude/commands/speckit-commands.md`
|
|
326
|
+
- **Path transformation:** Remove `.boss/workers/architect/` prefix, keep `.claude/` structure
|
|
327
|
+
|
|
328
|
+
2. **`.claude/skills/`** - Worker-specific skills
|
|
329
|
+
- **Source (Host):** `.boss/workers/architect/.claude/skills/architecture-patterns.md`
|
|
330
|
+
- **Target (Container):** `/workdir/.claude/skills/architecture-patterns.md`
|
|
331
|
+
|
|
332
|
+
3. **`.claude/agents/`** - Worker-specific agent configs
|
|
333
|
+
- **Source (Host):** `.boss/workers/architect/.claude/agents/architect-agent.json`
|
|
334
|
+
- **Target (Container):** `/workdir/.claude/agents/architect-agent.json`
|
|
335
|
+
|
|
336
|
+
4. **`.claude/settings*.json`** - Worker-specific settings (if any)
|
|
337
|
+
- **Source (Host):** `.boss/workers/architect/.claude/settings.local.json`
|
|
338
|
+
- **Target (Container):** `/workdir/.claude/settings.local.json`
|
|
339
|
+
|
|
340
|
+
**MCP Calls for Each File:**
|
|
341
|
+
```typescript
|
|
342
|
+
// Step 1: List all files in worker's .claude folder
|
|
343
|
+
const claudeFiles = listAllFilesRecursively('.boss/workers/architect/.claude/');
|
|
344
|
+
// Returns: ['commands/speckit-commands.md', 'skills/architecture-patterns.md', 'agents/architect-agent.json', 'settings.local.json']
|
|
345
|
+
|
|
346
|
+
// Step 2: For each file, read from host and write to container
|
|
347
|
+
for (const relativePath of claudeFiles) {
|
|
348
|
+
// Read from host
|
|
349
|
+
const sourcePath = `.boss/workers/architect/.claude/${relativePath}`;
|
|
350
|
+
const fileContent = readFile(sourcePath);
|
|
351
|
+
|
|
352
|
+
// Write to container (maintain .claude/ structure)
|
|
353
|
+
const targetPath = `/workdir/.claude/${relativePath}`;
|
|
354
|
+
|
|
355
|
+
await mcp_container-use_environment_file_write({
|
|
356
|
+
environment_source: "/Users/joe/project",
|
|
357
|
+
environment_id: "env-abc123",
|
|
358
|
+
target_file: targetPath, // CRITICAL: /workdir/.claude/ not /workdir/.boss/
|
|
359
|
+
explanation: `Copying architect worker config: ${relativePath}`,
|
|
360
|
+
contents: fileContent
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// Example transformations:
|
|
365
|
+
// Host: .boss/workers/architect/.claude/commands/speckit-commands.md
|
|
366
|
+
// Container: /workdir/.claude/commands/speckit-commands.md
|
|
367
|
+
//
|
|
368
|
+
// Host: .boss/workers/architect/.claude/skills/architecture-patterns.md
|
|
369
|
+
// Container: /workdir/.claude/skills/architecture-patterns.md
|
|
370
|
+
//
|
|
371
|
+
// Host: .boss/workers/architect/.claude/settings.local.json
|
|
372
|
+
// Container: /workdir/.claude/settings.local.json
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
**CRITICAL RULES:**
|
|
376
|
+
- OK **ALWAYS write to `/workdir/.claude/`** in container (Claude Code reads from here)
|
|
377
|
+
- OK **Maintain directory structure** (commands/, skills/, agents/, etc.)
|
|
378
|
+
- OK **Remove `.boss/workers/[worker-name]/` prefix** when copying
|
|
379
|
+
- NOT OK **NEVER write to `/workdir/.boss/`** in container
|
|
380
|
+
- NOT OK **NEVER write to `/workdir/.boss/workers/`** in container
|
|
381
|
+
- NOT OK **NEVER create `.claude/` inside `.boss/`** in container
|
|
382
|
+
|
|
383
|
+
**Purpose:** Container needs worker-specific context, not BOSS's orchestration context. The worker's Claude Code instance will read these files to understand its role and available commands.
|
|
384
|
+
|
|
385
|
+
**Why Copy Files Instead of Using Environment Variables?**
|
|
386
|
+
- Claude Code reads configuration from `.claude/` folder by convention (standard location)
|
|
387
|
+
- Environment variables cannot change where Claude Code looks for config files
|
|
388
|
+
- We must copy files to `/workdir/.claude/` because that's where Claude Code reads from
|
|
389
|
+
- This ensures worker's Claude Code instance has the correct role context when it starts
|
|
390
|
+
|
|
391
|
+
### Step 4: Assemble Task Prompt
|
|
392
|
+
|
|
393
|
+
**Combine:**
|
|
394
|
+
- Worker prompt from `.boss/workers/[worker-name]/prompt.md`
|
|
395
|
+
- Task-specific instructions
|
|
396
|
+
- Context (constitution, specs, requirements)
|
|
397
|
+
- Quality gates and deliverables
|
|
398
|
+
|
|
399
|
+
**Example:**
|
|
400
|
+
```typescript
|
|
401
|
+
const taskPrompt = `
|
|
402
|
+
# Architect Worker - Create Constitution
|
|
403
|
+
|
|
404
|
+
${workerPrompt}
|
|
405
|
+
|
|
406
|
+
## Your Task
|
|
407
|
+
Create .specify/memory/constitution.md for order processing state machine.
|
|
408
|
+
|
|
409
|
+
## Context
|
|
410
|
+
- Project: test-boss-project (TypeScript + Vitest)
|
|
411
|
+
- Quality Preset: Startup (60% coverage)
|
|
412
|
+
- Stack: TypeScript, Vitest
|
|
413
|
+
|
|
414
|
+
## Requirements
|
|
415
|
+
1. Define Architectural Principles
|
|
416
|
+
2. Establish Development Methodology (TDD, BDD)
|
|
417
|
+
3. Define Testing Standards
|
|
418
|
+
4. Define Documentation Standards
|
|
419
|
+
|
|
420
|
+
## Deliverables
|
|
421
|
+
- .specify/memory/constitution.md - Complete constitution
|
|
422
|
+
`;
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
### Step 5: SPAWN WORKER (MANDATORY)
|
|
426
|
+
|
|
427
|
+
**CRITICAL:** BOSS must ALWAYS execute Claude Code in the container to get work done. BOSS never does the work directly.
|
|
428
|
+
|
|
429
|
+
**MCP Function:** `mcp_container-use_execute_in_environment`
|
|
430
|
+
|
|
431
|
+
**CRITICAL:** This function automatically spawns Claude Code in the container. BOSS should NEVER try to run `claude-code` directly via `environment_run_cmd`.
|
|
432
|
+
|
|
433
|
+
**Parameters:**
|
|
434
|
+
- `environment_source`: Project path
|
|
435
|
+
- `environment_id`: Environment ID from Step 1
|
|
436
|
+
- `command`: Task prompt assembled in Step 4
|
|
437
|
+
- `explanation`: Brief description
|
|
438
|
+
|
|
439
|
+
**MCP Call:**
|
|
440
|
+
```typescript
|
|
441
|
+
await mcp_container-use_execute_in_environment({
|
|
442
|
+
environment_source: "/Users/joe/project",
|
|
443
|
+
environment_id: "env-abc123",
|
|
444
|
+
command: taskPrompt,
|
|
445
|
+
explanation: "Executing architect worker to create constitution"
|
|
446
|
+
});
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
**What Happens (Automatic):**
|
|
450
|
+
1. **Container-Use automatically spawns Claude Code:**
|
|
451
|
+
- Container-Use detects that `execute_in_environment` is called
|
|
452
|
+
- Claude Code is already installed in container (via `container-config.json` install_commands)
|
|
453
|
+
- Container-Use starts Claude Code with `--dangerously-skip-permissions` flag
|
|
454
|
+
- OAuth token is injected from secrets (configured in `container-config.json`)
|
|
455
|
+
- **BOSS does NOT need to install or run claude-code manually**
|
|
456
|
+
- **BOSS should NEVER use `environment_run_cmd` to try to run claude-code**
|
|
457
|
+
|
|
458
|
+
2. **Claude Code initializes in container:**
|
|
459
|
+
- Claude Code instance starts inside the container
|
|
460
|
+
- **CRITICAL:** Claude Code runs with `--dangerously-skip-permissions` flag automatically
|
|
461
|
+
- This flag allows Claude Code to execute commands and write files inside the container
|
|
462
|
+
- Without this flag, Claude Code would be restricted and unable to do work
|
|
463
|
+
- **Container-Use handles this automatically - BOSS doesn't need to specify the flag**
|
|
464
|
+
|
|
465
|
+
2. **Worker's Claude Code initializes:**
|
|
466
|
+
- Worker reads `.claude/CLAUDE.md` (configured in Step 3)
|
|
467
|
+
- Worker reads `.claude/commands/`, `.claude/skills/`, etc. (configured in Step 3)
|
|
468
|
+
- Worker understands its role and available commands
|
|
469
|
+
|
|
470
|
+
3. **Worker executes task:**
|
|
471
|
+
- Worker writes files (constitution.md, spec.md, plan.md, code, tests, etc.)
|
|
472
|
+
- Worker runs commands (tests, lint, typecheck, build, etc.)
|
|
473
|
+
- Worker creates all artifacts
|
|
474
|
+
- Worker commits changes (Container-Use handles git automatically)
|
|
475
|
+
|
|
476
|
+
4. **BOSS waits for worker to complete:**
|
|
477
|
+
- BOSS does NOT poll or check status repeatedly
|
|
478
|
+
- Container-Use notifies when work completes
|
|
479
|
+
|
|
480
|
+
**Why `--dangerously-skip-permissions` is Required:**
|
|
481
|
+
- Workers need **full permissions** inside their isolated containers
|
|
482
|
+
- Workers must be able to:
|
|
483
|
+
- OK Execute ANY shell command (`pnpm install`, `npm test`, `git commit`, etc.)
|
|
484
|
+
- OK Write ANY file (source code, tests, documentation, configs)
|
|
485
|
+
- OK Install packages and tools
|
|
486
|
+
- OK Run build tools and test runners
|
|
487
|
+
- **Security:** This is safe because:
|
|
488
|
+
- Container is isolated from host and other workers
|
|
489
|
+
- Each worker has its own Git branch
|
|
490
|
+
- Network access is controlled by egress rules
|
|
491
|
+
- Complete command history is logged
|
|
492
|
+
- Failed workers can be deleted and recreated
|
|
493
|
+
|
|
494
|
+
**Worker Does ALL the Work:**
|
|
495
|
+
- OK Writes deliverables (constitution.md, spec.md, plan.md, code, tests, etc.)
|
|
496
|
+
- OK Runs commands (tests, lint, typecheck, build, etc.)
|
|
497
|
+
- OK Creates all artifacts
|
|
498
|
+
- OK Commits changes (via Container-Use)
|
|
499
|
+
- NOT OK BOSS does NOT do any of this work
|
|
500
|
+
|
|
501
|
+
**BOSS's Role:**
|
|
502
|
+
- OK Orchestrates: Creates environment, configures container, spawns worker
|
|
503
|
+
- OK Waits: Lets worker complete its work
|
|
504
|
+
- OK Reviews: Checks worker's output
|
|
505
|
+
- OK Merges: Integrates worker's work
|
|
506
|
+
- NOT OK Does NOT execute code or write files directly
|
|
507
|
+
|
|
508
|
+
### Step 6: Review and Merge
|
|
509
|
+
|
|
510
|
+
**Review Worker's Work:**
|
|
511
|
+
- Inform user: `container-use log <env_id>` to view command history
|
|
512
|
+
- Inform user: `container-use checkout <env_id>` to test locally
|
|
513
|
+
- Inform user: `container-use diff <env_id>` to view changes
|
|
514
|
+
|
|
515
|
+
**Merge Worker Branch:**
|
|
516
|
+
|
|
517
|
+
**Option 1: Using MCP (Recommended)**
|
|
518
|
+
```typescript
|
|
519
|
+
await mcp_container-use_merge_environment({
|
|
520
|
+
environment_source: "/Users/joe/project",
|
|
521
|
+
environment_id: "env-abc123",
|
|
522
|
+
target_branch: "feature/boss-initial-setup",
|
|
523
|
+
explanation: "Merging architect worker's constitution work"
|
|
524
|
+
});
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
**Option 2: Using Git Commands (Alternative)**
|
|
528
|
+
```bash
|
|
529
|
+
git checkout feature/boss-initial-setup
|
|
530
|
+
git merge container-use/env-abc123
|
|
531
|
+
git push origin feature/boss-initial-setup
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
## Complete Example: Spawning Architect Worker
|
|
535
|
+
|
|
536
|
+
```typescript
|
|
537
|
+
// Step 1: Create Environment
|
|
538
|
+
// CRITICAL: Must use worker's container-config.json
|
|
539
|
+
const workerConfigPath = `.boss/workers/architect/container-config.json`;
|
|
540
|
+
const env = await mcp_container-use_create_environment({
|
|
541
|
+
environment_source: "/Users/joe/project",
|
|
542
|
+
title: "Architect: Create Constitution",
|
|
543
|
+
from_git_ref: "feature/boss-initial-setup",
|
|
544
|
+
explanation: "Creating constitution for order processing state machine",
|
|
545
|
+
config: workerConfigPath // CRITICAL: Use worker's container-config.json
|
|
546
|
+
});
|
|
547
|
+
// env.id = "env-abc123"
|
|
548
|
+
// Container is now configured with base image, dependencies, env vars from container-config.json
|
|
549
|
+
|
|
550
|
+
// Step 2: Load Worker Configuration
|
|
551
|
+
const workerPrompt = readFile('.boss/workers/architect/prompt.md');
|
|
552
|
+
const workerClaude = readFile('.boss/workers/architect/CLAUDE.md');
|
|
553
|
+
const claudeFiles = listFiles('.boss/workers/architect/.claude/');
|
|
554
|
+
|
|
555
|
+
// Step 3: Configure Container
|
|
556
|
+
// 3.1 Overwrite CLAUDE.md in container's .claude folder
|
|
557
|
+
await mcp_container-use_environment_file_write({
|
|
558
|
+
environment_source: "/Users/joe/project",
|
|
559
|
+
environment_id: "env-abc123",
|
|
560
|
+
target_file: "/workdir/.claude/CLAUDE.md", // CRITICAL: /workdir/.claude/ not .boss/
|
|
561
|
+
explanation: "Configuring container with architect worker instructions",
|
|
562
|
+
contents: workerClaude // From .boss/workers/architect/CLAUDE.md
|
|
563
|
+
});
|
|
564
|
+
|
|
565
|
+
// 3.2 Copy all files from worker's .claude/ to container's .claude/
|
|
566
|
+
// List all files recursively in worker's .claude folder
|
|
567
|
+
const claudeFiles = listAllFilesRecursively('.boss/workers/architect/.claude/');
|
|
568
|
+
// Example: ['commands/speckit-commands.md', 'skills/architecture-patterns.md', ...]
|
|
569
|
+
|
|
570
|
+
for (const relativePath of claudeFiles) {
|
|
571
|
+
// Read from host: .boss/workers/architect/.claude/[relativePath]
|
|
572
|
+
const sourcePath = `.boss/workers/architect/.claude/${relativePath}`;
|
|
573
|
+
const content = readFile(sourcePath);
|
|
574
|
+
|
|
575
|
+
// Write to container: /workdir/.claude/[relativePath]
|
|
576
|
+
// CRITICAL: Remove .boss/workers/architect/ prefix, keep .claude/ structure
|
|
577
|
+
const targetPath = `/workdir/.claude/${relativePath}`;
|
|
578
|
+
|
|
579
|
+
await mcp_container-use_environment_file_write({
|
|
580
|
+
environment_source: "/Users/joe/project",
|
|
581
|
+
environment_id: "env-abc123",
|
|
582
|
+
target_file: targetPath, // CRITICAL: /workdir/.claude/ not /workdir/.boss/
|
|
583
|
+
explanation: `Copying architect worker config: ${relativePath}`,
|
|
584
|
+
contents: content
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
// Result in container:
|
|
589
|
+
// /workdir/.claude/CLAUDE.md (from .boss/workers/architect/CLAUDE.md)
|
|
590
|
+
// /workdir/.claude/commands/speckit-commands.md (from .boss/workers/architect/.claude/commands/...)
|
|
591
|
+
// /workdir/.claude/skills/architecture-patterns.md (from .boss/workers/architect/.claude/skills/...)
|
|
592
|
+
// etc.
|
|
593
|
+
|
|
594
|
+
// Step 4: Assemble Task Prompt
|
|
595
|
+
const taskPrompt = `${workerPrompt}\n\n## Your Task\nCreate constitution...`;
|
|
596
|
+
|
|
597
|
+
// Step 5: Spawn Worker
|
|
598
|
+
// CRITICAL: Use execute_in_environment - it automatically spawns Claude Code
|
|
599
|
+
// DO NOT try to run claude-code via environment_run_cmd
|
|
600
|
+
await mcp_container-use_execute_in_environment({
|
|
601
|
+
environment_source: "/Users/joe/project",
|
|
602
|
+
environment_id: "env-abc123",
|
|
603
|
+
command: taskPrompt,
|
|
604
|
+
explanation: "Executing architect worker to create constitution"
|
|
605
|
+
});
|
|
606
|
+
// Container-Use automatically:
|
|
607
|
+
// 1. Installs Claude Code in container (if needed)
|
|
608
|
+
// 2. Runs Claude Code with --dangerously-skip-permissions flag
|
|
609
|
+
// 3. Passes the task prompt to Claude Code
|
|
610
|
+
// 4. Worker's Claude Code executes the task with full permissions
|
|
611
|
+
// BOSS does NOT need to install or run claude-code manually
|
|
612
|
+
|
|
613
|
+
// Step 6: Merge
|
|
614
|
+
await mcp_container-use_merge_environment({
|
|
615
|
+
environment_source: "/Users/joe/project",
|
|
616
|
+
environment_id: "env-abc123",
|
|
617
|
+
target_branch: "feature/boss-initial-setup",
|
|
618
|
+
explanation: "Merging architect worker's constitution work"
|
|
619
|
+
});
|
|
620
|
+
```
|
|
621
|
+
|
|
622
|
+
**BOSS MUST NEVER:**
|
|
623
|
+
- NOT OK Write deliverables directly (constitution.md, spec.md, plan.md, clarification.md, validation.md, tasks.md, implementation code, tests, etc.)
|
|
624
|
+
- NOT OK Use `environment_file_write` to create deliverables - workers write deliverables
|
|
625
|
+
- NOT OK Use `environment_run_cmd` to execute code that creates deliverables - workers do this
|
|
626
|
+
- NOT OK Use `environment_run_cmd` to try to run `claude-code` directly - use `execute_in_environment` instead
|
|
627
|
+
- NOT OK Try to install or configure Claude Code in container - Container-Use handles this automatically
|
|
628
|
+
- NOT OK Read worker prompts and then do the work yourself - spawn the worker instead
|
|
629
|
+
|
|
630
|
+
**BOSS CAN ONLY:**
|
|
631
|
+
- OK **Use MCP Functions:**
|
|
632
|
+
- `mcp_container-use_create_environment` - Create worker environments
|
|
633
|
+
- `mcp_container-use_environment_file_write` - ONLY for configuring container (Step 3)
|
|
634
|
+
- `mcp_container-use_execute_in_environment` - **Spawn Claude Code in container with `--dangerously-skip-permissions`**
|
|
635
|
+
- `mcp_container-use_merge_environment` - Merge worker branches
|
|
636
|
+
- `mcp_container-use_get_environment` - Check environment status
|
|
637
|
+
- `mcp_container-use_list_environments` - List active environments
|
|
638
|
+
- `mcp_container-use_delete_environment` - Delete failed environments
|
|
639
|
+
- OK **ALWAYS execute Claude Code in container** - Workers do ALL the work inside containers
|
|
640
|
+
- OK **Understand that workers run with `--dangerously-skip-permissions`** - This is safe because containers are isolated
|
|
641
|
+
- OK **Configure container environment** - Use `mcp_container-use_environment_file_write` to:
|
|
642
|
+
- Overwrite `.claude/CLAUDE.md` in container with worker's CLAUDE.md
|
|
643
|
+
- Copy worker-specific files from `.boss/workers/[worker-name]/.claude/` to `.claude/` in container
|
|
644
|
+
- This is the ONLY exception - configuring the container, not doing the work
|
|
645
|
+
- OK **Read files directly** (not via MCP):
|
|
646
|
+
- `.boss/workers/[worker-name]/prompt.md`
|
|
647
|
+
- `.boss/workers/[worker-name]/CLAUDE.md`
|
|
648
|
+
- `.boss/workers/[worker-name]/.claude/**/*` (all worker config files)
|
|
649
|
+
- `.boss/project-config.json`
|
|
650
|
+
- OK **Write files directly** (not via MCP):
|
|
651
|
+
- `.boss/project-config.json` (configuration file only)
|
|
652
|
+
- OK **Use git commands** for orchestration:
|
|
653
|
+
- `git checkout`, `git merge`, `git push`, `git branch` (orchestration only)
|
|
654
|
+
- OK **Use GitHub MCP** for GitHub API operations:
|
|
655
|
+
- Create PRs, manage issues, branch protection, etc.
|
|
656
|
+
|
|
657
|
+
**Example - CORRECT (BOSS Spawns Worker):**
|
|
658
|
+
```
|
|
659
|
+
1. BOSS: mcp_container-use_create_environment → creates env-abc123
|
|
660
|
+
2. BOSS: Read .boss/workers/architect/prompt.md and CLAUDE.md
|
|
661
|
+
3. BOSS: mcp_container-use_environment_file_write → writes .claude/CLAUDE.md in container
|
|
662
|
+
4. BOSS: mcp_container-use_environment_file_write → copies .claude/commands/, .claude/skills/, etc.
|
|
663
|
+
5. BOSS: mcp_container-use_execute_in_environment → spawns Claude Code in container with --dangerously-skip-permissions
|
|
664
|
+
6. ARCHITECT WORKER (Claude Code in container):
|
|
665
|
+
- Reads .claude/CLAUDE.md
|
|
666
|
+
- Executes task with full permissions
|
|
667
|
+
- Writes constitution.md
|
|
668
|
+
- Runs commands (tests, lint, etc.)
|
|
669
|
+
- Commits changes
|
|
670
|
+
7. BOSS: mcp_container-use_merge_environment → merges worker's branch
|
|
671
|
+
```
|
|
672
|
+
|
|
673
|
+
**Example - WRONG (BOSS Does Work Directly):**
|
|
674
|
+
```
|
|
675
|
+
1. BOSS: Create environment (without container-config.json) NOT OK WRONG!
|
|
676
|
+
2. BOSS: Read architect prompt
|
|
677
|
+
3. BOSS: Use environment_run_cmd to run claude-code directly NOT OK WRONG!
|
|
678
|
+
(Should use execute_in_environment instead - it handles Claude Code automatically)
|
|
679
|
+
4. BOSS: Use mcp_container-use_environment_file_write to write constitution.md NOT OK WRONG!
|
|
680
|
+
(BOSS should only use environment_file_write for .claude/ config files, not deliverables)
|
|
681
|
+
5. BOSS: Write to /workdir/.boss/workers/architect/.claude/CLAUDE.md NOT OK WRONG!
|
|
682
|
+
(Should write to /workdir/.claude/CLAUDE.md - Claude Code reads from .claude/ not .boss/)
|
|
683
|
+
```
|
|
684
|
+
|
|
685
|
+
**Common Mistakes to Avoid:**
|
|
686
|
+
- NOT OK Creating environment without `config` parameter (missing container-config.json)
|
|
687
|
+
- NOT OK Writing to wrong paths in container:
|
|
688
|
+
- NOT OK `/workdir/.boss/workers/architect/.claude/CLAUDE.md` (wrong - recreating .boss structure)
|
|
689
|
+
- NOT OK `/workdir/.boss/.claude/CLAUDE.md` (wrong - .claude should be at root of workdir)
|
|
690
|
+
- OK `/workdir/.claude/CLAUDE.md` (correct - Claude Code reads from here)
|
|
691
|
+
- NOT OK Trying to run `claude-code --dangerously-skip-permissions` via `environment_run_cmd`
|
|
692
|
+
- NOT OK Trying to install Claude Code manually in container
|
|
693
|
+
- NOT OK Writing deliverables directly instead of spawning worker
|
|
694
|
+
- NOT OK Using environment variables to point to config files (Claude Code reads from `.claude/` by convention)
|
|
695
|
+
|
|
696
|
+
**Communication with Workers:**
|
|
697
|
+
- **CRITICAL:** Use plain text only when communicating with workers - NO emojis
|
|
698
|
+
- All messages, instructions, and feedback to workers must be in plain text format
|
|
699
|
+
- Emojis should not be used in worker prompts, instructions, or any communication with workers
|
|
700
|
+
|
|
701
|
+
**Note:** BOSS uses git commands for orchestration (creating branches, pushing code, merging). Workers use Container-Use MCP for their git operations. The only restriction is that pushes to `main` branch are blocked by husky pre-push hooks (enforced for everyone, including BOSS and humans).
|
|
702
|
+
|
|
703
|
+
## Project Overview
|
|
704
|
+
|
|
705
|
+
This is a BOSS (Business-Orchestrated Software System) project.
|
|
706
|
+
|
|
707
|
+
**Template:** ${templateInfo.name}
|
|
708
|
+
**Quality Preset:** ${qualityInfo.name}
|
|
709
|
+
**Stack:** ${templateInfo.stack}
|
|
710
|
+
|
|
711
|
+
## Project Status & Configuration
|
|
712
|
+
|
|
713
|
+
**CRITICAL:** Always check `.boss/project-config.json` for project status, initialization stages, and current state. This file is the single source of truth for project state. Use git commands for orchestration (branches, pushes, merges), but use project-config.json for state tracking.
|
|
714
|
+
|
|
715
|
+
See [Initialization Documentation](./docs/initialization.md) for complete details on project config structure and initialization workflow.
|
|
716
|
+
|
|
717
|
+
## Initial Setup Workflow
|
|
718
|
+
|
|
719
|
+
**CRITICAL: AUTOMATIC INITIALIZATION CHECK ON STARTUP**
|
|
720
|
+
|
|
721
|
+
When BOSS starts, you MUST automatically:
|
|
722
|
+
1. Check `.boss/project-config.json` initialization status
|
|
723
|
+
2. If `initialization.stage !== "ready"`, automatically complete initial setup without asking user
|
|
724
|
+
3. **Verify dependencies are installed** - `start-boss.sh` already runs `pnpm install` automatically, so just verify `node_modules` exists (do NOT run install again)
|
|
725
|
+
4. Complete remote repository setup, branch protection, and mark stage as "ready"
|
|
726
|
+
|
|
727
|
+
See [Initialization Documentation](./docs/initialization.md) for complete workflow details.
|
|
728
|
+
|
|
729
|
+
## BOSS Methodology
|
|
730
|
+
|
|
731
|
+
This project uses Spec-Kit for specification-driven development. See [Spec-Kit Documentation](./docs/spec-kit.md) for methodology details and available commands.
|
|
732
|
+
|
|
733
|
+
## Available Workers
|
|
734
|
+
|
|
735
|
+
BOSS has access to **15 specialized workers** that form a fully functional engineering team.
|
|
736
|
+
|
|
737
|
+
**CRITICAL: How to Discover Workers**
|
|
738
|
+
- Workers are **directories** in `.boss/workers/` (not YAML files)
|
|
739
|
+
- List `.boss/workers/` to see available workers: `ls .boss/workers/`
|
|
740
|
+
- Each worker directory contains:
|
|
741
|
+
- `prompt.md` - Worker role and instructions (READ THIS to load worker)
|
|
742
|
+
- `CLAUDE.md` - Execution guidelines
|
|
743
|
+
- `container-config.json` - Container-use environment config
|
|
744
|
+
- **DO NOT** search for `*.yaml` files or `README.md` files
|
|
745
|
+
- **Container-Use config:** Read `.container-use/environment.json` (NOT `config.yaml`)
|
|
746
|
+
|
|
747
|
+
See [Workers Documentation](./docs/workers.md) for complete worker details, spawning guidelines, and execution instructions.
|
|
748
|
+
|
|
749
|
+
## Quality Standards
|
|
750
|
+
|
|
751
|
+
- **Test-First (NON-NEGOTIABLE)** - TDD cycle: red → green → refactor
|
|
752
|
+
- **BDD (Mandatory)** - Behavior-Driven Development with Given/When/Then
|
|
753
|
+
- **Feature Documentation (NON-NEGOTIABLE)** - Every feature must be documented
|
|
754
|
+
- **Coverage:** ≥${qualityInfo.gates.coverage}%
|
|
755
|
+
- **Mutation Testing:** ≥${qualityInfo.gates.mutation}%
|
|
756
|
+
|
|
757
|
+
See [Quality Standards Documentation](./docs/quality-standards.md) for details.
|
|
758
|
+
|
|
759
|
+
## Container-Use MCP Operations
|
|
760
|
+
|
|
761
|
+
**CRITICAL:** All file, code, and shell operations MUST use Container-Use MCP environments.
|
|
762
|
+
|
|
763
|
+
See [Container-Use Documentation](./docs/container-use.md) for:
|
|
764
|
+
- Git hooks enforcement
|
|
765
|
+
- Environment creation and management
|
|
766
|
+
- Efficient file operations (heredoc for large files)
|
|
767
|
+
- Worker spawning and review
|
|
768
|
+
|
|
769
|
+
## GitHub MCP Operations
|
|
770
|
+
|
|
771
|
+
**CRITICAL:**
|
|
772
|
+
- **GitHub MCP is already authenticated and available** - use it directly for GitHub API operations (repositories, PRs, issues, branch protection)
|
|
773
|
+
- Use git commands for local git operations (branches, pushes, merges)
|
|
774
|
+
- **ALWAYS use HTTPS URLs for git remotes:** `https://github.com/<owner>/<repo>.git` (NEVER use SSH `git@github.com` format)
|
|
775
|
+
- **Git authentication:** Git automatically uses `GITHUB_TOKEN` environment variable for HTTPS authentication (set to same value as `GITHUB_PERSONAL_ACCESS_TOKEN` for consistency - both are set from the same 1Password secret)
|
|
776
|
+
|
|
777
|
+
See [GitHub Operations Documentation](./docs/github-operations.md) for:
|
|
778
|
+
- Repository creation and transfer
|
|
779
|
+
- Organization listing and selection
|
|
780
|
+
- Branch protection and PR creation
|
|
781
|
+
- Branch operations
|
|
782
|
+
|
|
783
|
+
## Branch Management & Workflow
|
|
784
|
+
|
|
785
|
+
**MANDATORY WORKFLOW FOR EVERY CHANGE:**
|
|
786
|
+
1. Check project status from `.boss/project-config.json`
|
|
787
|
+
2. Create worker environment using Container-Use MCP
|
|
788
|
+
3. Spawn worker in isolated container
|
|
789
|
+
4. Merge worker changes automatically (using git commands: `git merge <branch-name>`)
|
|
790
|
+
5. Push feature branch automatically (using git commands: `git push origin <branch-name>`)
|
|
791
|
+
6. Create PR automatically (MANDATORY - no exceptions)
|
|
792
|
+
7. **NEVER push to main branch** - husky pre-push hooks block this (enforced for everyone)
|
|
793
|
+
|
|
794
|
+
See [Workflow Documentation](./docs/workflow.md) for complete workflow details and automatic completion rules.
|
|
795
|
+
|
|
796
|
+
## Project Structure
|
|
797
|
+
|
|
798
|
+
- `.boss/` - BOSS orchestration configuration
|
|
799
|
+
- `config.yaml` - BOSS settings
|
|
800
|
+
- `project-config.json` - **CRITICAL: Project status and state (read this, not git)**
|
|
801
|
+
- `workers/` - Container-use worker configs
|
|
802
|
+
- `.specify/` - Spec-Kit structure (templates, scripts, memory, specs)
|
|
803
|
+
- `.container-use/` - Container-use environment configuration
|
|
804
|
+
- `.claude/` - Claude Code/Cursor rules and commands
|
|
805
|
+
|
|
806
|
+
## References
|
|
807
|
+
|
|
808
|
+
- See `.claude/rules/` for detailed coding standards
|
|
809
|
+
- See `.specify/memory/constitution.md` for project constitution
|
|
810
|
+
- See `.boss/config.yaml` for BOSS configuration
|
|
811
|
+
- See `.boss/project-config.json` for **project status and state** (use this for state tracking, use git commands for orchestration)
|
|
812
|
+
- See `./docs/` for detailed documentation on all BOSS operations
|