Skip to content

Commit be50a8f

Browse files
author
DavidQ
committed
optimization layer
1 parent 3e9e064 commit be50a8f

15 files changed

Lines changed: 261 additions & 45 deletions

AGENTS.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# AGENTS.md
2+
3+
## Workflow
4+
- 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
8+
9+
## 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
16+
- Stop and report on ambiguity
17+
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
23+
24+
## BUILD Expectations
25+
- Exact file targets only
26+
- Explicit validation commands
27+
- No unrelated changes
28+
- No retry without a corrected spec
29+
30+
## Architecture
31+
TOOLS -> CONTRACT -> RUNTIME -> DEBUG -> VISUAL

docs/dev/CODEX_COMMANDS.md

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,23 @@
11
MODEL: GPT-5.3-codex
22
REASONING: high
33

4-
COMMAND:
5-
Create APPLY_PR_LEVEL_11_1_AUTHORITATIVE_STATE_HANDOFF_CANDIDATE closeout.
4+
TASK:
5+
<PLAN_PR | BUILD_PR | APPLY_PR name>
66

7-
INPUT:
8-
Use the applied repo state (post BUILD delta ZIP).
7+
INPUTS:
8+
- docs/pr/<primary task doc>.md
9+
- docs/pr/<supporting task doc>.md
910

10-
REQUIREMENTS:
11-
- Summarize implemented changes
12-
- Confirm validation commands and results
13-
- Confirm scope adherence (only intended files modified)
14-
- Identify any risks or follow-ups
11+
EXECUTION:
12+
- Follow the referenced PR doc(s) as source of truth
13+
- Read exact target files first
14+
- Keep scope surgical
15+
- Stop and report on ambiguity
16+
- Do not change engine core unless the task explicitly requires it
1517

16-
CONSTRAINTS:
17-
- NO code changes
18-
- Docs/reporting only
19-
- No repo refactoring
20-
21-
OUTPUT (CRITICAL):
22-
- Provide ONE download ZIP (delta only)
23-
- Repo-structured
24-
- Only docs/dev changes
25-
26-
INCLUDE:
27-
- docs/pr/APPLY_PR_LEVEL_11_1_AUTHORITATIVE_STATE_HANDOFF_CANDIDATE.md
28-
- docs/dev/commit_comment.txt
29-
- docs/dev/next_command.txt
30-
- docs/dev/reports/change_summary.txt
31-
- docs/dev/reports/validation_checklist.txt
18+
FINAL STEP:
19+
- Package all created and modified files into a repo-structured delta ZIP
20+
- Write the ZIP to: <project folder>/tmp/<TASK_NAME>_delta.zip
21+
- Preserve exact repo-relative structure inside the ZIP
22+
- Include only files relevant to this PR
23+
- Do not include unrelated files, full-repo copies, dependencies, or build artifacts
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Token Optimization Notes
2+
3+
## Why this change
4+
The old command file embeds a long task-specific command directly in docs/dev/codex_commands.md.
5+
Move stable rules to AGENTS.md and keep codex_commands.md task-light.
6+
7+
## New usage
8+
1. Keep AGENTS.md at repo root
9+
2. Use docs/dev/codex_commands.md as the active lightweight command shell
10+
3. Use docs/pr/templates/PLAN_PR_COMPACT_TEMPLATE.md for new PLAN docs
11+
4. Only add short session notes when truly needed
12+
13+
## Avoid repeating
14+
- architecture overview
15+
- workflow philosophy
16+
- packaging rules
17+
- repo-wide caution language
18+
- large current-state summaries
Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
1-
# Session Validation Gate
1+
# Validation Gate (Minimal)
22

3-
Use this as the single pre-delivery gate.
3+
- Single PR purpose?
4+
- Exact files listed?
5+
- Exact validation listed?
6+
- No vague language?
7+
- Correct PLAN / BUILD / APPLY type?
8+
- ZIP ready?
49

5-
- Is this a PLAN, BUILD, APPLY, or combined PLAN + BUILD + APPLY bundle?
6-
- Does the bundle match only one PR purpose?
7-
- If BUILD: is it specific enough that Codex does not need to guess?
8-
- If BUILD: is this scope as small as possible?
9-
- If BUILD: does it avoid vague repo-wide scan/refactor language?
10-
- If BUILD retry: did I identify the exact prior failure and narrow the next BUILD?
11-
- If APPLY: did I remove any Codex command?
12-
- Are roadmap files preserved with bracket-only changes?
13-
- Did I avoid fake claims about code being written?
14-
- Did I avoid touching start_of_day directories without explicit permission?
15-
- Is the ZIP repo-structured and commit-ready or execution-ready?
16-
17-
## Rule
18-
If any answer is "no":
19-
- stop the bundle
20-
- do not mark it ready
21-
- do not send it to Codex
22-
- fix the violation first
10+
If ANY = no → STOP
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# SOD CORE (Token-Optimized)
2+
3+
## Workflow
4+
- PLAN → BUILD → APPLY
5+
- One PR purpose only
6+
- BUILD must be one-pass executable
7+
8+
## Roles
9+
- ChatGPT: docs + bundles
10+
- Codex: code
11+
- User: validate + commit
12+
13+
## BUILD Rules
14+
- exact file targets required
15+
- exact validation required
16+
- no repo-wide scan
17+
- no vague wording
18+
- stop on ambiguity
19+
20+
## APPLY Rules
21+
- docs only
22+
- no Codex command
23+
24+
## ZIP Rule
25+
- always output repo-structured ZIP
26+
- path: <project>/tmp/
27+
28+
## Fail Fast
29+
If unclear or vague → STOP and fix before BUILD
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Usage Reminder
2+
3+
- Do NOT paste large context
4+
- Do NOT repeat rules (AGENTS.md handles this)
5+
- Keep commands small
6+
- Use templates from docs/dev/templates/
File renamed without changes.
File renamed without changes.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# SOD Cleanup Instructions
2+
3+
## KEEP (load daily)
4+
- SOD_CORE.md
5+
- SESSION_VALIDATION_GATE.md
6+
- USAGE_REMINDER.md (optional)
7+
8+
## DELETE (or stop loading)
9+
- RULES.md
10+
- WORKFLOW.md
11+
- README.md (SOD version)
12+
- any large duplicated context files
13+
14+
## DO NOT TOUCH
15+
- docs/dev/start_of_day/codex/ (protected)
16+
17+
## RESULT
18+
You should only load 2–3 small files instead of 5–7 large ones.
File renamed without changes.

0 commit comments

Comments
 (0)