/quality-gate - Quality Gate Verification
Run quality checks to verify task completion with evidence, ensuring all requirements are met before marking tasks complete.
Usage
# Verify specific task
/quality-gate --task E.1.1
# Verify entire track
/quality-gate --track E
# Run all pending verifications
/quality-gate --pending
# Strict mode (all checks must pass)
/quality-gate --task E.1.1 --strict
# Generate compliance report
/quality-gate --track E --report
Output Format
QUALITY GATE: E.1.1 - Full signup → payment → activation E2E test
═══════════════════════════════════════════════════════════════
Verification Checks
───────────────────────────────────────────────────────────────
✅ PASS File Exists
└─ tests/e2e/test_signup_activation_flow.py (450 lines)
✅ PASS Tests Defined
└─ 10 test methods in 3 classes
✅ PASS Test Naming Convention
└─ All tests follow test_* pattern
✅ PASS Fixtures Used
└─ api_client, tenant, user, mock_stripe, mock_redis
✅ PASS PILOT Plan Updated
└─ [x] E.1.1 marked complete in plan
✅ PASS Session Log Entry
└─ Entry found: 2026-01-01T23:00:00Z
⚠️ WARN Git Commit
└─ Not yet committed (pending)
✅ PASS Agent Invocation Logged
└─ testing-specialist invoked at 22:00:00Z
Summary
───────────────────────────────────────────────────────────────
Passed: 7/8 checks
Warned: 1/8 checks
Failed: 0/8 checks
RESULT: ✅ QUALITY GATE PASSED (with warnings)
Recommendations
───────────────────────────────────────────────────────────────
1. Commit changes: git add tests/e2e/ && git commit -m "[Track E.1.1] ..."
Check Categories
Evidence Checks (Required)
| Check | Description | Pass Criteria |
|---|---|---|
file_exists | Implementation file created | File exists at expected path |
tests_defined | Tests implemented | ≥1 test method found |
plan_updated | PILOT plan checkbox | [x] marked in plan |
log_entry | Session log entry | Entry exists with timestamp |
Quality Checks (Recommended)
| Check | Description | Pass Criteria |
|---|---|---|
naming_convention | Code follows standards | Matches patterns |
coverage | Test coverage | ≥80% for new code |
lint_clean | No linting errors | 0 errors |
type_check | TypeScript/mypy clean | 0 errors |
Traceability Checks (Audit)
| Check | Description | Pass Criteria |
|---|---|---|
git_commit | Changes committed | Commit exists |
commit_format | Commit message format | [Track X.Y.Z] prefix |
agent_logged | Agent invocation logged | Entry in context DB |
Options
| Option | Description |
|---|---|
--task X.Y.Z | Verify specific task |
--track X | Verify all tasks in track |
--pending | Verify all incomplete tasks |
--strict | Fail on any warning |
--report | Generate compliance report |
--json | JSON output format |
--fix | Attempt to fix issues |
Exit Codes
| Code | Meaning |
|---|---|
| 0 | All checks passed |
| 1 | Checks passed with warnings |
| 2 | Required checks failed |
| 3 | Invalid task/track specified |
Integration with Hooks
# hooks/pre-task-complete.py
# Runs before marking task complete
result = run_quality_gate(task_id)
if result.failed:
block_completion(f"Quality gate failed: {result.failures}")
elif result.warnings:
log_warning(f"Completing with warnings: {result.warnings}")
Related Commands
/pilot --verify- Quick verification/audit-trail- Full task history/pilot --dashboard- Progress dashboard
Success Output
When quality gate verification completes:
✅ COMMAND COMPLETE: /quality-gate
Task: <X.Y.Z>
Passed: N/M checks
Warned: W checks
Failed: F checks
Result: PASSED|FAILED
Completion Checklist
Before marking complete:
- Task identified
- Evidence checks run
- Quality checks run
- Traceability verified
- Report generated
Failure Indicators
This command has FAILED if:
- ❌ Task not found
- ❌ Required checks failed
- ❌ No evidence found
- ❌ Invalid task reference
When NOT to Use
Do NOT use when:
- Task not yet started
- Quick progress check (use
/pilot) - Informal review
Anti-Patterns (Avoid)
| Anti-Pattern | Problem | Solution |
|---|---|---|
| Skip before marking complete | False completion | Always run gate |
| Ignore warnings | Hidden issues | Review all warnings |
| Override failures | Quality erosion | Fix issues first |
Principles
This command embodies:
- #8 Verification Required - Evidence-based completion
- #9 Based on Facts - Objective pass/fail
Full Standard: CODITECT-STANDARD-AUTOMATION.md
Command Version: 1.0.0 Created: 2026-01-02 Author: CODITECT Process Refinement