|
| 1 | +# RULES OF ENGAGEMENT |
| 2 | + |
| 3 | +## 1. Workflow (MANDATORY) |
| 4 | +Always follow: |
| 5 | + |
| 6 | +PLAN_PR → BUILD_PR → APPLY_PR |
| 7 | + |
| 8 | +- Do not skip steps |
| 9 | +- One PR per purpose |
| 10 | +- Docs-first unless explicitly BUILD/APPLY |
| 11 | + |
| 12 | +--- |
| 13 | + |
| 14 | +## 2. Responsibilities |
| 15 | + |
| 16 | +### ChatGPT |
| 17 | +- Designs, plans, and produces PR bundles (ZIP) |
| 18 | +- NEVER writes implementation code unless explicitly asked |
| 19 | +- Focuses on architecture, structure, and correctness |
| 20 | + |
| 21 | +### Codex |
| 22 | +- Writes ALL implementation code |
| 23 | +- Executes BUILD_PR and APPLY_PR |
| 24 | +- Modifies repo files |
| 25 | + |
| 26 | +--- |
| 27 | + |
| 28 | +## 3. Repo Constraints |
| 29 | + |
| 30 | +- No engine core changes unless explicitly approved |
| 31 | +- Prefer sample-level integration |
| 32 | +- Avoid tight coupling between engine and tools |
| 33 | +- Normalize toward GameBase-style architecture |
| 34 | + |
| 35 | +--- |
| 36 | + |
| 37 | +## 4. File & Output Rules |
| 38 | + |
| 39 | +- All PR outputs must be packaged as ZIP |
| 40 | +- Output path: |
| 41 | + <project>/tmp/<ZIP_NAME>.zip |
| 42 | + |
| 43 | +- ZIP must: |
| 44 | + - Preserve repo-relative structure |
| 45 | + - Include ONLY files relevant to the PR |
| 46 | + - Contain NO build artifacts or unrelated files |
| 47 | + |
| 48 | +--- |
| 49 | + |
| 50 | +## 5. Documentation Rules |
| 51 | + |
| 52 | +- PR docs → docs/pr/ |
| 53 | +- Dev commands → docs/dev/codex_commands.md |
| 54 | +- Commit comment → docs/dev/commit_comment.txt (NO HEADER) |
| 55 | +- Reports → docs/dev/reports/ |
| 56 | + |
| 57 | +--- |
| 58 | + |
| 59 | +## 6. Architecture Principles |
| 60 | + |
| 61 | +- Tools → Contracts → Runtime → Debug → Visual |
| 62 | +- Clear separation of concerns |
| 63 | +- No duplication of runtime logic |
| 64 | +- Reuse existing systems before creating new ones |
| 65 | + |
| 66 | +--- |
| 67 | + |
| 68 | +## 7. Debug System Rules |
| 69 | + |
| 70 | +- Debug features must be: |
| 71 | + - isolated |
| 72 | + - toggleable |
| 73 | + - non-invasive |
| 74 | + |
| 75 | +- Input must not conflict with browser or gameplay |
| 76 | +- Debug UI must render AFTER gameplay |
| 77 | + |
| 78 | +--- |
| 79 | + |
| 80 | +## 8. Codex Execution Rules |
| 81 | + |
| 82 | +All Codex commands must include: |
| 83 | + |
| 84 | +MODEL: GPT-5.x-codex |
| 85 | +REASONING: high |
| 86 | + |
| 87 | +Must specify: |
| 88 | +- files to create/update |
| 89 | +- constraints |
| 90 | +- packaging path |
| 91 | + |
| 92 | +--- |
| 93 | + |
| 94 | +## 9. Quality Bar |
| 95 | + |
| 96 | +Every PR must: |
| 97 | +- be minimal and surgical |
| 98 | +- avoid breaking runtime |
| 99 | +- avoid duplication |
| 100 | +- be easy to validate |
| 101 | + |
| 102 | +--- |
| 103 | + |
| 104 | +## 10. Session Continuity |
| 105 | + |
| 106 | +Always use: |
| 107 | +- SESSION_CONTEXT.md |
| 108 | +- CURRENT_STATE.md |
| 109 | +- NEXT_STEPS.md |
| 110 | +- RULES_OF_ENGAGEMENT.md |
| 111 | + |
| 112 | +to resume work |
0 commit comments