TorbatYar/docs/ai-framework/boundary-rules.md
Mortezakoohjani 5c6a2e78cf feat(platform): seed service registry, deploy all modules, and fix homepage catalog.
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>
2026-07-27 12:39:51 +03:30

2.8 KiB
Raw Blame History

Boundary Rules

Hard constraints for every implementation phase. Violations block completion.

Canonical ownership: module-boundaries.md. Process mandate: ADR-018.

Service & Module Boundaries

  1. Never implement responsibilities owned by another service.
  2. Never duplicate business logic that already lives in an owning service — consume it.
  3. Never access another services database (no cross-DB queries, FKs, or shared schemas).
  4. Integrate only through versioned HTTP APIs, domain/integration Events, and Provider interfaces.
  5. Never import another services models, repositories, or private modules.

Phase Boundaries

  1. Never move functionality from future phases into the current phase.
  2. Never silently expand Scope into adjacent modules “while were here.”
  3. Out of Scope is binding — document exclusions and respect them.
  4. High-level roadmap text authorizes deriving production engineering for the current phase (definition-of-done.md, enterprise-phase-discovery.md), not pulling next-phase product features forward.

Data & Logic Boundaries

Allowed Forbidden
External ID / ref fields (*_ref) Cross-service foreign keys
HTTP clients to published APIs Reading foreign ORM models
Outbox → event bus → consumers Dual-writing the same journal/aggregate in two services
Provider adapters in the owning service Implementing SMS/payment/etc. inside a non-owning vertical
Shared-lib envelopes/exceptions/JWT helpers Shared-lib business workflows

Accounting & Platform Specials

  1. Journal entries only via Accounting Posting Engine (ADR-010).
  2. Messaging providers only inside Communication (ADR-012).
  3. Product AI remains optional and independent (ai-architecture.md).

Frontend / Backend

  1. UI only under frontend/ (ADR-002).
  2. Backend never embeds UI rules as the source of truth.
  3. Frontend never imports backend packages.

Enforcement