|
| 1 | +# BUILD_PR — LEVEL 09_18 — CODEX PLAN SWITCH AND API KEY SCRIPTING |
| 2 | + |
| 3 | +## Objective |
| 4 | +Create the next surgical scripting PR for repo operations by introducing scripts that switch between Pay-as-you-go and Codex plan modes, plus scripts that accept an API key, store it appropriately for local repo workflows, and validate it safely. |
| 5 | + |
| 6 | +This PR also updates the roadmap to add the newly requested future scripting and asset-conversion lanes. |
| 7 | + |
| 8 | +## Why This PR Exists |
| 9 | +The current asset/tooling lane is far enough along to justify a small repo-automation scripting lane. |
| 10 | + |
| 11 | +The immediate need is operational: |
| 12 | +- switch between Pay-as-you-go and Codex plan modes |
| 13 | +- provide a repeatable API key input path |
| 14 | +- validate the configured API key before use |
| 15 | + |
| 16 | +These scripts should reduce operator friction and make repo setup safer and more repeatable. |
| 17 | + |
| 18 | +## In Scope |
| 19 | +- add PowerShell scripts for switching between Pay-as-you-go and Codex plan modes |
| 20 | +- add PowerShell script(s) to input/configure API key material for local workflow use |
| 21 | +- add PowerShell script(s) to validate the configured API key safely |
| 22 | +- document expected local usage, inputs, outputs, and guardrails |
| 23 | +- keep scripts local-repo/operator focused |
| 24 | +- add focused validation or smoke checks for script behavior where practical |
| 25 | + |
| 26 | +## Out of Scope |
| 27 | +- no engine changes |
| 28 | +- no gameplay/runtime changes |
| 29 | +- no broad deployment automation |
| 30 | +- no website publishing automation in this PR |
| 31 | +- no game/template asset conversion automation in this PR |
| 32 | +- no destructive repo cleanup scripts in this PR unless explicitly required for the selected scripting slice |
| 33 | + |
| 34 | +## Required Script Behavior |
| 35 | +### 1. Plan Mode Switching |
| 36 | +Provide a clear script surface that can switch the repo workflow between: |
| 37 | +- Pay-as-you-go mode |
| 38 | +- Codex plan mode |
| 39 | + |
| 40 | +The implementation should make the active mode explicit and easy to inspect. |
| 41 | + |
| 42 | +### 2. API Key Input / Update |
| 43 | +Provide a safe local script path to: |
| 44 | +- accept or set the API key |
| 45 | +- store/configure it in the intended local repo workflow location |
| 46 | +- avoid noisy manual editing steps |
| 47 | + |
| 48 | +### 3. API Key Validation |
| 49 | +Provide a validation script that: |
| 50 | +- checks whether key/config state is present |
| 51 | +- validates format/basic readiness |
| 52 | +- performs safe validation logic appropriate to the repo workflow |
| 53 | +- reports actionable success/failure output |
| 54 | + |
| 55 | +## Preferred Implementation Style |
| 56 | +- PowerShell first, to reduce Codex token usage where possible |
| 57 | +- scripts placed in a clear repo-local scripts location |
| 58 | +- outputs and helper artifacts routed to the project folder in line with repo conventions |
| 59 | +- keep script naming obvious and operator-friendly |
| 60 | + |
| 61 | +## Roadmap Update Instruction |
| 62 | +This PR must update the roadmap in two ways: |
| 63 | + |
| 64 | +### A. Status updates |
| 65 | +Continue updating existing roadmap status where this PR clearly advances tracked work. |
| 66 | + |
| 67 | +### B. New roadmap items to add |
| 68 | +Add the following roadmap items as new tracked work. Keep wording tight and consistent with the existing roadmap style. |
| 69 | + |
| 70 | +1. Existing games asset folders should be updated so existing images / vectors / related runtime assets can be transformed into tool-editable `data/` objects, with corresponding project JSON updates. |
| 71 | +2. Add the ability for a PowerShell script to create a new game from template, including a project scaffold for the tools. |
| 72 | +3. Add scripts to prep / update / delete the repo so it can be placed on a website. |
| 73 | +4. Add scripts to switch between Pay-as-you-go and Codex plan modes, and scripts to input API key material and validate it. |
| 74 | + |
| 75 | +These roadmap additions are explicitly requested and are allowed text additions for this PR. |
| 76 | + |
| 77 | +## Validation Expectations |
| 78 | +At minimum: |
| 79 | +- touched PowerShell files parse cleanly |
| 80 | +- plan-switch behavior is testable/inspectable |
| 81 | +- API key input/update path is documented and deterministic |
| 82 | +- API key validation reports clear outcomes |
| 83 | +- no unrelated runtime/engine/tool UI work is introduced |
| 84 | + |
| 85 | +## Acceptance Criteria |
| 86 | +- repo contains a clear script path for plan switching |
| 87 | +- repo contains a clear script path for API key input/update |
| 88 | +- repo contains a clear script path for API key validation |
| 89 | +- focused checks/documentation are included |
| 90 | +- roadmap is updated with the requested new items plus any relevant status updates |
| 91 | +- PR remains small and purpose-specific |
| 92 | + |
| 93 | +## Deliverables |
| 94 | +Return a repo-structured ZIP at: |
| 95 | +`<project folder>/tmp/BUILD_PR_LEVEL_09_18_CODEX_PLAN_SWITCH_AND_API_KEY_SCRIPTING.zip` |
| 96 | + |
| 97 | +Include: |
| 98 | +- docs/pr/BUILD_PR_LEVEL_09_18_CODEX_PLAN_SWITCH_AND_API_KEY_SCRIPTING.md |
| 99 | +- docs/dev/codex_commands.md |
| 100 | +- docs/dev/commit_comment.txt |
| 101 | +- docs/dev/next_command.txt |
| 102 | +- docs/dev/reports/change_summary.txt |
| 103 | +- docs/dev/reports/validation_checklist.txt |
0 commit comments