Epic 1: Core Operations Refactoring — Issue 4/4
Source: 1-agent worktree (wt-a6gki1)
Description
Move worktree creation + agent spawning from commands/spawn.ts into core/operations/spawn.ts. This is the most complex extraction — handles git worktree add, env setup, tmux, prompt files.
Acceptance Criteria
Files to Create/Modify
src/core/operations/spawn.ts (new)
src/core/operations/spawn.test.ts (new)
src/commands/spawn.ts (simplify)
Epic 1: Core Operations Refactoring — Issue 4/4
Source: 1-agent worktree (wt-a6gki1)
Description
Move worktree creation + agent spawning from
commands/spawn.tsintocore/operations/spawn.ts. This is the most complex extraction — handles git worktree add, env setup, tmux, prompt files.Acceptance Criteria
core/operations/spawn.tsexports aperformSpawn()function with typed optionscommands/spawn.tssimplified to arg parsing + callingperformSpawn()Files to Create/Modify
src/core/operations/spawn.ts(new)src/core/operations/spawn.test.ts(new)src/commands/spawn.ts(simplify)