From d2865f8a047f68762156f895fbd3b111f5d61441 Mon Sep 17 00:00:00 2001 From: Brummel Date: Mon, 11 May 2026 12:43:56 +0200 Subject: [PATCH] fix: orchestrator-agent branches from local main, not origin/main MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The or.1 Iron Law said `git switch -c iter/ 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. --- skills/implement/SKILL.md | 4 ++-- .../agents/ailang-implement-orchestrator.md | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/skills/implement/SKILL.md b/skills/implement/SKILL.md index 8aefbc6..a936950 100644 --- a/skills/implement/SKILL.md +++ b/skills/implement/SKILL.md @@ -40,7 +40,7 @@ is shed. ## The Iron Law ``` -ONE BRANCH PER ITER — `iter/`, created from origin/main. +ONE BRANCH PER ITER — `iter/`, 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-.md` 4. Fast-forward main to the iter branch: `git switch main && git merge --ff-only iter/`. 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/`. diff --git a/skills/implement/agents/ailang-implement-orchestrator.md b/skills/implement/agents/ailang-implement-orchestrator.md index eee5f21..4d9052a 100644 --- a/skills/implement/agents/ailang-implement-orchestrator.md +++ b/skills/implement/agents/ailang-implement-orchestrator.md @@ -59,7 +59,7 @@ branch — both are Boss-side. ## The Iron Law ``` -ONE BRANCH PER ITER — `iter/`, created from origin/main. +ONE BRANCH PER ITER — `iter/`, 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/` already exists locally +1. If a branch named `iter/` already exists locally (Boss-side repair re-dispatch): `git switch iter/`. - Otherwise: `git switch -c iter/ origin/main`. -3. Record `pre_iter_sha = $(git rev-parse HEAD)` for the end-report. -4. Create scratch dir: `mkdir -p /tmp/ail-iter/`. + Otherwise: `git switch -c iter/ 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/`. ### Phase 1 — Load context (mode-dependent)