Quality Gates
Mandatory gates before any implementation phase may be marked complete.
All gates must Pass. On failure, enter the Automatic Repair Loop (development-loop.md).
Architecture
| Check |
Pass criteria |
| Boundaries |
No ownership theft per module-boundaries.md |
| DB isolation |
No cross-DB queries/FKs (ADR-001) |
| Layering |
Business logic in services; thin API; persistence-only repos |
| FE/BE |
No backend imports in frontend; no UI rules in backend (ADR-002) |
| ADR |
New architectural decisions recorded; conflicts resolved |
| Events |
Outbox-ready; naming per event-template.md |
Security
| Check |
Pass criteria |
| Auth |
Protected routes deny anonymous access |
| Secrets |
No hardcoded credentials/brand tokens |
| Errors |
No stack/secret leakage |
| Providers |
Credentials only in owning service config |
| Align |
security-architecture.md |
Performance
| Check |
Pass criteria |
| Queries |
Tenant-scoped lists use sensible indexes; no obvious N+1 in new hot paths |
| Hot paths |
Covered or explicitly N/A in phase doc |
| Async |
Long-running provider I/O not blocking business transactions when architecture requires async |
Testing
Documentation
| Check |
Pass criteria |
| Updates |
documentation-template.md checklist done |
| Links |
No broken relative links in touched docs |
| Registries |
Module/provider/manifests consistent with code |
| Glossary |
New terms defined when introduced |
| No TODO |
No TODO for claimed deliverables |
Migration
| Check |
Pass criteria |
| Alembic |
Revision exists for schema changes in owning service |
| Apply |
Upgrade smoke succeeds |
| Ownership |
Only owning DB migrated |
| Notes |
Handover includes migration notes |
Backward Compatibility
| Check |
Pass criteria |
| APIs |
Additive within version unless phase documents breaking change + consumer plan |
| Events |
No silent meaning change of existing event_type |
| Data |
Existing rows remain valid or backfill documented |
Tenant Isolation
| Check |
Pass criteria |
| Schema |
Business tables have tenant_id (ADR-003) |
| Queries |
Filters applied |
| Tests |
Cross-tenant denial covered |
| Admin exceptions |
Explicit and audited |
Validation Suites (Framework Phases)
When changing docs/ai-framework/ or docs structure, also verify:
- Architecture Validation — framework links to architecture/ADR correctly; no conflicting rules vs principles.
- Documentation Validation — all listed framework docs exist; index complete.
- Cross Reference Validation — manifests ↔ registries ↔ phase areas agree on names/status where claimed.
- Broken Link Validation — relative Markdown links resolve.
- Template Validation — every template referenced from README exists and has Related Documents.
- Manifest Validation — YAML parses; required fields present; phase/service IDs unique.
Sign-Off
Related Documents