Skip to content

Commit debd7c1

Browse files
author
CometAPI
committed
docs: define topic branch lifecycle
1 parent 72b212d commit debd7c1

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,25 @@ authorized pre-visibility scope.
1616
A local build, mocked test, statically valid workflow, or private remote CI run
1717
proves only its own evidence layer. Never invent or mock missing evidence.
1818

19+
## Git branch lifecycle
20+
21+
- Use a dedicated short-lived topic branch for each task. `dev` is the clean
22+
local landing branch between tasks; do not commit task changes directly to
23+
`dev`.
24+
- Treat a topic branch lifecycle as closed only after its required pull-request
25+
checks pass and its squash merge is present on `origin/main`. Any alternate
26+
disposition requires explicit user authorization and must not advance `dev`
27+
until the accepted commit is present on `origin/main`.
28+
- With a clean worktree, fetch `origin`, switch to `main`, fast-forward it with
29+
`git merge --ff-only origin/main`, switch to `dev`, fast-forward it with
30+
`git merge --ff-only main`, and finish with `dev` checked out. Cleanup is
31+
complete only when the worktree is clean and local `main`, local `dev`, and
32+
`origin/main` resolve to the same commit.
33+
- Never reset, discard work, force-update refs, delete branches, or push `dev`
34+
merely to complete this cleanup. If fetching fails, the worktree is dirty,
35+
either fast-forward is impossible, or the three final refs differ, stop and
36+
report the exact state instead of forcing synchronization.
37+
1938
## Current milestone: Public Preview
2039

2140
Private Remote Validation is complete. Prepare the private canonical repository

0 commit comments

Comments
 (0)