Skip to content

Commit 42f2482

Browse files
author
DavidQ
committed
Phase 08.05 — Space Invaders boundary normalization completion
1 parent 106fb71 commit 42f2482

10 files changed

Lines changed: 137 additions & 146 deletions

File tree

docs/dev/CODEX_COMMANDS.md

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,13 @@
1-
MODEL: GPT-5.4
1+
MODEL: GPT-5.3-codex
22
REASONING: medium
33

4-
COMMAND:
5-
Validate roadmap status using repo evidence only.
4+
TASK:
5+
Normalize SpaceInvaders to match Puckman/Asteroids structure.
66

7-
Scope:
8-
- Read docs/dev/ROADMAP_RULES.md
9-
- Do not implement code
10-
- Do not change roadmap statuses directly
11-
- Do not infer completion from partial structure
7+
CONSTRAINTS:
8+
- DO NOT modify engine
9+
- DO NOT add index.html
10+
- DO NOT standardize flow behavior beyond file presence
1211

13-
Required outputs:
14-
1. docs/dev/reports/file_tree.txt
15-
- scoped file tree only
16-
2. docs/dev/reports/validation_checklist.txt
17-
- criterion-by-criterion pass/fail with evidence
18-
3. docs/dev/reports/change_summary.txt
19-
- concise facts found, missing evidence, and recommended status
20-
21-
Rules:
22-
- Facts only
23-
- No repo-wide scanning unless the roadmap line itself is repo-wide
24-
- One roadmap line at a time
25-
- Placeholder folders do not count as completion
26-
- A recommendation may be [ ], [.] or [x], but only if justified by checklist evidence
27-
28-
Suggested execution pattern:
29-
1. Load roadmap line and acceptance criteria
30-
2. Scan only the minimum required repo area
31-
3. Produce evidence-backed checklist
32-
4. Recommend status without editing implementation files
12+
OUTPUT:
13+
Return ZIP to <project folder>/tmp/

docs/dev/COMMIT_COMMENT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Add roadmap validation guardrails so status changes require explicit evidence and facts-only validation reports.
1+
Phase 08.05 — Space Invaders boundary normalization completion
Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1 @@
1-
Change Summary (Evidence-Only)
2-
3-
Facts found
4-
- A game-local Puckman rules source exists: games/Puckman/rules/gameFlowRules.js.
5-
- Flow modules exist and import from rules:
6-
- games/Puckman/flow/attract.js
7-
- games/Puckman/flow/intro.js
8-
- games/Puckman/flow/highscore.js
9-
- Gameplay runtime/scene exist and import from rules:
10-
- games/Puckman/game/PuckmanRuntime.js
11-
- games/Puckman/game/PuckmanGameScene.js
12-
- Puckman boundary folders are present (assets/config/debug/entities/levels/rules/systems/ui/utils).
13-
14-
Missing evidence / limits
15-
- This validation is intentionally scoped to one roadmap line only: "puckman normalized".
16-
- No claim is made here about repo-wide lines such as:
17-
- game flow pattern standardized
18-
- gameplay/entities/levels/rules/assets boundaries normalized (repo-wide)
19-
- shared-vs-game utility boundaries enforced
20-
21-
Recommended status (single-line)
22-
- Games Layer -> puckman normalized: [x]
23-
- Reason: scoped acceptance criteria are met by non-placeholder flow/game/rules implementation evidence.
1+
Adds Space Invaders completion PR. No code included.

docs/dev/reports/file_tree.txt

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,2 @@
1-
Scoped Validation Tree
2-
3-
docs/
4-
dev/
5-
ROADMAP_RULES.md
6-
pr/
7-
BUILD_PR_LEVEL_08_04_PUCKMAN_BOUNDARY_NORMALIZATION.md
8-
MASTER_ROADMAP_HIGH_LEVEL.md
9-
10-
games/
11-
Puckman/
12-
assets/
13-
.gitkeep
14-
config/
15-
.gitkeep
16-
debug/
17-
.gitkeep
18-
entities/
19-
.gitkeep
20-
flow/
21-
attract.js
22-
intro.js
23-
highscore.js
24-
game/
25-
PuckmanRuntime.js
26-
PuckmanGameScene.js
27-
levels/
28-
.gitkeep
29-
rules/
30-
gameFlowRules.js
31-
systems/
32-
.gitkeep
33-
ui/
34-
.gitkeep
35-
utils/
36-
.gitkeep
1+
docs/pr/BUILD_PR_LEVEL_08_05_SPACE_INVADERS_COMPLETION.md
2+
...
Lines changed: 1 addition & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1 @@
1-
Roadmap Validation Checklist
2-
3-
Roadmap line under review
4-
- Section 8 (Games Layer): puckman normalized
5-
- Current marker in docs/MASTER_ROADMAP_HIGH_LEVEL.md: [x]
6-
7-
Acceptance source
8-
- docs/pr/BUILD_PR_LEVEL_08_04_PUCKMAN_BOUNDARY_NORMALIZATION.md
9-
- docs/dev/ROADMAP_RULES.md
10-
11-
Criteria-by-criteria evidence
12-
1) Puckman has a clear local boundary split for flow/game/rules
13-
- Result: PASS
14-
- Evidence:
15-
- games/Puckman/flow/{attract.js,intro.js,highscore.js}
16-
- games/Puckman/game/{PuckmanRuntime.js,PuckmanGameScene.js}
17-
- games/Puckman/rules/gameFlowRules.js
18-
19-
2) No duplicated flow-rule constants across flow and gameplay
20-
- Result: PASS
21-
- Evidence:
22-
- Constants defined in games/Puckman/rules/gameFlowRules.js:
23-
- PUCKMAN_GAME_OVER_AUTO_EXIT_SECONDS
24-
- PUCKMAN_GAME_OVER_RETURN_MODE
25-
- PUCKMAN_GAME_OVER_RETURN_STATUS
26-
- PUCKMAN_HIGHSCORE_AUTO_EXIT_SECONDS
27-
- Flow files import constants from ../rules/gameFlowRules.js (no duplicate literal definitions).
28-
- Gameplay files import constants from ../rules/gameFlowRules.js (no duplicate literal definitions).
29-
30-
3) Gameplay scene/runtime files consume rules constants instead of defining them
31-
- Result: PASS
32-
- Evidence:
33-
- games/Puckman/game/PuckmanRuntime.js imports PUCKMAN_* constants from rules.
34-
- games/Puckman/game/PuckmanGameScene.js imports PUCKMAN_* constants from rules.
35-
36-
4) Placeholder folders are not counted as completion by themselves
37-
- Result: PASS
38-
- Evidence:
39-
- Completion evidence is based on non-placeholder files in flow/game/rules, not on .gitkeep-only folders.
40-
41-
5) Status recommendation must be evidence-backed and strict under uncertainty
42-
- Result: PASS
43-
- Evidence:
44-
- Required line is game-specific (not repo-wide).
45-
- Criteria above are satisfied in scoped Puckman surface.
46-
47-
Smallest relevant validation commands (already run in prior implementation evidence)
48-
- node --check games/Puckman/rules/gameFlowRules.js
49-
- node --check games/Puckman/flow/attract.js
50-
- node --check games/Puckman/flow/intro.js
51-
- node --check games/Puckman/flow/highscore.js
52-
- node --check games/Puckman/game/PuckmanRuntime.js
53-
- node --check games/Puckman/game/PuckmanGameScene.js
54-
- node tests/runtime/LaunchSmokeAllEntries.test.mjs
55-
56-
Recommendation for this one roadmap line
57-
- puckman normalized => [x]
58-
- Justification: all scoped acceptance criteria for Puckman boundary normalization are met with direct file evidence.
1+
Verify flow/game/rules separation and no duplication.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# BUILD_PR — LEVEL 08.05 SPACE INVADERS COMPLETION
2+
3+
## Purpose
4+
Complete Space Invaders boundary normalization to match Asteroids and Puckman.
5+
6+
## Scope
7+
- Only Space Invaders game folder
8+
- No engine changes
9+
- No flow standardization enforcement
10+
- No cross-game refactor
11+
12+
## Required Structure
13+
games/SpaceInvaders/
14+
flow/
15+
game/
16+
rules/
17+
entities/
18+
levels/
19+
assets/
20+
systems/
21+
ui/
22+
utils/
23+
24+
## Acceptance Criteria
25+
- flow files exist (attract, intro, highscore)
26+
- rules centralized in rules/
27+
- game runtime consumes rules
28+
- no duplicate constants across flow/game
29+
30+
## Out of Scope
31+
- index.html
32+
- launcher/bootstrap
33+
- engine wiring
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import {
2+
SPACE_INVADERS_FLOW_IDS,
3+
SPACE_INVADERS_FLOW_LABELS,
4+
SPACE_INVADERS_GAME_OVER_RETURN_MODE,
5+
SPACE_INVADERS_GAME_OVER_RETURN_RESET_IDLE,
6+
SPACE_INVADERS_GAME_OVER_RETURN_STATUS,
7+
createSpaceInvadersFlowDescriptor
8+
} from "../rules/gameFlowRules.js";
9+
10+
export const SPACE_INVADERS_ATTRACT_FLOW_NEXT_ID = SPACE_INVADERS_FLOW_IDS.intro;
11+
12+
export const attractFlow = createSpaceInvadersFlowDescriptor(SPACE_INVADERS_FLOW_IDS.attract, {
13+
label: SPACE_INVADERS_FLOW_LABELS.attract,
14+
nextFlowId: SPACE_INVADERS_ATTRACT_FLOW_NEXT_ID,
15+
autoAdvanceSeconds: null,
16+
statusText: SPACE_INVADERS_GAME_OVER_RETURN_STATUS,
17+
returnMode: SPACE_INVADERS_GAME_OVER_RETURN_MODE,
18+
resetIdleOnReturn: SPACE_INVADERS_GAME_OVER_RETURN_RESET_IDLE
19+
});
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import {
2+
SPACE_INVADERS_FLOW_IDS,
3+
SPACE_INVADERS_FLOW_LABELS,
4+
SPACE_INVADERS_HIGHSCORE_AUTO_EXIT_SECONDS,
5+
SPACE_INVADERS_HIGHSCORE_STATUS,
6+
createSpaceInvadersFlowDescriptor
7+
} from "../rules/gameFlowRules.js";
8+
9+
export const SPACE_INVADERS_HIGHSCORE_FLOW_NEXT_ID = SPACE_INVADERS_FLOW_IDS.attract;
10+
11+
export const highscoreFlow = createSpaceInvadersFlowDescriptor(SPACE_INVADERS_FLOW_IDS.highscore, {
12+
label: SPACE_INVADERS_FLOW_LABELS.highscore,
13+
nextFlowId: SPACE_INVADERS_HIGHSCORE_FLOW_NEXT_ID,
14+
autoAdvanceSeconds: SPACE_INVADERS_HIGHSCORE_AUTO_EXIT_SECONDS,
15+
statusText: SPACE_INVADERS_HIGHSCORE_STATUS
16+
});

games/SpaceInvaders/flow/intro.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import {
2+
SPACE_INVADERS_FLOW_IDS,
3+
SPACE_INVADERS_FLOW_LABELS,
4+
SPACE_INVADERS_GAME_OVER_AUTO_EXIT_SECONDS,
5+
SPACE_INVADERS_GAME_OVER_RETURN_MODE,
6+
SPACE_INVADERS_GAME_OVER_RETURN_RESET_IDLE,
7+
SPACE_INVADERS_GAME_OVER_RETURN_STATUS,
8+
createSpaceInvadersFlowDescriptor
9+
} from "../rules/gameFlowRules.js";
10+
11+
export const SPACE_INVADERS_INTRO_FLOW_NEXT_ID = SPACE_INVADERS_FLOW_IDS.highscore;
12+
13+
export const introFlow = createSpaceInvadersFlowDescriptor(SPACE_INVADERS_FLOW_IDS.intro, {
14+
label: SPACE_INVADERS_FLOW_LABELS.intro,
15+
nextFlowId: SPACE_INVADERS_INTRO_FLOW_NEXT_ID,
16+
autoAdvanceSeconds: SPACE_INVADERS_GAME_OVER_AUTO_EXIT_SECONDS,
17+
statusText: SPACE_INVADERS_GAME_OVER_RETURN_STATUS,
18+
returnMode: SPACE_INVADERS_GAME_OVER_RETURN_MODE,
19+
resetIdleOnReturn: SPACE_INVADERS_GAME_OVER_RETURN_RESET_IDLE
20+
});
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
export const SPACE_INVADERS_FLOW_CONTRACT_VERSION = "1";
2+
3+
export const SPACE_INVADERS_FLOW_IDS = Object.freeze({
4+
attract: "attract",
5+
intro: "intro",
6+
highscore: "highscore"
7+
});
8+
9+
export const SPACE_INVADERS_FLOW_LABELS = Object.freeze({
10+
attract: "Attract",
11+
intro: "Intro",
12+
highscore: "Highscore"
13+
});
14+
15+
export const SPACE_INVADERS_GAME_OVER_AUTO_EXIT_SECONDS = 30;
16+
export const SPACE_INVADERS_GAME_OVER_RETURN_MODE = "menu";
17+
export const SPACE_INVADERS_GAME_OVER_RETURN_STATUS = "Press 1 for one player or 2 for two players.";
18+
export const SPACE_INVADERS_GAME_OVER_RETURN_RESET_IDLE = true;
19+
20+
export const SPACE_INVADERS_HIGHSCORE_AUTO_EXIT_SECONDS = 12;
21+
export const SPACE_INVADERS_HIGHSCORE_STATUS = "High scores";
22+
23+
export function createSpaceInvadersFlowDescriptor(id, options = {}) {
24+
return Object.freeze({
25+
id,
26+
label: options.label || id,
27+
contractVersion: SPACE_INVADERS_FLOW_CONTRACT_VERSION,
28+
nextFlowId: options.nextFlowId || SPACE_INVADERS_FLOW_IDS.attract,
29+
autoAdvanceSeconds: options.autoAdvanceSeconds ?? null,
30+
statusText: options.statusText || "",
31+
returnMode: options.returnMode || SPACE_INVADERS_GAME_OVER_RETURN_MODE,
32+
resetIdleOnReturn: options.resetIdleOnReturn ?? SPACE_INVADERS_GAME_OVER_RETURN_RESET_IDLE,
33+
debugPluginFactory: options.debugPluginFactory || null
34+
});
35+
}

0 commit comments

Comments
 (0)