Register all active platform services and base features in core DB so admin can manage them, add delivery/hospitality/sports-center backend phases, update apps catalog and production deploy tooling. Co-authored-by: Cursor <cursoragent@cursor.com>
3.7 KiB
3.7 KiB
Project Principles
These principles are mandatory for every implementation phase.
- Every feature must be tenant-aware. Business data always carries and filters by
tenant_id. - Every business action must be auditable. Persist audit metadata or equivalent domain events.
- Business logic only inside Services. Controllers/routers stay thin.
- Repositories contain no business logic. Persistence and queries only.
- Views / API handlers remain thin. Validate, authorize, delegate, map responses.
- Every phase must include tests. No phase complete without automated coverage for new behavior.
- Every phase must update documentation. Code and docs ship together.
- No TODO in completed phases. TODOs mean the phase is not done.
- No cross-tenant query. Platform-admin exceptions must be explicit and logged.
- No direct JournalEntry creation. Posting Engine only (ADR-010).
- Compliance is independent. Compliance controls are not optional UI features.
- AI is independent. Core business flows work when AI is off (ai-architecture.md).
- Everything event-ready. Prefer outbox-backed domain events for cross-service effects.
- Everything API-first. UI is a client, not the source of truth.
- Everything documented. Registries, ADRs, contracts, and progress stay current.
- Database-per-service. No cross-DB access (ADR-001).
- Frontend/Backend separation is absolute. (ADR-002).
- No hardcoded brand or secrets. Config/env/database only.
- Documentation before conflicting code. If implementation conflicts with architecture, stop and fix docs/ADR first.
- Phase completion gate. Follow the checklist in docs/README.md and ai-framework/quality-gates.md.
- Enterprise Definition of Done. Every phase must satisfy ai-framework/definition-of-done.md. CRUD is never sufficient.
- Mandatory production artifacts by default. Deliver applicable items from ai-framework/mandatory-phase-artifacts.md without waiting for the phase prompt to restate them.
- Boundary discipline. Never own another service’s responsibilities, duplicate its logic, access its database, or pull future-phase features forward (ai-framework/boundary-rules.md).
- Enterprise Completeness verification. Sign off ai-framework/enterprise-completeness.md before Complete; implement any missing current-phase requirement first (ADR-018).
- Enterprise Phase Discovery. Before Implementation, run ai-framework/enterprise-phase-discovery.md: inventory roadmap, architecture, boundaries, prior handover, codebase, APIs, domain, events, permissions, aggregates, tests, and docs; promote missing current-phase capabilities into Scope (ADR-019).