Skip to content

Commit bc95b44

Browse files
author
DavidQ
committed
Moves and renames template game script out of codex folder, aligns script structure and naming clarity.
BUILD_PR_LEVEL_09_22_DEPLOYMENT_PIPELINE_INTEGRATION
1 parent 905b696 commit bc95b44

9 files changed

Lines changed: 66 additions & 53 deletions

docs/dev/CODEX_COMMANDS.md

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

44
COMMAND:
5-
- enforce scripts/PS/deploy/ for deployment scripts
6-
- enforce scripts/PS/codex/ for codex scripts
7-
- add validation and safety checks to all scripts
8-
- add dry-run capability
9-
- ensure docker deployment compatibility
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
1013
- enforce commit format:
11-
description starts first line
14+
description first line
1215
PR name last line
13-
- update roadmap status only (no text changes except approved additions)
16+
- update roadmap status only

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/codex/New-CodexTemplateGame.ps1` to create a new game scaffold from `games/_template` with the standardized asset/data and tool-project contract.
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.
44

55
## Script
6-
- `scripts/PS/codex/New-CodexTemplateGame.ps1`
6+
- `scripts/PS/New-TemplateGame.ps1`
77

88
## Example
99
```powershell
10-
.\scripts\PS\codex\New-CodexTemplateGame.ps1 -GameId "my-new-game" -DisplayName "My New Game" -Apply
10+
.\scripts\PS\New-TemplateGame.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-
Adds script safety hardening across Codex/deploy PowerShell automation by enforcing `scripts/PS/deploy/` for deployment scripts, `scripts/PS/codex/` for codex scripts, dry-run-first behavior, input/path validation, and Docker-compatible staging artifacts.
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.
22

3-
BUILD_PR_LEVEL_09_21_SCRIPT_VALIDATION_AND_SAFETY
3+
BUILD_PR_LEVEL_09_22_DEPLOYMENT_PIPELINE_INTEGRATION

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_22_DEPLOYMENT_PIPELINE_INTEGRATION
1+
BUILD_PR_LEVEL_09_23_SCRIPT_STRUCTURE_FINALIZATION
Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,13 @@
11
Summary
2-
- Enforced script boundaries:
3-
- deployment scripts now live under `scripts/PS/deploy/`
4-
- codex scripts remain under `scripts/PS/codex/`
5-
- Added deployment safety/validation helpers in `scripts/PS/deploy/WebsiteRepoDeploymentCommon.ps1`.
6-
- Added/updated deployment scripts with dry-run and apply guards:
7-
- `scripts/PS/deploy/Prep-WebsiteRepoDeployment.ps1`
8-
- `scripts/PS/deploy/Update-WebsiteRepoDeployment.ps1`
9-
- `scripts/PS/deploy/Clean-WebsiteRepoDeployment.ps1`
10-
- Removed deployment script duplicates from `scripts/PS/codex/`:
11-
- `Prep-WebsiteRepoDeployment.ps1`
12-
- `Update-WebsiteRepoDeployment.ps1`
13-
- `Clean-WebsiteRepoDeployment.ps1`
14-
- `WebsiteRepoDeploymentCommon.ps1`
15-
- Added Docker deployment compatibility artifacts to deploy flow (`Dockerfile`, `docker-compose.yml`, `.dockerignore` in staging root).
16-
- Hardened codex scripts with dry-run and validation where applicable:
17-
- `Switch-CodexPlanMode.ps1`
18-
- `Set-CodexApiKey.ps1`
19-
- `Validate-CodexApiKey.ps1`
20-
- `Get-CodexOperatorState.ps1`
21-
- `New-CodexTemplateGame.ps1`
22-
- Updated docs for new deploy path and script guardrails:
23-
- `docs/dev/CODEX_WEBSITE_REPO_DEPLOYMENT_SCRIPTING.md`
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:
248
- `docs/dev/CODEX_TEMPLATE_GAME_CREATION_SCRIPTING.md`
25-
- `docs/dev/CODEX_PLAN_AND_API_KEY_SCRIPTING.md`
9+
- Preserved script folder structure:
10+
- `scripts/PS/` (general)
11+
- `scripts/PS/codex/` (codex)
12+
- `scripts/PS/deploy/` (deployment)
2613
- Updated roadmap with status-only bracket change.
Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
Validation Checklist - BUILD_PR_LEVEL_09_21_SCRIPT_VALIDATION_AND_SAFETY
1+
Validation Checklist - BUILD_PR_LEVEL_09_22_DEPLOYMENT_PIPELINE_INTEGRATION
22

3-
[x] deployment scripts moved/enforced to `scripts/PS/deploy/`
4-
[x] codex scripts remain/enforced under `scripts/PS/codex/`
5-
[x] validation and safety checks added to touched codex/deploy scripts
6-
[x] dry-run capability added to touched codex/deploy scripts
7-
[x] deploy flow writes Docker-compatible artifacts in staging
8-
[x] focused PowerShell parse checks pass on touched scripts
9-
[x] focused dry-run/apply smoke checks pass for deploy scripts
10-
[x] focused dry-run/apply smoke checks pass for touched codex scripts
11-
[x] roadmap updated with status-only bracket changes
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
1210
[x] commit format enforced: description first line, PR name last line

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+
- [.] naming policy documented
581581

582582
---
583583

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# BUILD_PR — LEVEL 09_22 — DEPLOYMENT PIPELINE INTEGRATION
2+
3+
## Objective
4+
Integrate deployment scripting and correct script organization, including relocating and renaming miscategorized scripts.
5+
6+
## Key Updates
7+
- Move `New-CodexTemplateGame.ps1` from `scripts/PS/codex/` to `scripts/PS/`
8+
- Rename script to reflect actual purpose (template game creation, not codex-specific)
9+
- Maintain:
10+
- scripts/PS/codex/ → codex-only scripts
11+
- scripts/PS/deploy/ → deployment scripts
12+
- scripts/PS/ → general scripts
13+
14+
## Scope
15+
- correct script placement
16+
- enforce naming clarity
17+
- align with repo script structure conventions
18+
19+
## Out of Scope
20+
- no runtime changes
21+
- no tool UI changes
22+
23+
## Roadmap Instruction
24+
- Update roadmap status only
25+
- Maintain previously added roadmap items

scripts/PS/codex/New-CodexTemplateGame.ps1 renamed to scripts/PS/New-TemplateGame.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ param(
1212
Set-StrictMode -Version Latest
1313
$ErrorActionPreference = "Stop"
1414

15-
function Get-CodexRepoRoot {
16-
return [System.IO.Path]::GetFullPath((Join-Path $PSScriptRoot "..\..\.."))
15+
function Get-ScriptRepoRoot {
16+
return [System.IO.Path]::GetFullPath((Join-Path $PSScriptRoot "..\.."))
1717
}
1818

19-
function ConvertTo-CodexSlug {
19+
function ConvertTo-TemplateSlug {
2020
param(
2121
[string]$Value,
2222
[string]$Fallback
@@ -117,8 +117,8 @@ function New-ToolIntegrationEntry {
117117
}
118118
}
119119

120-
$repoRoot = Get-CodexRepoRoot
121-
$normalizedGameId = ConvertTo-CodexSlug -Value $GameId -Fallback "new-game"
120+
$repoRoot = Get-ScriptRepoRoot
121+
$normalizedGameId = ConvertTo-TemplateSlug -Value $GameId -Fallback "new-game"
122122

123123
if ($Apply.IsPresent -and $DryRun.IsPresent) {
124124
throw "Use either -Apply or -DryRun, not both."
@@ -278,7 +278,7 @@ $projectManifest = [ordered]@{
278278
}
279279
workspace = [ordered]@{
280280
lastOpenTool = "sprite-editor"
281-
notes = "Generated by scripts/PS/codex/New-CodexTemplateGame.ps1"
281+
notes = "Generated by scripts/PS/New-TemplateGame.ps1"
282282
}
283283
migration = [ordered]@{
284284
applied = @()

0 commit comments

Comments
 (0)