Skip to content

Commit c8d3135

Browse files
author
DavidQ
committed
BUILD: repo structure normalization (02) import switch
- updated imports from engine/ to src/engine/ - no API changes - no new files - original engine/ still present for rollback safety next: - validate runtime - prepare removal PR for old engine/ directory
1 parent 02461e2 commit c8d3135

537 files changed

Lines changed: 1505 additions & 1507 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
* text=auto
2+
*.js text eol=lf
3+
*.md text eol=lf
4+
*.txt text eol=lf

docs/dev/CODEX_COMMANDS.md

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,18 @@ REASONING: high
33

44
CONSTRAINTS:
55
- DO NOT scan repo
6-
- ONLY modify listed targets
6+
- ONLY modify files that explicitly import from engine/
77
- NO engine API changes
8-
- NO new files unless explicitly listed
8+
- NO new files
99

1010
TASK:
11-
Staged, non-destructive engine move.
12-
13-
1) Create directory:
14-
src/engine/
15-
16-
2) Copy ALL files and folders from:
17-
engine/**
18-
19-
to:
20-
src/engine/**
21-
22-
3) Preserve relative structure exactly (1:1 mirror).
11+
Replace import paths:
12+
engine/... → src/engine/...
2313

2414
RULES:
25-
- Do NOT delete or modify anything under engine/
26-
- Do NOT change any import paths
27-
- Do NOT edit file contents
28-
- Do NOT create files outside src/engine/**
29-
- If any ambiguity, STOP and report
15+
- Do not modify anything else
16+
- Do not change logic
17+
- Do not delete engine/ yet
3018

3119
OUTPUT:
32-
Create ZIP at:
33-
<project folder>/tmp/BUILD_PR_REPO_STRUCTURE_NORMALIZATION_01_ENGINE_MOVE.zip
20+
<project folder>/tmp/BUILD_PR_REPO_STRUCTURE_NORMALIZATION_02_IMPORT_SWITCH.zip

docs/dev/COMMIT_COMMENT.txt

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
BUILD: repo structure normalization (01) staged engine move
1+
BUILD: repo structure normalization (02) import switch
22

3-
- created src/engine/ directory
4-
- copied engine/** to src/engine/** (1:1 mirror)
5-
- no changes to original engine/ directory
6-
- no import path changes
7-
- no engine API changes
8-
9-
notes:
10-
- staged move to allow safe validation before cutover
11-
- follow-up PR will switch imports to src/engine/
3+
- updated imports from engine/ to src/engine/
4+
- no API changes
5+
- no new files
6+
- original engine/ still present for rollback safety
127

138
next:
14-
- validate mirror integrity
15-
- proceed to import normalization PR
9+
- validate runtime
10+
- prepare removal PR for old engine/ directory
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
VALIDATION CHECKLIST
2-
3-
[ ] src/engine/ exists
4-
[ ] all files from engine/** exist under src/engine/** (1:1)
5-
[ ] original engine/** remains unchanged
6-
[ ] no import paths changed
7-
[ ] application runs as before
1+
[ ] imports updated
2+
[ ] no new files
3+
[ ] app runs
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# BUILD PR — Repo Structure Normalization (02) Import Switch
2+
3+
## Scope
4+
Update imports from `engine/``src/engine/`
5+
6+
## Constraints
7+
- DO NOT scan repo
8+
- ONLY modify files that contain engine imports
9+
- NO engine API changes
10+
- NO new files
11+
12+
## Targets
13+
- Replace import paths referencing `engine/` with `src/engine/`
14+
15+
## Validation
16+
- App runs using src/engine paths only

games/AITargetDummy/game/AITargetDummyInputController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ David Quesenberry
44
03/25/2026
55
AITargetDummyInputController.js
66
*/
7-
import { GamepadInputAdapter } from '../../../engine/input/index.js';
7+
import { GamepadInputAdapter } from '../../../src/engine/input/index.js';
88

99
function clamp(value, min, max) {
1010
return Math.max(min, Math.min(max, value));

games/AITargetDummy/game/AITargetDummyScene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ David Quesenberry
44
03/25/2026
55
AITargetDummyScene.js
66
*/
7-
import { Scene } from '../../../engine/scenes/index.js';
7+
import { Scene } from '../../../src/engine/scenes/index.js';
88
import AITargetDummyDebugOverlay from './AITargetDummyDebugOverlay.js';
99
import AITargetDummyInputController from './AITargetDummyInputController.js';
1010
import AITargetDummyWorld from './AITargetDummyWorld.js';

games/AITargetDummy/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ David Quesenberry
44
03/25/2026
55
main.js
66
*/
7-
import Engine from '../../engine/core/Engine.js';
8-
import { InputService } from '../../engine/input/index.js';
9-
import { Theme, ThemeTokens } from '../../engine/theme/index.js';
7+
import Engine from '../../src/engine/core/Engine.js';
8+
import { InputService } from '../../src/engine/input/index.js';
9+
import { Theme, ThemeTokens } from '../../src/engine/theme/index.js';
1010
import AITargetDummyScene from './game/AITargetDummyScene.js';
1111

1212
const theme = new Theme(ThemeTokens);

games/Asteroids/entities/Asteroid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ David Quesenberry
55
Asteroid.js
66
*/
77
import { TAU, randomRange, wrap } from '../utils/math.js';
8-
import { transformPoints } from '../../../engine/vector/index.js';
8+
import { transformPoints } from '../../../src/engine/vector/index.js';
99

1010
const BASE_VECTOR_MAP = [
1111
{ x: 10, y: 40 },

games/Asteroids/entities/Ship.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ David Quesenberry
55
Ship.js
66
*/
77
import { wrap } from '../utils/math.js';
8-
import { transformPoints } from '../../../engine/vector/index.js';
8+
import { transformPoints } from '../../../src/engine/vector/index.js';
99

1010
const SMALL_VECTOR_MAP = [
1111
{ x: 14, y: 0 },

0 commit comments

Comments
 (0)