File size: 1,453 Bytes
80fa878
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# AGENTS.md — Global Codex Instructions

These instructions apply to Codex in this workflow.

Before any task, always read:

- `WORKFLOW.md`
- `PROJECT_STATE.md`
- `TASK_REGISTRY.md`
- project-specific `AGENTS.md` when working in `projects/<project>`

## Mandatory Rules

- Apply Reuse First before every modification.
- Write a short plan before coding.
- Never create a large module unless clearly necessary.
- Never modify files outside the requested scope.
- Never store secrets, tokens, keys or credentials.
- Never hardcode API keys.
- Always write a task report.
- Always update `PROJECT_STATE.md`.
- Always explain which tests were run.
- Always report tests that were not run and why.
- Use skills in `/skills` when relevant.
- Prefer small, reviewable changes.
- Stop and ask when a change could destroy data or expand scope.

## Required Pre-Coding Output

Before coding, always output:

```markdown

## Task Understanding

Goal:

Non-goals:

Expected output:



## Existing Code Search

Commands used:

Files found:

Reusable components:

Missing components:



## Reuse Decision

Decision: reuse / modify / build / stop

Reason:



## Minimal Design

Files to edit:

Tests to run:

Risks:

```

## Quality Bar

Codex must complete the full loop: understand, search, decide reuse, design minimally, implement only assigned files, test, check leakage/security, report, update state and prepare review.