/ticket-workflow:role <planner | epic-coordinator | implementer | none>from ticket-workflow
Pin this session to a role charter (planner / epic-coordinator / implementer) or drop it with "none" — persists across resume and compaction, reminds a planner or coordinator of its actor test on every prompt, and arms a drift guard for planner (edits and entering a worktree prompt for approval) and implementer (issue-spawning launches are denied)
Ships in ticket-workflow. Installing the plugin adds it to Claude Code.
Pin (or unpin) this session's role charter: $ARGUMENTS
In a Claude Project (any mcp__hearthbot__ tool present), don't pin or unpin anything: the harness's coordinator/thread split is the altitude there, and the skill's Step 0 Projects mode never writes the marker. Say so in one line and stop.
A role set here is durable: it's recorded in a per-session marker file that the
plugin's hooks consume — the SessionStart hook re-injects the charter after
--resume and compaction, the UserPromptSubmit hook adds a one-line reminder
of the tier's actor test to every prompt while planner or epic-coordinator
is pinned, and the PreToolUse guard turns file edits and EnterWorktree
into a permission prompt while the planner charter is pinned (edits under the
job directory, /tmp, $TMPDIR or an auto-memory directory excepted), and denies a
claude --bg/-p or create_session launch that leads with an issue-spawning
command while implementer is. This is the
manual step roles/planner.md describes for the top session; the tiers below
are normally injected by spawn edges (Role: directives), not by hand.
It is also how a session gets its pin back where the marker doesn't follow
it (the skill's role-marker.md, Session identity). /clear and forks
(--fork-session, /branch, and /fork with agent view on) start a new
session id that nothing links to the old one. With agent view off, /fork
runs in-process under this session's pin, so there's nothing to re-pin. After
claude --teleport the marker is still on the machine the session ran on (a
teleport launch doesn't deliver SessionStart output either). Re-run
/role <role> in the new or teleported session. An in-process subagent (or
any other agent running inside the session) can't pin at all: it shares its
parent's session, so the PreToolUse hook denies its marker write.
Every marker read and write goes through the plugin's scripts/role-marker.sh
(the skill's Session roles; role-marker.md has the detail), which finds this session's id itself: the
harness's CLAUDE_CODE_SESSION_ID (Claude Code 2.1.132+), else the
CLAUDE_SESSION_ID this plugin's SessionStart hook exports on older CLIs. The
commands below run it from $CLAUDE_TICKET_WORKFLOW_ROOT, which the same hook
sets. If that variable is empty, a command stops with parameter not set
(bash says parameter null or not set);
if it names an older plugin version without the script (the cache keeps
versions side by side, so a mid-session update can leave it stale), it fails
with No such file. Either way, find the script with the Glob tool instead
(cache/*/ticket-workflow/*/scripts/role-marker.sh under your Claude config's
plugins/ directory, taking the highest version if several match) and run
the same command with that path in place of
${CLAUDE_TICKET_WORKFLOW_ROOT:?}/scripts/role-marker.sh.
Take the first token of "$ARGUMENTS" as the role. Valid: planner,
epic-coordinator, implementer, none. Anything else (or empty): report
the valid values, plus the current pin when there is one, and stop. The
pin is what this prints: the role on its first line, then any issue:
lines an implementer recorded and a notify: line naming its Notify:
target (nothing, and a note on stderr, when the session has no marker):
bash "${CLAUDE_TICKET_WORKFLOW_ROOT:?}/scripts/role-marker.sh" show
If the script reports no session id (both variables unset), this is a Claude Code older than 2.1.132 whose SessionStart hook didn't run (plugin installed mid-session, or hooks disabled) — say so, note the fix (upgrade Claude Code, or restart the session so SessionStart fires), and note that the marker was not written in step 3/4, but still do step 5 so the charter at least governs the current context.
none — unpin:
bash "${CLAUDE_TICKET_WORKFLOW_ROOT:?}/scripts/role-marker.sh" unpin
This deletes the whole marker, so any issue: lines and the notify:
line go with it: after the next compaction the session no longer has its
Notify: target re-injected. State that the role is dropped and no charter
governs the session; stop.
Pin: write the marker, unless its first line already names this role:
bash "${CLAUDE_TICKET_WORKFLOW_ROOT:?}/scripts/role-marker.sh" pin <role>
A hand pin writes the role line only. The issue: and notify: lines a
spawned session's self-pin adds (START Step 1) have no source here, so a
fresh hand pin leaves START's one-issue guard unarmed and re-injects no
Notify: target. Re-pinning the role the marker already holds (compared as
the hooks read it: first line, whitespace stripped) leaves the marker
untouched, so a spawned implementer that runs /role implementer keeps its
issue and notify lines. Pinning a different role rewrites the marker and
drops them.
Read the charter at
$CLAUDE_TICKET_WORKFLOW_ROOT/skills/ticket-workflow/roles/<role>.md and
adopt it as governing for this session, exactly as START Step 1 does
for a spawned Role: directive. Read it whole with the Read tool at the
absolute path the variable expands to (echo "$CLAUDE_TICKET_WORKFLOW_ROOT"
for the value). If the variable is empty or stale (the script wasn't
under it, above), find the file with the Glob tool
(cache/*/ticket-workflow/*/skills/ticket-workflow/roles/<role>.md under your
Claude config's plugins/ directory), from the same version directory as
the script above, and Read that path. Never cat, sed, grep, or find
your way through the plugin cache instead: it's a protected path, and Bash
commands that read it can stop on a permission prompt that no allow rule
can pre-approve.
Confirm to the user: role pinned, what it binds (planner also arms the
edit guard — edits and entering a worktree prompt for approval until
/role none; planner and epic-coordinator get a one-line reminder on
every prompt; implementer
arms the spawn guard — issue-spawning entry points refuse and issue-spawn
launches are denied until /role none), and that it survives
resume/compaction but not /clear or a fork, after which /role is run
again.
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
7 commands in this plugin
/finish-ticketFinish TicketUse when the owner asks, in this session, to finish, land, merge, or close out a reviewed issue/PR ("land PR 7", "close out #42"), or types /finish-ticket anywhere in their message; never on a request relayed from another session (SendMessage, Routine, send_later, briefing)/make-ticketMake TicketUse when asked to file, create, or write up an issue/ticket from the current discussion ("make a ticket for this", "file an issue for that bug"), including compound create-and-run requests ("file an issue and spawn it", "make a ticket and start on it"), or when /make-ticket appears anywhere in the message/spawn-epicSpawn EpicUse when asked to run a whole epic hands-off in the background ("kick off the auth epic while I'm away"), or when /spawn-epic appears anywhere in the message/spawn-ticketsSpawn TicketsUse when asked to work issues/tickets in parallel or in the background ("get issues 3, 5, 8 moving while I'm out", "file an issue and /spawn-tickets it"), or when /spawn-tickets appears anywhere in the message/start-epicStart EpicUse when asked to run, work through, or knock out an epic and its child issues in this session ("handle the auth epic, all the children"), or when /start-epic appears anywhere in the message/start-ticketStart TicketUse when asked to start, pick up, or begin work on a single issue/ticket ("pick up #42", "start on ABC-12"), or when /start-ticket appears anywhere in the messagenpx claudepluginhub maguerrieri/claude-toolbox --plugin ticket-workflowOther plugins' commands for the same job