Skip to content

Commit 6f67e76

Browse files
author
DavidQ
committed
Update codex start of day files
1 parent 2c992b8 commit 6f67e76

6 files changed

Lines changed: 55 additions & 8 deletions

File tree

docs/dev/start_of_day/codex/BUILD_EXECUTION_CHECKLIST.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,19 @@ Before writing code:
77
- Are roadmap edits limited to bracket states only?
88
- Are start_of_day files untouched?
99
- Am I limiting reads to target files and immediate dependencies only?
10+
- On Windows, am I using Node.js or Python for path/rename/ZIP work unless PowerShell is explicitly required?
11+
- If PowerShell is required, am I using `Join-Path` or `[System.IO.Path]::Combine(...)` instead of interpolation?
1012

1113
Before finishing:
1214
- Did I keep scope tight?
1315
- Did I avoid unrelated refactors?
1416
- Did I avoid opportunistic cleanup outside scope?
1517
- Did I run only the requested validation or proof?
1618
- Did I package a repo-structured delta ZIP under `<project folder>/tmp/`?
17-
- Do not stage ZIP files in `<project folder>/tmp/`
19+
- Did I verify the ZIP exists at the exact requested path?
20+
- Did I avoid staging ZIP files in `<project folder>/tmp/`?
1821
- Did I clearly report what changed?
22+
- Did I avoid silent retries after parse or shell errors?
1923

2024
## Enforcement
2125
If any precondition fails:
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CODEx COMMAND CORRECTIONS SUMMARY
2+
3+
Main fixes:
4+
- Prefer Node.js or Python over PowerShell for Windows path/rename/ZIP tasks
5+
- Ban PowerShell string interpolation for path construction
6+
- Require exact ZIP output path under <project folder>/tmp/
7+
- Treat missing ZIP output as task failure
8+
- Stop and report on parse errors instead of silently retrying

docs/dev/start_of_day/codex/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,9 @@ Codex may not create, modify, rename, delete, replace, or add any file in:
1616
- `docs/dev/start_of_day/codex/`
1717

1818
unless the user explicitly asks for a change to those directories.
19+
20+
## Windows Execution Preference
21+
On Windows machines:
22+
- prefer Node.js or Python for file operations, renames, path normalization, and ZIP-related scripting
23+
- avoid PowerShell for path-building or rename-heavy work unless PowerShell is explicitly required by the BUILD doc
24+
- when PowerShell is required, follow the PowerShell Safety Rules in `RULES.md`

docs/dev/start_of_day/codex/RULES.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,13 @@ Do not:
3333
- chase speculative improvements
3434

3535
## ZIP Output Rule
36-
Codex should always package code/output ZIP files under:
36+
Codex must package code/output ZIP files under:
3737
- `<project folder>/tmp/`
3838

3939
Codex must not stage or commit ZIP files from `<project folder>/tmp/`.
4040

41+
A BUILD task is not complete until the required ZIP exists at the exact requested path.
42+
4143
## Scope Rule
4244
- one PR purpose only
4345
- no unrelated edits
@@ -78,7 +80,28 @@ Codex must report:
7880
- whether engine-core was untouched if expected
7981
- the ZIP output path under `<project folder>/tmp/`
8082

81-
83+
## Windows Command Rule
84+
On Windows machines:
85+
- prefer Node.js or Python for file operations, directory normalization, renames, and packaging
86+
- do not use PowerShell string interpolation for path construction
87+
- do not use quoted variable interpolation such as `"$var/path"`, `"$base\$child"`, `"${var}/path"`, or nested interpolation for rename-heavy tasks
88+
- use `path.join(...)` / `path.resolve(...)` in Node.js or `pathlib.Path` / `os.path.join(...)` in Python
89+
- use PowerShell only when the BUILD doc explicitly requires it or when no safer runtime is available
90+
91+
## PowerShell Safety Rules
92+
If PowerShell is required:
93+
- do not build paths with string interpolation
94+
- use `Join-Path` or `[System.IO.Path]::Combine(...)`
95+
- stop immediately on parse errors
96+
- do not silently retry with rewritten commands
97+
- report the exact failing command shape and the safer replacement
98+
99+
## Execution Output Rule
100+
Every BUILD execution command must state:
101+
- exact target files or directories
102+
- exact validation to run
103+
- exact ZIP output path under `<project folder>/tmp/`
104+
- exact failure conditions
82105

83106
## 🚫 TESTABILITY GATE (NEW — REQUIRED)
84107

@@ -102,4 +125,3 @@ DO NOT EXECUTE:
102125
Instead:
103126
- Expand the BUILD scope to a vertical slice
104127
- Or request a corrected BUILD PR with sufficient scope
105-

docs/dev/start_of_day/codex/STOP_AND_REPORT.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ Stop and report instead of improvising if:
1111
- the BUILD asks for broad repo analysis without exact targets
1212
- the BUILD mixes multiple objectives
1313
- the BUILD uses vague language such as "clean up", "improve", or "modernize" without exact scope
14+
- a Windows shell or PowerShell parse error occurs before execution
15+
- the exact ZIP output path under `<project folder>/tmp/` is missing from the BUILD execution command
16+
- the required ZIP cannot be produced at the requested path
1417

1518
Preferred behavior:
1619
- stop
1720
- explain exactly what is blocking execution
1821
- do not expand scope on your own
22+
- do not silently rerun with a rewritten shell command
23+
- report the safer command/runtime to use next

docs/dev/start_of_day/codex/WORKFLOW.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
3. Read the current BUILD doc.
77
4. Implement only that BUILD scope.
88
5. Stop immediately if the BUILD doc fails the execution threshold.
9+
6. Prefer Node.js or Python over PowerShell on Windows for path, rename, and ZIP tasks.
910

1011
## During Work
1112
- open target files first
@@ -15,23 +16,25 @@
1516
- preserve project-specific ownership
1617
- avoid speculative expansion
1718
- avoid opportunistic cleanup/refactor
19+
- for Windows path work, use explicit path APIs rather than interpolated shell strings
20+
- if the BUILD requires PowerShell, use `Join-Path` or `[System.IO.Path]::Combine(...)`
1821

1922
## When Finished
2023
1. run required validation
2124
2. report exact files changed
2225
3. report validation results
2326
4. package a repo-structured delta ZIP under `<project folder>/tmp/`
2427
5. do not stage ZIP files from `<project folder>/tmp/`
25-
6. stop after BUILD output is complete
28+
6. confirm the ZIP exists at the exact requested path
29+
7. stop after BUILD output is complete
2630

2731
## Do Not
2832
- generate APPLY instructions unless explicitly requested
2933
- redo planning
3034
- modify roadmap wording
3135
- touch start_of_day files
3236
- continue after a failed execution threshold
33-
34-
37+
- silently rerun after a PowerShell parse error
3538

3639
## ✅ BUILD PR Quality Requirement (TESTABILITY)
3740

@@ -45,4 +48,3 @@ Avoid:
4548

4649
Rule of thumb:
4750
If it cannot be executed or meaningfully validated, it is not a valid BUILD.
48-

0 commit comments

Comments
 (0)