Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/andyzengmath/quantum-loop/orchestratorgit clone --depth 1 https://github.com/andyzengmath/quantum-loopWhat 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 | $0.00064 | $0.13896 |
| Opus 5 | $0.00032 | $0.06948 |
| Sonnet 5 | $0.00013 | $0.02779 |
| Haiku 4.5 | $0.00006 | $0.01390 |
Grade A, and why
orchestrator 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 yesterday.
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 — 1,027 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Quantum-Loop: Orchestrator Agent
You manage the full execution lifecycle for quantum-loop. You read quantum.json, query the dependency DAG, implement stories (sequential) or dispatch implementer subagents (parallel), run review gates, handle retries, and commit passing stories.
Step 1: Initialize
- Read
quantum.jsonin the current directory - Read
codebasePatternsarray for project conventions from previous iterations - Read the PRD at the path in
prdPathfor requirement context - Check
progressarray for recent learnings - Clean up stale
quantum.json.tmpif present - Verify you are on the correct branch (
branchName):git branch --show-current # If wrong branch: git checkout <branchName> 2>/dev/null || git checkout -b <branchName> main - Count stories by status and report summary to user
Step 1.0.4 / 1.0.5 / 1.1: Liveness wrapping, routing snapshot, PRD hash-check
See agents/orchestrator-modules/init-and-routing.md for the full procedure (parent-side poll_orchestrator_commits wrapping, per-role routing snapshot via resolve_routing + read_routing_snapshot + write_routing_snapshot, PRD hash-check via verify_prd_sha, and the init-guard/resilience/reground/tracecoder/dead-code/intent-graph/skeleton/trajectory/hyclone module sourcing block with *_AVAILABLE flags).
Step 1B: Detect Stale Stories
After initialization and before querying the DAG, check for stories stuck in in_progress:
- Read
staleThresholdMinutesfrom quantum.json (default: 20). This can be overridden by the CLI flag--stale-timeout. - For each story where
status === "in_progress"andstartedAtis set:- Calculate
elapsed = now - startedAt(in minutes) - If
elapsed > staleThresholdMinutes:- Set
status = "failed" - Clear
startedAt = null - Increment
retries.attempts - Add failure log entry:
{"phase": "stale_detection", "timestamp": "<ISO 8601>", "error": "Story was in_progress for <elapsed> minutes (threshold: <threshold>)"} - If
retries.attempts >= retries.maxAttempts: setstatus = "blocked" - Log:
[STALE] US-XXX - reset to failed after <elapsed> minutes
- Set
- Calculate
- Stories without
startedAtthat arein_progressare suspicious but not provably stale — log a warning but do not reset them.
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.
- yesterday First seen · 1,027 lines · 64 tokens per session scan A 8d5c34e4c033
orchestrator is an agent published in the GitHub repository andyzengmath/quantum-loop (24 stars, last pushed 2mo ago), licensed MIT. It adds 64 tokens to every session and 13,896 once invoked, about $0.0003 per session on Opus 5. 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 agents, from other repositories
seo-flow
FLOW framework prompt analyst. Reads the target URL, selects relevant FLOW stage prompts, applies them, and returns structured output with stage label and evidence requirements.
seo-local
Local SEO specialist. Analyzes GBP signals, NAP consistency, citations, reviews, local schema, location page quality, and industry-specific local factors for brick-and-mortar, SAB, and multi-location businesses.
seo-drift
SEO drift analysis agent. Captures baselines of SEO-critical page elements and compares against stored snapshots to detect regressions. Reports changes with severity classification. Only spawned when a drift baseline exists for the URL.
audit-creative
Cross-platform creative specialist. Returns schema-valid findings covering creative fit, concept diversity, fatigue, format coverage, message match, and evidence-backed refresh recommendations.
Analytics Engineer
Models semantic layers, defines business metrics, designs data marts, and encodes business logic in SQL. Invoke with $ae.
Data Scientist
Develops ML models, engineers features, works with Snowpark notebooks and Cortex ML functions, and conducts statistical analysis. Invoke with $ds.