Skip to content

Commit f6c688c

Browse files
committed
Rebuild Game Design with purpose flow capability demos and validation - PR_26155_068-076-game-design-rebuild
1 parent 6afcc00 commit f6c688c

20 files changed

Lines changed: 1272 additions & 72 deletions
-313 KB
Binary file not shown.

docs_build/dev/reports/coverage_changed_js_guardrail.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ Missing changed runtime JS files are WARN, not FAIL.
66
Source: Playwright/Chromium built-in V8 coverage from the active Playwright run.
77

88
Changed runtime JS files considered:
9-
(0%) toolbox/toolRegistry.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
10-
(88%) toolbox/tools-page-accordions.js - executed lines 494/494; executed functions 30/34
9+
(0%) toolbox/project-workspace/project-workspace.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
10+
(79%) toolbox/project-workspace/project-workspace-mock-repository.js - executed lines 384/384; executed functions 26/33
11+
(89%) toolbox/tools-page-accordions.js - executed lines 1690/1690; executed functions 51/57
12+
(95%) toolbox/game-design/game-design-mock-repository.js - executed lines 310/310; executed functions 36/38
13+
(96%) toolbox/game-design/game-design.js - executed lines 255/255; executed functions 23/24
1114

1215
Guardrail warnings:
13-
(0%) toolbox/toolRegistry.js - WARNING: changed runtime JS file missing from coverage; advisory only
16+
(0%) toolbox/project-workspace/project-workspace.js - WARNING: changed runtime JS file missing from coverage; advisory only
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Game Configuration Ready Gate
2+
3+
PR: PR_26155_068-076-game-design-rebuild
4+
5+
Status: READY
6+
7+
## Gate
8+
9+
Game Configuration implementation can start after this bundle because Game Design now provides:
10+
- active Project Workspace project context
11+
- project purpose flow
12+
- Game Type, Genre, and Play Style fields
13+
- actionable validation overlay
14+
- mock repository save/update behavior
15+
- Toolbox Progress and Build Path handoff copy
16+
- targeted Game Design MSJ coverage
17+
18+
## Boundary
19+
20+
This bundle did not start Game Configuration implementation.
21+
22+
Next implementation PR should build Game Configuration against the same mock-repository approach and consume Game Design readiness as project-scoped input only.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Game Design Capability Demo Authoring
2+
3+
PR: PR_26155_068-076-game-design-rebuild
4+
5+
Status: PASS
6+
7+
## Behavior
8+
9+
Capability demos remain Project Workspace projects.
10+
11+
Seeded capability demo projects:
12+
- Camera Follow Demo
13+
- Collision Demo
14+
- Gravity Demo
15+
16+
Game Design stores capability demo authoring metadata in `game_design_capability_demos` by `projectId`; it does not create a separate demo project system.
17+
18+
## Manual Test Notes
19+
20+
Open `toolbox/game-design/index.html?project=gravity-demo`.
21+
22+
Expected:
23+
- Gravity Demo is the active project.
24+
- Project Purpose is `Capability Demo`.
25+
- Capability demos are listed as Project Workspace projects.
26+
- Save Game Design keeps `capabilityDemoAuthoring` true in the output.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Game Design Project Purpose Flow
2+
3+
PR: PR_26155_068-076-game-design-rebuild
4+
5+
Status: PASS
6+
7+
## Purpose Flow
8+
9+
Game Design reads the active project purpose from the Project Workspace mock repository and displays it in the Project Context accordion.
10+
11+
Supported seeded purposes:
12+
- Game Project
13+
- Capability Demo
14+
- Learning Project
15+
- Template Project
16+
17+
Game Design does not own project identity. Project identity and purpose remain owned by Project Workspace.
18+
19+
## Manual Test Notes
20+
21+
Open:
22+
- `toolbox/game-design/index.html`
23+
- `toolbox/game-design/index.html?project=gravity-demo`
24+
25+
Expected:
26+
- default route shows Demo Project with purpose `Game Project`.
27+
- `?project=gravity-demo` shows Gravity Demo with purpose `Capability Demo`.
28+
- Project purpose is reflected in the saved Game Design output.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Game Design Repository Contract
2+
3+
PR: PR_26155_068-076-game-design-rebuild
4+
5+
Status: PASS
6+
7+
## Contract
8+
9+
Game Design now uses `toolbox/game-design/game-design-mock-repository.js` as an in-memory, SQL-shaped mock repository abstraction.
10+
11+
Tables:
12+
- `game_design_documents`
13+
- `game_design_validation_items`
14+
- `game_design_capability_demos`
15+
16+
The repository consumes Project Workspace mock project context through `createProjectWorkspaceMockRepository()` and never introduces a real database, auth, cloud, or persistence layer.
17+
18+
## Fields
19+
20+
`game_design_documents` stores:
21+
- `id`
22+
- `projectId`
23+
- `projectPurpose`
24+
- `gameType`
25+
- `genre`
26+
- `playStyle`
27+
- `designSummary`
28+
- `capabilityDemoAuthoring`
29+
- `capabilityDemoNotes`
30+
- `status`
31+
- `updatedAt`
32+
33+
`game_design_validation_items` stores actionable missing-field rows by `projectId`.
34+
35+
`game_design_capability_demos` stores project-owned capability demo authoring metadata by `projectId`.
36+
37+
## Validation Notes
38+
39+
Impacted lane: `game-design`.
40+
41+
Skipped lanes:
42+
- `project-workspace`: Game Design depends on active project context, but the new Game Design lane directly exercises that dependency through the Project Workspace mock repository.
43+
- `workspace-contract`: skipped because shared launch/header/template wiring did not change.
44+
- `samples`: skipped because samples are out of scope.
45+
46+
Theme V2 gap findings: none.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Game Design Targeted MSJ Tests
2+
3+
PR: PR_26155_068-076-game-design-rebuild
4+
5+
Status: PASS
6+
7+
## Impacted Lane
8+
9+
Impacted lane: `game-design`.
10+
11+
Added:
12+
- `npm run test:lane:game-design`
13+
- `tests/playwright/tools/GameDesignMockRepository.spec.mjs`
14+
15+
Executed command:
16+
17+
`node scripts/run-targeted-test-lanes.mjs --lane game-design ...`
18+
19+
The lane runner was invoked directly so generated operational reports could be redirected outside the repo, except for the repo-owned Playwright structure and V8 coverage reports.
20+
21+
## Covered Behavior
22+
23+
Targeted Playwright tests verify:
24+
- missing project context shows an actionable overlay.
25+
- save/update works against the Game Design mock repository.
26+
- validation is actionable and clears when required fields are complete.
27+
- capability demos remain Project Workspace projects.
28+
- Toolbox Progress and Build Path show the Game Design handoff.
29+
- no console errors.
30+
31+
Result:
32+
- 4 passed.
33+
34+
## Coverage Notes
35+
36+
Generated:
37+
- `docs_build/dev/reports/playwright_v8_coverage_report.txt`
38+
- `docs_build/dev/reports/coverage_changed_js_guardrail.txt`
39+
40+
Changed Game Design runtime files were covered:
41+
- `toolbox/game-design/game-design.js`
42+
- `toolbox/game-design/game-design-mock-repository.js`
43+
44+
Advisory WARN remains for previously changed Project Workspace runtime JS that was not exercised by this Game Design lane.
45+
46+
## Skipped Lanes
47+
48+
Skipped:
49+
- Project Workspace full lane: Game Design tests directly exercise the needed active-project context.
50+
- Workspace contract lane: no shared launch/contract wiring changed.
51+
- Full samples smoke: samples are out of scope.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Game Design Toolbox Progress Integration
2+
3+
PR: PR_26155_068-076-game-design-rebuild
4+
5+
Status: PASS
6+
7+
## Integration
8+
9+
`toolbox/tools-page-accordions.js` was updated only for the Game Design progress checklist text.
10+
11+
Game Design Progress now reports:
12+
- Project purpose context required
13+
- Game type, genre, and play style required
14+
- Validation overlay hands off to Game Configuration
15+
16+
Build Path remains the existing visual path:
17+
- Project Workspace
18+
- Game Design
19+
- Game Configuration
20+
- Required Tool Path
21+
- Build Game
22+
- Game Testing
23+
- Publish
24+
25+
No database, persistence, auth, or shared launch wiring was added.
26+
27+
## Validation Notes
28+
29+
The targeted Game Design lane checks Toolbox Progress and Build Path views because those views were touched.
30+
31+
`npm run test:workspace-v2` was skipped because shared launch/contract wiring did not change. The command name remains legacy; user-facing language is Project Workspace.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Game Design Type Genre Model
2+
3+
PR: PR_26155_068-076-game-design-rebuild
4+
5+
Status: PASS
6+
7+
## Model
8+
9+
Game Design adds runtime-backed fields for:
10+
- Game Type
11+
- Genre
12+
- Play Style
13+
- Design Summary
14+
15+
Game type values:
16+
- 2D Platformer
17+
- Arcade Action
18+
- Capability Demo
19+
- Narrative Adventure
20+
- Puzzle
21+
- RPG
22+
- Sandbox
23+
- Simulation
24+
- Strategy
25+
26+
Genre values:
27+
- Action
28+
- Adventure
29+
- Educational
30+
- Fantasy
31+
- Sci-Fi
32+
- Sports
33+
- Strategy
34+
- Utility
35+
36+
Play style values:
37+
- Competitive
38+
- Cooperative
39+
- Guided Tutorial
40+
- Sandbox
41+
- Single Player
42+
- Turn-Based
43+
44+
## Validation
45+
46+
The targeted Game Design Playwright lane verifies save/update behavior by selecting Game Type, Genre, and Play Style, saving, then updating Genre and confirming the output changes.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Game Design Validation And Overlay
2+
3+
PR: PR_26155_068-076-game-design-rebuild
4+
5+
Status: PASS
6+
7+
## Validation Overlay
8+
9+
Game Design now shows actionable validation for:
10+
- missing Project Workspace context
11+
- missing Game Type
12+
- missing Genre
13+
- missing Play Style
14+
- missing Design Summary
15+
16+
The missing project context overlay appears when opened with:
17+
18+
`toolbox/game-design/index.html?project=missing`
19+
20+
The overlay uses existing Theme V2 cards, status text, and buttons. No new CSS was added.
21+
22+
## Validation Notes
23+
24+
Targeted Playwright verified:
25+
- missing project context shows an overlay.
26+
- Save Game Design without project context logs an actionable failure.
27+
- completing all required fields hides the validation overlay.
28+
- no console errors.

0 commit comments

Comments
 (0)