From 5a80bc9fe13f4a66efcadd42d4a87ab963ef523d Mon Sep 17 00:00:00 2001 From: Johannes Kresner Date: Sat, 14 Nov 2026 15:27:18 +0100 Subject: [PATCH] Update README, add markdownlint and lychee via devenv - README: list all subcommands, document orch session --resume, name the example machines, drop the missing ORCHESTRATOR.md reference - Add markdownlint-cli and lychee to devenv.nix - Add .markdownlint.json and .markdownlintignore; fix table lint errors in docs/safety.md and docs/cmd-protocol.md Co-Authored-By: Claude Opus 5.5 --- .markdownlint.json | 4 ++++ .markdownlintignore | 3 +++ README.md | 14 ++++++++++++-- devenv.nix | 2 ++ docs/cmd-protocol.md | 2 +- docs/safety.md | 4 ++-- 6 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 .markdownlint.json create mode 100644 .markdownlintignore diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..378c385 --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,4 @@ +{ + "MD013": { "line_length": 120, "tables": false }, + "MD046": false +} diff --git a/.markdownlintignore b/.markdownlintignore new file mode 100644 index 0000000..2525563 --- /dev/null +++ b/.markdownlintignore @@ -0,0 +1,3 @@ +target/ +# eval case prompts are fed to the agent verbatim; keep them byte-stable across runs +eval/*/task.md diff --git a/README.md b/README.md index 4eec846..15bce31 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,13 @@ git host: tasks come from a folder or any JSON command, results go to a local br orch report [FILE] success rate, tokens, retries, duration per profile and hx version orch bench eval --profile NAME --out A.jsonl run the eval cases; then: orch eval A.jsonl B.jsonl orch audit [ID] every allowed/denied tool call + orch TUI: sessions, session detail, goal view + orch session --repo DIR --machine M --name N create a state-machine session and run it + [--profile P] [--after s1,s2] [--scope S] + orch session --repo DIR --resume sN continue an unfinished session from its saved state + 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 ## How a run goes @@ -49,9 +56,12 @@ command = "python3 /work/adapters/gitea.py" `orch` without a subcommand opens the TUI: sessions overview (`enter` on a row opens the session detail, `esc` goes back; `t` full test output, `d` diff, `l` event transcript, `o` open the worktree in hx). It reads `.hx/orch.db` of the current directory. `orch session --repo . --machine task --name NAME [--profile P]` creates a session and runs it. -Machines are TOML files in `.hx/machines/` or `~/.hx/machines/` (examples in `examples/machines/`). A `computer` step +`orch session --repo . --resume s1` continues an unfinished session (for example after a crash or a closed terminal) +from its saved state; `--machine`, `--name` and `--after` are not allowed with it. Machines are TOML files in +`.hx/machines/` or `~/.hx/machines/`. `examples/machines/` has four: `task` (plan, code, build, test, review, merge), +`docs` (write, lint, links), `e2e` (stack-up, e2e, stack-down) and `migration` (up, down, test). A `computer` step with `report = "junit"` writes its JUnit XML to `$ORCH_REPORT` (also available as `{{report}}` in `cmd`); orch parses -it into counts and failing tests. See ORCHESTRATOR.md for the whole design. +it into counts and failing tests. A running session can be steered from the session screen, also when `orch session` runs in another terminal: `i` interrupt (the agent stops, you reply with a hint), `m` message to the agent, `s` force a state, `k` kill (type diff --git a/devenv.nix b/devenv.nix index 9667893..cd62600 100644 --- a/devenv.nix +++ b/devenv.nix @@ -9,5 +9,7 @@ { packages = with pkgs; [ sqlite + markdownlint-cli + lychee ]; } diff --git a/docs/cmd-protocol.md b/docs/cmd-protocol.md index b7b940a..db0d25e 100644 --- a/docs/cmd-protocol.md +++ b/docs/cmd-protocol.md @@ -29,7 +29,7 @@ is echoed back verbatim in later calls, so adapters stay stateless. ## Operations | op | stdin | stdout | -|---|---|---| +| --- | --- | --- | | `list` (source) | `{}` | `{"tasks": [Task, ...]}` | | `claim` (source) | `{"task": Task}` | `{"claimed": bool}`; false = someone else took it, orch skips it | | `report` (source) | `{"task": Task, "run": Run}` | `{}`; called when a run ends in any state | diff --git a/docs/safety.md b/docs/safety.md index 4342b30..761c615 100644 --- a/docs/safety.md +++ b/docs/safety.md @@ -48,9 +48,9 @@ A repo that already has its own `.hx/config.toml` is refused (`setup:` failure) hx reaches Claude in two ways: | mode | who runs the tools | how `allow` is enforced | -|---|---|---| +| --- | --- | --- | | `direct` (API provider) | hx | `orch guard` blocks the `tool_call` before the tool runs; orch re-checks the event stream | -| `claude_cli` (hx starts the `claude` binary; auto-on when `claude` is in PATH and `HX_BASE_URL` is unset) | the `claude` binary | requires hx with johannes/hx#182: claude asks `mcp__hx__approve` first, hx puts the question on the event bus as `tool_call` (`bash{command}`, `write|edit|read{path}`), `orch guard` blocks it before the tool runs | +| `claude_cli` (hx starts the `claude` binary; auto-on when `claude` is in PATH and `HX_BASE_URL` is unset) | the `claude` binary | requires hx with johannes/hx#182: claude asks `mcp__hx__approve` first, hx puts the question on the event bus as `tool_call` (`bash{command}`, `write{path}`, `edit{path}`, `read{path}`), `orch guard` blocks it before the tool runs | For `claude_cli` orch writes `permissions = "extensions-only"` into the generated worktree config. Then a question is allowed only while a live `tool_call` extension guards it: if the guard dies or never starts, hx denies (a dead