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.
Files changed (131) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +3 -3
  2. package/.github/ISSUE_TEMPLATE/feature_request.md +3 -3
  3. package/.github/workflows/discord.yaml +11 -2
  4. package/.github/workflows/format-check.yaml +42 -0
  5. package/.github/workflows/manual-release.yaml +173 -0
  6. package/.husky/pre-commit +3 -0
  7. package/.vscode/settings.json +26 -1
  8. package/CHANGELOG.md +0 -11
  9. package/README.md +2 -0
  10. package/bmad-core/agent-teams/team-all.yaml +1 -1
  11. package/bmad-core/agents/bmad-orchestrator.md +1 -1
  12. package/bmad-core/agents/dev.md +4 -4
  13. package/bmad-core/data/bmad-kb.md +1 -1
  14. package/bmad-core/data/test-levels-framework.md +12 -12
  15. package/bmad-core/tasks/facilitate-brainstorming-session.md +1 -1
  16. package/bmad-core/tasks/nfr-assess.md +10 -10
  17. package/bmad-core/tasks/qa-gate.md +23 -23
  18. package/bmad-core/tasks/review-story.md +18 -18
  19. package/bmad-core/tasks/risk-profile.md +25 -25
  20. package/bmad-core/tasks/test-design.md +9 -9
  21. package/bmad-core/tasks/trace-requirements.md +21 -21
  22. package/bmad-core/templates/architecture-tmpl.yaml +49 -49
  23. package/bmad-core/templates/brainstorming-output-tmpl.yaml +5 -5
  24. package/bmad-core/templates/brownfield-architecture-tmpl.yaml +31 -31
  25. package/bmad-core/templates/brownfield-prd-tmpl.yaml +13 -13
  26. package/bmad-core/templates/competitor-analysis-tmpl.yaml +19 -6
  27. package/bmad-core/templates/front-end-architecture-tmpl.yaml +21 -9
  28. package/bmad-core/templates/front-end-spec-tmpl.yaml +24 -24
  29. package/bmad-core/templates/fullstack-architecture-tmpl.yaml +122 -104
  30. package/bmad-core/templates/market-research-tmpl.yaml +2 -2
  31. package/bmad-core/templates/prd-tmpl.yaml +9 -9
  32. package/bmad-core/templates/project-brief-tmpl.yaml +4 -4
  33. package/bmad-core/templates/qa-gate-tmpl.yaml +9 -9
  34. package/bmad-core/templates/story-tmpl.yaml +12 -12
  35. package/bmad-core/workflows/brownfield-fullstack.yaml +9 -9
  36. package/bmad-core/workflows/brownfield-service.yaml +1 -1
  37. package/bmad-core/workflows/brownfield-ui.yaml +1 -1
  38. package/bmad-core/workflows/greenfield-fullstack.yaml +1 -1
  39. package/bmad-core/workflows/greenfield-service.yaml +1 -1
  40. package/bmad-core/workflows/greenfield-ui.yaml +1 -1
  41. package/common/utils/bmad-doc-template.md +5 -5
  42. package/dist/agents/analyst.txt +28 -15
  43. package/dist/agents/architect.txt +220 -190
  44. package/dist/agents/bmad-master.txt +298 -255
  45. package/dist/agents/bmad-orchestrator.txt +1 -1
  46. package/dist/agents/pm.txt +20 -20
  47. package/dist/agents/po.txt +11 -11
  48. package/dist/agents/qa.txt +275 -618
  49. package/dist/agents/sm.txt +11 -11
  50. package/dist/agents/ux-expert.txt +23 -23
  51. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +109 -109
  52. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.txt +75 -77
  53. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.txt +41 -41
  54. package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +483 -474
  55. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-architect.txt +1 -1
  56. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-designer.txt +149 -149
  57. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-sm.txt +20 -20
  58. package/dist/expansion-packs/bmad-2d-unity-game-dev/teams/unity-2d-game-team.txt +371 -358
  59. package/dist/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +25 -25
  60. package/dist/teams/team-all.txt +581 -881
  61. package/dist/teams/team-fullstack.txt +316 -273
  62. package/dist/teams/team-ide-minimal.txt +276 -619
  63. package/dist/teams/team-no-ui.txt +281 -238
  64. package/docs/versioning-and-releases.md +114 -44
  65. package/eslint.config.mjs +119 -0
  66. 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
  67. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.md +4 -4
  68. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.md +1 -1
  69. package/expansion-packs/bmad-2d-phaser-game-dev/data/development-guidelines.md +26 -28
  70. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.yaml +50 -50
  71. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-brief-tmpl.yaml +23 -23
  72. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-design-doc-tmpl.yaml +24 -24
  73. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-story-tmpl.yaml +42 -42
  74. package/expansion-packs/bmad-2d-phaser-game-dev/templates/level-design-doc-tmpl.yaml +65 -65
  75. package/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-dev-greenfield.yaml +5 -5
  76. package/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-prototype.yaml +1 -1
  77. package/expansion-packs/bmad-2d-unity-game-dev/agents/game-developer.md +3 -3
  78. package/expansion-packs/bmad-2d-unity-game-dev/data/bmad-kb.md +1 -1
  79. package/expansion-packs/bmad-2d-unity-game-dev/templates/game-brief-tmpl.yaml +23 -23
  80. package/expansion-packs/bmad-2d-unity-game-dev/templates/game-design-doc-tmpl.yaml +63 -63
  81. package/expansion-packs/bmad-2d-unity-game-dev/templates/game-story-tmpl.yaml +20 -20
  82. package/expansion-packs/bmad-2d-unity-game-dev/templates/level-design-doc-tmpl.yaml +65 -65
  83. package/expansion-packs/bmad-2d-unity-game-dev/workflows/game-dev-greenfield.yaml +5 -5
  84. package/expansion-packs/bmad-2d-unity-game-dev/workflows/game-prototype.yaml +1 -1
  85. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.yaml +20 -20
  86. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.yaml +7 -7
  87. package/package.json +62 -39
  88. package/prettier.config.mjs +32 -0
  89. package/release_notes.md +30 -0
  90. package/tools/bmad-npx-wrapper.js +10 -10
  91. package/tools/builders/web-builder.js +124 -130
  92. package/tools/bump-all-versions.js +42 -33
  93. package/tools/bump-expansion-version.js +23 -16
  94. package/tools/cli.js +10 -12
  95. package/tools/flattener/aggregate.js +10 -10
  96. package/tools/flattener/binary.js +44 -17
  97. package/tools/flattener/discovery.js +19 -18
  98. package/tools/flattener/files.js +6 -6
  99. package/tools/flattener/ignoreRules.js +125 -125
  100. package/tools/flattener/main.js +201 -304
  101. package/tools/flattener/projectRoot.js +75 -73
  102. package/tools/flattener/prompts.js +9 -9
  103. package/tools/flattener/stats.helpers.js +131 -67
  104. package/tools/flattener/stats.js +3 -3
  105. package/tools/flattener/test-matrix.js +201 -193
  106. package/tools/flattener/xml.js +33 -31
  107. package/tools/installer/bin/bmad.js +130 -89
  108. package/tools/installer/config/ide-agent-config.yaml +1 -1
  109. package/tools/installer/config/install.config.yaml +2 -2
  110. package/tools/installer/lib/config-loader.js +46 -42
  111. package/tools/installer/lib/file-manager.js +91 -113
  112. package/tools/installer/lib/ide-base-setup.js +57 -56
  113. package/tools/installer/lib/ide-setup.js +375 -343
  114. package/tools/installer/lib/installer.js +875 -714
  115. package/tools/installer/lib/memory-profiler.js +54 -53
  116. package/tools/installer/lib/module-manager.js +19 -15
  117. package/tools/installer/lib/resource-locator.js +26 -28
  118. package/tools/installer/package.json +19 -19
  119. package/tools/lib/dependency-resolver.js +26 -30
  120. package/tools/lib/yaml-utils.js +7 -7
  121. package/tools/preview-release-notes.js +66 -0
  122. package/tools/shared/bannerArt.js +3 -3
  123. package/tools/sync-installer-version.js +7 -9
  124. package/tools/update-expansion-version.js +14 -15
  125. package/tools/upgraders/v3-to-v4-upgrader.js +203 -294
  126. package/tools/version-bump.js +41 -26
  127. package/tools/yaml-format.js +56 -43
  128. package/.github/workflows/promote-to-stable.yml +0 -144
  129. package/.github/workflows/release.yaml +0 -60
  130. package/.releaserc.json +0 -21
  131. package/tools/semantic-release-sync-installer.js +0 -30
@@ -207,7 +207,7 @@ sections:
207
207
  - id: initial-setup
208
208
  instruction: |
209
209
  This template creates a comprehensive game architecture document specifically for Phaser 3 + TypeScript projects. This should provide the technical foundation for all game development stories and epics.
210
-
210
+
211
211
  If available, review any provided documents: Game Design Document (GDD), Technical Preferences. This architecture should support all game mechanics defined in the GDD.
212
212
 
213
213
  - id: introduction
@@ -215,7 +215,7 @@ sections:
215
215
  instruction: Establish the document's purpose and scope for game development
216
216
  content: |
217
217
  This document outlines the complete technical architecture for {{game_title}}, a 2D game built with Phaser 3 and TypeScript. It serves as the technical foundation for AI-driven game development, ensuring consistency and scalability across all game systems.
218
-
218
+
219
219
  This architecture is designed to support the gameplay mechanics defined in the Game Design Document while maintaining 60 FPS performance and cross-platform compatibility.
220
220
  sections:
221
221
  - id: change-log
@@ -234,7 +234,7 @@ sections:
234
234
  title: Architecture Summary
235
235
  instruction: |
236
236
  Provide a comprehensive overview covering:
237
-
237
+
238
238
  - Game engine choice and configuration
239
239
  - Project structure and organization
240
240
  - Key systems and their interactions
@@ -322,23 +322,23 @@ sections:
322
322
  title: Scene Management System
323
323
  template: |
324
324
  **Purpose:** Handle game flow and scene transitions
325
-
325
+
326
326
  **Key Components:**
327
-
327
+
328
328
  - Scene loading and unloading
329
329
  - Data passing between scenes
330
330
  - Transition effects
331
331
  - Memory management
332
-
332
+
333
333
  **Implementation Requirements:**
334
-
334
+
335
335
  - Preload scene for asset loading
336
336
  - Menu system with navigation
337
337
  - Gameplay scenes with state management
338
338
  - Pause/resume functionality
339
-
339
+
340
340
  **Files to Create:**
341
-
341
+
342
342
  - `src/scenes/BootScene.ts`
343
343
  - `src/scenes/PreloadScene.ts`
344
344
  - `src/scenes/MenuScene.ts`
@@ -348,23 +348,23 @@ sections:
348
348
  title: Game State Management
349
349
  template: |
350
350
  **Purpose:** Track player progress and game status
351
-
351
+
352
352
  **State Categories:**
353
-
353
+
354
354
  - Player progress (levels, unlocks)
355
355
  - Game settings (audio, controls)
356
356
  - Session data (current level, score)
357
357
  - Persistent data (achievements, statistics)
358
-
358
+
359
359
  **Implementation Requirements:**
360
-
360
+
361
361
  - Save/load system with localStorage
362
362
  - State validation and error recovery
363
363
  - Cross-session data persistence
364
364
  - Settings management
365
-
365
+
366
366
  **Files to Create:**
367
-
367
+
368
368
  - `src/systems/GameState.ts`
369
369
  - `src/systems/SaveManager.ts`
370
370
  - `src/types/GameData.ts`
@@ -372,23 +372,23 @@ sections:
372
372
  title: Asset Management System
373
373
  template: |
374
374
  **Purpose:** Efficient loading and management of game assets
375
-
375
+
376
376
  **Asset Categories:**
377
-
377
+
378
378
  - Sprite sheets and animations
379
379
  - Audio files and music
380
380
  - Level data and configurations
381
381
  - UI assets and fonts
382
-
382
+
383
383
  **Implementation Requirements:**
384
-
384
+
385
385
  - Progressive loading strategy
386
386
  - Asset caching and optimization
387
387
  - Error handling for failed loads
388
388
  - Memory management for large assets
389
-
389
+
390
390
  **Files to Create:**
391
-
391
+
392
392
  - `src/systems/AssetManager.ts`
393
393
  - `src/config/AssetConfig.ts`
394
394
  - `src/utils/AssetLoader.ts`
@@ -396,23 +396,23 @@ sections:
396
396
  title: Input Management System
397
397
  template: |
398
398
  **Purpose:** Handle all player input across platforms
399
-
399
+
400
400
  **Input Types:**
401
-
401
+
402
402
  - Keyboard controls
403
403
  - Mouse/pointer interaction
404
404
  - Touch gestures (mobile)
405
405
  - Gamepad support (optional)
406
-
406
+
407
407
  **Implementation Requirements:**
408
-
408
+
409
409
  - Input mapping and configuration
410
410
  - Touch-friendly mobile controls
411
411
  - Input buffering for responsive gameplay
412
412
  - Customizable control schemes
413
-
413
+
414
414
  **Files to Create:**
415
-
415
+
416
416
  - `src/systems/InputManager.ts`
417
417
  - `src/utils/TouchControls.ts`
418
418
  - `src/types/InputTypes.ts`
@@ -425,19 +425,19 @@ sections:
425
425
  title: "{{mechanic_name}} System"
426
426
  template: |
427
427
  **Purpose:** {{system_purpose}}
428
-
428
+
429
429
  **Core Functionality:**
430
-
430
+
431
431
  - {{feature_1}}
432
432
  - {{feature_2}}
433
433
  - {{feature_3}}
434
-
434
+
435
435
  **Dependencies:** {{required_systems}}
436
-
436
+
437
437
  **Performance Considerations:** {{optimization_notes}}
438
-
438
+
439
439
  **Files to Create:**
440
-
440
+
441
441
  - `src/systems/{{system_name}}.ts`
442
442
  - `src/gameObjects/{{related_object}}.ts`
443
443
  - `src/types/{{system_types}}.ts`
@@ -445,65 +445,65 @@ sections:
445
445
  title: Physics & Collision System
446
446
  template: |
447
447
  **Physics Engine:** {{physics_choice}} (Arcade Physics/Matter.js)
448
-
448
+
449
449
  **Collision Categories:**
450
-
450
+
451
451
  - Player collision
452
452
  - Enemy interactions
453
453
  - Environmental objects
454
454
  - Collectibles and items
455
-
455
+
456
456
  **Implementation Requirements:**
457
-
457
+
458
458
  - Optimized collision detection
459
459
  - Physics body management
460
460
  - Collision callbacks and events
461
461
  - Performance monitoring
462
-
462
+
463
463
  **Files to Create:**
464
-
464
+
465
465
  - `src/systems/PhysicsManager.ts`
466
466
  - `src/utils/CollisionGroups.ts`
467
467
  - id: audio-system
468
468
  title: Audio System
469
469
  template: |
470
470
  **Audio Requirements:**
471
-
471
+
472
472
  - Background music with looping
473
473
  - Sound effects for actions
474
474
  - Audio settings and volume control
475
475
  - Mobile audio optimization
476
-
476
+
477
477
  **Implementation Features:**
478
-
478
+
479
479
  - Audio sprite management
480
480
  - Dynamic music system
481
481
  - Spatial audio (if applicable)
482
482
  - Audio pooling for performance
483
-
483
+
484
484
  **Files to Create:**
485
-
485
+
486
486
  - `src/systems/AudioManager.ts`
487
487
  - `src/config/AudioConfig.ts`
488
488
  - id: ui-system
489
489
  title: UI System
490
490
  template: |
491
491
  **UI Components:**
492
-
492
+
493
493
  - HUD elements (score, health, etc.)
494
494
  - Menu navigation
495
495
  - Modal dialogs
496
496
  - Settings screens
497
-
497
+
498
498
  **Implementation Requirements:**
499
-
499
+
500
500
  - Responsive layout system
501
501
  - Touch-friendly interface
502
502
  - Keyboard navigation support
503
503
  - Animation and transitions
504
-
504
+
505
505
  **Files to Create:**
506
-
506
+
507
507
  - `src/systems/UIManager.ts`
508
508
  - `src/gameObjects/UI/`
509
509
  - `src/types/UITypes.ts`
@@ -1045,7 +1045,7 @@ interface GameState {
1045
1045
  interface GameSettings {
1046
1046
  musicVolume: number;
1047
1047
  sfxVolume: number;
1048
- difficulty: "easy" | "normal" | "hard";
1048
+ difficulty: 'easy' | 'normal' | 'hard';
1049
1049
  controls: ControlScheme;
1050
1050
  }
1051
1051
  ```
@@ -1086,12 +1086,12 @@ class GameScene extends Phaser.Scene {
1086
1086
  private inputManager!: InputManager;
1087
1087
 
1088
1088
  constructor() {
1089
- super({ key: "GameScene" });
1089
+ super({ key: 'GameScene' });
1090
1090
  }
1091
1091
 
1092
1092
  preload(): void {
1093
1093
  // Load only scene-specific assets
1094
- this.load.image("player", "assets/player.png");
1094
+ this.load.image('player', 'assets/player.png');
1095
1095
  }
1096
1096
 
1097
1097
  create(data: SceneData): void {
@@ -1116,7 +1116,7 @@ class GameScene extends Phaser.Scene {
1116
1116
  this.inputManager.destroy();
1117
1117
 
1118
1118
  // Remove event listeners
1119
- this.events.off("*");
1119
+ this.events.off('*');
1120
1120
  }
1121
1121
  }
1122
1122
  ```
@@ -1125,13 +1125,13 @@ class GameScene extends Phaser.Scene {
1125
1125
 
1126
1126
  ```typescript
1127
1127
  // Proper scene transitions with data
1128
- this.scene.start("NextScene", {
1128
+ this.scene.start('NextScene', {
1129
1129
  playerScore: this.playerScore,
1130
1130
  currentLevel: this.currentLevel + 1,
1131
1131
  });
1132
1132
 
1133
1133
  // Scene overlays for UI
1134
- this.scene.launch("PauseMenuScene");
1134
+ this.scene.launch('PauseMenuScene');
1135
1135
  this.scene.pause();
1136
1136
  ```
1137
1137
 
@@ -1175,7 +1175,7 @@ class Player extends GameEntity {
1175
1175
  private health!: HealthComponent;
1176
1176
 
1177
1177
  constructor(scene: Phaser.Scene, x: number, y: number) {
1178
- super(scene, x, y, "player");
1178
+ super(scene, x, y, 'player');
1179
1179
 
1180
1180
  this.movement = this.addComponent(new MovementComponent(this));
1181
1181
  this.health = this.addComponent(new HealthComponent(this, 100));
@@ -1195,7 +1195,7 @@ class GameManager {
1195
1195
 
1196
1196
  constructor(scene: Phaser.Scene) {
1197
1197
  if (GameManager.instance) {
1198
- throw new Error("GameManager already exists!");
1198
+ throw new Error('GameManager already exists!');
1199
1199
  }
1200
1200
 
1201
1201
  this.scene = scene;
@@ -1205,7 +1205,7 @@ class GameManager {
1205
1205
 
1206
1206
  static getInstance(): GameManager {
1207
1207
  if (!GameManager.instance) {
1208
- throw new Error("GameManager not initialized!");
1208
+ throw new Error('GameManager not initialized!');
1209
1209
  }
1210
1210
  return GameManager.instance;
1211
1211
  }
@@ -1252,7 +1252,7 @@ class BulletPool {
1252
1252
  }
1253
1253
 
1254
1254
  // Pool exhausted - create new bullet
1255
- console.warn("Bullet pool exhausted, creating new bullet");
1255
+ console.warn('Bullet pool exhausted, creating new bullet');
1256
1256
  return new Bullet(this.scene, 0, 0);
1257
1257
  }
1258
1258
 
@@ -1352,14 +1352,12 @@ class InputManager {
1352
1352
  }
1353
1353
 
1354
1354
  private setupKeyboard(): void {
1355
- this.keys = this.scene.input.keyboard.addKeys(
1356
- "W,A,S,D,SPACE,ESC,UP,DOWN,LEFT,RIGHT",
1357
- );
1355
+ this.keys = this.scene.input.keyboard.addKeys('W,A,S,D,SPACE,ESC,UP,DOWN,LEFT,RIGHT');
1358
1356
  }
1359
1357
 
1360
1358
  private setupTouch(): void {
1361
- this.scene.input.on("pointerdown", this.handlePointerDown, this);
1362
- this.scene.input.on("pointerup", this.handlePointerUp, this);
1359
+ this.scene.input.on('pointerdown', this.handlePointerDown, this);
1360
+ this.scene.input.on('pointerup', this.handlePointerUp, this);
1363
1361
  }
1364
1362
 
1365
1363
  update(): void {
@@ -1386,9 +1384,9 @@ class InputManager {
1386
1384
  class AssetManager {
1387
1385
  loadAssets(): Promise<void> {
1388
1386
  return new Promise((resolve, reject) => {
1389
- this.scene.load.on("filecomplete", this.handleFileComplete, this);
1390
- this.scene.load.on("loaderror", this.handleLoadError, this);
1391
- this.scene.load.on("complete", () => resolve());
1387
+ this.scene.load.on('filecomplete', this.handleFileComplete, this);
1388
+ this.scene.load.on('loaderror', this.handleLoadError, this);
1389
+ this.scene.load.on('complete', () => resolve());
1392
1390
 
1393
1391
  this.scene.load.start();
1394
1392
  });
@@ -1404,8 +1402,8 @@ class AssetManager {
1404
1402
  private loadFallbackAsset(key: string): void {
1405
1403
  // Load placeholder or default assets
1406
1404
  switch (key) {
1407
- case "player":
1408
- this.scene.load.image("player", "assets/defaults/default-player.png");
1405
+ case 'player':
1406
+ this.scene.load.image('player', 'assets/defaults/default-player.png');
1409
1407
  break;
1410
1408
  default:
1411
1409
  console.warn(`No fallback for asset: ${key}`);
@@ -1432,11 +1430,11 @@ class GameSystem {
1432
1430
 
1433
1431
  private attemptRecovery(context: string): void {
1434
1432
  switch (context) {
1435
- case "update":
1433
+ case 'update':
1436
1434
  // Reset system state
1437
1435
  this.reset();
1438
1436
  break;
1439
- case "render":
1437
+ case 'render':
1440
1438
  // Disable visual effects
1441
1439
  this.disableEffects();
1442
1440
  break;
@@ -1456,7 +1454,7 @@ class GameSystem {
1456
1454
 
1457
1455
  ```typescript
1458
1456
  // Example test for game mechanics
1459
- describe("HealthComponent", () => {
1457
+ describe('HealthComponent', () => {
1460
1458
  let healthComponent: HealthComponent;
1461
1459
 
1462
1460
  beforeEach(() => {
@@ -1464,18 +1462,18 @@ describe("HealthComponent", () => {
1464
1462
  healthComponent = new HealthComponent(mockEntity, 100);
1465
1463
  });
1466
1464
 
1467
- test("should initialize with correct health", () => {
1465
+ test('should initialize with correct health', () => {
1468
1466
  expect(healthComponent.currentHealth).toBe(100);
1469
1467
  expect(healthComponent.maxHealth).toBe(100);
1470
1468
  });
1471
1469
 
1472
- test("should handle damage correctly", () => {
1470
+ test('should handle damage correctly', () => {
1473
1471
  healthComponent.takeDamage(25);
1474
1472
  expect(healthComponent.currentHealth).toBe(75);
1475
1473
  expect(healthComponent.isAlive()).toBe(true);
1476
1474
  });
1477
1475
 
1478
- test("should handle death correctly", () => {
1476
+ test('should handle death correctly', () => {
1479
1477
  healthComponent.takeDamage(150);
1480
1478
  expect(healthComponent.currentHealth).toBe(0);
1481
1479
  expect(healthComponent.isAlive()).toBe(false);
@@ -1488,7 +1486,7 @@ describe("HealthComponent", () => {
1488
1486
  **Scene Testing:**
1489
1487
 
1490
1488
  ```typescript
1491
- describe("GameScene Integration", () => {
1489
+ describe('GameScene Integration', () => {
1492
1490
  let scene: GameScene;
1493
1491
  let mockGame: Phaser.Game;
1494
1492
 
@@ -1498,7 +1496,7 @@ describe("GameScene Integration", () => {
1498
1496
  scene = new GameScene();
1499
1497
  });
1500
1498
 
1501
- test("should initialize all systems", () => {
1499
+ test('should initialize all systems', () => {
1502
1500
  scene.create({});
1503
1501
 
1504
1502
  expect(scene.gameManager).toBeDefined();
@@ -412,13 +412,13 @@ sections:
412
412
  - id: initial-setup
413
413
  instruction: |
414
414
  This template creates detailed game development stories that are immediately actionable by game developers. Each story should focus on a single, implementable feature that contributes to the overall game functionality.
415
-
415
+
416
416
  Before starting, ensure you have access to:
417
-
417
+
418
418
  - Game Design Document (GDD)
419
419
  - Game Architecture Document
420
420
  - Any existing stories in this epic
421
-
421
+
422
422
  The story should be specific enough that a developer can implement it without requiring additional design decisions.
423
423
 
424
424
  - id: story-header
@@ -467,12 +467,12 @@ sections:
467
467
  title: Files to Create/Modify
468
468
  template: |
469
469
  **New Files:**
470
-
470
+
471
471
  - `{{file_path_1}}` - {{purpose}}
472
472
  - `{{file_path_2}}` - {{purpose}}
473
-
473
+
474
474
  **Modified Files:**
475
-
475
+
476
476
  - `{{existing_file_1}}` - {{changes_needed}}
477
477
  - `{{existing_file_2}}` - {{changes_needed}}
478
478
  - id: class-interface-definitions
@@ -487,15 +487,15 @@ sections:
487
487
  {{property_2}}: {{type}};
488
488
  {{method_1}}({{params}}): {{return_type}};
489
489
  }
490
-
490
+
491
491
  // {{class_name}}
492
492
  class {{class_name}} extends {{phaser_class}} {
493
493
  private {{property}}: {{type}};
494
-
494
+
495
495
  constructor({{params}}) {
496
496
  // Implementation requirements
497
497
  }
498
-
498
+
499
499
  public {{method}}({{params}}): {{return_type}} {
500
500
  // Method requirements
501
501
  }
@@ -505,15 +505,15 @@ sections:
505
505
  instruction: Specify how this feature integrates with existing systems
506
506
  template: |
507
507
  **Scene Integration:**
508
-
508
+
509
509
  - {{scene_name}}: {{integration_details}}
510
-
510
+
511
511
  **System Dependencies:**
512
-
512
+
513
513
  - {{system_name}}: {{dependency_description}}
514
-
514
+
515
515
  **Event Communication:**
516
-
516
+
517
517
  - Emits: `{{event_name}}` when {{condition}}
518
518
  - Listens: `{{event_name}}` to {{response}}
519
519
 
@@ -525,7 +525,7 @@ sections:
525
525
  title: Dev Agent Record
526
526
  template: |
527
527
  **Tasks:**
528
-
528
+
529
529
  - [ ] {{task_1_description}}
530
530
  - [ ] {{task_2_description}}
531
531
  - [ ] {{task_3_description}}
@@ -533,18 +533,18 @@ sections:
533
533
  - [ ] Write unit tests for {{component}}
534
534
  - [ ] Integration testing with {{related_system}}
535
535
  - [ ] Performance testing and optimization
536
-
536
+
537
537
  **Debug Log:**
538
538
  | Task | File | Change | Reverted? |
539
539
  |------|------|--------|-----------|
540
540
  | | | | |
541
-
541
+
542
542
  **Completion Notes:**
543
-
543
+
544
544
  <!-- Only note deviations from requirements, keep under 50 words -->
545
-
545
+
546
546
  **Change Log:**
547
-
547
+
548
548
  <!-- Only requirement changes during implementation -->
549
549
 
550
550
  - id: game-design-context
@@ -552,13 +552,13 @@ sections:
552
552
  instruction: Reference the specific sections of the GDD that this story implements
553
553
  template: |
554
554
  **GDD Reference:** {{section_name}} ({{page_or_section_number}})
555
-
555
+
556
556
  **Game Mechanic:** {{mechanic_name}}
557
-
557
+
558
558
  **Player Experience Goal:** {{experience_description}}
559
-
559
+
560
560
  **Balance Parameters:**
561
-
561
+
562
562
  - {{parameter_1}}: {{value_or_range}}
563
563
  - {{parameter_2}}: {{value_or_range}}
564
564
 
@@ -570,11 +570,11 @@ sections:
570
570
  title: Unit Tests
571
571
  template: |
572
572
  **Test Files:**
573
-
573
+
574
574
  - `tests/{{component_name}}.test.ts`
575
-
575
+
576
576
  **Test Scenarios:**
577
-
577
+
578
578
  - {{test_scenario_1}}
579
579
  - {{test_scenario_2}}
580
580
  - {{edge_case_test}}
@@ -582,12 +582,12 @@ sections:
582
582
  title: Game Testing
583
583
  template: |
584
584
  **Manual Test Cases:**
585
-
585
+
586
586
  1. {{test_case_1_description}}
587
-
587
+
588
588
  - Expected: {{expected_behavior}}
589
589
  - Performance: {{performance_expectation}}
590
-
590
+
591
591
  2. {{test_case_2_description}}
592
592
  - Expected: {{expected_behavior}}
593
593
  - Edge Case: {{edge_case_handling}}
@@ -595,7 +595,7 @@ sections:
595
595
  title: Performance Tests
596
596
  template: |
597
597
  **Metrics to Verify:**
598
-
598
+
599
599
  - Frame rate maintains {{fps_target}} FPS
600
600
  - Memory usage stays under {{memory_limit}}MB
601
601
  - {{feature_specific_performance_metric}}
@@ -605,15 +605,15 @@ sections:
605
605
  instruction: List any dependencies that must be completed before this story can be implemented
606
606
  template: |
607
607
  **Story Dependencies:**
608
-
608
+
609
609
  - {{story_id}}: {{dependency_description}}
610
-
610
+
611
611
  **Technical Dependencies:**
612
-
612
+
613
613
  - {{system_or_file}}: {{requirement}}
614
-
614
+
615
615
  **Asset Dependencies:**
616
-
616
+
617
617
  - {{asset_type}}: {{asset_description}}
618
618
  - Location: `{{asset_path}}`
619
619
 
@@ -636,17 +636,17 @@ sections:
636
636
  instruction: Any additional context, design decisions, or implementation notes
637
637
  template: |
638
638
  **Implementation Notes:**
639
-
639
+
640
640
  - {{note_1}}
641
641
  - {{note_2}}
642
-
642
+
643
643
  **Design Decisions:**
644
-
644
+
645
645
  - {{decision_1}}: {{rationale}}
646
646
  - {{decision_2}}: {{rationale}}
647
-
647
+
648
648
  **Future Considerations:**
649
-
649
+
650
650
  - {{future_enhancement_1}}
651
651
  - {{future_optimization_1}}
652
652
  ==================== END: .bmad-2d-phaser-game-dev/templates/game-story-tmpl.yaml ====================