Skip to content

feat(spawn): generalise claude-handoff into agent-agnostic spawn skill - #647

Draft
mattpocock wants to merge 4 commits into
release/v1.2from
spawn-skill
Draft

feat(spawn): generalise claude-handoff into agent-agnostic spawn skill#647
mattpocock wants to merge 4 commits into
release/v1.2from
spawn-skill

Conversation

@mattpocock

@mattpocock mattpocock commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Replaces claude-handoff with a generic spawn skill that hands the conversation off to a fresh background agent — chosen by one positional argument, defaulting to the agent the skill is running in.

Supported agents

claude | codex | pi | cursor | opencode | copilot (the Sandcastle set).

Design

  • SKILL.md stays sparse: it defines only what a handoff summary is (suggested skills, reference-don't-duplicate, redaction) and one invocation line. The agent-vs-agent branch collapses to one positional argument.
  • Per-agent mechanics live in spawn.sh, run but never read by the agent.
  • Management tiers (no nohup — research confirmed none of the five non-claude CLIs has a native background job manager):
    1. claude → native claude --bg --name + claude agents.
    2. herdr server running → herdr agent start "<name>" --cwd $PWD --no-focus -- <interactive agent cmd + prompt>: named, listable, readable, steerable, attachable.
    3. Fallback → transient systemd-run --user unit: systemctl --user status/stop, journalctl --user -u <unit> -f, plus a per-agent resume hint (codex exec resume <id>, pi -c, cursor-agent resume, opencode run -c, copilot --resume).
  • Prompt via heredoc/stdin (- or omitted third arg) so long summaries with embedded quotes survive; a plain positional prompt still works.

Testing

  • Stubbed claude/herdr: correct argv on both branches, multiline quoted prompts intact.
  • Real systemd-run --user fallback: journal shows the unit executed codex exec --sandbox workspace-write … with the prompt as one intact argv; transient unit self-cleaned on exit.
  • Real codex exec one-shot verified the banner prints session id: <uuid> for resume.

Note: the ~/.claude/skills/claude-handoff symlink will dangle once this merges — re-run the symlink setup to point spawn at the new path.

🤖 Generated with Claude Code

mattpocock and others added 3 commits July 16, 2026 13:12
Rework grilling from one-question-at-a-time to asking the whole
frontier each round, with background sub-agents for fact-finding so
research never blocks the round. Fold the batch-grill-me experiment
into grilling and delete it. Re-sync the docs page, including how to
opt back into one-at-a-time via global CLAUDE.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reshape the logic branch from a terminal app into a single
self-contained HTML file a non-developer can drive: a labelled
state panel, free-play buttons, and tabbed guided walkthroughs
(scenarios) with the ordered buttons to press underneath each.
The portable pure-logic module still lifts into the real code;
the HTML shell is the throwaway primary source.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
SKILL.md now only defines the handoff; per-agent launch mechanics
(claude --bg vs backgrounded codex exec) live in a bundled spawn.sh
the agent runs but never reads. Prompt arrives via heredoc/stdin so
long summaries with quotes survive.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 085d886

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

… nohup

Six agents (claude, codex, pi, cursor, opencode, copilot). claude keeps
its native --bg/agents management. Everything else spawns interactively
inside herdr when its server is up (list/read/send/attach); otherwise a
transient systemd --user unit gives status/logs/stop. Research confirmed
none of the five non-claude CLIs has a native background job manager.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mattpocock

Copy link
Copy Markdown
Owner Author

Closing — rethinking whether a generic spawn skill makes sense.

@otavio

otavio commented Jul 23, 2026

Copy link
Copy Markdown

The nice thing about that is it allows us to use it with different harnesses, avoiding the need for a specific harness UI. Especially now that you intend to make it compatible with multiple harness tools, I think that is a good move.

jaymie9019 pushed a commit to jaymie9019/mattpocock-skills that referenced this pull request Jul 25, 2026
Unmerged upstream PR, taken directly:
- grilling: round-by-round frontier interview (design tree model,
  fact-finding dispatched to sub-agents)
- prototype: logic branch produces a shareable HTML demo
- new in-progress skill spawn, generalising claude-handoff to any of
  claude/codex/pi/cursor/opencode/copilot (claude-handoff removed)

Fork divergences resolved:
- batch-grill-me stays graduated in productivity (upstream deletes its
  in-progress copy, having folded the frontier idea into grilling)
- in-progress README: spawn entry replaces claude-handoff (upstream's
  branch left it stale), graduated to-questionnaire stays unlisted

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jaymie9019 pushed a commit to jaymie9019/mattpocock-skills that referenced this pull request Jul 25, 2026
Unmerged upstream PR, taken directly:
- feat!: rename writing-great-skills to writing-for-agents and
  restructure — universal writing reference in SKILL.md, skill-only
  mechanics moved to SKILL-MECHANICS.md, GLOSSARY removed
- grilling frontier rounds + prototype HTML demo commits came already
  merged via PR mattpocock#647

Fork divergences resolved:
- root .claude-plugin/plugin.json stays deleted (the fork ships a
  per-bucket marketplace, not upstream's single plugin)
- top-level + productivity READMEs: rename adopted, fork's graduated
  to-questionnaire entries kept
- batch-grill-me stays graduated in productivity

Fixed the rename's metadata for the fork's invocation conventions:
- restored disable-model-invocation: true in SKILL.md (the rename
  dropped it; openai.yaml's allow_implicit_invocation: false and the
  README's User-invoked section both say user-invoked was the intent)
- openai.yaml display_name/short_description: 'Writing Great Skills'
  -> 'Writing for Agents'

Fork follow-ups:
- productivity plugin.json skills entry ./writing-great-skills ->
  ./writing-for-agents; plugin/marketplace descriptions 'writing
  great skills' -> 'writing for agents'
- docs/learn pointer table tracks the rename

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jaymie9019 pushed a commit to jaymie9019/mattpocock-skills that referenced this pull request Jul 25, 2026
Upstream folded batch-grill-me's round-by-round frontier interview
into grilling itself (PR mattpocock#647), so the standalone skill is redundant:
/grill-me now walks the same rounds natively.

- remove skills/productivity/batch-grill-me/ and its docs page
- drop it from the productive plugin.json and both READMEs
- ask-matt: fold the rounds behaviour into the /grill-me entry

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants