ZAIXOS Engineering Platform — Extraction Sequence
Document type: Extraction Planning Specification
Version: 1.0 · Phase: 12-4
Status: Permanent execution authority
Purpose
Define the exact extraction order — what moves first, what moves later, what never moves — and dependencies between waves.
Extraction dependency graph
Wave 0: Planning docs (12-4) ──► complete
│
Wave 1: Platform governance docs (docs/platform/)
│
Wave 2: Contracts + runtime specification prose
│
Wave 3: Methodology + templates (docs/development/ subset)
│
Wave 4: Manifests + defaults (docs/development/*-manifest.md → runtime/manifests/)
│
Wave 5: Adapter workspace (.cursor/ → adapters/cursor-adapter-v1/workspace/)
│
Wave 6: Validation suite (tests → validation/)
│
Wave 7: Config JSON schemas (schemas/config/)
│
Wave 8: Developer docs consolidation (ERP_DEVELOPER_GUIDE → docs/developer-guide.md)
│
Consumer: 12-7 Composer + .zaixos/ + materialization
│
Sunset: 12-9 remove embedded duplicatesRule: No wave N+1 starts until wave N validation checkpoint passes (see VALIDATION_PLAN.md).
Wave 1 — Platform governance (FIRST)
Phase: 12-6 (first extraction commit)
| Source (Dental Clinic) | Destination (platform repo) |
|---|---|
docs/platform/PLATFORM_*.md | core/constitution/, core/boundaries/ (organized) |
docs/platform/adr/ | docs/platform/adr/ |
docs/platform/product/ | docs/product/ (platform product definition) |
docs/platform/technical/ | docs/technical/ |
docs/platform/planning/ | docs/planning/ |
Why first: Establishes repo authority chain before movable runtime assets.
Validation: Doc link check; no content change vs source SHA.
Wave 2 — Contracts and runtime specification
Phase: 12-6
| Source | Destination |
|---|---|
contracts/runtime-contracts.md | contracts/runtime-contracts.md (rename canonical) |
runtime/specification/engineering-runtime-platform.md | runtime/specification/engineering-runtime-platform.md |
runtime/components/phase-11-4-runtime-procedures-workflows-specification.md | runtime/components/ (split per component) |
| Historical phase-10/11 specs | runtime/specification/archive/ (read-only reference) |
Validation: ContractComplianceTest (after Wave 6); obligation text byte-compare @ contracts@1.
Wave 3 — Methodology and templates
Phase: 12-6
| Source | Destination |
|---|---|
core/methodology/DEVELOPMENT_WORKFLOW.md | core/methodology/DEVELOPMENT_WORKFLOW.md |
core/methodology/RESPONSE_TEMPLATE.md | core/methodology/RESPONSE_TEMPLATE.md |
core/methodology/GIT_FREEZE_PROCEDURE.md | core/methodology/GIT_FREEZE_PROCEDURE.md |
core/methodology/CONTEXT_FILE_POLICY.md | core/methodology/CONTEXT_FILE_POLICY.md |
templates/ | templates/ |
templates/prompts/ | templates/prompts/ |
Validation: EOS report format tests; template section counts unchanged.
Wave 4 — Manifests and defaults
Phase: 12-6
| Source | Destination |
|---|---|
runtime/manifests/defaults/procedures-manifest.md | runtime/manifests/defaults/procedures-manifest.md |
runtime/manifests/defaults/workflows-catalog.md | runtime/manifests/defaults/workflows-catalog.md |
runtime/manifests/defaults/delegation-manifest.md | runtime/manifests/defaults/delegation-manifest.md |
runtime/manifests/defaults/enforcement-manifest.md | runtime/manifests/defaults/enforcement-manifest.md |
runtime/manifests/defaults/context-providers-manifest.md | runtime/manifests/defaults/context-providers-manifest.md |
runtime/manifests/defaults/execution-manifest.md | runtime/manifests/defaults/execution-manifest.md |
| Manifest schemas (derived from specs) | runtime/manifests/schemas/ |
Validation: ManifestParityTest counts match ErpIntegritySupport constants.
Wave 5 — Adapter workspace (LATE — after manifests)
Phase: 12-6
| Source | Destination |
|---|---|
.cursor/ (entire tree) | adapters/cursor-adapter-v1/workspace/ |
adapters/cursor-adapter-v1/profile.md | adapters/cursor-adapter-v1/profile.md |
adapters/cursor-adapter-v1/manifest.json | adapters/cursor-adapter-v1/manifest.json |
Why after manifests: Adapter metadata references manifest paths — must exist in platform repo first.
Validation: AdapterWorkspaceTest; checksum recorded for 1.0.0.
Wave 6 — Validation suite
Phase: 12-6
| Source | Destination |
|---|---|
tests/Architecture/EngineeringRuntimePlatformIntegrityTest.php | validation/tests/ |
tests/Architecture/EngineeringOperatingSystemIntegrityTest.php | validation/tests/ (merge or split per scaffold) |
tests/Architecture/Support/ErpIntegritySupport.php | validation/src/Support/ |
tests/Architecture/Support/EosIntegritySupport.php | validation/src/Support/ (path constants updated) |
tests/Architecture/GovernanceDocumentationTest.php | Split: platform-owned portions → validation; product portions stay |
Validation: Full suite green in platform repo CI with fixture product layout.
Wave 7 — Config schemas
Phase: 12-6
| Source | Destination |
|---|---|
| PLATFORM_CONFIGURATION_REFERENCE.md | schemas/config/*.json (generated from spec in 12-5 scaffold) |
| Example configs | schemas/config/examples/ |
Validation: ConfigSchemaTest against examples.
Wave 8 — Developer guide consolidation
Phase: 12-6
| Source | Destination |
|---|---|
docs/developer-guide.md | docs/developer-guide.md (merged + updated paths) |
docs/runtime-validation.md | docs/runtime-validation.md |
docs/acceptance-checklist.md | docs/acceptance-checklist.md |
docs/development/ENGINEERING_INDEX.md | Redirect content in developer-guide; index deprecated at 12-9 |
What moves LATER (Phase 12-7 — consumer, not extraction)
| Asset | Action |
|---|---|
.zaixos/platform.yml | Created in product repo (not extracted) |
.zaixos/platform.lock | Created at consumer pin |
.zaixos/extensions/manifest.yml | Created empty registry |
composer.json require | Added to product |
What NEVER moves
| Asset | Reason | Owner |
|---|---|---|
app/Modules/** | Product domain | D-R |
docs/architecture/** | Product constitution | D-R |
docs/company/** | Company governance | Company |
tests/Architecture/ModuleBoundaryTest.php | Product modules | D-R |
| Domain feature tests | Product | D-R |
| Filament / Blade / routes | Application | D-R |
AGENTS.md body (product modules) | Product context | D-R |
| PostgreSQL migrations (clinic) | Product data | D-R |
.env | Environment | D-R |
What is REMOVED (Phase 12-9 — not moved)
| Asset | Action |
|---|---|
Embedded docs/development/ ERP authority (post-cutover) | Delete after parity; keep stub README.md pointer |
Duplicate .cursor/ authoritative copy | Replace with materialized mount only |
Product-hosted EosIntegritySupport path to docs/development/ | Replaced by vendor validation paths |
Forbidden extraction shortcuts
| Shortcut | Why forbidden |
|---|---|
| Extract adapter before contracts | Metadata dependency |
| Extract validation before adapter | Parity tests need workspace |
| Skip dual-run | Rollback risk |
| Move product modules "temporarily" | Boundary violation |
| Edit contract text during copy | contracts@1 freeze |
Extraction Sequence v1.0 — Phase 12-4.