1+ # Startup Contract
2+
3+ Before performing ANY task, Codex must:
4+
5+ - Read ` dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS_VERSION.md ` .
6+ - Read the latest ` dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS.md ` from the repository.
7+ - Treat the repository copy as authoritative.
8+ - Discard previously remembered Project Instructions.
9+ - Load all referenced instruction documents required by this file and the task.
10+ - Validate canonical paths.
11+ - Validate branching model.
12+ - Validate ZIP and report locations.
13+
14+ Every Codex response must begin with:
15+
16+ ``` text
17+ Startup Validation
18+ ==================
19+
20+ Reading latest (v<version>) Project Instructions... PASS
21+
22+ Canonical paths
23+ ---------------
24+ Reports .......... dev/reports
25+ ZIPs ............. dev/workspace/zips
26+
27+ Branching model
28+ ---------------
29+ Owner ............ Independent PRs allowed
30+ Teams ............ Stacked PRs by default
31+
32+ Legacy path check
33+ -----------------
34+ tmp/ ............. PASS (not used)
35+ docs_build/ ...... PASS (not used)
36+
37+ Project Instructions loaded successfully.
38+ ```
39+
40+ If Codex cannot determine the current version or cannot validate canonical paths, it must STOP before performing any work.
41+
42+ Failure response example:
43+
44+ ``` text
45+ Startup Validation
46+ ==================
47+
48+ Unable to determine Project Instructions version.
49+
50+ STOP
51+
52+ Project Instructions were not successfully loaded.
53+ ```
54+
55+ This startup validation applies to every Codex task and outcome:
56+
57+ - PLAN
58+ - BUILD
59+ - APPLY
60+ - Review
61+ - Audit
62+ - Governance
63+ - Validation
64+ - Read-only
65+ - Hard stop
66+ - No-op
67+ - Partial completion
68+
169# Project Instructions
270
371## Purpose
@@ -41,23 +109,25 @@ Rules:
41109
42110## Current Version/Date
43111
44- - Project Instructions Version: 2026-06-28.PR_26172_OWNER_034
112+ - Project Instructions Version: 2026-06-28.PR_26179_OWNER_012
45113- Date: 2026-06-28
46114- Owner: OWNER
47115
48116## Required Read Order
49117
50- 1 . Always read ` dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS.md ` .
51- 2 . Always read ` dev/build/ProjectInstructions/PROJECT_STATE.md ` .
52- 3 . Always read ` dev/build/ProjectInstructions/repository/canonical_repository_structure.md ` .
53- 4 . For Codex workflow command interpretation, read ` dev/build/ProjectInstructions/standards/CODEX_WORKFLOW_COMMANDS.md ` .
54- 5 . For Start of Day, read ` dev/build/ProjectInstructions/bootstrap/codex_start_of_day_bootstrap.md ` .
55- 6 . Load team, backlog, database, runtime, theme, or other specialist documents only when the current task requires them.
118+ 1 . Always read ` dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS_VERSION.md ` .
119+ 2 . Always read ` dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS.md ` .
120+ 3 . Always read ` dev/build/ProjectInstructions/PROJECT_STATE.md ` .
121+ 4 . Always read ` dev/build/ProjectInstructions/repository/canonical_repository_structure.md ` .
122+ 5 . For Codex workflow command interpretation, read ` dev/build/ProjectInstructions/standards/CODEX_WORKFLOW_COMMANDS.md ` .
123+ 6 . For Start of Day, read ` dev/build/ProjectInstructions/bootstrap/codex_start_of_day_bootstrap.md ` .
124+ 7 . Load team, backlog, database, runtime, theme, or other specialist documents only when the current task requires them.
56125
57126## Load Graph
58127
59128``` text
60129PROJECT_INSTRUCTIONS.md
130+ |-- PROJECT_INSTRUCTIONS_VERSION.md
61131|-- PROJECT_STATE.md
62132|-- repository/canonical_repository_structure.md
63133|-- standards/CODEX_WORKFLOW_COMMANDS.md
@@ -76,6 +146,7 @@ PROJECT_INSTRUCTIONS.md
76146
77147## When-To-Load Rules
78148
149+ - ` PROJECT_INSTRUCTIONS_VERSION.md ` : always.
79150- ` PROJECT_INSTRUCTIONS.md ` : always.
80151- ` PROJECT_STATE.md ` : always.
81152- ` repository/canonical_repository_structure.md ` : always.
@@ -109,6 +180,7 @@ That file owns Start of Day, PLAN_PR, BUILD_PR, APPLY_PR, and invalid command be
109180
110181## Referenced Documents
111182
183+ - Project Instructions version: ` dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS_VERSION.md `
112184- Project state: ` dev/build/ProjectInstructions/PROJECT_STATE.md `
113185- Repository folder placement SSoT: ` dev/build/ProjectInstructions/repository/canonical_repository_structure.md `
114186- Codex workflow commands: ` dev/build/ProjectInstructions/standards/CODEX_WORKFLOW_COMMANDS.md `
@@ -130,7 +202,8 @@ That file owns Start of Day, PLAN_PR, BUILD_PR, APPLY_PR, and invalid command be
130202
131203## Single Source Of Truth Decisions
132204
133- - ` PROJECT_INSTRUCTIONS.md ` owns the manual entry point, required read order, load graph, stop gates, execution modes, and pointers.
205+ - ` PROJECT_INSTRUCTIONS_VERSION.md ` owns the current Project Instructions version and startup version proof.
206+ - ` PROJECT_INSTRUCTIONS.md ` owns the manual entry point, startup contract, required read order, load graph, stop gates, execution modes, and pointers.
134207- ` PROJECT_STATE.md ` owns machine-friendly project state metadata.
135208- ` repository/canonical_repository_structure.md ` owns all folder placement and file-placement rules.
136209- ` standards/CODEX_WORKFLOW_COMMANDS.md ` owns Start of Day, PLAN_PR, BUILD_PR, APPLY_PR, and invalid command behavior.
0 commit comments