Skip to content

Feature-branch lifecycle: per-issue branch, review diff, serialised merge, delete #11

Description

@Ryan-Atkinson87

Spec: §5.3 (feature branches), §4.2 steps b/f/g/h, §18.6 (serialised merge queue).

Each issue gets a short-lived feature branch off the agent branch; on approval it merges into the agent branch and is deleted, with no per-issue GitHub PR. This issue provides the local diff used for internal (AI) review and serialises merges per repo. The AI review invocation itself is Phase 3 — this is the deterministic mechanics only.

Acceptance criteria

  • Creates a short-lived feature branch off the current agent branch for a given issue.
  • Produces the local feature→agent diff that the internal review (AI orchestrator, wired in Phase 3) consumes — no GitHub PR is created (§5.3).
  • On approval, merges the feature branch into the agent branch and deletes the feature branch.
  • Merges into the agent branch are serialised one-at-a-time per repo (§18.6) so concurrent sessions cannot race the merge; the diff/review steps may run concurrently.
  • A merge conflict during the merge-to-agent step surfaces as a catchable error so the caller can park the issue, and does not corrupt the agent branch.
  • Builds only on the agent-branch lifecycle (Agent-branch lifecycle: per-wave branch creation, merge-sync, slug derivation #10) and git wrapper (Deterministic git operations wrapper bounded to a repo path #9); contains no AI invocation (that is Phase 3 wave-loop wiring).
  • Unit tests cover branch creation, diff production, clean merge + delete, the serialised-merge constraint, and the conflict path.
  • Lint, format, and typecheck pass.

Depends on: #10

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions