bmad-method 4.31.0 → 4.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/settings.json +1 -7
- package/CHANGELOG.md +113 -173
- package/README.md +47 -0
- package/bmad-core/agents/analyst.md +1 -1
- package/bmad-core/agents/architect.md +2 -3
- package/bmad-core/agents/bmad-master.md +0 -1
- package/bmad-core/agents/bmad-orchestrator.md +9 -10
- package/bmad-core/agents/dev.md +1 -2
- package/bmad-core/agents/pm.md +3 -1
- package/bmad-core/agents/po.md +1 -1
- package/bmad-core/agents/qa.md +1 -1
- package/bmad-core/agents/sm.md +1 -1
- package/bmad-core/agents/ux-expert.md +1 -1
- package/bmad-core/bmad-core/user-guide.md +0 -0
- package/bmad-core/checklists/architect-checklist.md +0 -5
- package/bmad-core/checklists/pm-checklist.md +0 -5
- package/bmad-core/checklists/po-master-checklist.md +0 -9
- package/bmad-core/checklists/story-dod-checklist.md +0 -7
- package/bmad-core/checklists/story-draft-checklist.md +0 -3
- package/bmad-core/data/bmad-kb.md +5 -2
- package/bmad-core/data/elicitation-methods.md +20 -0
- package/bmad-core/enhanced-ide-development-workflow.md +43 -0
- package/bmad-core/tasks/create-brownfield-story.md +11 -3
- package/bmad-core/tasks/create-deep-research-prompt.md +0 -11
- package/bmad-core/tasks/document-project.md +15 -13
- package/bmad-core/tasks/facilitate-brainstorming-session.md +1 -1
- package/bmad-core/tasks/index-docs.md +0 -6
- package/bmad-core/tasks/kb-mode-interaction.md +3 -3
- package/bmad-core/tasks/review-story.md +10 -1
- package/bmad-core/tasks/shard-doc.md +0 -2
- package/bmad-core/user-guide.md +7 -6
- package/bmad-core/working-in-the-brownfield.md +39 -36
- package/common/tasks/execute-checklist.md +0 -7
- package/dist/agents/analyst.txt +6 -6
- package/dist/agents/architect.txt +8 -3
- package/dist/agents/bmad-master.txt +2 -1
- package/dist/agents/pm.txt +9 -2
- package/dist/agents/po.txt +2 -318
- package/dist/agents/qa.txt +0 -1
- package/dist/agents/sm.txt +3 -3
- package/dist/agents/ux-expert.txt +2 -297
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +6 -6
- package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-architect.txt +4047 -0
- package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-designer.txt +1520 -185
- package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-developer.txt +214 -1229
- package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-sm.txt +537 -373
- package/dist/expansion-packs/bmad-2d-unity-game-dev/teams/unity-2d-game-team.txt +6917 -2140
- package/dist/teams/team-all.txt +30 -25
- package/dist/teams/team-fullstack.txt +27 -21
- package/dist/teams/team-ide-minimal.txt +5 -322
- package/dist/teams/team-no-ui.txt +25 -16
- package/expansion-packs/bmad-2d-phaser-game-dev/config.yaml +1 -1
- package/expansion-packs/bmad-2d-phaser-game-dev/data/bmad-kb.md +0 -4
- package/expansion-packs/bmad-2d-phaser-game-dev/data/development-guidelines.md +3 -5
- package/expansion-packs/bmad-2d-phaser-game-dev/tasks/advanced-elicitation.md +0 -1
- package/expansion-packs/bmad-2d-phaser-game-dev/tasks/game-design-brainstorming.md +0 -18
- package/expansion-packs/bmad-2d-unity-game-dev/agent-teams/unity-2d-game-team.yaml +1 -0
- package/expansion-packs/bmad-2d-unity-game-dev/agents/game-architect.md +80 -0
- package/expansion-packs/bmad-2d-unity-game-dev/agents/game-designer.md +21 -16
- package/expansion-packs/bmad-2d-unity-game-dev/agents/game-developer.md +25 -25
- package/expansion-packs/bmad-2d-unity-game-dev/agents/game-sm.md +15 -14
- package/expansion-packs/bmad-2d-unity-game-dev/checklists/game-architect-checklist.md +391 -0
- package/expansion-packs/bmad-2d-unity-game-dev/checklists/game-change-checklist.md +203 -0
- package/expansion-packs/bmad-2d-unity-game-dev/checklists/game-design-checklist.md +1 -1
- package/expansion-packs/bmad-2d-unity-game-dev/checklists/game-story-dod-checklist.md +103 -139
- package/expansion-packs/bmad-2d-unity-game-dev/config.yaml +1 -1
- package/expansion-packs/bmad-2d-unity-game-dev/data/bmad-kb.md +586 -68
- package/expansion-packs/bmad-2d-unity-game-dev/data/development-guidelines.md +0 -4
- package/expansion-packs/bmad-2d-unity-game-dev/tasks/advanced-elicitation.md +0 -1
- package/expansion-packs/bmad-2d-unity-game-dev/tasks/correct-course-game.md +141 -0
- package/expansion-packs/bmad-2d-unity-game-dev/tasks/create-game-story.md +165 -198
- package/expansion-packs/bmad-2d-unity-game-dev/tasks/game-design-brainstorming.md +0 -18
- package/expansion-packs/bmad-2d-unity-game-dev/tasks/validate-game-story.md +200 -0
- package/expansion-packs/bmad-2d-unity-game-dev/templates/game-architecture-tmpl.yaml +938 -453
- package/expansion-packs/bmad-2d-unity-game-dev/templates/game-brief-tmpl.yaml +3 -3
- package/expansion-packs/bmad-2d-unity-game-dev/templates/game-design-doc-tmpl.yaml +517 -155
- package/expansion-packs/bmad-2d-unity-game-dev/templates/game-story-tmpl.yaml +12 -12
- package/expansion-packs/bmad-2d-unity-game-dev/templates/level-design-doc-tmpl.yaml +11 -11
- package/expansion-packs/bmad-infrastructure-devops/config.yaml +1 -1
- package/expansion-packs/bmad-infrastructure-devops/data/bmad-kb.md +0 -3
- package/expansion-packs/bmad-infrastructure-devops/tasks/review-infrastructure.md +0 -1
- package/expansion-packs/bmad-infrastructure-devops/tasks/validate-infrastructure.md +0 -1
- package/package.json +4 -1
- package/tools/bmad-npx-wrapper.js +5 -7
- package/tools/flattener/main.js +570 -0
- package/tools/installer/bin/bmad.js +14 -0
- package/tools/installer/lib/installer.js +29 -3
- package/tools/installer/package-lock.json +89 -89
- package/tools/installer/package.json +1 -1
- package/.husky/pre-commit +0 -2
- package/.prettierignore +0 -21
- package/.prettierrc +0 -23
|
@@ -51,11 +51,11 @@ activation-instructions:
|
|
|
51
51
|
- 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
|
|
52
52
|
- STAY IN CHARACTER!
|
|
53
53
|
agent:
|
|
54
|
-
name:
|
|
54
|
+
name: Pinky
|
|
55
55
|
id: game-developer
|
|
56
56
|
title: Game Developer (Unity & C#)
|
|
57
57
|
icon: 👾
|
|
58
|
-
whenToUse: Use for Unity implementation, game story development,
|
|
58
|
+
whenToUse: Use for Unity implementation, game story development, and C# code implementation
|
|
59
59
|
customization: null
|
|
60
60
|
persona:
|
|
61
61
|
role: Expert Unity Game Developer & C# Specialist
|
|
@@ -63,41 +63,36 @@ persona:
|
|
|
63
63
|
identity: Technical expert who transforms game designs into working, optimized Unity applications using C#
|
|
64
64
|
focus: Story-driven development using game design documents and architecture specifications, adhering to the "Unity Way"
|
|
65
65
|
core_principles:
|
|
66
|
-
- Story
|
|
66
|
+
- CRITICAL: Story has ALL info you will need aside from what you loaded during the startup commands. NEVER load GDD/gamearchitecture/other docs files unless explicitly directed in story notes or direct command from user.
|
|
67
|
+
- CRITICAL: ONLY update story file Dev Agent Record sections (checkboxes/Debug Log/Completion Notes/Change Log)
|
|
68
|
+
- CRITICAL: FOLLOW THE develop-story command when the user tells you to implement the story
|
|
67
69
|
- Performance by Default - Write efficient C# code and optimize for target platforms, aiming for stable frame rates
|
|
68
70
|
- The Unity Way - Embrace Unity's component-based architecture. Use GameObjects, Components, and Prefabs effectively. Leverage the MonoBehaviour lifecycle (Awake, Start, Update, etc.) for all game logic.
|
|
69
71
|
- C# Best Practices - Write clean, readable, and maintainable C# code, following modern .NET standards.
|
|
70
72
|
- Asset Store Integration - When a new Unity Asset Store package is installed, I will analyze its documentation and examples to understand its API and best practices before using it in the project.
|
|
71
73
|
- Data-Oriented Design - Utilize ScriptableObjects for data-driven design where appropriate to decouple data from logic.
|
|
72
74
|
- Test for Robustness - Write unit and integration tests for core game mechanics to ensure stability.
|
|
73
|
-
- Numbered Options
|
|
75
|
+
- Numbered Options - Always use numbered lists when presenting choices to the user
|
|
74
76
|
commands:
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
- 'Completion Notes: Deviations only, <50 words'
|
|
89
|
-
- 'Change Log: Requirement changes only'
|
|
90
|
-
blocking: Unapproved deps | Ambiguous after story check | 3 failures | Missing game config
|
|
91
|
-
done: Game feature works + Tests pass + Stable FPS + No compiler errors + Follows Unity & C# best practices
|
|
77
|
+
- help: Show numbered list of the following commands to allow selection
|
|
78
|
+
- run-tests: Execute Unity-specific linting and tests
|
|
79
|
+
- explain: teach me what and why you did whatever you just did in detail so I can learn. Explain to me as if you were training a junior Unity developer.
|
|
80
|
+
- exit: Say goodbye as the Game Developer, and then abandon inhabiting this persona
|
|
81
|
+
develop-story:
|
|
82
|
+
order-of-execution: Read (first or next) task→Implement Task and its subtasks→Write tests→Execute validations→Only if ALL pass, then update the task checkbox with [x]→Update story section File List to ensure it lists and new or modified or deleted source file→repeat order-of-execution until complete
|
|
83
|
+
story-file-updates-ONLY:
|
|
84
|
+
- CRITICAL: ONLY UPDATE THE STORY FILE WITH UPDATES TO SECTIONS INDICATED BELOW. DO NOT MODIFY ANY OTHER SECTIONS.
|
|
85
|
+
- CRITICAL: You are ONLY authorized to edit these specific sections of story files - Tasks / Subtasks Checkboxes, Dev Agent Record section and all its subsections, Agent Model Used, Debug Log References, Completion Notes List, File List, Change Log, Status
|
|
86
|
+
- CRITICAL: DO NOT modify Status, Story, Acceptance Criteria, Dev Notes, Testing sections, or any other sections not listed above
|
|
87
|
+
blocking: 'HALT for: Unapproved deps needed, confirm with user | Ambiguous after story check | 3 failures attempting to implement or fix something repeatedly | Missing config | Failing regression'
|
|
88
|
+
ready-for-review: Code matches requirements + All validations pass + Follows Unity & C# standards + File List complete + Stable FPS
|
|
89
|
+
completion: 'All Tasks and Subtasks marked [x] and have tests→Validations and full regression passes (DON''T BE LAZY, EXECUTE ALL TESTS and CONFIRM)→Ensure File List is Complete→run the task execute-checklist for the checklist game-story-dod-checklist→set story status: ''Ready for Review''→HALT'
|
|
92
90
|
dependencies:
|
|
93
91
|
tasks:
|
|
94
92
|
- execute-checklist.md
|
|
95
|
-
|
|
96
|
-
- game-architecture-tmpl.yaml
|
|
93
|
+
- validate-next-story.md
|
|
97
94
|
checklists:
|
|
98
95
|
- game-story-dod-checklist.md
|
|
99
|
-
data:
|
|
100
|
-
- development-guidelines.md
|
|
101
96
|
```
|
|
102
97
|
==================== END: .bmad-2d-unity-game-dev/agents/game-developer.md ====================
|
|
103
98
|
|
|
@@ -197,1284 +192,274 @@ The LLM will:
|
|
|
197
192
|
- Offer to provide detailed analysis of any section, especially those with warnings or failures
|
|
198
193
|
==================== END: .bmad-2d-unity-game-dev/tasks/execute-checklist.md ====================
|
|
199
194
|
|
|
200
|
-
==================== START: .bmad-2d-unity-game-dev/
|
|
201
|
-
|
|
202
|
-
id: game-architecture-template-v2
|
|
203
|
-
name: Game Architecture Document
|
|
204
|
-
version: 2.0
|
|
205
|
-
output:
|
|
206
|
-
format: markdown
|
|
207
|
-
filename: "docs/{{game_name}}-game-architecture.md"
|
|
208
|
-
title: "{{game_title}} Game Architecture Document"
|
|
209
|
-
|
|
210
|
-
workflow:
|
|
211
|
-
mode: interactive
|
|
212
|
-
|
|
213
|
-
sections:
|
|
214
|
-
- id: initial-setup
|
|
215
|
-
instruction: |
|
|
216
|
-
This template creates a comprehensive game architecture document specifically for Unity + C# projects. This should provide the technical foundation for all game development stories and epics.
|
|
217
|
-
|
|
218
|
-
If available, review any provided documents: Game Design Document (GDD), Technical Preferences. This architecture should support all game mechanics defined in the GDD.
|
|
219
|
-
|
|
220
|
-
- id: introduction
|
|
221
|
-
title: Introduction
|
|
222
|
-
instruction: Establish the document's purpose and scope for game development
|
|
223
|
-
content: |
|
|
224
|
-
This document outlines the complete technical architecture for {{Game Title}}, a 2D game built with Unity and C#. It serves as the technical foundation for AI-driven game development, ensuring consistency and scalability across all game systems.
|
|
225
|
-
|
|
226
|
-
This architecture is designed to support the gameplay mechanics defined in the Game Design Document while maintaining stable performance and cross-platform compatibility.
|
|
227
|
-
sections:
|
|
228
|
-
- id: change-log
|
|
229
|
-
title: Change Log
|
|
230
|
-
instruction: Track document versions and changes
|
|
231
|
-
type: table
|
|
232
|
-
template: |
|
|
233
|
-
| Date | Version | Description | Author |
|
|
234
|
-
| :--- | :------ | :---------- | :----- |
|
|
235
|
-
|
|
236
|
-
- id: technical-overview
|
|
237
|
-
title: Technical Overview
|
|
238
|
-
instruction: Present all subsections together, then apply `tasks#advanced-elicitation` protocol to the complete section.
|
|
239
|
-
sections:
|
|
240
|
-
- id: architecture-summary
|
|
241
|
-
title: Architecture Summary
|
|
242
|
-
instruction: |
|
|
243
|
-
Provide a comprehensive overview covering:
|
|
244
|
-
|
|
245
|
-
- Game engine choice and configuration
|
|
246
|
-
- Project structure and organization
|
|
247
|
-
- Key systems and their interactions
|
|
248
|
-
- Performance and optimization strategy
|
|
249
|
-
- How this architecture achieves GDD requirements
|
|
250
|
-
- id: platform-targets
|
|
251
|
-
title: Platform Targets
|
|
252
|
-
instruction: Based on GDD requirements, confirm platform support
|
|
253
|
-
template: |
|
|
254
|
-
**Primary Platform:** {{primary_platform}}
|
|
255
|
-
**Secondary Platforms:** {{secondary_platforms}}
|
|
256
|
-
**Minimum Requirements:** {{min_specs}}
|
|
257
|
-
**Target Performance:** Stable frame rate on {{target_device}}
|
|
258
|
-
- id: technology-stack
|
|
259
|
-
title: Technology Stack
|
|
260
|
-
template: |
|
|
261
|
-
**Core Engine:** Unity 2022 LTS or newer
|
|
262
|
-
**Language:** C# 10+
|
|
263
|
-
**Build Tool:** Unity Build Pipeline
|
|
264
|
-
**Package Manager:** Unity Package Manager
|
|
265
|
-
**Testing:** Unity Test Framework (NUnit)
|
|
266
|
-
**Deployment:** {{deployment_platform}}
|
|
267
|
-
|
|
268
|
-
- id: project-structure
|
|
269
|
-
title: Project Structure
|
|
270
|
-
instruction: Define the complete project organization that developers will follow
|
|
271
|
-
sections:
|
|
272
|
-
- id: repository-organization
|
|
273
|
-
title: Repository Organization
|
|
274
|
-
instruction: Design a clear folder structure for game development
|
|
275
|
-
type: code
|
|
276
|
-
language: text
|
|
277
|
-
template: |
|
|
278
|
-
{{game_name}}/
|
|
279
|
-
├── Assets/
|
|
280
|
-
│ ├── Scenes/ # Game scenes
|
|
281
|
-
│ ├── Scripts/ # C# scripts
|
|
282
|
-
│ ├── Prefabs/ # Reusable game objects
|
|
283
|
-
│ ├── Art/ # Art assets
|
|
284
|
-
│ ├── Audio/ # Audio assets
|
|
285
|
-
│ ├── Data/ # ScriptableObjects and other data
|
|
286
|
-
│ └── Tests/ # Unity Test Framework tests
|
|
287
|
-
├── Packages/ # Package Manager manifest
|
|
288
|
-
└── ProjectSettings/ # Unity project settings
|
|
289
|
-
- id: module-organization
|
|
290
|
-
title: Module Organization
|
|
291
|
-
instruction: Define how TypeScript modules should be organized
|
|
292
|
-
sections:
|
|
293
|
-
- id: scene-structure
|
|
294
|
-
title: Scene Structure
|
|
295
|
-
type: bullet-list
|
|
296
|
-
template: |
|
|
297
|
-
- Each scene in separate file
|
|
298
|
-
- Scene-specific logic contained in scripts within the scene
|
|
299
|
-
- Use a loading scene for asynchronous loading
|
|
300
|
-
- id: game-object-pattern
|
|
301
|
-
title: Game Object Pattern
|
|
302
|
-
type: bullet-list
|
|
303
|
-
template: |
|
|
304
|
-
- Component-based architecture using MonoBehaviours
|
|
305
|
-
- Reusable game objects as prefabs
|
|
306
|
-
- Data-driven design with ScriptableObjects
|
|
307
|
-
- id: system-architecture
|
|
308
|
-
title: System Architecture
|
|
309
|
-
type: bullet-list
|
|
310
|
-
template: |
|
|
311
|
-
- Singleton managers for global systems (e.g., GameManager, AudioManager)
|
|
312
|
-
- Event-driven communication using UnityEvents or C# events
|
|
313
|
-
- Clear separation of concerns between components
|
|
314
|
-
|
|
315
|
-
- id: core-game-systems
|
|
316
|
-
title: Core Game Systems
|
|
317
|
-
instruction: Detail each major system that needs to be implemented. Each system should be specific enough for developers to create implementation stories.
|
|
318
|
-
sections:
|
|
319
|
-
- id: scene-management
|
|
320
|
-
title: Scene Management System
|
|
321
|
-
template: |
|
|
322
|
-
**Purpose:** Handle game flow and scene transitions
|
|
323
|
-
|
|
324
|
-
**Key Components:**
|
|
325
|
-
|
|
326
|
-
- Asynchronous scene loading and unloading
|
|
327
|
-
- Data passing between scenes using a persistent manager or ScriptableObject
|
|
328
|
-
- Loading screens with progress bars
|
|
329
|
-
|
|
330
|
-
**Implementation Requirements:**
|
|
331
|
-
|
|
332
|
-
- A `SceneLoader` class to manage all scene transitions
|
|
333
|
-
- A loading scene to handle asynchronous loading
|
|
334
|
-
- A `GameManager` to persist between scenes and hold necessary data
|
|
335
|
-
|
|
336
|
-
**Files to Create:**
|
|
337
|
-
|
|
338
|
-
- `Assets/Scripts/Core/SceneLoader.cs`
|
|
339
|
-
- `Assets/Scenes/Loading.unity`
|
|
340
|
-
- id: game-state-management
|
|
341
|
-
title: Game State Management
|
|
342
|
-
template: |
|
|
343
|
-
**Purpose:** Track player progress and game status
|
|
344
|
-
|
|
345
|
-
**State Categories:**
|
|
346
|
-
|
|
347
|
-
- Player progress (levels, unlocks)
|
|
348
|
-
- Game settings (audio, controls)
|
|
349
|
-
- Session data (current level, score)
|
|
350
|
-
- Persistent data (achievements, statistics)
|
|
351
|
-
|
|
352
|
-
**Implementation Requirements:**
|
|
353
|
-
|
|
354
|
-
- A `SaveManager` class to handle saving and loading data to a file
|
|
355
|
-
- Use of `ScriptableObject`s to hold game state data
|
|
356
|
-
- State validation and error recovery
|
|
357
|
-
|
|
358
|
-
**Files to Create:**
|
|
359
|
-
|
|
360
|
-
- `Assets/Scripts/Core/SaveManager.cs`
|
|
361
|
-
- `Assets/Data/ScriptableObjects/GameState.cs`
|
|
362
|
-
- id: asset-management
|
|
363
|
-
title: Asset Management System
|
|
364
|
-
template: |
|
|
365
|
-
**Purpose:** Efficient loading and management of game assets
|
|
366
|
-
|
|
367
|
-
**Asset Categories:**
|
|
368
|
-
|
|
369
|
-
- Sprites and textures
|
|
370
|
-
- Audio clips and music
|
|
371
|
-
- Prefabs and scene files
|
|
372
|
-
- ScriptableObjects
|
|
373
|
-
|
|
374
|
-
**Implementation Requirements:**
|
|
375
|
-
|
|
376
|
-
- Use of Addressables for dynamic asset loading
|
|
377
|
-
- Asset bundles for platform-specific assets
|
|
378
|
-
- Memory management for large assets
|
|
379
|
-
|
|
380
|
-
**Files to Create:**
|
|
381
|
-
|
|
382
|
-
- `Assets/Scripts/Core/AssetManager.cs` (if needed for complex scenarios)
|
|
383
|
-
- id: input-management
|
|
384
|
-
title: Input Management System
|
|
385
|
-
template: |
|
|
386
|
-
**Purpose:** Handle all player input across platforms
|
|
387
|
-
|
|
388
|
-
**Input Types:**
|
|
389
|
-
|
|
390
|
-
- Keyboard controls
|
|
391
|
-
- Mouse/pointer interaction
|
|
392
|
-
- Touch gestures (mobile)
|
|
393
|
-
- Gamepad support
|
|
394
|
-
|
|
395
|
-
**Implementation Requirements:**
|
|
396
|
-
|
|
397
|
-
- Use the new Unity Input System
|
|
398
|
-
- Create Action Maps for different input contexts
|
|
399
|
-
- Use the `PlayerInput` component for easy player input handling
|
|
400
|
-
|
|
401
|
-
**Files to Create:**
|
|
402
|
-
|
|
403
|
-
- `Assets/Settings/InputActions.inputactions`
|
|
404
|
-
- id: game-mechanics-systems
|
|
405
|
-
title: Game Mechanics Systems
|
|
406
|
-
instruction: For each major mechanic defined in the GDD, create a system specification
|
|
407
|
-
repeatable: true
|
|
408
|
-
sections:
|
|
409
|
-
- id: mechanic-system
|
|
410
|
-
title: "{{mechanic_name}} System"
|
|
411
|
-
template: |
|
|
412
|
-
**Purpose:** {{system_purpose}}
|
|
413
|
-
|
|
414
|
-
**Core Functionality:**
|
|
415
|
-
|
|
416
|
-
- {{feature_1}}
|
|
417
|
-
- {{feature_2}}
|
|
418
|
-
- {{feature_3}}
|
|
419
|
-
|
|
420
|
-
**Dependencies:** {{required_systems}}
|
|
421
|
-
|
|
422
|
-
**Performance Considerations:** {{optimization_notes}}
|
|
423
|
-
|
|
424
|
-
**Files to Create:**
|
|
425
|
-
|
|
426
|
-
- `Assets/Scripts/Mechanics/{{SystemName}}.cs`
|
|
427
|
-
- `Assets/Prefabs/{{RelatedObject}}.prefab`
|
|
428
|
-
- id: physics-collision
|
|
429
|
-
title: Physics & Collision System
|
|
430
|
-
template: |
|
|
431
|
-
**Physics Engine:** Unity 2D Physics
|
|
432
|
-
|
|
433
|
-
**Collision Categories:**
|
|
434
|
-
|
|
435
|
-
- Player collision
|
|
436
|
-
- Enemy interactions
|
|
437
|
-
- Environmental objects
|
|
438
|
-
- Collectibles and items
|
|
439
|
-
|
|
440
|
-
**Implementation Requirements:**
|
|
441
|
-
|
|
442
|
-
- Use the Layer Collision Matrix to optimize collision detection
|
|
443
|
-
- Use `Rigidbody2D` for physics-based movement
|
|
444
|
-
- Use `Collider2D` components for collision shapes
|
|
445
|
-
|
|
446
|
-
**Files to Create:**
|
|
447
|
-
|
|
448
|
-
- (No new files, but configure `ProjectSettings/DynamicsManager.asset`)
|
|
449
|
-
- id: audio-system
|
|
450
|
-
title: Audio System
|
|
451
|
-
template: |
|
|
452
|
-
**Audio Requirements:**
|
|
453
|
-
|
|
454
|
-
- Background music with looping
|
|
455
|
-
- Sound effects for actions
|
|
456
|
-
- Audio settings and volume control
|
|
457
|
-
- Mobile audio optimization
|
|
458
|
-
|
|
459
|
-
**Implementation Features:**
|
|
460
|
-
|
|
461
|
-
- An `AudioManager` singleton to play sounds and music
|
|
462
|
-
- Use of `AudioMixer` to control volume levels
|
|
463
|
-
- Object pooling for frequently played sound effects
|
|
464
|
-
|
|
465
|
-
**Files to Create:**
|
|
466
|
-
|
|
467
|
-
- `Assets/Scripts/Core/AudioManager.cs`
|
|
468
|
-
- id: ui-system
|
|
469
|
-
title: UI System
|
|
470
|
-
template: |
|
|
471
|
-
**UI Components:**
|
|
472
|
-
|
|
473
|
-
- HUD elements (score, health, etc.)
|
|
474
|
-
- Menu navigation
|
|
475
|
-
- Modal dialogs
|
|
476
|
-
- Settings screens
|
|
477
|
-
|
|
478
|
-
**Implementation Requirements:**
|
|
479
|
-
|
|
480
|
-
- Use UI Toolkit or UGUI for building user interfaces
|
|
481
|
-
- Create a `UIManager` to manage UI elements
|
|
482
|
-
- Use events to update UI from game logic
|
|
483
|
-
|
|
484
|
-
**Files to Create:**
|
|
485
|
-
|
|
486
|
-
- `Assets/Scripts/UI/UIManager.cs`
|
|
487
|
-
- `Assets/UI/` (folder for UI assets and prefabs)
|
|
488
|
-
|
|
489
|
-
- id: performance-architecture
|
|
490
|
-
title: Performance Architecture
|
|
491
|
-
instruction: Define performance requirements and optimization strategies
|
|
492
|
-
sections:
|
|
493
|
-
- id: performance-targets
|
|
494
|
-
title: Performance Targets
|
|
495
|
-
template: |
|
|
496
|
-
**Frame Rate:** Stable frame rate, 60+ FPS on target platforms
|
|
497
|
-
**Memory Usage:** <{{memory_limit}}MB total
|
|
498
|
-
**Load Times:** <{{initial_load}}s initial, <{{level_load}}s per level
|
|
499
|
-
**Battery Optimization:** Reduced updates when not visible
|
|
500
|
-
- id: optimization-strategies
|
|
501
|
-
title: Optimization Strategies
|
|
502
|
-
sections:
|
|
503
|
-
- id: object-pooling
|
|
504
|
-
title: Object Pooling
|
|
505
|
-
type: bullet-list
|
|
506
|
-
template: |
|
|
507
|
-
- Bullets and projectiles
|
|
508
|
-
- Particle effects
|
|
509
|
-
- Enemy objects
|
|
510
|
-
- UI elements
|
|
511
|
-
- id: asset-optimization
|
|
512
|
-
title: Asset Optimization
|
|
513
|
-
type: bullet-list
|
|
514
|
-
template: |
|
|
515
|
-
- Sprite atlases
|
|
516
|
-
- Audio compression
|
|
517
|
-
- Mipmaps for textures
|
|
518
|
-
- id: rendering-optimization
|
|
519
|
-
title: Rendering Optimization
|
|
520
|
-
type: bullet-list
|
|
521
|
-
template: |
|
|
522
|
-
- Use the 2D Renderer
|
|
523
|
-
- Batching for sprites
|
|
524
|
-
- Culling off-screen objects
|
|
525
|
-
- id: optimization-files
|
|
526
|
-
title: Files to Create
|
|
527
|
-
type: bullet-list
|
|
528
|
-
template: |
|
|
529
|
-
- `Assets/Scripts/Core/ObjectPool.cs`
|
|
530
|
-
|
|
531
|
-
- id: game-configuration
|
|
532
|
-
title: Game Configuration
|
|
533
|
-
instruction: Define all configurable aspects of the game
|
|
534
|
-
sections:
|
|
535
|
-
- id: game-balance-configuration
|
|
536
|
-
title: Game Balance Configuration
|
|
537
|
-
instruction: Based on GDD, define configurable game parameters using ScriptableObjects
|
|
538
|
-
type: code
|
|
539
|
-
language: c#
|
|
540
|
-
template: |
|
|
541
|
-
// Assets/Scripts/Data/GameBalance.cs
|
|
542
|
-
using UnityEngine;
|
|
543
|
-
|
|
544
|
-
[CreateAssetMenu(fileName = "GameBalance", menuName = "Game/Game Balance")]
|
|
545
|
-
public class GameBalance : ScriptableObject
|
|
546
|
-
{
|
|
547
|
-
public PlayerStats playerStats;
|
|
548
|
-
public EnemyStats enemyStats;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
[System.Serializable]
|
|
552
|
-
public class PlayerStats
|
|
553
|
-
{
|
|
554
|
-
public float speed;
|
|
555
|
-
public int maxHealth;
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
[System.Serializable]
|
|
559
|
-
public class EnemyStats
|
|
560
|
-
{
|
|
561
|
-
public float speed;
|
|
562
|
-
public int maxHealth;
|
|
563
|
-
public int damage;
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
- id: development-guidelines
|
|
567
|
-
title: Development Guidelines
|
|
568
|
-
instruction: Provide coding standards specific to game development
|
|
569
|
-
sections:
|
|
570
|
-
- id: c#-standards
|
|
571
|
-
title: C# Standards
|
|
572
|
-
sections:
|
|
573
|
-
- id: code-style
|
|
574
|
-
title: Code Style
|
|
575
|
-
type: bullet-list
|
|
576
|
-
template: |
|
|
577
|
-
- Follow .NET coding conventions
|
|
578
|
-
- Use namespaces to organize code
|
|
579
|
-
- Write clean, readable, and maintainable code
|
|
580
|
-
- id: unity-best-practices
|
|
581
|
-
title: Unity Best Practices
|
|
582
|
-
sections:
|
|
583
|
-
- id: general-best-practices
|
|
584
|
-
title: General Best Practices
|
|
585
|
-
type: bullet-list
|
|
586
|
-
template: |
|
|
587
|
-
- Use the `[SerializeField]` attribute to expose private fields in the Inspector
|
|
588
|
-
- Avoid using `GameObject.Find()` in `Update()`
|
|
589
|
-
- Cache component references in `Awake()` or `Start()`
|
|
590
|
-
- id: component-design
|
|
591
|
-
title: Component Design
|
|
592
|
-
type: bullet-list
|
|
593
|
-
template: |
|
|
594
|
-
- Follow the Single Responsibility Principle
|
|
595
|
-
- Use events for communication between components
|
|
596
|
-
- Use ScriptableObjects for data
|
|
597
|
-
- id: scene-management-practices
|
|
598
|
-
title: Scene Management
|
|
599
|
-
type: bullet-list
|
|
600
|
-
template: |
|
|
601
|
-
- Use a loading scene for asynchronous loading
|
|
602
|
-
- Keep scenes small and focused
|
|
603
|
-
- id: testing-strategy
|
|
604
|
-
title: Testing Strategy
|
|
605
|
-
sections:
|
|
606
|
-
- id: unit-testing
|
|
607
|
-
title: Unit Testing
|
|
608
|
-
type: bullet-list
|
|
609
|
-
template: |
|
|
610
|
-
- Use the Unity Test Framework (Edit Mode tests)
|
|
611
|
-
- Test C# logic in isolation
|
|
612
|
-
- id: integration-testing
|
|
613
|
-
title: Integration Testing
|
|
614
|
-
type: bullet-list
|
|
615
|
-
template: |
|
|
616
|
-
- Use the Unity Test Framework (Play Mode tests)
|
|
617
|
-
- Test the interaction between components and systems
|
|
618
|
-
- id: test-files
|
|
619
|
-
title: Files to Create
|
|
620
|
-
type: bullet-list
|
|
621
|
-
template: |
|
|
622
|
-
- `Assets/Tests/EditMode/`
|
|
623
|
-
- `Assets/Tests/PlayMode/`
|
|
624
|
-
|
|
625
|
-
- id: deployment-architecture
|
|
626
|
-
title: Deployment Architecture
|
|
627
|
-
instruction: Define how the game will be built and deployed
|
|
628
|
-
sections:
|
|
629
|
-
- id: build-process
|
|
630
|
-
title: Build Process
|
|
631
|
-
sections:
|
|
632
|
-
- id: development-build
|
|
633
|
-
title: Development Build
|
|
634
|
-
type: bullet-list
|
|
635
|
-
template: |
|
|
636
|
-
- Enable "Development Build" in Build Settings
|
|
637
|
-
- Use the Profiler to analyze performance
|
|
638
|
-
- id: production-build
|
|
639
|
-
title: Production Build
|
|
640
|
-
type: bullet-list
|
|
641
|
-
template: |
|
|
642
|
-
- Disable "Development Build"
|
|
643
|
-
- Use IL2CPP for better performance
|
|
644
|
-
- Configure platform-specific settings
|
|
645
|
-
- id: deployment-strategy
|
|
646
|
-
title: Deployment Strategy
|
|
647
|
-
sections:
|
|
648
|
-
- id: platform-deployment
|
|
649
|
-
title: Platform Deployment
|
|
650
|
-
type: bullet-list
|
|
651
|
-
template: |
|
|
652
|
-
- Configure player settings for each target platform
|
|
653
|
-
- Use Unity Cloud Build for automated builds
|
|
654
|
-
- Follow platform-specific guidelines for submission
|
|
655
|
-
|
|
656
|
-
- id: implementation-roadmap
|
|
657
|
-
title: Implementation Roadmap
|
|
658
|
-
instruction: Break down the architecture implementation into phases that align with the GDD development phases
|
|
659
|
-
sections:
|
|
660
|
-
- id: phase-1-foundation
|
|
661
|
-
title: "Phase 1: Foundation ({{duration}})"
|
|
662
|
-
sections:
|
|
663
|
-
- id: phase-1-core
|
|
664
|
-
title: Core Systems
|
|
665
|
-
type: bullet-list
|
|
666
|
-
template: |
|
|
667
|
-
- Project setup and configuration
|
|
668
|
-
- Basic scene management
|
|
669
|
-
- Asset loading pipeline
|
|
670
|
-
- Input handling framework
|
|
671
|
-
- id: phase-1-epics
|
|
672
|
-
title: Story Epics
|
|
673
|
-
type: bullet-list
|
|
674
|
-
template: |
|
|
675
|
-
- "Engine Setup and Configuration"
|
|
676
|
-
- "Basic Scene Management System"
|
|
677
|
-
- "Asset Loading Foundation"
|
|
678
|
-
- id: phase-2-game-systems
|
|
679
|
-
title: "Phase 2: Game Systems ({{duration}})"
|
|
680
|
-
sections:
|
|
681
|
-
- id: phase-2-gameplay
|
|
682
|
-
title: Gameplay Systems
|
|
683
|
-
type: bullet-list
|
|
684
|
-
template: |
|
|
685
|
-
- {{primary_mechanic}} implementation
|
|
686
|
-
- Physics and collision system
|
|
687
|
-
- Game state management
|
|
688
|
-
- UI framework
|
|
689
|
-
- id: phase-2-epics
|
|
690
|
-
title: Story Epics
|
|
691
|
-
type: bullet-list
|
|
692
|
-
template: |
|
|
693
|
-
- "{{primary_mechanic}} System Implementation"
|
|
694
|
-
- "Physics and Collision Framework"
|
|
695
|
-
- "Game State Management System"
|
|
696
|
-
- id: phase-3-content-polish
|
|
697
|
-
title: "Phase 3: Content & Polish ({{duration}})"
|
|
698
|
-
sections:
|
|
699
|
-
- id: phase-3-content
|
|
700
|
-
title: Content Systems
|
|
701
|
-
type: bullet-list
|
|
702
|
-
template: |
|
|
703
|
-
- Level loading and management
|
|
704
|
-
- Audio system integration
|
|
705
|
-
- Performance optimization
|
|
706
|
-
- Final polish and testing
|
|
707
|
-
- id: phase-3-epics
|
|
708
|
-
title: Story Epics
|
|
709
|
-
type: bullet-list
|
|
710
|
-
template: |
|
|
711
|
-
- "Level Management System"
|
|
712
|
-
- "Audio Integration and Optimization"
|
|
713
|
-
- "Performance Optimization and Testing"
|
|
714
|
-
|
|
715
|
-
- id: risk-assessment
|
|
716
|
-
title: Risk Assessment
|
|
717
|
-
instruction: Identify potential technical risks and mitigation strategies
|
|
718
|
-
type: table
|
|
719
|
-
template: |
|
|
720
|
-
| Risk | Probability | Impact | Mitigation Strategy |
|
|
721
|
-
| ---------------------------- | ----------- | ---------- | ------------------- |
|
|
722
|
-
| Performance issues on mobile | {{prob}} | {{impact}} | {{mitigation}} |
|
|
723
|
-
| Asset loading bottlenecks | {{prob}} | {{impact}} | {{mitigation}} |
|
|
724
|
-
| Cross-platform compatibility | {{prob}} | {{impact}} | {{mitigation}} |
|
|
725
|
-
|
|
726
|
-
- id: success-criteria
|
|
727
|
-
title: Success Criteria
|
|
728
|
-
instruction: Define measurable technical success criteria
|
|
729
|
-
sections:
|
|
730
|
-
- id: technical-metrics
|
|
731
|
-
title: Technical Metrics
|
|
732
|
-
type: bullet-list
|
|
733
|
-
template: |
|
|
734
|
-
- All systems implemented per specification
|
|
735
|
-
- Performance targets met consistently
|
|
736
|
-
- Zero critical bugs in core systems
|
|
737
|
-
- Successful deployment across target platforms
|
|
738
|
-
- id: code-quality
|
|
739
|
-
title: Code Quality
|
|
740
|
-
type: bullet-list
|
|
741
|
-
template: |
|
|
742
|
-
- 90%+ test coverage on game logic
|
|
743
|
-
- Zero C# compiler errors or warnings
|
|
744
|
-
- Consistent adherence to coding standards
|
|
745
|
-
- Comprehensive documentation coverage
|
|
746
|
-
==================== END: .bmad-2d-unity-game-dev/templates/game-architecture-tmpl.yaml ====================
|
|
195
|
+
==================== START: .bmad-2d-unity-game-dev/tasks/validate-next-story.md ====================
|
|
196
|
+
# Validate Next Story Task
|
|
747
197
|
|
|
748
|
-
|
|
749
|
-
# Game Development Story Definition of Done Checklist
|
|
750
|
-
|
|
751
|
-
## Story Completeness
|
|
752
|
-
|
|
753
|
-
### Basic Story Elements
|
|
754
|
-
|
|
755
|
-
- [ ] **Story Title** - Clear, descriptive title that identifies the feature
|
|
756
|
-
- [ ] **Epic Assignment** - Story is properly assigned to relevant epic
|
|
757
|
-
- [ ] **Priority Level** - Appropriate priority assigned (High/Medium/Low)
|
|
758
|
-
- [ ] **Story Points** - Realistic estimation for implementation complexity
|
|
759
|
-
- [ ] **Description** - Clear, concise description of what needs to be implemented
|
|
760
|
-
|
|
761
|
-
### Game Design Alignment
|
|
762
|
-
|
|
763
|
-
- [ ] **GDD Reference** - Specific Game Design Document section referenced
|
|
764
|
-
- [ ] **Game Mechanic Context** - Clear connection to game mechanics defined in GDD
|
|
765
|
-
- [ ] **Player Experience Goal** - Describes the intended player experience
|
|
766
|
-
- [ ] **Balance Parameters** - Includes any relevant game balance values
|
|
767
|
-
- [ ] **Design Intent** - Purpose and rationale for the feature is clear
|
|
768
|
-
|
|
769
|
-
## Technical Specifications
|
|
770
|
-
|
|
771
|
-
### Architecture Compliance
|
|
772
|
-
|
|
773
|
-
- [ ] **File Organization** - Follows game architecture document structure (e.g., scripts, prefabs, scenes)
|
|
774
|
-
- [ ] **Class Definitions** - C# classes and interfaces are properly defined
|
|
775
|
-
- [ ] **Integration Points** - Clear specification of how feature integrates with existing systems
|
|
776
|
-
- [ ] **Event Communication** - UnityEvents or C# events usage specified
|
|
777
|
-
- [ ] **Dependencies** - All system dependencies clearly identified
|
|
198
|
+
## Purpose
|
|
778
199
|
|
|
779
|
-
|
|
200
|
+
To comprehensively validate a story draft before implementation begins, ensuring it is complete, accurate, and provides sufficient context for successful development. This task identifies issues and gaps that need to be addressed, preventing hallucinations and ensuring implementation readiness.
|
|
780
201
|
|
|
781
|
-
|
|
782
|
-
- [ ] **Prefab Usage** - Proper use of prefabs for reusable GameObjects
|
|
783
|
-
- [ ] **Component Design** - Logic is encapsulated in well-defined MonoBehaviour components
|
|
784
|
-
- [ ] **Asset Requirements** - All needed assets (sprites, audio, materials) identified
|
|
785
|
-
- [ ] **Performance Considerations** - Stable frame rate target and optimization requirements
|
|
202
|
+
## SEQUENTIAL Task Execution (Do not proceed until current Task is complete)
|
|
786
203
|
|
|
787
|
-
###
|
|
204
|
+
### 0. Load Core Configuration and Inputs
|
|
788
205
|
|
|
789
|
-
-
|
|
790
|
-
-
|
|
791
|
-
-
|
|
792
|
-
-
|
|
793
|
-
-
|
|
206
|
+
- Load `.bmad-core/core-config.yaml`
|
|
207
|
+
- If the file does not exist, HALT and inform the user: "core-config.yaml not found. This file is required for story validation."
|
|
208
|
+
- Extract key configurations: `devStoryLocation`, `prd.*`, `architecture.*`
|
|
209
|
+
- Identify and load the following inputs:
|
|
210
|
+
- **Story file**: The drafted story to validate (provided by user or discovered in `devStoryLocation`)
|
|
211
|
+
- **Parent epic**: The epic containing this story's requirements
|
|
212
|
+
- **Architecture documents**: Based on configuration (sharded or monolithic)
|
|
213
|
+
- **Story template**: `bmad-core/templates/story-tmpl.md` for completeness validation
|
|
794
214
|
|
|
795
|
-
|
|
215
|
+
### 1. Template Completeness Validation
|
|
796
216
|
|
|
797
|
-
|
|
217
|
+
- Load `bmad-core/templates/story-tmpl.md` and extract all section headings from the template
|
|
218
|
+
- **Missing sections check**: Compare story sections against template sections to verify all required sections are present
|
|
219
|
+
- **Placeholder validation**: Ensure no template placeholders remain unfilled (e.g., `{{EpicNum}}`, `{{role}}`, `_TBD_`)
|
|
220
|
+
- **Agent section verification**: Confirm all sections from template exist for future agent use
|
|
221
|
+
- **Structure compliance**: Verify story follows template structure and formatting
|
|
798
222
|
|
|
799
|
-
|
|
800
|
-
- [ ] **Technical Requirements** - Technical acceptance criteria are complete and verifiable
|
|
801
|
-
- [ ] **Game Design Requirements** - Game-specific requirements match GDD specifications
|
|
802
|
-
- [ ] **Performance Requirements** - Frame rate and memory usage criteria specified
|
|
803
|
-
- [ ] **Completeness** - No acceptance criteria are vague or unmeasurable
|
|
223
|
+
### 2. File Structure and Source Tree Validation
|
|
804
224
|
|
|
805
|
-
|
|
225
|
+
- **File paths clarity**: Are new/existing files to be created/modified clearly specified?
|
|
226
|
+
- **Source tree relevance**: Is relevant project structure included in Dev Notes?
|
|
227
|
+
- **Directory structure**: Are new directories/components properly located according to project structure?
|
|
228
|
+
- **File creation sequence**: Do tasks specify where files should be created in logical order?
|
|
229
|
+
- **Path accuracy**: Are file paths consistent with project structure from architecture docs?
|
|
806
230
|
|
|
807
|
-
|
|
808
|
-
- [ ] **Task Scope** - Each task is completable in 1-4 hours
|
|
809
|
-
- [ ] **Task Clarity** - Each task has clear, actionable instructions
|
|
810
|
-
- [ ] **File Specifications** - Exact file paths and purposes specified (e.g., `Scripts/Player/PlayerMovement.cs`)
|
|
811
|
-
- [ ] **Development Flow** - Tasks follow logical implementation order
|
|
231
|
+
### 3. UI/Frontend Completeness Validation (if applicable)
|
|
812
232
|
|
|
813
|
-
|
|
233
|
+
- **Component specifications**: Are UI components sufficiently detailed for implementation?
|
|
234
|
+
- **Styling/design guidance**: Is visual implementation guidance clear?
|
|
235
|
+
- **User interaction flows**: Are UX patterns and behaviors specified?
|
|
236
|
+
- **Responsive/accessibility**: Are these considerations addressed if required?
|
|
237
|
+
- **Integration points**: Are frontend-backend integration points clear?
|
|
814
238
|
|
|
815
|
-
|
|
816
|
-
- [ ] **Technical Dependencies** - Required systems and files identified
|
|
817
|
-
- [ ] **Asset Dependencies** - All needed assets specified with locations
|
|
818
|
-
- [ ] **External Dependencies** - Any third-party or external requirements noted (e.g., Asset Store packages)
|
|
819
|
-
- [ ] **Dependency Validation** - All dependencies are actually available
|
|
239
|
+
### 4. Acceptance Criteria Satisfaction Assessment
|
|
820
240
|
|
|
821
|
-
|
|
241
|
+
- **AC coverage**: Will all acceptance criteria be satisfied by the listed tasks?
|
|
242
|
+
- **AC testability**: Are acceptance criteria measurable and verifiable?
|
|
243
|
+
- **Missing scenarios**: Are edge cases or error conditions covered?
|
|
244
|
+
- **Success definition**: Is "done" clearly defined for each AC?
|
|
245
|
+
- **Task-AC mapping**: Are tasks properly linked to specific acceptance criteria?
|
|
822
246
|
|
|
823
|
-
###
|
|
247
|
+
### 5. Validation and Testing Instructions Review
|
|
824
248
|
|
|
825
|
-
-
|
|
826
|
-
-
|
|
827
|
-
-
|
|
828
|
-
-
|
|
829
|
-
-
|
|
249
|
+
- **Test approach clarity**: Are testing methods clearly specified?
|
|
250
|
+
- **Test scenarios**: Are key test cases identified?
|
|
251
|
+
- **Validation steps**: Are acceptance criteria validation steps clear?
|
|
252
|
+
- **Testing tools/frameworks**: Are required testing tools specified?
|
|
253
|
+
- **Test data requirements**: Are test data needs identified?
|
|
830
254
|
|
|
831
|
-
###
|
|
255
|
+
### 6. Security Considerations Assessment (if applicable)
|
|
832
256
|
|
|
833
|
-
-
|
|
834
|
-
-
|
|
835
|
-
-
|
|
836
|
-
-
|
|
837
|
-
-
|
|
257
|
+
- **Security requirements**: Are security needs identified and addressed?
|
|
258
|
+
- **Authentication/authorization**: Are access controls specified?
|
|
259
|
+
- **Data protection**: Are sensitive data handling requirements clear?
|
|
260
|
+
- **Vulnerability prevention**: Are common security issues addressed?
|
|
261
|
+
- **Compliance requirements**: Are regulatory/compliance needs addressed?
|
|
838
262
|
|
|
839
|
-
|
|
263
|
+
### 7. Tasks/Subtasks Sequence Validation
|
|
840
264
|
|
|
841
|
-
|
|
265
|
+
- **Logical order**: Do tasks follow proper implementation sequence?
|
|
266
|
+
- **Dependencies**: Are task dependencies clear and correct?
|
|
267
|
+
- **Granularity**: Are tasks appropriately sized and actionable?
|
|
268
|
+
- **Completeness**: Do tasks cover all requirements and acceptance criteria?
|
|
269
|
+
- **Blocking issues**: Are there any tasks that would block others?
|
|
842
270
|
|
|
843
|
-
|
|
844
|
-
- [ ] **Player Controls** - Input handling requirements are complete (e.g., Input System package)
|
|
845
|
-
- [ ] **Game Feel** - Requirements for juice, feedback, and responsiveness specified
|
|
846
|
-
- [ ] **Balance Implementation** - Numeric values and parameters from GDD included
|
|
847
|
-
- [ ] **State Management** - Game state changes and persistence requirements defined
|
|
271
|
+
### 8. Anti-Hallucination Verification
|
|
848
272
|
|
|
849
|
-
|
|
273
|
+
- **Source verification**: Every technical claim must be traceable to source documents
|
|
274
|
+
- **Architecture alignment**: Dev Notes content matches architecture specifications
|
|
275
|
+
- **No invented details**: Flag any technical decisions not supported by source documents
|
|
276
|
+
- **Reference accuracy**: Verify all source references are correct and accessible
|
|
277
|
+
- **Fact checking**: Cross-reference claims against epic and architecture documents
|
|
850
278
|
|
|
851
|
-
|
|
852
|
-
- [ ] **Audio Integration** - Sound effect and music requirements defined
|
|
853
|
-
- [ ] **Visual Feedback** - Animation and visual effect requirements specified (e.g., Animator, Particle System)
|
|
854
|
-
- [ ] **Accessibility** - Mobile touch and responsive design considerations
|
|
855
|
-
- [ ] **Error Recovery** - User-facing error handling and recovery specified
|
|
279
|
+
### 9. Dev Agent Implementation Readiness
|
|
856
280
|
|
|
857
|
-
|
|
281
|
+
- **Self-contained context**: Can the story be implemented without reading external docs?
|
|
282
|
+
- **Clear instructions**: Are implementation steps unambiguous?
|
|
283
|
+
- **Complete technical context**: Are all required technical details present in Dev Notes?
|
|
284
|
+
- **Missing information**: Identify any critical information gaps
|
|
285
|
+
- **Actionability**: Are all tasks actionable by a development agent?
|
|
858
286
|
|
|
859
|
-
|
|
860
|
-
- [ ] **Memory Usage** - Memory consumption limits and monitoring requirements (e.g., Profiler)
|
|
861
|
-
- [ ] **Asset Optimization** - Texture, audio, and data optimization requirements
|
|
862
|
-
- [ ] **Mobile Considerations** - Touch controls and mobile performance requirements
|
|
863
|
-
- [ ] **Loading Performance** - Asset loading and scene transition requirements
|
|
287
|
+
### 10. Generate Validation Report
|
|
864
288
|
|
|
865
|
-
|
|
289
|
+
Provide a structured validation report including:
|
|
866
290
|
|
|
867
|
-
|
|
291
|
+
#### Template Compliance Issues
|
|
868
292
|
|
|
869
|
-
-
|
|
870
|
-
-
|
|
871
|
-
-
|
|
872
|
-
- [ ] **Change Tracking** - Process for tracking any requirement changes during development
|
|
873
|
-
- [ ] **Reference Materials** - Links to relevant GDD sections and architecture docs
|
|
293
|
+
- Missing sections from story template
|
|
294
|
+
- Unfilled placeholders or template variables
|
|
295
|
+
- Structural formatting issues
|
|
874
296
|
|
|
875
|
-
|
|
297
|
+
#### Critical Issues (Must Fix - Story Blocked)
|
|
876
298
|
|
|
877
|
-
-
|
|
878
|
-
-
|
|
879
|
-
-
|
|
880
|
-
-
|
|
881
|
-
- [ ] **Communication Plan** - Process for developer questions and updates established
|
|
299
|
+
- Missing essential information for implementation
|
|
300
|
+
- Inaccurate or unverifiable technical claims
|
|
301
|
+
- Incomplete acceptance criteria coverage
|
|
302
|
+
- Missing required sections
|
|
882
303
|
|
|
883
|
-
|
|
304
|
+
#### Should-Fix Issues (Important Quality Improvements)
|
|
884
305
|
|
|
885
|
-
|
|
306
|
+
- Unclear implementation guidance
|
|
307
|
+
- Missing security considerations
|
|
308
|
+
- Task sequencing problems
|
|
309
|
+
- Incomplete testing instructions
|
|
886
310
|
|
|
887
|
-
|
|
888
|
-
- [ ] **Technical Completeness** - All technical requirements are specified and actionable
|
|
889
|
-
- [ ] **Scope Appropriateness** - Story scope matches assigned story points
|
|
890
|
-
- [ ] **Quality Standards** - Story meets all game development quality standards
|
|
891
|
-
- [ ] **Review Completion** - Story has been reviewed for completeness and accuracy
|
|
311
|
+
#### Nice-to-Have Improvements (Optional Enhancements)
|
|
892
312
|
|
|
893
|
-
|
|
313
|
+
- Additional context that would help implementation
|
|
314
|
+
- Clarifications that would improve efficiency
|
|
315
|
+
- Documentation improvements
|
|
894
316
|
|
|
895
|
-
|
|
896
|
-
- [ ] **Resources Available** - All required resources (assets, docs, dependencies) accessible
|
|
897
|
-
- [ ] **Testing Prepared** - Testing environment and data requirements specified
|
|
898
|
-
- [ ] **Definition of Done** - Clear, objective completion criteria established
|
|
899
|
-
- [ ] **Handoff Complete** - Story is ready for developer assignment and implementation
|
|
317
|
+
#### Anti-Hallucination Findings
|
|
900
318
|
|
|
901
|
-
|
|
319
|
+
- Unverifiable technical claims
|
|
320
|
+
- Missing source references
|
|
321
|
+
- Inconsistencies with architecture documents
|
|
322
|
+
- Invented libraries, patterns, or standards
|
|
902
323
|
|
|
903
|
-
|
|
324
|
+
#### Final Assessment
|
|
904
325
|
|
|
905
|
-
**
|
|
326
|
+
- **GO**: Story is ready for implementation
|
|
327
|
+
- **NO-GO**: Story requires fixes before implementation
|
|
328
|
+
- **Implementation Readiness Score**: 1-10 scale
|
|
329
|
+
- **Confidence Level**: High/Medium/Low for successful implementation
|
|
330
|
+
==================== END: .bmad-2d-unity-game-dev/tasks/validate-next-story.md ====================
|
|
906
331
|
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
==================== END: .bmad-2d-unity-game-dev/checklists/game-story-dod-checklist.md ====================
|
|
910
|
-
|
|
911
|
-
==================== START: .bmad-2d-unity-game-dev/data/development-guidelines.md ====================
|
|
912
|
-
# Game Development Guidelines (Unity & C#)
|
|
913
|
-
|
|
914
|
-
## Overview
|
|
915
|
-
|
|
916
|
-
This document establishes coding standards, architectural patterns, and development practices for 2D game development using Unity and C#. These guidelines ensure consistency, performance, and maintainability across all game development stories.
|
|
917
|
-
|
|
918
|
-
## C# Standards
|
|
919
|
-
|
|
920
|
-
### Naming Conventions
|
|
921
|
-
|
|
922
|
-
**Classes, Structs, Enums, and Interfaces:**
|
|
923
|
-
- PascalCase for types: `PlayerController`, `GameData`, `IInteractable`
|
|
924
|
-
- Prefix interfaces with 'I': `IDamageable`, `IControllable`
|
|
925
|
-
- Descriptive names that indicate purpose: `GameStateManager` not `GSM`
|
|
926
|
-
|
|
927
|
-
**Methods and Properties:**
|
|
928
|
-
- PascalCase for methods and properties: `CalculateScore()`, `CurrentHealth`
|
|
929
|
-
- Descriptive verb phrases for methods: `ActivateShield()` not `shield()`
|
|
930
|
-
|
|
931
|
-
**Fields and Variables:**
|
|
932
|
-
- `private` or `protected` fields: camelCase with an underscore prefix: `_playerHealth`, `_movementSpeed`
|
|
933
|
-
- `public` fields (use sparingly, prefer properties): PascalCase: `PlayerName`
|
|
934
|
-
- `static` fields: PascalCase: `Instance`, `GameVersion`
|
|
935
|
-
- `const` fields: PascalCase: `MaxHitPoints`
|
|
936
|
-
- `local` variables: camelCase: `damageAmount`, `isJumping`
|
|
937
|
-
- Boolean variables with is/has/can prefix: `_isAlive`, `_hasKey`, `_canJump`
|
|
938
|
-
|
|
939
|
-
**Files and Directories:**
|
|
940
|
-
- PascalCase for C# script files, matching the primary class name: `PlayerController.cs`
|
|
941
|
-
- PascalCase for Scene files: `MainMenu.unity`, `Level01.unity`
|
|
942
|
-
|
|
943
|
-
### Style and Formatting
|
|
944
|
-
|
|
945
|
-
- **Braces**: Use Allman style (braces on a new line).
|
|
946
|
-
- **Spacing**: Use 4 spaces for indentation (no tabs).
|
|
947
|
-
- **`using` directives**: Place all `using` directives at the top of the file, outside the namespace.
|
|
948
|
-
- **`this` keyword**: Only use `this` when necessary to distinguish between a field and a local variable/parameter.
|
|
949
|
-
|
|
950
|
-
## Unity Architecture Patterns
|
|
951
|
-
|
|
952
|
-
### Scene Lifecycle Management
|
|
953
|
-
**Loading and Transitioning Between Scenes:**
|
|
954
|
-
```csharp
|
|
955
|
-
// SceneLoader.cs - A singleton for managing scene transitions.
|
|
956
|
-
using UnityEngine;
|
|
957
|
-
using UnityEngine.SceneManagement;
|
|
958
|
-
using System.Collections;
|
|
959
|
-
|
|
960
|
-
public class SceneLoader : MonoBehaviour
|
|
961
|
-
{
|
|
962
|
-
public static SceneLoader Instance { get; private set; }
|
|
963
|
-
|
|
964
|
-
private void Awake()
|
|
965
|
-
{
|
|
966
|
-
if (Instance != null && Instance != this)
|
|
967
|
-
{
|
|
968
|
-
Destroy(gameObject);
|
|
969
|
-
return;
|
|
970
|
-
}
|
|
971
|
-
Instance = this;
|
|
972
|
-
DontDestroyOnLoad(gameObject);
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
public void LoadGameScene()
|
|
976
|
-
{
|
|
977
|
-
// Example of loading the main game scene, perhaps with a loading screen first.
|
|
978
|
-
StartCoroutine(LoadSceneAsync("Level01"));
|
|
979
|
-
}
|
|
980
|
-
|
|
981
|
-
private IEnumerator LoadSceneAsync(string sceneName)
|
|
982
|
-
{
|
|
983
|
-
// Load a loading screen first (optional)
|
|
984
|
-
SceneManager.LoadScene("LoadingScreen");
|
|
985
|
-
|
|
986
|
-
// Wait a frame for the loading screen to appear
|
|
987
|
-
yield return null;
|
|
988
|
-
|
|
989
|
-
// Begin loading the target scene in the background
|
|
990
|
-
AsyncOperation asyncLoad = SceneManager.LoadSceneAsync(sceneName);
|
|
991
|
-
|
|
992
|
-
// Don't activate the scene until it's fully loaded
|
|
993
|
-
asyncLoad.allowSceneActivation = false;
|
|
994
|
-
|
|
995
|
-
// Wait until the asynchronous scene fully loads
|
|
996
|
-
while (!asyncLoad.isDone)
|
|
997
|
-
{
|
|
998
|
-
// Here you could update a progress bar with asyncLoad.progress
|
|
999
|
-
if (asyncLoad.progress >= 0.9f)
|
|
1000
|
-
{
|
|
1001
|
-
// Scene is loaded, allow activation
|
|
1002
|
-
asyncLoad.allowSceneActivation = true;
|
|
1003
|
-
}
|
|
1004
|
-
yield return null;
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
}
|
|
1008
|
-
```
|
|
1009
|
-
|
|
1010
|
-
### MonoBehaviour Lifecycle
|
|
1011
|
-
**Understanding Core MonoBehaviour Events:**
|
|
1012
|
-
```csharp
|
|
1013
|
-
// Example of a standard MonoBehaviour lifecycle
|
|
1014
|
-
using UnityEngine;
|
|
1015
|
-
|
|
1016
|
-
public class PlayerController : MonoBehaviour
|
|
1017
|
-
{
|
|
1018
|
-
// AWAKE: Called when the script instance is being loaded.
|
|
1019
|
-
// Use for initialization before the game starts. Good for caching component references.
|
|
1020
|
-
private void Awake()
|
|
1021
|
-
{
|
|
1022
|
-
Debug.Log("PlayerController Awake!");
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
// ONENABLE: Called when the object becomes enabled and active.
|
|
1026
|
-
// Good for subscribing to events.
|
|
1027
|
-
private void OnEnable()
|
|
1028
|
-
{
|
|
1029
|
-
// Example: UIManager.OnGamePaused += HandleGamePaused;
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
// START: Called on the frame when a script is enabled just before any of the Update methods are called the first time.
|
|
1033
|
-
// Good for logic that depends on other objects being initialized.
|
|
1034
|
-
private void Start()
|
|
1035
|
-
{
|
|
1036
|
-
Debug.Log("PlayerController Start!");
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
// FIXEDUPDATE: Called every fixed framerate frame.
|
|
1040
|
-
// Use for physics calculations (e.g., applying forces to a Rigidbody).
|
|
1041
|
-
private void FixedUpdate()
|
|
1042
|
-
{
|
|
1043
|
-
// Handle Rigidbody movement here.
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
// UPDATE: Called every frame.
|
|
1047
|
-
// Use for most game logic, like handling input and non-physics movement.
|
|
1048
|
-
private void Update()
|
|
1049
|
-
{
|
|
1050
|
-
// Handle input and non-physics movement here.
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
// LATEUPDATE: Called every frame, after all Update functions have been called.
|
|
1054
|
-
// Good for camera logic that needs to track a target that moves in Update.
|
|
1055
|
-
private void LateUpdate()
|
|
1056
|
-
{
|
|
1057
|
-
// Camera follow logic here.
|
|
1058
|
-
}
|
|
1059
|
-
|
|
1060
|
-
// ONDISABLE: Called when the behaviour becomes disabled or inactive.
|
|
1061
|
-
// Good for unsubscribing from events to prevent memory leaks.
|
|
1062
|
-
private void OnDisable()
|
|
1063
|
-
{
|
|
1064
|
-
// Example: UIManager.OnGamePaused -= HandleGamePaused;
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
// ONDESTROY: Called when the MonoBehaviour will be destroyed.
|
|
1068
|
-
// Good for any final cleanup.
|
|
1069
|
-
private void OnDestroy()
|
|
1070
|
-
{
|
|
1071
|
-
Debug.Log("PlayerController Destroyed!");
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
```
|
|
1075
|
-
|
|
1076
|
-
### Game Object Patterns
|
|
1077
|
-
|
|
1078
|
-
**Component-Based Architecture:**
|
|
1079
|
-
```csharp
|
|
1080
|
-
// Player.cs - The main GameObject class, acts as a container for components.
|
|
1081
|
-
using UnityEngine;
|
|
1082
|
-
|
|
1083
|
-
[RequireComponent(typeof(PlayerMovement), typeof(PlayerHealth))]
|
|
1084
|
-
public class Player : MonoBehaviour
|
|
1085
|
-
{
|
|
1086
|
-
public PlayerMovement Movement { get; private set; }
|
|
1087
|
-
public PlayerHealth Health { get; private set; }
|
|
1088
|
-
|
|
1089
|
-
private void Awake()
|
|
1090
|
-
{
|
|
1091
|
-
Movement = GetComponent<PlayerMovement>();
|
|
1092
|
-
Health = GetComponent<PlayerHealth>();
|
|
1093
|
-
}
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
// PlayerHealth.cs - A component responsible only for health logic.
|
|
1097
|
-
public class PlayerHealth : MonoBehaviour
|
|
1098
|
-
{
|
|
1099
|
-
[SerializeField] private int _maxHealth = 100;
|
|
1100
|
-
private int _currentHealth;
|
|
1101
|
-
|
|
1102
|
-
private void Awake()
|
|
1103
|
-
{
|
|
1104
|
-
_currentHealth = _maxHealth;
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
public void TakeDamage(int amount)
|
|
1108
|
-
{
|
|
1109
|
-
_currentHealth -= amount;
|
|
1110
|
-
if (_currentHealth <= 0)
|
|
1111
|
-
{
|
|
1112
|
-
Die();
|
|
1113
|
-
}
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
private void Die()
|
|
1117
|
-
{
|
|
1118
|
-
// Death logic
|
|
1119
|
-
Debug.Log("Player has died.");
|
|
1120
|
-
gameObject.SetActive(false);
|
|
1121
|
-
}
|
|
1122
|
-
}
|
|
1123
|
-
```
|
|
1124
|
-
|
|
1125
|
-
### Data-Driven Design with ScriptableObjects
|
|
1126
|
-
|
|
1127
|
-
**Define Data Containers:**
|
|
1128
|
-
```csharp
|
|
1129
|
-
// EnemyData.cs - A ScriptableObject to hold data for an enemy type.
|
|
1130
|
-
using UnityEngine;
|
|
1131
|
-
|
|
1132
|
-
[CreateAssetMenu(fileName = "NewEnemyData", menuName = "Game/Enemy Data")]
|
|
1133
|
-
public class EnemyData : ScriptableObject
|
|
1134
|
-
{
|
|
1135
|
-
public string enemyName;
|
|
1136
|
-
public int maxHealth;
|
|
1137
|
-
public float moveSpeed;
|
|
1138
|
-
public int damage;
|
|
1139
|
-
public Sprite sprite;
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
// Enemy.cs - A MonoBehaviour that uses the EnemyData.
|
|
1143
|
-
public class Enemy : MonoBehaviour
|
|
1144
|
-
{
|
|
1145
|
-
[SerializeField] private EnemyData _enemyData;
|
|
1146
|
-
private int _currentHealth;
|
|
1147
|
-
|
|
1148
|
-
private void Start()
|
|
1149
|
-
{
|
|
1150
|
-
_currentHealth = _enemyData.maxHealth;
|
|
1151
|
-
GetComponent<SpriteRenderer>().sprite = _enemyData.sprite;
|
|
1152
|
-
}
|
|
1153
|
-
|
|
1154
|
-
// ... other enemy logic
|
|
1155
|
-
}
|
|
1156
|
-
```
|
|
332
|
+
==================== START: .bmad-2d-unity-game-dev/checklists/game-story-dod-checklist.md ====================
|
|
333
|
+
# Game Development Story Definition of Done (DoD) Checklist
|
|
1157
334
|
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
**Singleton Managers:**
|
|
1161
|
-
```csharp
|
|
1162
|
-
// GameManager.cs - A singleton to manage the overall game state.
|
|
1163
|
-
using UnityEngine;
|
|
1164
|
-
|
|
1165
|
-
public class GameManager : MonoBehaviour
|
|
1166
|
-
{
|
|
1167
|
-
public static GameManager Instance { get; private set; }
|
|
1168
|
-
|
|
1169
|
-
public int Score { get; private set; }
|
|
1170
|
-
|
|
1171
|
-
private void Awake()
|
|
1172
|
-
{
|
|
1173
|
-
if (Instance != null && Instance != this)
|
|
1174
|
-
{
|
|
1175
|
-
Destroy(gameObject);
|
|
1176
|
-
return;
|
|
1177
|
-
}
|
|
1178
|
-
Instance = this;
|
|
1179
|
-
DontDestroyOnLoad(gameObject); // Persist across scenes
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
public void AddScore(int amount)
|
|
1183
|
-
{
|
|
1184
|
-
Score += amount;
|
|
1185
|
-
}
|
|
1186
|
-
}
|
|
1187
|
-
```
|
|
335
|
+
## Instructions for Developer Agent
|
|
1188
336
|
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
### Object Pooling
|
|
1192
|
-
|
|
1193
|
-
**Required for High-Frequency Objects (e.g., bullets, effects):**
|
|
1194
|
-
```csharp
|
|
1195
|
-
// ObjectPool.cs - A generic object pooling system.
|
|
1196
|
-
using UnityEngine;
|
|
1197
|
-
using System.Collections.Generic;
|
|
1198
|
-
|
|
1199
|
-
public class ObjectPool : MonoBehaviour
|
|
1200
|
-
{
|
|
1201
|
-
[SerializeField] private GameObject _prefabToPool;
|
|
1202
|
-
[SerializeField] private int _initialPoolSize = 20;
|
|
1203
|
-
|
|
1204
|
-
private Queue<GameObject> _pool = new Queue<GameObject>();
|
|
1205
|
-
|
|
1206
|
-
private void Start()
|
|
1207
|
-
{
|
|
1208
|
-
for (int i = 0; i < _initialPoolSize; i++)
|
|
1209
|
-
{
|
|
1210
|
-
GameObject obj = Instantiate(_prefabToPool);
|
|
1211
|
-
obj.SetActive(false);
|
|
1212
|
-
_pool.Enqueue(obj);
|
|
1213
|
-
}
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
public GameObject GetObjectFromPool()
|
|
1217
|
-
{
|
|
1218
|
-
if (_pool.Count > 0)
|
|
1219
|
-
{
|
|
1220
|
-
GameObject obj = _pool.Dequeue();
|
|
1221
|
-
obj.SetActive(true);
|
|
1222
|
-
return obj;
|
|
1223
|
-
}
|
|
1224
|
-
// Optionally, expand the pool if it's empty.
|
|
1225
|
-
return Instantiate(_prefabToPool);
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
public void ReturnObjectToPool(GameObject obj)
|
|
1229
|
-
{
|
|
1230
|
-
obj.SetActive(false);
|
|
1231
|
-
_pool.Enqueue(obj);
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
|
-
```
|
|
337
|
+
Before marking a story as 'Review', please go through each item in this checklist. Report the status of each item (e.g., [x] Done, [ ] Not Done, [N/A] Not Applicable) and provide brief comments if necessary.
|
|
1235
338
|
|
|
1236
|
-
|
|
339
|
+
[[LLM: INITIALIZATION INSTRUCTIONS - GAME STORY DOD VALIDATION
|
|
1237
340
|
|
|
1238
|
-
|
|
1239
|
-
- Avoid expensive calls like `GetComponent`, `FindObjectOfType`, or `Instantiate` inside `Update()` or `FixedUpdate()`. Cache references in `Awake()` or `Start()`.
|
|
1240
|
-
- Use Coroutines or simple timers for logic that doesn't need to run every single frame.
|
|
341
|
+
This checklist is for GAME DEVELOPER AGENTS to self-validate their work before marking a story complete.
|
|
1241
342
|
|
|
1242
|
-
|
|
1243
|
-
- Adjust the "Physics 2D Settings" in Project Settings, especially the "Layer Collision Matrix", to prevent unnecessary collision checks.
|
|
1244
|
-
- Use `Rigidbody2D.Sleep()` for objects that are not moving to save CPU cycles.
|
|
343
|
+
IMPORTANT: This is a self-assessment. Be honest about what's actually done vs what should be done. It's better to identify issues now than have them found in review.
|
|
1245
344
|
|
|
1246
|
-
|
|
345
|
+
EXECUTION APPROACH:
|
|
1247
346
|
|
|
1248
|
-
|
|
347
|
+
1. Go through each section systematically
|
|
348
|
+
2. Mark items as [x] Done, [ ] Not Done, or [N/A] Not Applicable
|
|
349
|
+
3. Add brief comments explaining any [ ] or [N/A] items
|
|
350
|
+
4. Be specific about what was actually implemented
|
|
351
|
+
5. Flag any concerns or technical debt created
|
|
1249
352
|
|
|
1250
|
-
|
|
353
|
+
The goal is quality delivery, not just checking boxes.]]
|
|
1251
354
|
|
|
1252
|
-
|
|
1253
|
-
- Add the `PlayerInput` component to the player GameObject.
|
|
1254
|
-
- Set its "Actions" to the created Input Action Asset.
|
|
1255
|
-
- Set "Behavior" to "Invoke Unity Events" to easily hook up methods in the Inspector, or "Send Messages" to use methods like `OnMove`, `OnFire`.
|
|
355
|
+
## Checklist Items
|
|
1256
356
|
|
|
1257
|
-
|
|
1258
|
-
// PlayerInputHandler.cs - Example of handling input via messages.
|
|
1259
|
-
using UnityEngine;
|
|
1260
|
-
using UnityEngine.InputSystem;
|
|
357
|
+
1. **Requirements Met:**
|
|
1261
358
|
|
|
1262
|
-
|
|
1263
|
-
{
|
|
1264
|
-
private Vector2 _moveInput;
|
|
359
|
+
[[LLM: Be specific - list each requirement and whether it's complete. Include game-specific requirements from GDD]]
|
|
1265
360
|
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
_moveInput = value.Get<Vector2>();
|
|
1271
|
-
}
|
|
361
|
+
- [ ] All functional requirements specified in the story are implemented.
|
|
362
|
+
- [ ] All acceptance criteria defined in the story are met.
|
|
363
|
+
- [ ] Game Design Document (GDD) requirements referenced in the story are implemented.
|
|
364
|
+
- [ ] Player experience goals specified in the story are achieved.
|
|
1272
365
|
|
|
1273
|
-
|
|
1274
|
-
{
|
|
1275
|
-
// Use _moveInput to control the player
|
|
1276
|
-
transform.Translate(new Vector3(_moveInput.x, _moveInput.y, 0) * Time.deltaTime * 5f);
|
|
1277
|
-
}
|
|
1278
|
-
}
|
|
1279
|
-
```
|
|
366
|
+
2. **Coding Standards & Project Structure:**
|
|
1280
367
|
|
|
1281
|
-
|
|
368
|
+
[[LLM: Code quality matters for maintainability. Check Unity-specific patterns and C# standards]]
|
|
1282
369
|
|
|
1283
|
-
|
|
370
|
+
- [ ] All new/modified code strictly adheres to `Operational Guidelines`.
|
|
371
|
+
- [ ] All new/modified code aligns with `Project Structure` (Scripts/, Prefabs/, Scenes/, etc.).
|
|
372
|
+
- [ ] Adherence to `Tech Stack` for Unity version and packages used.
|
|
373
|
+
- [ ] Adherence to `Api Reference` and `Data Models` (if story involves API or data model changes).
|
|
374
|
+
- [ ] Unity best practices followed (prefab usage, component design, event handling).
|
|
375
|
+
- [ ] C# coding standards followed (naming conventions, error handling, memory management).
|
|
376
|
+
- [ ] Basic security best practices applied for new/modified code.
|
|
377
|
+
- [ ] No new linter errors or warnings introduced.
|
|
378
|
+
- [ ] Code is well-commented where necessary (clarifying complex logic, not obvious statements).
|
|
1284
379
|
|
|
1285
|
-
**
|
|
1286
|
-
- When using Addressables or `Resources.Load`, always check if the loaded asset is null before using it.
|
|
1287
|
-
```csharp
|
|
1288
|
-
// Load a sprite and use a fallback if it fails
|
|
1289
|
-
Sprite playerSprite = Resources.Load<Sprite>("Sprites/Player");
|
|
1290
|
-
if (playerSprite == null)
|
|
1291
|
-
{
|
|
1292
|
-
Debug.LogError("Player sprite not found! Using default.");
|
|
1293
|
-
playerSprite = Resources.Load<Sprite>("Sprites/Default");
|
|
1294
|
-
}
|
|
1295
|
-
```
|
|
380
|
+
3. **Testing:**
|
|
1296
381
|
|
|
1297
|
-
|
|
382
|
+
[[LLM: Testing proves your code works. Include Unity-specific testing with NUnit and manual testing]]
|
|
1298
383
|
|
|
1299
|
-
|
|
1300
|
-
-
|
|
1301
|
-
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
384
|
+
- [ ] All required unit tests (NUnit) as per the story and testing strategy are implemented.
|
|
385
|
+
- [ ] All required integration tests (if applicable) are implemented.
|
|
386
|
+
- [ ] Manual testing performed in Unity Editor for all game functionality.
|
|
387
|
+
- [ ] All tests (unit, integration, manual) pass successfully.
|
|
388
|
+
- [ ] Test coverage meets project standards (if defined).
|
|
389
|
+
- [ ] Performance tests conducted (frame rate, memory usage).
|
|
390
|
+
- [ ] Edge cases and error conditions tested.
|
|
1305
391
|
|
|
1306
|
-
|
|
1307
|
-
{
|
|
1308
|
-
_rb = GetComponent<Rigidbody2D>();
|
|
1309
|
-
Debug.Assert(_rb != null, "Rigidbody2D component not found on player!");
|
|
1310
|
-
}
|
|
1311
|
-
```
|
|
392
|
+
4. **Functionality & Verification:**
|
|
1312
393
|
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
### Unit Testing (Edit Mode)
|
|
1316
|
-
|
|
1317
|
-
**Game Logic Testing:**
|
|
1318
|
-
```csharp
|
|
1319
|
-
// HealthSystemTests.cs - Example test for a simple health system.
|
|
1320
|
-
using NUnit.Framework;
|
|
1321
|
-
using UnityEngine;
|
|
1322
|
-
|
|
1323
|
-
public class HealthSystemTests
|
|
1324
|
-
{
|
|
1325
|
-
[Test]
|
|
1326
|
-
public void TakeDamage_ReducesHealth()
|
|
1327
|
-
{
|
|
1328
|
-
// Arrange
|
|
1329
|
-
var gameObject = new GameObject();
|
|
1330
|
-
var healthSystem = gameObject.AddComponent<PlayerHealth>();
|
|
1331
|
-
// Note: This is a simplified example. You might need to mock dependencies.
|
|
1332
|
-
|
|
1333
|
-
// Act
|
|
1334
|
-
healthSystem.TakeDamage(20);
|
|
1335
|
-
|
|
1336
|
-
// Assert
|
|
1337
|
-
// This requires making health accessible for testing, e.g., via a public property or method.
|
|
1338
|
-
// Assert.AreEqual(80, healthSystem.CurrentHealth);
|
|
1339
|
-
}
|
|
1340
|
-
}
|
|
1341
|
-
```
|
|
394
|
+
[[LLM: Did you actually run and test your code in Unity? Be specific about game mechanics tested]]
|
|
1342
395
|
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
-
|
|
1347
|
-
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
using NUnit.Framework;
|
|
1352
|
-
using UnityEngine;
|
|
1353
|
-
using UnityEngine.TestTools;
|
|
1354
|
-
|
|
1355
|
-
public class PlayerJumpTest
|
|
1356
|
-
{
|
|
1357
|
-
[UnityTest]
|
|
1358
|
-
public IEnumerator PlayerJumps_WhenSpaceIsPressed()
|
|
1359
|
-
{
|
|
1360
|
-
// Arrange
|
|
1361
|
-
var player = new GameObject().AddComponent<PlayerController>();
|
|
1362
|
-
var initialY = player.transform.position.y;
|
|
1363
|
-
|
|
1364
|
-
// Act
|
|
1365
|
-
// Simulate pressing the jump button (requires setting up the input system for tests)
|
|
1366
|
-
// For simplicity, we'll call a public method here.
|
|
1367
|
-
// player.Jump();
|
|
1368
|
-
|
|
1369
|
-
// Wait for a few physics frames
|
|
1370
|
-
yield return new WaitForSeconds(0.5f);
|
|
1371
|
-
|
|
1372
|
-
// Assert
|
|
1373
|
-
Assert.Greater(player.transform.position.y, initialY);
|
|
1374
|
-
}
|
|
1375
|
-
}
|
|
1376
|
-
```
|
|
396
|
+
- [ ] Functionality has been manually verified in Unity Editor and play mode.
|
|
397
|
+
- [ ] Game mechanics work as specified in the GDD.
|
|
398
|
+
- [ ] Player controls and input handling work correctly.
|
|
399
|
+
- [ ] UI elements function properly (if applicable).
|
|
400
|
+
- [ ] Audio integration works correctly (if applicable).
|
|
401
|
+
- [ ] Visual feedback and animations work as intended.
|
|
402
|
+
- [ ] Edge cases and potential error conditions handled gracefully.
|
|
403
|
+
- [ ] Cross-platform functionality verified (desktop/mobile as applicable).
|
|
1377
404
|
|
|
1378
|
-
|
|
405
|
+
5. **Story Administration:**
|
|
1379
406
|
|
|
1380
|
-
|
|
407
|
+
[[LLM: Documentation helps the next developer. Include Unity-specific implementation notes]]
|
|
1381
408
|
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
├── Scripts/
|
|
1388
|
-
│ ├── Core/
|
|
1389
|
-
│ │ ├── GameManager.cs
|
|
1390
|
-
│ │ └── AudioManager.cs
|
|
1391
|
-
│ ├── Player/
|
|
1392
|
-
│ │ ├── PlayerController.cs
|
|
1393
|
-
│ │ └── PlayerHealth.cs
|
|
1394
|
-
│ ├── Editor/
|
|
1395
|
-
│ │ └── CustomInspectors.cs
|
|
1396
|
-
│ └── Data/
|
|
1397
|
-
│ └── EnemyData.cs
|
|
1398
|
-
├── Prefabs/
|
|
1399
|
-
│ ├── Player.prefab
|
|
1400
|
-
│ └── Enemies/
|
|
1401
|
-
│ └── Slime.prefab
|
|
1402
|
-
├── Art/
|
|
1403
|
-
│ ├── Sprites/
|
|
1404
|
-
│ └── Animations/
|
|
1405
|
-
├── Audio/
|
|
1406
|
-
│ ├── Music/
|
|
1407
|
-
│ └── SFX/
|
|
1408
|
-
├── Data/
|
|
1409
|
-
│ └── ScriptableObjects/
|
|
1410
|
-
│ └── EnemyData/
|
|
1411
|
-
└── Tests/
|
|
1412
|
-
├── EditMode/
|
|
1413
|
-
│ └── HealthSystemTests.cs
|
|
1414
|
-
└── PlayMode/
|
|
1415
|
-
└── PlayerJumpTest.cs
|
|
1416
|
-
```
|
|
1417
|
-
|
|
1418
|
-
## Development Workflow
|
|
1419
|
-
|
|
1420
|
-
### Story Implementation Process
|
|
1421
|
-
|
|
1422
|
-
1. **Read Story Requirements:**
|
|
409
|
+
- [ ] All tasks within the story file are marked as complete.
|
|
410
|
+
- [ ] Any clarifications or decisions made during development are documented.
|
|
411
|
+
- [ ] Unity-specific implementation details documented (scene changes, prefab modifications).
|
|
412
|
+
- [ ] The story wrap up section has been completed with notes of changes.
|
|
413
|
+
- [ ] Changelog properly updated with Unity version and package changes.
|
|
1423
414
|
|
|
1424
|
-
|
|
1425
|
-
- Identify technical requirements
|
|
1426
|
-
- Review performance constraints
|
|
415
|
+
6. **Dependencies, Build & Configuration:**
|
|
1427
416
|
|
|
1428
|
-
|
|
417
|
+
[[LLM: Build issues block everyone. Ensure Unity project builds for all target platforms]]
|
|
1429
418
|
|
|
1430
|
-
-
|
|
1431
|
-
-
|
|
1432
|
-
-
|
|
419
|
+
- [ ] Unity project builds successfully without errors.
|
|
420
|
+
- [ ] Project builds for all target platforms (desktop/mobile as specified).
|
|
421
|
+
- [ ] Any new Unity packages or Asset Store items were pre-approved OR approved by user.
|
|
422
|
+
- [ ] If new dependencies were added, they are recorded with justification.
|
|
423
|
+
- [ ] No known security vulnerabilities in newly added dependencies.
|
|
424
|
+
- [ ] Project settings and configurations properly updated.
|
|
425
|
+
- [ ] Asset import settings optimized for target platforms.
|
|
1433
426
|
|
|
1434
|
-
|
|
427
|
+
7. **Game-Specific Quality:**
|
|
1435
428
|
|
|
1436
|
-
|
|
1437
|
-
- Use established patterns
|
|
1438
|
-
- Maintain stable FPS performance
|
|
429
|
+
[[LLM: Game quality matters. Check performance, game feel, and player experience]]
|
|
1439
430
|
|
|
1440
|
-
|
|
431
|
+
- [ ] Frame rate meets target (30/60 FPS) on all platforms.
|
|
432
|
+
- [ ] Memory usage within acceptable limits.
|
|
433
|
+
- [ ] Game feel and responsiveness meet design requirements.
|
|
434
|
+
- [ ] Balance parameters from GDD correctly implemented.
|
|
435
|
+
- [ ] State management and persistence work correctly.
|
|
436
|
+
- [ ] Loading times and scene transitions acceptable.
|
|
437
|
+
- [ ] Mobile-specific requirements met (touch controls, aspect ratios).
|
|
1441
438
|
|
|
1442
|
-
|
|
1443
|
-
- Write play mode tests for integration testing
|
|
1444
|
-
- Test cross-platform functionality
|
|
1445
|
-
- Validate performance targets
|
|
439
|
+
8. **Documentation (If Applicable):**
|
|
1446
440
|
|
|
1447
|
-
|
|
1448
|
-
- Mark story checkboxes complete
|
|
1449
|
-
- Document any deviations
|
|
1450
|
-
- Update architecture if needed
|
|
441
|
+
[[LLM: Good documentation prevents future confusion. Include Unity-specific docs]]
|
|
1451
442
|
|
|
1452
|
-
|
|
443
|
+
- [ ] Code documentation (XML comments) for public APIs complete.
|
|
444
|
+
- [ ] Unity component documentation in Inspector updated.
|
|
445
|
+
- [ ] User-facing documentation updated, if changes impact players.
|
|
446
|
+
- [ ] Technical documentation (architecture, system diagrams) updated.
|
|
447
|
+
- [ ] Asset documentation (prefab usage, scene setup) complete.
|
|
1453
448
|
|
|
1454
|
-
|
|
1455
|
-
- [ ] All automated tests pass.
|
|
1456
|
-
- [ ] Code follows naming conventions and architectural patterns.
|
|
1457
|
-
- [ ] No expensive operations in `Update()` loops.
|
|
1458
|
-
- [ ] Public fields/methods are documented with comments.
|
|
1459
|
-
- [ ] New assets are organized into the correct folders.
|
|
449
|
+
## Final Confirmation
|
|
1460
450
|
|
|
1461
|
-
|
|
451
|
+
[[LLM: FINAL GAME DOD SUMMARY
|
|
1462
452
|
|
|
1463
|
-
|
|
453
|
+
After completing the checklist:
|
|
1464
454
|
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
455
|
+
1. Summarize what game features/mechanics were implemented
|
|
456
|
+
2. List any items marked as [ ] Not Done with explanations
|
|
457
|
+
3. Identify any technical debt or performance concerns
|
|
458
|
+
4. Note any challenges with Unity implementation or game design
|
|
459
|
+
5. Confirm whether the story is truly ready for review
|
|
460
|
+
6. Report final performance metrics (FPS, memory usage)
|
|
1468
461
|
|
|
1469
|
-
|
|
462
|
+
Be honest - it's better to flag issues now than have them discovered during playtesting.]]
|
|
1470
463
|
|
|
1471
|
-
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
### Loading Performance
|
|
1475
|
-
|
|
1476
|
-
- **Initial Load**: Under 5 seconds for game start.
|
|
1477
|
-
- **Scene Transitions**: Under 2 seconds between scenes. Use asynchronous scene loading.
|
|
1478
|
-
|
|
1479
|
-
These guidelines ensure consistent, high-quality game development that meets performance targets and maintains code quality across all implementation stories.
|
|
1480
|
-
==================== END: .bmad-2d-unity-game-dev/data/development-guidelines.md ====================
|
|
464
|
+
- [ ] I, the Game Developer Agent, confirm that all applicable items above have been addressed.
|
|
465
|
+
==================== END: .bmad-2d-unity-game-dev/checklists/game-story-dod-checklist.md ====================
|