Triggers
- hardening phase
- quality gate
- production readiness
- integration testing
- load testing
- compliance audit
- performance certification
- reality check
- security validation
- final QA
- cross-device testing
- regression testing
- stress testing
- pre-production
- hardening sprint
- quality assurance final
Instructions
Phase 4 is the final quality gauntlet. The Reality Checker defaults to "NEEDS WORK" — you must prove production readiness with overwhelming evidence. First implementations typically need 2-3 revision cycles, and that's healthy. Duration: 3-7 days.
Pre-Conditions
Verify before starting:
- Phase 3 Quality Gate passed (all tasks QA'd)
- Phase 3 Handoff Package received
- All features implemented and individually verified
Critical Mindset
The Reality Checker's default verdict is NEEDS WORK. Production readiness requires:
- Complete user journeys working end-to-end
- Cross-device consistency (desktop, tablet, mobile)
- Performance under load (not just happy path)
- Security validation (not just "we added auth")
- Specification compliance (every requirement, not most)
Step 1: Evidence Collection (Day 1-2, All Parallel)
Use organization_spawn or swarm_spawn to activate in parallel:
Evidence Collector — Comprehensive Visual Evidence:
- Full screenshot suite: Desktop (1920x1080), Tablet (768x1024), Mobile (375x667) for every page/view
- Interaction evidence: navigation flows, form interactions, modals, accordions
- Theme evidence: light mode, dark mode, system preference detection
- Error state evidence: 404 pages, form validation, network errors, empty states
- Timeline: 2 days.
API Tester — Full API Regression:
- All endpoints tested (GET, POST, PUT, DELETE) with auth verification
- Input validation, error response verification
- Integration testing (cross-service, database, external APIs)
- Edge cases: rate limiting, large payloads, concurrent requests, malformed input
- Timeline: 2 days.
Performance Benchmarker — Load Testing:
- Load test at 10x expected traffic (P50, P95, P99 response times, throughput, error rate, resource utilization)
- Core Web Vitals: LCP < 2.5s, FID < 100ms, CLS < 0.1
- Database performance: query times, connection pool, index effectiveness
- Stress test: breaking point, graceful degradation, recovery time
- Timeline: 2 days.
Legal Compliance Checker — Final Compliance Audit:
- Privacy compliance: privacy policy, consent management, data subject rights, cookies
- Security compliance: encryption, authentication, input sanitization, OWASP Top 10
- Regulatory compliance: GDPR, CCPA, industry-specific requirements
- Accessibility compliance: WCAG 2.1 AA, screen reader, keyboard navigation
- Timeline: 2 days.
Step 2: Analysis (Day 3-4, Parallel, after Step 1)
Test Results Analyzer — Quality Metrics Aggregation:
- Aggregate quality dashboard (overall score, category breakdown, issue severity distribution)
- Issue prioritization: Critical (must fix), High (should fix), Medium (next sprint), Low (backlog)
- Risk assessment: production readiness probability, remaining risk areas
Workflow Optimizer — Process Efficiency Review:
- Dev-QA loop efficiency (first-pass rate, average retries)
- Bottleneck identification, time-to-resolution
- Improvement recommendations for Phase 6 operations
Infrastructure Maintainer — Production Readiness Check:
- All services healthy, auto-scaling tested, load balancer verified, SSL/TLS valid
- Monitoring validated, alert rules tested, dashboards accessible, logs aggregating
- Disaster recovery: backups operational, recovery procedures tested, failover verified
- Security: firewall rules, access controls, secrets management, vulnerability scan clean
Step 3: Final Judgment (Day 5-7, Sequential)
Reality Checker — THE FINAL VERDICT:
Use organization_delegate for the Reality Checker:
- Reality Check Commands — verify what was actually built (ls, grep for claimed features)
- QA Cross-Validation — cross-reference all previous QA findings
- End-to-End Validation — test COMPLETE user journeys (not individual features)
- Specification Reality Check — quote EXACT spec text vs. actual implementation, document EVERY gap
Verdict options:
- READY: Overwhelming evidence of production readiness (rare first pass) -> Phase 5
- NEEDS WORK: Specific issues with fix list (expected) -> return to Phase 3 Dev-QA loop
- NOT READY: Major architectural issues -> return to Phase 1/2
Expected: 2-3 revision cycles is normal. B/B+ rating on first pass is expected.
Use knowledge_write to persist all certification reports and the Reality Checker verdict.
Deliverables
Success Metrics
- All critical user journeys working end-to-end
- Cross-device consistency (desktop + tablet + mobile)
- P95 < 200ms, LCP < 2.5s, uptime > 99.9%
- Zero critical security vulnerabilities
- All regulatory requirements met
- 100% specification compliance
- Production environment validated and ready
- Reality Checker issues READY verdict
Verify
- The deliverable for this phase exists as a concrete artifact (doc, ticket, board, repo) and its location is shared, not described
- Each commitment has an owner name, a due date, and a definition-of-done that someone other than the author could check
- Risks are listed with likelihood/impact and a named mitigation, not as a generic 'risks: TBD' bullet
- Dependencies on other teams/vendors/agents are explicit; an ack from each dependency is recorded or marked 'pending'
- Success criteria for the next phase are numeric or otherwise objectively testable
- A rollback / kill-switch / 'we will stop if X' criterion is written down before work starts
1---2name: agency-phase-4-hardening3description: Quality and hardening phase — the final quality gauntlet proving production readiness with evidence. Adapted from msitarzewski/agency-agents.4---56## Triggers78- hardening phase9- quality gate10- production readiness11- integration testing12- load testing13- compliance audit14- performance certification15- reality check16- security validation17- final QA18- cross-device testing19- regression testing20- stress testing21- pre-production22- hardening sprint23- quality assurance final2425## Instructions2627Phase 4 is the final quality gauntlet. The Reality Checker defaults to "NEEDS WORK" — you must prove production readiness with overwhelming evidence. First implementations typically need 2-3 revision cycles, and that's healthy. Duration: 3-7 days.2829### Pre-Conditions3031Verify before starting:321. Phase 3 Quality Gate passed (all tasks QA'd)332. Phase 3 Handoff Package received343. All features implemented and individually verified3536### Critical Mindset3738The Reality Checker's default verdict is NEEDS WORK. Production readiness requires:39- Complete user journeys working end-to-end40- Cross-device consistency (desktop, tablet, mobile)41- Performance under load (not just happy path)42- Security validation (not just "we added auth")43- Specification compliance (every requirement, not most)4445### Step 1: Evidence Collection (Day 1-2, All Parallel)4647Use `organization_spawn` or `swarm_spawn` to activate in parallel:4849**Evidence Collector — Comprehensive Visual Evidence**:50- Full screenshot suite: Desktop (1920x1080), Tablet (768x1024), Mobile (375x667) for every page/view51- Interaction evidence: navigation flows, form interactions, modals, accordions52- Theme evidence: light mode, dark mode, system preference detection53- Error state evidence: 404 pages, form validation, network errors, empty states54- Timeline: 2 days.5556**API Tester — Full API Regression**:57- All endpoints tested (GET, POST, PUT, DELETE) with auth verification58- Input validation, error response verification59- Integration testing (cross-service, database, external APIs)60- Edge cases: rate limiting, large payloads, concurrent requests, malformed input61- Timeline: 2 days.6263**Performance Benchmarker — Load Testing**:64- Load test at 10x expected traffic (P50, P95, P99 response times, throughput, error rate, resource utilization)65- Core Web Vitals: LCP < 2.5s, FID < 100ms, CLS < 0.166- Database performance: query times, connection pool, index effectiveness67- Stress test: breaking point, graceful degradation, recovery time68- Timeline: 2 days.6970**Legal Compliance Checker — Final Compliance Audit**:71- Privacy compliance: privacy policy, consent management, data subject rights, cookies72- Security compliance: encryption, authentication, input sanitization, OWASP Top 1073- Regulatory compliance: GDPR, CCPA, industry-specific requirements74- Accessibility compliance: WCAG 2.1 AA, screen reader, keyboard navigation75- Timeline: 2 days.7677### Step 2: Analysis (Day 3-4, Parallel, after Step 1)7879**Test Results Analyzer — Quality Metrics Aggregation**:80- Aggregate quality dashboard (overall score, category breakdown, issue severity distribution)81- Issue prioritization: Critical (must fix), High (should fix), Medium (next sprint), Low (backlog)82- Risk assessment: production readiness probability, remaining risk areas8384**Workflow Optimizer — Process Efficiency Review**:85- Dev-QA loop efficiency (first-pass rate, average retries)86- Bottleneck identification, time-to-resolution87- Improvement recommendations for Phase 6 operations8889**Infrastructure Maintainer — Production Readiness Check**:90- All services healthy, auto-scaling tested, load balancer verified, SSL/TLS valid91- Monitoring validated, alert rules tested, dashboards accessible, logs aggregating92- Disaster recovery: backups operational, recovery procedures tested, failover verified93- Security: firewall rules, access controls, secrets management, vulnerability scan clean9495### Step 3: Final Judgment (Day 5-7, Sequential)9697**Reality Checker — THE FINAL VERDICT**:98Use `organization_delegate` for the Reality Checker:991001. Reality Check Commands — verify what was actually built (ls, grep for claimed features)1012. QA Cross-Validation — cross-reference all previous QA findings1023. End-to-End Validation — test COMPLETE user journeys (not individual features)1034. Specification Reality Check — quote EXACT spec text vs. actual implementation, document EVERY gap104105Verdict options:106- **READY**: Overwhelming evidence of production readiness (rare first pass) -> Phase 5107- **NEEDS WORK**: Specific issues with fix list (expected) -> return to Phase 3 Dev-QA loop108- **NOT READY**: Major architectural issues -> return to Phase 1/2109110Expected: 2-3 revision cycles is normal. B/B+ rating on first pass is expected.111112Use `knowledge_write` to persist all certification reports and the Reality Checker verdict.113114## Deliverables115116- [ ] Full screenshot evidence suite (desktop, tablet, mobile, all pages)117- [ ] API regression report (pass/fail per endpoint)118- [ ] Performance Certification Report (load test, Core Web Vitals, stress test)119- [ ] Compliance Certification Report (privacy, security, regulatory, accessibility)120- [ ] Quality Metrics Dashboard (aggregate scores, issue prioritization)121- [ ] Infrastructure Readiness Report (production environment validated)122- [ ] Reality Checker Integration Report with verdict123124## Success Metrics125126- All critical user journeys working end-to-end127- Cross-device consistency (desktop + tablet + mobile)128- P95 < 200ms, LCP < 2.5s, uptime > 99.9%129- Zero critical security vulnerabilities130- All regulatory requirements met131- 100% specification compliance132- Production environment validated and ready133- Reality Checker issues READY verdict134135## Verify136137- The deliverable for this phase exists as a concrete artifact (doc, ticket, board, repo) and its location is shared, not described138- Each commitment has an owner name, a due date, and a definition-of-done that someone other than the author could check139- Risks are listed with likelihood/impact and a named mitigation, not as a generic 'risks: TBD' bullet140- Dependencies on other teams/vendors/agents are explicit; an ack from each dependency is recorded or marked 'pending'141- Success criteria for the next phase are numeric or otherwise objectively testable142- A rollback / kill-switch / 'we will stop if X' criterion is written down before work starts