Skip to content

docs(decisions): architecture decision for worktree heuristic (#531)#532

Merged
bradygaster merged 2 commits intodevfrom
squad/531-worktree-heuristic
Mar 23, 2026
Merged

docs(decisions): architecture decision for worktree heuristic (#531)#532
bradygaster merged 2 commits intodevfrom
squad/531-worktree-heuristic

Conversation

@bradygaster
Copy link
Copy Markdown
Owner

Resolves #531 (parent: #525)

Summary

Architecture decision document for worktree vs checkout heuristic. This decision unblocks #528 (worktree variant in ralph-commands.ts) and #529 (coordinator pre-spawn worktree creation).

Key Decisions

1. Opt-in configuration (not heuristic-based)

  • Default: worktrees: false (backward compatible)
  • Enable: worktrees: true in squad.config.ts or .squad/config.json
  • Override: SQUAD_WORKTREES=1 env var

Rationale: Heuristics are brittle. Configuration is explicit and user-controlled.

2. Worktree path convention

3. Dependency management

  • Recommended: Junction (Windows) or symlink (Unix) for node_modules
  • Fallback: npm install if junction/symlink fails
  • Coordinator handles automatically after git worktree add

4. Platform support

  • All 3 adapters (GitHub, Azure DevOps, Planner) get identical worktree support
  • Commands: createWorktree, removeWorktree

Implications for Sibling Issues

#528 (ralph-commands.ts):

  • Add createWorktree? and removeWorktree? to RalphCommands interface
  • No breaking changes

#529 (coordinator pre-spawn):

  • Read config at session start
  • Create worktree if enabled, pass WORKTREE_PATH to agents
  • Handle dependency management

#530 (post-merge cleanup):

  • Trigger removeWorktree after PR merge
  • Log cleanup, handle failures gracefully

Migration Path

✅ Zero breaking changes — existing workflows use git checkout -b
✅ Teams opt-in when ready
✅ New teams can enable during init

Files Changed

  • .squad/decisions/inbox/flight-worktree-heuristic.md — Full architecture decision document

Next Steps

After this PR merges:

  1. Scribe merges decision from inbox into .squad/decisions.md
  2. EECOM implements feat(#525): Add worktree branch creation variant to ralph-commands.ts #528 (worktree commands)
  3. Flight or EECOM implements feat(#525): Add worktree creation to coordinator spawn flow #529 (coordinator flow)
  4. Flight or EECOM implements feat(#525): Implement post-merge worktree cleanup lifecycle #530 (cleanup)
  5. PAO updates docs

Working as Flight (Lead / Architect)

bradygaster and others added 2 commits March 22, 2026 15:52
- Add orchestration log: 2026-03-22T22-45-flight-triage-525.md
- Add session log: 2026-03-22T22-45-triage-session.md
- Merge decision inbox (6 files) into decisions.md:
  - flight-triage-525.md (validated #525, P2 rating, sub-issue decomposition, top-5 v1 priorities)
  - eecom-economy-mode.md (economy mode design decision)
  - eecom-node-sqlite.md (Node 22.5.0+ hard-fail decision)
  - eecom-rate-limit-ux.md (rate limit detection and recovery)
  - procedures-economy-mode-governance.md (squad.agent.md governance proposal)
  - procedures-personal-squad-governance.md (consult mode governance proposal)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bradygaster bradygaster merged commit b0b2cd6 into dev Mar 23, 2026
0 of 2 checks passed
@bradygaster bradygaster deleted the squad/531-worktree-heuristic branch March 23, 2026 03:59
chrislomonico pushed a commit to clomonico/squad that referenced this pull request Mar 26, 2026
Session: 2026-02-27T23-18-55Z-repo-assessment
Requested by: Scribe

Changes:
- Logged orchestration for Kobayashi (branch cleanup, 57 refs pruned)
- Logged orchestration for Keaton (full repo assessment, replatform readiness)
- Logged session: full repo assessment with concrete timeline
- Merged 5 decisions from inbox to decisions.md (deduplicated)
- Cleared decisions/inbox/ directory

**Merged decisions:**
- Fenster: Ghost command aliasing strategy
- Fenster: Per-command --help/-h intercept-before-dispatch pattern
- Keaton: Replatform readiness assessment (APPROVE launch, contingent on bradygaster#532)
- Kovash: REPL cancellation and configurable timeout
- Saul: Shell observability metrics design

**Deduplication:** No exact duplicates found. All decisions preserved.

**Cross-agent impact:**
- Keaton's replatform decision affects all agents: v1 public alpha approved for Feb 28-Mar 1 launch
- Timeline: Close bradygaster#532 (dogfood), merge bradygaster#552 (Ralph triage), ship v0.8.5.1 public alpha
- Wave E queued: bradygaster#553 (personal consult), bradygaster#547 (remote control), bradygaster#542 (board automation)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(#525): Architecture decision: worktree vs checkout heuristic

1 participant