add herdr dispatch skill: hand a task to a new Claude tab #23

Merged
jerome merged 4 commits from herdr-dispatch into main 2026-07-08 23:25:26 +03:00
Collaborator

Goal

Add a dispatch skill to the herdr-cli plugin: mid-conversation, hand a task
off to a fresh Claude running in its own tab and git worktree, then return
immediately.

Flow

  1. Resolve repo + base branch.
  2. Expand the user's one-liner into a bounded brief (Goal / Context /
    Constraints / Definition of done). The dispatched agent cannot ask questions,
    so ambiguity must be resolved before dispatch.
  3. git worktree add .worktrees/<branch> -b <branch> <base>.
  4. herdr tab create --label "<title>" --no-focus + herdr pane run <pane> "claude".
  5. Send the brief, read it back out of the input box, then Enter.
  6. Report pane id + how to check on it. Don't wait.

Tab titles are capped at 12 characters and named noun-first
(dispatch skill, not add-dispatch-skill-t).

Two bugs found by actually running the procedure

The first draft of this skill was wrong in two ways. Both were caught by
executing it against a live herdr server, not by reading the CLI help.

  • herdr agent start splits the caller's tab — it does not create one, even
    with no --split/--tab. It returned a tab_id equal to the calling tab and
    halved the pane. Fixed by using tab create + pane run "claude", at the cost
    of the agent name (target by pane id instead).
  • agent_status: idle does not mean Claude accepts input. herdr flips the
    pane to idle while the startup banner is still painting; a brief sent then is
    silently dropped — no error, empty input box, pane looks healthy. Fixed by
    send → pane read the text back → only then Enter. agent send is idempotent
    while the box is empty; Enter is not.

Both corrections also landed in the parent herdr-cli reference skill, which
carried the same wrong agent start advice.

Separately, the first draft asserted a footgun — that newlines in agent send
submit early. Tested against a live pane: false, they land as a multiline
input. Footgun removed rather than shipped.

Verification

Ran the corrected procedure end-to-end against a live herdr server: new tab
labelled demo hi, claude launched in it, brief landed on the first
read-back attempt, agent replied, tab closed. Not a unit test — the actual
commands the skill tells you to run.

🤖 Generated with Claude Code

## Goal Add a `dispatch` skill to the `herdr-cli` plugin: mid-conversation, hand a task off to a fresh Claude running in its own tab and git worktree, then return immediately. ## Flow 1. Resolve repo + base branch. 2. Expand the user's one-liner into a bounded brief (Goal / Context / Constraints / Definition of done). The dispatched agent cannot ask questions, so ambiguity must be resolved *before* dispatch. 3. `git worktree add .worktrees/<branch> -b <branch> <base>`. 4. `herdr tab create --label "<title>" --no-focus` + `herdr pane run <pane> "claude"`. 5. Send the brief, read it back out of the input box, then Enter. 6. Report pane id + how to check on it. Don't wait. Tab titles are capped at **12 characters** and named noun-first (`dispatch skill`, not `add-dispatch-skill-t`). ## Two bugs found by actually running the procedure The first draft of this skill was wrong in two ways. Both were caught by executing it against a live herdr server, not by reading the CLI help. - **`herdr agent start` splits the caller's tab — it does not create one**, even with no `--split`/`--tab`. It returned a `tab_id` equal to the calling tab and halved the pane. Fixed by using `tab create` + `pane run "claude"`, at the cost of the agent *name* (target by pane id instead). - **`agent_status: idle` does not mean Claude accepts input.** herdr flips the pane to `idle` while the startup banner is still painting; a brief sent then is *silently dropped* — no error, empty input box, pane looks healthy. Fixed by send → `pane read` the text back → only then Enter. `agent send` is idempotent while the box is empty; Enter is not. Both corrections also landed in the parent `herdr-cli` reference skill, which carried the same wrong `agent start` advice. Separately, the first draft asserted a footgun — that newlines in `agent send` submit early. Tested against a live pane: **false**, they land as a multiline input. Footgun removed rather than shipped. ## Verification Ran the corrected procedure end-to-end against a live herdr server: new tab labelled `demo hi`, `claude` launched in it, brief landed on the first read-back attempt, agent replied, tab closed. Not a unit test — the actual commands the skill tells you to run. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Mid-conversation delegation: expands a one-liner into a bounded brief,
creates .worktrees/<branch>, starts claude in a new tab, submits, returns.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
fix dispatch + herdr-cli: agent start splits, idle != ready
All checks were successful
gitleaks / gitleaks (pull_request) Successful in 4s
2bf09081ea
Both discovered by actually running the procedure:

- `herdr agent start` splits the caller's tab even with no --split/--tab.
  Use `tab create` + `pane run "claude"` for a real new tab.
- herdr reports agent_status: idle while Claude's banner is still painting;
  a brief sent then is silently dropped. Send, read the text back out of the
  input box, then Enter. Send is idempotent while empty; Enter is not.

Also: multiline `agent send` does NOT submit early (verified) - dropped the
footgun that claimed it did.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
register dispatch skill in README + plugin/marketplace descriptions
All checks were successful
gitleaks / gitleaks (pull_request) Successful in 4s
aed1aa8e2d
README's plugin table omitted the herdr-cli plugin entirely and listed
forgejo-cli as having one skill (it has two). Both fixed alongside adding
dispatch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
README: fix install commands after chiche-plugins rename
All checks were successful
gitleaks / gitleaks (pull_request) Successful in 3s
89775ea103
The rename in f4a563a never reached the docs. Every install line pointed at
the old marketplace name, and the plugin table called `tasks` "task".

- marketplace add: public/skills -> public/chiche-plugins
- install: *@skills -> *@chiche-plugins, and list herdr-cli (was missing)
- marketplace update skills -> chiche-plugins
- title, and `task` -> `tasks`

Verified every name against the shipped plugin.json / dir layout.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jerome approved these changes 2026-07-08 23:25:23 +03:00
jerome merged commit ec1cc27b64 into main 2026-07-08 23:25:26 +03:00
jerome deleted branch herdr-dispatch 2026-07-08 23:25:27 +03:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
public/chiche-plugins!23
No description provided.