Feature Summary
bin/local-dev.sh always builds and runs the stack from its own checkout, so deploying a PR branch means either switching the main checkout's branch (disrupting in-flight work) or copying the tooling into each worktree. There is no way to keep one stable copy of the orchestration script while pointing the build/run at a different worktree.
Proposed Solution or Design
Separate the orchestration tree (where local-dev.sh, tui.py, and the docker overlay live — always used from the canonical checkout) from the application source tree that gets built and run.
up / auto accept --worktree=PATH or --branch=NAME (resolved to the worktree that has it checked out) to deploy a sibling worktree; a plain up returns to the current checkout.
- The selection persists to
$STATE_DIR/deploy-source, so status / down / logs / single-service rebuild / auto all follow the active deployment, and status --json reports worktree / source.
- Build stamps are namespaced per source tree so switching worktrees never skips a required rebuild.
- The interactive TUI mirrors the CLI:
u / a accept the selectors and re-point the banner to the active tree.
Invalid --branch / --worktree fail fast with a clear message.
Affected Area
Deployment / Infrastructure
Feature Summary
bin/local-dev.shalways builds and runs the stack from its own checkout, so deploying a PR branch means either switching the main checkout's branch (disrupting in-flight work) or copying the tooling into each worktree. There is no way to keep one stable copy of the orchestration script while pointing the build/run at a different worktree.Proposed Solution or Design
Separate the orchestration tree (where
local-dev.sh,tui.py, and the docker overlay live — always used from the canonical checkout) from the application source tree that gets built and run.up/autoaccept--worktree=PATHor--branch=NAME(resolved to the worktree that has it checked out) to deploy a sibling worktree; a plainupreturns to the current checkout.$STATE_DIR/deploy-source, sostatus/down/logs/ single-service rebuild /autoall follow the active deployment, andstatus --jsonreportsworktree/source.u/aaccept the selectors and re-point the banner to the active tree.Invalid
--branch/--worktreefail fast with a clear message.Affected Area
Deployment / Infrastructure