bmad-method 5.0.0-beta.2 → 5.0.1
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/.github/ISSUE_TEMPLATE/bug_report.md +3 -3
- package/.github/ISSUE_TEMPLATE/feature_request.md +3 -3
- package/.github/workflows/discord.yaml +11 -2
- package/.github/workflows/format-check.yaml +42 -0
- package/.github/workflows/manual-release.yaml +173 -0
- package/.husky/pre-commit +3 -0
- package/.vscode/settings.json +26 -1
- package/CHANGELOG.md +0 -11
- package/README.md +2 -0
- package/bmad-core/agent-teams/team-all.yaml +1 -1
- package/bmad-core/agents/bmad-orchestrator.md +1 -1
- package/bmad-core/agents/dev.md +4 -4
- package/bmad-core/data/bmad-kb.md +1 -1
- package/bmad-core/data/test-levels-framework.md +12 -12
- package/bmad-core/tasks/facilitate-brainstorming-session.md +1 -1
- package/bmad-core/tasks/nfr-assess.md +10 -10
- package/bmad-core/tasks/qa-gate.md +23 -23
- package/bmad-core/tasks/review-story.md +18 -18
- package/bmad-core/tasks/risk-profile.md +25 -25
- package/bmad-core/tasks/test-design.md +9 -9
- package/bmad-core/tasks/trace-requirements.md +21 -21
- package/bmad-core/templates/architecture-tmpl.yaml +49 -49
- package/bmad-core/templates/brainstorming-output-tmpl.yaml +5 -5
- package/bmad-core/templates/brownfield-architecture-tmpl.yaml +31 -31
- package/bmad-core/templates/brownfield-prd-tmpl.yaml +13 -13
- package/bmad-core/templates/competitor-analysis-tmpl.yaml +19 -6
- package/bmad-core/templates/front-end-architecture-tmpl.yaml +21 -9
- package/bmad-core/templates/front-end-spec-tmpl.yaml +24 -24
- package/bmad-core/templates/fullstack-architecture-tmpl.yaml +122 -104
- package/bmad-core/templates/market-research-tmpl.yaml +2 -2
- package/bmad-core/templates/prd-tmpl.yaml +9 -9
- package/bmad-core/templates/project-brief-tmpl.yaml +4 -4
- package/bmad-core/templates/qa-gate-tmpl.yaml +9 -9
- package/bmad-core/templates/story-tmpl.yaml +12 -12
- package/bmad-core/workflows/brownfield-fullstack.yaml +9 -9
- package/bmad-core/workflows/brownfield-service.yaml +1 -1
- package/bmad-core/workflows/brownfield-ui.yaml +1 -1
- package/bmad-core/workflows/greenfield-fullstack.yaml +1 -1
- package/bmad-core/workflows/greenfield-service.yaml +1 -1
- package/bmad-core/workflows/greenfield-ui.yaml +1 -1
- package/common/utils/bmad-doc-template.md +5 -5
- package/dist/agents/analyst.txt +28 -15
- package/dist/agents/architect.txt +220 -190
- package/dist/agents/bmad-master.txt +298 -255
- package/dist/agents/bmad-orchestrator.txt +1 -1
- package/dist/agents/pm.txt +20 -20
- package/dist/agents/po.txt +11 -11
- package/dist/agents/qa.txt +275 -618
- package/dist/agents/sm.txt +11 -11
- package/dist/agents/ux-expert.txt +23 -23
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +109 -109
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.txt +75 -77
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.txt +41 -41
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +483 -474
- package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-architect.txt +1 -1
- package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-designer.txt +149 -149
- package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-sm.txt +20 -20
- package/dist/expansion-packs/bmad-2d-unity-game-dev/teams/unity-2d-game-team.txt +371 -358
- package/dist/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +25 -25
- package/dist/teams/team-all.txt +581 -881
- package/dist/teams/team-fullstack.txt +316 -273
- package/dist/teams/team-ide-minimal.txt +276 -619
- package/dist/teams/team-no-ui.txt +281 -238
- package/docs/versioning-and-releases.md +114 -44
- package/eslint.config.mjs +119 -0
- package/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.4 Deployment Configuration/1.4.2 - cloudbuild.yaml +26 -26
- package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.md +4 -4
- package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.md +1 -1
- package/expansion-packs/bmad-2d-phaser-game-dev/data/development-guidelines.md +26 -28
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.yaml +50 -50
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-brief-tmpl.yaml +23 -23
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-design-doc-tmpl.yaml +24 -24
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-story-tmpl.yaml +42 -42
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/level-design-doc-tmpl.yaml +65 -65
- package/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-dev-greenfield.yaml +5 -5
- package/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-prototype.yaml +1 -1
- package/expansion-packs/bmad-2d-unity-game-dev/agents/game-developer.md +3 -3
- package/expansion-packs/bmad-2d-unity-game-dev/data/bmad-kb.md +1 -1
- package/expansion-packs/bmad-2d-unity-game-dev/templates/game-brief-tmpl.yaml +23 -23
- package/expansion-packs/bmad-2d-unity-game-dev/templates/game-design-doc-tmpl.yaml +63 -63
- package/expansion-packs/bmad-2d-unity-game-dev/templates/game-story-tmpl.yaml +20 -20
- package/expansion-packs/bmad-2d-unity-game-dev/templates/level-design-doc-tmpl.yaml +65 -65
- package/expansion-packs/bmad-2d-unity-game-dev/workflows/game-dev-greenfield.yaml +5 -5
- package/expansion-packs/bmad-2d-unity-game-dev/workflows/game-prototype.yaml +1 -1
- package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.yaml +20 -20
- package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.yaml +7 -7
- package/package.json +62 -39
- package/prettier.config.mjs +32 -0
- package/release_notes.md +30 -0
- package/tools/bmad-npx-wrapper.js +10 -10
- package/tools/builders/web-builder.js +124 -130
- package/tools/bump-all-versions.js +42 -33
- package/tools/bump-expansion-version.js +23 -16
- package/tools/cli.js +10 -12
- package/tools/flattener/aggregate.js +10 -10
- package/tools/flattener/binary.js +44 -17
- package/tools/flattener/discovery.js +19 -18
- package/tools/flattener/files.js +6 -6
- package/tools/flattener/ignoreRules.js +125 -125
- package/tools/flattener/main.js +201 -304
- package/tools/flattener/projectRoot.js +75 -73
- package/tools/flattener/prompts.js +9 -9
- package/tools/flattener/stats.helpers.js +131 -67
- package/tools/flattener/stats.js +3 -3
- package/tools/flattener/test-matrix.js +201 -193
- package/tools/flattener/xml.js +33 -31
- package/tools/installer/bin/bmad.js +130 -89
- package/tools/installer/config/ide-agent-config.yaml +1 -1
- package/tools/installer/config/install.config.yaml +2 -2
- package/tools/installer/lib/config-loader.js +46 -42
- package/tools/installer/lib/file-manager.js +91 -113
- package/tools/installer/lib/ide-base-setup.js +57 -56
- package/tools/installer/lib/ide-setup.js +375 -343
- package/tools/installer/lib/installer.js +875 -714
- package/tools/installer/lib/memory-profiler.js +54 -53
- package/tools/installer/lib/module-manager.js +19 -15
- package/tools/installer/lib/resource-locator.js +26 -28
- package/tools/installer/package.json +19 -19
- package/tools/lib/dependency-resolver.js +26 -30
- package/tools/lib/yaml-utils.js +7 -7
- package/tools/preview-release-notes.js +66 -0
- package/tools/shared/bannerArt.js +3 -3
- package/tools/sync-installer-version.js +7 -9
- package/tools/update-expansion-version.js +14 -15
- package/tools/upgraders/v3-to-v4-upgrader.js +203 -294
- package/tools/version-bump.js +41 -26
- package/tools/yaml-format.js +56 -43
- package/.github/workflows/promote-to-stable.yml +0 -144
- package/.github/workflows/release.yaml +0 -60
- package/.releaserc.json +0 -21
- package/tools/semantic-release-sync-installer.js +0 -30
|
@@ -1,77 +1,147 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Versioning and Releases
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
BMad Method uses a simplified release system with manual control and automatic release notes generation.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 🚀 Release Workflow
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Command Line Release (Recommended)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
The fastest way to create a release with beautiful release notes:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
# Preview what will be in the release
|
|
13
|
+
npm run preview:release
|
|
14
|
+
|
|
15
|
+
# Create a release
|
|
16
|
+
npm run release:patch # 5.1.0 → 5.1.1 (bug fixes)
|
|
17
|
+
npm run release:minor # 5.1.0 → 5.2.0 (new features)
|
|
18
|
+
npm run release:major # 5.1.0 → 6.0.0 (breaking changes)
|
|
19
|
+
|
|
20
|
+
# Watch the release process
|
|
21
|
+
npm run release:watch
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### One-Liner Release
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm run preview:release && npm run release:minor && npm run release:watch
|
|
15
28
|
```
|
|
16
29
|
|
|
17
|
-
|
|
30
|
+
## 📝 What Happens Automatically
|
|
18
31
|
|
|
19
|
-
When you
|
|
32
|
+
When you trigger a release, the GitHub Actions workflow automatically:
|
|
20
33
|
|
|
21
|
-
1. ✅
|
|
22
|
-
2. ✅
|
|
23
|
-
3. ✅
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
34
|
+
1. ✅ **Validates** - Runs tests, linting, and formatting checks
|
|
35
|
+
2. ✅ **Bumps Version** - Updates `package.json` and installer version
|
|
36
|
+
3. ✅ **Generates Release Notes** - Categorizes commits since last release:
|
|
37
|
+
- ✨ **New Features** (`feat:`, `Feature:`)
|
|
38
|
+
- 🐛 **Bug Fixes** (`fix:`, `Fix:`)
|
|
39
|
+
- 🔧 **Maintenance** (`chore:`, `Chore:`)
|
|
40
|
+
- 📦 **Other Changes** (everything else)
|
|
41
|
+
4. ✅ **Creates Git Tag** - Tags the release version
|
|
42
|
+
5. ✅ **Publishes to NPM** - With `@latest` tag for user installations
|
|
43
|
+
6. ✅ **Creates GitHub Release** - With formatted release notes
|
|
27
44
|
|
|
28
|
-
|
|
45
|
+
## 📋 Sample Release Notes
|
|
29
46
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
47
|
+
The workflow automatically generates professional release notes like this:
|
|
48
|
+
|
|
49
|
+
````markdown
|
|
50
|
+
## 🚀 What's New in v5.2.0
|
|
51
|
+
|
|
52
|
+
### ✨ New Features
|
|
53
|
+
|
|
54
|
+
- feat: add team collaboration mode
|
|
55
|
+
- feat: enhance CLI with interactive prompts
|
|
56
|
+
|
|
57
|
+
### 🐛 Bug Fixes
|
|
58
|
+
|
|
59
|
+
- fix: resolve installation path issues
|
|
60
|
+
- fix: handle edge cases in agent loading
|
|
61
|
+
|
|
62
|
+
### 🔧 Maintenance
|
|
63
|
+
|
|
64
|
+
- chore: update dependencies
|
|
65
|
+
- chore: improve error messages
|
|
66
|
+
|
|
67
|
+
## 📦 Installation
|
|
35
68
|
|
|
36
|
-
|
|
37
|
-
|
|
69
|
+
```bash
|
|
70
|
+
npx bmad-method install
|
|
38
71
|
```
|
|
72
|
+
````
|
|
73
|
+
|
|
74
|
+
**Full Changelog**: https://github.com/bmadcode/BMAD-METHOD/compare/v5.1.0...v5.2.0
|
|
39
75
|
|
|
40
|
-
|
|
76
|
+
````
|
|
41
77
|
|
|
42
|
-
|
|
78
|
+
## 🎯 User Installation
|
|
79
|
+
|
|
80
|
+
After any release, users can immediately get the new version with:
|
|
43
81
|
|
|
44
82
|
```bash
|
|
45
|
-
|
|
46
|
-
docs: fix typo in readme # No release
|
|
47
|
-
style: format code # No release
|
|
48
|
-
test: add unit tests # No release
|
|
83
|
+
npx bmad-method install # Always gets latest release
|
|
49
84
|
```
|
|
50
85
|
|
|
51
|
-
|
|
86
|
+
## 📊 Preview Before Release
|
|
87
|
+
|
|
88
|
+
Always preview what will be included in your release:
|
|
52
89
|
|
|
53
90
|
```bash
|
|
54
|
-
npm run release
|
|
91
|
+
npm run preview:release
|
|
55
92
|
```
|
|
56
93
|
|
|
57
|
-
|
|
94
|
+
This shows:
|
|
95
|
+
|
|
96
|
+
- Commits since last release
|
|
97
|
+
- Categorized changes
|
|
98
|
+
- Estimated next version
|
|
99
|
+
- Release notes preview
|
|
100
|
+
|
|
101
|
+
## 🔧 Manual Release (GitHub UI)
|
|
102
|
+
|
|
103
|
+
You can also trigger releases through GitHub Actions:
|
|
104
|
+
|
|
105
|
+
1. Go to **GitHub Actions** → **Manual Release**
|
|
106
|
+
2. Click **"Run workflow"**
|
|
107
|
+
3. Choose version bump type (patch/minor/major)
|
|
108
|
+
4. Everything else happens automatically
|
|
58
109
|
|
|
59
|
-
##
|
|
110
|
+
## 📈 Version Strategy
|
|
60
111
|
|
|
61
|
-
|
|
112
|
+
- **Patch** (5.1.0 → 5.1.1): Bug fixes, minor improvements
|
|
113
|
+
- **Minor** (5.1.0 → 5.2.0): New features, enhancements
|
|
114
|
+
- **Major** (5.1.0 → 6.0.0): Breaking changes, major redesigns
|
|
62
115
|
|
|
63
|
-
|
|
116
|
+
## 🛠️ Development Workflow
|
|
117
|
+
|
|
118
|
+
1. **Develop Freely** - Merge PRs to main without triggering releases
|
|
119
|
+
2. **Test Unreleased Changes** - Clone repo to test latest main branch
|
|
120
|
+
3. **Release When Ready** - Use command line or GitHub Actions to cut releases
|
|
121
|
+
4. **Users Get Updates** - Via simple `npx bmad-method install` command
|
|
122
|
+
|
|
123
|
+
This gives you complete control over when releases happen while automating all the tedious parts like version bumping, release notes, and publishing.
|
|
124
|
+
|
|
125
|
+
## 🔍 Troubleshooting
|
|
126
|
+
|
|
127
|
+
### Check Release Status
|
|
64
128
|
|
|
65
129
|
```bash
|
|
66
|
-
|
|
67
|
-
npm
|
|
68
|
-
|
|
130
|
+
gh run list --workflow="Manual Release"
|
|
131
|
+
npm view bmad-method dist-tags
|
|
132
|
+
git tag -l | sort -V | tail -5
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### View Latest Release
|
|
69
136
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
137
|
+
```bash
|
|
138
|
+
gh release view --web
|
|
139
|
+
npm view bmad-method versions --json
|
|
73
140
|
```
|
|
74
141
|
|
|
75
|
-
###
|
|
142
|
+
### If Release Fails
|
|
76
143
|
|
|
77
|
-
|
|
144
|
+
- Check GitHub Actions logs: `gh run view <run-id> --log-failed`
|
|
145
|
+
- Verify NPM tokens are configured
|
|
146
|
+
- Ensure branch protection allows workflow pushes
|
|
147
|
+
````
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import js from '@eslint/js';
|
|
2
|
+
import eslintConfigPrettier from 'eslint-config-prettier/flat';
|
|
3
|
+
import nodePlugin from 'eslint-plugin-n';
|
|
4
|
+
import unicorn from 'eslint-plugin-unicorn';
|
|
5
|
+
import yml from 'eslint-plugin-yml';
|
|
6
|
+
|
|
7
|
+
export default [
|
|
8
|
+
// Global ignores for files/folders that should not be linted
|
|
9
|
+
{
|
|
10
|
+
ignores: ['dist/**', 'coverage/**', '**/*.min.js'],
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
// Base JavaScript recommended rules
|
|
14
|
+
js.configs.recommended,
|
|
15
|
+
|
|
16
|
+
// Node.js rules
|
|
17
|
+
...nodePlugin.configs['flat/mixed-esm-and-cjs'],
|
|
18
|
+
|
|
19
|
+
// Unicorn rules (modern best practices)
|
|
20
|
+
unicorn.configs.recommended,
|
|
21
|
+
|
|
22
|
+
// YAML linting
|
|
23
|
+
...yml.configs['flat/recommended'],
|
|
24
|
+
|
|
25
|
+
// Place Prettier last to disable conflicting stylistic rules
|
|
26
|
+
eslintConfigPrettier,
|
|
27
|
+
|
|
28
|
+
// Project-specific tweaks
|
|
29
|
+
{
|
|
30
|
+
rules: {
|
|
31
|
+
// Allow console for CLI tools in this repo
|
|
32
|
+
'no-console': 'off',
|
|
33
|
+
// Enforce .yaml file extension for consistency
|
|
34
|
+
'yml/file-extension': [
|
|
35
|
+
'error',
|
|
36
|
+
{
|
|
37
|
+
extension: 'yaml',
|
|
38
|
+
caseSensitive: true,
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
// Prefer double quotes in YAML wherever quoting is used, but allow the other to avoid escapes
|
|
42
|
+
'yml/quotes': [
|
|
43
|
+
'error',
|
|
44
|
+
{
|
|
45
|
+
prefer: 'double',
|
|
46
|
+
avoidEscape: true,
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
// Relax some Unicorn rules that are too opinionated for this codebase
|
|
50
|
+
'unicorn/prevent-abbreviations': 'off',
|
|
51
|
+
'unicorn/no-null': 'off',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
// CLI/CommonJS scripts under tools/**
|
|
56
|
+
{
|
|
57
|
+
files: ['tools/**/*.js'],
|
|
58
|
+
rules: {
|
|
59
|
+
// Allow CommonJS patterns for Node CLI scripts
|
|
60
|
+
'unicorn/prefer-module': 'off',
|
|
61
|
+
'unicorn/import-style': 'off',
|
|
62
|
+
'unicorn/no-process-exit': 'off',
|
|
63
|
+
'n/no-process-exit': 'off',
|
|
64
|
+
'unicorn/no-await-expression-member': 'off',
|
|
65
|
+
'unicorn/prefer-top-level-await': 'off',
|
|
66
|
+
// Avoid failing CI on incidental unused vars in internal scripts
|
|
67
|
+
'no-unused-vars': 'off',
|
|
68
|
+
// Reduce style-only churn in internal tools
|
|
69
|
+
'unicorn/prefer-ternary': 'off',
|
|
70
|
+
'unicorn/filename-case': 'off',
|
|
71
|
+
'unicorn/no-array-reduce': 'off',
|
|
72
|
+
'unicorn/no-array-callback-reference': 'off',
|
|
73
|
+
'unicorn/consistent-function-scoping': 'off',
|
|
74
|
+
'n/no-extraneous-require': 'off',
|
|
75
|
+
'n/no-extraneous-import': 'off',
|
|
76
|
+
'n/no-unpublished-require': 'off',
|
|
77
|
+
'n/no-unpublished-import': 'off',
|
|
78
|
+
// Some scripts intentionally use globals provided at runtime
|
|
79
|
+
'no-undef': 'off',
|
|
80
|
+
// Additional relaxed rules for legacy/internal scripts
|
|
81
|
+
'no-useless-catch': 'off',
|
|
82
|
+
'unicorn/prefer-number-properties': 'off',
|
|
83
|
+
'no-unreachable': 'off',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
// ESLint config file should not be checked for publish-related Node rules
|
|
88
|
+
{
|
|
89
|
+
files: ['eslint.config.mjs'],
|
|
90
|
+
rules: {
|
|
91
|
+
'n/no-unpublished-import': 'off',
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
// YAML workflow templates allow empty mapping values intentionally
|
|
96
|
+
{
|
|
97
|
+
files: ['bmad-core/workflows/**/*.yaml'],
|
|
98
|
+
rules: {
|
|
99
|
+
'yml/no-empty-mapping-value': 'off',
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
// GitHub workflow files in this repo may use empty mapping values
|
|
104
|
+
{
|
|
105
|
+
files: ['.github/workflows/**/*.yaml'],
|
|
106
|
+
rules: {
|
|
107
|
+
'yml/no-empty-mapping-value': 'off',
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
// Other GitHub YAML files may intentionally use empty values and reserved filenames
|
|
112
|
+
{
|
|
113
|
+
files: ['.github/**/*.yaml'],
|
|
114
|
+
rules: {
|
|
115
|
+
'yml/no-empty-mapping-value': 'off',
|
|
116
|
+
'unicorn/filename-case': 'off',
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
];
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
steps:
|
|
2
|
-
# Build the container image
|
|
3
|
-
- name:
|
|
4
|
-
args: [
|
|
5
|
-
|
|
6
|
-
# Push the container image to Container Registry
|
|
7
|
-
- name:
|
|
8
|
-
args: [
|
|
9
|
-
|
|
10
|
-
# Deploy container image to Cloud Run
|
|
11
|
-
- name:
|
|
12
|
-
entrypoint: gcloud
|
|
13
|
-
args:
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
images:
|
|
26
|
-
-
|
|
1
|
+
steps:
|
|
2
|
+
# Build the container image
|
|
3
|
+
- name: "gcr.io/cloud-builders/docker"
|
|
4
|
+
args: ["build", "-t", "gcr.io/{{PROJECT_ID}}/{{COMPANY_NAME}}-ai-agents:$COMMIT_SHA", "."]
|
|
5
|
+
|
|
6
|
+
# Push the container image to Container Registry
|
|
7
|
+
- name: "gcr.io/cloud-builders/docker"
|
|
8
|
+
args: ["push", "gcr.io/{{PROJECT_ID}}/{{COMPANY_NAME}}-ai-agents:$COMMIT_SHA"]
|
|
9
|
+
|
|
10
|
+
# Deploy container image to Cloud Run
|
|
11
|
+
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
|
|
12
|
+
entrypoint: gcloud
|
|
13
|
+
args:
|
|
14
|
+
- "run"
|
|
15
|
+
- "deploy"
|
|
16
|
+
- "{{COMPANY_NAME}}-ai-agents"
|
|
17
|
+
- "--image"
|
|
18
|
+
- "gcr.io/{{PROJECT_ID}}/{{COMPANY_NAME}}-ai-agents:$COMMIT_SHA"
|
|
19
|
+
- "--region"
|
|
20
|
+
- "{{LOCATION}}"
|
|
21
|
+
- "--platform"
|
|
22
|
+
- "managed"
|
|
23
|
+
- "--allow-unauthenticated"
|
|
24
|
+
|
|
25
|
+
images:
|
|
26
|
+
- "gcr.io/{{PROJECT_ID}}/{{COMPANY_NAME}}-ai-agents:$COMMIT_SHA"
|
|
@@ -60,10 +60,10 @@ commands:
|
|
|
60
60
|
task-execution:
|
|
61
61
|
flow: Read story → Implement game feature → Write tests → Pass tests → Update [x] → Next task
|
|
62
62
|
updates-ONLY:
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
63
|
+
- 'Checkboxes: [ ] not started | [-] in progress | [x] complete'
|
|
64
|
+
- 'Debug Log: | Task | File | Change | Reverted? |'
|
|
65
|
+
- 'Completion Notes: Deviations only, <50 words'
|
|
66
|
+
- 'Change Log: Requirement changes only'
|
|
67
67
|
blocking: Unapproved deps | Ambiguous after story check | 3 failures | Missing game config
|
|
68
68
|
done: Game feature works + Tests pass + 60 FPS + No lint errors + Follows Phaser 3 best practices
|
|
69
69
|
dependencies:
|
|
@@ -27,7 +27,7 @@ activation-instructions:
|
|
|
27
27
|
- When listing tasks/templates or presenting options during conversations, always show as numbered options list, allowing the user to type a number to select or execute
|
|
28
28
|
- STAY IN CHARACTER!
|
|
29
29
|
- CRITICAL: On activation, ONLY greet user and then HALT to await user requested assistance or given commands. ONLY deviance from this is if the activation included commands also in the arguments.
|
|
30
|
-
-
|
|
30
|
+
- 'CRITICAL RULE: You are ONLY allowed to create/modify story files - NEVER implement! If asked to implement, tell user they MUST switch to Game Developer Agent'
|
|
31
31
|
agent:
|
|
32
32
|
name: Jordan
|
|
33
33
|
id: game-sm
|
|
@@ -73,7 +73,7 @@ interface GameState {
|
|
|
73
73
|
interface GameSettings {
|
|
74
74
|
musicVolume: number;
|
|
75
75
|
sfxVolume: number;
|
|
76
|
-
difficulty:
|
|
76
|
+
difficulty: 'easy' | 'normal' | 'hard';
|
|
77
77
|
controls: ControlScheme;
|
|
78
78
|
}
|
|
79
79
|
```
|
|
@@ -114,12 +114,12 @@ class GameScene extends Phaser.Scene {
|
|
|
114
114
|
private inputManager!: InputManager;
|
|
115
115
|
|
|
116
116
|
constructor() {
|
|
117
|
-
super({ key:
|
|
117
|
+
super({ key: 'GameScene' });
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
preload(): void {
|
|
121
121
|
// Load only scene-specific assets
|
|
122
|
-
this.load.image(
|
|
122
|
+
this.load.image('player', 'assets/player.png');
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
create(data: SceneData): void {
|
|
@@ -144,7 +144,7 @@ class GameScene extends Phaser.Scene {
|
|
|
144
144
|
this.inputManager.destroy();
|
|
145
145
|
|
|
146
146
|
// Remove event listeners
|
|
147
|
-
this.events.off(
|
|
147
|
+
this.events.off('*');
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
```
|
|
@@ -153,13 +153,13 @@ class GameScene extends Phaser.Scene {
|
|
|
153
153
|
|
|
154
154
|
```typescript
|
|
155
155
|
// Proper scene transitions with data
|
|
156
|
-
this.scene.start(
|
|
156
|
+
this.scene.start('NextScene', {
|
|
157
157
|
playerScore: this.playerScore,
|
|
158
158
|
currentLevel: this.currentLevel + 1,
|
|
159
159
|
});
|
|
160
160
|
|
|
161
161
|
// Scene overlays for UI
|
|
162
|
-
this.scene.launch(
|
|
162
|
+
this.scene.launch('PauseMenuScene');
|
|
163
163
|
this.scene.pause();
|
|
164
164
|
```
|
|
165
165
|
|
|
@@ -203,7 +203,7 @@ class Player extends GameEntity {
|
|
|
203
203
|
private health!: HealthComponent;
|
|
204
204
|
|
|
205
205
|
constructor(scene: Phaser.Scene, x: number, y: number) {
|
|
206
|
-
super(scene, x, y,
|
|
206
|
+
super(scene, x, y, 'player');
|
|
207
207
|
|
|
208
208
|
this.movement = this.addComponent(new MovementComponent(this));
|
|
209
209
|
this.health = this.addComponent(new HealthComponent(this, 100));
|
|
@@ -223,7 +223,7 @@ class GameManager {
|
|
|
223
223
|
|
|
224
224
|
constructor(scene: Phaser.Scene) {
|
|
225
225
|
if (GameManager.instance) {
|
|
226
|
-
throw new Error(
|
|
226
|
+
throw new Error('GameManager already exists!');
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
this.scene = scene;
|
|
@@ -233,7 +233,7 @@ class GameManager {
|
|
|
233
233
|
|
|
234
234
|
static getInstance(): GameManager {
|
|
235
235
|
if (!GameManager.instance) {
|
|
236
|
-
throw new Error(
|
|
236
|
+
throw new Error('GameManager not initialized!');
|
|
237
237
|
}
|
|
238
238
|
return GameManager.instance;
|
|
239
239
|
}
|
|
@@ -280,7 +280,7 @@ class BulletPool {
|
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
// Pool exhausted - create new bullet
|
|
283
|
-
console.warn(
|
|
283
|
+
console.warn('Bullet pool exhausted, creating new bullet');
|
|
284
284
|
return new Bullet(this.scene, 0, 0);
|
|
285
285
|
}
|
|
286
286
|
|
|
@@ -380,14 +380,12 @@ class InputManager {
|
|
|
380
380
|
}
|
|
381
381
|
|
|
382
382
|
private setupKeyboard(): void {
|
|
383
|
-
this.keys = this.scene.input.keyboard.addKeys(
|
|
384
|
-
"W,A,S,D,SPACE,ESC,UP,DOWN,LEFT,RIGHT",
|
|
385
|
-
);
|
|
383
|
+
this.keys = this.scene.input.keyboard.addKeys('W,A,S,D,SPACE,ESC,UP,DOWN,LEFT,RIGHT');
|
|
386
384
|
}
|
|
387
385
|
|
|
388
386
|
private setupTouch(): void {
|
|
389
|
-
this.scene.input.on(
|
|
390
|
-
this.scene.input.on(
|
|
387
|
+
this.scene.input.on('pointerdown', this.handlePointerDown, this);
|
|
388
|
+
this.scene.input.on('pointerup', this.handlePointerUp, this);
|
|
391
389
|
}
|
|
392
390
|
|
|
393
391
|
update(): void {
|
|
@@ -414,9 +412,9 @@ class InputManager {
|
|
|
414
412
|
class AssetManager {
|
|
415
413
|
loadAssets(): Promise<void> {
|
|
416
414
|
return new Promise((resolve, reject) => {
|
|
417
|
-
this.scene.load.on(
|
|
418
|
-
this.scene.load.on(
|
|
419
|
-
this.scene.load.on(
|
|
415
|
+
this.scene.load.on('filecomplete', this.handleFileComplete, this);
|
|
416
|
+
this.scene.load.on('loaderror', this.handleLoadError, this);
|
|
417
|
+
this.scene.load.on('complete', () => resolve());
|
|
420
418
|
|
|
421
419
|
this.scene.load.start();
|
|
422
420
|
});
|
|
@@ -432,8 +430,8 @@ class AssetManager {
|
|
|
432
430
|
private loadFallbackAsset(key: string): void {
|
|
433
431
|
// Load placeholder or default assets
|
|
434
432
|
switch (key) {
|
|
435
|
-
case
|
|
436
|
-
this.scene.load.image(
|
|
433
|
+
case 'player':
|
|
434
|
+
this.scene.load.image('player', 'assets/defaults/default-player.png');
|
|
437
435
|
break;
|
|
438
436
|
default:
|
|
439
437
|
console.warn(`No fallback for asset: ${key}`);
|
|
@@ -460,11 +458,11 @@ class GameSystem {
|
|
|
460
458
|
|
|
461
459
|
private attemptRecovery(context: string): void {
|
|
462
460
|
switch (context) {
|
|
463
|
-
case
|
|
461
|
+
case 'update':
|
|
464
462
|
// Reset system state
|
|
465
463
|
this.reset();
|
|
466
464
|
break;
|
|
467
|
-
case
|
|
465
|
+
case 'render':
|
|
468
466
|
// Disable visual effects
|
|
469
467
|
this.disableEffects();
|
|
470
468
|
break;
|
|
@@ -484,7 +482,7 @@ class GameSystem {
|
|
|
484
482
|
|
|
485
483
|
```typescript
|
|
486
484
|
// Example test for game mechanics
|
|
487
|
-
describe(
|
|
485
|
+
describe('HealthComponent', () => {
|
|
488
486
|
let healthComponent: HealthComponent;
|
|
489
487
|
|
|
490
488
|
beforeEach(() => {
|
|
@@ -492,18 +490,18 @@ describe("HealthComponent", () => {
|
|
|
492
490
|
healthComponent = new HealthComponent(mockEntity, 100);
|
|
493
491
|
});
|
|
494
492
|
|
|
495
|
-
test(
|
|
493
|
+
test('should initialize with correct health', () => {
|
|
496
494
|
expect(healthComponent.currentHealth).toBe(100);
|
|
497
495
|
expect(healthComponent.maxHealth).toBe(100);
|
|
498
496
|
});
|
|
499
497
|
|
|
500
|
-
test(
|
|
498
|
+
test('should handle damage correctly', () => {
|
|
501
499
|
healthComponent.takeDamage(25);
|
|
502
500
|
expect(healthComponent.currentHealth).toBe(75);
|
|
503
501
|
expect(healthComponent.isAlive()).toBe(true);
|
|
504
502
|
});
|
|
505
503
|
|
|
506
|
-
test(
|
|
504
|
+
test('should handle death correctly', () => {
|
|
507
505
|
healthComponent.takeDamage(150);
|
|
508
506
|
expect(healthComponent.currentHealth).toBe(0);
|
|
509
507
|
expect(healthComponent.isAlive()).toBe(false);
|
|
@@ -516,7 +514,7 @@ describe("HealthComponent", () => {
|
|
|
516
514
|
**Scene Testing:**
|
|
517
515
|
|
|
518
516
|
```typescript
|
|
519
|
-
describe(
|
|
517
|
+
describe('GameScene Integration', () => {
|
|
520
518
|
let scene: GameScene;
|
|
521
519
|
let mockGame: Phaser.Game;
|
|
522
520
|
|
|
@@ -526,7 +524,7 @@ describe("GameScene Integration", () => {
|
|
|
526
524
|
scene = new GameScene();
|
|
527
525
|
});
|
|
528
526
|
|
|
529
|
-
test(
|
|
527
|
+
test('should initialize all systems', () => {
|
|
530
528
|
scene.create({});
|
|
531
529
|
|
|
532
530
|
expect(scene.gameManager).toBeDefined();
|