Knowledge Portal · engineering documentation

Skip to content

ZAIXOS Engineering Platform — Technical Architecture

Document type: Master Technical Architecture
Version: 1.0 · Phase: 12-3
Status: Permanent technical authority
Governance: PLATFORM_CONSTITUTION.md · PLATFORM_BOUNDARIES.md
Product: product/PRODUCT_INDEX.md


Purpose

Define how ZEP works internally — layers, packages, flows, states, and rules — so an engineering team can implement the platform without making architectural decisions.

This document is implementation-independent: no repository creation, no PHP code, no Composer package build. It is the permanent technical blueprint.


Design goals (normative)

GoalTechnical expression
Product independentPlatform packages contain zero product domain
Adapter independentCore + contracts have no IDE-native paths
Runtime independentRuntime Components are abstract obligations
Vendor independentAdapter layer isolates Cursor and future IDEs
Implementation independentSpecs precede code in every layer
Ten-year maintainabilitySemver, contracts@N, lock files, validation gates
Single source of truthOne canonical doc per topic (Rule B5)

Platform layer model

┌─────────────────────────────────────────────────────────────────────────────┐
│ L7  Consumer Integration     product repo: .zaixos/ · platform.lock · CI   │
├─────────────────────────────────────────────────────────────────────────────┤
│ L6  Validation               contract · manifest · workspace · extension    │
├─────────────────────────────────────────────────────────────────────────────┤
│ L5  Materialization          merge core + adapter + extensions → mounts     │
├─────────────────────────────────────────────────────────────────────────────┤
│ L4  Adapter                  certified workspace templates · metadata       │
├─────────────────────────────────────────────────────────────────────────────┤
│ L3  Runtime Abstraction      components · manifests · schemas · spec      │
├─────────────────────────────────────────────────────────────────────────────┤
│ L2  Contracts                contracts@1 · JSON schemas · obligations       │
├─────────────────────────────────────────────────────────────────────────────┤
│ L1  Methodology & Templates  workflow · reports · RESPONSE_TEMPLATE         │
├─────────────────────────────────────────────────────────────────────────────┤
│ L0  Governance (read-only)   constitution · boundaries · ADRs · versioning  │
└─────────────────────────────────────────────────────────────────────────────┘
         ▲                              ▲
         │                              │
    Product (D-R)                  IDE session (D-T)
    consumes L1–L6                 reads adapter mount only

Dependency direction: L0 → L1 → … → L6. L7 depends on L1–L6. No upward dependency.


Architecture rules (normative)

IDRule
AR-01Platform never depends on Products
AR-02Products always depend on Platform (Public surfaces only)
AR-03Contracts never depend on Adapters
AR-04Adapters implement Contracts
AR-05Validation depends on Contracts (and Public schemas)
AR-06Installer depends on Contracts and Public config schemas
AR-07Knowledge never depends on Runtime (native IDE)
AR-08Templates never depend on Products
AR-09Products extend; Products never modify Platform Core
AR-10No circular dependencies
AR-11Documentation First
AR-12Contracts First
AR-13Validation First
AR-14Architecture Before Implementation
AR-15Single Source of Truth
AR-16Stable Public APIs
AR-17Explicit Ownership (D-P, D-R, D-A, D-V, D-T)
AR-18Extension Before Modification
AR-19Long-term Compatibility

Package graph (logical)

See PACKAGE_ARCHITECTURE.md.

pkg-governance (read-only refs)
    └── pkg-methodology
            └── pkg-contracts
                    ├── pkg-runtime-spec
                    ├── pkg-validation
                    └── pkg-adapters
                            └── pkg-templates
                                    └── pkg-knowledge

Distribution unit: Single Composer package zaixos/engineering-platform containing all logical packages as internal paths (TDR-001).


Dependency graph

See DEPENDENCY_MODEL.md.

Product ──depends──► Platform Public API
Platform Core ──depends──► Contracts
Adapter ──implements──► Contracts
Validation ──depends──► Contracts + Adapter metadata
Materialization ──depends──► Core + Adapter + Extensions
Extensions ──depends──► Extension schema (Public)
Knowledge ──depends──► Nothing runtime-native

Execution graph

See EXECUTION_ARCHITECTURE.md · EXECUTION_PIPELINE.md.

Developer → Platform pin → Workflow → Procedure → Delegate
    → Constraints → Hooks → Validation → Runtime Report
    → Architecture Review → Acceptance → Freeze → Release

Installation flow

See INSTALLATION_ARCHITECTURE.md.

Resolve version (platform.yml constraint + lock)
    → Fetch platform (Composer primary)
    → Verify checksum
    → Lay down .zaixos/platform/
    → Register extensions manifest
    → Materialize adapter
    → Run bootstrap validation
    → Record lock

Bootstrap flow (product developer first session)

Clone product repo
    → Read platform.lock
    → Verify vendor/platform present
    → Verify .zaixos/ tree complete
    → Verify adapter mount (.cursor/ for cursor-adapter-v1)
    → Run validation suite (local)
    → Open IDE (native session)

Materialization flow

See RUNTIME_MATERIALIZATION.md.

Load platform core snapshot (immutable at pin)
    → Load certified adapter template
    → Merge extension registry (manifest.yml)
    → Apply precedence rules
    → Write .zaixos/adapters/{id}/
    → Create IDE mount (symlink or copy)
    → Compute checksum → update lock

Validation flow

See VALIDATION_ARCHITECTURE.md.

Config validation (yaml schemas)
    → Contract reference validation
    → Manifest parity (counts, IDs)
    → Adapter workspace existence
    → Extension schema + limits
    → Architecture tests (product-owned, separate suite)
    → Emit validation report

Configuration hierarchy

See CONFIGURATION_ARCHITECTURE.md.

Platform release defaults (in package)
    └── .zaixos/platform.yml (product declarative)
            └── .zaixos/platform.lock (product exact pin)
                    └── .zaixos/extensions/manifest.yml (product extensions)
                            └── IDE session (ephemeral — not platform config)

Precedence: lock overrides yaml drift warnings; extensions cannot override platform constraints A–B.


State machine (platform assets)

See PLATFORM_STATE_MACHINE.md.

Draft → Specified → Reviewed → Approved → Implemented → Validated → Released → Deprecated → Archived

Phase work products use the same state machine; Released platform assets receive semver tags.


Lifecycle matrix

See ASSET_LIFECYCLE.md for per-asset: Platform, Contract, Workflow, Procedure, Rule, Template, Knowledge, Adapter, Manifest, ADR, RFC, Validation Suite, Configuration, Documentation.


Evolution matrix

See EVOLUTION_MODEL.md.

Change typeAuthorityVersion bumpMigration
Additive PublicPlatform MINORMINOROptional lock refresh
Breaking PublicADR + MAJORMAJORRequired guide
Contract obligationNew contracts@NPlatform MAJORAdapter re-cert
Extension onlyProductNone on platformProduct manifest
Adapter fixAdapter PATCHPATCHRematerialize

Compatibility matrix (platform 1.x baseline)

Platformcontracts@AdaptersExtension schemaLock schema
1.0.x1cursor-adapter-v1v1v1
1.x.x1cursor-adapter-v1v1v1

Contract obligation changes require contracts@2 and platform 2.0.0 — out of 1.x scope.


Extension graph

See EXTENSION_ARCHITECTURE.md.

Platform Core (immutable)
    ├── Default manifests
    ├── Adapter template
    └── Extension manifest (product)
            ├── procedures/
            ├── workflows/
            ├── agents/
            ├── rules/
            └── knowledge/
                    ↓ merge at materialization
            Effective runtime view (read-only merge result)

Consumer integration flow

Product declares platform.yml
    → Pins platform.lock
    → Registers extensions
    → CI invokes validation entrypoint
    → Developer uses materialized adapter
    → Phase execution pipeline (EXECUTION_PIPELINE)
    → Architect acceptance (RESPONSE_TEMPLATE)
    → Product release (independent semver)
    → Platform upgrade (lock bump + migration guide)

Version resolution flow

See INSTALLATION_ARCHITECTURE.md · EVOLUTION_MODEL.md.

platform.yml versionConstraint (semver range)
    + platform.lock exact version (authoritative for production)
    + composer.lock package hash
    → Resolve to single platform@X.Y.Z + adapter@A.B.C + contractMajor=N
    → Reject if lock drift without explicit bump

Rollback flow

Record failing validation or release incident
    → Restore previous platform.lock from VCS
    → composer install (exact previous versions)
    → Rematerialize adapter
    → Re-run validation
    → Architect documents rollback in phase report

Embedded ERP rollback (transitional): restore tag v5.1-engineering-runtime-platform per PLATFORM_VERSIONING_POLICY.md.


Upgrade flow

Review platform CHANGELOG + compatibility matrix
    → Bump platform.yml constraint (if needed)
    → Update platform.lock (exact)
    → composer update zaixos/engineering-platform
    → Apply migration guide (MAJOR only)
    → Rematerialize
    → Full validation + Architect review for MAJOR

Failure recovery flow

Failure classStop conditionRecovery
Validation failCI redFix artifact or extension; never weaken tests
Materialization failIncomplete mountRe-run materialization; verify checksum
Lock driftWarning or failAlign lock with intended pin
Adapter gapCapability registerArchitect accepts gap or waits for adapter MINOR
Contract mismatchHard failPin compatible adapter; no contract edits in product

Canonical namespace (product repo)

PathOwnerPurpose
.zaixos/platform.ymlD-RDeclarative integration
.zaixos/platform.lockD-RExact pin + checksum
.zaixos/platform/D-P content, D-R instanceVendored or linked platform tree
.zaixos/extensions/D-RRegistered extensions
.zaixos/adapters/{id}/D-A template, D-R mountCanonical adapter storage
.cursor/D-A via mountCursor IDE read path (cursor-adapter-v1)

Relationship to Runtime Contracts

Runtime Contracts define what adapters must implement. Technical architecture defines how platform packages, configs, and flows connect to deliver and verify those implementations.

No conflict: Technical architecture does not add, remove, or redefine contract obligations.


Document map

ConcernDocument
PackagesPACKAGE_ARCHITECTURE.md
DependenciesDEPENDENCY_MODEL.md
InstallationINSTALLATION_ARCHITECTURE.md
ConfigurationCONFIGURATION_ARCHITECTURE.md
ExtensionsEXTENSION_ARCHITECTURE.md
MaterializationRUNTIME_MATERIALIZATION.md
ValidationVALIDATION_ARCHITECTURE.md
Public API (technical)PUBLIC_API_ARCHITECTURE.md
Config referencePLATFORM_CONFIGURATION_REFERENCE.md
DecisionsTECHNICAL_DECISION_RECORDS.md
ExecutionEXECUTION_ARCHITECTURE.md · EXECUTION_PIPELINE.md
StatesPLATFORM_STATE_MACHINE.md
LifecyclesASSET_LIFECYCLE.md
EvolutionEVOLUTION_MODEL.md

Technical Architecture v1.0 — Phase 12-3. Permanent authority before Repository Extraction Planning (12-4).

ZAIXOS Knowledge Portal — public engineering docs at /docs · Staff operations at /admin