Claude Code has moved past improvised subagents: dynamic workflows now let Claude write a JavaScript orchestration script so coordination runs as code, not turn-by-turn. slang-workflows takes that idea one step further and makes it provable. You declare the collaboration — the agents, message routing (stake -> @Agent, -> @all), control flow, convergence, budgets — in a typed .slang file, and a non-LLM executor runs it as a deterministic state machine that enforces the structure rather than just running it.
What the executor enforces
-
Output contracts — a structural schema (
output: { … }) plus a semanticwhereclause (e.g.where score >= 0 && score <= 100); results are validated and the agent is re-prompted on violation, so it can't fake "done". -
Static analysis before you run —
validate_workflowcatches deadlocks, unknown agent references, and orphaned outputs; a buggy workflow fails loudly up front, not mid-run. -
Tool scoping —
write_paths/denyrestrict which files and tools each agent may touch (an architect that writes the design but not the code), enforced by the runtime, not by a prompt it can ignore. - Provable termination — budgets + per-stake timeouts mean a run always finishes; no livelocks, no hangs.
-
Diagrams for free —
get_topologyrenders the agent topology as a Mermaid flowchart andget_tracerenders the round-by-round execution as a Mermaid sequence diagram (an orchestration script gives you a progress tree, not diagrams).
The model thinks; the executor coordinates
Each slang agent is one Claude Agent SDK session, resumed across turns. The top-level Claude Code session only triggers (run_workflow) and observes (get_workflow_state, get_topology, get_trace) — it never makes a coordination decision. You can even have an LLM generate a .slang on the fly (get_slang_grammar → validate_workflow → run_workflow) and still get deterministic, contract-checked execution — flexibility with guarantees. Runs are synchronous or backgrounded and polled live. The whole executor is a pure state machine, covered by a mock-based test suite, so it's verifiable without spending a token.
Install
Inside a Claude Code session:
/plugin marketplace add shofer-dev/claude-code-slang-orchestrator
/plugin install slang-workflows@shofer-slang-orchestrator
Then run a .slang workflow with run_workflow, and watch it render live via get_topology and get_trace.
Standalone Claude Code plugin — TypeScript, Apache-2.0. Source: github.com/shofer-dev/claude-code-slang-orchestrator
Top comments (0)