ql-execute

An automated development loop that reads planned work from quantum.json and implements it in a Git project.

In plain words
What is it for?
Running a planned set of user stories from start to finish, including implementation, tests, reviews, commits, and dependency handling. TDD means writing tests as part of development to check the expected behavior.
Why use it?
It coordinates dependent tasks, checks the code, reviews changes, and retries or stops when work cannot continue. It can also run independent tasks in separate worktrees.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/andyzengmath/quantum-loop/ql-execute
Any agent
npx skills add andyzengmath/quantum-loop --skill ql-execute
Clone the repo
git clone --depth 1 https://github.com/andyzengmath/quantum-loop

Made for: Claude Code, Codex.

Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,073 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00091 $0.02073
Opus 5 $0.00046 $0.01037
Sonnet 5 $0.00018 $0.00415
Haiku 4.5 $0.00009 $0.00207

Measured 2d ago against content hash d569ab4dca33, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ql-execute 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 2d 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.

skills/ql-execute/SKILL.md · 123 lines

How it starts

The opening of the file, as written. The whole thing — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Quantum-Loop: Execute

Run the autonomous execution loop to implement all stories in quantum.json.

Prerequisites

Before starting:

  1. quantum.json must exist (created by /quantum-loop:plan)
  2. The project must be a git repository
  3. Project build tools must be available (npm, pip, cargo, etc.)

If prerequisites are not met, inform the user and stop.

Execution

Read and follow the orchestrator agent instructions in agents/orchestrator.md.

The orchestrator will:

  1. Read quantum.json state and validate the dependency DAG
  2. Query for eligible stories (pending/retriable with all dependencies passed)
  3. If 1 story eligible: execute it sequentially (implement, quality checks, review, commit)
  4. If 2+ stories eligible: spawn parallel implementer subagents in isolated worktrees
  5. Handle retries, cascade blocking, and error recovery
  6. Loop until all stories pass (COMPLETE) or no stories are executable (BLOCKED)

Orchestrator liveness gate (N14 / US-002 — v0.7.0)

Default-on for unattended /ql-execute runs. v0.6.7 + v0.6.8 + v0.6.9 all saw the orchestrator subagent abandon its cycle mid-execution (LLM context-drift). v0.6.8 N6 shipped a prose-only Self-monitoring guard. v0.6.9 N6-followup shipped lib/orchestrator-liveness.sh::poll_orchestrator_commits as a callable runtime helper. This v0.7.0 N14 SKILL-level wrapping is the third and final layer — auto-invoke the helper after dispatching the orchestrator, hand off to the parent on STALE.

# After dispatching the orchestrator subagent (Step 3 of Execution above):
source lib/orchestrator-liveness.sh
wrap_orchestrator_dispatch 600 60 || exit 1

The wrap_orchestrator_dispatch function (v0.7.1 N20 extraction; see lib/orchestrator-liveness.sh) handles the QL_LIVENESS_ENABLE env-var check, the poll_orchestrator_commits invocation, and the structured handoff message internally. The SKILL just calls it and exits 1 on STALE so CI / wrapper scripts can distinguish stale-signal exits from clean COMPLETE / BLOCKED exits.

Read the full file on GitHub · 123 lines

Changes

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.

  1. 2d ago First seen · 123 lines · 91 tokens per session scan A d569ab4dca33

Subscribe to this mod's changes

ql-execute is a skill published in the GitHub repository andyzengmath/quantum-loop (24 stars, last pushed 2mo ago), licensed MIT. It adds 91 tokens to every session and 2,073 once invoked, about $0.0005 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.

Related

Other skills, from other repositories