Skip to content

Commit 1177117

Browse files
author
DavidQ
committed
final optimization layer
1 parent be50a8f commit 1177117

21 files changed

Lines changed: 216 additions & 297 deletions

.codex/README_AUTOMATION.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Codex Automation Layout
2+
3+
Codex already auto-loads AGENTS.md from the repo root.
4+
5+
Use this folder for project-local Codex helpers:
6+
- skills/ for reusable workflows that should load only when invoked
7+
- optional project config later if needed
8+
9+
Recommended usage:
10+
1. Keep AGENTS.md at repo root
11+
2. Keep start_of_day lightweight
12+
3. Use the repo-build skill when you want Codex to execute a BUILD with packaging

.codex/skills/repo-build/SKILL.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: repo-build
3+
description: Use when executing a single BUILD_PR in this repository that must stay surgically scoped, validate exactly what the BUILD asks, and package a repo-structured delta ZIP under <project folder>/tmp/.
4+
---
5+
6+
Follow this workflow:
7+
8+
1. Read the active BUILD_PR document first.
9+
2. Confirm the PR purpose is singular.
10+
3. Read only exact target files and immediate dependencies.
11+
4. Implement only the approved BUILD scope.
12+
5. Run only the requested validation.
13+
6. Report exact files changed, exact validation performed, and exact ZIP path.
14+
7. Package a repo-structured delta ZIP under <project folder>/tmp/.
15+
8. Stop after BUILD output is complete.
16+
17+
Fail fast if:
18+
- the BUILD doc is vague
19+
- target files are missing or contradictory
20+
- the request expands beyond one PR purpose
21+
- the exact ZIP path is missing
22+
- the result would not be testable

AGENTS.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,31 @@
22

33
## Workflow
44
- PLAN -> BUILD -> APPLY
5-
- Docs-first unless the active task is BUILD or APPLY
6-
- One PR per purpose
7-
- Smallest scoped valid change only
5+
- BUILD is the normal Codex phase
6+
- One PR purpose only
7+
- Smallest scoped valid implementation only
88

99
## Repo Rules
10-
- Codex writes code
11-
- No engine core changes unless the task explicitly requires it
12-
- Sample-level integration only unless the task explicitly requires broader scope
13-
- Read target files first
14-
- Avoid repo-wide scanning unless exact targets require it
15-
- No speculative exploration
10+
- Follow the BUILD doc as source of truth
11+
- Read exact target files first
12+
- Avoid repo-wide scans unless exact targets require them
1613
- Stop and report on ambiguity
14+
- Do not modify engine core unless explicitly in scope
15+
- Do not modify start_of_day folders unless explicitly requested
1716

18-
## Packaging
19-
- Package results to <project folder>/tmp/*.zip
20-
- Preserve exact repo-relative structure inside the ZIP
21-
- Include only files relevant to the PR
22-
- Do not include unrelated files, full-repo copies, dependencies, or build artifacts
17+
## Windows Execution
18+
- Prefer Node.js or Python for file operations, rename work, path handling, and ZIP work
19+
- Avoid PowerShell for path-heavy work unless explicitly required
20+
- If PowerShell is required, use Join-Path or [System.IO.Path]::Combine(...)
2321

24-
## BUILD Expectations
25-
- Exact file targets only
26-
- Explicit validation commands
27-
- No unrelated changes
28-
- No retry without a corrected spec
22+
## Packaging
23+
- Every BUILD must produce a repo-structured delta ZIP
24+
- ZIP output path: <project folder>/tmp/<TASK_NAME>_delta.zip
25+
- Do not stage ZIP files from <project folder>/tmp/
2926

30-
## Architecture
31-
TOOLS -> CONTRACT -> RUNTIME -> DEBUG -> VISUAL
27+
## BUILD Quality
28+
- Exact targets required
29+
- Exact validation required
30+
- No vague wording
31+
- No unrelated cleanup
32+
- Prefer testable vertical slices
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Final Optimization Layer
2+
3+
## What changed
4+
5+
You now use:
6+
- ultra-compact BUILD_PR docs
7+
- one-line Codex command
8+
9+
## BUILD_PR rules
10+
- max ~10 lines
11+
- no repetition
12+
- only exact files + changes + validation
13+
14+
## Codex command
15+
- 1–3 lines only
16+
- no repeated rules (AGENTS.md handles them)
17+
18+
## Result
19+
- minimum tokens
20+
- fastest Codex runs
21+
- lowest failure rate

docs/dev/FULL_AUTOMATION_NOTES.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Full Automation Notes
2+
3+
This setup automates the repeated instruction load by splitting responsibility:
4+
5+
- AGENTS.md = auto-loaded durable repo guidance
6+
- .codex/skills/repo-build/SKILL.md = reusable BUILD execution workflow loaded when invoked
7+
- start_of_day/codex/CODEX_CORE.md = tiny daily reminder only
8+
- CODEX_AUTO_COMMAND.md = minimal trigger command
9+
10+
Daily flow:
11+
1. Load CODEX_CORE.md and EXECUTION_GATE.md
12+
2. Run the minimal command from docs/dev/templates/CODEX_AUTO_COMMAND.md
13+
3. Point Codex at PLAN_PR + BUILD_PR
14+
4. Codex uses AGENTS.md and repo-build skill to stay on rails

docs/dev/PROJECT_INSTRUCTIONS.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# PROJECT INSTRUCTIONS
2+
3+
You are working in a docs-first repo workflow.
4+
5+
Workflow:
6+
PLAN_PR → BUILD_PR → APPLY_PR
7+
8+
Rules:
9+
- One PR purpose only
10+
- Smallest scoped valid change
11+
- BUILD must be one-pass executable
12+
- No vague wording
13+
- No repo-wide scanning unless required
14+
15+
Responsibilities:
16+
- ChatGPT: create plans, PR docs, and ZIP bundles
17+
- Codex: writes implementation code
18+
- User: runs Codex + validates
19+
20+
Output rules:
21+
- Always produce repo-structured ZIPs
22+
- Place ZIPs under <project folder>/tmp/
23+
- Preserve exact repo structure inside ZIP
24+
25+
Do not:
26+
- Write implementation code unless explicitly asked
27+
- Expand scope beyond the PR
28+
- Modify start_of_day folders unless requested
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./docs/dev/PROJECT_INSTRUCTIONS

docs/dev/start_of_day/codex/BUILD_EXECUTION_CHECKLIST.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

docs/dev/start_of_day/codex/CHANGES_SUMMARY.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Codex SOD Cleanup Instructions
2+
3+
## KEEP (load daily)
4+
- CODEX_CORE.md
5+
- EXECUTION_GATE.md
6+
- USAGE_REMINDER.md (optional)
7+
8+
## DELETE or stop loading daily
9+
- RULES.md
10+
- WORKFLOW.md
11+
- BUILD_EXECUTION_CHECKLIST.md
12+
- STOP_AND_REPORT.md
13+
- README.md (codex SOD version)
14+
- CHANGES_SUMMARY.txt
15+
16+
## KEEP in repo, but do not paste daily
17+
- AGENTS.md
18+
- .codex/skills/repo-build/SKILL.md
19+
20+
## Result
21+
Daily Codex startup becomes 2-3 small files instead of a larger repeated bundle.

0 commit comments

Comments
 (0)