Skip to content

Commit 8afb916

Browse files
author
DavidQ
committed
Finalizes the PowerShell script tree, aligns script placement with purpose, updates moved/renamed script references, and reinforces the general-vs-codex-vs-deploy folder boundaries.
BUILD_PR_LEVEL_09_23_SCRIPT_STRUCTURE_FINALIZATION
1 parent bc95b44 commit 8afb916

11 files changed

Lines changed: 360 additions & 43 deletions

docs/dev/CODEX_COMMANDS.md

Lines changed: 63 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,63 @@
1-
MODEL: GPT-5.4
2-
REASONING: high
3-
4-
COMMAND:
5-
- move New-CodexTemplateGame.ps1 to scripts/PS/
6-
- rename to reflect actual purpose (template game creation)
7-
- ensure no references break
8-
- enforce script folder structure:
9-
scripts/PS/
10-
scripts/PS/codex/
11-
scripts/PS/deploy/
12-
- update any references accordingly
13-
- enforce commit format:
14-
description first line
15-
PR name last line
16-
- update roadmap status only
1+
# MODEL
2+
GPT-5.4
3+
4+
# REASONING
5+
high
6+
7+
# COMMAND
8+
Create BUILD_PR_LEVEL_09_23_SCRIPT_STRUCTURE_FINALIZATION as a docs-first, surgical PR.
9+
10+
## Mission
11+
Finalize the PowerShell script tree after the recent move/rename work so each script location clearly matches its purpose and all references are aligned.
12+
13+
## Required scope
14+
- finalize and enforce folder roles:
15+
- `scripts/PS/` for general operator scripts
16+
- `scripts/PS/codex/` for Codex-only scripts
17+
- `scripts/PS/deploy/` for deployment scripts
18+
- update references after the moved/renamed template game creation script
19+
- normalize naming where touched so names match actual purpose
20+
- add focused validation that script placement matches responsibility
21+
- document the final structure expectations
22+
23+
## Hard rules
24+
- do not change engine code
25+
- do not add gameplay/runtime features
26+
- do not redesign tools
27+
- do not expand deployment capability beyond structure/finalization
28+
- keep the PR surgical and purpose-specific
29+
30+
## Commit comment format
31+
- description starts on first line
32+
- no leading blank line / no leading CR
33+
- PR identifier goes on the last line
34+
35+
## Roadmap instruction
36+
Update roadmap status only where this PR clearly advances tracked work.
37+
Do not change roadmap prose except for previously approved additions already in flight.
38+
39+
## Deliverables
40+
Return a single repo-structured ZIP at:
41+
`<project folder>/tmp/BUILD_PR_LEVEL_09_23_SCRIPT_STRUCTURE_FINALIZATION.zip`
42+
43+
Include:
44+
- docs/pr/BUILD_PR_LEVEL_09_23_SCRIPT_STRUCTURE_FINALIZATION.md
45+
- docs/dev/codex_commands.md
46+
- docs/dev/commit_comment.txt
47+
- docs/dev/next_command.txt
48+
- docs/dev/reports/change_summary.txt
49+
- docs/dev/reports/validation_checklist.txt
50+
51+
## Validation
52+
Run focused checks only:
53+
- PowerShell parse/readiness checks on touched scripts
54+
- focused reference/path checks
55+
- focused structure checks ensuring scripts live in the correct folders
56+
57+
## Success definition
58+
- general scripts live in `scripts/PS/`
59+
- Codex-only scripts live in `scripts/PS/codex/`
60+
- deployment scripts live in `scripts/PS/deploy/`
61+
- references and names align with actual purpose
62+
- roadmap gets status-only updates where applicable
63+
- final output is one ZIP in `<project folder>/tmp/`

docs/dev/CODEX_TEMPLATE_GAME_CREATION_SCRIPTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Codex Template Game Creation Scripting
22

3-
Use `scripts/PS/New-TemplateGame.ps1` to create a new game scaffold from `games/_template` with the standardized asset/data and tool-project contract.
3+
Use `scripts/PS/New-Game-from-Template.ps1` to create a new game scaffold from `games/_template` with the standardized asset/data and tool-project contract.
44

55
## Script
6-
- `scripts/PS/New-TemplateGame.ps1`
6+
- `scripts/PS/New-Game-from-Template.ps1`
77

88
## Example
99
```powershell
10-
.\scripts\PS\New-TemplateGame.ps1 -GameId "my-new-game" -DisplayName "My New Game" -Apply
10+
.\scripts\PS\New-Game-from-Template.ps1 -GameId "my-new-game" -DisplayName "My New Game" -Apply
1111
```
1212

1313
## Generated Structure

docs/dev/COMMIT_COMMENT.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Moves template game creation out of codex-specific scripts by relocating `New-CodexTemplateGame.ps1` to `scripts/PS/New-TemplateGame.ps1`, updates all references, and preserves `scripts/PS/`, `scripts/PS/codex/`, and `scripts/PS/deploy/` boundaries.
1+
Finalizes the PowerShell script tree by renaming/moving template game creation to `scripts/PS/New-Game-from-Template.ps1`, updating references, and enforcing `scripts/PS/`, `scripts/PS/codex/`, and `scripts/PS/deploy/` role boundaries.
22

3-
BUILD_PR_LEVEL_09_22_DEPLOYMENT_PIPELINE_INTEGRATION
3+
BUILD_PR_LEVEL_09_23_SCRIPT_STRUCTURE_FINALIZATION

docs/dev/NEXT_COMMAND.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
BUILD_PR_LEVEL_09_23_SCRIPT_STRUCTURE_FINALIZATION
1+
BUILD_PR_LEVEL_09_24_DOCKER_DEPLOY_SCRIPT_REFINEMENT
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# PowerShell Script Structure
2+
3+
This repo uses a purpose-based PowerShell layout:
4+
5+
- `scripts/PS/`
6+
- general operator scripts that are not codex-only and not deployment-only
7+
- `scripts/PS/codex/`
8+
- codex session/operator scripts
9+
- `scripts/PS/deploy/`
10+
- deployment/staging scripts
11+
12+
## Current Canonical Scripts
13+
14+
General (`scripts/PS/`):
15+
- `New-Game-from-Template.ps1`
16+
- `Validate-ScriptStructure.ps1`
17+
18+
Codex (`scripts/PS/codex/`):
19+
- `CodexOperatorState.ps1`
20+
- `CodexPreprocessor.ps1`
21+
- `Get-CodexOperatorState.ps1`
22+
- `Set-CodexApiKey.ps1`
23+
- `Switch-CodexPlanMode.ps1`
24+
- `Validate-CodexApiKey.ps1`
25+
26+
Deploy (`scripts/PS/deploy/`):
27+
- `WebsiteRepoDeploymentCommon.ps1`
28+
- `Prep-WebsiteRepoDeployment.ps1`
29+
- `Update-WebsiteRepoDeployment.ps1`
30+
- `Clean-WebsiteRepoDeployment.ps1`
31+
32+
## Validation
33+
34+
Run:
35+
36+
```powershell
37+
.\scripts\PS\Validate-ScriptStructure.ps1
38+
```
39+
40+
Optional JSON output:
41+
42+
```powershell
43+
.\scripts\PS\Validate-ScriptStructure.ps1 -Json
44+
```
Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
Summary
2-
- Moved template game creation script from `scripts/PS/codex/New-CodexTemplateGame.ps1` to `scripts/PS/New-TemplateGame.ps1`.
3-
- Renamed script to reflect purpose (general template game creation, not codex-only naming).
4-
- Updated script internals for new location:
5-
- repo-root resolution now matches `scripts/PS/` depth
6-
- generation note path updated to `scripts/PS/New-TemplateGame.ps1`
7-
- Updated documentation references to the new script path:
2+
- Finalized script placement/naming for the template game creation script:
3+
- removed `scripts/PS/New-TemplateGame.ps1`
4+
- added `scripts/PS/New-Game-from-Template.ps1`
5+
- Updated all active references to the renamed script path:
86
- `docs/dev/CODEX_TEMPLATE_GAME_CREATION_SCRIPTING.md`
9-
- Preserved script folder structure:
7+
- generation-note path in `scripts/PS/New-Game-from-Template.ps1`
8+
- Added focused structure validation script:
9+
- `scripts/PS/Validate-ScriptStructure.ps1`
10+
- Added final structure expectations doc:
11+
- `docs/dev/POWERSHELL_SCRIPT_STRUCTURE.md`
12+
- Preserved and validated folder roles:
1013
- `scripts/PS/` (general)
11-
- `scripts/PS/codex/` (codex)
14+
- `scripts/PS/codex/` (Codex-only)
1215
- `scripts/PS/deploy/` (deployment)
13-
- Updated roadmap with status-only bracket change.
16+
- Applied roadmap status-only update for script naming policy finalization.
Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,35 @@
1-
Validation Checklist - BUILD_PR_LEVEL_09_22_DEPLOYMENT_PIPELINE_INTEGRATION
2-
3-
[x] template game script moved from `scripts/PS/codex/` to `scripts/PS/`
4-
[x] script renamed to purpose-based name (`New-TemplateGame.ps1`)
5-
[x] references updated to avoid broken paths
6-
[x] script folder structure preserved (`scripts/PS/`, `scripts/PS/codex/`, `scripts/PS/deploy/`)
7-
[x] PowerShell parse check passes on renamed/touched script
8-
[x] focused dry-run/apply smoke checks pass for renamed script
9-
[x] roadmap updated with status-only bracket change
10-
[x] commit format enforced: description first line, PR name last line
1+
Validation Checklist - BUILD_PR_LEVEL_09_23_SCRIPT_STRUCTURE_FINALIZATION
2+
3+
Scope
4+
[x] PR remains in the script-structure lane only
5+
[x] No engine changes introduced
6+
[x] No gameplay/runtime feature changes introduced
7+
[x] No tool UI redesign introduced
8+
[x] No unrelated deployment feature expansion introduced
9+
10+
Structure
11+
[x] General operator/template scripts live under `scripts/PS/`
12+
[x] Codex-only scripts live under `scripts/PS/codex/`
13+
[x] Deployment scripts live under `scripts/PS/deploy/`
14+
[x] No misplaced general script remains in `scripts/PS/codex/`
15+
[x] References point to the updated script paths
16+
[x] Names match actual purpose where touched
17+
18+
Validation
19+
[x] Touched PowerShell files parse/read cleanly
20+
[x] Focused reference/path checks pass
21+
[x] Focused structure checks pass
22+
[x] Focused template script dry-run/apply smoke check passes
23+
24+
Roadmap
25+
[x] Roadmap status updated only where applicable
26+
[x] No unapproved roadmap prose changes made
27+
28+
Packaging
29+
[x] docs/pr document included
30+
[x] docs/dev/codex_commands.md included
31+
[x] docs/dev/commit_comment.txt included
32+
[x] docs/dev/next_command.txt included
33+
[x] docs/dev/reports/change_summary.txt included
34+
[x] docs/dev/reports/validation_checklist.txt included
35+
[x] Single ZIP produced at `<project folder>/tmp/BUILD_PR_LEVEL_09_23_SCRIPT_STRUCTURE_FINALIZATION.zip`

docs/dev/roadmaps/MASTER_ROADMAP_HIGH_LEVEL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@
577577
- [ ] per-component roadmap slices added only when truly needed
578578
- [ ] structure normalization roadmap linked to future BUILD lanes
579579
- [ ] phase descriptions normalized repo-wide
580-
- [.] naming policy documented
580+
- [x] naming policy documented
581581

582582
---
583583

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# BUILD_PR — LEVEL 09_23 — SCRIPT STRUCTURE FINALIZATION
2+
3+
## Objective
4+
Finalize the PowerShell script structure after the recent script relocation and renaming work so the repo has a clear, stable, long-term script layout.
5+
6+
## Dependency Context
7+
This PR follows:
8+
- 09_18 Codex plan switch and API key scripting
9+
- 09_19 template game creation scripting
10+
- 09_20 website repo prep scripting
11+
- 09_21 script validation and safety
12+
- 09_22 deployment pipeline integration
13+
14+
09_22 corrected script placement for the template game creation script and reinforced the intended folder roles.
15+
09_23 now finalizes the structure, references, naming expectations, and ownership rules for the script tree.
16+
17+
## Structure Rules To Finalize
18+
- `scripts/PS/`
19+
- general repo/operator scripts
20+
- game/template creation scripts
21+
- non-Codex, non-deploy shared operator utilities
22+
23+
- `scripts/PS/codex/`
24+
- Codex-only scripts
25+
- plan-switch / API-key / Codex workflow helpers
26+
- Codex-specific repo automation surfaces only
27+
28+
- `scripts/PS/deploy/`
29+
- deployment scripts
30+
- Docker web-server deployment preparation/update/cleanup
31+
- website/deployment-only script surfaces
32+
33+
## In Scope
34+
- finalize script folder ownership rules
35+
- update references after the recent move/rename work
36+
- normalize script naming patterns where touched
37+
- document the intended script tree and operator expectations
38+
- add focused validation that script locations match their responsibilities
39+
- ensure no general script remains stranded in the Codex folder
40+
- ensure deployment scripts remain under `scripts/PS/deploy/`
41+
42+
## Out of Scope
43+
- no engine changes
44+
- no gameplay/runtime feature changes
45+
- no tool UI work
46+
- no broad deployment feature expansion
47+
- no unrelated repo cleanup
48+
49+
## Required Checks
50+
- general template/game creation script lives in `scripts/PS/`
51+
- Codex-only scripts live in `scripts/PS/codex/`
52+
- deployment scripts live in `scripts/PS/deploy/`
53+
- references/docs/scripts point to the updated paths
54+
- naming reflects real purpose rather than old history
55+
56+
## Roadmap Instruction
57+
Update roadmap status only where this PR clearly advances tracked work.
58+
Do not change roadmap prose except for previously approved roadmap additions already in flight.
59+
60+
## Acceptance Criteria
61+
- script tree roles are finalized and documented
62+
- misplaced scripts are corrected where touched
63+
- script references are updated consistently
64+
- naming is purpose-driven
65+
- focused checks pass
66+
- roadmap receives status-only updates where applicable
67+
68+
## Deliverables
69+
Return a repo-structured ZIP at:
70+
`<project folder>/tmp/BUILD_PR_LEVEL_09_23_SCRIPT_STRUCTURE_FINALIZATION.zip`
71+
72+
Include:
73+
- docs/pr/BUILD_PR_LEVEL_09_23_SCRIPT_STRUCTURE_FINALIZATION.md
74+
- docs/dev/codex_commands.md
75+
- docs/dev/commit_comment.txt
76+
- docs/dev/next_command.txt
77+
- docs/dev/reports/change_summary.txt
78+
- docs/dev/reports/validation_checklist.txt
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ $projectManifest = [ordered]@{
278278
}
279279
workspace = [ordered]@{
280280
lastOpenTool = "sprite-editor"
281-
notes = "Generated by scripts/PS/New-TemplateGame.ps1"
281+
notes = "Generated by scripts/PS/New-Game-from-Template.ps1"
282282
}
283283
migration = [ordered]@{
284284
applied = @()

0 commit comments

Comments
 (0)