feat(cli): hand items to coding agents (shepherd agent, sync) #51
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jwarykowski/shepherd!51
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/agent"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
what
shepherd agent <ref>hands an item to a coding agent and marks itin-progress:herdr worktree createontodo/<slug>(recorded on the item as a newbranch:token), thenherdr agent startwith the item text + note as the prompt--to <pane>: send to an agent already running in that herdr pane--here(or no herdr): run the agent CLI in this terminal--kindpicks the agent (claude, codex, opencode, …); defaults fromagent_kind/agent_branch_prefixinconfig.tomlshepherd sync [--all] [--dry-run] [--json]completes open items whosebranch:PR has merged (viagh)branch:<name>token: parsed, persisted, inlist --json, the schema and filter matchingplacement/directionfor open.sh, comments, and the newagent_*)Docs: AGENTS.md, README (new "hand an item to an agent" section + config keys), the skill.
tests
internal/cli/agent_test.go: worktree flow, config +--kind,--to, no-herdr, error paths leave the item untouched, sync (dry-run, json, skips done / branchless), slug,branch:token round tripinternal/tui/config_test.go: settings save keeps unmanaged keys and is idempotentagent --here --kind echo)note: pre-existing local test hang
TestTagEditorandTestCopy*hang locally on Wayland (also onmaster): they call the realclipboard.WriteAll, andwl-copykeeps serving the clipboard soexec.Cmd.Waitnever returns. CI has no clipboard tool, so it errors fast and passes there. Worth a follow-up to stub the clipboard in tests.Split up after review, so Shepherd stays a board plus a command API:
placement/direction, comments and other unmanaged keys).handoff = [...]in config.toml,shepherd handoff <ref>,@on the board) and thebranch:field.Review notes on this PR that the drover work should keep in mind: a failed agent start left the item in progress (and the worktree behind); nothing cleaned up worktrees after a merge; a PR closed without merging was never noticed;
sync --everystopped for good on its first error; and the no-herdr path passed the prompt as the agent's first argument without--.I'd close this one once #57 and #58 are in. jwarykowski/nvim-shepherd#14 needs updating to call
shepherd handoffinstead ofshepherd agent.Closing: superseded. The agent hand-off now goes through drover (#60, #61), so Shepherd stays a board and drover runs and logs every agent job. The settings fix landed separately in #57.
Pull request closed