Threnody workflow
Run a Threnody swarm with multi-queen consensus and learning THROUGH the Claude Code Dynamic Workflow feature, then save the run as a permanent, pre-tuned, zero-config /workflow command for coworkers. Use when asked to run a workflow, workflow-swarm, tier-aware workflow, or to save/share a reusable multi-agent workflow. Claude Code only.From its SKILL.md
npx -y skills add timjensgrossinger/threnody --skill threnody-workflowAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.5 KB, as published. Nobody here has run it
Threnody workflow orchestration
Runs fan-out work as a tier-aware Dynamic Workflow (each agent() on its
Threnody tier model, not one session model), with multi-queen consensus and
learning — then lets you save a permanent, documented, zero-config /<slug>
command teammates run with no setup.
This is Claude Code-only. Other hosts use host_spawn_waves through
threnody-swarm; all shared behavior must work there first.
Fast-start contract
Workflow-emitting skills must produce a runnable workflow_script quickly:
target under 5 seconds to handoff and under 30 seconds to first worker
spawn. The emitted script must start same-wave workers in a batch, for example
with parallel([...]), before waiting on the wave barrier.
Do not block initial workflow emission on optional refinement, consensus, learning aggregation, or permanent-workflow export. Run those after the first worker wave has started or after the workflow returns.
For review workflows, use the nested cheap shape: the Workflow script performs medium-tier orchestration, launches file reviewers in parallel, and returns a compact synthesis to the main session. Keep high-tier judgment for explicit deep/security-critical review or validated high/critical findings.
Prerequisite (claude-code only)
This path needs routing_policy.shells.claude-code.workflow_emit: true in
~/.local/lib/threnody/config.yaml. If it is off (or the host is not Claude Code),
the response will not include workflow_script — fall back to /threnody-swarm.
Requires Claude Code v2.1.154+ (Workflow tool).
Workflow
execute_swarm(task, topology="star"|"auto").- Inspect the response:
workflow_emit: true+workflow_script— the tier-aware script. Launch it via the Workflow tool (paste/runworkflow_script). It runs in the background, keeps intermediate results out of your context, and routes each agent to its model. Same-wave agents must be represented as a batch in the script, not as a sequential loop.- No
workflow_script— emission is off; use/threnody-swarminstead.
- When the workflow returns, call
report_workflow_result(workflow_name, agents)with theagentsarray the workflow returned (report_workflow_resultrecords per-agent learning telemetry). - Consensus:
- Hybrid (default): the response also has a
consensus_wave. After the workflow finishes, spawn each read-only queen in it as a hostAgent(one parallel message), thenreport_host_wave(swarm_id, wave, workspace_root, agents=[...])with each queen's JSON verdict asoutput_excerpt. If the response returnsconsensus_followup, spawn the single judge Agent it provides and report again. - Opt-in (
consensus_in_workflow): queens run inside the workflow; pass the workflow's returnedconsensusarray toreport_workflow_result(..., consensus=[...]). If it returnsconsensus_followup, spawn one judge Agent and re-call withconsensusset to just the selected queen's proposal. - For ordinary reviews, prefer a targeted verifier pass for synthesized
HIGH/CRITICALfindings instead of running consensus over every file.
- Hybrid (default): the response also has a
- Save a permanent workflow (the payoff): once a shape recurs across successful runs,
report_workflow_resultreturnsworkflow_draft.enqueued: true. Then:approval_queue_approve(<queue_id>, operator=<you>)to approve the learned workflow.- Export it with tuning + documentation:
This re-tunes per-tier models from recorded outcomes ("what model did task X well"), writes a documented header (tier→model map, persona roster + roles, related learned agents), and savespython3 -c "import shared.workflow_export as wx, shared.db as d; \ wx.export_workflow(<approved_draft_dict>, project_path='.', db=d.Database(), tune=True)".claude/workflows/<slug>.js. - Commit
.claude/workflows/<slug>.jsto the repo → teammates run/<slug>with zero config.
Must
- Launch the
workflow_scriptvia the Workflow tool — do not hand-spawn its worker agents as host Tasks (that defeats the background + tier-routing benefit). - Launch the script immediately once returned; refinement, consensus, learning, and export are post-first-spawn work.
- Always
report_workflow_resultafter the run so telemetry + shape learning happen. - Hybrid consensus queens are read-only — never let them write files.
- Saving a permanent workflow is approval-gated — approve the draft before export.
Do not
- Use this skill when
workflow_emitis off or the host is not Claude Code → use/threnody-swarm(host_spawn_waves). - Hand-edit a saved
.claude/workflows/*.js— re-run and re-export to change it. - Call
execute_subtaskfor same-host agents. - Treat Workflow support as portable across hosts.
Relationship to other skills
/threnody-swarm— host_spawn_waves swarm (all hosts; no Workflow tool)./threnody-swarm-review— review fanout (works with this skill's emit path too)./threnody-routing— routing + host-native contract basics.