Skip to content

Offer PATH-detected cc-harness agents at /kickoff (work-system 1.12.0) - #52

Open
gering wants to merge 1 commit into
mainfrom
task/offer-cc-harness-agents-at-kickoff
Open

Offer PATH-detected cc-harness agents at /kickoff (work-system 1.12.0)#52
gering wants to merge 1 commit into
mainfrom
task/offer-cc-harness-agents-at-kickoff

Conversation

@gering

@gering gering commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • /kickoff can now launch cc-harness foreign agents — full Claude Code sessions driven by a foreign model (e.g. cc-harness:grok, cc-harness:kimi, cc-harness:sol) through a local gateway. Strictly more capable than the native grok/codex CLI voice, which has no work-system skills.
  • Auto-detected via one command -v cc-harness-agents. Helper absent → no behavior change at all.
  • The plugin is a pure consumer of a small contract (list / exec). No gateway URL, no token path, no model table, no per-agent code path — whatever list prints becomes a picker entry.
  • The picker becomes two pages so the familiar path stays one page and the harness list can grow freely.

Changes

scripts/agent-registry.sh

  • PATH-detect the helper; merge its 4-column TSV (name/model/available/note) into the 5-column list as cli=cc-harness. Availability and note come straight from the helper — no re-probing of gateway or credentials.
  • Only literal available=yes counts as available (unknown fails closed for launch).
  • resolve cc-harness:<id> emits cc-harness-agents exec <id> -- claude [-n <session>] /work-system:continue. No --model: the helper sets it via env, then execs into claude, so the herdr pane roots at claude and agent_status + /close teardown stay intact.
  • Helper exit 3 ("capability absent" — no token) is a silent degrade, distinct from a listed-but-unavailable provider (resolve exit 3 with the helper's fix hint).

Picker (skills/kickoff/SKILL.md, referenced by /adopt)

  • Page 1: the familiar worker list plus a single cc-harness agents ▸ aggregate, shown only when the helper printed rows. Page 2: the concrete harness agents.
  • Merging flat would have meant ~12 entries against AskUserQuestion's hard 4-options-per-question cap — which the 7 native entries already exceeded.
  • The aggregate is a class, never a SELECTOR; the "save as project default?" answer is taken from the page where the final pick happened. Where a set still exceeds 4: consolidate and name what was left out (--agent <name> reaches any entry) — never silently truncate.

Lifecycle parity

  • supports= is the full claude set — /continue, /close Scenario A/B and tab glyphs work unchanged. Nothing assumes argv[0] == claude.
  • A committed cc-harness:<id> default validates through the helper and falls back to the picker when the helper is gone (same path as a stale native name).

Bug fixed while demoing

  • list's human table dropped the last harness row: $( ) strips the trailing newline off the merged block, and the table's while read then discards the final newline-less line — silently, and only in the table, since --json parses it fine. That table is exactly what the picker reads, so the lost row was an agent the user could never choose.

Docs

  • New plugins/work-system/docs/cc-harness-agents.md — the full contract (both subcommands, TSV columns, exec semantics, exit codes), a setup sketch, and security notes for helper authors.
  • Knowledge, both READMEs, CHANGELOG, CLAUDE.md; version bumped to 1.12.0 in plugin.json + marketplace.json.

Readiness

  • ✅ Uncommitted changes — clean
  • ✅ Rebase vs main — up-to-date
  • ✅ README — root + plugin updated
  • ✅ Version — work-system 1.11.0 → 1.12.0 (minor), both files in sync
  • ✅ Changelog — 1.12.0 entry added
  • ✅ Knowledge — kickoff-agent-selection.md + _index.md updated
  • ✅ Tests — check-structure.py green (0 errors), incl. test_agent_registry.py
  • ➖ Linter / Build — N/A (declarative repo, no build step)

Dependency status

The paired dotfiles helper (gering/dotfiles PR #12) is still open and not installed on PATH here. Everything in this PR is built against the documented contract and verified with mocks — no live integration has been exercised. Once the helper lands, a real /kickoff --pick run is the remaining verification.

Test plan

  • python3 plugins/work-system/scripts/test_agent_registry.py — passes
  • python3 scripts/check-structure.py — 0 errors
  • With no helper on PATH: agent-registry.sh list is unchanged, and resolve cc-harness:grok exits 2 with a hint naming the helper
  • With a stub helper on PATH: all its rows appear in list (including the last one), --json and the human table agree on the row count
  • resolve cc-harness:<id> --session foo yields cc-harness-agents exec <id> -- claude -n foo /work-system:continue with no --model
  • A stub row with available=no still emits argv and exits 3 with the helper's note

🤖 Generated with Claude Code

https://claude.ai/code/session_01DE9DzwzzsMMu84KxC1cB5R

When a `cc-harness-agents` helper is on PATH, /kickoff merges its foreign
agents into the picker: full Claude Code sessions driven by a foreign model
(cc-harness:grok, :kimi, :sol) via a local gateway. Auto-detected via one
`command -v`; helper absent means no change from today.

- agent-registry.sh: merge the helper's 4-column TSV (name/model/available/
  note) into the 5-column list as cli=cc-harness, map only literal
  `available=yes` to available (fail closed on `unknown`), and resolve
  cc-harness:<id> to `cc-harness-agents exec <id> -- claude [-n <s>]
  /work-system:continue` — no --model, the helper sets it via env before
  exec'ing into claude, so the herdr pane roots at claude and agent_status +
  /close stay intact.
- Helper exit 3 (capability absent) is a silent degrade, distinct from a
  listed-but-unavailable provider (resolve exit 3 + the helper's fix hint).
- No per-agent code: whatever `list` prints becomes a picker entry — tested
  with a name the plugin has never shipped.
- Lifecycle parity: supports= is the full claude set; a committed
  cc-harness:<id> default validates through the helper and falls back to the
  picker when it is gone.
- Docs: plugins/work-system/docs/cc-harness-agents.md (contract + setup),
  knowledge, READMEs, CHANGELOG; kickoff/adopt picker prose.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DE9DzwzzsMMu84KxC1cB5R
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