feat: orch up starts issue sessions in existing worktrees
build / version (push) Successful in 1m20s
build / build (aarch64-apple-darwin) (push) Successful in 5m55s
build / build (x86_64-unknown-linux-musl) (push) Successful in 4m1s
build / release (push) Successful in 21s

orch up MANIFEST reads an issue manifest (a path, or NAME in manifest_dir,
default <config>/manifests, set in <config>/config.toml) and starts one
detached session per listed worktree, across repos. Each worktree brings its
own machine, profile and .hx/task.md; the task text now reaches the agent.
Sessions live in <state>/issues.db; orch issues shows them grouped by issue.

Also: liveness checks use kill(pid, 0) instead of /proc (broken on macOS),
the same branch name in two repos no longer counts as the same place, and
the merge queue column ticket is renamed to issue (migrated on open).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Johannes KresnerandClaude Opus 5.5 committed 2026-11-16 15:56:58 +01:00
1 parent 440b19180e
commit 20f88d88df
16 files changed
+791 -65

No files matched your search

+32
View File
@@ -17,6 +17,8 @@ git host: tasks come from a folder or any JSON command, results go to a local br
orch goal [TEXT] [--export] show or set the goal (--export adds the checks)
orch check NAME CMD [--owner sN] add an acceptance check (pass = exit 0)
orch checks [--owner sN | --main] run acceptance checks here, or on a clean copy of main
orch up MANIFEST one detached session per worktree of an issue (any repos)
orch issues TUI on the sessions `orch up` started, grouped by issue
## How a run goes
@@ -104,6 +106,36 @@ first served); after each merge all checks run again on main in a clean worktree
`ORCH_REPO` and `ORCH_SESSION`, and `{{repo}}` in `cmd`; the example machines merge with
`git -C {{repo}} merge --ff-only {{branch}}` in `mark-merged`.
## Issues: `orch up`
For work on an issue that spans worktrees you made yourself, in one repo or several. Each worktree has its own
machine, profile and task text in its `.hx/` (`.hx` should be git-ignored). A manifest lists them:
```toml
# <manifest_dir>/ABC-123.toml
issue = "ABC-123"
[[session]]
worktree = "~/Repos/api/.worktrees/abc-123" # an existing linked worktree; its repo follows from it
name = "api endpoint"
machine = "abc-123" # <worktree>/.hx/machines/, then the repo's .hx/machines/, then ~/.hx/machines/
profile = "abc-123" # <worktree>/.hx/profiles/, then <config>/profiles/
# task = ".hx/task.md" # default, relative to the worktree; given to the agent with every prompt
# merge = false # default: the session ends at `done` and the branch stays for a pull request
```
`orch up ABC-123` reads `<manifest_dir>/ABC-123.toml` (or takes a path), checks every entry first and starts nothing
when one is broken, then starts one detached session per worktree and returns. Logs go to
`<state>/logs/issue-sN.log`. Running it again is safe: sessions that run or are done are left alone, and ones that
stopped unfinished start again. The sessions of every repo live in one database, `<state>/issues.db`; `orch
issues` shows them grouped by issue, with the repo under each name. Steering and kill work as in the normal TUI;
`u` and `R` start sessions detached again. `manifest_dir` defaults to `<config>/manifests` and is set in
`<config>/config.toml` (`~/.config/orch/config.toml`):
```toml
manifest_dir = "~/notes/manifests"
```
## More
- [docs/cmd-protocol.md](docs/cmd-protocol.md): task sources and result sinks as external commands (+ JSON schema)