From 90f4f389a25240abcbc82485f6c2e4336293364a Mon Sep 17 00:00:00 2001 From: Robert Gering Date: Thu, 23 Jul 2026 12:58:02 +0200 Subject: [PATCH 1/3] Auto-launch adopted tasks in herdr (work-system 1.9.3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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/`. - 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 Claude-Session: https://claude.ai/code/session_01EwptRCfLvt4Knpz9rdU7z6 --- .claude-plugin/marketplace.json | 2 +- .claude/knowledge/_index.md | 2 +- .../features/herdr-kickoff-automation.md | 40 ++++++-- README.md | 2 +- .../work-system/.claude-plugin/plugin.json | 2 +- plugins/work-system/README.md | 22 +++-- plugins/work-system/skills/adopt/SKILL.md | 91 +++++++++++++++++-- 7 files changed, 134 insertions(+), 27 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index ed4b283..fef4d04 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -18,7 +18,7 @@ "name": "work-system", "source": "./plugins/work-system", "description": "Generic task and worktree workflow system for Claude Code. Manage tasks as markdown files, run them in isolated git worktrees with a choice of worker agent (Claude, codex, or grok), and track progress across the define/kickoff/continue/status/close lifecycle.", - "version": "1.9.2" + "version": "1.9.3" }, { "name": "pr-flow", diff --git a/.claude/knowledge/_index.md b/.claude/knowledge/_index.md index 892c9ab..126ed0f 100644 --- a/.claude/knowledge/_index.md +++ b/.claude/knowledge/_index.md @@ -12,7 +12,7 @@ ## Features - `features/backfill-and-origin-metadata.md` — `/backfill-knowledge` significance bar + origin-reconstruction cascade - `features/statusline-integration.md` — Status-line segments: plugins can't own `statusLine.command`; marker-block injection; the `[ks …]` + `[ws …]` two-segment coexistence and ws's never-block-on-network PR cache -- `features/herdr-kickoff-automation.md` — herdr `herdr-launch.sh`: `launch` (`/kickoff`) + `resume` (`/continue ` reopens an `/exit`-closed tab) +- `features/herdr-kickoff-automation.md` — herdr `herdr-launch.sh`: `launch` (`/kickoff` + `/adopt`, which references kickoff's step 12/13 prose to avoid drift) + `resume` (`/continue ` reopens an `/exit`-closed tab) - `features/herdr-close-automation.md` — `/close` in herdr: cwd-tab teardown, plugin SessionEnd hook, the one TUI-exit primitive, detached self-exit onto idle - `features/herdr-tab-glyphs.md` — Task-state glyphs (`○ ● ◇ ◆ ✓`) + main-root `◉` on herdr tab labels: `states` mode in the self-contained renderer, sync-vs-`--cached` PR refresh per caller, exact-cwd rename rules, soft pr-flow shim - `features/kickoff-agent-selection.md` — `/kickoff` worker choice: single committed per-repo default (no global/fallback/ranking) else picker; `agent-registry.sh` as SoT; bounded model-aware grok probe (inconclusive→trust-auth); non-claude "document, don't fake" degradation; announce-not-prompt for external defaults diff --git a/.claude/knowledge/features/herdr-kickoff-automation.md b/.claude/knowledge/features/herdr-kickoff-automation.md index 9c184e3..6354514 100644 --- a/.claude/knowledge/features/herdr-kickoff-automation.md +++ b/.claude/knowledge/features/herdr-kickoff-automation.md @@ -1,10 +1,10 @@ --- title: "herdr /kickoff + /continue-reopen Automation" createdAt: 2026-06-24 -updatedAt: 2026-07-21 +updatedAt: 2026-07-23 createdFrom: "PR #17" -updatedFrom: "session: 2026-07-21 (fully-qualify kickoff's /continue)" -pluginVersion: 1.9.2 +updatedFrom: "session: 2026-07-23 (adopt auto-launch reuses launch)" +pluginVersion: 1.9.3 prime: false reindexedAt: 2026-07-12 --- @@ -14,7 +14,8 @@ reindexedAt: 2026-07-12 Inside a herdr session, `/kickoff` replaces its manual "open a terminal yourself" block with an automated tab launch. The launch lives in one shared, testable helper — `plugins/work-system/scripts/herdr-launch.sh` — with two subcommands: -`launch` (called from `skills/kickoff/SKILL.md` step 13) and `resume` (called from +`launch` (called from **both** `skills/kickoff/SKILL.md` step 13 and +`skills/adopt/SKILL.md` step 13 — see the adopt note below) and `resume` (called from `skills/continue/SKILL.md`'s reopen path — the main session with a `` arg, or a *different* task's name given from inside a worktree). The helper is the source of truth; this entry captures the durable design and one non-obvious gotcha. @@ -23,10 +24,10 @@ truth; this entry captures the durable design and one non-obvious gotcha. - **Encapsulate the launch in a script, not skill prose.** The deterministic sequence (gate → `agent start` → robust pane-id parse → `pane move` → exit code) - lives in `herdr-launch.sh` so it can be `bash`-tested and reused (e.g. by a - future `/adopt` automation), per the project's helper-script convention and the - "prose skill logic drifts" memory. The skill only derives the label and branches - on the helper's `moved=yes|no` / exit code. + lives in `herdr-launch.sh` so it can be `bash`-tested and reused — realized in + work-system 1.9.3 by `/adopt` (see the adopt note below) — per the project's + helper-script convention and the "prose skill logic drifts" memory. The skill only + derives the label and branches on the helper's `moved=yes|no` / exit code. - **Spawn the worker as argv, never type it into a shell.** The launch is `herdr agent start "