Herdr + OMP + jj task workflow
Use one durable Herdr workspace per issue, PR, or task. Share one stable name across the checkout, jj workspace, jj bookmark, Herdr workspace label, and PR head:
issue-N-slug
pr-N-slug
task-slug
Treat that name as durable. Treat Herdr workspace, tab, and pane IDs as live handles; re-read them after lifecycle changes.
Use Hunk from the Git root when one exists. In a pure jj workspace, use jj diff --git -r @ in OMP and record findings plus check output in the worklog when present, otherwise in the final handoff. “Review surface” below means either path.
When to use
Use this skill for create, resume, approve commit, publish, ship, submit review, cleanup, or abandon requests involving a Herdr jj task workspace.
Non-negotiable rules
- Before controlling Herdr, require
HERDR_ENV=1; use the current session and never launch nested Herdr.
- Before any jj mutation, run
pwd and jj log -r @. Never use jj edit only to inspect history.
- Keep one task bookmark per workspace. Reuse it; do not create a replacement branch.
- Shape the current change in place with
jj describe and jj squash. Run jj new only when starting another reviewed intent.
- Review every intended commit. Use Hunk from the Git root when available; otherwise use the pure-jj review surface defined above. Commit only after the user says
approve commit and findings plus checks are clear.
- Keep pure jj workspaces OMP-only; never launch Hunk from an arbitrary pane directory.
- Fetch only during explicit
publish or ship, never during workspace creation.
- Never stop or kill Herdr. Use config reloads and read-only state checks.
Create or resume
- Use
prefix+a to create a jj workspace. Enter the stable task name and base revision. Base defaults to trunk(); use a published parent bookmark for a stacked task.
- Let Herdr create the workspace and bootstrap its tabs. Do not create another workspace from the new OMP session.
- Run
hey agent-start without --workspace from the created checkout and retain its receipt. For work covered by AGENT_WORKFLOW.md, keep its required worklog too.
- Expect
omp focused in every workspace. A Git-backed checkout also gets hunk; a non-Git workspace intentionally does not.
- Use
herdr agent list and herdr workspace list to resolve current live handles; never reuse example IDs.
- Use
prefix+g only for the native Git-only worktree flow.
- Resume from the issue or PR, jj log/bookmarks, review findings, the run receipt, any worklog, and live Herdr state. Conversation history is not authoritative.
Review and commit
- Inspect
jj diff and the current task bookmark.
- Refresh the review surface: Hunk from
git rev-parse --show-toplevel, or jj diff --git -r @ for pure jj.
- Address every applicable finding and run the focused check.
- On
approve commit, re-read the same review surface and check output.
- Run
jj describe -m '<message>'.
- Run
jj bookmark set <task-name> -r @.
- If another independent intent remains, run
jj new; otherwise leave @ at the reviewed task tip.
Publish
On explicit publish:
- Verify any stacked parent is reviewed, pushed, and has a PR.
- Run
jj git fetch.
- Rebase only the task stack:
jj rebase -b <task-name> -o <base>.
- Resolve conflicts, rerun focused checks, and refresh the review surface.
- Run
jj bookmark set <task-name> -r @ and jj git push --bookmark <task-name>.
- Create or update the PR. A stacked PR targets its parent bookmark; otherwise it targets the repository default branch.
Ship
On explicit ship, verify recorded review approval and CI, then enable auto-merge. Ask before changing code to fix CI. After a parent PR merges, rebase and retarget each child from its own workspace.
Cleanup and abandon
prefix+d removes only a clean secondary workspace whose PR is closed or merged.
prefix+D is the explicit abandon path. It still requires a clean workspace and exact typed task-name confirmation.
- Never remove the main jj workspace. Never clean up work that is changed, ambiguous, or still under an open PR.
External PR review
Use pr-N-slug. Stay read-only by default. Put findings in the active review surface and submit them upstream only on explicit submit review. Modify the PR only after explicit takeover.
1---2name: herdr-jj-workflow3description: Runs Herdr task workspaces with OMP, jj, Hunk, and durable receipts from creation through cleanup. Use for creating, resuming, reviewing, publishing, shipping, or removing a Herdr jj task workspace.4---56# Herdr + OMP + jj task workflow78Use one durable Herdr workspace per issue, PR, or task. Share one stable name across the checkout, jj workspace, jj bookmark, Herdr workspace label, and PR head:910- `issue-N-slug`11- `pr-N-slug`12- `task-slug`1314Treat that name as durable. Treat Herdr workspace, tab, and pane IDs as live handles; re-read them after lifecycle changes.1516Use Hunk from the Git root when one exists. In a pure jj workspace, use `jj diff --git -r @` in OMP and record findings plus check output in the worklog when present, otherwise in the final handoff. “Review surface” below means either path.1718## When to use1920Use this skill for `create`, `resume`, `approve commit`, `publish`, `ship`, `submit review`, `cleanup`, or `abandon` requests involving a Herdr jj task workspace.2122## Non-negotiable rules23241. Before controlling Herdr, require `HERDR_ENV=1`; use the current session and never launch nested Herdr.252. Before any jj mutation, run `pwd` and `jj log -r @`. Never use `jj edit` only to inspect history.263. Keep one task bookmark per workspace. Reuse it; do not create a replacement branch.274. Shape the current change in place with `jj describe` and `jj squash`. Run `jj new` only when starting another reviewed intent.285. Review every intended commit. Use Hunk from the Git root when available; otherwise use the pure-jj review surface defined above. Commit only after the user says `approve commit` and findings plus checks are clear.296. Keep pure jj workspaces OMP-only; never launch Hunk from an arbitrary pane directory.307. Fetch only during explicit `publish` or `ship`, never during workspace creation.318. Never stop or kill Herdr. Use config reloads and read-only state checks.3233## Create or resume34351. Use `prefix+a` to create a jj workspace. Enter the stable task name and base revision. Base defaults to `trunk()`; use a published parent bookmark for a stacked task.362. Let Herdr create the workspace and bootstrap its tabs. Do not create another workspace from the new OMP session.373. Run `hey agent-start` without `--workspace` from the created checkout and retain its receipt. For work covered by `AGENT_WORKFLOW.md`, keep its required worklog too.384. Expect `omp` focused in every workspace. A Git-backed checkout also gets `hunk`; a non-Git workspace intentionally does not.395. Use `herdr agent list` and `herdr workspace list` to resolve current live handles; never reuse example IDs.406. Use `prefix+g` only for the native Git-only worktree flow.417. Resume from the issue or PR, jj log/bookmarks, review findings, the run receipt, any worklog, and live Herdr state. Conversation history is not authoritative.4243## Review and commit44451. Inspect `jj diff` and the current task bookmark.462. Refresh the review surface: Hunk from `git rev-parse --show-toplevel`, or `jj diff --git -r @` for pure jj.473. Address every applicable finding and run the focused check.484. On `approve commit`, re-read the same review surface and check output.495. Run `jj describe -m '<message>'`.506. Run `jj bookmark set <task-name> -r @`.517. If another independent intent remains, run `jj new`; otherwise leave `@` at the reviewed task tip.5253## Publish5455On explicit `publish`:56571. Verify any stacked parent is reviewed, pushed, and has a PR.582. Run `jj git fetch`.593. Rebase only the task stack: `jj rebase -b <task-name> -o <base>`.604. Resolve conflicts, rerun focused checks, and refresh the review surface.615. Run `jj bookmark set <task-name> -r @` and `jj git push --bookmark <task-name>`.626. Create or update the PR. A stacked PR targets its parent bookmark; otherwise it targets the repository default branch.6364## Ship6566On explicit `ship`, verify recorded review approval and CI, then enable auto-merge. Ask before changing code to fix CI. After a parent PR merges, rebase and retarget each child from its own workspace.6768## Cleanup and abandon6970- `prefix+d` removes only a clean secondary workspace whose PR is closed or merged.71- `prefix+D` is the explicit abandon path. It still requires a clean workspace and exact typed task-name confirmation.72- Never remove the main jj workspace. Never clean up work that is changed, ambiguous, or still under an open PR.7374## External PR review7576Use `pr-N-slug`. Stay read-only by default. Put findings in the active review surface and submit them upstream only on explicit `submit review`. Modify the PR only after explicit takeover.