diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index dc54678..2139c41 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, grok, or kimi), and track progress across the define/kickoff/continue/status/close lifecycle.", - "version": "1.11.0" + "version": "1.11.1" }, { "name": "pr-flow", diff --git a/.claude/knowledge/_index.md b/.claude/knowledge/_index.md index 30ad4f7..77cea69 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` + `/adopt`) + `resume` (`/continue ` reopens an `/exit`-closed tab) +- `features/herdr-kickoff-automation.md` — herdr `herdr-launch.sh`: `launch` (`/kickoff` + `/adopt`) + `resume`; feature-detected dual contract (legacy placement vs 0.7.5+ `agent start --kind --pane`), registry-declared transport, rollback vs `blocked=unverified`, worker death from process state not terminal text - `features/lane-registry.md` — `lanes.sh` + `herdr-agent.sh` (Wave 1): the one herdr-agent wrapper (degrade-not-block, bounded wait) + centralized `$HERDR_MATCH_PRELUDE` cwd↔worktree match (consumed by herdr-tab-glyph, regression-guarded via live snapshot); lanes.sh joins states+liveness keyed by worktree_path with a worktree-tab-state degrade tri-state; env test-seams for hermetic join tests - `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 diff --git a/.claude/knowledge/features/herdr-close-automation.md b/.claude/knowledge/features/herdr-close-automation.md index 46f38b1..391710d 100644 --- a/.claude/knowledge/features/herdr-close-automation.md +++ b/.claude/knowledge/features/herdr-close-automation.md @@ -1,10 +1,10 @@ --- title: "herdr /close Automation" createdAt: 2026-06-24 -updatedAt: 2026-07-12 +updatedAt: 2026-08-11 createdFrom: "PR #18" -updatedFrom: "session: 2026-07-12" -pluginVersion: 1.8.2 +updatedFrom: "session: 2026-08-11 (herdr 0.7.5+ shell-pane lifecycle)" +pluginVersion: 1.11.1 prime: false reindexedAt: 2026-07-12 --- @@ -77,13 +77,19 @@ cleanly from another process: **is** the clean exit. (`send-text "/exit"` alone opens the slash-command menu; the separate `Return` runs it.) -## Gotcha: clean exit auto-closes the tab; inject onto idle, not mid-turn +## Gotcha: whether a clean exit closes the tab depends on the herdr version -- When Claude is the tab's **root pane** (kickoff launches it via `agent start -- - claude`), a clean `/exit` ends the pane's only process, so herdr **auto-closes the - tab**. The `SessionEnd` hook's `herdr tab close` is therefore a *backup* — it does - the real work only for sessions where Claude is *not* the root pane (e.g. launched - inside a shell pane), where exiting drops back to the shell and the tab survives. +- **Only when Claude is the tab's root pane** does a clean `/exit` end the pane's + only process and make herdr auto-close the tab. That held while `/kickoff` used the + legacy `agent start --workspace --cwd -- ` placement (herdr ≤0.7.4). +- **herdr 0.7.5+ inverted it.** `agent start` now requires an already-open pane, so a + kickoff worker runs *inside* a shell pane: `/exit` drops back to that shell and the + tab survives. The `SessionEnd` hook's `herdr tab close` — armed by `/close`'s + per-pane marker — became the **primary** teardown there, not a backup. Never write + (or reason) as if the exit alone closed the tab; both paths rely on the marker. +- What did **not** change: a modern kickoff worker is still a *registered* agent + (started via `agent start`), so `agent_status` keeps populating and the idle-poller + below is unaffected. Only the "who closes the tab" half moved. - **Self-close injects onto an idle prompt, never mid-turn.** `/close` is itself a turn; injecting `/exit` while Claude is busy is unreliable. The helper's `self-exit` arms a **detached** injector (`nohup … & disown`) that **polls the pane's diff --git a/.claude/knowledge/features/herdr-kickoff-automation.md b/.claude/knowledge/features/herdr-kickoff-automation.md index 0a22612..708fd0f 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-23 +updatedAt: 2026-08-11 createdFrom: "PR #17" -updatedFrom: "session: 2026-07-23 (adopt auto-launch reuses launch)" -pluginVersion: 1.9.3 +updatedFrom: "session: 2026-08-11 (herdr 0.7.5+ dual launch contract)" +pluginVersion: 1.11.1 prime: false reindexedAt: 2026-07-12 --- @@ -28,7 +28,9 @@ truth; this entry captures the durable design and one non-obvious gotcha. 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 +- **Spawn the worker as argv, never type it into a shell** (the LEGACY contract — + herdr ≤0.7.4; see "herdr 0.7.5 changed the launch contract" below for what the + modern path does instead). The launch is `herdr agent start "