{"id":"96b600af-d9e7-4a4c-a0b6-973dd5cb38be","shortId":"GqsnG4","kind":"skill","title":"ql-execute","tagline":"Part of the quantum-loop autonomous development pipeline (brainstorm \\u2192 spec \\u2192 plan \\u2192 execute \\u2192 review \\u2192 verify). Run the autonomous execution loop. Reads quantum.json, queries the dependency DAG, implements stories with TDD and two-stage review gates. Sup","description":"# Quantum-Loop: Execute\n\nRun the autonomous execution loop to implement all stories in quantum.json.\n\n## Prerequisites\n\nBefore starting:\n1. `quantum.json` must exist (created by `/quantum-loop:plan`)\n2. The project must be a git repository\n3. Project build tools must be available (npm, pip, cargo, etc.)\n\nIf prerequisites are not met, inform the user and stop.\n\n## Execution\n\nRead and follow the orchestrator agent instructions in `agents/orchestrator.md`.\n\nThe orchestrator will:\n1. Read quantum.json state and validate the dependency DAG\n2. Query for eligible stories (pending/retriable with all dependencies passed)\n3. **If 1 story eligible:** execute it sequentially (implement, quality checks, review, commit)\n4. **If 2+ stories eligible:** spawn parallel implementer subagents in isolated worktrees\n5. Handle retries, cascade blocking, and error recovery\n6. Loop until all stories pass (COMPLETE) or no stories are executable (BLOCKED)\n\n## Autonomous CLI Alternative\n\nFor unattended execution outside Claude Code (Linux/Mac):\n```bash\n./quantum-loop.sh --max-iterations 20\n./quantum-loop.sh --parallel --max-parallel 4\n```\n\nOn Windows, use `/ql-execute` instead of the shell script for reliable execution.\n\n## Signals\n\n| Signal | Meaning |\n|--------|---------|\n| `<quantum>COMPLETE</quantum>` | All stories passed |\n| `<quantum>BLOCKED</quantum>` | No executable stories remain |\n| `<quantum>STORY_PASSED</quantum>` | One story completed (more remain) |\n| `<quantum>STORY_FAILED</quantum>` | One story failed (will retry if attempts remain) |\n\n## Post-review slop-cleanup hook (Phase 9 / P1.6)\n\nAfter each story's two-stage review gate PASSES but BEFORE the merge to the feature branch, the orchestrator SHOULD invoke `/quantum-loop:ql-deslop` on the story's changed files. Opt-out via `--no-deslop` (record the reason in commit trailer `Deslop: skipped | <reason>`).\n\nMandatory safety rails, enforced by `lib/deslop.sh`:\n\n1. `validate_scope <file> BASE HEAD` — rejects any edit to a file outside the story's diff. Prevents \"adjacent cleanup\" scope creep.\n2. `take_baseline <before.json>` — snapshots test / lint / typecheck exit codes.\n3. Run ONE deslop pass at a time from the 4-pass taxonomy in `skills/ql-deslop/SKILL.md` (dead-code → duplication → consistency → test-reinforcement).\n4. `take_baseline <after.json>` + `compare_baseline before.json after.json`. Any regression triggers:\n5. `rollback_pass BASE <files>` and emits `<quantum>DESLOP_ROLLED_BACK</quantum>`. The next pass does NOT start until the user inspects.\n6. Persist per-pass report into `quantum.deslop[<story-id>].pass_<n>`.\n\nLanguage detection: `bash lib/deslop.sh detect-language` dispatches to the appropriate dead-code detector (knip / ts-prune / vulture / staticcheck / cargo-udeps). When tooling is missing, the step is skipped cleanly rather than failing the pipeline.\n\n## Post-pipeline review hook (Phase 8 / P1.1 + P1.2)\n\nAfter `COMPLETE` fires, the orchestrator SHOULD invoke `/quantum-loop:ql-deep-review` before handing the merged branch back to the user. Opt-in via `--deep-review` (or mandatory when the feature's risk tier is HIGH / CRITICAL per `lib/deep-review.sh compute_risk_score`).\n\nGate steps:\n\n1. Run the wave-boundary checks on the final commit range (`BASE_SHA..HEAD_SHA`):\n   - **Cross-story constant scan** — `bash lib/wave-boundary.sh scan BASE HEAD` emits JSON findings for literals that canonicalize to the same key across ≥2 stories (e.g. `'google'` vs `'google-api-key'`; the Math-Research regression class). Gate via `bash lib/wave-boundary.sh gate BASE HEAD` — exit 0 = divergence found, exit 1 = clean. Non-empty findings are treated as a `medium` (2 variants) or `high` (3+ variants) severity input to the reviewer-set dispatch.\n   - **Wave-wide typecheck** (`lib/resilience.sh` `run_typecheck`).\n   - **Full test suite**.\n   - **Barrel + dep-manifest regeneration** (`lib/barrel-regen.sh`, `lib/dep-manifest.sh`).\n2. Compute risk tier: `bash lib/deep-review.sh score BASE HEAD` → then `bash lib/deep-review.sh tier <score>`.\n3. Dispatch the reviewer-set specified in `skills/ql-deep-review/SKILL.md §\"Risk scoring\"`.\n4. Apply `lib/deep-review.sh actionability / dedup / hallucination / verdict` in sequence to aggregate findings.\n5. Persist the final review object into `quantum.reviews[<feature-id>].deepReview`.\n6. Verdicts:\n   - `BLOCKS_MERGE` → refuse handoff; emit `STORY_FAILED` with blockers in the failureLog.\n   - `REQUEST_CHANGES` → route to a targeted fix-story in the next wave.\n   - `APPROVE_WITH_COMMENTS` → proceed but log comments into `codebasePatterns`.\n   - `APPROVE` → proceed cleanly.\n\nFor legacy pipelines that predate this hook, `/quantum-loop:ql-deep-review` can be invoked manually post-merge.","tags":["execute","quantum","loop","andyzengmath","agent-skills","agentskills","claude-code","claude-code-plugin","claude-code-skill","skillsmp"],"capabilities":["skill","source-andyzengmath","skill-ql-execute","topic-agent-skills","topic-agentskills","topic-claude-code","topic-claude-code-plugin","topic-claude-code-skill","topic-skillsmp"],"categories":["quantum-loop"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/andyzengmath/quantum-loop/ql-execute","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add andyzengmath/quantum-loop","source_repo":"https://github.com/andyzengmath/quantum-loop","install_from":"skills.sh"}},"qualityScore":"0.461","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 22 github stars · SKILL.md body (4,734 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-24T13:02:28.832Z","embedding":null,"createdAt":"2026-04-18T23:04:45.561Z","updatedAt":"2026-04-24T13:02:28.832Z","lastSeenAt":"2026-04-24T13:02:28.832Z","tsv":"'/ql-execute':204 '/quantum-loop':70,274,450,687 '/quantum-loop.sh':190,195 '0':550 '1':64,114,135,305,489,554 '2':72,123,148,326,527,565,596 '20':194 '3':80,133,335,569,609 '4':146,200,345,358,620 '5':158,368,632 '6':166,387,641 '8':440 '9':250 'across':526 'action':623 'adjac':322 'after.json':364 'agent':107 'agents/orchestrator.md':110 'aggreg':630 'altern':181 'api':534 'appli':621 'appropri':406 'approv':668,677 'attempt':240 'autonom':10,26,52,179 'avail':86 'back':376,460 'barrel':589 'base':308,371,501,513,547,603 'baselin':328,360,362 'bash':189,398,510,544,600,606 'before.json':363 'block':162,178,220,643 'blocker':651 'boundari':494 'brainstorm':13 'branch':269,459 'build':82 'canonic':521 'cargo':89,418 'cargo-udep':417 'cascad':161 'chang':282,656 'check':143,495 'class':541 'claud':186 'clean':428,555,679 'cleanup':247,323 'cli':180 'code':187,334,352,409 'codebasepattern':676 'comment':670,674 'commit':145,295,499 'compar':361 'complet':172,216,229,444 'comput':484,597 'consist':354 'constant':508 'creat':68 'creep':325 'critic':481 'cross':506 'cross-stori':505 'dag':34,122 'dead':351,408 'dead-cod':350,407 'dedup':624 'deep':453,469,690 'deep-review':468 'deepreview':640 'dep':591 'dep-manifest':590 'depend':33,121,131 'deslop':277,290,297,338,374 'detect':397,401 'detect-languag':400 'detector':410 'develop':11 'diff':320 'dispatch':403,578,610 'diverg':551 'duplic':353 'e.g':529 'edit':312 'elig':126,137,150 'emit':373,515,647 'empti':558 'enforc':302 'error':164 'etc':90 'execut':3,19,27,49,53,101,138,177,184,212,222 'exist':67 'exit':333,549,553 'fail':233,236,431,649 'failurelog':654 'featur':268,475 'file':283,315 'final':498,635 'find':517,559,631 'fire':445 'fix':662 'fix-stori':661 'follow':104 'found':552 'full':586 'gate':44,260,487,542,546 'git':78 'googl':530,533 'google-api-key':532 'hallucin':625 'hand':456 'handl':159 'handoff':646 'head':309,503,514,548,604 'high':480,568 'hook':248,438,686 'implement':35,56,141,153 'inform':96 'input':572 'inspect':386 'instead':205 'instruct':108 'invok':273,449,694 'isol':156 'iter':193 'json':516 'key':525,535 'knip':411 'languag':396,402 'legaci':681 'lib/barrel-regen.sh':594 'lib/deep-review.sh':483,601,607,622 'lib/dep-manifest.sh':595 'lib/deslop.sh':304,399 'lib/resilience.sh':583 'lib/wave-boundary.sh':511,545 'lint':331 'linux/mac':188 'liter':519 'log':673 'loop':9,28,48,54,167 'mandatori':299,472 'manifest':592 'manual':695 'math':538 'math-research':537 'max':192,198 'max-iter':191 'max-parallel':197 'mean':215 'medium':564 'merg':265,458,644,698 'met':95 'miss':423 'must':66,75,84 'next':378,666 'no-deslop':288 'non':557 'non-empti':556 'npm':87 'object':637 'one':227,234,337 'opt':285,465 'opt-in':464 'opt-out':284 'orchestr':106,112,271,447 'outsid':185,316 'p1.1':441 'p1.2':442 'p1.6':251 'parallel':152,196,199 'part':4 'pass':132,171,219,226,261,339,346,370,379,391,395 'pending/retriable':128 'per':390,482 'per-pass':389 'persist':388,633 'phase':249,439 'pip':88 'pipelin':12,433,436,682 'plan':17,71 'post':243,435,697 'post-merg':696 'post-pipelin':434 'post-review':242 'predat':684 'prerequisit':61,92 'prevent':321 'proceed':671,678 'project':74,81 'prune':414 'ql':2,276,452,689 'ql-deep-review':451,688 'ql-deslop':275 'ql-execut':1 'qualiti':142 'quantum':8,47 'quantum-loop':7,46 'quantum.deslop':394 'quantum.json':30,60,65,116 'quantum.reviews':639 'queri':31,124 'rail':301 'rang':500 'rather':429 'read':29,102,115 'reason':293 'record':291 'recoveri':165 'refus':645 'regener':593 'regress':366,540 'reinforc':357 'reject':310 'reliabl':211 'remain':224,231,241 'report':392 'repositori':79 'request':655 'research':539 'retri':160,238 'review':21,43,144,244,259,437,454,470,576,613,636,691 'reviewer-set':575,612 'risk':477,485,598,618 'roll':375 'rollback':369 'rout':657 'run':24,50,336,490,584 'safeti':300 'scan':509,512 'scope':307,324 'score':486,602,619 'script':209 'sequenc':628 'sequenti':140 'set':577,614 'sever':571 'sha':502,504 'shell':208 'signal':213,214 'skill' 'skill-ql-execute' 'skills/ql-deep-review/skill.md':617 'skills/ql-deslop/skill.md':349 'skip':298,427 'slop':246 'slop-cleanup':245 'snapshot':329 'source-andyzengmath' 'spawn':151 'spec':15 'specifi':615 'stage':42,258 'start':63,382 'state':117 'staticcheck':416 'step':425,488 'stop':100 'stori':36,58,127,136,149,170,175,218,223,225,228,232,235,254,280,318,507,528,648,663 'subag':154 'suit':588 'sup':45 'take':327,359 'target':660 'taxonomi':347 'tdd':38 'test':330,356,587 'test-reinforc':355 'tier':478,599,608 'time':342 'tool':83,421 'topic-agent-skills' 'topic-agentskills' 'topic-claude-code' 'topic-claude-code-plugin' 'topic-claude-code-skill' 'topic-skillsmp' 'trailer':296 'treat':561 'trigger':367 'ts':413 'ts-prune':412 'two':41,257 'two-stag':40,256 'typecheck':332,582,585 'u2192':14,16,18,20,22 'udep':419 'unattend':183 'use':203 'user':98,385,463 'valid':119,306 'variant':566,570 'verdict':626,642 'verifi':23 'via':287,467,543 'vs':531 'vultur':415 'wave':493,580,667 'wave-boundari':492 'wave-wid':579 'wide':581 'window':202 'worktre':157","prices":[{"id":"0ceadefc-bb4c-4023-992d-879b082dfcce","listingId":"96b600af-d9e7-4a4c-a0b6-973dd5cb38be","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"andyzengmath","category":"quantum-loop","install_from":"skills.sh"},"createdAt":"2026-04-18T23:04:45.561Z"}],"sources":[{"listingId":"96b600af-d9e7-4a4c-a0b6-973dd5cb38be","source":"github","sourceId":"andyzengmath/quantum-loop/ql-execute","sourceUrl":"https://github.com/andyzengmath/quantum-loop/tree/master/skills/ql-execute","isPrimary":false,"firstSeenAt":"2026-04-18T23:04:45.561Z","lastSeenAt":"2026-04-24T13:02:28.832Z"}],"details":{"listingId":"96b600af-d9e7-4a4c-a0b6-973dd5cb38be","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"andyzengmath","slug":"ql-execute","github":{"repo":"andyzengmath/quantum-loop","stars":22,"topics":["agent-skills","agentskills","claude-code","claude-code-plugin","claude-code-skill","skillsmp"],"license":"mit","html_url":"https://github.com/andyzengmath/quantum-loop","pushed_at":"2026-04-24T12:53:22Z","description":"Spec-driven autonomous development loop for Claude Code. Combines structured PRD generation, dependency DAG execution, two-stage review gates, and Iron Law verification.","skill_md_sha":"bff64433a9ea6015b3d485038cecdd57d1149eff","skill_md_path":"skills/ql-execute/SKILL.md","default_branch":"master","skill_tree_url":"https://github.com/andyzengmath/quantum-loop/tree/master/skills/ql-execute"},"layout":"multi","source":"github","category":"quantum-loop","frontmatter":{"name":"ql-execute","description":"Part of the quantum-loop autonomous development pipeline (brainstorm \\u2192 spec \\u2192 plan \\u2192 execute \\u2192 review \\u2192 verify). Run the autonomous execution loop. Reads quantum.json, queries the dependency DAG, implements stories with TDD and two-stage review gates. Supports parallel execution via native worktree isolation. Use after /quantum-loop:plan has created quantum.json. Triggers on: execute, run loop, start building, ql-execute."},"skills_sh_url":"https://skills.sh/andyzengmath/quantum-loop/ql-execute"},"updatedAt":"2026-04-24T13:02:28.832Z"}}