Skip to content

Create Symphony worktrees directly on issue branches #99

Description

@dapi

Context

The shared Symphony workflow currently creates each issue workspace with git worktree add --detach "$PWD", while the agent prompt separately asks the agent to create codex/<issue>. If the second step is skipped or the run stops early, the workspace remains detached and git worktree list does not show the task branch.

Proposed change

Update template/WORKFLOW.md so the after_create hook creates the branch and worktree atomically:

hooks:
  after_create: |
    git -C ../.. worktree add "$PWD" -b "codex/{{ issue.identifier | downcase }}"

Adjust the canonical prompt to say that the hook creates the branch and that the agent must verify the current checkout is on it before implementation.

Acceptance criteria

  • New Symphony issue workspaces are attached to codex/<issue> immediately after creation.
  • A failed or interrupted agent startup cannot leave the normal workflow in detached HEAD.
  • Existing branch-name and worktree cleanup behavior is documented, including the expected failure when the branch already exists.
  • Template validation and link/doctor checks remain green.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions