You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -5,6 +5,11 @@ You are working in a docs-first repo workflow.
5
5
Workflow:
6
6
PLAN_PR → BUILD_PR → APPLY_PR
7
7
8
+
PR lifecycle gate:
9
+
PR Open → Plan → Build → Validation → Approved → Merged → Main Verified → Closed
10
+
11
+
The PLAN_PR → BUILD_PR → APPLY_PR workflow remains preserved. PR Open is the first lifecycle status for active work, Plan happens after PR Open on the same PR branch, and Closed is the final repository-state gate.
12
+
8
13
# WORKFLOW & EXECUTION
9
14
10
15
## PR NAMING STANDARD
@@ -44,6 +49,66 @@ Rules:
44
49
- Existing PC/LAPTOP, desktop/laptop, workspace, environment, or machine-parity examples are historical only
45
50
- Future PR reports, recovery reports, validation reports, and manual validation notes must include TEAM ownership
46
51
52
+
## PR LIFECYCLE STATE GATE
53
+
54
+
Required state order:
55
+
56
+
1. PR Open
57
+
2. Plan
58
+
3. Build
59
+
4. Validation
60
+
5. Approved
61
+
6. Merged
62
+
7. Main Verified
63
+
8. Closed
64
+
65
+
Definitions:
66
+
- PR Open is the first active lifecycle state.
67
+
- PR Open means the tracked PR identity and source branch have been created and named before Plan begins.
68
+
- Plan happens after PR Open on the same PR branch.
69
+
- Build, validation, reports, ZIP packaging, and closeout stay tied to that same PR identity and source branch.
70
+
- No BUILD_PR may proceed without a PR name and active branch/PR identity unless it is explicitly marked `PLAN_ONLY`.
71
+
- Build means scoped implementation, audit, report, validation, governance, or cleanup work is in progress for that PR identity.
72
+
- Validation means requested checks, required report creation, manual validation notes, and ZIP packaging are being completed.
73
+
- Approved means the owner or required reviewer has approved the PR outcome for merge.
74
+
- Merged means the PR has merged and changes have been pushed.
75
+
- Main Verified means Codex is back on `main`, `main` includes the merge commit or recorded final commit, the worktree is clean, local/origin sync is `0/0`, and no untracked files remain.
76
+
- Closed means every Closed gate below is PASS.
77
+
78
+
Closed is valid only when all are PASS:
79
+
- PR merged and changes pushed.
80
+
- Current branch is `main`.
81
+
-`main` includes the merge commit or recorded final commit.
82
+
- Worktree clean.
83
+
- Local/origin sync is `0/0`.
84
+
- No untracked files.
85
+
- Branch disposition recorded as `retained`.
86
+
- Required reports exist.
87
+
- Required repo-structured ZIP under `tmp/` exists.
88
+
- Backlog updated.
89
+
- Tool state updated when applicable.
90
+
91
+
Hard stop:
92
+
- A team must not begin another PR if its previous PR is not Closed.
93
+
- Exception is allowed only for explicitly documented stacked PR chains.
94
+
95
+
Required final closeout output:
96
+
97
+
```text
98
+
FINAL REPOSITORY STATE:
99
+
- Branch
100
+
- Worktree
101
+
- Local/origin sync
102
+
- PR number/name
103
+
- PR status
104
+
- Merge/final commit
105
+
- Branch disposition
106
+
- Backlog update status
107
+
- Tool state update status
108
+
- ZIP path
109
+
- Closeout PASS/FAIL
110
+
```
111
+
47
112
## CHATGPT EXECUTION ROLE
48
113
49
114
ChatGPT no longer creates PLAN_PR, BUILD_PR, APPLY_PR docs, ZIP bundles, or implementation code.
@@ -784,12 +849,13 @@ The full samples smoke test rule remains separate and runs only when broadly imp
784
849
785
850
## CODEX REVIEW DIFF REQUIREMENT
786
851
787
-
Every Codex PR must produce review artifacts so ChatGPT can review the exact code changes.
852
+
Every completed Codex PR or completed Codex run must produce review artifacts so ChatGPT can review the exact repo changes or the no-change evidence.
788
853
789
854
Codex must create:
790
855
791
856
-`docs_build/dev/reports/codex_review.diff`
792
857
-`docs_build/dev/reports/codex_changed_files.txt`
858
+
- a PR-specific or EOD-specific report under `docs_build/dev/reports/`
793
859
794
860
`codex_review.diff` must contain:
795
861
-`git diff --cached`
@@ -804,6 +870,9 @@ Rules:
804
870
- Do not pause commits
805
871
- Do not add dependencies
806
872
- Do not change runtime behavior just to create review artifacts
873
+
- Required reports remain required even when a ZIP is created.
874
+
- Required report evidence must include branch validation PASS/FAIL, a requirement-by-requirement PASS/FAIL checklist, a validation lane report, and manual validation notes.
875
+
- A ZIP artifact must not replace or move required report files out of `docs_build/dev/reports/`.
807
876
808
877
When user asks for code review, they should upload:
809
878
- PR delta ZIP
@@ -812,7 +881,7 @@ When user asks for code review, they should upload:
812
881
813
882
## MANUAL TEST REQUIREMENT
814
883
815
-
Every PR must include:
884
+
Every completed PR, audit, report-only, validation-only, or EOD closeout run must include:
816
885
- exact manual validation steps
817
886
- expected outcome
818
887
- any known out-of-scope checks
@@ -870,8 +939,15 @@ Codex ZIPs must:
870
939
- be repo-structured
871
940
- preserve exact repo-relative paths
872
941
- be placed under `<project folder>/tmp/`
873
-
- use the PR name in the ZIP filename
942
+
- use the PR or EOD run name in the ZIP filename
874
943
- contain no extra files outside the defined structure
944
+
- include all changed or preserved repo files from the completed run
945
+
- not include or depend on generated loose files under `tmp/`
946
+
- not replace required report files under `docs_build/dev/reports/`
947
+
948
+
If a completed run changes no repo files, Codex must still create a ZIP containing the PR or EOD report that proves no repo files changed.
949
+
950
+
The no-change ZIP rule does not apply when the run hard-stopped before producing outputs.
875
951
876
952
Before Codex returns any ZIP, Codex must:
877
953
1. Physically create the ZIP file.
@@ -1584,11 +1660,21 @@ Required reports:
1584
1660
1585
1661
## REQUIRED ZIP OUTPUT
1586
1662
1587
-
Codex must ALWAYS produce a repo-structured ZIP for every PR.
1663
+
Codex must ALWAYS produce a repo-structured ZIP for every completed Codex run.
1664
+
1665
+
This applies to:
1666
+
- implementation PRs
1667
+
- audit PRs
1668
+
- report-only PRs
1669
+
- validation-only PRs
1670
+
- EOD closeout runs
1671
+
- governance and cleanup runs
1588
1672
1589
1673
The ZIP must follow the existing CODEX ZIP STANDARD.
1590
1674
1591
-
The ZIP is required output, not optional.
1675
+
The ZIP must include all changed or preserved repo files from the run.
1676
+
1677
+
The ZIP is required output, not optional, and it does not replace required reports under `docs_build/dev/reports/`.
1592
1678
1593
1679
## HTML FILE RESTRICTIONS
1594
1680
@@ -1641,6 +1727,8 @@ Before packaging any PR, Codex must:
1641
1727
1642
1728
Codex must not package partially completed PRs.
1643
1729
1730
+
PR completion is not the same as Closed. Closed requires the final repository-state gate from `PR LIFECYCLE STATE GATE`.
1731
+
1644
1732
## ERROR HANDLING CONTRACT
1645
1733
1646
1734
- No silent fallback.
@@ -1823,10 +1911,12 @@ Do NOT require:
1823
1911
1824
1912
## CODEX ZIP RETURN CONTRACT
1825
1913
1826
-
Codex must include the repo-structured ZIP in returned artifacts for user and ChatGPT review.
1914
+
Codex must include the repo-structured ZIP path in returned artifacts for user and ChatGPT review for every completed run.
1827
1915
1828
1916
The ZIP must still follow the CODEX ZIP STANDARD.
1829
1917
1918
+
If no repo files changed, the returned ZIP must contain the PR or EOD report proving the no-change result unless the run hard-stopped before outputs were produced.
1919
+
1830
1920
## CODE REVIEW EVIDENCE RULE
1831
1921
1832
1922
ChatGPT must not claim code review was completed unless it inspected uploaded source, ZIP contents, or `codex_review.diff`.
@@ -2044,6 +2134,7 @@ Required steps:
2044
2134
- local/origin sync = 0 0
2045
2135
5. Record final main commit.
2046
2136
6. Report final repository state.
2137
+
7. Produce the required repo-structured ZIP under `tmp/` containing the EOD report and any changed or preserved repo files from the closeout.
2047
2138
2048
2139
Required final state:
2049
2140
@@ -2082,7 +2173,7 @@ Each reviewed item must be classified as one of:
2082
2173
- Historical/Archive
2083
2174
2084
2175
Rules:
2085
-
- Merged branches should be deleted after successful merge and main sync.
2176
+
- Merged source branches should be retained by default after successful merge and main sync.
2086
2177
- Superseded draft PRs should be closed.
2087
2178
- Abandoned branches should be documented before removal.
2088
2179
- Active workstream branches remain.
@@ -2108,7 +2199,7 @@ Required PI closeout report fields:
2108
2199
- active PRs
2109
2200
- active branches
2110
2201
- closed/superseded PRs
2111
-
-deleted branch candidates
2202
+
-retained branch disposition and any owner-approved deletion candidates
2112
2203
- deferred work
2113
2204
- next PI priorities
2114
2205
@@ -2131,8 +2222,7 @@ Audit targets:
2131
2222
Recommendation-only first pass values:
2132
2223
- keep
2133
2224
- close
2134
-
- delete local
2135
-
- delete remote
2225
+
- retained
2136
2226
- defer
2137
2227
2138
2228
Rules:
@@ -2235,6 +2325,9 @@ Completion hard stops:
2235
2325
- If required reports are missing, HARD STOP.
2236
2326
- If `docs_build/dev/reports/codex_review.diff` is missing, HARD STOP.
2237
2327
- If `docs_build/dev/reports/codex_changed_files.txt` is missing, HARD STOP.
2328
+
- If branch validation PASS/FAIL is missing, HARD STOP.
2329
+
- If the requirement-by-requirement PASS/FAIL checklist is missing, HARD STOP.
2330
+
- If the validation lane report is missing, HARD STOP.
2238
2331
- If manual validation notes are missing, HARD STOP.
2239
2332
- If the PR-specific report is missing, HARD STOP.
2240
2333
- If an instruction compliance checklist is required and missing, HARD STOP.
Copy file name to clipboardExpand all lines: docs_build/dev/ProjectInstructions/addendums/branch_lock_governance.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,10 @@ Keep active work attached to the correct assigned team, branch, and OWNER decisi
13
13
- An assigned work item keeps its owner of record until complete or OWNER reassignment.
14
14
- Work must not move to another team, branch, or PR without OWNER approval.
15
15
- A team with no active assignment, active branch, or active PR is inactive.
16
+
- A team with a previous PR that is not Closed must not begin another PR unless OWNER documented an explicit stacked PR chain.
17
+
- PR Open begins only after the branch and PR identity are named.
18
+
- Plan, Build, validation, reports, ZIP packaging, and closeout stay tied to the same PR identity and source branch.
19
+
- Closed ends only after the final main-return, clean-worktree, local/origin `0/0`, no-untracked-files, required-report, required-ZIP, backlog, applicable tool-state, and branch-disposition gates pass.
16
20
- Project Instructions must not assume a permanent team roster.
17
21
18
22
## Branch Rules
@@ -22,6 +26,8 @@ Keep active work attached to the correct assigned team, branch, and OWNER decisi
22
26
- Keep work on the active branch until the PR is merged, the branch is retired, or OWNER says to return to `main`.
23
27
- Do not commit directly to `main` unless OWNER explicitly approves.
24
28
- Do not merge stale historical branches directly unless they are current, clean, still needed, and OWNER-approved.
29
+
- Retain source branches by default after merge and closeout.
30
+
- Record branch disposition before Closed as `retained`.
Copy file name to clipboardExpand all lines: docs_build/dev/ProjectInstructions/addendums/multi_team.md
+30-4Lines changed: 30 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,6 +121,8 @@ Required gate:
121
121
- blocked PRs with blockers
122
122
- next review queue
123
123
- final branch/worktree/local-origin sync
124
+
- repo-structured ZIP path under `tmp/`
125
+
- final repository state block
124
126
125
127
OWNER_049 lesson:
126
128
- PRs #129, #132, and #134 were merge-approved and still required merge execution.
@@ -148,6 +150,9 @@ Required steps:
148
150
- local/origin sync = 0 0
149
151
5. Record final main commit.
150
152
6. Report final repository state.
153
+
7. Produce a repo-structured ZIP under `tmp/` that includes the EOD report and all changed or preserved repo files from the closeout.
154
+
8. Record source branch disposition as `retained`.
155
+
9. Mark the PR Closed only when every Closed gate passes.
151
156
152
157
Required final state:
153
158
@@ -165,9 +170,31 @@ Rules:
165
170
- A workstream is not considered closed until the repository is returned to main.
166
171
- A PI is not considered complete until main is current and synchronized.
167
172
- Do not leave Codex on a feature, team, workstream, recovery, governance, or owner branch after successful merge.
173
+
- Plan, Build, validation, reports, ZIP packaging, and closeout stay tied to the same PR identity and source branch.
174
+
- Source branches are retained by default after merge and closeout.
175
+
- A PR is not Closed until the PR merged, changes are pushed, the repository is on `main`, `main` includes the merge or final commit, the worktree is clean, local/origin sync is `0/0`, no untracked files exist, branch disposition is recorded as `retained`, required reports exist, the required repo-structured ZIP exists under `tmp/`, backlog is updated, and tool state is updated when applicable.
176
+
- A completed EOD closeout must produce the required ZIP even when the closeout changed no repo files; in that case, the ZIP must contain the EOD report proving the no-change result.
177
+
- The EOD ZIP does not replace the EOD report or other required reports under `docs_build/dev/reports/`.
168
178
- If merge succeeds but repository is not returned to main:
169
179
closeout status = FAIL.
170
180
181
+
Required final closeout output:
182
+
183
+
```text
184
+
FINAL REPOSITORY STATE:
185
+
- Branch
186
+
- Worktree
187
+
- Local/origin sync
188
+
- PR number/name
189
+
- PR status
190
+
- Merge/final commit
191
+
- Branch disposition
192
+
- Backlog update status
193
+
- Tool state update status
194
+
- ZIP path
195
+
- Closeout PASS/FAIL
196
+
```
197
+
171
198
## Workstream Hygiene Governance
172
199
173
200
At workstream closeout, Codex must review repository collaboration state before reporting the workstream closed.
@@ -186,7 +213,7 @@ Each reviewed item must be classified as one of:
186
213
- Historical/Archive
187
214
188
215
Rules:
189
-
- Merged branches should be deleted after successful merge and main sync.
216
+
- Merged source branches should be retained by default after successful merge and main sync.
190
217
- Superseded draft PRs should be closed.
191
218
- Abandoned branches should be documented before removal.
192
219
- Active workstream branches remain.
@@ -212,7 +239,7 @@ Required PI closeout report fields:
212
239
- active PRs
213
240
- active branches
214
241
- closed/superseded PRs
215
-
-deleted branch candidates
242
+
-retained branch disposition and any owner-approved deletion candidates
0 commit comments