Skip to content

Auto-launch adopted tasks in herdr#45

Merged
gering merged 3 commits into
mainfrom
task/automate-adopt-in-herdr
Jul 24, 2026
Merged

Auto-launch adopted tasks in herdr#45
gering merged 3 commits into
mainfrom
task/automate-adopt-in-herdr

Conversation

@gering

@gering gering commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Extend /adopt so that, inside a herdr session, it opens the task's tab and starts the chosen worker after creating the worktree — exactly like /kickoff.
  • Outside herdr, /adopt prints the manual launch block unchanged (now registry-driven, so it honors the selected worker).
  • Reuses the shared herdr-launch.sh helper — no launch logic duplicated; the intricate result-branching stays a single source in /kickoff.

Changes

  • adopt/SKILL.md: new [agent-selector] argument; step 12 (worker selection, deferring to kickoff step 12 for picker/announce rules); step 13 (herdr gate → herdr-launch.sh launch with the selector, branching via kickoff step 13a; else a registry-driven manual block).
  • Label derives from the resolved task name, so it stays sensible when /adopt keeps the original branch name; templates show the adopted branch, not an assumed task/<name>; worktree path built from the main-repo path captured in step 1 (cwd-safety).
  • READMEs: herdr section + root README note /adopt auto-launches too; Adopting section lists the selector flags.
  • Knowledge: herdr-kickoff-automation extended with the adopt auto-launch and its reference-not-duplicate design decision.
  • Version: work-system 1.9.2 → 1.9.3 (plugin.json + marketplace.json).

Readiness

  • ✅ READMEs updated (root + work-system)
  • ✅ Version bumped to 1.9.3 (both files in sync)
  • ➖ Changelog N/A (repo has none)
  • ✅ Knowledge entry updated
  • check-structure.py: 0 errors
  • ➖ Lint / Build N/A (markdown-only plugin repo)

Test plan

  • Inside herdr: /adopt <branch> opens a background tab at the worktree running the chosen worker
  • Inside herdr with --pick/--sol: worker selection routes through the registry and the manual block/tab reflects it
  • Outside herdr: /adopt <branch> prints the registry-driven manual launch block, worktree created unchanged
  • /adopt that keeps the original branch name → tab label + templates still use the resolved task name / adopted branch

🤖 Generated with Claude Code

gering added a commit that referenced this pull request Jul 24, 2026
Step 2 consumed the whole `$ARGUMENTS` as the branch name, so the new
`[agent-selector]` argument broke `/adopt <branch> --opus` at
`git rev-parse`. Separate the branch (the non-`-` token) from the
selector tokens, mirroring /kickoff's arg rule (`--agent` consumes its
following token). Also add the missing `--fable` flag to the documented
selector set (Arguments + step 12), matching /kickoff.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EwptRCfLvt4Knpz9rdU7z6
gering added a commit that referenced this pull request Jul 24, 2026
Step 2 consumed the whole `$ARGUMENTS` as the branch name, so the new
`[agent-selector]` argument broke `/adopt <branch> --opus` at
`git rev-parse`. Separate the branch (the non-`-` token) from the
selector tokens, mirroring /kickoff's arg rule (`--agent` consumes its
following token). Also add the missing `--fable` flag to the documented
selector set (Arguments + step 12), matching /kickoff.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EwptRCfLvt4Knpz9rdU7z6
@gering
gering force-pushed the task/automate-adopt-in-herdr branch from e82a624 to c9ef03b Compare July 24, 2026 08:34
gering and others added 3 commits July 24, 2026 12:48
Extend /adopt so that, inside a herdr session, it opens the task's tab
and starts the chosen worker after creating the worktree — exactly like
/kickoff. Outside herdr it prints the manual launch block unchanged.

- adopt/SKILL.md: add `[agent-selector]` argument; new step 12 (worker
  selection, deferring to kickoff step 12 for the picker/announce rules)
  and step 13 (herdr gate → `herdr-launch.sh launch` with the selector,
  branching on the result via kickoff step 13a; else a registry-driven
  manual block). Reuse the shared helper — no launch logic duplicated.
- Label derives from the resolved task name, so it stays sensible when
  /adopt keeps the original branch name; templates show the adopted
  branch, not an assumed `task/<name>`.
- READMEs: herdr section and root README note /adopt auto-launches too;
  Adopting section lists the selector flags.
- Knowledge: extend herdr-kickoff-automation with the adopt auto-launch
  and its reference-not-duplicate design decision.
- Bump work-system 1.9.2 → 1.9.3 (plugin.json + marketplace.json).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EwptRCfLvt4Knpz9rdU7z6
Step 2 consumed the whole `$ARGUMENTS` as the branch name, so the new
`[agent-selector]` argument broke `/adopt <branch> --opus` at
`git rev-parse`. Separate the branch (the non-`-` token) from the
selector tokens, mirroring /kickoff's arg rule (`--agent` consumes its
following token). Also add the missing `--fable` flag to the documented
selector set (Arguments + step 12), matching /kickoff.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EwptRCfLvt4Knpz9rdU7z6
Fixes for 9 confirmed findings from the local swarm review:

- adopt step 12 (correctness): the selector was described as "tokens
  after the branch name" and `--agent <cli[:model]>` as "used verbatim",
  both drifted from kickoff — `/adopt --opus <branch>` lost the selector
  and `--agent claude:sonnet` would be rejected (exit 2). Rewrite to
  consume the position-independent selector from step 2 and pass the
  bare `cli[:model]` value for `--agent`; lean on kickoff step 12 for
  the default/picker/announce rules instead of re-paraphrasing them.
- CHANGELOG: add the missing work-system 1.9.3 entry (the rebase onto
  main pulled in a CHANGELOG.md that stopped at 1.9.2).
- adopt herdr success report: add the drafted-TASK.md pointer and use
  kickoff's "Location:" label (was "Worktree:"); align the manual block.
- work-system README shared section: reword the "task/<name> branch" and
  "your kickoff session" claims so they hold for the adopt path too.
- knowledge _index.md: drop the implementation-detail parenthetical from
  the always-loaded index (context economy; detail lives in the body).
- herdr-launch.sh header: list /adopt alongside /kickoff as a launch caller.

Left as-is: the dash-prefixed/multi-positional branch-parsing edge case
(verifier PLAUSIBLE, contrived, `git rev-parse` fails closed).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EwptRCfLvt4Knpz9rdU7z6
@gering
gering force-pushed the task/automate-adopt-in-herdr branch from 9e4dc5b to f650a65 Compare July 24, 2026 10:48
@gering
gering merged commit 9746a38 into main Jul 24, 2026
1 check passed
@gering
gering deleted the task/automate-adopt-in-herdr branch July 24, 2026 10:50
gering added a commit that referenced this pull request Jul 24, 2026
## Summary
- `/kickoff` and `/define` now also trigger a herdr tab-glyph refresh, so the Manager tab's `◉` hub mark (and sibling worker glyphs) get stamped/updated on these two lifecycle events — not only on `/close`, `/list`, `/status`, `/continue`-reopen, and the pr-flow shim.
- Previously, in a repo where you mostly `/kickoff`, the Manager tab could lack its `◉` until an unrelated survey command happened to run there.

## Changes
- `plugins/work-system/skills/kickoff/SKILL.md`: new step 14, after the launch step, runs `herdr-tab-glyph.sh refresh --cached <main-repo>` (best-effort, silent) so the freshly-created tab is included.
- `plugins/work-system/skills/define/SKILL.md`: new step 9, after the task file is written, runs the same refresh (the new task has no tab yet — the value is the `◉` + resyncing existing tabs).
- `.claude/knowledge/features/herdr-tab-glyphs.md` and `plugins/work-system/README.md`: updated the trigger-point documentation to match.
- `CHANGELOG.md`: entry under work-system 1.9.4 (bumped from the originally intended 1.9.3 after rebasing past PR #45, which had already claimed that version for a different change).
- Version bump: `work-system` 1.9.2 → 1.9.4 (patch — adds triggers, no new surface).

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant