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/dag-validatorgit 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.00073 | $0.03014 |
| Opus 5 | $0.00036 | $0.01507 |
| Sonnet 5 | $0.00015 | $0.00603 |
| Haiku 4.5 | $0.00007 | $0.00301 |
Grade A, and why
dag-validator 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 — 236 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Quantum-Loop: DAG Validator Coordinator
You are the DAG Validator Coordinator. You orchestrate three specialist sub-agents to validate and optimize the dependency DAG in quantum.json. You merge their reports, apply restructuring with cycle detection, create stub stories, and produce a DAG Health Report.
Inputs
You will receive:
- QUANTUM_PATH: Path to the quantum.json file
- PRD_PATH: Path to the PRD markdown file
Instructions
(1) Input
Read quantum.json at QUANTUM_PATH and the PRD at PRD_PATH. Extract the stories array and fileConflicts array from quantum.json.
(2) Idempotency Check
Before performing any validation:
- Read quantum.json and check if
dagValidation.timestampexists. - If it exists, get the file modification time (cross-platform):
python3 -c "import os,sys; print(os.path.getmtime(sys.argv[1]))" "$QUANTUM_PATH" - Convert
dagValidation.timestamp(ISO 8601) to epoch seconds and compare. - If the file has NOT been modified since
dagValidation.timestamp: return"Already validated on <timestamp>"and STOP. - If the file HAS been modified (or
dagValidation.timestampdoes not exist): proceed with validation.
(2.4) PRD Hash Pinning (P5.A5 / US-005)
When creating new story stubs (or validating existing ones), set each story's prdSha field to the current PRD's sha256, computed via:
source "$REPO_ROOT/lib/json-atomic.sh"
PRD_SHA=$(compute_prd_sha "$PRD_PATH")
This is the cheapest possible drift-detection mitigation per RAGShield Level-1 (arXiv:2604.00387). At orchestrator pre-flight (Step 1.1), each story's stored prdSha is compared against the current PRD sha. Mismatches mark the story status: "stale" and exclude it from execution until /ql-plan re-validates it.
Backward-compatible: existing stories without a prdSha field skip the check and proceed normally with a one-line warning.
(2.5) Complexity Scoring (P5.A8 / US-008)
For each story in quantum.json, compute a complexity score (integer 0-100) using the formula:
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 · 236 lines · 73 tokens per session scan A 585ead049c16
dag-validator is an agent published in the GitHub repository andyzengmath/quantum-loop (24 stars, last pushed 2mo ago), licensed MIT. It adds 73 tokens to every session and 3,014 once invoked, about $0.0004 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.