/thrum:configure-rolesfrom thrum
Detects project environment and generates role-based preamble templates for Thrum agents. Creates .thrum/role_templates/ that auto-apply on agent registration.
Ships in thrum. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Generate role-based preamble templates customized to your project environment.
Templates auto-apply when agents register via thrum quickstart.
Announce: "Using configure-roles to set up preamble templates for your team."
Use AskUserQuestion for ALL interactive prompts. Do not ask "reply with 1,
2, or 3" style questions in plain prose. Every choice the user makes goes
through the structured AskUserQuestion UI so answers are unambiguous and
machine-readable.
Run these commands and collect the output (suppress errors):
thrum runtime list 2>/dev/null # Installed runtimes
git worktree list 2>/dev/null # Worktrees and branches
bd stats 2>/dev/null # Beads task tracker state
thrum agent list --context 2>/dev/null # Registered agents
ls .claude/skills/ 2>/dev/null # Installed Claude skills
thrum config show 2>/dev/null # Thrum configuration
Also check:
.claude/settings.json for MCP servers (context7, etc.).thrum/role_templates/.thrum/config.json under role_config (if any)To inspect a shipped reference template, use the CLI shim — never read directly from a filesystem path, since the binary may run from any directory:
thrum roles templates print coordinator-autonomous
thrum roles templates print orchestrator # single-variant role
Summarize what you detected:
role_config in .thrum/config.json (if re-running)ls .thrum/role_templates/ 2>/dev/null
thrum config show 2>/dev/null | jq '.role_config' 2>/dev/null
If role_config exists, prefill each AskUserQuestion with the saved value (see
"Re-run Behavior" below) so the user only has to confirm rather than re-enter
every choice.
Ask these in sequence using AskUserQuestion. Each call should accept exactly
one answer and surface the available choices structurally.
Question: "What roles does your team need?"
Options based on detected agents, plus common defaults:
Available roles (all have strict and autonomous variants except orchestrator,
which is single-variant):
| Role | Purpose |
|---|---|
| coordinator | Orchestrates team, dispatches tasks, reviews/merges |
| implementer | Writes code in assigned worktree |
| planner | Creates plans, designs architecture, writes specs |
| researcher | Investigates codebases, produces research reports |
| reviewer | Reviews code for quality, security, correctness |
| tester | Writes and runs tests, verifies acceptance criteria |
| deployer | Handles builds, releases, deployment operations |
| documenter | Creates and maintains documentation |
| monitor | Watches system health, reports anomalies |
| orchestrator | Drives plan execution across agents (single-variant) |
For each role selected (except orchestrator), call AskUserQuestion: "What
autonomy level for the {role} role?"
If multiple worktrees detected, ask via AskUserQuestion: "Should agents be
restricted to their own worktree?"
For each role:
Read the shipped reference via the CLI shim:
thrum roles templates print {role}-{autonomy}
For orchestrator, omit the autonomy suffix (single-variant):
thrum roles templates print orchestrator
Customize based on environment detection:
bd commands in Task Tracking sectionWrite to .thrum/role_templates/{role}.md. Keep per-agent template tokens
({{.AgentName}}, {{.Module}}, {{.WorktreePath}},
{{.CoordinatorName}}, {{.RepoRoot}}) literal — they get substituted
per-agent at deploy time, not at template-write time.
After writing the templates, persist the user's answers so other code paths respect their choices and drift detection can flag plugin upgrades:
cat <<'EOF' | thrum roles save-config
{
"schema_version": 1,
"roles": {
"coordinator": {"autonomy": "{{coord_autonomy}}", "scope": "{{coord_scope}}"},
"implementer": {"autonomy": "{{impl_autonomy}}", "scope": "{{impl_scope}}"}
}
}
EOF
thrum roles save-config writes role_config into .thrum/config.json, fills
schema_version / plugin_version / configured_at with sensible defaults if
absent, and backfills rendered_hash per role from the current shipped body
hash so thrum prime shows no drift hints.
The save is atomic and preserves every other top-level config key (backup/daemon/identity/telegram) byte-identical.
If agents are already registered, ask via AskUserQuestion whether to deploy
now:
thrum roles deploy --dry-run # Preview
thrum roles deploy # Apply to all agents
When role_config exists in .thrum/config.json (the canonical record), load
the saved answers and use them as the prefilled values for each
AskUserQuestion call so the user only has to re-confirm rather than re-enter
every choice:
AskUserQuestion what to change: add a role, modify an existing
role, or remove one.thrum roles save-config so rendered_hash is refreshed and
the saved plugin_version / configured_at reflect the current run.If the user wants to apply only template-content updates after a plugin upgrade
(no answer changes), point them at thrum roles refresh — it regenerates
rendered files from saved answers without asking any questions.
| Detected | Template Customization |
|---|---|
| Claude Code runtime | Add Task tool + sub-agent guidance to Efficiency section |
| Augment runtime | Add Augment-specific tool guidance to Efficiency section |
| Beads installed | Add bd commands to Task Tracking, disable TodoWrite |
| Thrum MCP server | Add MCP tool references, CLI fallback for sub-agents |
| Claude plugin skills | List installed skills with usage guidance |
| Context7 MCP | Add library docs guidance to Efficiency section |
| Multiple worktrees | Add worktree scope rules to Scope Boundaries |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub thrum-team/thrum --plugin thrum22 skills in this plugin
/adversarial-critiqueUse when an implementer is blocked mid-work by a design flaw, contradiction, or unforeseen fork with 2-3 ways to resolve it - produces a defended pick that unblocks the work and leaves an audit trail so the decision can be revisited if it later proves wrong/coordinator-context-monitoringUse when managing live implementer/brainstormer agents during a long coordination session, at epic merge gates, after a busy dispatch hour, or whenever you suspect an agent is approaching context limits. Prevents 97%-context silent blow-ups by running a sweep + pre-emptive restart before the agent degrades. Safe to wire into a recurring cron that INVOKES this skill — the skill applies tier-ladder judgment, only firing autonomous restarts at the >85% tier. What's forbidden is a cron/script that fires restarts unconditionally without going through this skill's tier ladder./coordinator-dispatching-workUse when starting an epic, dispatching to an implementer, creating a worktree for an agent, or spawning a sub-agent. Loads coordinator-specific discipline for kicking off implementation work./coordinator-managing-state-and-lifecycleUse when ending a session, when updating project state, when managing beads epics, or before session close. Loads coordinator-specific discipline for owning project state and shepherding the team's lifecycle./coordinator-post-restart-sweepUse immediately after the coordinator returns from a restart, compaction, or extended absence — as the first deliberate action post-prime. Detects agents whose latest assistant message indicates they are blocked waiting for a coordinator decision the coordinator may not have seen (question surfaced in pane, not in inbox). Safe to run any time the session feels "we've been gone a while"; not just post-restart. Pairs with the coordinator-context-monitoring sweep (sibling sweep, different lens)./coordinator-running-brainstorm-cyclesUse when starting a brainstorm for a bug fix, feature, or architectural decision the coordinator can't trivially decide alone — spawns a researcher in an isolated worktree, runs the brainstorm interactively with the user, iterates dual-review cycles to ready-to-merge, optionally drives an overarching coherence pass when multiple sibling brainstorms close, then hands off to project-setup. Saves coordinator context by isolating brainstorm work in a sub-agent worktree rather than burning main-context tokens on Q-by-Q dialog.Other plugins' skills for the same job