bmad-method 4.27.0 → 4.27.2

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 (99) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/bmad-core/agent-teams/team-all.yaml +6 -6
  3. package/bmad-core/agent-teams/team-fullstack.yaml +6 -6
  4. package/bmad-core/agent-teams/team-no-ui.yaml +2 -2
  5. package/bmad-core/agents/analyst.md +17 -20
  6. package/bmad-core/agents/architect.md +15 -18
  7. package/bmad-core/agents/bmad-master.md +55 -56
  8. package/bmad-core/agents/bmad-orchestrator.md +24 -23
  9. package/bmad-core/agents/dev.md +10 -10
  10. package/bmad-core/agents/pm.md +17 -20
  11. package/bmad-core/agents/po.md +12 -15
  12. package/bmad-core/agents/qa.md +7 -8
  13. package/bmad-core/agents/sm.md +8 -13
  14. package/bmad-core/agents/ux-expert.md +7 -11
  15. package/bmad-core/core-config.yaml +1 -1
  16. package/bmad-core/templates/architecture-tmpl.yaml +650 -0
  17. package/bmad-core/templates/brainstorming-output-tmpl.yaml +156 -0
  18. package/bmad-core/templates/brownfield-architecture-tmpl.yaml +476 -0
  19. package/bmad-core/templates/brownfield-prd-tmpl.yaml +280 -0
  20. package/bmad-core/templates/competitor-analysis-tmpl.yaml +293 -0
  21. package/bmad-core/templates/front-end-architecture-tmpl.yaml +206 -0
  22. package/bmad-core/templates/front-end-spec-tmpl.yaml +349 -0
  23. package/bmad-core/templates/fullstack-architecture-tmpl.yaml +805 -0
  24. package/bmad-core/templates/market-research-tmpl.yaml +252 -0
  25. package/bmad-core/templates/{prd-tmpl2.yaml → prd-tmpl.yaml} +3 -3
  26. package/bmad-core/templates/project-brief-tmpl.yaml +221 -0
  27. package/bmad-core/templates/story-tmpl.yaml +137 -0
  28. package/common/tasks/create-doc.md +55 -67
  29. package/common/utils/bmad-doc-template.md +29 -0
  30. package/dist/agents/analyst.txt +1004 -1061
  31. package/dist/agents/architect.txt +2460 -2872
  32. package/dist/agents/bmad-master.txt +3842 -4354
  33. package/dist/agents/bmad-orchestrator.txt +211 -87
  34. package/dist/agents/dev.txt +4 -8
  35. package/dist/agents/pm.txt +557 -587
  36. package/dist/agents/po.txt +149 -102
  37. package/dist/agents/qa.txt +145 -35
  38. package/dist/agents/sm.txt +145 -100
  39. package/dist/agents/ux-expert.txt +413 -522
  40. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +1258 -1236
  41. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.txt +623 -573
  42. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.txt +263 -248
  43. package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +9135 -4942
  44. package/dist/expansion-packs/bmad-creator-tools/agents/bmad-the-creator.txt +288 -251
  45. package/dist/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +1123 -1145
  46. package/dist/teams/team-all.txt +4583 -4837
  47. package/dist/teams/team-fullstack.txt +5276 -5520
  48. package/dist/teams/team-ide-minimal.txt +375 -185
  49. package/dist/teams/team-no-ui.txt +4875 -5051
  50. package/expansion-packs/bmad-2d-phaser-game-dev/agent-teams/phaser-2d-nodejs-game-team.yaml +2 -2
  51. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.md +17 -15
  52. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.md +13 -11
  53. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.md +13 -11
  54. package/expansion-packs/bmad-2d-phaser-game-dev/config.yaml +1 -1
  55. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.yaml +613 -0
  56. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-brief-tmpl.yaml +356 -0
  57. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-design-doc-tmpl.yaml +343 -0
  58. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-story-tmpl.yaml +253 -0
  59. package/expansion-packs/bmad-2d-phaser-game-dev/templates/level-design-doc-tmpl.yaml +484 -0
  60. package/expansion-packs/bmad-creator-tools/agents/bmad-the-creator.md +14 -12
  61. package/expansion-packs/bmad-creator-tools/config.yaml +1 -1
  62. package/expansion-packs/bmad-creator-tools/templates/agent-teams-tmpl.yaml +178 -0
  63. package/expansion-packs/bmad-creator-tools/templates/agent-tmpl.yaml +154 -0
  64. package/expansion-packs/bmad-creator-tools/templates/expansion-pack-plan-tmpl.yaml +120 -0
  65. package/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.md +14 -14
  66. package/expansion-packs/bmad-infrastructure-devops/config.yaml +1 -1
  67. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.yaml +424 -0
  68. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.yaml +629 -0
  69. package/package.json +1 -1
  70. package/tools/builders/web-builder.js +65 -85
  71. package/tools/installer/package.json +1 -1
  72. package/tools/lib/dependency-resolver.js +8 -19
  73. package/zoo/docs/architecture.md +812 -0
  74. package/zoo/docs/brief.md +253 -0
  75. package/zoo/docs/prd.md +500 -0
  76. package/zoo/docs/stories/1.1.story.md +278 -0
  77. package/bmad-core/templates/architecture-tmpl.md +0 -776
  78. package/bmad-core/templates/brainstorming-output-tmpl.md +0 -149
  79. package/bmad-core/templates/brownfield-architecture-tmpl.md +0 -544
  80. package/bmad-core/templates/brownfield-prd-tmpl.md +0 -266
  81. package/bmad-core/templates/competitor-analysis-tmpl.md +0 -291
  82. package/bmad-core/templates/front-end-architecture-tmpl.md +0 -175
  83. package/bmad-core/templates/front-end-spec-tmpl.md +0 -413
  84. package/bmad-core/templates/fullstack-architecture-tmpl.md +0 -1018
  85. package/bmad-core/templates/market-research-tmpl.md +0 -263
  86. package/bmad-core/templates/prd-tmpl.md +0 -202
  87. package/bmad-core/templates/project-brief-tmpl.md +0 -232
  88. package/bmad-core/templates/story-tmpl.md +0 -58
  89. package/common/tasks/create-doc2.md +0 -65
  90. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.md +0 -560
  91. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-brief-tmpl.md +0 -345
  92. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-design-doc-tmpl.md +0 -331
  93. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-story-tmpl.md +0 -235
  94. package/expansion-packs/bmad-2d-phaser-game-dev/templates/level-design-doc-tmpl.md +0 -470
  95. package/expansion-packs/bmad-creator-tools/templates/agent-teams-tmpl.md +0 -154
  96. package/expansion-packs/bmad-creator-tools/templates/agent-tmpl.md +0 -143
  97. package/expansion-packs/bmad-creator-tools/templates/expansion-pack-plan-tmpl.md +0 -91
  98. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.md +0 -415
  99. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.md +0 -0
@@ -50,6 +50,10 @@ activation-instructions:
50
50
  - Only read the files/tasks listed here when user selects them for execution to minimize context usage
51
51
  - The customization field ALWAYS takes precedence over any conflicting instructions
52
52
  - 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
53
+ - Greet the user with your name and role, and inform of the *help command
54
+ - Load development guidelines to ensure consistent coding standards
55
+ - Wait for user to specify story or ask for story selection
56
+ - Only load specific story files when user requests implementation
53
57
  agent:
54
58
  name: Maya
55
59
  id: game-developer
@@ -70,13 +74,6 @@ core_principles:
70
74
  - Cross-Platform Optimization - Works seamlessly on desktop and mobile
71
75
  - Test-Driven Quality - Comprehensive testing of game logic and systems
72
76
  - Numbered Options Protocol - Always use numbered lists for user selections
73
- startup:
74
- - Greet the user with your name and role, and inform of the *help command
75
- - Load development guidelines to ensure consistent coding standards
76
- - CRITICAL: Do NOT scan docs/stories/ directory automatically during startup
77
- - CRITICAL: Do NOT begin any implementation tasks automatically
78
- - Wait for user to specify story or ask for story selection
79
- - Only load specific story files when user requests implementation
80
77
  commands:
81
78
  - '*help" - Show numbered list of available commands for selection'
82
79
  - '*chat-mode" - Conversational mode for technical advice'
@@ -98,13 +95,13 @@ task-execution:
98
95
  done: Game feature works + Tests pass + 60 FPS + No lint errors + Follows Phaser 3 best practices
99
96
  dependencies:
100
97
  tasks:
101
- - execute-checklist
98
+ - execute-checklist.md
102
99
  templates:
103
- - game-architecture-tmpl
100
+ - game-architecture-tmpl.yaml
104
101
  checklists:
105
- - game-story-dod-checklist
102
+ - game-story-dod-checklist.md
106
103
  data:
107
- - development-guidelines
104
+ - development-guidelines.md
108
105
  ```
109
106
  ==================== END: .bmad-2d-phaser-game-dev/agents/game-developer.md ====================
110
107
 
@@ -204,568 +201,621 @@ The LLM will:
204
201
  - Offer to provide detailed analysis of any section, especially those with warnings or failures
205
202
  ==================== END: .bmad-2d-phaser-game-dev/tasks/execute-checklist.md ====================
206
203
 
207
- ==================== START: .bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.md ====================
208
- # {{Game Title}} Game Architecture Document
209
-
210
- [[LLM: 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.
211
-
212
- If available, review any provided documents: Game Design Document (GDD), Technical Preferences. This architecture should support all game mechanics defined in the GDD.]]
213
-
214
- ## Introduction
215
-
216
- [[LLM: Establish the document's purpose and scope for game development]]
217
-
218
- 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.
219
-
220
- This architecture is designed to support the gameplay mechanics defined in the Game Design Document while maintaining 60 FPS performance and cross-platform compatibility.
221
-
222
- ### Change Log
223
-
224
- [[LLM: Track document versions and changes]]
225
-
226
- | Date | Version | Description | Author |
227
- | :--- | :------ | :---------- | :----- |
228
-
229
- ## Technical Overview
230
-
231
- [[LLM: Present all subsections together, then apply `tasks#advanced-elicitation` protocol to the complete section.]]
232
-
233
- ### Architecture Summary
234
-
235
- [[LLM: Provide a comprehensive overview covering:
236
-
237
- - Game engine choice and configuration
238
- - Project structure and organization
239
- - Key systems and their interactions
240
- - Performance and optimization strategy
241
- - How this architecture achieves GDD requirements]]
242
-
243
- ### Platform Targets
244
-
245
- [[LLM: Based on GDD requirements, confirm platform support]]
246
-
247
- **Primary Platform:** {{primary_platform}}
248
- **Secondary Platforms:** {{secondary_platforms}}
249
- **Minimum Requirements:** {{min_specs}}
250
- **Target Performance:** 60 FPS on {{target_device}}
251
-
252
- ### Technology Stack
253
-
254
- **Core Engine:** Phaser 3.70+
255
- **Language:** TypeScript 5.0+ (Strict Mode)
256
- **Build Tool:** {{build_tool}} (Webpack/Vite/Parcel)
257
- **Package Manager:** {{package_manager}}
258
- **Testing:** {{test_framework}}
259
- **Deployment:** {{deployment_platform}}
260
-
261
- ## Project Structure
262
-
263
- [[LLM: Define the complete project organization that developers will follow]]
264
-
265
- ### Repository Organization
266
-
267
- [[LLM: Design a clear folder structure for game development]]
268
-
269
- ```text
270
- {{game_name}}/
271
- ├── src/
272
- │ ├── scenes/ # Game scenes
273
- │ ├── gameObjects/ # Custom game objects
274
- │ ├── systems/ # Core game systems
275
- │ ├── utils/ # Utility functions
276
- │ ├── types/ # TypeScript type definitions
277
- │ ├── config/ # Game configuration
278
- │ └── main.ts # Entry point
279
- ├── assets/
280
- │ ├── images/ # Sprite assets
281
- │ ├── audio/ # Sound files
282
- │ ├── data/ # JSON data files
283
- │ └── fonts/ # Font files
284
- ├── public/ # Static web assets
285
- ├── tests/ # Test files
286
- ├── docs/ # Documentation
287
- │ ├── stories/ # Development stories
288
- └── architecture/ # Technical docs
289
- └── dist/ # Built game files
290
- ```
291
-
292
- ### Module Organization
293
-
294
- [[LLM: Define how TypeScript modules should be organized]]
295
-
296
- **Scene Structure:**
297
-
298
- - Each scene in separate file
299
- - Scene-specific logic contained
300
- - Clear data passing between scenes
301
-
302
- **Game Object Pattern:**
303
-
304
- - Component-based architecture
305
- - Reusable game object classes
306
- - Type-safe property definitions
307
-
308
- **System Architecture:**
309
-
310
- - Singleton managers for global systems
311
- - Event-driven communication
312
- - Clear separation of concerns
313
-
314
- ## Core Game Systems
315
-
316
- [[LLM: Detail each major system that needs to be implemented. Each system should be specific enough for developers to create implementation stories.]]
317
-
318
- ### Scene Management System
319
-
320
- **Purpose:** Handle game flow and scene transitions
321
-
322
- **Key Components:**
323
-
324
- - Scene loading and unloading
325
- - Data passing between scenes
326
- - Transition effects
327
- - Memory management
328
-
329
- **Implementation Requirements:**
330
-
331
- - Preload scene for asset loading
332
- - Menu system with navigation
333
- - Gameplay scenes with state management
334
- - Pause/resume functionality
335
-
336
- **Files to Create:**
337
-
338
- - `src/scenes/BootScene.ts`
339
- - `src/scenes/PreloadScene.ts`
340
- - `src/scenes/MenuScene.ts`
341
- - `src/scenes/GameScene.ts`
342
- - `src/systems/SceneManager.ts`
343
-
344
- ### Game State Management
345
-
346
- **Purpose:** Track player progress and game status
347
-
348
- **State Categories:**
349
-
350
- - Player progress (levels, unlocks)
351
- - Game settings (audio, controls)
352
- - Session data (current level, score)
353
- - Persistent data (achievements, statistics)
354
-
355
- **Implementation Requirements:**
356
-
357
- - Save/load system with localStorage
358
- - State validation and error recovery
359
- - Cross-session data persistence
360
- - Settings management
361
-
362
- **Files to Create:**
363
-
364
- - `src/systems/GameState.ts`
365
- - `src/systems/SaveManager.ts`
366
- - `src/types/GameData.ts`
367
-
368
- ### Asset Management System
369
-
370
- **Purpose:** Efficient loading and management of game assets
371
-
372
- **Asset Categories:**
373
-
374
- - Sprite sheets and animations
375
- - Audio files and music
376
- - Level data and configurations
377
- - UI assets and fonts
378
-
379
- **Implementation Requirements:**
380
-
381
- - Progressive loading strategy
382
- - Asset caching and optimization
383
- - Error handling for failed loads
384
- - Memory management for large assets
385
-
386
- **Files to Create:**
387
-
388
- - `src/systems/AssetManager.ts`
389
- - `src/config/AssetConfig.ts`
390
- - `src/utils/AssetLoader.ts`
391
-
392
- ### Input Management System
393
-
394
- **Purpose:** Handle all player input across platforms
395
-
396
- **Input Types:**
397
-
398
- - Keyboard controls
399
- - Mouse/pointer interaction
400
- - Touch gestures (mobile)
401
- - Gamepad support (optional)
402
-
403
- **Implementation Requirements:**
404
-
405
- - Input mapping and configuration
406
- - Touch-friendly mobile controls
407
- - Input buffering for responsive gameplay
408
- - Customizable control schemes
409
-
410
- **Files to Create:**
411
-
412
- - `src/systems/InputManager.ts`
413
- - `src/utils/TouchControls.ts`
414
- - `src/types/InputTypes.ts`
415
-
416
- ### Game Mechanics Systems
417
-
418
- [[LLM: For each major mechanic defined in the GDD, create a system specification]]
419
-
420
- <<REPEAT section="mechanic_system" count="based_on_gdd">>
421
-
422
- #### {{mechanic_name}} System
423
-
424
- **Purpose:** {{system_purpose}}
425
-
426
- **Core Functionality:**
427
-
428
- - {{feature_1}}
429
- - {{feature_2}}
430
- - {{feature_3}}
431
-
432
- **Dependencies:** {{required_systems}}
433
-
434
- **Performance Considerations:** {{optimization_notes}}
435
-
436
- **Files to Create:**
437
-
438
- - `src/systems/{{SystemName}}.ts`
439
- - `src/gameObjects/{{RelatedObject}}.ts`
440
- - `src/types/{{SystemTypes}}.ts`
441
-
442
- <</REPEAT>>
443
-
444
- ### Physics & Collision System
445
-
446
- **Physics Engine:** {{physics_choice}} (Arcade Physics/Matter.js)
447
-
448
- **Collision Categories:**
449
-
450
- - Player collision
451
- - Enemy interactions
452
- - Environmental objects
453
- - Collectibles and items
454
-
455
- **Implementation Requirements:**
456
-
457
- - Optimized collision detection
458
- - Physics body management
459
- - Collision callbacks and events
460
- - Performance monitoring
461
-
462
- **Files to Create:**
463
-
464
- - `src/systems/PhysicsManager.ts`
465
- - `src/utils/CollisionGroups.ts`
466
-
467
- ### Audio System
468
-
469
- **Audio Requirements:**
470
-
471
- - Background music with looping
472
- - Sound effects for actions
473
- - Audio settings and volume control
474
- - Mobile audio optimization
475
-
476
- **Implementation Features:**
477
-
478
- - Audio sprite management
479
- - Dynamic music system
480
- - Spatial audio (if applicable)
481
- - Audio pooling for performance
482
-
483
- **Files to Create:**
484
-
485
- - `src/systems/AudioManager.ts`
486
- - `src/config/AudioConfig.ts`
487
-
488
- ### UI System
489
-
490
- **UI Components:**
491
-
492
- - HUD elements (score, health, etc.)
493
- - Menu navigation
494
- - Modal dialogs
495
- - Settings screens
496
-
497
- **Implementation Requirements:**
498
-
499
- - Responsive layout system
500
- - Touch-friendly interface
501
- - Keyboard navigation support
502
- - Animation and transitions
503
-
504
- **Files to Create:**
505
-
506
- - `src/systems/UIManager.ts`
507
- - `src/gameObjects/UI/`
508
- - `src/types/UITypes.ts`
509
-
510
- ## Performance Architecture
511
-
512
- [[LLM: Define performance requirements and optimization strategies]]
513
-
514
- ### Performance Targets
515
-
516
- **Frame Rate:** 60 FPS sustained, 30 FPS minimum
517
- **Memory Usage:** <{{memory_limit}}MB total
518
- **Load Times:** <{{initial_load}}s initial, <{{level_load}}s per level
519
- **Battery Optimization:** Reduced updates when not visible
520
-
521
- ### Optimization Strategies
522
-
523
- **Object Pooling:**
524
-
525
- - Bullets and projectiles
526
- - Particle effects
527
- - Enemy objects
528
- - UI elements
529
-
530
- **Asset Optimization:**
531
-
532
- - Texture atlases for sprites
533
- - Audio compression
534
- - Lazy loading for large assets
535
- - Progressive enhancement
536
-
537
- **Rendering Optimization:**
538
-
539
- - Sprite batching
540
- - Culling off-screen objects
541
- - Reduced particle counts on mobile
542
- - Texture resolution scaling
543
-
544
- **Files to Create:**
545
-
546
- - `src/utils/ObjectPool.ts`
547
- - `src/utils/PerformanceMonitor.ts`
548
- - `src/config/OptimizationConfig.ts`
549
-
550
- ## Game Configuration
551
-
552
- [[LLM: Define all configurable aspects of the game]]
553
-
554
- ### Phaser Configuration
555
-
556
- ```typescript
557
- // src/config/GameConfig.ts
558
- const gameConfig: Phaser.Types.Core.GameConfig = {
559
- type: Phaser.AUTO,
560
- width: {{game_width}},
561
- height: {{game_height}},
562
- scale: {
563
- mode: {{scale_mode}},
564
- autoCenter: Phaser.Scale.CENTER_BOTH
565
- },
566
- physics: {
567
- default: '{{physics_system}}',
568
- {{physics_system}}: {
569
- gravity: { y: {{gravity}} },
570
- debug: false
571
- }
572
- },
573
- // Additional configuration...
574
- };
575
- ```
576
-
577
- ### Game Balance Configuration
578
-
579
- [[LLM: Based on GDD, define configurable game parameters]]
580
-
581
- ```typescript
582
- // src/config/GameBalance.ts
583
- export const GameBalance = {
584
- player: {
585
- speed: {{player_speed}},
586
- health: {{player_health}},
587
- // Additional player parameters...
588
- },
589
- difficulty: {
590
- easy: {{easy_params}},
591
- normal: {{normal_params}},
592
- hard: {{hard_params}}
593
- },
594
- // Additional balance parameters...
595
- };
596
- ```
597
-
598
- ## Development Guidelines
599
-
600
- [[LLM: Provide coding standards specific to game development]]
601
-
602
- ### TypeScript Standards
603
-
604
- **Type Safety:**
605
-
606
- - Use strict mode
607
- - Define interfaces for all data structures
608
- - Avoid `any` type usage
609
- - Use enums for game states
610
-
611
- **Code Organization:**
612
-
613
- - One class per file
614
- - Clear naming conventions
615
- - Proper error handling
616
- - Comprehensive documentation
617
-
618
- ### Phaser 3 Best Practices
619
-
620
- **Scene Management:**
621
-
622
- - Clean up resources in shutdown()
623
- - Use scene data for communication
624
- - Implement proper event handling
625
- - Avoid memory leaks
626
-
627
- **Game Object Design:**
628
-
629
- - Extend Phaser classes appropriately
630
- - Use component-based architecture
631
- - Implement object pooling where needed
632
- - Follow consistent update patterns
633
-
634
- ### Testing Strategy
635
-
636
- **Unit Testing:**
637
-
638
- - Test game logic separately from Phaser
639
- - Mock Phaser dependencies
640
- - Test utility functions
641
- - Validate game balance calculations
642
-
643
- **Integration Testing:**
644
-
645
- - Scene loading and transitions
646
- - Save/load functionality
647
- - Input handling
648
- - Performance benchmarks
649
-
650
- **Files to Create:**
651
-
652
- - `tests/utils/GameLogic.test.ts`
653
- - `tests/systems/SaveManager.test.ts`
654
- - `tests/performance/FrameRate.test.ts`
655
-
656
- ## Deployment Architecture
657
-
658
- [[LLM: Define how the game will be built and deployed]]
659
-
660
- ### Build Process
661
-
662
- **Development Build:**
663
-
664
- - Fast compilation
665
- - Source maps enabled
666
- - Debug logging active
667
- - Hot reload support
668
-
669
- **Production Build:**
670
-
671
- - Minified and optimized
672
- - Asset compression
673
- - Performance monitoring
674
- - Error tracking
675
-
676
- ### Deployment Strategy
677
-
678
- **Web Deployment:**
679
-
680
- - Static hosting ({{hosting_platform}})
681
- - CDN for assets
682
- - Progressive loading
683
- - Browser compatibility
684
-
685
- **Mobile Packaging:**
686
-
687
- - Cordova/Capacitor wrapper
688
- - Platform-specific optimization
689
- - App store requirements
690
- - Performance testing
691
-
692
- ## Implementation Roadmap
693
-
694
- [[LLM: Break down the architecture implementation into phases that align with the GDD development phases]]
695
-
696
- ### Phase 1: Foundation ({{duration}})
697
-
698
- **Core Systems:**
699
-
700
- - Project setup and configuration
701
- - Basic scene management
702
- - Asset loading pipeline
703
- - Input handling framework
704
-
705
- **Story Epics:**
706
-
707
- - "Engine Setup and Configuration"
708
- - "Basic Scene Management System"
709
- - "Asset Loading Foundation"
710
-
711
- ### Phase 2: Game Systems ({{duration}})
712
-
713
- **Gameplay Systems:**
714
-
715
- - {{primary_mechanic}} implementation
716
- - Physics and collision system
717
- - Game state management
718
- - UI framework
719
-
720
- **Story Epics:**
721
-
722
- - "{{Primary_Mechanic}} System Implementation"
723
- - "Physics and Collision Framework"
724
- - "Game State Management System"
725
-
726
- ### Phase 3: Content & Polish ({{duration}})
727
-
728
- **Content Systems:**
729
-
730
- - Level loading and management
731
- - Audio system integration
732
- - Performance optimization
733
- - Final polish and testing
734
-
735
- **Story Epics:**
736
-
737
- - "Level Management System"
738
- - "Audio Integration and Optimization"
739
- - "Performance Optimization and Testing"
740
-
741
- ## Risk Assessment
742
-
743
- [[LLM: Identify potential technical risks and mitigation strategies]]
744
-
745
- | Risk | Probability | Impact | Mitigation Strategy |
746
- | ---------------------------- | ----------- | ---------- | ------------------- |
747
- | Performance issues on mobile | {{prob}} | {{impact}} | {{mitigation}} |
748
- | Asset loading bottlenecks | {{prob}} | {{impact}} | {{mitigation}} |
749
- | Cross-platform compatibility | {{prob}} | {{impact}} | {{mitigation}} |
750
-
751
- ## Success Criteria
752
-
753
- [[LLM: Define measurable technical success criteria]]
754
-
755
- **Technical Metrics:**
756
-
757
- - All systems implemented per specification
758
- - Performance targets met consistently
759
- - Zero critical bugs in core systems
760
- - Successful deployment across target platforms
761
-
762
- **Code Quality:**
763
-
764
- - 90%+ test coverage on game logic
765
- - Zero TypeScript errors in strict mode
766
- - Consistent adherence to coding standards
767
- - Comprehensive documentation coverage
768
- ==================== END: .bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.md ====================
204
+ ==================== START: .bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.yaml ====================
205
+ template:
206
+ id: game-architecture-template-v2
207
+ name: Game Architecture Document
208
+ version: 2.0
209
+ output:
210
+ format: markdown
211
+ filename: "docs/{{game_name}}-game-architecture.md"
212
+ title: "{{game_title}} Game Architecture Document"
213
+
214
+ workflow:
215
+ mode: interactive
216
+
217
+ sections:
218
+ - id: initial-setup
219
+ instruction: |
220
+ 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.
221
+
222
+ If available, review any provided documents: Game Design Document (GDD), Technical Preferences. This architecture should support all game mechanics defined in the GDD.
223
+
224
+ - id: introduction
225
+ title: Introduction
226
+ instruction: Establish the document's purpose and scope for game development
227
+ content: |
228
+ 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.
229
+
230
+ This architecture is designed to support the gameplay mechanics defined in the Game Design Document while maintaining 60 FPS performance and cross-platform compatibility.
231
+ sections:
232
+ - id: change-log
233
+ title: Change Log
234
+ instruction: Track document versions and changes
235
+ type: table
236
+ template: |
237
+ | Date | Version | Description | Author |
238
+ | :--- | :------ | :---------- | :----- |
239
+
240
+ - id: technical-overview
241
+ title: Technical Overview
242
+ instruction: Present all subsections together, then apply `tasks#advanced-elicitation` protocol to the complete section.
243
+ sections:
244
+ - id: architecture-summary
245
+ title: Architecture Summary
246
+ instruction: |
247
+ Provide a comprehensive overview covering:
248
+
249
+ - Game engine choice and configuration
250
+ - Project structure and organization
251
+ - Key systems and their interactions
252
+ - Performance and optimization strategy
253
+ - How this architecture achieves GDD requirements
254
+ - id: platform-targets
255
+ title: Platform Targets
256
+ instruction: Based on GDD requirements, confirm platform support
257
+ template: |
258
+ **Primary Platform:** {{primary_platform}}
259
+ **Secondary Platforms:** {{secondary_platforms}}
260
+ **Minimum Requirements:** {{min_specs}}
261
+ **Target Performance:** 60 FPS on {{target_device}}
262
+ - id: technology-stack
263
+ title: Technology Stack
264
+ template: |
265
+ **Core Engine:** Phaser 3.70+
266
+ **Language:** TypeScript 5.0+ (Strict Mode)
267
+ **Build Tool:** {{build_tool}} (Webpack/Vite/Parcel)
268
+ **Package Manager:** {{package_manager}}
269
+ **Testing:** {{test_framework}}
270
+ **Deployment:** {{deployment_platform}}
271
+
272
+ - id: project-structure
273
+ title: Project Structure
274
+ instruction: Define the complete project organization that developers will follow
275
+ sections:
276
+ - id: repository-organization
277
+ title: Repository Organization
278
+ instruction: Design a clear folder structure for game development
279
+ type: code
280
+ language: text
281
+ template: |
282
+ {{game_name}}/
283
+ ├── src/
284
+ │ ├── scenes/ # Game scenes
285
+ ├── gameObjects/ # Custom game objects
286
+ │ ├── systems/ # Core game systems
287
+ │ ├── utils/ # Utility functions
288
+ │ ├── types/ # TypeScript type definitions
289
+ │ ├── config/ # Game configuration
290
+ │ └── main.ts # Entry point
291
+ ├── assets/
292
+ │ ├── images/ # Sprite assets
293
+ │ ├── audio/ # Sound files
294
+ │ ├── data/ # JSON data files
295
+ │ └── fonts/ # Font files
296
+ ├── public/ # Static web assets
297
+ ├── tests/ # Test files
298
+ ├── docs/ # Documentation
299
+ │ ├── stories/ # Development stories
300
+ │ └── architecture/ # Technical docs
301
+ └── dist/ # Built game files
302
+ - id: module-organization
303
+ title: Module Organization
304
+ instruction: Define how TypeScript modules should be organized
305
+ sections:
306
+ - id: scene-structure
307
+ title: Scene Structure
308
+ type: bullet-list
309
+ template: |
310
+ - Each scene in separate file
311
+ - Scene-specific logic contained
312
+ - Clear data passing between scenes
313
+ - id: game-object-pattern
314
+ title: Game Object Pattern
315
+ type: bullet-list
316
+ template: |
317
+ - Component-based architecture
318
+ - Reusable game object classes
319
+ - Type-safe property definitions
320
+ - id: system-architecture
321
+ title: System Architecture
322
+ type: bullet-list
323
+ template: |
324
+ - Singleton managers for global systems
325
+ - Event-driven communication
326
+ - Clear separation of concerns
327
+
328
+ - id: core-game-systems
329
+ title: Core Game Systems
330
+ instruction: Detail each major system that needs to be implemented. Each system should be specific enough for developers to create implementation stories.
331
+ sections:
332
+ - id: scene-management
333
+ title: Scene Management System
334
+ template: |
335
+ **Purpose:** Handle game flow and scene transitions
336
+
337
+ **Key Components:**
338
+
339
+ - Scene loading and unloading
340
+ - Data passing between scenes
341
+ - Transition effects
342
+ - Memory management
343
+
344
+ **Implementation Requirements:**
345
+
346
+ - Preload scene for asset loading
347
+ - Menu system with navigation
348
+ - Gameplay scenes with state management
349
+ - Pause/resume functionality
350
+
351
+ **Files to Create:**
352
+
353
+ - `src/scenes/BootScene.ts`
354
+ - `src/scenes/PreloadScene.ts`
355
+ - `src/scenes/MenuScene.ts`
356
+ - `src/scenes/GameScene.ts`
357
+ - `src/systems/SceneManager.ts`
358
+ - id: game-state-management
359
+ title: Game State Management
360
+ template: |
361
+ **Purpose:** Track player progress and game status
362
+
363
+ **State Categories:**
364
+
365
+ - Player progress (levels, unlocks)
366
+ - Game settings (audio, controls)
367
+ - Session data (current level, score)
368
+ - Persistent data (achievements, statistics)
369
+
370
+ **Implementation Requirements:**
371
+
372
+ - Save/load system with localStorage
373
+ - State validation and error recovery
374
+ - Cross-session data persistence
375
+ - Settings management
376
+
377
+ **Files to Create:**
378
+
379
+ - `src/systems/GameState.ts`
380
+ - `src/systems/SaveManager.ts`
381
+ - `src/types/GameData.ts`
382
+ - id: asset-management
383
+ title: Asset Management System
384
+ template: |
385
+ **Purpose:** Efficient loading and management of game assets
386
+
387
+ **Asset Categories:**
388
+
389
+ - Sprite sheets and animations
390
+ - Audio files and music
391
+ - Level data and configurations
392
+ - UI assets and fonts
393
+
394
+ **Implementation Requirements:**
395
+
396
+ - Progressive loading strategy
397
+ - Asset caching and optimization
398
+ - Error handling for failed loads
399
+ - Memory management for large assets
400
+
401
+ **Files to Create:**
402
+
403
+ - `src/systems/AssetManager.ts`
404
+ - `src/config/AssetConfig.ts`
405
+ - `src/utils/AssetLoader.ts`
406
+ - id: input-management
407
+ title: Input Management System
408
+ template: |
409
+ **Purpose:** Handle all player input across platforms
410
+
411
+ **Input Types:**
412
+
413
+ - Keyboard controls
414
+ - Mouse/pointer interaction
415
+ - Touch gestures (mobile)
416
+ - Gamepad support (optional)
417
+
418
+ **Implementation Requirements:**
419
+
420
+ - Input mapping and configuration
421
+ - Touch-friendly mobile controls
422
+ - Input buffering for responsive gameplay
423
+ - Customizable control schemes
424
+
425
+ **Files to Create:**
426
+
427
+ - `src/systems/InputManager.ts`
428
+ - `src/utils/TouchControls.ts`
429
+ - `src/types/InputTypes.ts`
430
+ - id: game-mechanics-systems
431
+ title: Game Mechanics Systems
432
+ instruction: For each major mechanic defined in the GDD, create a system specification
433
+ repeatable: true
434
+ sections:
435
+ - id: mechanic-system
436
+ title: "{{mechanic_name}} System"
437
+ template: |
438
+ **Purpose:** {{system_purpose}}
439
+
440
+ **Core Functionality:**
441
+
442
+ - {{feature_1}}
443
+ - {{feature_2}}
444
+ - {{feature_3}}
445
+
446
+ **Dependencies:** {{required_systems}}
447
+
448
+ **Performance Considerations:** {{optimization_notes}}
449
+
450
+ **Files to Create:**
451
+
452
+ - `src/systems/{{system_name}}.ts`
453
+ - `src/gameObjects/{{related_object}}.ts`
454
+ - `src/types/{{system_types}}.ts`
455
+ - id: physics-collision
456
+ title: Physics & Collision System
457
+ template: |
458
+ **Physics Engine:** {{physics_choice}} (Arcade Physics/Matter.js)
459
+
460
+ **Collision Categories:**
461
+
462
+ - Player collision
463
+ - Enemy interactions
464
+ - Environmental objects
465
+ - Collectibles and items
466
+
467
+ **Implementation Requirements:**
468
+
469
+ - Optimized collision detection
470
+ - Physics body management
471
+ - Collision callbacks and events
472
+ - Performance monitoring
473
+
474
+ **Files to Create:**
475
+
476
+ - `src/systems/PhysicsManager.ts`
477
+ - `src/utils/CollisionGroups.ts`
478
+ - id: audio-system
479
+ title: Audio System
480
+ template: |
481
+ **Audio Requirements:**
482
+
483
+ - Background music with looping
484
+ - Sound effects for actions
485
+ - Audio settings and volume control
486
+ - Mobile audio optimization
487
+
488
+ **Implementation Features:**
489
+
490
+ - Audio sprite management
491
+ - Dynamic music system
492
+ - Spatial audio (if applicable)
493
+ - Audio pooling for performance
494
+
495
+ **Files to Create:**
496
+
497
+ - `src/systems/AudioManager.ts`
498
+ - `src/config/AudioConfig.ts`
499
+ - id: ui-system
500
+ title: UI System
501
+ template: |
502
+ **UI Components:**
503
+
504
+ - HUD elements (score, health, etc.)
505
+ - Menu navigation
506
+ - Modal dialogs
507
+ - Settings screens
508
+
509
+ **Implementation Requirements:**
510
+
511
+ - Responsive layout system
512
+ - Touch-friendly interface
513
+ - Keyboard navigation support
514
+ - Animation and transitions
515
+
516
+ **Files to Create:**
517
+
518
+ - `src/systems/UIManager.ts`
519
+ - `src/gameObjects/UI/`
520
+ - `src/types/UITypes.ts`
521
+
522
+ - id: performance-architecture
523
+ title: Performance Architecture
524
+ instruction: Define performance requirements and optimization strategies
525
+ sections:
526
+ - id: performance-targets
527
+ title: Performance Targets
528
+ template: |
529
+ **Frame Rate:** 60 FPS sustained, 30 FPS minimum
530
+ **Memory Usage:** <{{memory_limit}}MB total
531
+ **Load Times:** <{{initial_load}}s initial, <{{level_load}}s per level
532
+ **Battery Optimization:** Reduced updates when not visible
533
+ - id: optimization-strategies
534
+ title: Optimization Strategies
535
+ sections:
536
+ - id: object-pooling
537
+ title: Object Pooling
538
+ type: bullet-list
539
+ template: |
540
+ - Bullets and projectiles
541
+ - Particle effects
542
+ - Enemy objects
543
+ - UI elements
544
+ - id: asset-optimization
545
+ title: Asset Optimization
546
+ type: bullet-list
547
+ template: |
548
+ - Texture atlases for sprites
549
+ - Audio compression
550
+ - Lazy loading for large assets
551
+ - Progressive enhancement
552
+ - id: rendering-optimization
553
+ title: Rendering Optimization
554
+ type: bullet-list
555
+ template: |
556
+ - Sprite batching
557
+ - Culling off-screen objects
558
+ - Reduced particle counts on mobile
559
+ - Texture resolution scaling
560
+ - id: optimization-files
561
+ title: Files to Create
562
+ type: bullet-list
563
+ template: |
564
+ - `src/utils/ObjectPool.ts`
565
+ - `src/utils/PerformanceMonitor.ts`
566
+ - `src/config/OptimizationConfig.ts`
567
+
568
+ - id: game-configuration
569
+ title: Game Configuration
570
+ instruction: Define all configurable aspects of the game
571
+ sections:
572
+ - id: phaser-configuration
573
+ title: Phaser Configuration
574
+ type: code
575
+ language: typescript
576
+ template: |
577
+ // src/config/GameConfig.ts
578
+ const gameConfig: Phaser.Types.Core.GameConfig = {
579
+ type: Phaser.AUTO,
580
+ width: {{game_width}},
581
+ height: {{game_height}},
582
+ scale: {
583
+ mode: {{scale_mode}},
584
+ autoCenter: Phaser.Scale.CENTER_BOTH
585
+ },
586
+ physics: {
587
+ default: '{{physics_system}}',
588
+ {{physics_system}}: {
589
+ gravity: { y: {{gravity}} },
590
+ debug: false
591
+ }
592
+ },
593
+ // Additional configuration...
594
+ };
595
+ - id: game-balance-configuration
596
+ title: Game Balance Configuration
597
+ instruction: Based on GDD, define configurable game parameters
598
+ type: code
599
+ language: typescript
600
+ template: |
601
+ // src/config/GameBalance.ts
602
+ export const GameBalance = {
603
+ player: {
604
+ speed: {{player_speed}},
605
+ health: {{player_health}},
606
+ // Additional player parameters...
607
+ },
608
+ difficulty: {
609
+ easy: {{easy_params}},
610
+ normal: {{normal_params}},
611
+ hard: {{hard_params}}
612
+ },
613
+ // Additional balance parameters...
614
+ };
615
+
616
+ - id: development-guidelines
617
+ title: Development Guidelines
618
+ instruction: Provide coding standards specific to game development
619
+ sections:
620
+ - id: typescript-standards
621
+ title: TypeScript Standards
622
+ sections:
623
+ - id: type-safety
624
+ title: Type Safety
625
+ type: bullet-list
626
+ template: |
627
+ - Use strict mode
628
+ - Define interfaces for all data structures
629
+ - Avoid `any` type usage
630
+ - Use enums for game states
631
+ - id: code-organization
632
+ title: Code Organization
633
+ type: bullet-list
634
+ template: |
635
+ - One class per file
636
+ - Clear naming conventions
637
+ - Proper error handling
638
+ - Comprehensive documentation
639
+ - id: phaser-best-practices
640
+ title: Phaser 3 Best Practices
641
+ sections:
642
+ - id: scene-management-practices
643
+ title: Scene Management
644
+ type: bullet-list
645
+ template: |
646
+ - Clean up resources in shutdown()
647
+ - Use scene data for communication
648
+ - Implement proper event handling
649
+ - Avoid memory leaks
650
+ - id: game-object-design
651
+ title: Game Object Design
652
+ type: bullet-list
653
+ template: |
654
+ - Extend Phaser classes appropriately
655
+ - Use component-based architecture
656
+ - Implement object pooling where needed
657
+ - Follow consistent update patterns
658
+ - id: testing-strategy
659
+ title: Testing Strategy
660
+ sections:
661
+ - id: unit-testing
662
+ title: Unit Testing
663
+ type: bullet-list
664
+ template: |
665
+ - Test game logic separately from Phaser
666
+ - Mock Phaser dependencies
667
+ - Test utility functions
668
+ - Validate game balance calculations
669
+ - id: integration-testing
670
+ title: Integration Testing
671
+ type: bullet-list
672
+ template: |
673
+ - Scene loading and transitions
674
+ - Save/load functionality
675
+ - Input handling
676
+ - Performance benchmarks
677
+ - id: test-files
678
+ title: Files to Create
679
+ type: bullet-list
680
+ template: |
681
+ - `tests/utils/GameLogic.test.ts`
682
+ - `tests/systems/SaveManager.test.ts`
683
+ - `tests/performance/FrameRate.test.ts`
684
+
685
+ - id: deployment-architecture
686
+ title: Deployment Architecture
687
+ instruction: Define how the game will be built and deployed
688
+ sections:
689
+ - id: build-process
690
+ title: Build Process
691
+ sections:
692
+ - id: development-build
693
+ title: Development Build
694
+ type: bullet-list
695
+ template: |
696
+ - Fast compilation
697
+ - Source maps enabled
698
+ - Debug logging active
699
+ - Hot reload support
700
+ - id: production-build
701
+ title: Production Build
702
+ type: bullet-list
703
+ template: |
704
+ - Minified and optimized
705
+ - Asset compression
706
+ - Performance monitoring
707
+ - Error tracking
708
+ - id: deployment-strategy
709
+ title: Deployment Strategy
710
+ sections:
711
+ - id: web-deployment
712
+ title: Web Deployment
713
+ type: bullet-list
714
+ template: |
715
+ - Static hosting ({{hosting_platform}})
716
+ - CDN for assets
717
+ - Progressive loading
718
+ - Browser compatibility
719
+ - id: mobile-packaging
720
+ title: Mobile Packaging
721
+ type: bullet-list
722
+ template: |
723
+ - Cordova/Capacitor wrapper
724
+ - Platform-specific optimization
725
+ - App store requirements
726
+ - Performance testing
727
+
728
+ - id: implementation-roadmap
729
+ title: Implementation Roadmap
730
+ instruction: Break down the architecture implementation into phases that align with the GDD development phases
731
+ sections:
732
+ - id: phase-1-foundation
733
+ title: "Phase 1: Foundation ({{duration}})"
734
+ sections:
735
+ - id: phase-1-core
736
+ title: Core Systems
737
+ type: bullet-list
738
+ template: |
739
+ - Project setup and configuration
740
+ - Basic scene management
741
+ - Asset loading pipeline
742
+ - Input handling framework
743
+ - id: phase-1-epics
744
+ title: Story Epics
745
+ type: bullet-list
746
+ template: |
747
+ - "Engine Setup and Configuration"
748
+ - "Basic Scene Management System"
749
+ - "Asset Loading Foundation"
750
+ - id: phase-2-game-systems
751
+ title: "Phase 2: Game Systems ({{duration}})"
752
+ sections:
753
+ - id: phase-2-gameplay
754
+ title: Gameplay Systems
755
+ type: bullet-list
756
+ template: |
757
+ - {{primary_mechanic}} implementation
758
+ - Physics and collision system
759
+ - Game state management
760
+ - UI framework
761
+ - id: phase-2-epics
762
+ title: Story Epics
763
+ type: bullet-list
764
+ template: |
765
+ - "{{primary_mechanic}} System Implementation"
766
+ - "Physics and Collision Framework"
767
+ - "Game State Management System"
768
+ - id: phase-3-content-polish
769
+ title: "Phase 3: Content & Polish ({{duration}})"
770
+ sections:
771
+ - id: phase-3-content
772
+ title: Content Systems
773
+ type: bullet-list
774
+ template: |
775
+ - Level loading and management
776
+ - Audio system integration
777
+ - Performance optimization
778
+ - Final polish and testing
779
+ - id: phase-3-epics
780
+ title: Story Epics
781
+ type: bullet-list
782
+ template: |
783
+ - "Level Management System"
784
+ - "Audio Integration and Optimization"
785
+ - "Performance Optimization and Testing"
786
+
787
+ - id: risk-assessment
788
+ title: Risk Assessment
789
+ instruction: Identify potential technical risks and mitigation strategies
790
+ type: table
791
+ template: |
792
+ | Risk | Probability | Impact | Mitigation Strategy |
793
+ | ---------------------------- | ----------- | ---------- | ------------------- |
794
+ | Performance issues on mobile | {{prob}} | {{impact}} | {{mitigation}} |
795
+ | Asset loading bottlenecks | {{prob}} | {{impact}} | {{mitigation}} |
796
+ | Cross-platform compatibility | {{prob}} | {{impact}} | {{mitigation}} |
797
+
798
+ - id: success-criteria
799
+ title: Success Criteria
800
+ instruction: Define measurable technical success criteria
801
+ sections:
802
+ - id: technical-metrics
803
+ title: Technical Metrics
804
+ type: bullet-list
805
+ template: |
806
+ - All systems implemented per specification
807
+ - Performance targets met consistently
808
+ - Zero critical bugs in core systems
809
+ - Successful deployment across target platforms
810
+ - id: code-quality
811
+ title: Code Quality
812
+ type: bullet-list
813
+ template: |
814
+ - 90%+ test coverage on game logic
815
+ - Zero TypeScript errors in strict mode
816
+ - Consistent adherence to coding standards
817
+ - Comprehensive documentation coverage
818
+ ==================== END: .bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.yaml ====================
769
819
 
770
820
  ==================== START: .bmad-2d-phaser-game-dev/checklists/game-story-dod-checklist.md ====================
771
821
  # Game Development Story Definition of Done Checklist