make pi the only harness, drop Claude Code support entirely

Removed AGENT_KIND/DIWAN_HARNESS and CLAUDE_PERMISSION_MODE/
DIWAN_PERMISSION_MODE; herdr_agent_start_args now hardcodes --kind pi and
always appends PI_APPROVE_FLAG. Motivated by a real live failure: Claude
Code blocks on an interactive first-run trust dialog in any content repo
it hasn't seen before, which herdr's real-pane dispatch can't answer
(agent_not_ready after a 30s timeout). pi has no such dialog and no
per-tool-call approval gate, so it was already the better fit for
diwan's unattended model -- confirmed live against a brand-new content
repo with zero blocking.

Updated PROTOCOL.md/DESIGN.md accordingly, replacing the harness-
agnosticism framing with an explicit pi-only statement, while leaving
TICK.md/DO.md untouched since neither ever mentioned a specific harness.
This commit is contained in:
marc committed 2026-11-09 10:49:12 +01:00
1 parent d52f733f14
commit 18c8284349
3 files changed
+23 -33

No files matched your search

+4 -4
View File
@@ -94,7 +94,7 @@ Plain `TODO`/`DONE` items about maintaining diwan's own domain — the notes the
### Config
Reserved for configuration values governing diwan's own behavior — tick cadence, tab retention, which harness to dispatch, that kind of thing — as one legible place instead of scattered environment variables. **Not implemented yet.** The `diwan` CLI doesn't read this heading for configuration as of this writing; it's a placeholder for a future change, not a convention in force today. Env vars (`DIWAN_HARNESS`, `DIWAN_PERMISSION_MODE`, `DIWAN_PI_APPROVE`, `DIWAN_MAX_TICK_TABS`) remain the only actual knobs until that lands.
Reserved for configuration values governing diwan's own behavior — tick cadence, tab retention, that kind of thing — as one legible place instead of scattered environment variables. **Not implemented yet.** The `diwan` CLI doesn't read this heading for configuration as of this writing; it's a placeholder for a future change, not a convention in force today. Env vars (`DIWAN_DIR`, `DIWAN_NOTES_DIR`, `DIWAN_PI_APPROVE`, `DIWAN_MAX_TICK_TABS`) remain the only actual knobs until that lands.
### Meta
@@ -120,11 +120,11 @@ Every automated change is a git commit, full stop. There is no separate undo mec
Sessions are herdr (https://herdr.dev) terminals, not a diwan-invented session store. All diwan activity lives in one herdr workspace labeled `diwan` (created on first use if missing). Within it:
- a `diwan tick` run is a tab labeled `tick-<UTC timestamp>`, with an agent of kind `$DIWAN_HARNESS` (default `claude`) started in its root pane and prompted with the tick instructions;
- a `diwan tick` run is a tab labeled `tick-<UTC timestamp>`, with a `pi` agent started in its root pane and prompted with the tick instructions;
- a `diwan do` session for a given `DIWAN_ID` is a tab labeled exactly that `DIWAN_ID`, same pattern — this is *why* `DIWAN_ID` must be a valid herdr agent name (`^[a-z][a-z0-9_-]{0,31}$`), not an arbitrary string.
To resume a `DIWAN_ID`, `diwan` first checks whether its agent is still alive (`herdr agent get <id>`) and just prompts it if so; if the process has exited (normal between ticks), it finds the tab by label and starts a fresh agent in the same pane, in the same working directory — the heading's own content is what carries continuity, not agent conversation history. `diwan` shells out to the real `herdr` CLI (the `diwan` CLI has the exact calls, verified live against herdr 0.9.5; run `herdr --skill` to check this hasn't drifted on a newer version). When `herdr` isn't on PATH, every call prints what it would have run instead of failing, so the pipeline stays testable without herdr installed.
## Harness-agnosticism
## The harness is `pi`
Nothing here should assume a specific LLM product. `TICK.md` and `DO.md` are plain-language procedures; the `diwan` CLI is the only "hands" they need (plus ordinary file edits and git). Pointing a different harness at the same procedures should just work.
diwan dispatches `pi`, and only `pi` — not a pluggable choice. It's the only herdr-supported agent kind diwan has ever needed that runs real work fully unattended: it has no per-tool-call approval gate at all (unlike e.g. Claude Code, which otherwise prompts before every edit/bash call and would defeat the "act first, report passively" model), so no permission-mode flag or similar is needed to let it act freely. The one thing that can still block a dispatch is pi's one-time project-trust decision for protected `.pi/*` resources, if a content repo ever has any — `--approve` (always passed, see the `diwan` CLI) makes that a one-shot yes instead of a hang; override with `DIWAN_PI_APPROVE` if a different flag is ever needed. `TICK.md` and `DO.md` are still plain-language procedures with nothing pi-specific baked into their wording — that's just good practice, not a promise of swapping in a different harness later.