fix: orchestrator-agent branches from local main, not origin/main
The or.1 Iron Law said `git switch -c iter/<iter_id> origin/main`, which silently presupposed that the plan-commit lives on origin/main. The Boss commits plan+spec to local main and dispatches immediately without pushing, so origin/main lags. The first real dispatch (pr.1) hit this and worked around it by mid-flight ff-merging local main into the iter branch — clean end-state but pure rationalisation through a 'branch already exists' clause meant for repair re-dispatch. The intent of branch-per-iter was iter-isolation from main, not push-state coupling. Branch from local main; let push remain orthogonal. Touches Iron Law (twice — agent + SKILL.md), Phase 0 step (orchestrator-agent), Boss-merge explanation (SKILL.md). Also drops the now-obsolete `git fetch origin main` Phase 0 prelude. Recorded in docs/journals/2026-05-11-iter-pr.1.md Boss-side addendum; this commit closes the first follow-up item from that addendum.
This commit is contained in:
@@ -40,7 +40,7 @@ is shed.
|
||||
## The Iron Law
|
||||
|
||||
```
|
||||
ONE BRANCH PER ITER — `iter/<iter_id>`, created from origin/main.
|
||||
ONE BRANCH PER ITER — `iter/<iter_id>`, created from local main.
|
||||
FRESH SUBAGENT PER TASK — implementer, then spec-reviewer, then quality-reviewer.
|
||||
TWO-STAGE REVIEW: SPEC COMPLIANCE FIRST, CODE QUALITY SECOND.
|
||||
NEVER START QUALITY REVIEW BEFORE SPEC COMPLIANCE IS GREEN.
|
||||
@@ -117,7 +117,7 @@ orchestrator-agent.
|
||||
`- YYYY-MM-DD — iter <iter_id>: <one-line title> → <YYYY-MM-DD>-iter-<iter_id>.md`
|
||||
4. Fast-forward main to the iter branch:
|
||||
`git switch main && git merge --ff-only iter/<iter_id>`. Since the
|
||||
iter branch was created from `origin/main` (Phase 0 of the
|
||||
iter branch was created from local `main` (Phase 0 of the
|
||||
orchestrator-agent) and no commits have landed on main since, the
|
||||
fast-forward is always linear.
|
||||
5. Optionally delete the branch: `git branch -D iter/<iter_id>`.
|
||||
|
||||
@@ -59,7 +59,7 @@ branch — both are Boss-side.
|
||||
## The Iron Law
|
||||
|
||||
```
|
||||
ONE BRANCH PER ITER — `iter/<iter_id>`, created from origin/main.
|
||||
ONE BRANCH PER ITER — `iter/<iter_id>`, created from local main.
|
||||
FRESH SUBAGENT PER TASK (implementer, then spec-reviewer, then quality-reviewer).
|
||||
TWO-STAGE REVIEW PER TASK: SPEC COMPLIANCE FIRST, CODE QUALITY SECOND.
|
||||
NEVER START QUALITY REVIEW BEFORE SPEC COMPLIANCE IS GREEN.
|
||||
@@ -71,12 +71,14 @@ WRITE THE PER-ITER JOURNAL FILE BEFORE RETURNING — EVEN ON BLOCKED.
|
||||
|
||||
### Phase 0 — Branch setup (always first)
|
||||
|
||||
1. `git fetch origin main`
|
||||
2. If a branch named `iter/<iter_id>` already exists locally
|
||||
1. If a branch named `iter/<iter_id>` already exists locally
|
||||
(Boss-side repair re-dispatch): `git switch iter/<iter_id>`.
|
||||
Otherwise: `git switch -c iter/<iter_id> origin/main`.
|
||||
3. Record `pre_iter_sha = $(git rev-parse HEAD)` for the end-report.
|
||||
4. Create scratch dir: `mkdir -p /tmp/ail-iter/<iter_id>`.
|
||||
Otherwise: `git switch -c iter/<iter_id> main`. Branching from
|
||||
local `main` (not `origin/main`) is deliberate — the Boss
|
||||
commits the plan and spec to local main and dispatches
|
||||
immediately, without pushing first; `origin/main` may lag.
|
||||
2. Record `pre_iter_sha = $(git rev-parse HEAD)` for the end-report.
|
||||
3. Create scratch dir: `mkdir -p /tmp/ail-iter/<iter_id>`.
|
||||
|
||||
### Phase 1 — Load context (mode-dependent)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user