Knowledge Portal · engineering documentation

Skip to content

ZAIXOS Engineering Platform — Extension Architecture

Document type: Technical Specification
Version: 1.0 · Phase: 12-3
Status: Permanent technical authority
Governance: PLATFORM_EXTENSION_MODEL.md


Purpose

Define the technical merge architecture for product extensions — registry structure, precedence, materialization merge algorithm, and validation binding.


Extension graph

                    ┌──────────────────────┐
                    │   Platform Core       │
                    │   (immutable @ pin)   │
                    └──────────┬───────────┘

         ┌─────────────────────┼─────────────────────┐
         ▼                     ▼                     ▼
┌─────────────────┐  ┌─────────────────┐  ┌─────────────────┐
│ Default         │  │ Adapter         │  │ Extension       │
│ Manifests       │  │ Template        │  │ Registry        │
│ (platform)      │  │ (platform)      │  │ (product)       │
└────────┬────────┘  └────────┬────────┘  └────────┬────────┘
         │                     │                     │
         └─────────────────────┼─────────────────────┘

                    ┌──────────────────────┐
                    │ Materialization       │
                    │ Merge Engine          │
                    └──────────┬───────────┘

                    ┌──────────────────────┐
                    │ Effective Runtime     │
                    │ View (read-only)      │
                    └──────────────────────┘

Registry architecture

Single registry file: .zaixos/extensions/manifest.yml

Extension typeSlot pathRegistry key
Procedure.zaixos/extensions/procedures/{id}/SKILL.mdextensions.procedures[]
Workflow.zaixos/extensions/workflows/{id}/SKILL.mdextensions.workflows[]
Delegate.zaixos/extensions/agents/{role}-agent.mdextensions.delegates[]
Rule.zaixos/extensions/rules/{priority}-{name}.mdcextensions.rules[]
Knowledge pack.zaixos/extensions/knowledge/{pack-id}/extensions.knowledgePacks[]

Unregistered files: Ignored at materialization; flagged as validation warnings (errors on release branches).


Merge precedence (normative)

Stage 1: Platform constraint rules (categories A–G) — full set from adapter template
Stage 2: Product extension rules — categories C–G only; append, never override A–B
Stage 3: Platform default procedures, workflows, delegates — from adapter template
Stage 4: Product extension procedures, workflows, delegates — append by ID
Stage 5: Platform enforcement hooks — unchanged; extensions cannot disable
Stage 6: Context providers — platform defaults; product extensions add providers only if schema allows (v1: platform-only)
Stage 7: Execution config — platform adapter cli/environment.json; product cannot override fail-closed flags

Merge algorithm (logical)

INPUT: platformPin, adapterTemplate, extensionManifest, productExtensionFiles

1. LOAD adapter workspace template → workingTree
2. VALIDATE extensionManifest against JSON schema
3. FOR EACH registered rule:
     ASSERT category NOT IN (A, B)
     COPY file to workingTree.rules/ (adapter-relative path mapping)
4. FOR EACH registered procedure/workflow/delegate:
     ASSERT id NOT IN platformDefaultIds
     COPY artifact to mapped adapter path
5. FOR EACH registered knowledgePack:
     COPY to .zaixos/extensions/knowledge/ (not auto-injected as constraints)
6. RUN enforcement handler manifest parity check
7. WRITE workingTree → .zaixos/adapters/{id}/workspace/
8. CREATE ide mount
9. COMPUTE checksum → return MaterializationResult

ID namespace

PrefixOwnerExample
Platform defaultsD-Pskill-architecture, workflow-phase-implementation
Product extensionsD-Rskill-product-compliance-review
ForbiddenProductSame ID as platform default

Collision → validation fail closed.


Extension limits (enforced at validation)

TypeSoft warnHard max
Procedures1520
Workflows810
Delegates810
Rules45
Knowledge packs500 KB each

Extension validation architecture

StageCheck
Schemamanifest.yml valid
PathEach entry file exists
ContractEach artifact cites Runtime*Contract
ScopeRules pass category gate
UniquenessNo platform ID collision
Forbidden actionsDelegates/procedures include escalation + forbidden list
Core integrityZero diff vs vendor core for platform paths

Tests: ExtensionSchemaTest, ManifestParityTest (platform validation package).


Extension lifecycle (technical)

Author artifact locally
    → Register in manifest.yml
    → Run materialization (refresh effective view)
    → Run validation
    → Product architect review (scope)
    → Commit manifest + artifacts
    → CI validation on PR

Removal: delete artifact + manifest entry + rematerialize — no platform version bump.


Anti-patterns (technical enforcement)

PatternDetection
Vendor core editChecksum diff vs package
Unregistered fileDirectory scan vs manifest
Rule category A–BFrontmatter parser in validation
Missing contract citationRegex/structured header check

Future extension points (v2+ — not v1)

PointStatus
CLI pluginsExperimental
Custom validation rulesRejected for v1 — platform owns tests
Second adapter mountSeparate mount config block

Extension Architecture v1.0 — Phase 12-3.

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