@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,448 @@
|
|
|
1
|
+
#!/usr/bin/env pwsh
|
|
2
|
+
<#!
|
|
3
|
+
.SYNOPSIS
|
|
4
|
+
Update agent context files with information from plan.md (PowerShell version)
|
|
5
|
+
|
|
6
|
+
.DESCRIPTION
|
|
7
|
+
Mirrors the behavior of scripts/bash/update-agent-context.sh:
|
|
8
|
+
1. Environment Validation
|
|
9
|
+
2. Plan Data Extraction
|
|
10
|
+
3. Agent File Management (create from template or update existing)
|
|
11
|
+
4. Content Generation (technology stack, recent changes, timestamp)
|
|
12
|
+
5. Multi-Agent Support (claude, gemini, copilot, cursor-agent, qwen, opencode, codex, windsurf, kilocode, auggie, roo, codebuddy, amp, shai, q, bob, qoder)
|
|
13
|
+
|
|
14
|
+
.PARAMETER AgentType
|
|
15
|
+
Optional agent key to update a single agent. If omitted, updates all existing agent files (creating a default Claude file if none exist).
|
|
16
|
+
|
|
17
|
+
.EXAMPLE
|
|
18
|
+
./update-agent-context.ps1 -AgentType claude
|
|
19
|
+
|
|
20
|
+
.EXAMPLE
|
|
21
|
+
./update-agent-context.ps1 # Updates all existing agent files
|
|
22
|
+
|
|
23
|
+
.NOTES
|
|
24
|
+
Relies on common helper functions in common.ps1
|
|
25
|
+
#>
|
|
26
|
+
param(
|
|
27
|
+
[Parameter(Position=0)]
|
|
28
|
+
[ValidateSet('claude','gemini','copilot','cursor-agent','qwen','opencode','codex','windsurf','kilocode','auggie','roo','codebuddy','amp','shai','q','bob','qoder')]
|
|
29
|
+
[string]$AgentType
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
$ErrorActionPreference = 'Stop'
|
|
33
|
+
|
|
34
|
+
# Import common helpers
|
|
35
|
+
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
36
|
+
. (Join-Path $ScriptDir 'common.ps1')
|
|
37
|
+
|
|
38
|
+
# Acquire environment paths
|
|
39
|
+
$envData = Get-FeaturePathsEnv
|
|
40
|
+
$REPO_ROOT = $envData.REPO_ROOT
|
|
41
|
+
$CURRENT_BRANCH = $envData.CURRENT_BRANCH
|
|
42
|
+
$HAS_GIT = $envData.HAS_GIT
|
|
43
|
+
$IMPL_PLAN = $envData.IMPL_PLAN
|
|
44
|
+
$NEW_PLAN = $IMPL_PLAN
|
|
45
|
+
|
|
46
|
+
# Agent file paths
|
|
47
|
+
$CLAUDE_FILE = Join-Path $REPO_ROOT 'CLAUDE.md'
|
|
48
|
+
$GEMINI_FILE = Join-Path $REPO_ROOT 'GEMINI.md'
|
|
49
|
+
$COPILOT_FILE = Join-Path $REPO_ROOT '.github/agents/copilot-instructions.md'
|
|
50
|
+
$CURSOR_FILE = Join-Path $REPO_ROOT '.cursor/rules/specify-rules.mdc'
|
|
51
|
+
$QWEN_FILE = Join-Path $REPO_ROOT 'QWEN.md'
|
|
52
|
+
$AGENTS_FILE = Join-Path $REPO_ROOT 'AGENTS.md'
|
|
53
|
+
$WINDSURF_FILE = Join-Path $REPO_ROOT '.windsurf/rules/specify-rules.md'
|
|
54
|
+
$KILOCODE_FILE = Join-Path $REPO_ROOT '.kilocode/rules/specify-rules.md'
|
|
55
|
+
$AUGGIE_FILE = Join-Path $REPO_ROOT '.augment/rules/specify-rules.md'
|
|
56
|
+
$ROO_FILE = Join-Path $REPO_ROOT '.roo/rules/specify-rules.md'
|
|
57
|
+
$CODEBUDDY_FILE = Join-Path $REPO_ROOT 'CODEBUDDY.md'
|
|
58
|
+
$QODER_FILE = Join-Path $REPO_ROOT 'QODER.md'
|
|
59
|
+
$AMP_FILE = Join-Path $REPO_ROOT 'AGENTS.md'
|
|
60
|
+
$SHAI_FILE = Join-Path $REPO_ROOT 'SHAI.md'
|
|
61
|
+
$Q_FILE = Join-Path $REPO_ROOT 'AGENTS.md'
|
|
62
|
+
$BOB_FILE = Join-Path $REPO_ROOT 'AGENTS.md'
|
|
63
|
+
|
|
64
|
+
$TEMPLATE_FILE = Join-Path $REPO_ROOT '.specify/templates/agent-file-template.md'
|
|
65
|
+
|
|
66
|
+
# Parsed plan data placeholders
|
|
67
|
+
$script:NEW_LANG = ''
|
|
68
|
+
$script:NEW_FRAMEWORK = ''
|
|
69
|
+
$script:NEW_DB = ''
|
|
70
|
+
$script:NEW_PROJECT_TYPE = ''
|
|
71
|
+
|
|
72
|
+
function Write-Info {
|
|
73
|
+
param(
|
|
74
|
+
[Parameter(Mandatory=$true)]
|
|
75
|
+
[string]$Message
|
|
76
|
+
)
|
|
77
|
+
Write-Host "INFO: $Message"
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function Write-Success {
|
|
81
|
+
param(
|
|
82
|
+
[Parameter(Mandatory=$true)]
|
|
83
|
+
[string]$Message
|
|
84
|
+
)
|
|
85
|
+
Write-Host "$([char]0x2713) $Message"
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function Write-WarningMsg {
|
|
89
|
+
param(
|
|
90
|
+
[Parameter(Mandatory=$true)]
|
|
91
|
+
[string]$Message
|
|
92
|
+
)
|
|
93
|
+
Write-Warning $Message
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function Write-Err {
|
|
97
|
+
param(
|
|
98
|
+
[Parameter(Mandatory=$true)]
|
|
99
|
+
[string]$Message
|
|
100
|
+
)
|
|
101
|
+
Write-Host "ERROR: $Message" -ForegroundColor Red
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function Validate-Environment {
|
|
105
|
+
if (-not $CURRENT_BRANCH) {
|
|
106
|
+
Write-Err 'Unable to determine current feature'
|
|
107
|
+
if ($HAS_GIT) { Write-Info "Make sure you're on a feature branch" } else { Write-Info 'Set SPECIFY_FEATURE environment variable or create a feature first' }
|
|
108
|
+
exit 1
|
|
109
|
+
}
|
|
110
|
+
if (-not (Test-Path $NEW_PLAN)) {
|
|
111
|
+
Write-Err "No plan.md found at $NEW_PLAN"
|
|
112
|
+
Write-Info 'Ensure you are working on a feature with a corresponding spec directory'
|
|
113
|
+
if (-not $HAS_GIT) { Write-Info 'Use: $env:SPECIFY_FEATURE=your-feature-name or create a new feature first' }
|
|
114
|
+
exit 1
|
|
115
|
+
}
|
|
116
|
+
if (-not (Test-Path $TEMPLATE_FILE)) {
|
|
117
|
+
Write-Err "Template file not found at $TEMPLATE_FILE"
|
|
118
|
+
Write-Info 'Run specify init to scaffold .specify/templates, or add agent-file-template.md there.'
|
|
119
|
+
exit 1
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function Extract-PlanField {
|
|
124
|
+
param(
|
|
125
|
+
[Parameter(Mandatory=$true)]
|
|
126
|
+
[string]$FieldPattern,
|
|
127
|
+
[Parameter(Mandatory=$true)]
|
|
128
|
+
[string]$PlanFile
|
|
129
|
+
)
|
|
130
|
+
if (-not (Test-Path $PlanFile)) { return '' }
|
|
131
|
+
# Lines like **Language/Version**: Python 3.12
|
|
132
|
+
$regex = "^\*\*$([Regex]::Escape($FieldPattern))\*\*: (.+)$"
|
|
133
|
+
Get-Content -LiteralPath $PlanFile -Encoding utf8 | ForEach-Object {
|
|
134
|
+
if ($_ -match $regex) {
|
|
135
|
+
$val = $Matches[1].Trim()
|
|
136
|
+
if ($val -notin @('NEEDS CLARIFICATION','N/A')) { return $val }
|
|
137
|
+
}
|
|
138
|
+
} | Select-Object -First 1
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function Parse-PlanData {
|
|
142
|
+
param(
|
|
143
|
+
[Parameter(Mandatory=$true)]
|
|
144
|
+
[string]$PlanFile
|
|
145
|
+
)
|
|
146
|
+
if (-not (Test-Path $PlanFile)) { Write-Err "Plan file not found: $PlanFile"; return $false }
|
|
147
|
+
Write-Info "Parsing plan data from $PlanFile"
|
|
148
|
+
$script:NEW_LANG = Extract-PlanField -FieldPattern 'Language/Version' -PlanFile $PlanFile
|
|
149
|
+
$script:NEW_FRAMEWORK = Extract-PlanField -FieldPattern 'Primary Dependencies' -PlanFile $PlanFile
|
|
150
|
+
$script:NEW_DB = Extract-PlanField -FieldPattern 'Storage' -PlanFile $PlanFile
|
|
151
|
+
$script:NEW_PROJECT_TYPE = Extract-PlanField -FieldPattern 'Project Type' -PlanFile $PlanFile
|
|
152
|
+
|
|
153
|
+
if ($NEW_LANG) { Write-Info "Found language: $NEW_LANG" } else { Write-WarningMsg 'No language information found in plan' }
|
|
154
|
+
if ($NEW_FRAMEWORK) { Write-Info "Found framework: $NEW_FRAMEWORK" }
|
|
155
|
+
if ($NEW_DB -and $NEW_DB -ne 'N/A') { Write-Info "Found database: $NEW_DB" }
|
|
156
|
+
if ($NEW_PROJECT_TYPE) { Write-Info "Found project type: $NEW_PROJECT_TYPE" }
|
|
157
|
+
return $true
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function Format-TechnologyStack {
|
|
161
|
+
param(
|
|
162
|
+
[Parameter(Mandatory=$false)]
|
|
163
|
+
[string]$Lang,
|
|
164
|
+
[Parameter(Mandatory=$false)]
|
|
165
|
+
[string]$Framework
|
|
166
|
+
)
|
|
167
|
+
$parts = @()
|
|
168
|
+
if ($Lang -and $Lang -ne 'NEEDS CLARIFICATION') { $parts += $Lang }
|
|
169
|
+
if ($Framework -and $Framework -notin @('NEEDS CLARIFICATION','N/A')) { $parts += $Framework }
|
|
170
|
+
if (-not $parts) { return '' }
|
|
171
|
+
return ($parts -join ' + ')
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function Get-ProjectStructure {
|
|
175
|
+
param(
|
|
176
|
+
[Parameter(Mandatory=$false)]
|
|
177
|
+
[string]$ProjectType
|
|
178
|
+
)
|
|
179
|
+
if ($ProjectType -match 'web') { return "backend/`nfrontend/`ntests/" } else { return "src/`ntests/" }
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function Get-CommandsForLanguage {
|
|
183
|
+
param(
|
|
184
|
+
[Parameter(Mandatory=$false)]
|
|
185
|
+
[string]$Lang
|
|
186
|
+
)
|
|
187
|
+
switch -Regex ($Lang) {
|
|
188
|
+
'Python' { return "cd src; pytest; ruff check ." }
|
|
189
|
+
'Rust' { return "cargo test; cargo clippy" }
|
|
190
|
+
'JavaScript|TypeScript' { return "npm test; npm run lint" }
|
|
191
|
+
default { return "# Add commands for $Lang" }
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function Get-LanguageConventions {
|
|
196
|
+
param(
|
|
197
|
+
[Parameter(Mandatory=$false)]
|
|
198
|
+
[string]$Lang
|
|
199
|
+
)
|
|
200
|
+
if ($Lang) { "${Lang}: Follow standard conventions" } else { 'General: Follow standard conventions' }
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
function New-AgentFile {
|
|
204
|
+
param(
|
|
205
|
+
[Parameter(Mandatory=$true)]
|
|
206
|
+
[string]$TargetFile,
|
|
207
|
+
[Parameter(Mandatory=$true)]
|
|
208
|
+
[string]$ProjectName,
|
|
209
|
+
[Parameter(Mandatory=$true)]
|
|
210
|
+
[datetime]$Date
|
|
211
|
+
)
|
|
212
|
+
if (-not (Test-Path $TEMPLATE_FILE)) { Write-Err "Template not found at $TEMPLATE_FILE"; return $false }
|
|
213
|
+
$temp = New-TemporaryFile
|
|
214
|
+
Copy-Item -LiteralPath $TEMPLATE_FILE -Destination $temp -Force
|
|
215
|
+
|
|
216
|
+
$projectStructure = Get-ProjectStructure -ProjectType $NEW_PROJECT_TYPE
|
|
217
|
+
$commands = Get-CommandsForLanguage -Lang $NEW_LANG
|
|
218
|
+
$languageConventions = Get-LanguageConventions -Lang $NEW_LANG
|
|
219
|
+
|
|
220
|
+
$escaped_lang = $NEW_LANG
|
|
221
|
+
$escaped_framework = $NEW_FRAMEWORK
|
|
222
|
+
$escaped_branch = $CURRENT_BRANCH
|
|
223
|
+
|
|
224
|
+
$content = Get-Content -LiteralPath $temp -Raw -Encoding utf8
|
|
225
|
+
$content = $content -replace '\[PROJECT NAME\]',$ProjectName
|
|
226
|
+
$content = $content -replace '\[DATE\]',$Date.ToString('yyyy-MM-dd')
|
|
227
|
+
|
|
228
|
+
# Build the technology stack string safely
|
|
229
|
+
$techStackForTemplate = ""
|
|
230
|
+
if ($escaped_lang -and $escaped_framework) {
|
|
231
|
+
$techStackForTemplate = "- $escaped_lang + $escaped_framework ($escaped_branch)"
|
|
232
|
+
} elseif ($escaped_lang) {
|
|
233
|
+
$techStackForTemplate = "- $escaped_lang ($escaped_branch)"
|
|
234
|
+
} elseif ($escaped_framework) {
|
|
235
|
+
$techStackForTemplate = "- $escaped_framework ($escaped_branch)"
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
$content = $content -replace '\[EXTRACTED FROM ALL PLAN.MD FILES\]',$techStackForTemplate
|
|
239
|
+
# For project structure we manually embed (keep newlines)
|
|
240
|
+
$escapedStructure = [Regex]::Escape($projectStructure)
|
|
241
|
+
$content = $content -replace '\[ACTUAL STRUCTURE FROM PLANS\]',$escapedStructure
|
|
242
|
+
# Replace escaped newlines placeholder after all replacements
|
|
243
|
+
$content = $content -replace '\[ONLY COMMANDS FOR ACTIVE TECHNOLOGIES\]',$commands
|
|
244
|
+
$content = $content -replace '\[LANGUAGE-SPECIFIC, ONLY FOR LANGUAGES IN USE\]',$languageConventions
|
|
245
|
+
|
|
246
|
+
# Build the recent changes string safely
|
|
247
|
+
$recentChangesForTemplate = ""
|
|
248
|
+
if ($escaped_lang -and $escaped_framework) {
|
|
249
|
+
$recentChangesForTemplate = "- ${escaped_branch}: Added ${escaped_lang} + ${escaped_framework}"
|
|
250
|
+
} elseif ($escaped_lang) {
|
|
251
|
+
$recentChangesForTemplate = "- ${escaped_branch}: Added ${escaped_lang}"
|
|
252
|
+
} elseif ($escaped_framework) {
|
|
253
|
+
$recentChangesForTemplate = "- ${escaped_branch}: Added ${escaped_framework}"
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
$content = $content -replace '\[LAST 3 FEATURES AND WHAT THEY ADDED\]',$recentChangesForTemplate
|
|
257
|
+
# Convert literal \n sequences introduced by Escape to real newlines
|
|
258
|
+
$content = $content -replace '\\n',[Environment]::NewLine
|
|
259
|
+
|
|
260
|
+
$parent = Split-Path -Parent $TargetFile
|
|
261
|
+
if (-not (Test-Path $parent)) { New-Item -ItemType Directory -Path $parent | Out-Null }
|
|
262
|
+
Set-Content -LiteralPath $TargetFile -Value $content -NoNewline -Encoding utf8
|
|
263
|
+
Remove-Item $temp -Force
|
|
264
|
+
return $true
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
function Update-ExistingAgentFile {
|
|
268
|
+
param(
|
|
269
|
+
[Parameter(Mandatory=$true)]
|
|
270
|
+
[string]$TargetFile,
|
|
271
|
+
[Parameter(Mandatory=$true)]
|
|
272
|
+
[datetime]$Date
|
|
273
|
+
)
|
|
274
|
+
if (-not (Test-Path $TargetFile)) { return (New-AgentFile -TargetFile $TargetFile -ProjectName (Split-Path $REPO_ROOT -Leaf) -Date $Date) }
|
|
275
|
+
|
|
276
|
+
$techStack = Format-TechnologyStack -Lang $NEW_LANG -Framework $NEW_FRAMEWORK
|
|
277
|
+
$newTechEntries = @()
|
|
278
|
+
if ($techStack) {
|
|
279
|
+
$escapedTechStack = [Regex]::Escape($techStack)
|
|
280
|
+
if (-not (Select-String -Pattern $escapedTechStack -Path $TargetFile -Quiet)) {
|
|
281
|
+
$newTechEntries += "- $techStack ($CURRENT_BRANCH)"
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
if ($NEW_DB -and $NEW_DB -notin @('N/A','NEEDS CLARIFICATION')) {
|
|
285
|
+
$escapedDB = [Regex]::Escape($NEW_DB)
|
|
286
|
+
if (-not (Select-String -Pattern $escapedDB -Path $TargetFile -Quiet)) {
|
|
287
|
+
$newTechEntries += "- $NEW_DB ($CURRENT_BRANCH)"
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
$newChangeEntry = ''
|
|
291
|
+
if ($techStack) { $newChangeEntry = "- ${CURRENT_BRANCH}: Added ${techStack}" }
|
|
292
|
+
elseif ($NEW_DB -and $NEW_DB -notin @('N/A','NEEDS CLARIFICATION')) { $newChangeEntry = "- ${CURRENT_BRANCH}: Added ${NEW_DB}" }
|
|
293
|
+
|
|
294
|
+
$lines = Get-Content -LiteralPath $TargetFile -Encoding utf8
|
|
295
|
+
$output = New-Object System.Collections.Generic.List[string]
|
|
296
|
+
$inTech = $false; $inChanges = $false; $techAdded = $false; $changeAdded = $false; $existingChanges = 0
|
|
297
|
+
|
|
298
|
+
for ($i=0; $i -lt $lines.Count; $i++) {
|
|
299
|
+
$line = $lines[$i]
|
|
300
|
+
if ($line -eq '## Active Technologies') {
|
|
301
|
+
$output.Add($line)
|
|
302
|
+
$inTech = $true
|
|
303
|
+
continue
|
|
304
|
+
}
|
|
305
|
+
if ($inTech -and $line -match '^##\s') {
|
|
306
|
+
if (-not $techAdded -and $newTechEntries.Count -gt 0) { $newTechEntries | ForEach-Object { $output.Add($_) }; $techAdded = $true }
|
|
307
|
+
$output.Add($line); $inTech = $false; continue
|
|
308
|
+
}
|
|
309
|
+
if ($inTech -and [string]::IsNullOrWhiteSpace($line)) {
|
|
310
|
+
if (-not $techAdded -and $newTechEntries.Count -gt 0) { $newTechEntries | ForEach-Object { $output.Add($_) }; $techAdded = $true }
|
|
311
|
+
$output.Add($line); continue
|
|
312
|
+
}
|
|
313
|
+
if ($line -eq '## Recent Changes') {
|
|
314
|
+
$output.Add($line)
|
|
315
|
+
if ($newChangeEntry) { $output.Add($newChangeEntry); $changeAdded = $true }
|
|
316
|
+
$inChanges = $true
|
|
317
|
+
continue
|
|
318
|
+
}
|
|
319
|
+
if ($inChanges -and $line -match '^##\s') { $output.Add($line); $inChanges = $false; continue }
|
|
320
|
+
if ($inChanges -and $line -match '^- ') {
|
|
321
|
+
if ($existingChanges -lt 2) { $output.Add($line); $existingChanges++ }
|
|
322
|
+
continue
|
|
323
|
+
}
|
|
324
|
+
if ($line -match '\*\*Last updated\*\*: .*\d{4}-\d{2}-\d{2}') {
|
|
325
|
+
$output.Add(($line -replace '\d{4}-\d{2}-\d{2}',$Date.ToString('yyyy-MM-dd')))
|
|
326
|
+
continue
|
|
327
|
+
}
|
|
328
|
+
$output.Add($line)
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
# Post-loop check: if we're still in the Active Technologies section and haven't added new entries
|
|
332
|
+
if ($inTech -and -not $techAdded -and $newTechEntries.Count -gt 0) {
|
|
333
|
+
$newTechEntries | ForEach-Object { $output.Add($_) }
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
Set-Content -LiteralPath $TargetFile -Value ($output -join [Environment]::NewLine) -Encoding utf8
|
|
337
|
+
return $true
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
function Update-AgentFile {
|
|
341
|
+
param(
|
|
342
|
+
[Parameter(Mandatory=$true)]
|
|
343
|
+
[string]$TargetFile,
|
|
344
|
+
[Parameter(Mandatory=$true)]
|
|
345
|
+
[string]$AgentName
|
|
346
|
+
)
|
|
347
|
+
if (-not $TargetFile -or -not $AgentName) { Write-Err 'Update-AgentFile requires TargetFile and AgentName'; return $false }
|
|
348
|
+
Write-Info "Updating $AgentName context file: $TargetFile"
|
|
349
|
+
$projectName = Split-Path $REPO_ROOT -Leaf
|
|
350
|
+
$date = Get-Date
|
|
351
|
+
|
|
352
|
+
$dir = Split-Path -Parent $TargetFile
|
|
353
|
+
if (-not (Test-Path $dir)) { New-Item -ItemType Directory -Path $dir | Out-Null }
|
|
354
|
+
|
|
355
|
+
if (-not (Test-Path $TargetFile)) {
|
|
356
|
+
if (New-AgentFile -TargetFile $TargetFile -ProjectName $projectName -Date $date) { Write-Success "Created new $AgentName context file" } else { Write-Err 'Failed to create new agent file'; return $false }
|
|
357
|
+
} else {
|
|
358
|
+
try {
|
|
359
|
+
if (Update-ExistingAgentFile -TargetFile $TargetFile -Date $date) { Write-Success "Updated existing $AgentName context file" } else { Write-Err 'Failed to update agent file'; return $false }
|
|
360
|
+
} catch {
|
|
361
|
+
Write-Err "Cannot access or update existing file: $TargetFile. $_"
|
|
362
|
+
return $false
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
return $true
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
function Update-SpecificAgent {
|
|
369
|
+
param(
|
|
370
|
+
[Parameter(Mandatory=$true)]
|
|
371
|
+
[string]$Type
|
|
372
|
+
)
|
|
373
|
+
switch ($Type) {
|
|
374
|
+
'claude' { Update-AgentFile -TargetFile $CLAUDE_FILE -AgentName 'Claude Code' }
|
|
375
|
+
'gemini' { Update-AgentFile -TargetFile $GEMINI_FILE -AgentName 'Gemini CLI' }
|
|
376
|
+
'copilot' { Update-AgentFile -TargetFile $COPILOT_FILE -AgentName 'GitHub Copilot' }
|
|
377
|
+
'cursor-agent' { Update-AgentFile -TargetFile $CURSOR_FILE -AgentName 'Cursor IDE' }
|
|
378
|
+
'qwen' { Update-AgentFile -TargetFile $QWEN_FILE -AgentName 'Qwen Code' }
|
|
379
|
+
'opencode' { Update-AgentFile -TargetFile $AGENTS_FILE -AgentName 'opencode' }
|
|
380
|
+
'codex' { Update-AgentFile -TargetFile $AGENTS_FILE -AgentName 'Codex CLI' }
|
|
381
|
+
'windsurf' { Update-AgentFile -TargetFile $WINDSURF_FILE -AgentName 'Windsurf' }
|
|
382
|
+
'kilocode' { Update-AgentFile -TargetFile $KILOCODE_FILE -AgentName 'Kilo Code' }
|
|
383
|
+
'auggie' { Update-AgentFile -TargetFile $AUGGIE_FILE -AgentName 'Auggie CLI' }
|
|
384
|
+
'roo' { Update-AgentFile -TargetFile $ROO_FILE -AgentName 'Roo Code' }
|
|
385
|
+
'codebuddy' { Update-AgentFile -TargetFile $CODEBUDDY_FILE -AgentName 'CodeBuddy CLI' }
|
|
386
|
+
'qoder' { Update-AgentFile -TargetFile $QODER_FILE -AgentName 'Qoder CLI' }
|
|
387
|
+
'amp' { Update-AgentFile -TargetFile $AMP_FILE -AgentName 'Amp' }
|
|
388
|
+
'shai' { Update-AgentFile -TargetFile $SHAI_FILE -AgentName 'SHAI' }
|
|
389
|
+
'q' { Update-AgentFile -TargetFile $Q_FILE -AgentName 'Amazon Q Developer CLI' }
|
|
390
|
+
'bob' { Update-AgentFile -TargetFile $BOB_FILE -AgentName 'IBM Bob' }
|
|
391
|
+
default { Write-Err "Unknown agent type '$Type'"; Write-Err 'Expected: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|q|bob|qoder'; return $false }
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
function Update-AllExistingAgents {
|
|
396
|
+
$found = $false
|
|
397
|
+
$ok = $true
|
|
398
|
+
if (Test-Path $CLAUDE_FILE) { if (-not (Update-AgentFile -TargetFile $CLAUDE_FILE -AgentName 'Claude Code')) { $ok = $false }; $found = $true }
|
|
399
|
+
if (Test-Path $GEMINI_FILE) { if (-not (Update-AgentFile -TargetFile $GEMINI_FILE -AgentName 'Gemini CLI')) { $ok = $false }; $found = $true }
|
|
400
|
+
if (Test-Path $COPILOT_FILE) { if (-not (Update-AgentFile -TargetFile $COPILOT_FILE -AgentName 'GitHub Copilot')) { $ok = $false }; $found = $true }
|
|
401
|
+
if (Test-Path $CURSOR_FILE) { if (-not (Update-AgentFile -TargetFile $CURSOR_FILE -AgentName 'Cursor IDE')) { $ok = $false }; $found = $true }
|
|
402
|
+
if (Test-Path $QWEN_FILE) { if (-not (Update-AgentFile -TargetFile $QWEN_FILE -AgentName 'Qwen Code')) { $ok = $false }; $found = $true }
|
|
403
|
+
if (Test-Path $AGENTS_FILE) { if (-not (Update-AgentFile -TargetFile $AGENTS_FILE -AgentName 'Codex/opencode')) { $ok = $false }; $found = $true }
|
|
404
|
+
if (Test-Path $WINDSURF_FILE) { if (-not (Update-AgentFile -TargetFile $WINDSURF_FILE -AgentName 'Windsurf')) { $ok = $false }; $found = $true }
|
|
405
|
+
if (Test-Path $KILOCODE_FILE) { if (-not (Update-AgentFile -TargetFile $KILOCODE_FILE -AgentName 'Kilo Code')) { $ok = $false }; $found = $true }
|
|
406
|
+
if (Test-Path $AUGGIE_FILE) { if (-not (Update-AgentFile -TargetFile $AUGGIE_FILE -AgentName 'Auggie CLI')) { $ok = $false }; $found = $true }
|
|
407
|
+
if (Test-Path $ROO_FILE) { if (-not (Update-AgentFile -TargetFile $ROO_FILE -AgentName 'Roo Code')) { $ok = $false }; $found = $true }
|
|
408
|
+
if (Test-Path $CODEBUDDY_FILE) { if (-not (Update-AgentFile -TargetFile $CODEBUDDY_FILE -AgentName 'CodeBuddy CLI')) { $ok = $false }; $found = $true }
|
|
409
|
+
if (Test-Path $QODER_FILE) { if (-not (Update-AgentFile -TargetFile $QODER_FILE -AgentName 'Qoder CLI')) { $ok = $false }; $found = $true }
|
|
410
|
+
if (Test-Path $SHAI_FILE) { if (-not (Update-AgentFile -TargetFile $SHAI_FILE -AgentName 'SHAI')) { $ok = $false }; $found = $true }
|
|
411
|
+
if (Test-Path $Q_FILE) { if (-not (Update-AgentFile -TargetFile $Q_FILE -AgentName 'Amazon Q Developer CLI')) { $ok = $false }; $found = $true }
|
|
412
|
+
if (Test-Path $BOB_FILE) { if (-not (Update-AgentFile -TargetFile $BOB_FILE -AgentName 'IBM Bob')) { $ok = $false }; $found = $true }
|
|
413
|
+
if (-not $found) {
|
|
414
|
+
Write-Info 'No existing agent files found, creating default Claude file...'
|
|
415
|
+
if (-not (Update-AgentFile -TargetFile $CLAUDE_FILE -AgentName 'Claude Code')) { $ok = $false }
|
|
416
|
+
}
|
|
417
|
+
return $ok
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
function Print-Summary {
|
|
421
|
+
Write-Host ''
|
|
422
|
+
Write-Info 'Summary of changes:'
|
|
423
|
+
if ($NEW_LANG) { Write-Host " - Added language: $NEW_LANG" }
|
|
424
|
+
if ($NEW_FRAMEWORK) { Write-Host " - Added framework: $NEW_FRAMEWORK" }
|
|
425
|
+
if ($NEW_DB -and $NEW_DB -ne 'N/A') { Write-Host " - Added database: $NEW_DB" }
|
|
426
|
+
Write-Host ''
|
|
427
|
+
Write-Info 'Usage: ./update-agent-context.ps1 [-AgentType claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|q|bob|qoder]'
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
function Main {
|
|
431
|
+
Validate-Environment
|
|
432
|
+
Write-Info "=== Updating agent context files for feature $CURRENT_BRANCH ==="
|
|
433
|
+
if (-not (Parse-PlanData -PlanFile $NEW_PLAN)) { Write-Err 'Failed to parse plan data'; exit 1 }
|
|
434
|
+
$success = $true
|
|
435
|
+
if ($AgentType) {
|
|
436
|
+
Write-Info "Updating specific agent: $AgentType"
|
|
437
|
+
if (-not (Update-SpecificAgent -Type $AgentType)) { $success = $false }
|
|
438
|
+
}
|
|
439
|
+
else {
|
|
440
|
+
Write-Info 'No agent specified, updating all existing agent files...'
|
|
441
|
+
if (-not (Update-AllExistingAgents)) { $success = $false }
|
|
442
|
+
}
|
|
443
|
+
Print-Summary
|
|
444
|
+
if ($success) { Write-Success 'Agent context update completed successfully'; exit 0 } else { Write-Err 'Agent context update completed with errors'; exit 1 }
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
Main
|
|
448
|
+
|