Quality Assurance Workflow
Comprehensive workflow for ensuring task quality, evidence verification, and compliance with CODITECT standards.
Workflow Overview
┌─────────────────────────────────────────────────────────────────┐
│ QUALITY ASSURANCE WORKFLOW │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ EVIDENCE │──▶│ QUALITY │──▶│TRACEABIL │──▶│ COMPLIA- │ │
│ │ CHECKS │ │ CHECKS │ │ITY CHECKS│ │NCE CHECK │ │
│ └──────────┘ └──────────┘ └──────────┘ └────┬─────┘ │
│ │ │
│ ┌──────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ REPORT │◀──│ DECIDE │◀──│AGGREGATE │ │
│ │ GENERATE │ │PASS/FAIL │ │ RESULTS │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
Quality Gate Categories
1. Evidence Checks (Required)
Verify that completion claims have supporting evidence.
| Check | Description | Pass Criteria |
|---|---|---|
file_exists | Implementation file exists | File at expected path |
tests_defined | Tests implemented | ≥1 test method found |
plan_updated | PILOT plan marked | [x] checkbox present |
log_entry | Session log created | Entry with timestamp |
2. Quality Checks (Recommended)
Verify code quality standards.
| Check | Description | Pass Criteria |
|---|---|---|
naming_convention | Follows standards | Matches patterns |
coverage | Test coverage | ≥80% for new code |
lint_clean | No linting errors | 0 errors |
type_check | Type annotations | No type errors |
3. Traceability Checks (Audit)
Verify complete audit trail.
| Check | Description | Pass Criteria |
|---|---|---|
git_commit | Changes committed | Commit exists |
commit_format | Message format | [Track X.Y.Z] prefix |
agent_logged | Agent invocation | Entry in context DB |
Workflow Phases
Phase 1: Evidence Verification
Trigger: Task marked complete
Actions:
- Check file existence
- Verify test count
- Confirm plan update
- Validate session log
Command:
/quality-gate --task E.1.1
# Output:
✅ PASS File Exists
└─ tests/e2e/test_signup_activation_flow.py (450 lines)
✅ PASS Tests Defined
└─ 10 test methods in 3 classes
✅ PASS Plan Updated
└─ [x] E.1.1 marked complete in plan
✅ PASS Session Log Entry
└─ Entry found: 2026-01-01T23:00:00Z
Phase 2: Quality Verification
Trigger: Evidence checks passed
Actions:
- Check naming conventions
- Verify test coverage
- Run linting
- Check type annotations
Command:
/quality-gate --task E.1.1 --include-quality
# Additional checks:
✅ PASS Naming Convention
└─ All tests follow test_* pattern
✅ PASS Coverage
└─ 85% coverage on new code
⚠️ WARN Type Check
└─ 2 missing type annotations
Phase 3: Traceability Verification
Trigger: Quality checks complete
Actions:
- Verify git commit exists
- Check commit message format
- Confirm agent invocation logged
Command:
/quality-gate --task E.1.1 --include-traceability
# Additional checks:
⚠️ WARN Git Commit
└─ Not yet committed (pending)
✅ PASS Commit Format
└─ Will use [Track E.1.1] prefix
✅ PASS Agent Invocation Logged
└─ testing-specialist invoked at 22:00:00Z
Phase 4: Compliance Check
Trigger: All checks complete
Actions:
- Verify ADR compliance (if applicable)
- Check security requirements
- Validate documentation standards
Phase 5: Result Aggregation
Trigger: All checks executed
Actions:
- Count passed/warned/failed
- Calculate overall status
- Identify blocking issues
Result Calculation:
if failed > 0:
overall = "FAILED"
elif warned > 0 and strict:
overall = "FAILED"
elif warned > 0:
overall = "PASSED_WITH_WARNINGS"
else:
overall = "PASSED"
Phase 6: Decision
Trigger: Results aggregated
Actions:
- Apply decision rules
- Determine if blocking
- Generate recommendations
Decision Rules:
| Condition | Result | Action |
|---|---|---|
| All pass | PASS | Proceed |
| Warnings only | PASS* | Proceed with notes |
| Any fail | FAIL | Block completion |
| Strict mode + warnings | FAIL | Block completion |
Phase 7: Report Generation
Trigger: Decision made
Actions:
- Generate summary report
- Include recommendations
- Log to audit trail
Report Format:
QUALITY GATE: E.1.1 - Full signup → payment → activation E2E test
═══════════════════════════════════════════════════════════════
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] ..."
Exit Codes
| Code | Meaning | Action |
|---|---|---|
| 0 | All checks passed | Proceed |
| 1 | Passed with warnings | Proceed, review warnings |
| 2 | Required checks failed | Block, fix issues |
| 3 | Invalid input | Fix parameters |
Automation Support
Single Task:
python H.P.004-SCRIPTS/quality_gate.py --task E.1.1
Track Verification:
python H.P.004-SCRIPTS/quality_gate.py --track E --report
All Pending:
python H.P.004-SCRIPTS/quality_gate.py --pending --json
Strict Mode:
python H.P.004-SCRIPTS/quality_gate.py --task E.1.1 --strict
Integration with CI/CD
# GitHub Actions integration
- name: Quality Gate Check
run: |
python H.P.004-SCRIPTS/quality_gate.py --pending --strict
exit_code=$?
if [ $exit_code -eq 2 ]; then
echo "Quality gate failed"
exit 1
fi
Pre-Commit Hook
#!/bin/bash
# .git/H.P.005-HOOKS/pre-commit
# Run quality gate on modified tasks
modified_tasks=$(git diff --cached --name-only | grep -oP '[A-G]\.\d+\.\d+' | sort -u)
for task in $modified_tasks; do
python H.P.004-SCRIPTS/quality_gate.py --task $task --strict
if [ $? -eq 2 ]; then
echo "Quality gate failed for $task"
exit 1
fi
done
Related Workflows
Workflow Version: 1.0.0 Created: 2026-01-02 Author: CODITECT Process Refinement