From qe-framework
Runs a test-review-fix-retest quality loop on modified code, delegating to Eqa-orchestrator by default. Automatically triggered for code implementation tasks.
How this skill is triggered — by the user, by Claude, or both
Slash command
/qe-framework:Qcode-run-taskThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- **Use this skill** when: you need to understand or configure the quality verification loop process (test -> review -> fix -> retest cycle definition and procedure)
Eqa-orchestrator by default to save main context tokens. The manual step-by-step mode below is for reference and opt-in use only.An assistant that ensures quality by performing a test → review → fix → retest cycle after code implementation is complete.
MANDATORY: All user confirmations (iteration continue, fix/complete/stop, loop limit) MUST use the
AskUserQuestiontool. Do NOT output options as plain text — always call the tool.
/Qrun-task is completetype: code specified in TASK_REQUESTIn the primary Qplan chain, /Qcode-run-task is the verification stage that follows /Qatomic-run.
Qrun-task Step 3 complete (implementation done)
↓
[Qcode-run-task starts]
↓
Step 1: Collect context
↓
Step 2+3: Test + Review (parallel)
├── Ecode-test-engineer (test)
└── Ecode-reviewer (review)
↓
Step 4: Issues found → Fix (Ecode-debugger) → Return to Step 2+3
No issues → Step 5
↓
Step 5: Report results
AskUserQuestion to confirm continuation at each iterationBy default, delegate the entire quality loop to the Eqa-orchestrator sub-agent via Agent tool. This is the recommended approach because:
Information to pass on delegation:
git diff --name-only)After Eqa-orchestrator returns, proceed directly to Step 5 (Report Results) using the returned summary.
Identify changed code and related documents.
git diff --name-only to check changed filesContext summary output:
## Quality Verification Targets
**Task:** [Task name] (UUID)
**Changed files:** N files
- [file list]
**Validation criteria:** M items (see VERIFY_CHECKLIST)
Spawn both agents in parallel using a single message with two Agent tool calls:
Agent 1 — Ecode-test-engineer:
Agent 2 — Ecode-reviewer:
Collect results from both before proceeding to Step 4:
Collect review results:
## Review Results (Iteration N/3)
### Critical (must fix)
- [file:line] description
### Warning (recommended fix)
- [file:line] description
### Suggestion (improvement proposal)
- [file:line] description
Assess based on combined test and review results.
... (omitted) ...
... (omitted) ...
Before declaring the Phase complete, verify prior phases have not regressed:
.qe/planning/ACTIVE_PLAN → flat fallback) and read .qe/planning/plans/{slug}/ROADMAP.md (or flat .qe/planning/ROADMAP.md for legacy projects) to identify completed phases.qe/checklists/completed/)hooks/scripts/lib/regression-gate.mjs provides buildRegressionPlan(), checkPriorPhaseTests(), formatRegressionReport()Skip conditions:
type: docs or type: analysis)After all review/regression gates pass, verify that the code changes actually work in the real system — not just that they compile or pass self-review.
Why this gate exists: Self-referential verification (Claude reviewing Claude's code) suffers from self-preferential bias. Code that looks correct to review may fail when actually executed. This gate requires external ground truth.
Procedure:
.mjs file, run: node -c {file} (syntax check) AND echo '{}' | node {file} (execution test for hooks)node -e 'JSON.parse(require("fs").readFileSync("{file}","utf8"))'node -e 'import("./{file}").then(m => console.log(Object.keys(m)))'claude plugin install would accept the manifest (check against known valid fields)echo '{"cwd":"/tmp"}' | node hooks/scripts/{handler}.mjsFailure handling:
Skip conditions:
type: docs or type: analysis tasks.md files only (no executable code)Even if tests pass, perform a Coverage Gap Audit:
Pass criteria:
On pass: → Proceed to Step 5
On failure:
Report discovered issues to the user
Confirm with AskUserQuestion:
If a fix is needed:
Ecode-debugger sub-agent via Agent toolWhen loop counter reaches 3:
## Loop Limit Reached (3/3)
Issues not yet resolved:
- [remaining issue list]
User judgment is required.
AskUserQuestion: "Additional attempt" / "Complete as-is" / "Manual fix"After test+review, verify documentation coverage of changed code:
checkComments() from hooks/scripts/lib/comment-checker.mjs on all changed filesSkip conditions:
docs or analysis tasks@internal JSDocOn failure (below 50%):
Ecode-debugger with coverage reportBefore running the self-referential QA loop, consider these Claude Code native alternatives that eliminate self-preferential bias:
Option A — /goal (Recommended for bias-free verification)
Set a completion condition evaluated by a separate lightweight model:
/goal all tests pass and no lint errors, or stop after 10 turns
The /goal evaluator is a different model from the one doing the work, which breaks the self-preferential bias that caused the 27-hook incident. See /goal docs.
Option B — claude ultrareview (External code review)
Run a cloud-hosted multi-agent code review:
claude ultrareview --timeout 10
This is an external review service, not self-review. Use when the changes are substantial enough to warrant independent verification.
When to use native vs PSE verification:
/goal with measurable conditionultrareview for independent reviewAfter all verification passes (Steps 4–4.8), run the mandatory Verify gate —
an adversarial stress-test before final completion. This is the SIVS Verify-stage
self-reference defense; full protocol:
skills/Qcritical-review/reference/verify-gate-protocol.md.
Applies to type:code AND type:other (R3 — always mandatory; no ≤ N items
skip). Skip only type: docs/analysis. Any missing/unrecognized type is
normalized to gate-running (never silently bypassed). In Utopia --work the gate
still runs for code/other (the --work skip applies only to docs/analysis) and
runs non-interactively; --qa is mandatory as before.
Procedure:
/Qcritical-review --stage verify with:
| Verdict | Action |
|---|---|
| PASS | Proceed to Step 5 (Report) |
| WARN | Interactive: ask user "Fix and re-verify" / "Accept warnings" / "Stop". Non-interactive (Utopia --work): auto-accept + log. |
| FAIL | Backward routing. Per-finding root_cause_stage: spec → regenerate the spec (Spec gate) and restart; otherwise → Implement (fix loop via Ecode-debugger, return to Step 2). Unclear cause → nearest-first (Implement). Honors the 3-round Loop Limit; after 3 rounds still FAIL → escalate to user (Utopia --work: leave needs-attention with a blocking marker, never silent auto-proceed). |
Output:
[Adversarial Gate] PASS — no critical issues found
or
[Adversarial Gate] WARN — 2 edge cases identified:
- {issue 1}
- {issue 2}
After the adversarial gate passes (Step 4.9), run contract conformance verification for any business-logic contracts stored under .qe/contracts/active/. This gate protects user-defined business logic from "vibe coding" drift by comparing each contract against its implementation and tests via LLM judge.
Skip conditions (fast path):
.qe/contracts/active/*.md files exist → skip entirely.type: docs / type: analysis tasks (no code to verify).Procedure:
/Qverify-contract --all (see skills/Qverify-contract/SKILL.md).Econtract-judge agent on miss.N PASS, M FAIL.| Verdict | Action |
|---|---|
| ALL PASS | Proceed to Step 5 (Report) |
| Any FAIL | Treat as Step 4 failure — show findings to user via AskUserQuestion: "Fix contract drift" / "Accept as-is (accept FAIL)" / "Stop". On "Fix", delegate to Ecode-debugger with the failing contract findings and return to Step 2 (loop counter +1). |
Output example:
[Contract Gate] PASS — 7/7 contracts honored by implementation
or
[Contract Gate] FAIL — 2 contracts have drift:
- sivs-enforcer: Implementation does not handle SIVS_BLOCK_REASON as stated in contract (critical)
- user-service: Missing DuplicateEmailError handling (critical)
Why this gate exists: Tests verify BEHAVIOR; contracts verify INTENT. A passing test can still silently drift from the contract's declared invariants after an AI refactor. This gate catches that class of regression. (See docs/contract-layer.md.)
Summarize and report final results.
## Quality Verification Complete: [Task Name]
**UUID:** {UUID}
**Iterations:** N/3
**Final status:** Pass / Partial pass (user approved)
### Test Results
- Passed: X / Failed: Y
### Review Results
- Critical: 0 / Warning: N / Suggestion: M
### Fix History
| Iteration | Issue Found | Fix Applied |
|-----------|-------------|-------------|
| 1 | [issue] | [fix] |
| 2 | [issue] | [fix] |
### Changed Files (final)
- [file list]
This skill can be called independently as /Qcode-run-task, or it can be automatically triggered from Qrun-task.
/Qcode-run-task {UUID}
type: codeDuring quality verification, reference expert skills matching the project's tech stack:
coding-experts/languages/ — Language-specific coding standardscoding-experts/quality/ — Testing/security/review guidelinesskills/coding-experts/CATALOG.mdnpx claudepluginhub inho-team/qe-framework --plugin qe-frameworkCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.