Knowledge Portal · engineering documentation

Skip to content

ZAIXOS Engineering Platform — Repository Extraction Plan

Document type: Extraction Planning Specification
Version: 1.0 · Phase: 12-4
Status: Permanent execution authority
Architecture authority: technical/TECHNICAL_ARCHITECTURE.md (unchanged)


Purpose

Define the complete extraction strategy for moving embedded ZEP from Dental Clinic Revenue Operating System into standalone repository zaixos-engineering-platform.

This document answers: How do we execute the extraction safely?


Extraction objective

AttributeDefinition
SourceDental Clinic ROS repo (embedded ERP + platform docs + adapter workspace)
Targetzaixos-engineering-platform repository
DistributionComposer package zaixos/engineering-platform @ 1.0.0
First consumerDental Clinic ROS (Consumer #1)
Semantic baselineERP v1.0 / contracts@1 / Cursor Adapter 1.0.0-phase-11-9
GA tagzaixos-platform@v1.0.0 at Phase 12-9

Extraction principles

IDPrinciple
EP-01No semantic change — byte-equivalent baseline at 1.0.0 unless documented parity exception
EP-02Documentation first — extraction phases produce Format B reports
EP-03Validate at every gate — see VALIDATION_PLAN.md
EP-04Dual-run before cutover — embedded + vendored parity during 12-6–12-8
EP-05Rollback always available — see ROLLBACK_PLAN.md
EP-06No architecture redesign — layout follows REPOSITORY_LAYOUT_PLAN.md
EP-07Product domain never extractedapp/Modules/, product architecture stay
EP-08Git operations by Developer only — per existing freeze policy

Repository split graph

┌─────────────────────────────────────────────────────────────────────────────┐
│                    DENTAL CLINIC ROS (today)                                 │
├──────────────────────────────┬──────────────────────────────────────────────┤
│ EXTRACTS TO PLATFORM REPO    │ REMAINS IN PRODUCT REPO                       │
├──────────────────────────────┼──────────────────────────────────────────────┤
│ docs/development/ (ERP/EOS)  │ app/Modules/                                  │
│ .cursor/ (adapter workspace)│ docs/architecture/                            │
│ docs/platform/ (authority)   │ docs/product/ · docs/compliance/ · etc.       │
│ tests/Architecture/          │ tests/Architecture/ModuleBoundaryTest.php    │
│   Engineering*Integrity*     │   (+ domain architecture tests)               │
│   ErpIntegritySupport        │ tests/Unit/ Feature/                          │
│   EosIntegritySupport (→)    │ AGENTS.md (product sections)                  │
│                              │ .zaixos/ (created at 12-7 — consumer config)  │
└──────────────────────────────┴──────────────────────────────────────────────┘

                    │ Phase 12-6 extraction

┌─────────────────────────────────────────────────────────────────────────────┐
│              zaixos-engineering-platform (target)                            │
│  core/ · contracts/ · runtime/ · adapters/ · validation/ · docs/ · schemas/ │
│  composer.json → zaixos/engineering-platform                                 │
└─────────────────────────────────────────────────────────────────────────────┘

                    │ Phase 12-7 consumer migration

┌─────────────────────────────────────────────────────────────────────────────┐
│  DENTAL CLINIC ROS (consumer)                                              │
│  composer require zaixos/engineering-platform                              │
│  .zaixos/platform.yml · platform.lock · extensions/                          │
│  .cursor/ → materialized from package                                        │
│  docs/development/ → removed (redirect stubs only until 12-9 cleanup)       │
└─────────────────────────────────────────────────────────────────────────────┘

Extraction strategy (phased)

StagePhaseOutcome
Plan12-4This planning suite — complete
Scaffold12-5Empty platform repo matching REPOSITORY_LAYOUT_PLAN.md
Extract12-6Assets copied to platform repo; parity tests green in platform CI
Consume12-7Dental Clinic pins package; dual-run parity vs embedded
Validate12-8Consumer + platform + compatibility validation
Freeze12-9Platform v1.0.0 GA; embedded copies sunset

Dual-maintenance model (12-6 → 12-8)

During dual-run:

CopyLocationAuthority
Embedded (legacy)docs/development/, .cursor/ in Dental ClinicFrozen at extraction baseline SHA
Platform (canonical)vendor/zaixos/engineering-platform + .zaixos/Content authority D-P

Rule: Fixes that affect platform semantics apply to platform repo first, then sync to embedded only if rollback window requires — prefer forward migration.


Extraction dependency graph

12-4 Planning (complete)

12-5 Scaffold (repo structure, composer skeleton, CI skeleton — no asset copy yet)

12-6 Extraction Wave 1: governance + contracts + runtime specs (docs/platform/, contracts prose)

12-6 Extraction Wave 2: methodology + templates (docs/development/ methodology subset)

12-6 Extraction Wave 3: adapter (.cursor/ → adapters/cursor-adapter-v1/)

12-6 Extraction Wave 4: validation tests + support classes

12-6 Extraction Wave 5: schemas/config (from technical spec)

12-7 Consumer: composer require + platform.yml + lock + materialize

12-8 Parity validation (embedded vs vendored)

12-9 Remove embedded duplicates + GA tag

Detail: EXTRACTION_SEQUENCE.md.


Risk summary

RiskMitigationPhase
Semantic drift during copyChecksum + parity tests12-6, 12-8
Broken cross-referencesLink rewrite matrix in PACKAGE_SPLIT_PLAN12-6
CI regressionValidation gates before mergeAll
Developer confusionERP_DEVELOPER_GUIDE → platform developer-guide redirect12-7
Rollback needLOCK + tag restore procedure12-6+

Full matrix: MIGRATION_MATRIX.md.


Success criteria (extraction complete at 12-9)

  • [ ] Platform repo tagged zaixos-platform@v1.0.0
  • [ ] Dental Clinic on platform.lock @ 1.0.0 only (no authoritative embedded ERP)
  • [ ] All Layer 0–5 validation green in product CI
  • [ ] KPI-10 governance duplication index → 0
  • [ ] Embedded docs/development/ ERP authority docs removed or stub-only
  • [ ] .cursor/ materialized from package checksum matches lock

Out of scope (this plan does not execute)

  • Repository creation (12-5)
  • Composer package publish (12-6/12-7)
  • Git push/tag (Developer at 12-9)
  • Runtime Contract amendments
  • New adapter certification beyond cursor-adapter-v1 baseline

Repository Extraction Plan v1.0 — Phase 12-4.

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