From 362df65ea186aa6dfc81fffb7cbb06931ff68f62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20S=C3=B6derlund?= Date: Thu, 29 Oct 2026 09:29:12 +0100 Subject: [PATCH 1/4] docs(agents): close the agent team before done - Orchestrators left idle workers and handed cleanup to the user. - Add a clean-up step: close panes, tabs, jj workspaces and local dev. - Close each worker once its last unit is accepted. --- agents/skills/agent-team/SKILL.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/agents/skills/agent-team/SKILL.md b/agents/skills/agent-team/SKILL.md index d725d4ce..05a5f8d1 100644 --- a/agents/skills/agent-team/SKILL.md +++ b/agents/skills/agent-team/SKILL.md @@ -187,6 +187,19 @@ Unclear → open question in the brief, do not invent. Same handoff fails twice Implementer may make local `jj` commits. Nobody pushes unless asked. +Close a worker as soon as its last unit is accepted. Do not keep idle panes for "maybe later". + +### 5. Clean up + +The outcome is not realized while the team still runs. Clean up before you report done. Do not hand cleanup to the user as a "leftovers" list. + +- Close every pane and tab the team created: `herdr pane close `, `herdr tab close `. Then check `herdr pane list --workspace "$HERDR_WORKSPACE_ID"` shows only panes the user had before. +- Worker jj workspaces: check that each worker's commits are in the stack (`jj log -r '@- & ~::'` is empty), then `jj workspace forget ` and remove the directory. +- Stop local dev and other long processes the team started, unless the user needs them next. Say which ones you left running, and why. +- Append `orchestrator: team closed` to Handoff. + +Something you cannot close safely (unique work, a process the user owns): name it in the final report, with the command to close it. + ## Shapes Default is above: solo, then maybe an implement sibling. @@ -203,4 +216,5 @@ Default is above: solo, then maybe an implement sibling. - Do not use Claude's experimental in-process agent teams. This protocol is Herdr panes so pi, agy, and cursor can sit on the same team. - Agy has no user compact: keep its units short and `/clear` between them. - After a restart: `herdr agent list`, read the brief, continue from Handoff. +- An orchestrator that ends with idle workers has not finished. Close the team (step 5) before the last report. - Execution workers (pi, Composer, or agy on bulk): vacuum. One tight unit, an output path, a stop. Do not load this skill into those panes. From 86fbb5f86bd389ab6658fed995e1fb07f240dc9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20S=C3=B6derlund?= Date: Thu, 29 Oct 2026 09:51:15 +0100 Subject: [PATCH 2/4] docs(agent-team): review each stack apart - A mixed-stack diff hid stack rules from a single reviewer. - Give each touched stack its own review unit with its style skills. - Each unit reads the AGENTS.md chain down to the touched paths. - Treat data (dbt, Python, warehouse SQL) as a stack of its own. --- agents/skills/agent-team/SKILL.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/agents/skills/agent-team/SKILL.md b/agents/skills/agent-team/SKILL.md index 05a5f8d1..1595aded 100644 --- a/agents/skills/agent-team/SKILL.md +++ b/agents/skills/agent-team/SKILL.md @@ -39,7 +39,7 @@ Add an agent when either dimension fails here. Add none when both pass. Drop or - Default: Opus 5.5 orchestrates and owns architecture; `pi` (DeepSeek V4.1 Flash) writes code; `agy` (Gemini 4 Argon) takes adversarial review and writing. - Write (`AGENTS.md`, API docs): Gemini 4 Argon via `agy`. -- Adversarial review: Gemini 4 Argon via `agy` (or isolated reviewer; see below). +- Adversarial review: Gemini 4 Argon via `agy` (or isolated reviewer; see below). One review unit per stack touched; see Isolated reviewer. - Bulk, multimodal, or corpus: `agy` fans out subagents; orchestrator reads `report.md` only. - Niche (`cursor`): Grok 4.7 or Composer 2.5 only when you need an extra frame or fallback coder. @@ -210,6 +210,8 @@ Default is above: solo, then maybe an implement sibling. **Isolated reviewer.** When each cycle must reload fat style skills plus `AGENTS.md`, or the implementer needs an adversarial gate. Reviewer is Gemini 4 Argon (`agy`) or Opus 5.5 (`claude`), not `pi`. Prime it with this skill. Spawn when the first implement unit lands. Load this skill and the stack style skill, read `AGENTS.md` on the touched path, write `review.md`, token `PHASE_COMPLETE` or `BLOCKED`, stop. Orchestrator reads `review.md`; it does not ingest the style corpus. Not for one or two reviews, and not when review is only "matches the brief." +Review each stack apart. A diff that touches backend and frontend gets one review unit per stack, never one review over the mixed diff. Each review unit loads the style skills of its stack and reads every `AGENTS.md` from the repo root down to each touched path. A data stack (dbt, Python, warehouse SQL) is a stack of its own. + ## Guardrails - Do not spawn, and do not start a delegated unit, until Done when is a command or proof this pane can run without the worker. If the outcome is still an open question, ask. Do not staff a team to invent it. From 438aa9744f927f6349f849611ed0557555368a24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20S=C3=B6derlund?= Date: Thu, 29 Oct 2026 09:55:12 +0100 Subject: [PATCH 3/4] fix(agent-team): count done as a landed prompt - agy finishes a short prompt before the first status check. - The loop read done as dropped and sent the prompt three times. - Treat working or done as landed. --- agents/skills/agent-team/SKILL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agents/skills/agent-team/SKILL.md b/agents/skills/agent-team/SKILL.md index 1595aded..614b51ea 100644 --- a/agents/skills/agent-team/SKILL.md +++ b/agents/skills/agent-team/SKILL.md @@ -143,12 +143,12 @@ herdr agent prompt impl "Implement . Write /tmp/agent-team//impl.md. **Confirm that every prompt landed.** A prompt sent right after `agent start` is often dropped: the agent reports `idle`, `interactive_ready: true`, and its input box is empty. `agent_prompted` does not mean the agent got the text. After each `herdr agent prompt`, -check that the status turns `working`; if it does not, send the prompt once more: +check that the status turns `working` (or `done`, when a short prompt already finished); if it does not, send the prompt once more: ```bash for i in 1 2 3; do sleep 15 - [ "$(herdr agent get impl | jq -r .result.agent.agent_status)" = working ] && break + case "$(herdr agent get impl | jq -r .result.agent.agent_status)" in working|done) break ;; esac herdr agent read impl --source visible | tail -5 # empty input box = dropped herdr agent prompt impl "" done From 79d5398f98155549efe2f293986b4631ec14ae7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20S=C3=B6derlund?= Date: Fri, 30 Oct 2026 09:39:32 +0100 Subject: [PATCH 4/4] chore(ghostty): align config with 1.4.0 Ghostty 1.4.0 changed copy-on-select semantics, deprecated scrollback-limit, and bundles the exact Nord theme we carried in the repo. - Set copy-on-select = both so mouse selection keeps writing to both primary and system clipboards. - Rename scrollback-limit to scrollback-limit-bytes. - Drop inert shell-integration-features: Herdr fronts all terminal sessions. - Remove duplicate Nord theme file and its dotfile link. --- ghostty/config | 9 ++++----- ghostty/themes/Nord | 22 ---------------------- mise/conf.d/ghostty.toml | 1 - 3 files changed, 4 insertions(+), 28 deletions(-) delete mode 100644 ghostty/themes/Nord diff --git a/ghostty/config b/ghostty/config index e7200e8d..dd18ee51 100644 --- a/ghostty/config +++ b/ghostty/config @@ -17,15 +17,14 @@ window-title-font-family = Iosevka SS08 # Mouse & Cursor cursor-style-blink = true mouse-hide-while-typing = true -# Write to both the primary and system clipboards (osc52 from nvim included) -copy-on-select = clipboard +# Write to both the primary and system clipboards +copy-on-select = both focus-follows-mouse = true # Terminal & Integration command = direct:/home/odsod/.config/ghostty/ghostty-herdr.sh -# Handled by tmux -scrollback-limit = 0 -shell-integration-features = cursor,title,path,ssh-env,ssh-terminfo,no-sudo +# Handled by Herdr +scrollback-limit-bytes = 0 # Keybindings # Release the mouse when a TUI or agent grabs mouse reporting diff --git a/ghostty/themes/Nord b/ghostty/themes/Nord deleted file mode 100644 index d83a55de..00000000 --- a/ghostty/themes/Nord +++ /dev/null @@ -1,22 +0,0 @@ -palette = 0=#3b4252 -palette = 1=#bf616a -palette = 2=#a3be8c -palette = 3=#ebcb8b -palette = 4=#81a1c1 -palette = 5=#b48ead -palette = 6=#88c0d0 -palette = 7=#e5e9f0 -palette = 8=#596377 -palette = 9=#bf616a -palette = 10=#a3be8c -palette = 11=#ebcb8b -palette = 12=#81a1c1 -palette = 13=#b48ead -palette = 14=#8fbcbb -palette = 15=#eceff4 -background = #2e3440 -foreground = #d8dee9 -cursor-color = #eceff4 -cursor-text = #282828 -selection-background = #eceff4 -selection-foreground = #4c566a diff --git a/mise/conf.d/ghostty.toml b/mise/conf.d/ghostty.toml index fa10d175..ae7a3792 100644 --- a/mise/conf.d/ghostty.toml +++ b/mise/conf.d/ghostty.toml @@ -1,6 +1,5 @@ [dotfiles] "~/.config/ghostty/config" = "../../ghostty/config" -"~/.config/ghostty/themes" = "../../ghostty/themes" "~/.config/ghostty/ghostty-herdr.sh" = "../../ghostty/ghostty-herdr.sh" [bootstrap.dnf.repos]