Skip to main content

/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)

CheckDescriptionPass Criteria
file_existsImplementation file createdFile exists at expected path
tests_definedTests implemented≥1 test method found
plan_updatedPILOT plan checkbox[x] marked in plan
log_entrySession log entryEntry exists with timestamp
CheckDescriptionPass Criteria
naming_conventionCode follows standardsMatches patterns
coverageTest coverage≥80% for new code
lint_cleanNo linting errors0 errors
type_checkTypeScript/mypy clean0 errors

Traceability Checks (Audit)

CheckDescriptionPass Criteria
git_commitChanges committedCommit exists
commit_formatCommit message format[Track X.Y.Z] prefix
agent_loggedAgent invocation loggedEntry in context DB

Options

OptionDescription
--task X.Y.ZVerify specific task
--track XVerify all tasks in track
--pendingVerify all incomplete tasks
--strictFail on any warning
--reportGenerate compliance report
--jsonJSON output format
--fixAttempt to fix issues

Exit Codes

CodeMeaning
0All checks passed
1Checks passed with warnings
2Required checks failed
3Invalid 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}")
  • /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-PatternProblemSolution
Skip before marking completeFalse completionAlways run gate
Ignore warningsHidden issuesReview all warnings
Override failuresQuality erosionFix 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