@codemcp/workflows-core 4.1.3 → 4.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemcp/workflows-core",
3
- "version": "4.1.3",
3
+ "version": "4.2.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -0,0 +1,250 @@
1
+ # Game Architecture 🏗️
2
+
3
+ **Game**: [GAME_NAME]
4
+ **Platform**: [PLATFORM_CHOICE]
5
+ **Created**: [DATE]
6
+
7
+ ---
8
+
9
+ ## What This Document Is For
10
+
11
+ This document explains the **BIG PICTURE** of your game:
12
+
13
+ - What platform we're building on (Scratch? Browser? Python?)
14
+ - What the main building blocks are
15
+ - What each building block is responsible for
16
+ - How they work together
17
+
18
+ Think of it like planning with LEGO:
19
+
20
+ - **Platform** = What type of LEGO we're using
21
+ - **Building Blocks** = The main pieces we need
22
+ - **Responsibilities** = What each piece does
23
+
24
+ **No code, no files - just the big ideas!**
25
+
26
+ ---
27
+
28
+ ## Platform Decision
29
+
30
+ <!-- LLM: Document the platform choice based on conversation with child -->
31
+
32
+ **We chose [PLATFORM] because:**
33
+
34
+ - [REASON_1]
35
+ - [REASON_2]
36
+ - [REASON_3]
37
+
38
+ **Platform Options We Considered:**
39
+
40
+ | Platform | Best For | Pros | Cons |
41
+ | ------------------------------ | -------------------------- | ----------------------------------------------------- | -------------------------- |
42
+ | **Scratch** | Total beginners, ages 8-10 | Visual blocks, can't make syntax errors, easy sharing | Less control over graphics |
43
+ | **Browser (HTML5/JavaScript)** | Kids ready for "real" code | Works anywhere, full control, easy to share links | Need to type carefully |
44
+ | **Python + Pygame** | Kids who know Python | Desktop games, powerful | Need to install Python |
45
+
46
+ ---
47
+
48
+ ## The Big Picture
49
+
50
+ <!-- LLM: Create a simple ASCII diagram showing main components and their relationships -->
51
+
52
+ ```
53
+ ┌─────────────────────────────────┐
54
+ │ GAME MANAGER 🎮 │
55
+ │ (The Boss - Runs Everything) │
56
+ └─────────────────────────────────┘
57
+ |
58
+ |
59
+ ┌─────────┴─────────┐
60
+ | |
61
+ v v
62
+ ┌─────────┐ ┌─────────┐
63
+ │ PLAYER │ │ ENEMIES │
64
+ │ 🧍 │ │ 👾 │
65
+ └─────────┘ └─────────┘
66
+ | |
67
+ └─────────┬─────────┘
68
+ v
69
+ ┌──────────────┐
70
+ │ DISPLAY │
71
+ │ (Screen) │
72
+ └──────────────┘
73
+ ```
74
+
75
+ **How it works:**
76
+
77
+ 1. **Game Manager** is the boss - it controls everything
78
+ 2. **Player** and **Enemies** do their own things
79
+ 3. **Display** shows what's happening on screen
80
+ 4. Game Manager makes sure they all work together!
81
+
82
+ ---
83
+
84
+ ## Building Blocks
85
+
86
+ <!-- LLM: For each building block, explain WHAT it does and its responsibilities.
87
+ Keep it conceptual - no code examples, no specific implementation details.
88
+ Focus on helping child understand the PURPOSE and ROLE of each block.
89
+ Use simple analogies they can relate to. -->
90
+
91
+ ### 🎮 Game Manager
92
+
93
+ The main controller that runs the whole game.
94
+
95
+ **Responsibilities:**
96
+
97
+ - Keeps the game running
98
+ - Tells all the other parts when to do their jobs
99
+ - Checks if the player won or lost
100
+ - Keeps track of the score
101
+
102
+ **Why we need it:**
103
+ Every game needs someone in charge, like a referee in sports or a conductor in an orchestra.
104
+
105
+ ---
106
+
107
+ ### 🧍 Player
108
+
109
+ The character the player controls in the game.
110
+
111
+ **Responsibilities:**
112
+
113
+ - Knows where it is in the game world
114
+ - Remembers its health and score
115
+ - Moves when the player presses keys
116
+ - Checks if it touched something important
117
+
118
+ **Why we need it:**
119
+ This is YOU in the game! Without it, there's no way to play.
120
+
121
+ ---
122
+
123
+ ### 👾 Enemies
124
+
125
+ The obstacles or challenges in the game.
126
+
127
+ **Responsibilities:**
128
+
129
+ - Knows where they are
130
+ - Moves around in the game world
131
+ - Checks if they touched the player
132
+ - Makes the game challenging
133
+
134
+ **Why we need it:**
135
+ Games need challenges! Without enemies or obstacles, there's nothing to overcome.
136
+
137
+ ---
138
+
139
+ ### 🎯 [Additional Building Block]
140
+
141
+ <!-- LLM: Add other building blocks based on the specific game type.
142
+ Common examples:
143
+ - Collectibles (coins, power-ups, items)
144
+ - Projectiles (bullets, arrows, fireballs)
145
+ - Obstacles (walls, platforms, hazards)
146
+ - Level Manager (handles switching between levels)
147
+ - Sound Manager (plays music and sound effects)
148
+ - UI Manager (shows menus, buttons, messages)
149
+
150
+ Keep each description simple and focused on responsibilities. -->
151
+
152
+ [Describe building blocks specific to this game]
153
+
154
+ ---
155
+
156
+ ### 🖥️ Display
157
+
158
+ Shows everything on the screen.
159
+
160
+ **Responsibilities:**
161
+
162
+ - Draws the player
163
+ - Draws enemies and other game objects
164
+ - Shows the score and health
165
+ - Displays messages like "Game Over"
166
+
167
+ **Why we need it:**
168
+ We need to SEE what's happening! The display makes the invisible game visible.
169
+
170
+ ---
171
+
172
+ ## How They Work Together
173
+
174
+ <!-- LLM: Explain the overall flow in simple terms. Focus on relationships, not implementation. -->
175
+
176
+ Think of it like a team working together:
177
+
178
+ **The Game Loop** (what happens over and over, very fast):
179
+
180
+ 1. **Game Manager** wakes everyone up: "Time to do your jobs!"
181
+ 2. **Player** checks if keys were pressed and moves
182
+ 3. **Enemies** move according to their patterns
183
+ 4. **Game Manager** asks: "Did anything touch anything?"
184
+ - Player hit enemy? → Player takes damage
185
+ - Player got coin? → Score goes up
186
+ 5. **Game Manager** asks **Display**: "Show what changed!"
187
+ 6. **Display** redraws everything on screen
188
+ 7. **Repeat!** This happens 60 times per second!
189
+
190
+ **This is like a movie** - it happens so fast your eyes see smooth movement!
191
+
192
+ ---
193
+
194
+ ## Why Separate Into Building Blocks?
195
+
196
+ Imagine your room:
197
+
198
+ - **Messy**: Everything in one big pile - hard to find anything
199
+ - **Organized**: Toys in toy box, books on shelf, clothes in closet - easy to find!
200
+
201
+ **Same with games!**
202
+
203
+ **All in one piece (BAD):**
204
+
205
+ - Hard to understand
206
+ - Hard to fix bugs
207
+ - Hard to add new features
208
+ - Confusing for everyone
209
+
210
+ **Separated into building blocks (GOOD):**
211
+
212
+ - Each block has ONE clear job
213
+ - Easy to find where something happens
214
+ - Easy to fix: "Enemy not moving? Check the Enemy block!"
215
+ - Easy to add: "Want new enemy types? Make a new Enemy block!"
216
+
217
+ **Professional game developers ALWAYS organize their games this way!**
218
+
219
+ ---
220
+
221
+ ## Key Decisions
222
+
223
+ <!-- LLM: Document important architectural decisions in simple terms -->
224
+
225
+ **Decision 1: [DECISION_TITLE]**
226
+
227
+ - **What we decided**: [Simple explanation]
228
+ - **Why**: [Reason in terms child understands]
229
+ - **Impact**: [How this helps the game]
230
+
231
+ **Decision 2: [DECISION_TITLE]**
232
+
233
+ - **What we decided**: [Simple explanation]
234
+ - **Why**: [Reason in terms child understands]
235
+ - **Impact**: [How this helps the game]
236
+
237
+ ---
238
+
239
+ ## Remember
240
+
241
+ **This is your game's blueprint!**
242
+
243
+ - It shows WHO does WHAT
244
+ - Each building block has its own job
245
+ - They work together like a team
246
+ - This is the BIG PICTURE - details come later!
247
+
248
+ **Next**: Look at the Design document to see HOW to build each block with actual code! 🛠️
249
+
250
+ Let's build something amazing! 🚀
@@ -0,0 +1,69 @@
1
+ # Game Design 🛠️
2
+
3
+ **My Game**: [GAME_NAME]
4
+ **Platform**: [PLATFORM - from architecture.md]
5
+ **Date**: [DATE]
6
+
7
+ ---
8
+
9
+ ## What This Document Is For
10
+
11
+ This document explains **HOW we organize and structure** the code for building the game.
12
+
13
+ Think of it like a construction plan:
14
+
15
+ - **Requirements** = What we're building
16
+ - **Architecture** = The main parts and their jobs
17
+ - **Design** (this doc) = How to organize the construction
18
+
19
+ **No code here - just the plan!** Actual code examples come during implementation.
20
+
21
+ ---
22
+
23
+ ## Core Concepts We'll Use
24
+
25
+ <!-- LLM INSTRUCTION:
26
+ Explain the 3-4 fundamental coding patterns the child will use repeatedly.
27
+ Keep explanations simple and concrete. Use analogies.
28
+ Platform-specific examples are good.
29
+
30
+ Typical patterns:
31
+
32
+ - State (Memory) 🧠
33
+ - Mechanics (Rules) 📏
34
+ - Presentation (Drawing) 🎨
35
+ - The Game Loop 🔄
36
+
37
+ -->
38
+
39
+ ## Usage of libraries
40
+
41
+ <!--
42
+ There are many libraries providing e. g. physics or other game specific features. Based on the requirements, pick proper libraries and explain to the child what they do.
43
+ -->
44
+
45
+ ## 🗺️ How Code Is Organized
46
+
47
+ <!-- LLM INSTRUCTION:
48
+ Show the actual file/sprite structure for this specific game.
49
+ Be concrete - list actual file names or sprite names.
50
+ Explain WHAT goes in each file and WHY.
51
+
52
+ IMPORTANT:
53
+ - Don't put everything in one file!
54
+ - Keep it object-oriented (one building block = one file)
55
+ - Match the building blocks from architecture.md
56
+ -->
57
+
58
+ ### File Structure for [PLATFORM]
59
+
60
+ ```
61
+ [ACTUAL_FILE_STRUCTURE]
62
+
63
+ Example for Browser/JavaScript:
64
+ game/
65
+ ├── game.js ← Game loop, manages everything
66
+ ├── player.js ← Player class (state, mechanics, drawing)
67
+ ├── enemy.js ← Enemy class
68
+ └── main.js ← Starts the game
69
+ ```
@@ -0,0 +1,162 @@
1
+ # My Game Plan 🎮
2
+
3
+ **My Name**: [YOUR_NAME]
4
+ **Today's Date**: [DATE]
5
+ **My Game**: [GAME_NAME]
6
+
7
+ ---
8
+
9
+ ## 🎯 Core Game Principle
10
+
11
+ <!-- LLM INSTRUCTION:
12
+ This section captures the ABSOLUTE MINIMUM game - the simplest possible version that's still fun.
13
+ Think: "What's the ONE thing that makes this game special?"
14
+ Example: For a space shooter: "Player shoots enemies that move toward them"
15
+ Example: For a platformer: "Player jumps over gaps to reach the end"
16
+ Keep it to ONE sentence that describes the core gameplay loop.
17
+ -->
18
+
19
+ **The Main Idea** (in one sentence):
20
+
21
+ [CORE_GAME_MECHANIC] - e.g., "A player dodges falling objects and collects coins"
22
+
23
+ **What Makes It Fun**:
24
+
25
+ [WHY_IS_THIS_FUN] - e.g., "It's exciting to see how long you can survive!"
26
+
27
+ **Game Type**: [e.g., Arcade, Platformer, Puzzle, Space Shooter]
28
+
29
+ ---
30
+
31
+ ## 🚀 Version 1: Let's Build This First!
32
+
33
+ <!-- LLM INSTRUCTION:
34
+ These are the MINIMUM features needed to make the core game principle playable.
35
+ Aim for 3-5 SIMPLE features. Child should be able to build this in 1-2 sessions.
36
+ Each feature should be testable and celebratable when complete.
37
+ Use simple, action-oriented language kids understand.
38
+ -->
39
+
40
+ **Goal**: Make a playable game with just the basics!
41
+
42
+ ### Must-Have Features:
43
+
44
+ **1. [FEATURE_1]** 🎮
45
+
46
+ - Example: "Player can move left and right"
47
+ - Why we need it: So you can control your character!
48
+
49
+ **2. [FEATURE_2]** 🎯
50
+
51
+ - Example: "Enemies appear at the top and move down"
52
+ - Why we need it: Something to dodge or shoot!
53
+
54
+ **3. [FEATURE_3]** ⭐
55
+
56
+ - Example: "Score goes up when you collect coins"
57
+ - Why we need it: To know how well you're doing!
58
+
59
+ **4. [FEATURE_4]** 💥
60
+
61
+ - Example: "Game over when player hits enemy"
62
+ - Why we need it: Games need a win/lose condition!
63
+
64
+ **5. [FEATURE_5]** 🔄
65
+
66
+ - Example: "Restart button to play again"
67
+ - Why we need it: So you can try to beat your score!
68
+
69
+ ### ✅ How We Know Version 1 is Done:
70
+
71
+ - [ ] I can start the game and see my character
72
+ - [ ] I can control my character with the keyboard
73
+ - [ ] [MAIN_THING] works (e.g., "Enemies appear and move")
74
+ - [ ] I can win OR lose the game
75
+ - [ ] I can play again after game over
76
+
77
+ **When Version 1 is done**: We have a REAL GAME! 🎉
78
+
79
+ **New features can be added incrementally – just start a new conversation and explain them**
80
+
81
+ ---
82
+
83
+ ## 🚧 Not Building This now (And That's OK!)
84
+
85
+ <!-- LLM INSTRUCTION:
86
+ Be explicit about what's out of scope to manage expectations.
87
+ Help child understand why some things are too complex for now.
88
+ Always end on a positive note about what they ARE building.
89
+ -->
90
+
91
+ **Things We're NOT Building** (maybe later!):
92
+
93
+ - ❌ [OUT_OF_SCOPE_1] - e.g., "Multiplayer" → Too complex! Let's master single-player first
94
+ - ❌ [OUT_OF_SCOPE_2] - e.g., "3D graphics" → 2D is perfect for learning!
95
+ - ❌ [OUT_OF_SCOPE_3] - e.g., "Mobile app" → Browser version is easier to share!
96
+
97
+ **Why not?** These would take a LONG time and lots of advanced skills. What we're building is already AWESOME! 🌟
98
+
99
+ ---
100
+
101
+ ## 📋 Our Build Order
102
+
103
+ **Phase 1**: Core Game Principle → Version 1
104
+ _"Get something playable!"_
105
+
106
+ **Phase 2**: Add Level 2 Polish
107
+ _"Make it feel great!"_
108
+
109
+ **Phase 3**: Add Level 3 Features
110
+ _"Add variety and depth!"_
111
+
112
+ ---
113
+
114
+ ## 💭 Notes & Ideas
115
+
116
+ <!-- LLM INSTRUCTION:
117
+ Use this space to capture the child's random ideas, inspirations, or decisions made during development.
118
+ Keep their creativity documented even if ideas don't fit current version.
119
+ -->
120
+
121
+ **Cool Ideas We Thought Of**:
122
+
123
+ - [IDEA_1]
124
+ - [IDEA_2]
125
+ - [IDEA_3]
126
+
127
+ **Games That Inspired Us**:
128
+
129
+ - [INSPIRATION_1]
130
+ - [INSPIRATION_2]
131
+
132
+ **Things We Learned**:
133
+
134
+ - [LEARNING_1]
135
+ - [LEARNING_2]
136
+
137
+ ---
138
+
139
+ ## 🎊 Celebration Log
140
+
141
+ <!-- LLM INSTRUCTION:
142
+ Document milestones and achievements. This builds confidence and tracks progress.
143
+ Update this as features are completed.
144
+ -->
145
+
146
+ **What We've Built So Far**:
147
+
148
+ - [ ] Version 1 Complete! (Date: **\_**) 🎉
149
+ - [ ] Level 2 Complete! (Date: **\_**) 🌟
150
+ - [ ] Level 3 Complete! (Date: **\_**) 🚀
151
+
152
+ **My Proudest Moments**:
153
+
154
+ 1. [ACHIEVEMENT_1]
155
+ 2. [ACHIEVEMENT_2]
156
+ 3. [ACHIEVEMENT_3]
157
+
158
+ ---
159
+
160
+ **Remember**: Every great game developer started exactly where you are now! 🌟
161
+
162
+ Let's build something awesome together! 🚀
@@ -0,0 +1,424 @@
1
+ # yaml-language-server: $schema=../../state-machine-schema.json
2
+ ---
3
+ name: 'game'
4
+ description: 'Educational game development workflow for children (ages 8-12): Learn to build games step-by-step with guidance, frequent reviews, explanations, and fun!'
5
+ initial_state: 'constitution'
6
+
7
+ # Enhanced metadata for better discoverability
8
+ metadata:
9
+ domain: 'children'
10
+ complexity: 'medium'
11
+ bestFor:
12
+ - 'Children learning game development'
13
+ - 'First-time game creators (ages 8-12)'
14
+ - 'Educational game projects'
15
+ - 'Learning programming through games'
16
+ useCases:
17
+ - 'Building your first video game'
18
+ - 'Learning game development concepts'
19
+ - 'Creating simple 2D games'
20
+ examples:
21
+ - 'Build a space shooter game'
22
+ - 'Create a platformer game'
23
+ - 'Make a simple puzzle game'
24
+ requiresDocumentation: true
25
+
26
+ # States with default instructions and transitions
27
+ states:
28
+ constitution:
29
+ description: 'Set up project documentation with game development principles'
30
+ default_instructions: |
31
+ You are helping a young game developer (ages 8-12) start their game development journey!
32
+
33
+ Explain that before we start, we need to set up some documents that help us to remain organized.
34
+
35
+ **Step 1: Set Up Project Documentation (REQUIRED)**
36
+
37
+ **YOU MUST call the `setup_project_docs()` tool with these parameters:**
38
+
39
+ ```
40
+ setup_project_docs({
41
+ requirements: "game-requirements",
42
+ architecture: "game-architecture",
43
+ design: "game-design"
44
+ })
45
+ ```
46
+
47
+ This creates three child-friendly documents in `.vibe/docs/`:
48
+ - `requirements.md` - Game development principles and what we're building
49
+ - `architecture.md` - Platform choice and code structure
50
+ - `design.md` - Features and how to implement them
51
+
52
+ **These documents are your long-term memory for this project!**
53
+
54
+ **Step 2: Explain to the Child**
55
+
56
+ After calling setup_project_docs(), explain what just happened:
57
+
58
+ "Hi! I'm so excited to help you build your first game! 🎮
59
+
60
+ I just created three special helper documents for us. Think of them like a smart notebook
61
+ that remembers everything we decide while building your game!
62
+
63
+ 1. **Game Development Principles** - Our rules for making awesome games! Like: Start small,
64
+ test often, and celebrate every win!
65
+
66
+ 2. **Game Architecture** - Where we'll write down HOW to build your game (what platform to
67
+ use, how to organize the code)
68
+
69
+ 3. **Game Design** - Our plan for WHAT features to create and in what order
70
+
71
+ These documents are like our game's memory! Every time we make an important decision,
72
+ we'll write it down so we never forget. 🧠
73
+
74
+ Ready to start dreaming up your game idea?"
75
+
76
+ **Step 3: Check Understanding**
77
+
78
+ Ask: "Do you understand what these helper documents are for? Any questions before we start?"
79
+
80
+ WAIT for the child's response. Answer any questions patiently. Only proceed when they're ready.
81
+
82
+ **Important Notes:**
83
+ - Keep your explanation simple and enthusiastic
84
+ - Use the analogy of a "smart notebook" or "game's memory"
85
+ - Don't go into technical details about templates or file structure
86
+ - Focus on WHY we have these documents (to remember decisions)
87
+
88
+ transitions:
89
+ - trigger: 'docs_ready'
90
+ to: 'imagine'
91
+ additional_instructions: |
92
+ Great! Your project is set up! 🎮
93
+ Now let's dream up an awesome game idea!
94
+ transition_reason: 'Project documentation initialized, ready to imagine the game'
95
+
96
+ imagine:
97
+ description: 'Dream phase - describe the game you want to create'
98
+ default_instructions: |
99
+ Welcome to game building! 🎮
100
+
101
+ **Let the child describe their game idea:**
102
+
103
+ Ask questions like:
104
+ - "What kind of game do you want to make?"
105
+ - "What does the player do in your game?"
106
+ - "What makes it fun?"
107
+ - "What games do you like that are similar?"
108
+
109
+ **Apply "Start Small, Dream Big" principle:**
110
+
111
+ If they describe something very complex (like "Minecraft" or "Fortnite"):
112
+ - "That's an AMAZING idea!"
113
+ - "Big games like that are built in small pieces. What's the ONE most fun thing in your game?"
114
+ - "Let's build that part first, then add more later!"
115
+
116
+ **Document their idea in $REQUIREMENTS_DOC:**
117
+
118
+ Update the "Game Requirements" section with:
119
+ - Game concept and type
120
+ - Main goal
121
+ - What makes it fun
122
+ - Version 1 features (3-5 simple features)
123
+ - Future ideas (complex features for later)
124
+
125
+ **Before transitioning:**
126
+
127
+ Summarize back to them:
128
+ "So you want to build a game where [summarize their idea]. That sounds AWESOME!
129
+ For Version 1, let's build: [list 3-5 simple features]."
130
+
131
+ Ask: "Did I understand your idea correctly? Is there anything else you want to tell me
132
+ about your game before we figure out HOW to build it?"
133
+
134
+ WAIT for confirmation. Adjust if needed. Only proceed when they're happy with the plan.
135
+
136
+ transitions:
137
+ - trigger: 'idea_captured'
138
+ to: 'architecture'
139
+ additional_instructions: |
140
+ Awesome game idea! 🌟
141
+ Now let's figure out WHERE and HOW we'll build it!
142
+ transition_reason: 'Game idea documented in requirements, ready for technical planning'
143
+
144
+ architecture:
145
+ description: 'Choose platform and design the technical structure'
146
+ default_instructions: |
147
+ Now we need to make technical decisions! Read $REQUIREMENTS_DOC to understand the game concept.
148
+
149
+ **Step 1: Platform Choice**
150
+
151
+ Ask the child: "Where do you want to play your game?"
152
+ - "In a web browser?" → HTML5/JavaScript
153
+ - "As a program on your computer?" → Python/Pygame
154
+
155
+ Explain each option simply:
156
+ - **Browser**: Type code, works anywhere, more control
157
+ - **Python**: Desktop game, need to know Python
158
+
159
+ **Step 2: Design Architecture**
160
+
161
+ Update $ARCHITECTURE_DOC with:
162
+ - Platform decision and why
163
+ - Main game components (Player, Enemy, Game Manager, etc.)
164
+ - Simple ASCII diagram showing how components connect
165
+ - OOP explained simply (classes as blueprints)
166
+ - File organization for chosen platform
167
+ - State/Mechanics/Presentation separation
168
+
169
+ **Step 3: Set Up Development Environment**
170
+
171
+ Based on platform choice, set up quality tools:
172
+
173
+ **For HTML5/JavaScript:**
174
+ - Install ESLint, Prettier, Husky
175
+ - Configure scripts in package.json
176
+
177
+ **For Python:**
178
+ - Create virtual environment
179
+ - Install Ruff
180
+
181
+ **Step 4: Explain to Child**
182
+
183
+ "I just figured out HOW we'll build your game!
184
+
185
+ We're using [PLATFORM] because [REASON].
186
+
187
+ Your game will have these main parts:
188
+ - [COMPONENT_1] - like [SIMPLE_ANALOGY]
189
+ - [COMPONENT_2] - like [SIMPLE_ANALOGY]
190
+ - [COMPONENT_3] - like [SIMPLE_ANALOGY]
191
+
192
+ I also set up helper tools that check your code automatically - like spell-check for code!"
193
+
194
+ Ask: "Does that make sense? Do you understand how these pieces will work together?
195
+ Any questions before we plan out WHAT features to build?"
196
+
197
+ WAIT for confirmation.
198
+
199
+ transitions:
200
+ - trigger: 'architecture_complete'
201
+ to: 'design'
202
+ additional_instructions: |
203
+ Great! We know HOW to build it! 🏗️
204
+ Now let's plan out WHAT features to build and in what order!
205
+ transition_reason: 'Technical architecture complete, ready for detailed design'
206
+
207
+ design:
208
+ description: 'Plan features and implementation strategy'
209
+ default_instructions: |
210
+ Now we create a detailed plan for building the game!
211
+
212
+ Read $REQUIREMENTS_DOC and $ARCHITECTURE_DOC to understand what we're building and how.
213
+
214
+ **Step 1: Pick Libraries**
215
+ E. g. physics, platformer engines, etc. based on requirements.
216
+ Document in $DESIGN_DOC what libraries we'll use and why.
217
+
218
+ **Step 2: Update $DESIGN_DOC with detailed Feature Designs** - For each major feature:
219
+ - What it does (player perspective)
220
+ - How it works (technical)
221
+ - State/Mechanics/Presentation breakdown
222
+ - Edge cases to handle
223
+
224
+ **IMPORTANT: Don't code in this phase! Just plan!**
225
+
226
+ **Explain to Child:**
227
+
228
+ "I made a plan for building your game!
229
+
230
+ We'll focus on the very basics first. We captured additional ideas, but for now,
231
+ we'll build a simple version that works well.
232
+ After each step, we'll test and play what you built!"
233
+
234
+ Ask: "Do you see how we're breaking this into small pieces? Each step is something we can
235
+ finish and test! Does this make sense? Ready to start coding?"
236
+
237
+ WAIT for confirmation.
238
+
239
+ transitions:
240
+ - trigger: 'design_complete'
241
+ to: 'code'
242
+ additional_instructions: |
243
+ Perfect! We have our plan! 🎯
244
+ We'll be doing this step by step: After each major part we built, we will review it together to make sure you understand everything!
245
+ transition_reason: 'Detailed design complete, ready to implement'
246
+
247
+ code:
248
+ description: 'Build the game incrementally with frequent reviews'
249
+ default_instructions: |
250
+ You are building the game! Follow $DESIGN_DOC for implementation order and $ARCHITECTURE_DOC for structure.
251
+
252
+ **IMPORTANT: Build incrementally. Proceed to the review phase after each checked task from the plan**
253
+
254
+ **Implementation Strategy:**
255
+
256
+ **Build one testable feature at a time**
257
+
258
+ **⚠️ CRITICAL: Transition to review phase (proceed_to_phase(review)) after each increment**
259
+ transitions:
260
+ - trigger: 'feature_complete'
261
+ to: 'review'
262
+ additional_instructions: |
263
+ Feature complete! Let's review what we just built! 🎉
264
+ transition_reason: 'Major feature completed, time for incremental review'
265
+
266
+ - trigger: 'game_complete'
267
+ to: 'celebrate'
268
+ additional_instructions: |
269
+ The entire game is done! Time to celebrate! 🎊
270
+ transition_reason: 'All features complete, game is finished'
271
+
272
+ review:
273
+ description: 'Review and understand what was just built'
274
+ default_instructions: |
275
+ Time to review the code you just wrote and make sure the child understands it!
276
+
277
+ **Step 1: Explain What Was Built**
278
+
279
+ Summarize the feature in one sentence:
280
+ - "We just added player movement!"
281
+ - "We just made enemies appear and move!"
282
+ - "We just added collision detection!"
283
+
284
+ **Step 2: Show Specific Code Changes**
285
+
286
+ Highlight 2-3 key parts of the code and explain each. Encourage the child to open their code editor and follow along.
287
+
288
+ Example:
289
+ "Let me show you the important parts of what we just built:
290
+
291
+ 1. **Keyboard Listener** - This is like a sensor that detects when you press arrow keys
292
+ [Show the code]
293
+
294
+ 2. **Movement Logic** - This changes the player's position when keys are pressed
295
+ [Show the code]
296
+
297
+ 3. **Boundary Check** - This keeps the player from going off the screen
298
+ [Show the code]"
299
+
300
+ Use simple analogies:
301
+ - Event listeners = sensors
302
+ - Variables = boxes that store information
303
+ - Functions = recipes that do specific jobs
304
+ - Classes = blueprints or instruction manuals
305
+
306
+ **Step 3: Demonstrate**
307
+
308
+ Run the game and show the new feature working:
309
+ "Let's test it! Try pressing the arrow keys..."
310
+
311
+ **Step 4: Celebrate**
312
+
313
+ "You just built [FEATURE]! That's a real game programming skill! 🌟"
314
+
315
+ **Step 5: Check Understanding**
316
+
317
+ Ask: "Do you understand how this works? Want me to explain any part again?"
318
+
319
+ WAIT for response. Answer questions.
320
+
321
+ **Step 6: Ask About Next Steps**
322
+
323
+ "Ready to build the next feature? Or do you need a break?"
324
+
325
+ If ready: Transition to 'code' with 'continue_coding' trigger
326
+ If done: Transition to 'celebrate' with 'game_complete' trigger
327
+
328
+ transitions:
329
+ - trigger: 'continue_coding'
330
+ to: 'code'
331
+ additional_instructions: |
332
+ Great! Let's build the next feature! 🚀
333
+ transition_reason: 'Child understands current feature, ready to continue'
334
+ review_perspectives:
335
+ - perspective: 'quiz-master'
336
+ prompt: |
337
+ You are a friendly quiz master helping a child explore and understand their code!
338
+
339
+ Ask 2-3 exploratory questions that make them FIND things in the code:
340
+
341
+ **Good Questions (make them explore):**
342
+ - "Can you find the line where we check if the spacebar was pressed? What does it say?"
343
+ - "Look for the variable that holds the player's score. What's it called?"
344
+ - "Find the Enemy class - what happens when an enemy reaches the bottom of the screen?"
345
+ - "Can you spot where we draw the player on the screen? Show me that function!"
346
+
347
+ **Bad Questions (too abstract):**
348
+ - ❌ "What is a variable?"
349
+ - ❌ "Explain object-oriented programming"
350
+ - ❌ "What does this function return?"
351
+
352
+ **Important:**
353
+ - Make it a treasure hunt, not a test!
354
+ - If they can't find it, give hints: "Look in the Player class..."
355
+ - Celebrate when they find it: "Yes! That's it! 🎉"
356
+ - The goal is active code exploration, not memorization
357
+ - Keep it fun and encouraging!
358
+
359
+ - trigger: 'game_complete'
360
+ to: 'celebrate'
361
+ additional_instructions: |
362
+ All features are done! Time for the final celebration! 🎊
363
+ transition_reason: 'All features complete and understood'
364
+
365
+ celebrate:
366
+ description: 'Celebrate the completed game and reflect on learning'
367
+ default_instructions: |
368
+ The game is COMPLETE! 🎉🎮🎊
369
+
370
+ **Step 1: Play the Complete Game**
371
+
372
+ "Let's play your finished game together! You built this!"
373
+
374
+ Let them play and enjoy it.
375
+
376
+ **Step 2: Celebrate the Achievement**
377
+
378
+ Be enthusiastic!
379
+
380
+ "You just built a REAL game! You're a game developer now! 🌟
381
+
382
+ Think about everything you learned:
383
+ - How to plan a game
384
+ - How to organize code (classes, state, mechanics, presentation)
385
+ - How to make things move on screen
386
+ - How to detect collisions
387
+ - How to add scoring and game rules
388
+
389
+ That's AMAZING! Many adults don't know how to do this!"
390
+
391
+ **Step 3: Reflect**
392
+
393
+ Ask:
394
+ - "What was the hardest part of building this game?"
395
+ - "What was the most fun part?"
396
+ - "What are you most proud of?"
397
+
398
+ **Step 4: Look Forward**
399
+
400
+ "Now that you've built Version 1, what would you want to add next?"
401
+
402
+ Review the "Future Ideas" list from $REQUIREMENTS_DOC.
403
+
404
+ **Step 5: Document the Achievement**
405
+
406
+ Update the plan file with:
407
+ - Game completion date
408
+ - What was learned
409
+ - What the child wants to build next
410
+ - Any notes for future sessions
411
+
412
+ **Step 6: Encourage Next Steps**
413
+
414
+ "You can keep building on this game, or start a new one!
415
+ You now have the skills to make ANY simple game you can imagine!"
416
+
417
+ **Congratulations, young game developer! 🚀**
418
+
419
+ transitions:
420
+ - trigger: 'enhance_game'
421
+ to: 'imagine'
422
+ additional_instructions: |
423
+ copy the development plan to a new file. Also move the existing conversation in .vibe to .vibe/archive
424
+ transition_reason: 'Adding features to existing game'