Skip to content

Commit 22577ff

Browse files
author
DavidQ
committed
BUILD_PR_GAMES_BREAKOUT_FULL_FOLDER_MIGRATION
Executed full Breakout folder migration using the validated template-based pipeline. - created Breakout_next from template - migrated gameplay into correct _next destinations - validated _next runtime - cleared canonical destination - copied _next back into canonical - validated canonical runtime - removed Breakout_next
1 parent d73406b commit 22577ff

23 files changed

Lines changed: 214 additions & 19 deletions

File tree

docs/dev/CODEX_COMMANDS.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,23 @@ MODEL: GPT-5.4
22
REASONING: high
33

44
COMMAND:
5-
Execute BUILD_PR_GAMES_TEMPLATE_CONTRACT_ENFORCEMENT
5+
Execute BUILD_PR_GAMES_BREAKOUT_FULL_FOLDER_MIGRATION exactly as written.
66

77
Rules:
8-
- Do NOT modify gameplay
9-
- Do NOT break existing games
10-
- Enforce structure and behavior only
11-
- Fail fast on ambiguity
8+
- Work only on the Breakout migration lane
9+
- Use `games/_template/**` as the template source
10+
- Read gameplay from `games/Breakout/**`
11+
- Stage into `games/Breakout_next/**`
12+
- Validate `_next`
13+
- Clear canonical `games/Breakout/**`
14+
- Copy `_next` back into canonical
15+
- Validate canonical
16+
- Remove `_next`
17+
- Put files into correct destination folders by responsibility
18+
- Fail fast instead of guessing any unclear destination
19+
- Do NOT refactor engine/shared broadly
20+
- Do NOT change unrelated games
21+
- Do NOT invent missing files
22+
23+
Package output to:
24+
<project folder>/tmp/BUILD_PR_GAMES_BREAKOUT_FULL_FOLDER_MIGRATION_delta.zip

docs/dev/COMMIT_COMMENT.txt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
APPLY_PR_GAMES_TEMPLATE_CONTRACT_ENFORCEMENT
1+
BUILD_PR_GAMES_BREAKOUT_FULL_FOLDER_MIGRATION
22

3-
Accepted template contract enforcement.
3+
Executed full Breakout folder migration using the validated template-based pipeline.
44

5-
- structure rules locked
6-
- behavior rules locked
7-
- future drift prevented
5+
- created Breakout_next from template
6+
- migrated gameplay into correct _next destinations
7+
- validated _next runtime
8+
- cleared canonical destination
9+
- copied _next back into canonical
10+
- validated canonical runtime
11+
- removed Breakout_next

docs/dev/NEXT_COMMAND.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Create BUILD_PR_GAMES_BREAKOUT_NEXT_TEMPLATE_BASELINE
1+
Create APPLY_PR_GAMES_BREAKOUT_FULL_FOLDER_MIGRATION
22

33
Scope:
4-
- start next migration using template
5-
- create Breakout_next baseline
6-
- keep non-playable
4+
- accept full Breakout folder migration
5+
- confirm canonical runtime and cleanup
6+
- no additional changes
Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
Validation Checklist — APPLY Template Contract Enforcement
1+
Validation Checklist — Games Breakout Full Folder Migration
22

3-
[x] Contract rules accepted
4-
[x] No runtime impact
5-
[x] No existing games broken
3+
[ ] Breakout_next created from template
4+
[ ] Breakout gameplay migrated into correct _next destinations
5+
[ ] Breakout_next/index.html boots gameplay
6+
[ ] Breakout_next runtime has no console errors
7+
[ ] Canonical Breakout destination cleared successfully
8+
[ ] Canonical Breakout matches promoted _next structure
9+
[ ] games/Breakout/index.html boots gameplay
10+
[ ] Canonical runtime has no console errors
11+
[ ] Breakout_next removed at end
12+
[ ] No unrelated game folders changed
13+
[ ] No broad engine/shared refactor occurred
614

7-
Status: PASS
15+
Status: PENDING
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
# BUILD PR — Games Breakout Full Folder Migration
2+
3+
## Purpose
4+
Execute the full validated game-folder migration pipeline for `games/Breakout/**` in one testable BUILD, while keeping scope limited to this single game.
5+
6+
## Single PR Purpose
7+
Migrate the Breakout game folder end-to-end using the established template contract and migration workflow:
8+
- create `_next` from template
9+
- migrate gameplay into `_next`
10+
- validate `_next`
11+
- clear canonical destination
12+
- copy `_next` into canonical
13+
- validate canonical
14+
- remove `_next`
15+
16+
## Why This Is Allowed Now
17+
This repo now has:
18+
- an accepted reusable `games/_template`
19+
- enforced template contract rules
20+
- multiple validated migrations proving the workflow
21+
22+
This BUILD bundles the already-proven steps for one game folder only.
23+
24+
## Source / Destination
25+
Canonical source game:
26+
- `games/Breakout/**`
27+
28+
Template source:
29+
- `games/_template/**`
30+
31+
Temporary migration target:
32+
- `games/Breakout_next/**`
33+
34+
Canonical destination after promotion:
35+
- `games/Breakout/**`
36+
37+
## Scope (STRICT)
38+
Perform the following steps in order:
39+
40+
### Step 1 — Create `_next` baseline from template
41+
- create `games/Breakout_next/**` from `games/_template/**`
42+
- keep baseline non-playable only until gameplay migration is wired
43+
- preserve required shell/theme baseline
44+
- ensure canvas is visible during baseline
45+
46+
Required baseline text before gameplay wiring:
47+
- `HTML Says`
48+
- `Template Status`
49+
- `This template intentionally does not boot gameplay.`
50+
51+
### Step 2 — Migrate Breakout gameplay into `_next`
52+
- read gameplay from `games/Breakout/**`
53+
- write gameplay into correct responsibility-based destinations under `games/Breakout_next/**`
54+
- adapt relative paths/imports only as required by the new destination
55+
- wire `games/Breakout_next/index.html` so `_next` boots gameplay
56+
- preserve debug integration if present in source
57+
58+
### Step 3 — Validate `_next`
59+
- open `games/Breakout_next/index.html`
60+
- confirm gameplay starts
61+
- confirm canvas visible
62+
- confirm no console errors
63+
- confirm source `games/Breakout/**` was not modified during `_next` creation/migration
64+
65+
### Step 4 — Clear canonical destination
66+
- delete all contents under `games/Breakout/**`
67+
- leave `games/Breakout/` folder itself present and empty
68+
69+
### Step 5 — Copy `_next` into canonical
70+
- copy all files/folders from `games/Breakout_next/**` into `games/Breakout/**`
71+
- preserve exact structure
72+
- ensure canonical path boots gameplay correctly
73+
74+
### Step 6 — Validate canonical
75+
- open `games/Breakout/index.html`
76+
- confirm gameplay starts from canonical path
77+
- confirm canvas visible
78+
- confirm no console errors
79+
- confirm structure matches `_next`
80+
81+
### Step 7 — Remove `_next`
82+
- delete `games/Breakout_next/**`
83+
- remove `games/Breakout_next/` folder once empty
84+
85+
## Allowed Destination Areas During Migration
86+
Place migrated files only into the correct corresponding areas under `games/Breakout_next/**`, including as applicable:
87+
- `games/Breakout_next/assets/**`
88+
- `games/Breakout_next/config/**`
89+
- `games/Breakout_next/debug/**`
90+
- `games/Breakout_next/entities/**`
91+
- `games/Breakout_next/flow/**`
92+
- `games/Breakout_next/game/**`
93+
- `games/Breakout_next/levels/**`
94+
- `games/Breakout_next/platform/**`
95+
- `games/Breakout_next/systems/**`
96+
- `games/Breakout_next/ui/**`
97+
- `games/Breakout_next/utils/**`
98+
99+
## Required Mapping Rule
100+
- Put each migrated file into the correct destination by responsibility
101+
- Do NOT dump unrelated files into the wrong folder just to make runtime work
102+
- Preserve reasonable structure parity between the original game and `_next`
103+
- If a source file has no clear destination inside `_next`, STOP rather than guessing
104+
105+
## Explicit Non-Goals
106+
- DO NOT modify any game other than Breakout
107+
- DO NOT refactor engine/shared broadly
108+
- DO NOT redesign `games/_template`
109+
- DO NOT change contract rules in this PR
110+
- DO NOT perform repo-wide cleanup
111+
- DO NOT invent missing files
112+
- DO NOT guess ambiguous destinations
113+
- DO NOT mix in unrelated fixes
114+
115+
## Fail-Fast Conditions
116+
STOP with no changes if any of the following are true:
117+
- a required source file has no clear destination inside `games/Breakout_next/**`
118+
- migration would require broad engine/shared refactor beyond strict path adjustments
119+
- canonical runtime cannot be made to work without structural guessing
120+
- any unrelated game folder must be changed
121+
- required runtime files are missing and would need invented content
122+
123+
## Acceptance Criteria
124+
- `games/Breakout/**` is the canonical running version after copy-back
125+
- `games/Breakout_next/**` is removed at the end
126+
- gameplay runs from canonical path
127+
- canvas is visible
128+
- no console errors
129+
- no unrelated games changed
130+
- no broad engine/shared refactor occurred
131+
132+
## Validation Steps
133+
1. Create and inspect `games/Breakout_next/**`
134+
2. Open `games/Breakout_next/index.html`
135+
3. Confirm:
136+
- gameplay starts
137+
- canvas visible
138+
- no console errors
139+
4. Confirm original `games/Breakout/**` was unchanged before clear step
140+
5. Clear canonical destination
141+
6. Copy `_next` back into canonical
142+
7. Open `games/Breakout/index.html`
143+
8. Confirm:
144+
- gameplay starts from canonical
145+
- canvas visible
146+
- no console errors
147+
9. Remove `_next`
148+
10. Confirm no unrelated game folders changed
149+
150+
## Output Requirement
151+
Codex must package:
152+
`<project folder>/tmp/BUILD_PR_GAMES_BREAKOUT_FULL_FOLDER_MIGRATION_delta.zip`

games/breakout/assets/.gitkeep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+


games/breakout/config/.gitkeep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+


games/breakout/debug/.gitkeep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+


games/breakout/entities/.gitkeep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+


games/breakout/flow/.gitkeep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+


0 commit comments

Comments
 (0)