@glxmart/boss-cli 1.0.0 → 1.2.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/README.md +0 -1
- package/assets/claude-md/docs/conductor.md +139 -0
- package/assets/claude-md/docs/initialization.md +2 -2
- package/assets/claude-md/docs/workers.md +33 -54
- package/assets/claude-md/docs/workflow.md +23 -59
- package/assets/claude-md/template.md +198 -756
- package/assets/git-hooks/commit-msg.sh +4 -8
- package/assets/git-hooks/pre-commit.sh +0 -4
- package/assets/git-hooks/pre-push.sh +21 -0
- package/assets/github-workflows/CODEOWNERS +21 -2
- package/assets/github-workflows/boss-ci.yml +163 -23
- package/assets/github-workflows/boss-gates.yml +100 -13
- package/assets/template-docs/nextjs-app-turbo.md +412 -61
- package/assets/template-loader/gitignore +14 -0
- package/assets/worker-configs/architect/.claude/skills/conductor-orchestration.md +635 -0
- package/assets/worker-configs/architect/.claude/skills/spec-kit-workflow.md +827 -0
- package/assets/worker-configs/architect/CLAUDE.md +99 -38
- package/assets/worker-configs/clarifier/.claude/skills/conductor-orchestration.md +635 -0
- package/assets/worker-configs/clarifier/.claude/skills/spec-kit-workflow.md +827 -0
- package/assets/worker-configs/clarifier/CLAUDE.md +81 -40
- package/assets/worker-configs/code-reviewer/.claude/skills/nextjs-turbo-stack.md +1017 -0
- package/assets/worker-configs/code-reviewer/.claude/skills/spec-kit-workflow.md +827 -0
- package/assets/worker-configs/code-reviewer/.claude/skills/test-first-methodology.md +745 -0
- package/assets/worker-configs/code-reviewer/CLAUDE.md +85 -79
- package/assets/worker-configs/consolidator/.claude/skills/conductor-orchestration.md +635 -0
- package/assets/worker-configs/consolidator/.claude/skills/spec-kit-workflow.md +827 -0
- package/assets/worker-configs/consolidator/CLAUDE.md +94 -88
- package/assets/worker-configs/developer-backend/.claude/skills/nextjs-turbo-stack.md +1017 -0
- package/assets/worker-configs/developer-backend/.claude/skills/spec-kit-workflow.md +827 -0
- package/assets/worker-configs/developer-backend/.claude/skills/test-first-methodology.md +745 -0
- package/assets/worker-configs/developer-backend/CLAUDE.md +156 -56
- package/assets/worker-configs/developer-frontend/.claude/skills/nextjs-turbo-stack.md +1017 -0
- package/assets/worker-configs/developer-frontend/.claude/skills/spec-kit-workflow.md +827 -0
- package/assets/worker-configs/developer-frontend/.claude/skills/test-first-methodology.md +745 -0
- package/assets/worker-configs/developer-frontend/CLAUDE.md +152 -54
- package/assets/worker-configs/developer-fullstack/.claude/skills/nextjs-turbo-stack.md +1017 -0
- package/assets/worker-configs/developer-fullstack/.claude/skills/spec-kit-workflow.md +827 -0
- package/assets/worker-configs/developer-fullstack/.claude/skills/test-first-methodology.md +745 -0
- package/assets/worker-configs/developer-fullstack/CLAUDE.md +155 -57
- package/assets/worker-configs/devops-engineer/.claude/skills/infrastructure-as-code.md +794 -0
- package/assets/worker-configs/devops-engineer/.claude/skills/spec-kit-workflow.md +827 -0
- package/assets/worker-configs/devops-engineer/CLAUDE.md +92 -85
- package/assets/worker-configs/planner/.claude/skills/conductor-orchestration.md +635 -0
- package/assets/worker-configs/planner/.claude/skills/spec-kit-workflow.md +827 -0
- package/assets/worker-configs/planner/CLAUDE.md +143 -46
- package/assets/worker-configs/product-owner/CLAUDE.md +72 -82
- package/assets/worker-configs/reviewer/.claude/skills/conductor-orchestration.md +635 -0
- package/assets/worker-configs/reviewer/.claude/skills/spec-kit-workflow.md +827 -0
- package/assets/worker-configs/reviewer/CLAUDE.md +108 -50
- package/assets/worker-configs/security-engineer/.claude/skills/spec-kit-workflow.md +827 -0
- package/assets/worker-configs/security-engineer/CLAUDE.md +83 -83
- package/assets/worker-configs/spec-writer/.claude/skills/conductor-orchestration.md +635 -0
- package/assets/worker-configs/spec-writer/.claude/skills/spec-kit-workflow.md +827 -0
- package/assets/worker-configs/spec-writer/CLAUDE.md +107 -48
- package/assets/worker-configs/technical-writer/.claude/skills/nextjs-turbo-stack.md +1017 -0
- package/assets/worker-configs/technical-writer/.claude/skills/spec-kit-workflow.md +827 -0
- package/assets/worker-configs/technical-writer/CLAUDE.md +91 -81
- package/assets/worker-configs/tester/.claude/skills/nextjs-turbo-stack.md +1017 -0
- package/assets/worker-configs/tester/.claude/skills/spec-kit-workflow.md +827 -0
- package/assets/worker-configs/tester/.claude/skills/test-first-methodology.md +745 -0
- package/assets/worker-configs/tester/CLAUDE.md +141 -52
- package/dist/assets/claude-md/docs/conductor.md +139 -0
- package/dist/assets/claude-md/docs/initialization.md +2 -2
- package/dist/assets/claude-md/docs/workers.md +33 -54
- package/dist/assets/claude-md/docs/workflow.md +23 -59
- package/dist/assets/claude-md/template.md +198 -756
- package/dist/assets/git-hooks/commit-msg.sh +4 -8
- package/dist/assets/git-hooks/pre-commit.sh +0 -4
- package/dist/assets/git-hooks/pre-push.sh +21 -0
- package/dist/assets/github-workflows/CODEOWNERS +21 -2
- package/dist/assets/github-workflows/boss-ci.yml +163 -23
- package/dist/assets/github-workflows/boss-gates.yml +100 -13
- package/dist/assets/template-docs/nextjs-app-turbo.md +412 -61
- package/dist/assets/template-loader/gitignore +14 -0
- package/dist/assets/worker-configs/architect/.claude/skills/conductor-orchestration.md +635 -0
- package/dist/assets/worker-configs/architect/.claude/skills/spec-kit-workflow.md +827 -0
- package/dist/assets/worker-configs/architect/CLAUDE.md +99 -38
- package/dist/assets/worker-configs/clarifier/.claude/skills/conductor-orchestration.md +635 -0
- package/dist/assets/worker-configs/clarifier/.claude/skills/spec-kit-workflow.md +827 -0
- package/dist/assets/worker-configs/clarifier/CLAUDE.md +81 -40
- package/dist/assets/worker-configs/code-reviewer/.claude/skills/nextjs-turbo-stack.md +1017 -0
- package/dist/assets/worker-configs/code-reviewer/.claude/skills/spec-kit-workflow.md +827 -0
- package/dist/assets/worker-configs/code-reviewer/.claude/skills/test-first-methodology.md +745 -0
- package/dist/assets/worker-configs/code-reviewer/CLAUDE.md +85 -79
- package/dist/assets/worker-configs/consolidator/.claude/skills/conductor-orchestration.md +635 -0
- package/dist/assets/worker-configs/consolidator/.claude/skills/spec-kit-workflow.md +827 -0
- package/dist/assets/worker-configs/consolidator/CLAUDE.md +94 -88
- package/dist/assets/worker-configs/developer-backend/.claude/skills/nextjs-turbo-stack.md +1017 -0
- package/dist/assets/worker-configs/developer-backend/.claude/skills/spec-kit-workflow.md +827 -0
- package/dist/assets/worker-configs/developer-backend/.claude/skills/test-first-methodology.md +745 -0
- package/dist/assets/worker-configs/developer-backend/CLAUDE.md +156 -56
- package/dist/assets/worker-configs/developer-frontend/.claude/skills/nextjs-turbo-stack.md +1017 -0
- package/dist/assets/worker-configs/developer-frontend/.claude/skills/spec-kit-workflow.md +827 -0
- package/dist/assets/worker-configs/developer-frontend/.claude/skills/test-first-methodology.md +745 -0
- package/dist/assets/worker-configs/developer-frontend/CLAUDE.md +152 -54
- package/dist/assets/worker-configs/developer-fullstack/.claude/skills/nextjs-turbo-stack.md +1017 -0
- package/dist/assets/worker-configs/developer-fullstack/.claude/skills/spec-kit-workflow.md +827 -0
- package/dist/assets/worker-configs/developer-fullstack/.claude/skills/test-first-methodology.md +745 -0
- package/dist/assets/worker-configs/developer-fullstack/CLAUDE.md +155 -57
- package/dist/assets/worker-configs/devops-engineer/.claude/skills/infrastructure-as-code.md +794 -0
- package/dist/assets/worker-configs/devops-engineer/.claude/skills/spec-kit-workflow.md +827 -0
- package/dist/assets/worker-configs/devops-engineer/CLAUDE.md +92 -85
- package/dist/assets/worker-configs/planner/.claude/skills/conductor-orchestration.md +635 -0
- package/dist/assets/worker-configs/planner/.claude/skills/spec-kit-workflow.md +827 -0
- package/dist/assets/worker-configs/planner/CLAUDE.md +143 -46
- package/dist/assets/worker-configs/product-owner/CLAUDE.md +72 -82
- package/dist/assets/worker-configs/reviewer/.claude/skills/conductor-orchestration.md +635 -0
- package/dist/assets/worker-configs/reviewer/.claude/skills/spec-kit-workflow.md +827 -0
- package/dist/assets/worker-configs/reviewer/CLAUDE.md +108 -50
- package/dist/assets/worker-configs/security-engineer/.claude/skills/spec-kit-workflow.md +827 -0
- package/dist/assets/worker-configs/security-engineer/CLAUDE.md +83 -83
- package/dist/assets/worker-configs/spec-writer/.claude/skills/conductor-orchestration.md +635 -0
- package/dist/assets/worker-configs/spec-writer/.claude/skills/spec-kit-workflow.md +827 -0
- package/dist/assets/worker-configs/spec-writer/CLAUDE.md +107 -48
- package/dist/assets/worker-configs/technical-writer/.claude/skills/nextjs-turbo-stack.md +1017 -0
- package/dist/assets/worker-configs/technical-writer/.claude/skills/spec-kit-workflow.md +827 -0
- package/dist/assets/worker-configs/technical-writer/CLAUDE.md +91 -81
- package/dist/assets/worker-configs/tester/.claude/skills/nextjs-turbo-stack.md +1017 -0
- package/dist/assets/worker-configs/tester/.claude/skills/spec-kit-workflow.md +827 -0
- package/dist/assets/worker-configs/tester/.claude/skills/test-first-methodology.md +745 -0
- package/dist/assets/worker-configs/tester/CLAUDE.md +141 -52
- package/dist/commands/__tests__/bootstrap.test.js +51 -51
- package/dist/commands/__tests__/bootstrap.test.js.map +1 -1
- package/dist/commands/bootstrap.d.ts.map +1 -1
- package/dist/commands/bootstrap.js +23 -20
- package/dist/commands/bootstrap.js.map +1 -1
- package/dist/commands/doctor.js +33 -9
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/templates.d.ts +1 -1
- package/dist/commands/templates.d.ts.map +1 -1
- package/dist/commands/templates.js +1 -1
- package/dist/commands/templates.js.map +1 -1
- package/dist/constants.d.ts +2 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/generators/__tests__/boss-config.test.js +4 -4
- package/dist/generators/__tests__/boss-config.test.js.map +1 -1
- package/dist/generators/__tests__/claude-folder.test.js +8 -8
- package/dist/generators/__tests__/claude-folder.test.js.map +1 -1
- package/dist/generators/__tests__/claude-md.test.js +25 -16
- package/dist/generators/__tests__/claude-md.test.js.map +1 -1
- package/dist/generators/__tests__/container-use-config.test.js +2 -2
- package/dist/generators/__tests__/container-use-config.test.js.map +1 -1
- package/dist/generators/__tests__/git-hooks.test.js.map +1 -1
- package/dist/generators/__tests__/github-workflows.test.js +10 -6
- package/dist/generators/__tests__/github-workflows.test.js.map +1 -1
- package/dist/generators/__tests__/mcp-config.test.js +6 -6
- package/dist/generators/__tests__/project-structure.test.js +2 -2
- package/dist/generators/__tests__/quality-gates.test.js +11 -3
- package/dist/generators/__tests__/quality-gates.test.js.map +1 -1
- package/dist/generators/__tests__/specify-structure.test.js +1 -1
- package/dist/generators/__tests__/specify-structure.test.js.map +1 -1
- package/dist/generators/__tests__/template-docs.test.js +1 -1
- package/dist/generators/__tests__/template-docs.test.js.map +1 -1
- package/dist/generators/__tests__/template-loader.test.js +209 -59
- package/dist/generators/__tests__/template-loader.test.js.map +1 -1
- package/dist/generators/__tests__/worker-configs.test.js +7 -7
- package/dist/generators/boss-config.d.ts.map +1 -1
- package/dist/generators/boss-config.js +46 -51
- package/dist/generators/boss-config.js.map +1 -1
- package/dist/generators/claude-folder.d.ts +1 -1
- package/dist/generators/claude-folder.d.ts.map +1 -1
- package/dist/generators/claude-folder.js +5 -5
- package/dist/generators/claude-folder.js.map +1 -1
- package/dist/generators/claude-md.d.ts.map +1 -1
- package/dist/generators/claude-md.js +83 -42
- package/dist/generators/claude-md.js.map +1 -1
- package/dist/generators/container-use-config.d.ts.map +1 -1
- package/dist/generators/container-use-config.js +5 -7
- package/dist/generators/container-use-config.js.map +1 -1
- package/dist/generators/docker-compose.d.ts.map +1 -1
- package/dist/generators/docker-compose.js.map +1 -1
- package/dist/generators/git-hooks.d.ts.map +1 -1
- package/dist/generators/git-hooks.js +2 -2
- package/dist/generators/git-hooks.js.map +1 -1
- package/dist/generators/github-workflows.js +3 -3
- package/dist/generators/github-workflows.js.map +1 -1
- package/dist/generators/mcp-config.d.ts.map +1 -1
- package/dist/generators/mcp-config.js +18 -16
- package/dist/generators/mcp-config.js.map +1 -1
- package/dist/generators/project-structure.d.ts +1 -1
- package/dist/generators/project-structure.d.ts.map +1 -1
- package/dist/generators/project-structure.js +2 -2
- package/dist/generators/project-structure.js.map +1 -1
- package/dist/generators/quality-gates.d.ts.map +1 -1
- package/dist/generators/quality-gates.js +13 -5
- package/dist/generators/quality-gates.js.map +1 -1
- package/dist/generators/specify-structure.d.ts.map +1 -1
- package/dist/generators/specify-structure.js +1 -2
- package/dist/generators/specify-structure.js.map +1 -1
- package/dist/generators/template-docs.js +2 -2
- package/dist/generators/template-docs.js.map +1 -1
- package/dist/generators/template-loader.d.ts.map +1 -1
- package/dist/generators/template-loader.js +259 -143
- package/dist/generators/template-loader.js.map +1 -1
- package/dist/generators/worker-configs.d.ts.map +1 -1
- package/dist/generators/worker-configs.js +7 -5
- package/dist/generators/worker-configs.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/presets/__tests__/quality-presets.test.js +9 -5
- package/dist/presets/__tests__/quality-presets.test.js.map +1 -1
- package/dist/presets/quality-presets.d.ts.map +1 -1
- package/dist/presets/quality-presets.js +11 -11
- package/dist/presets/quality-presets.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/internal.d.ts +69 -0
- package/dist/types/internal.d.ts.map +1 -0
- package/dist/types/internal.js +4 -0
- package/dist/types/internal.js.map +1 -0
- package/dist/utils/__tests__/file-system.test.js +1 -1
- package/dist/utils/__tests__/file-system.test.js.map +1 -1
- package/dist/utils/__tests__/git.test.js.map +1 -1
- package/dist/utils/__tests__/template-loader.test.js.map +1 -1
- package/dist/utils/__tests__/validators.test.js +1 -1
- package/dist/utils/__tests__/validators.test.js.map +1 -1
- package/dist/utils/file-system.d.ts.map +1 -1
- package/dist/utils/file-system.js +1 -4
- package/dist/utils/file-system.js.map +1 -1
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js +17 -11
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/prompts.d.ts.map +1 -1
- package/dist/utils/prompts.js +51 -39
- package/dist/utils/prompts.js.map +1 -1
- package/dist/utils/template-loader.d.ts +2 -1
- package/dist/utils/template-loader.d.ts.map +1 -1
- package/dist/utils/template-loader.js +11 -5
- package/dist/utils/template-loader.js.map +1 -1
- package/dist/utils/validators.d.ts.map +1 -1
- package/dist/utils/validators.js +16 -4
- package/dist/utils/validators.js.map +1 -1
- package/package.json +2 -2
- package/templates/nextjs-turbo-monorepo/base/README.md +167 -0
- package/templates/nextjs-turbo-monorepo/base/_gitignore +71 -0
- package/templates/nextjs-turbo-monorepo/base/_npmrc +12 -0
- package/templates/nextjs-turbo-monorepo/base/apps/admin/app/layout.tsx +19 -0
- package/templates/nextjs-turbo-monorepo/base/apps/admin/app/page.tsx +34 -0
- package/templates/nextjs-turbo-monorepo/base/apps/admin/next.config.ts +20 -0
- package/templates/nextjs-turbo-monorepo/base/apps/admin/package.json +42 -0
- package/templates/nextjs-turbo-monorepo/base/apps/admin/tsconfig.json +16 -0
- package/templates/nextjs-turbo-monorepo/base/apps/web/app/globals.css +59 -0
- package/templates/nextjs-turbo-monorepo/base/apps/web/app/layout.tsx +20 -0
- package/templates/nextjs-turbo-monorepo/base/apps/web/app/page.tsx +17 -0
- package/templates/nextjs-turbo-monorepo/base/apps/web/components.json +18 -0
- package/templates/nextjs-turbo-monorepo/base/apps/web/env.ts +45 -0
- package/templates/nextjs-turbo-monorepo/base/apps/web/next.config.ts +38 -0
- package/templates/nextjs-turbo-monorepo/base/apps/web/package.json +45 -0
- package/templates/nextjs-turbo-monorepo/base/apps/web/tsconfig.json +19 -0
- package/templates/nextjs-turbo-monorepo/base/apps/web/vitest.config.ts +28 -0
- package/templates/nextjs-turbo-monorepo/base/docker/Dockerfile.admin +76 -0
- package/templates/nextjs-turbo-monorepo/base/docker/Dockerfile.web +76 -0
- package/templates/nextjs-turbo-monorepo/base/docker/_dockerignore +48 -0
- package/templates/nextjs-turbo-monorepo/base/docker/docker-compose.yml +39 -0
- package/templates/nextjs-turbo-monorepo/base/package.json +62 -0
- package/templates/nextjs-turbo-monorepo/base/packages/auth/package.json +26 -0
- package/templates/nextjs-turbo-monorepo/base/packages/auth/src/config.ts +88 -0
- package/templates/nextjs-turbo-monorepo/base/packages/auth/src/index.ts +11 -0
- package/templates/nextjs-turbo-monorepo/base/packages/auth/src/types.ts +28 -0
- package/templates/nextjs-turbo-monorepo/base/packages/auth/tsconfig.json +9 -0
- package/templates/nextjs-turbo-monorepo/base/packages/config/eslint/library.js +35 -0
- package/templates/nextjs-turbo-monorepo/base/packages/config/eslint/nextjs.js +51 -0
- package/templates/nextjs-turbo-monorepo/base/packages/config/eslint/react-library.js +45 -0
- package/templates/nextjs-turbo-monorepo/base/packages/config/package.json +19 -0
- package/templates/nextjs-turbo-monorepo/base/packages/config/tailwind/base.ts +50 -0
- package/templates/nextjs-turbo-monorepo/base/packages/config/typescript/base.json +23 -0
- package/templates/nextjs-turbo-monorepo/base/packages/config/typescript/nextjs.json +17 -0
- package/templates/nextjs-turbo-monorepo/base/packages/config/typescript/react-library.json +11 -0
- package/templates/nextjs-turbo-monorepo/base/packages/database/package.json +32 -0
- package/templates/nextjs-turbo-monorepo/base/packages/database/prisma/schema.prisma +84 -0
- package/templates/nextjs-turbo-monorepo/base/packages/database/src/client.ts +16 -0
- package/templates/nextjs-turbo-monorepo/base/packages/database/src/index.ts +2 -0
- package/templates/nextjs-turbo-monorepo/base/packages/database/tsconfig.json +9 -0
- package/templates/nextjs-turbo-monorepo/base/packages/trpc/package.json +32 -0
- package/templates/nextjs-turbo-monorepo/base/packages/trpc/src/context.ts +17 -0
- package/templates/nextjs-turbo-monorepo/base/packages/trpc/src/index.ts +3 -0
- package/templates/nextjs-turbo-monorepo/base/packages/trpc/src/init.ts +34 -0
- package/templates/nextjs-turbo-monorepo/base/packages/trpc/src/routers/_app.ts +8 -0
- package/templates/nextjs-turbo-monorepo/base/packages/trpc/src/routers/user.ts +36 -0
- package/templates/nextjs-turbo-monorepo/base/packages/trpc/tsconfig.json +9 -0
- package/templates/nextjs-turbo-monorepo/base/packages/ui/.storybook/main.ts +19 -0
- package/templates/nextjs-turbo-monorepo/base/packages/ui/.storybook/preview.ts +15 -0
- package/templates/nextjs-turbo-monorepo/base/packages/ui/components.json +17 -0
- package/templates/nextjs-turbo-monorepo/base/packages/ui/package.json +62 -0
- package/templates/nextjs-turbo-monorepo/base/packages/ui/postcss.config.js +6 -0
- package/templates/nextjs-turbo-monorepo/base/packages/ui/src/components/index.ts +2 -0
- package/templates/nextjs-turbo-monorepo/base/packages/ui/src/components/ui/button.tsx +57 -0
- package/templates/nextjs-turbo-monorepo/base/packages/ui/src/components/ui/card.tsx +76 -0
- package/templates/nextjs-turbo-monorepo/base/packages/ui/src/hooks/index.ts +2 -0
- package/templates/nextjs-turbo-monorepo/base/packages/ui/src/lib/utils.ts +6 -0
- package/templates/nextjs-turbo-monorepo/base/packages/ui/src/styles/globals.css +59 -0
- package/templates/nextjs-turbo-monorepo/base/packages/ui/tailwind.config.ts +15 -0
- package/templates/nextjs-turbo-monorepo/base/packages/ui/tsconfig.json +12 -0
- package/templates/nextjs-turbo-monorepo/base/packages/ui/vitest.config.ts +28 -0
- package/templates/nextjs-turbo-monorepo/base/packages/utils/package.json +24 -0
- package/templates/nextjs-turbo-monorepo/base/packages/utils/src/date.ts +117 -0
- package/templates/nextjs-turbo-monorepo/base/packages/utils/src/index.ts +2 -0
- package/templates/nextjs-turbo-monorepo/base/packages/utils/src/string.ts +59 -0
- package/templates/nextjs-turbo-monorepo/base/packages/utils/tsconfig.json +9 -0
- package/templates/nextjs-turbo-monorepo/base/packages/utils/vitest.config.ts +13 -0
- package/templates/nextjs-turbo-monorepo/base/pnpm-workspace.yaml +3 -0
- package/templates/nextjs-turbo-monorepo/base/tsconfig.json +19 -0
- package/templates/nextjs-turbo-monorepo/base/turbo.json +47 -0
- package/templates/nextjs-turbo-monorepo/extras/boss-cli/assets/claude-md/template.md +0 -0
- package/templates/nextjs-turbo-monorepo/extras/boss-cli/assets/github-workflows/CODEOWNERS +0 -0
- package/templates/nextjs-turbo-monorepo/extras/boss-cli/assets/github-workflows/boss-ci.yml +139 -0
- package/templates/nextjs-turbo-monorepo/extras/boss-cli/assets/github-workflows/boss-gates.yml +116 -0
- package/templates/nextjs-turbo-monorepo/extras/config/kamal/_env +18 -0
- package/templates/nextjs-turbo-monorepo/extras/config/kamal/deploy.yml +92 -0
- package/templates/nextjs-turbo-monorepo/extras/scripts/deploy.sh +38 -0
- package/templates/nextjs-turbo-monorepo/extras/scripts/setup-db.sh +29 -0
- package/assets/claude-md/docs/container-use.md +0 -140
- package/dist/assets/claude-md/docs/container-use.md +0 -140
|
@@ -0,0 +1,827 @@
|
|
|
1
|
+
# Spec-Kit Workflow
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
Create, modify, and use Spec-Kit commands for executable specifications and structured development workflows. Use when working with constitution, requirements, specifications, planning, implementation, analysis, or validation phases.
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
Spec-Kit is GitHub's executable specification framework integrated into BOSS workflows. Each worker uses specific Spec-Kit commands based on their `primaryCommand` field in metadata.json.
|
|
10
|
+
|
|
11
|
+
**Available Commands**:
|
|
12
|
+
- `/speckit.constitution` - Create NON-NEGOTIABLE governance principles (architect)
|
|
13
|
+
- `/speckit.clarify` - Gather and clarify requirements (clarifier, product-owner)
|
|
14
|
+
- `/speckit.specify` - Write BDD user stories and acceptance criteria (spec-writer, product-owner)
|
|
15
|
+
- `/speckit.plan` - Design technical architecture (planner)
|
|
16
|
+
- `/speckit.tasks` - Break down into actionable tasks (planner)
|
|
17
|
+
- `/speckit.implement` - TDD implementation (developer-*)
|
|
18
|
+
- `/speckit.analyze` - Analyze and review (reviewer, code-reviewer, devops-engineer)
|
|
19
|
+
- `/speckit.checklist` - Validation and verification (tester, security-engineer, technical-writer)
|
|
20
|
+
|
|
21
|
+
## Core Concepts
|
|
22
|
+
|
|
23
|
+
### Executable Specifications
|
|
24
|
+
|
|
25
|
+
Spec-Kit artifacts are NOT just documentation - they're executable:
|
|
26
|
+
- **constitution.md** - Enforced by automated gates and reviewers
|
|
27
|
+
- **spec.md** - Converted directly to test scenarios
|
|
28
|
+
- **tasks.md** - Drives parallel worker execution
|
|
29
|
+
- **plan.md** - Guides architectural decisions
|
|
30
|
+
|
|
31
|
+
### Artifact Hierarchy
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
.specify/
|
|
35
|
+
├── memory/
|
|
36
|
+
│ └── constitution.md # PHASE 1: Architect (NON-NEGOTIABLE)
|
|
37
|
+
├── specs/
|
|
38
|
+
│ ├── 000-requirements/
|
|
39
|
+
│ │ ├── clarification.md # PHASE 2: Clarifier (max 5 Q&A)
|
|
40
|
+
│ │ └── spec.md # PHASE 3: Spec Writer (BDD stories)
|
|
41
|
+
│ └── {feature-name}/
|
|
42
|
+
│ ├── plan.md # PHASE 4: Planner (architecture)
|
|
43
|
+
│ ├── data-model.md # PHASE 4: Planner (database schema)
|
|
44
|
+
│ ├── tasks.md # PHASE 6: Planner (task breakdown)
|
|
45
|
+
│ ├── contracts/ # PHASE 6: Planner (API contracts)
|
|
46
|
+
│ ├── research.md # PHASE 6: Planner (unknowns)
|
|
47
|
+
│ ├── quickstart.md # PHASE 6: Planner (setup guide)
|
|
48
|
+
│ └── checklists/
|
|
49
|
+
│ ├── validation.md # PHASE 5: Reviewer
|
|
50
|
+
│ ├── security.md # Security Engineer
|
|
51
|
+
│ └── checklist.md # PHASE 10: Consolidator
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Sequential Dependencies
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
constitution.md (architect)
|
|
58
|
+
↓
|
|
59
|
+
clarification.md (clarifier)
|
|
60
|
+
↓
|
|
61
|
+
spec.md (spec-writer)
|
|
62
|
+
↓
|
|
63
|
+
plan.md (planner)
|
|
64
|
+
↓
|
|
65
|
+
validation.md (reviewer) ← Reviews plan against constitution
|
|
66
|
+
↓
|
|
67
|
+
tasks.md (planner) ← Only after plan approved
|
|
68
|
+
↓
|
|
69
|
+
[PARALLEL] implementation (developer-*) + security.md + infrastructure
|
|
70
|
+
↓
|
|
71
|
+
review (code-reviewer)
|
|
72
|
+
↓
|
|
73
|
+
checklist.md (consolidator)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Spec-Kit Commands by Worker
|
|
77
|
+
|
|
78
|
+
### /speckit.constitution (Architect - Phase 1)
|
|
79
|
+
|
|
80
|
+
**Purpose**: Establish NON-NEGOTIABLE governing principles.
|
|
81
|
+
|
|
82
|
+
**Output**: `.specify/memory/constitution.md`
|
|
83
|
+
|
|
84
|
+
**Key Sections**:
|
|
85
|
+
```markdown
|
|
86
|
+
# Project Constitution
|
|
87
|
+
|
|
88
|
+
## NON-NEGOTIABLE Principles
|
|
89
|
+
|
|
90
|
+
1. **Test-Driven Development (TDD)**
|
|
91
|
+
- MUST: Write tests before implementation
|
|
92
|
+
- MUST: Achieve minimum 80% coverage
|
|
93
|
+
- MUST: Achieve minimum 80% mutation score
|
|
94
|
+
|
|
95
|
+
2. **Behavior-Driven Development (BDD)**
|
|
96
|
+
- MUST: All user stories in Given/When/Then format
|
|
97
|
+
- MUST: Scenarios directly convertible to tests
|
|
98
|
+
|
|
99
|
+
3. **Documentation Standards**
|
|
100
|
+
- MUST: All APIs documented with tested examples
|
|
101
|
+
- MUST: Component props documented with usage examples
|
|
102
|
+
|
|
103
|
+
## Measurable Quality Gates
|
|
104
|
+
|
|
105
|
+
- Test Coverage: ≥80%
|
|
106
|
+
- Mutation Score: ≥80%
|
|
107
|
+
- Build Time: <5 minutes
|
|
108
|
+
- Linter Errors: 0
|
|
109
|
+
|
|
110
|
+
## Architectural Decisions
|
|
111
|
+
|
|
112
|
+
- API-First Design: All services expose well-defined APIs
|
|
113
|
+
- Monorepo Structure: Turborepo with shared packages
|
|
114
|
+
- Type Safety: TypeScript strict mode mandatory
|
|
115
|
+
|
|
116
|
+
## Security Requirements
|
|
117
|
+
|
|
118
|
+
- OWASP Top 10 compliance mandatory
|
|
119
|
+
- All secrets via environment variables
|
|
120
|
+
- No hardcoded credentials ever
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Usage**:
|
|
124
|
+
```bash
|
|
125
|
+
# Read existing constitution
|
|
126
|
+
cat .specify/memory/constitution.md
|
|
127
|
+
|
|
128
|
+
# Verify principle compliance
|
|
129
|
+
grep "NON-NEGOTIABLE" .specify/memory/constitution.md
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**Best Practices**:
|
|
133
|
+
- Principles MUST be measurable and enforceable
|
|
134
|
+
- Use "MUST", "SHOULD", "MAY" keywords clearly
|
|
135
|
+
- Include quality gates with numeric thresholds
|
|
136
|
+
- Document architectural decisions with rationale
|
|
137
|
+
|
|
138
|
+
### /speckit.clarify (Clarifier - Phase 2)
|
|
139
|
+
|
|
140
|
+
**Purpose**: Identify ambiguities and gather clarifications.
|
|
141
|
+
|
|
142
|
+
**Output**: `.specify/specs/000-requirements/clarification.md`
|
|
143
|
+
|
|
144
|
+
**Key Sections**:
|
|
145
|
+
```markdown
|
|
146
|
+
# Requirements Clarification
|
|
147
|
+
|
|
148
|
+
## Questions & Answers
|
|
149
|
+
|
|
150
|
+
### Q1: User Authentication Method
|
|
151
|
+
**Question**: Which authentication method should we use - session-based or JWT?
|
|
152
|
+
**Answer**: JWT with refresh tokens for scalability
|
|
153
|
+
**Impact**: High - affects session management architecture
|
|
154
|
+
**Decision**: Use NextAuth v5 with JWT strategy
|
|
155
|
+
|
|
156
|
+
### Q2: Password Reset Flow
|
|
157
|
+
**Question**: Should password reset be via email or SMS?
|
|
158
|
+
**Answer**: Email only for MVP
|
|
159
|
+
**Impact**: Medium - affects user model and notification service
|
|
160
|
+
**Decision**: Implement email-based reset with token expiry
|
|
161
|
+
|
|
162
|
+
(Maximum 5 questions total)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Usage**:
|
|
166
|
+
```bash
|
|
167
|
+
# Read clarifications
|
|
168
|
+
cat .specify/specs/000-requirements/clarification.md
|
|
169
|
+
|
|
170
|
+
# Count questions (should be ≤5)
|
|
171
|
+
grep "^### Q" .specify/specs/000-requirements/clarification.md | wc -l
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Best Practices**:
|
|
175
|
+
- Maximum 5 questions (high-impact ambiguities only)
|
|
176
|
+
- Each Q&A must include: question, answer, impact, decision
|
|
177
|
+
- Prioritize architectural and critical functional ambiguities
|
|
178
|
+
- Answers should be actionable (not "it depends")
|
|
179
|
+
|
|
180
|
+
### /speckit.specify (Spec Writer - Phase 3)
|
|
181
|
+
|
|
182
|
+
**Purpose**: Create BDD user stories with acceptance criteria.
|
|
183
|
+
|
|
184
|
+
**Output**: `.specify/specs/000-requirements/spec.md`
|
|
185
|
+
|
|
186
|
+
**Key Sections**:
|
|
187
|
+
```markdown
|
|
188
|
+
# Feature Specification: User Authentication
|
|
189
|
+
|
|
190
|
+
## User Stories
|
|
191
|
+
|
|
192
|
+
### Story 1: User Registration
|
|
193
|
+
|
|
194
|
+
**As a** new user
|
|
195
|
+
**I want to** register with email and password
|
|
196
|
+
**So that** I can access the application
|
|
197
|
+
|
|
198
|
+
**Acceptance Criteria**:
|
|
199
|
+
|
|
200
|
+
**Scenario 1.1: Successful Registration**
|
|
201
|
+
- **Given** I am on the registration page
|
|
202
|
+
- **When** I enter valid email "user@example.com"
|
|
203
|
+
- **And** I enter a strong password (≥8 chars, mixed case, numbers)
|
|
204
|
+
- **And** I click "Register"
|
|
205
|
+
- **Then** I should see "Registration successful" message
|
|
206
|
+
- **And** I should receive a verification email
|
|
207
|
+
- **And** I should be redirected to email verification page
|
|
208
|
+
|
|
209
|
+
**Scenario 1.2: Invalid Email**
|
|
210
|
+
- **Given** I am on the registration page
|
|
211
|
+
- **When** I enter invalid email "notanemail"
|
|
212
|
+
- **And** I click "Register"
|
|
213
|
+
- **Then** I should see "Invalid email format" error
|
|
214
|
+
- **And** registration should not proceed
|
|
215
|
+
|
|
216
|
+
(More scenarios for edge cases...)
|
|
217
|
+
|
|
218
|
+
### Story 2: User Login
|
|
219
|
+
(Similar structure...)
|
|
220
|
+
|
|
221
|
+
## Non-Functional Requirements
|
|
222
|
+
|
|
223
|
+
- Performance: Login must complete in <2 seconds
|
|
224
|
+
- Security: Passwords hashed with bcrypt (cost factor 12)
|
|
225
|
+
- Availability: 99.9% uptime for authentication service
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**Usage**:
|
|
229
|
+
```bash
|
|
230
|
+
# Read spec
|
|
231
|
+
cat .specify/specs/000-requirements/spec.md
|
|
232
|
+
|
|
233
|
+
# Count user stories
|
|
234
|
+
grep "^### Story" .specify/specs/000-requirements/spec.md | wc -l
|
|
235
|
+
|
|
236
|
+
# Extract scenarios
|
|
237
|
+
grep -A 5 "^**Scenario" .specify/specs/000-requirements/spec.md
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**Best Practices**:
|
|
241
|
+
- Every user story: As a/I want to/So that format
|
|
242
|
+
- All scenarios: Given/When/Then format
|
|
243
|
+
- Scenarios must be testable (directly convertible to code)
|
|
244
|
+
- Include both happy path and edge cases
|
|
245
|
+
- Add non-functional requirements (performance, security, etc.)
|
|
246
|
+
|
|
247
|
+
### /speckit.plan (Planner - Phase 4)
|
|
248
|
+
|
|
249
|
+
**Purpose**: Design technical architecture and approach.
|
|
250
|
+
|
|
251
|
+
**Output**: `.specify/specs/{feature}/plan.md`
|
|
252
|
+
|
|
253
|
+
**Key Sections**:
|
|
254
|
+
```markdown
|
|
255
|
+
# Technical Plan: User Authentication
|
|
256
|
+
|
|
257
|
+
## Architecture Overview
|
|
258
|
+
|
|
259
|
+
```
|
|
260
|
+
┌─────────────────┐
|
|
261
|
+
│ Next.js App │
|
|
262
|
+
│ (Frontend) │
|
|
263
|
+
└────────┬────────┘
|
|
264
|
+
│ tRPC
|
|
265
|
+
┌────────▼────────┐
|
|
266
|
+
│ Auth Router │
|
|
267
|
+
│ (tRPC) │
|
|
268
|
+
└────────┬────────┘
|
|
269
|
+
│
|
|
270
|
+
┌────────▼────────┐
|
|
271
|
+
│ NextAuth │
|
|
272
|
+
│ (v5 Beta) │
|
|
273
|
+
└────────┬────────┘
|
|
274
|
+
│
|
|
275
|
+
┌────────▼────────┐
|
|
276
|
+
│ Prisma │
|
|
277
|
+
│ (PostgreSQL) │
|
|
278
|
+
└─────────────────┘
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
## Components
|
|
282
|
+
|
|
283
|
+
### 1. Authentication Router (tRPC)
|
|
284
|
+
- **Location**: `src/server/api/routers/auth.ts`
|
|
285
|
+
- **Responsibilities**: Register, login, logout, session management
|
|
286
|
+
- **Dependencies**: NextAuth, Prisma
|
|
287
|
+
|
|
288
|
+
### 2. NextAuth Configuration
|
|
289
|
+
- **Location**: `src/auth.ts`
|
|
290
|
+
- **Strategy**: JWT with refresh tokens
|
|
291
|
+
- **Session**: Server-side with database persistence
|
|
292
|
+
- **Providers**: Credentials (email/password)
|
|
293
|
+
|
|
294
|
+
## Data Model
|
|
295
|
+
|
|
296
|
+
See: `data-model.md`
|
|
297
|
+
|
|
298
|
+
## API Contracts
|
|
299
|
+
|
|
300
|
+
See: `contracts/auth-api.yaml`
|
|
301
|
+
|
|
302
|
+
## Security Considerations
|
|
303
|
+
|
|
304
|
+
- Passwords: bcrypt with cost factor 12
|
|
305
|
+
- JWT: 15-minute access tokens, 7-day refresh tokens
|
|
306
|
+
- CSRF: Double-submit cookie pattern
|
|
307
|
+
- Rate limiting: 5 login attempts per 15 minutes per IP
|
|
308
|
+
|
|
309
|
+
## Implementation Phases
|
|
310
|
+
|
|
311
|
+
1. Database schema and migrations (developer-backend)
|
|
312
|
+
2. NextAuth configuration (developer-backend)
|
|
313
|
+
3. tRPC authentication router (developer-backend)
|
|
314
|
+
4. Login/Register UI components (developer-frontend)
|
|
315
|
+
5. Integration testing (tester)
|
|
316
|
+
|
|
317
|
+
## Risk Assessment
|
|
318
|
+
|
|
319
|
+
**High Risk**:
|
|
320
|
+
- NextAuth v5 is beta - may have breaking changes
|
|
321
|
+
- Mitigation: Pin exact version, monitor changelog
|
|
322
|
+
|
|
323
|
+
**Medium Risk**:
|
|
324
|
+
- Password reset email delivery
|
|
325
|
+
- Mitigation: Use transactional email service (Resend)
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
**Usage**:
|
|
329
|
+
```bash
|
|
330
|
+
# Read plan
|
|
331
|
+
cat .specify/specs/user-authentication/plan.md
|
|
332
|
+
|
|
333
|
+
# Check for architecture diagram
|
|
334
|
+
grep -A 10 "```" .specify/specs/user-authentication/plan.md
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
**Best Practices**:
|
|
338
|
+
- Include architecture diagrams (ASCII art acceptable)
|
|
339
|
+
- Break down into clear components with responsibilities
|
|
340
|
+
- Reference related docs (data-model.md, contracts/)
|
|
341
|
+
- Identify risks and mitigations
|
|
342
|
+
- Define implementation phases
|
|
343
|
+
|
|
344
|
+
### /speckit.tasks (Planner - Phase 6)
|
|
345
|
+
|
|
346
|
+
**Purpose**: Break plan into actionable, parallelizable tasks.
|
|
347
|
+
|
|
348
|
+
**Output**: `.specify/specs/{feature}/tasks.md`
|
|
349
|
+
|
|
350
|
+
**Key Sections**:
|
|
351
|
+
```markdown
|
|
352
|
+
# Tasks: User Authentication
|
|
353
|
+
|
|
354
|
+
## Task Breakdown
|
|
355
|
+
|
|
356
|
+
### T010: Database Schema [P]
|
|
357
|
+
**Assigned to**: developer-backend
|
|
358
|
+
**Dependencies**: None
|
|
359
|
+
**Estimated Complexity**: Low
|
|
360
|
+
**Deliverables**:
|
|
361
|
+
- User model in Prisma schema
|
|
362
|
+
- Account model for OAuth providers
|
|
363
|
+
- Session model for JWT storage
|
|
364
|
+
- Migration files
|
|
365
|
+
|
|
366
|
+
### T011: NextAuth Configuration [P]
|
|
367
|
+
**Assigned to**: developer-backend
|
|
368
|
+
**Dependencies**: T010 (database schema)
|
|
369
|
+
**Estimated Complexity**: Medium
|
|
370
|
+
**Deliverables**:
|
|
371
|
+
- src/auth.ts configuration
|
|
372
|
+
- JWT strategy setup
|
|
373
|
+
- Credentials provider
|
|
374
|
+
- Session callbacks
|
|
375
|
+
|
|
376
|
+
### T012: Registration API [P]
|
|
377
|
+
**Assigned to**: developer-backend
|
|
378
|
+
**Dependencies**: T011 (NextAuth config)
|
|
379
|
+
**Estimated Complexity**: Medium
|
|
380
|
+
**Deliverables**:
|
|
381
|
+
- /api/auth/register endpoint
|
|
382
|
+
- Email validation
|
|
383
|
+
- Password hashing
|
|
384
|
+
- User creation
|
|
385
|
+
|
|
386
|
+
### T013: Login UI Component [P]
|
|
387
|
+
**Assigned to**: developer-frontend
|
|
388
|
+
**Dependencies**: T012 (Registration API exists for consistency)
|
|
389
|
+
**Estimated Complexity**: Medium
|
|
390
|
+
**Deliverables**:
|
|
391
|
+
- LoginForm component
|
|
392
|
+
- Form validation
|
|
393
|
+
- Error handling
|
|
394
|
+
- Loading states
|
|
395
|
+
|
|
396
|
+
### T014: Integration Tests
|
|
397
|
+
**Assigned to**: tester
|
|
398
|
+
**Dependencies**: T012, T013 (APIs and UI complete)
|
|
399
|
+
**Estimated Complexity**: Medium
|
|
400
|
+
**Deliverables**:
|
|
401
|
+
- E2E test for registration flow
|
|
402
|
+
- E2E test for login flow
|
|
403
|
+
- API integration tests
|
|
404
|
+
|
|
405
|
+
## Parallelization Strategy
|
|
406
|
+
|
|
407
|
+
**Wave 1** (Parallel):
|
|
408
|
+
- T010: Database Schema
|
|
409
|
+
|
|
410
|
+
**Wave 2** (Parallel, depends on Wave 1):
|
|
411
|
+
- T011: NextAuth Configuration
|
|
412
|
+
|
|
413
|
+
**Wave 3** (Parallel, depends on Wave 2):
|
|
414
|
+
- T012: Registration API
|
|
415
|
+
- T013: Login UI Component
|
|
416
|
+
|
|
417
|
+
**Wave 4** (Sequential, depends on Wave 3):
|
|
418
|
+
- T014: Integration Tests
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
**Usage**:
|
|
422
|
+
```bash
|
|
423
|
+
# Read tasks
|
|
424
|
+
cat .specify/specs/user-authentication/tasks.md
|
|
425
|
+
|
|
426
|
+
# Count parallelizable tasks
|
|
427
|
+
grep "\[P\]" .specify/specs/user-authentication/tasks.md | wc -l
|
|
428
|
+
|
|
429
|
+
# Extract dependencies
|
|
430
|
+
grep "Dependencies:" .specify/specs/user-authentication/tasks.md
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
**Best Practices**:
|
|
434
|
+
- Use [P] marker for parallelizable tasks
|
|
435
|
+
- Clear dependency chains (Wave 1 → Wave 2 → Wave 3)
|
|
436
|
+
- Assign to specific worker types
|
|
437
|
+
- Include deliverables for validation
|
|
438
|
+
- Estimate complexity (Low/Medium/High)
|
|
439
|
+
|
|
440
|
+
### /speckit.implement (Developers - Phase 7)
|
|
441
|
+
|
|
442
|
+
**Purpose**: TDD implementation following the plan.
|
|
443
|
+
|
|
444
|
+
**Output**: Source code + tests matching spec.md scenarios.
|
|
445
|
+
|
|
446
|
+
**Process**:
|
|
447
|
+
1. **Read spec.md**: Understand acceptance criteria
|
|
448
|
+
2. **Read plan.md**: Understand architecture
|
|
449
|
+
3. **Read tasks.md**: Know your assigned tasks
|
|
450
|
+
4. **Write test first** (RED): Failing test for scenario
|
|
451
|
+
5. **Implement** (GREEN): Make test pass
|
|
452
|
+
6. **Refactor**: Clean up while keeping tests green
|
|
453
|
+
7. **Repeat**: Next scenario
|
|
454
|
+
|
|
455
|
+
**Example - Backend Implementation**:
|
|
456
|
+
```bash
|
|
457
|
+
# 1. Read assigned task
|
|
458
|
+
cat .specify/specs/user-authentication/tasks.md | grep "T012"
|
|
459
|
+
|
|
460
|
+
# 2. Read relevant spec scenarios
|
|
461
|
+
cat .specify/specs/user-authentication/spec.md | grep -A 20 "Registration"
|
|
462
|
+
|
|
463
|
+
# 3. Write test FIRST (RED)
|
|
464
|
+
cat > src/api/auth/register.test.ts << 'EOF'
|
|
465
|
+
import { test, expect } from 'vitest';
|
|
466
|
+
import { registerUser } from './register';
|
|
467
|
+
|
|
468
|
+
test('successful registration with valid email and password', async () => {
|
|
469
|
+
const result = await registerUser({
|
|
470
|
+
email: 'user@example.com',
|
|
471
|
+
password: 'SecurePass123'
|
|
472
|
+
});
|
|
473
|
+
|
|
474
|
+
expect(result.success).toBe(true);
|
|
475
|
+
expect(result.user.email).toBe('user@example.com');
|
|
476
|
+
});
|
|
477
|
+
EOF
|
|
478
|
+
|
|
479
|
+
# 4. Run test - should FAIL
|
|
480
|
+
pnpm test src/api/auth/register.test.ts
|
|
481
|
+
# ❌ FAIL: registerUser is not defined
|
|
482
|
+
|
|
483
|
+
# 5. Implement (GREEN)
|
|
484
|
+
cat > src/api/auth/register.ts << 'EOF'
|
|
485
|
+
export async function registerUser(data: { email: string; password: string }) {
|
|
486
|
+
// ... implementation ...
|
|
487
|
+
return { success: true, user: { email: data.email } };
|
|
488
|
+
}
|
|
489
|
+
EOF
|
|
490
|
+
|
|
491
|
+
# 6. Run test - should PASS
|
|
492
|
+
pnpm test src/api/auth/register.test.ts
|
|
493
|
+
# ✅ PASS
|
|
494
|
+
|
|
495
|
+
# 7. Refactor and add more scenarios
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
**Best Practices**:
|
|
499
|
+
- RED → GREEN → REFACTOR cycle mandatory
|
|
500
|
+
- One test per acceptance criteria scenario
|
|
501
|
+
- Test names match scenario names
|
|
502
|
+
- Achieve ≥80% coverage
|
|
503
|
+
- Commit after each complete RED-GREEN-REFACTOR cycle
|
|
504
|
+
|
|
505
|
+
### /speckit.analyze (Reviewer/Code-Reviewer - Phase 5/9)
|
|
506
|
+
|
|
507
|
+
**Purpose**: Validate against constitution and quality standards.
|
|
508
|
+
|
|
509
|
+
**Output**: `.specify/specs/{feature}/checklists/validation.md` or `review-report.md`
|
|
510
|
+
|
|
511
|
+
**Key Sections**:
|
|
512
|
+
```markdown
|
|
513
|
+
# Validation Report: User Authentication Plan
|
|
514
|
+
|
|
515
|
+
## Constitution Compliance
|
|
516
|
+
|
|
517
|
+
### ✅ PASS: Test-Driven Development
|
|
518
|
+
- Plan includes test strategy
|
|
519
|
+
- Tester assigned to T014
|
|
520
|
+
- Coverage target: 80% (matches constitution)
|
|
521
|
+
|
|
522
|
+
### ❌ FAIL: API Documentation
|
|
523
|
+
- Issue: No mention of API documentation in plan
|
|
524
|
+
- Required: All APIs must be documented with examples
|
|
525
|
+
- Remediation: Add T015 for API documentation to technical-writer
|
|
526
|
+
|
|
527
|
+
### ✅ PASS: Security Standards
|
|
528
|
+
- bcrypt with cost factor 12 (constitution-compliant)
|
|
529
|
+
- Rate limiting specified
|
|
530
|
+
- CSRF protection planned
|
|
531
|
+
|
|
532
|
+
## Quality Gates
|
|
533
|
+
|
|
534
|
+
- [x] Test coverage target: ≥80%
|
|
535
|
+
- [x] Mutation testing planned
|
|
536
|
+
- [ ] Performance benchmarks missing
|
|
537
|
+
- [x] Security review planned
|
|
538
|
+
|
|
539
|
+
## Recommendations
|
|
540
|
+
|
|
541
|
+
1. Add API documentation task before implementation
|
|
542
|
+
2. Specify performance benchmarks for login (<2s)
|
|
543
|
+
3. Add monitoring and alerting to plan
|
|
544
|
+
|
|
545
|
+
## Decision
|
|
546
|
+
|
|
547
|
+
**Status**: ❌ CHANGES REQUESTED
|
|
548
|
+
|
|
549
|
+
**Action Required**: Planner must address API documentation gap before proceeding to tasks.md
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
**Usage**:
|
|
553
|
+
```bash
|
|
554
|
+
# Read validation report
|
|
555
|
+
cat .specify/specs/user-authentication/checklists/validation.md
|
|
556
|
+
|
|
557
|
+
# Check if approved
|
|
558
|
+
grep "Decision:" .specify/specs/user-authentication/checklists/validation.md
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
**Best Practices**:
|
|
562
|
+
- Check every NON-NEGOTIABLE principle
|
|
563
|
+
- Verify quality gates are met
|
|
564
|
+
- Provide specific remediation guidance
|
|
565
|
+
- Approve/reject/retry decision must be clear
|
|
566
|
+
|
|
567
|
+
### /speckit.checklist (Tester/Security/Tech-Writer - Phase 8+)
|
|
568
|
+
|
|
569
|
+
**Purpose**: Create validation checklists and verify completion.
|
|
570
|
+
|
|
571
|
+
**Output**: `.specify/specs/{feature}/checklists/{type}.md`
|
|
572
|
+
|
|
573
|
+
**Tester Checklist Example**:
|
|
574
|
+
```markdown
|
|
575
|
+
# Test Checklist: User Authentication
|
|
576
|
+
|
|
577
|
+
## Unit Tests
|
|
578
|
+
|
|
579
|
+
- [x] User model validation tests (12 tests)
|
|
580
|
+
- [x] Password hashing tests (5 tests)
|
|
581
|
+
- [x] Email validation tests (8 tests)
|
|
582
|
+
- [x] Registration service tests (15 tests)
|
|
583
|
+
|
|
584
|
+
## Integration Tests
|
|
585
|
+
|
|
586
|
+
- [x] Registration API endpoint (6 scenarios)
|
|
587
|
+
- [x] Login API endpoint (8 scenarios)
|
|
588
|
+
- [x] Session management (4 scenarios)
|
|
589
|
+
|
|
590
|
+
## E2E Tests
|
|
591
|
+
|
|
592
|
+
- [x] User registration flow (Playwright)
|
|
593
|
+
- [x] User login flow (Playwright)
|
|
594
|
+
- [x] Password reset flow (Playwright)
|
|
595
|
+
|
|
596
|
+
## Coverage
|
|
597
|
+
|
|
598
|
+
- Test Coverage: 87.5% ✅ (target: 80%)
|
|
599
|
+
- Mutation Score: 83.2% ✅ (target: 80%)
|
|
600
|
+
|
|
601
|
+
## Performance
|
|
602
|
+
|
|
603
|
+
- [x] Login completes in <2s (avg: 1.2s)
|
|
604
|
+
- [x] Registration completes in <3s (avg: 2.1s)
|
|
605
|
+
|
|
606
|
+
## Status
|
|
607
|
+
|
|
608
|
+
**All tests passing**: ✅ YES
|
|
609
|
+
**Ready for merge**: ✅ YES
|
|
610
|
+
```
|
|
611
|
+
|
|
612
|
+
**Security Checklist Example**:
|
|
613
|
+
```markdown
|
|
614
|
+
# Security Checklist: User Authentication
|
|
615
|
+
|
|
616
|
+
## OWASP Top 10
|
|
617
|
+
|
|
618
|
+
- [x] A01: Broken Access Control - JWT validation on all protected routes
|
|
619
|
+
- [x] A02: Cryptographic Failures - bcrypt cost 12, secure token generation
|
|
620
|
+
- [x] A03: Injection - Parameterized queries (Prisma ORM)
|
|
621
|
+
- [x] A04: Insecure Design - Rate limiting, account lockout after 5 failed attempts
|
|
622
|
+
- [x] A05: Security Misconfiguration - Secure headers, HTTPS enforced
|
|
623
|
+
- [x] A06: Vulnerable Components - Dependencies scanned, no critical vulnerabilities
|
|
624
|
+
- [x] A07: Authentication Failures - Strong password policy, JWT expiry
|
|
625
|
+
- [x] A08: Data Integrity Failures - JWT signature validation
|
|
626
|
+
- [x] A09: Logging Failures - Authentication events logged
|
|
627
|
+
- [x] A10: SSRF - No external requests in auth flow
|
|
628
|
+
|
|
629
|
+
## Threat Model
|
|
630
|
+
|
|
631
|
+
### Threat: Brute Force Attack
|
|
632
|
+
**Mitigation**: Rate limiting (5 attempts per 15min)
|
|
633
|
+
**Status**: ✅ Implemented
|
|
634
|
+
|
|
635
|
+
### Threat: Token Theft
|
|
636
|
+
**Mitigation**: Short-lived JWT (15min), httpOnly cookies
|
|
637
|
+
**Status**: ✅ Implemented
|
|
638
|
+
|
|
639
|
+
## Status
|
|
640
|
+
|
|
641
|
+
**Security Score**: 95/100 ✅
|
|
642
|
+
**Critical Issues**: 0 ✅
|
|
643
|
+
**Approved for Production**: ✅ YES
|
|
644
|
+
```
|
|
645
|
+
|
|
646
|
+
## Workflow Integration
|
|
647
|
+
|
|
648
|
+
### Phase-by-Phase Flow
|
|
649
|
+
|
|
650
|
+
**Phase 1: Constitution (Architect)**
|
|
651
|
+
```bash
|
|
652
|
+
# Create constitution
|
|
653
|
+
# Output: .specify/memory/constitution.md
|
|
654
|
+
|
|
655
|
+
# Collaborates with: product-owner
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
**Phase 2: Clarification (Clarifier)**
|
|
659
|
+
```bash
|
|
660
|
+
# Read requirements
|
|
661
|
+
# Ask max 5 high-impact questions
|
|
662
|
+
# Output: .specify/specs/000-requirements/clarification.md
|
|
663
|
+
|
|
664
|
+
# Depends on: Product requirements
|
|
665
|
+
# Collaborates with: product-owner, architect
|
|
666
|
+
```
|
|
667
|
+
|
|
668
|
+
**Phase 3: Specification (Spec Writer)**
|
|
669
|
+
```bash
|
|
670
|
+
# Convert clarifications to BDD user stories
|
|
671
|
+
# Output: .specify/specs/000-requirements/spec.md
|
|
672
|
+
|
|
673
|
+
# Depends on: clarification.md
|
|
674
|
+
# Collaborates with: clarifier, tester
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
**Phase 4: Planning (Planner)**
|
|
678
|
+
```bash
|
|
679
|
+
# Design technical architecture
|
|
680
|
+
# Output: .specify/specs/{feature}/plan.md, data-model.md, contracts/
|
|
681
|
+
|
|
682
|
+
# Depends on: spec.md, constitution.md
|
|
683
|
+
# Collaborates with: architect, spec-writer
|
|
684
|
+
```
|
|
685
|
+
|
|
686
|
+
**Phase 5: Review (Reviewer)**
|
|
687
|
+
```bash
|
|
688
|
+
# Validate plan against constitution
|
|
689
|
+
# Output: .specify/specs/{feature}/checklists/validation.md
|
|
690
|
+
|
|
691
|
+
# Depends on: plan.md, constitution.md
|
|
692
|
+
# Decision: APPROVED / CHANGES REQUESTED / REJECTED
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
**Phase 6: Task Breakdown (Planner)**
|
|
696
|
+
```bash
|
|
697
|
+
# Only after plan approved
|
|
698
|
+
# Break into actionable tasks with [P] markers
|
|
699
|
+
# Output: .specify/specs/{feature}/tasks.md
|
|
700
|
+
|
|
701
|
+
# Depends on: validation.md (status: APPROVED)
|
|
702
|
+
```
|
|
703
|
+
|
|
704
|
+
**Phase 7: Implementation (Developers)**
|
|
705
|
+
```bash
|
|
706
|
+
# TDD implementation
|
|
707
|
+
# Output: src/ code + tests/
|
|
708
|
+
|
|
709
|
+
# Depends on: tasks.md
|
|
710
|
+
# Follows: /speckit.implement process
|
|
711
|
+
```
|
|
712
|
+
|
|
713
|
+
**Phase 8: Testing (Tester)**
|
|
714
|
+
```bash
|
|
715
|
+
# Comprehensive test suite
|
|
716
|
+
# Output: .specify/specs/{feature}/checklists/test-checklist.md
|
|
717
|
+
|
|
718
|
+
# Depends on: Implementation complete
|
|
719
|
+
```
|
|
720
|
+
|
|
721
|
+
**Phase 9: Code Review (Code Reviewer)**
|
|
722
|
+
```bash
|
|
723
|
+
# Review code and tests
|
|
724
|
+
# Output: review-report.md
|
|
725
|
+
|
|
726
|
+
# Depends on: Tests passing
|
|
727
|
+
```
|
|
728
|
+
|
|
729
|
+
**Phase 10: Consolidation (Consolidator)**
|
|
730
|
+
```bash
|
|
731
|
+
# Final validation and merge
|
|
732
|
+
# Output: .specify/specs/{feature}/checklists/checklist.md
|
|
733
|
+
|
|
734
|
+
# Depends on: All workers complete
|
|
735
|
+
```
|
|
736
|
+
|
|
737
|
+
## Common Patterns
|
|
738
|
+
|
|
739
|
+
### Referencing Between Artifacts
|
|
740
|
+
|
|
741
|
+
```bash
|
|
742
|
+
# In plan.md, reference spec.md
|
|
743
|
+
See user stories in [spec.md](../000-requirements/spec.md)
|
|
744
|
+
|
|
745
|
+
# In tasks.md, reference plan.md components
|
|
746
|
+
Based on Component 1 in [plan.md](./plan.md#component-1)
|
|
747
|
+
|
|
748
|
+
# In validation.md, reference constitution.md
|
|
749
|
+
Validates against principle 1 in [constitution.md](../../memory/constitution.md#principle-1)
|
|
750
|
+
```
|
|
751
|
+
|
|
752
|
+
### Updating Artifacts
|
|
753
|
+
|
|
754
|
+
```bash
|
|
755
|
+
# If constitution changes
|
|
756
|
+
architect: Update .specify/memory/constitution.md
|
|
757
|
+
reviewer: Re-validate all plans against new constitution
|
|
758
|
+
```
|
|
759
|
+
|
|
760
|
+
### Parallel Worker Coordination
|
|
761
|
+
|
|
762
|
+
```bash
|
|
763
|
+
# Planner creates tasks.md with [P] markers
|
|
764
|
+
# Conductor spawns multiple developers in parallel
|
|
765
|
+
# Each developer works on independent task marked [P]
|
|
766
|
+
# Consolidator merges all parallel work
|
|
767
|
+
```
|
|
768
|
+
|
|
769
|
+
## Anti-Patterns
|
|
770
|
+
|
|
771
|
+
### ❌ Skipping Tests in Implementation
|
|
772
|
+
|
|
773
|
+
```bash
|
|
774
|
+
# ❌ Bad - implement without tests
|
|
775
|
+
cat > src/api/register.ts << 'EOF'
|
|
776
|
+
export function register() { /* ... */ }
|
|
777
|
+
EOF
|
|
778
|
+
|
|
779
|
+
# ✅ Good - test first
|
|
780
|
+
cat > src/api/register.test.ts << 'EOF'
|
|
781
|
+
test('registration succeeds', () => { /* ... */ })
|
|
782
|
+
EOF
|
|
783
|
+
```
|
|
784
|
+
|
|
785
|
+
### ❌ Vague Acceptance Criteria
|
|
786
|
+
|
|
787
|
+
```markdown
|
|
788
|
+
❌ Bad:
|
|
789
|
+
**Scenario**: User can login
|
|
790
|
+
- Given user exists
|
|
791
|
+
- When login
|
|
792
|
+
- Then success
|
|
793
|
+
|
|
794
|
+
✅ Good:
|
|
795
|
+
**Scenario 1.1**: Successful login with valid credentials
|
|
796
|
+
- **Given** user "test@example.com" exists with password "Pass123"
|
|
797
|
+
- **When** I enter email "test@example.com"
|
|
798
|
+
- **And** I enter password "Pass123"
|
|
799
|
+
- **And** I click "Login"
|
|
800
|
+
- **Then** I should see "Welcome back" message
|
|
801
|
+
- **And** I should be redirected to dashboard ("/dashboard")
|
|
802
|
+
- **And** JWT token should be set in cookies
|
|
803
|
+
```
|
|
804
|
+
|
|
805
|
+
## When to Use This Skill
|
|
806
|
+
|
|
807
|
+
- Understanding your role in the Spec-Kit workflow
|
|
808
|
+
- Reading artifacts from previous workers
|
|
809
|
+
- Creating artifacts for your assigned phase
|
|
810
|
+
- Following TDD/BDD methodology
|
|
811
|
+
- Validating work against constitution
|
|
812
|
+
- Coordinating with parallel workers
|
|
813
|
+
|
|
814
|
+
## Related Skills
|
|
815
|
+
|
|
816
|
+
- `boss-manifest-protocol.md` - How to report results via manifests
|
|
817
|
+
- `test-first-methodology.md` - Detailed TDD/BDD implementation guide
|
|
818
|
+
- `conductor-orchestration.md` - How phases coordinate
|
|
819
|
+
|
|
820
|
+
## Key Takeaways
|
|
821
|
+
|
|
822
|
+
1. **Spec-Kit is sequential** - Each phase depends on previous artifacts
|
|
823
|
+
2. **Artifacts are executable** - Not just documentation
|
|
824
|
+
3. **Constitution is law** - All work must comply with NON-NEGOTIABLE principles
|
|
825
|
+
4. **TDD is mandatory** - Tests before implementation, always
|
|
826
|
+
5. **BDD scenarios become tests** - spec.md directly converts to test code
|
|
827
|
+
6. **[P] enables parallelism** - Mark independent tasks for concurrent execution
|