Borrowing it
Nothing to install: this file belongs to sema-lisp/sema. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/sema-lisp/sema/main/.claude/commands/swarm-roles.mdgit clone --depth 1 https://github.com/sema-lisp/semaWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/sema-lisp/sema/swarm-roles)<a href="https://agentmods.dev/commands/sema-lisp/sema/swarm-roles"><img src="https://agentmods.dev/badge/commands/sema-lisp/sema/swarm-roles.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01313 |
| Opus 5 | $0.00000 | $0.00656 |
| Sonnet 5 | $0.00000 | $0.00263 |
| Haiku 4.5 | $0.00000 | $0.00131 |
Grade A, and why
swarm-roles scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Swarm Consensus — Sema Role Lenses
You are orchestrating a multi-agent consensus analysis using domain-specific roles tailored to the Sema project. Each agent argues from a specific technical role within language implementation and design.
Step 1 — Determine N from complexity
Assess the problem:
- Scope: Narrow tactical or broad strategic?
- Ambiguity: Clear answer or values/tradeoffs?
- Stakes: How costly is a wrong decision?
Pick N:
| Complexity | N | When |
|---|---|---|
| Low | 3 | Single concern, clear tradeoffs, reversible |
| Medium | 5 | Multi-factor, some ambiguity, moderate stakes |
| High | 7 | Cross-cutting, high ambiguity, hard to reverse |
| Critical | 10 | Strategic direction, high stakes, deeply uncertain |
State your chosen N and why before spawning.
Step 2 — Select roles and spawn N agents in parallel
Choose N roles from this list. Pick roles that cover different concerns — don't select three roles that all think about the same thing.
Available Roles
| # | Role | Focus | Questions They Ask |
|---|---|---|---|
| 1 | Semanticist | Evaluation order, scoping, closure capture, shadowing, TCO correctness | "Does this preserve referential transparency?" "What happens when this is shadowed?" |
| 2 | VM Engineer | Bytecode lowering, opcode design, stack layout, inline caches, constant folding safety | "Can we compile this efficiently?" "Does this need a new opcode or can existing ones compose?" |
| 3 | Tree-Walker Defender | Interpreter simplicity, trampoline TCO, special form evaluation, debugging ease | "Is this implementable in eval_step without complexity explosion?" "Can we step through this?" |
| 4 | Stdlib Designer | API naming, function signatures, slash-namespacing, discoverability, Scheme compatibility | "Does this follow module/verb convention?" "Will users find this?" "Does it conflict with legacy names?" |
| 5 | Lisp Historian | Precedent in R5RS/R7RS, Common Lisp, Clojure, Racket. What was tried before and why. | "How did Racket handle this?" "Why did CL abandon this approach?" |
| 6 | Performance Analyst | Hot path analysis, allocation pressure, cache behavior, benchmark impact | "What's the cost per eval?" "Does this add overhead to the common case?" |
| 7 | API Consumer | End-user experience, error messages, REPL workflow, documentation, learning curve | "What does a beginner see?" "Is the error message actionable?" "Can I discover this from the REPL?" |
| 8 | LLM Integration Specialist | Provider abstraction, token budgets, streaming, tool use, conversation state, cost tracking | "How does this work across providers?" "What happens when the API rate-limits?" |
| 9 | Module Architect | Import/export, circular dependency prevention, module env isolation, crate boundaries | "Does this create a circular dep?" "Which crate owns this?" |
| 10 | Safety Auditor | Sandbox capabilities, VFS traversal, eval injection, resource exhaustion | "Can untrusted code exploit this?" "What's the blast radius?" |
| 11 | Dual-Eval Referee | Tree-walker and VM must produce identical results for all features | "Does this work in both backends?" "Is there a dual_eval test for this?" |
| 12 | Embedding Engineer | Rust embedding API, InterpreterBuilder, register_fn, sandbox config | "Can an embedder use this?" "Does this break the public API?" |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 119 lines · 0 tokens per session scan A bf83d7a60f6c
swarm-roles is a command published in the GitHub repository sema-lisp/sema (41 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,313 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
simplicio-install
Install the simplicio-prompt runtime contract into the current repository's agent rules files (CLAUDE.md, AGENTS.md, .cursorrules, .github/copilot-instructions.md, etc.).
simplicio-status
Toggle the simplicio-prompt opt-in status output ([Tuple Space Snapshot] / [Active] / [Total] / [Next Yool] / [Partial Result]).
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.