Backend Task Quality Loop
Purpose
- Execute
/task, /build, and /review equivalent behavior directly.
- Maintain deterministic task-by-task quality execution.
Execution Contract
This skill follows the non-entry execution contract standard.
Required contract_extensions: execution_mode.
See codex-execution-contract.md and non-entry-execution-contract-template.md for full rules.
input:
objective: "Run autonomous task-quality cycle"
contract_extensions: { execution_mode: "autonomous-loop" }
output:
status: "completed"
quality_gate:
gate_id: "backend-task-quality-check"
gate_type: "implementation"
trigger: "post-cycle validation"
criteria:
- "Task-quality checks are complete"
- "Execution mode remains aligned with the contract"
result: "pass"
evidence:
- "Task quality gate passed"
blockers: []
branching:
on_pass: "handoff"
on_fail: "revise"
max_cycles: 2
contract_extensions: { execution_mode: "autonomous-loop" }
Contract Compliance
- Emit structured output compliant with
codex-execution-contract.md.
- Always include baseline output fields:
status, summary, changed_files, tests, quality_gate, blockers, next_actions.
- Validate required input fields from
../workflow-entry/references/non-entry-execution-contract-template.md (objective, scope, constraints, acceptance_criteria, allowed_commands, sandbox_mode) before proceeding.
- Echo required skill extensions in
contract_extensions: execution_mode.
- Treat missing required fields as contract violations and regenerate output before handoff.
- On contract violation (missing/invalid field, invalid status value, or missing extension keys): do not proceed; emit status: blocked with violation description in blockers.
- Reference:
non-entry-execution-contract-template.md.
Execution Modes
single-task (/task equivalent)
autonomous-loop (/build equivalent)
compliance-review (/review equivalent)
Mandatory Per-Task Cycle
- Define a single atomic task unit.
- Implement with
coding-principles.
- Run escalation check (scope/risk/blockers).
- Run quality gate with
ai-development-guide.
- Validate tests (
testing-principles).
- Mark ready for commit/report.
Quality Gate Minimum
- Format/style checks
- Lint/static checks
- Build/compile
- Unit tests
- Integration tests when impacted
Autonomous Loop Rules
- Execute one task unit at a time.
- If task files are missing but a plan exists, generate task units first.
- On requirement changes, emit
[Stop: requirement-change-detected] + [Approve: route-selection].
- Never defer quality checks to the end of the loop.
Compliance Review Mode
- Compare implementation against Design Doc acceptance criteria.
- Score coverage and list gaps.
- Before applying fixes, emit
[Stop: pre-implementation-approval] + [Approve: implementation-start] unless already approved for current scope.
- Re-run full quality gate.
- Re-score and report remaining non-fixable issues.
Hard Rules
- No multi-task batching in one quality cycle.
- No silent fallback to hide errors.
- No completion claim without test/build evidence.
Quality Gate Evidence
- This executor owns
quality_gate emission and branching using quality-gate-evidence-template.md.
- Emit canonical fields:
gate_id, gate_type, trigger, criteria, result, evidence, blockers, branching.
- Use
gate_type: implementation for backend task/build/review execution loops.
- Normalize local statuses into
result: pass|fail|blocked before handoff.
- If
result: blocked, emit [Stop: quality-gate-failed] and pause for escalation handling.
Stop/Approval Protocol
Use canonical markers: [Stop: <Gate Name>].
Classify every stop as approval_gate or escalation_gate.
At each stop, emit a full gate record: gate_name, gate_type, trigger, ask_method, required_user_action, resume_if, fallback_if_rejected.
Default ask_method is AskUserQuestion.
Resume an approval_gate only with explicit user approved: true; resume an escalation_gate only after user direction or reroute.
Respect batch boundary: no autonomous implementation starts before [Stop: pre-implementation-approval] is approved.
Enforce max_revision_cycles: 2; overflow requires human intervention.
Agent-local review scores never replace user approvals.
Stop points for this skill:
[Stop: pre-implementation-approval] (approval_gate)
[Stop: high-risk-change] (approval_gate)
[Stop: requirement-change-detected] (escalation_gate)
[Stop: quality-gate-failed] (escalation_gate)
[Stop: revision-limit-reached] (escalation_gate)
Full protocol and payload schema: ../workflow-entry/references/stop-approval-section-template.md.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: backend-task-quality-loop3description: Backend task/build/review execution loop in Claude without subagents. Enforces per-task quality gates and design-compliance checks. Use when this capability is needed.4---56# Backend Task Quality Loop78## Purpose910- Execute `/task`, `/build`, and `/review` equivalent behavior directly.11- Maintain deterministic task-by-task quality execution.1213## Execution Contract1415This skill follows the non-entry execution contract standard.16Required `contract_extensions`: `execution_mode`.17See [`codex-execution-contract.md`](../workflow-entry/references/codex-execution-contract.md) and [`non-entry-execution-contract-template.md`](../workflow-entry/references/non-entry-execution-contract-template.md) for full rules.1819```yaml20input:21 objective: "Run autonomous task-quality cycle"22 contract_extensions: { execution_mode: "autonomous-loop" }23output:24 status: "completed"25 quality_gate:26 gate_id: "backend-task-quality-check"27 gate_type: "implementation"28 trigger: "post-cycle validation"29 criteria:30 - "Task-quality checks are complete"31 - "Execution mode remains aligned with the contract"32 result: "pass"33 evidence:34 - "Task quality gate passed"35 blockers: []36 branching:37 on_pass: "handoff"38 on_fail: "revise"39 max_cycles: 240 contract_extensions: { execution_mode: "autonomous-loop" }41```4243## Contract Compliance4445- Emit structured output compliant with [`codex-execution-contract.md`](../workflow-entry/references/codex-execution-contract.md).46- Always include baseline output fields: `status`, `summary`, `changed_files`, `tests`, `quality_gate`, `blockers`, `next_actions`.47- Validate required input fields from `../workflow-entry/references/non-entry-execution-contract-template.md` (objective, scope, constraints, acceptance_criteria, allowed_commands, sandbox_mode) before proceeding.48- Echo required skill extensions in `contract_extensions`: `execution_mode`.49- Treat missing required fields as contract violations and regenerate output before handoff.50- On contract violation (missing/invalid field, invalid status value, or missing extension keys): do not proceed; emit status: blocked with violation description in blockers.51- Reference: [`non-entry-execution-contract-template.md`](../workflow-entry/references/non-entry-execution-contract-template.md).5253## Execution Modes5455- `single-task` (`/task` equivalent)56- `autonomous-loop` (`/build` equivalent)57- `compliance-review` (`/review` equivalent)5859## Mandatory Per-Task Cycle60611. Define a single atomic task unit.622. Implement with `coding-principles`.633. Run escalation check (scope/risk/blockers).644. Run quality gate with `ai-development-guide`.655. Validate tests (`testing-principles`).666. Mark ready for commit/report.6768## Quality Gate Minimum6970- Format/style checks71- Lint/static checks72- Build/compile73- Unit tests74- Integration tests when impacted7576## Autonomous Loop Rules7778- Execute one task unit at a time.79- If task files are missing but a plan exists, generate task units first.80- On requirement changes, emit `[Stop: requirement-change-detected]` + `[Approve: route-selection]`.81- Never defer quality checks to the end of the loop.8283## Compliance Review Mode84851. Compare implementation against Design Doc acceptance criteria.862. Score coverage and list gaps.873. Before applying fixes, emit `[Stop: pre-implementation-approval]` + `[Approve: implementation-start]` unless already approved for current scope.884. Re-run full quality gate.895. Re-score and report remaining non-fixable issues.9091## Hard Rules9293- No multi-task batching in one quality cycle.94- No silent fallback to hide errors.95- No completion claim without test/build evidence.9697## Quality Gate Evidence9899- This executor owns `quality_gate` emission and branching using [`quality-gate-evidence-template.md`](../workflow-entry/references/quality-gate-evidence-template.md).100- Emit canonical fields: `gate_id`, `gate_type`, `trigger`, `criteria`, `result`, `evidence`, `blockers`, `branching`.101- Use `gate_type: implementation` for backend task/build/review execution loops.102- Normalize local statuses into `result: pass|fail|blocked` before handoff.103- If `result: blocked`, emit `[Stop: quality-gate-failed]` and pause for escalation handling.104105## Stop/Approval Protocol106107Use canonical markers: `[Stop: <Gate Name>]`.108Classify every stop as `approval_gate` or `escalation_gate`.109At each stop, emit a full gate record: `gate_name`, `gate_type`, `trigger`, `ask_method`, `required_user_action`, `resume_if`, `fallback_if_rejected`.110Default `ask_method` is `AskUserQuestion`.111Resume an `approval_gate` only with explicit user `approved: true`; resume an `escalation_gate` only after user direction or reroute.112Respect batch boundary: no autonomous implementation starts before `[Stop: pre-implementation-approval]` is approved.113Enforce `max_revision_cycles: 2`; overflow requires human intervention.114Agent-local review scores never replace user approvals.115116Stop points for this skill:117- `[Stop: pre-implementation-approval]` (`approval_gate`)118- `[Stop: high-risk-change]` (`approval_gate`)119- `[Stop: requirement-change-detected]` (`escalation_gate`)120- `[Stop: quality-gate-failed]` (`escalation_gate`)121- `[Stop: revision-limit-reached]` (`escalation_gate`)122123Full protocol and payload schema: [`../workflow-entry/references/stop-approval-section-template.md`](../workflow-entry/references/stop-approval-section-template.md).124125---126> Converted and distributed by [TomeVault](https://tomevault.io/claim/ssaattww) — claim your Tome and manage your conversions.127<!-- tomevault:4.0:skill_md:2026-04-14 -->