Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions docs_build/dev/ProjectInstructions/PROJECT_INSTRUCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,51 @@ Existing Project Instructions remain preserved in their current locations. This

No PR in this operating system is merged without explicit owner approval.

## Branch Persistence Rule

After a branch is created, the team remains on that active branch.

This applies to:
- Team Alfa through Team Zulu
- Team OWNER

Do not automatically return to main after:
- commit
- push
- draft PR creation
- testing
- bug fixes
- additional commits

Only return to main when:
- the PR is merged
- the branch is retired
- the owner explicitly says: "Return to main"

Purpose:
Allow continued testing, validation, bug fixes, and owner review on the active branch before EOD merge approval.

## Branch Context Rule

The active branch is the working context.

At the beginning of every work session, Codex must report:
- current branch
- expected branch
- active team
- active assignment

If not on the assigned team/OWNER branch:

STOP.

Report:
- expected branch
- current branch
- required action

Do not continue until the branch context is corrected or owner override is provided.

## OWNER Governance

OWNER override wording:
Expand Down
44 changes: 44 additions & 0 deletions docs_build/dev/ProjectInstructions/TEAM_START_COMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,47 @@ Merge to main is EOD-only and owner-approved, unless the owner explicitly says:

Do not treat sequential PR completion as merge approval.
```

## Branch Persistence And Context Reminder

Ready-to-copy reminder:

```text
After a branch is created, the team remains on that active branch.

This applies to:
- Team Alfa through Team Zulu
- Team OWNER

Do not automatically return to main after:
- commit
- push
- draft PR creation
- testing
- bug fixes
- additional commits

Only return to main when:
- the PR is merged
- the branch is retired
- the owner explicitly says: "Return to main"

The active branch is the working context.

At the beginning of every work session, Codex must report:
- current branch
- expected branch
- active team
- active assignment

If not on the assigned team/OWNER branch:

STOP.

Report:
- expected branch
- current branch
- required action

Do not continue until the branch context is corrected or owner override is provided.
```
45 changes: 45 additions & 0 deletions docs_build/dev/ProjectInstructions/addendums/multi_team.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,51 @@ Rules:
- Codex should reduce chit-chat by planning the full sequence before starting.
- Codex must still hard-stop for conflicts, dirty worktree, scope mismatch, missing assignment, or protected instruction deletion.

## Branch Persistence Rule

After a branch is created, the team remains on that active branch.

This applies to:
- Team Alfa through Team Zulu
- Team OWNER

Do not automatically return to main after:
- commit
- push
- draft PR creation
- testing
- bug fixes
- additional commits

Only return to main when:
- the PR is merged
- the branch is retired
- the owner explicitly says: "Return to main"

Purpose:
Allow continued testing, validation, bug fixes, and owner review on the active branch before EOD merge approval.

## Branch Context Rule

The active branch is the working context.

At the beginning of every work session, Codex must report:
- current branch
- expected branch
- active team
- active assignment

If not on the assigned team/OWNER branch:

STOP.

Report:
- expected branch
- current branch
- required action

Do not continue until the branch context is corrected or owner override is provided.

## Day Work / EOD Merge Rule

During active work:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# PR_26172_OWNER_022 Instruction Compliance Checklist

- [x] Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`.
- [x] Read `docs_build/dev/PROJECT_MULTI_PC.txt`.
- [x] Read `docs_build/dev/ProjectInstructions/README.txt`.
- [x] OWNER override documented by user.
- [x] Started from latest `main`.
- [x] Created branch `pr/26172-OWNER-022-branch-persistence-governance`.
- [x] Added Branch Persistence Rule to requested files.
- [x] Added Branch Context Rule to requested files.
- [x] Did not delete ProjectInstructions content.
- [x] Did not commit directly to `main`.
- [x] Did not merge any PR.
- [x] Ran docs/static validation.
- [x] Created repo-structured delta ZIP.
- [x] Stayed on the OWNER branch after push and draft PR creation.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# PR_26172_OWNER_022 Manual Validation Notes

- Verified branch persistence applies to Team Alfa through Team Zulu and Team OWNER.
- Verified automatic return to main is prohibited after commit, push, draft PR creation, testing, bug fixes, and additional commits.
- Verified return to main is allowed only when the PR is merged, the branch is retired, or the owner says `"Return to main"`.
- Verified Branch Context Rule requires current branch, expected branch, active team, and active assignment reporting.
- Verified branch mismatch requires STOP and required action reporting.
- Verified no runtime, UI, Playwright, or sample files changed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# PR_26172_OWNER_022-branch-persistence-governance

## Scope

Add branch persistence and branch context governance for all teams, including OWNER.

## Files Changed

- `docs_build/dev/ProjectInstructions/addendums/multi_team.md`
- `docs_build/dev/ProjectInstructions/PROJECT_INSTRUCTIONS.md`
- `docs_build/dev/ProjectInstructions/TEAM_START_COMMANDS.md`

## Changes

- Added Branch Persistence Rule to the ProjectInstructions root.
- Added Branch Persistence Rule to the multi-team addendum.
- Added branch persistence/context reminder to team start commands.
- Added Branch Context Rule requiring Codex to report current branch, expected branch, active team, and active assignment at the beginning of every work session.
- Added stop behavior when the current branch does not match the assigned team/OWNER branch.

## Validation

- `git diff --check`
- `git diff --cached --check`
- Text review for Branch Persistence Rule and Branch Context Rule

## Skipped Lanes

- Playwright skipped: documentation-only governance.
- Samples skipped: documentation-only governance.

## Package

- `tmp/PR_26172_OWNER_022-branch-persistence-governance_delta.zip`
18 changes: 3 additions & 15 deletions docs_build/dev/reports/codex_changed_files.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
docs_build/dev/ProjectInstructions/PROJECT_INSTRUCTIONS.md
docs_build/dev/ProjectInstructions/README.txt
docs_build/dev/ProjectInstructions/TEAM_START_COMMANDS.md
docs_build/dev/ProjectInstructions/addendums/build_path_sync.md
docs_build/dev/ProjectInstructions/addendums/deprecation.md
docs_build/dev/ProjectInstructions/addendums/multi_team.md
docs_build/dev/ProjectInstructions/addendums/preservation.md
docs_build/dev/ProjectInstructions/addendums/team_release_readiness.md
docs_build/dev/ProjectInstructions/addendums/tile_overlay_status.md
docs_build/dev/ProjectInstructions/archive/README.md
docs_build/dev/ProjectInstructions/archive/history/.gitkeep
docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md
docs_build/dev/ProjectInstructions/deprecation/README.md
docs_build/dev/ProjectInstructions/team_assignments/TEAM_ASSIGNMENTS.md
docs_build/dev/reports/PR_26172_OWNER_017-project-instructions-bootstrap-install-instruction-compliance-checklist.md
docs_build/dev/reports/PR_26172_OWNER_017-project-instructions-bootstrap-install-manual-validation-notes.md
docs_build/dev/reports/PR_26172_OWNER_017-project-instructions-bootstrap-install-tree.txt
docs_build/dev/reports/PR_26172_OWNER_017-project-instructions-bootstrap-install.md
docs_build/dev/reports/PR_26172_OWNER_022-branch-persistence-governance-instruction-compliance-checklist.md
docs_build/dev/reports/PR_26172_OWNER_022-branch-persistence-governance-manual-validation-notes.md
docs_build/dev/reports/PR_26172_OWNER_022-branch-persistence-governance.md
docs_build/dev/reports/codex_changed_files.txt
docs_build/dev/reports/codex_review.diff
Loading
Loading