Elev8 Matrix Ecosystem

CRM ↔ Labyrinth

Integration & Workflow Guide

The technical view: how ElevateCRM and Labyrinth interact, the modules' impact on each other, the closed-won → onboarding handoff (data, gates, pre/post-conditions), and how both connect to the wider Elev8 fabric.

SpineCRM → Labyrinth "Light" handoff (REST) + governed fabric events (Seraph)
EnvironmentElev8 dev/staging — verified live 2026-06-01
CompanionsElevateCRM & Labyrinth Workflow Guides · Nexus Client Journey Guide
Behaviours are from the running code and a live closed-won handoff. Where behaviour differs by environment (external-CRM relays in dev) it is documented honestly.
Overview

Two systems, one continuous funnel

ElevateCRM runs the revenue motion (lead → pipeline → closed-won). The moment a deal is won, two things fire in parallel: a direct handoff creates the delivery contract in Labyrinth, and a governed fabric event notifies the ecosystem. Labyrinth then runs execution.

#StageSystemPrimary trigger / event
1Lead capturedElevateCRMform / manual / Nexus inbound
2Qualified → DealElevateCRMlead conversion
3Pipeline movementElevateCRMmove-stagedeal_stage_change (→ MAi)
4Closed-Won gateElevateCRMrequires final value + payment terms + handoff form
5Closed-Won firesElevateCRMapply_closed_won_automations
6aDirect handoffCRM → LabyrinthPOST /api/light/handoff (REST, token-auth)
6bGoverned eventCRM → Seraphdeal_stage_change → MAi + Nexus
7Contract createdLabyrinth OSSIGNED / ONBOARDING + milestones + requests
8Execution & accountabilityLabyrinth OSowner delegates · cron escalates overdue
Two distinct paths. The onboarding handoff (6a) is a direct REST call, not via Seraph. The fabric event (6b) is the governed signal through Seraph to MAi/Nexus. Same trigger, independent: the contract can be created even if the fabric event is off, and vice-versa.
Modules

How the modules affect each other

Actions in one module ripple into others through triggers, automations and the fabric.

Action (module)Triggers / automationsImpact on other modules
Deal → any stage (CRM)emits deal_stage_change → MAiMAi event log records it; CRM dashboard counts update.
Deal → Closed-Won (CRM)lock deal · assign delivery owner · kickoff task · notify finance · affiliate commission · call Labyrinth handoff · timeline event; fabric event → MAi + NexusCreates a Labyrinth contract; Nexus scorecard; Finance notified; Ripple commission.
Proposal accepted (CRM)proposal_accepted → MAi (+ Nexus if a Nexus lead_id exists)MAi notification; Nexus freezes eval snapshot when lead-linked.
Handoff received (Labyrinth)creates contract + milestones + tasks + operational requests + Rainfall message + system eventAppears in System Factory, Contracts, Vision; requests in owners' My Work.
Request overdue (Labyrinth)15-min accountability cron walks the ladderRainfall escalation; Accountability queue; CRITICAL red tags block milestones.
Red tag raised (Labyrinth)severity gates progressionWARNING blocks request · CRITICAL blocks milestone · BLOCKER blocks contract.
Milestone approval (Labyrinth)4-step chainCoordinator → Advisor → Accountability → CEO; all four to fully approve.
Onboarding

CRM → Labyrinth, step by step

Step A · Work the deal to "ready to win" (CRM)

The rep moves the deal across stages; each move emits deal_stage_change to MAi.

Pre-conditions for Closed-Won: contract_final_value (non-null), payment_terms (non-empty), and a complete handoff form (delivery owner + kickoff + checklist). Missing any → the move is blocked. A manager/admin may override with a reason.

Step B · Close the deal (CRM)

Closed-Won requires a win_reason (unless overridden). Deal then locks, status → won, probability → 100%, and apply_closed_won_automations runs.

Post-conditions: deal locked; delivery owner assigned; kickoff task created; finance notified; commission created; handoff fired; fabric event emitted.

Step C · The handoff call (CRM → Labyrinth)

CRM POSTs to {LABYRINTH_LIGHT_BASE_URL}/api/light/handoff with a Bearer token, gated by config + per-tenant flag.

Onboarding

What crosses the wire

The handoff payload shape:

{
  "externalSystem": "elevatecrm",
  "externalTenantId": "<tenant uuid>",
  "externalDealId":   "<deal uuid>",
  "dealName": "…",
  "clientName": "…",
  "contract": { "name": "<Client> Operating Launch", "clientPackage": "SILVER",
                "value": contract_final_value ?? proposal_value ?? amount },
  "milestones": [ "Sales to delivery handoff", "Campaign readiness", "First campaign execution" ]
}

Step D · Labyrinth receives & creates (post-conditions)

The receiver authenticates the token; requires externalDealId, externalTenantId, contract.name, clientName; is idempotent on (tenant, deal). On success it creates:

  • a Contract at stage SIGNED, journey ONBOARDING, mode BUILD;
  • the milestones + tasks from the payload (or defaults);
  • three operational requests (schedule kickoff, confirm onboarding access, publish first plan);
  • a Rainfall communication (requires-ack) and a system event (ELEVATECRM_HANDOFF_RECEIVED).
ResponseMeaning
201Contract created.
200Already linked — returns existing contract (idempotent re-send).
401Bad/missing service token.
422Missing required fields.
500Internal failure — a Development incident is auto-created.
Onboarding

Prerequisites, gates & failure modes

GateWhereBehaviour
LABYRINTH_LIGHT_ENABLEDCRM envMaster switch. Off → {status: skipped, reason: disabled}.
Per-tenant flagworkspace script_config.labyrinth_light.enabledTenant must opt in (or default flag). Not opted in → {skipped, tenant_disabled}.
Base URL + tokenCRM envBoth required. Missing + REQUIRED → 503.
LABYRINTH_LIGHT_REQUIREDCRM envIf true, a failed handoff raises 502 (the close errors). If false, fails silently; deal still closes.
Token matchboth appsCRM's token must equal Labyrinth's. Mismatch → 401 at receiver → 502 if REQUIRED.
Verified 2026-06-01: on the demo tenant the per-tenant flag was enabled and a live closed-won produced labyrinth_light: synced with a contract created. Tokens matched, so no 502 under REQUIRED.

Normal-operation expectations

  • Happy path: close-won → 201 → contract visible in seconds; deal carries spiced.labyrinth_light = synced.
  • Re-close / replay: idempotent — no duplicate contract.
  • Handoff disabled: deal still closes; no contract; status skipped (not an error).
Ecosystem

How CRM & Labyrinth connect to the wider fabric

Both apps emit governed events into the Elev8 fabric through Seraph, which validates/audits and routes to the system-of-record (MAi) and other engines.

External systemRoleTouchpoint
SeraphGovernance / audit / routing gateCRM & Labyrinth POST UIR events with X-Fabric-Token to ELEV8_SERAPH_URL.
Mother AI (MAi)System-of-record + leadership intelligenceReceives every deal_stage_change, proposal_accepted, labyrinth.* event.
NexusStrategy scoring + client journey/portalReceives deal_stage_change on closed-won; proposal_accepted when lead-linked; pushes leads inbound to CRM.
Finexus / DealGaugeFinancial valuation engineDrives the Nexus evaluation; not directly called by CRM/Labyrinth.
RippleReferral / affiliate engineCRM auto-creates an affiliate commission on closed-won.
EnlilIn-app AI assistant / observerSurfaces proposal data (inbound) and observes the firehose.

Prerequisites for fabric integration

  • ELEV8_FABRIC_ENABLED=true on the emitting app.
  • Shared ELEV8_FABRIC_SECRET matching Seraph's, sent as X-Fabric-Token.
  • ELEV8_SERAPH_URL pointing at the environment's Seraph; the app's origin allow-listed.
Honest environment caveats. External CRM relay (dev): outbound relays to a separate, production-owned external CRM return 401 in dev — expected; accepted in staging/prod. Proposal stages (dev): inbound CRM-driven proposal events are blocked in dev, so those screens render scaffold only. The CRM→Labyrinth handoff above is real and was run live.
Reference

Enums, events & env

Labyrinth contract lifecycle (10-stage)

QUESTIONNAIRE → PROPOSAL → SOW → BID → SIGNED → ACTIVE → REVISED → CONFIRMING → COMPLETED → PAID (+ ON_HOLD, CANCELLED). Handoff creates contracts at SIGNED.

Operating journey stage

QUESTIONNAIRE · ONBOARDING · EVALUATION_STRATEGY · PROPOSAL · EXECUTION · DELIVERY · REPORTING · ENHANCEMENT · SCALING · EXIT. Handoff sets ONBOARDING.

Milestone status & approval chain

Status: NOT_STARTED · IN_PROGRESS · OPTIMIZED · EXECUTED · NEEDS_ATTENTION. Approval chain (all four): Coordinator → Advisor → Accountability → CEO.

Request state & red-tag severity

Request: OPEN · IN_PROGRESS · BLOCKED · COMPLETED · CANCELLED. Red tag: WARNING (blocks request) · CRITICAL (blocks milestone) · BLOCKER (blocks contract).

Fabric events

EventFromTargetsWhen
elevatecrm.deal_stage_changeCRMMAi (+ Nexus on closed_won)any stage move
elevatecrm.proposal_acceptedCRMMAi (+ Nexus if lead_id)proposal accepted
labyrinth.*LabyrinthMAi (route/mai)state-engine seams; includes tenant_id

Key env vars

LABYRINTH_LIGHT_ENABLED · LABYRINTH_LIGHT_REQUIRED · LABYRINTH_LIGHT_DEFAULT_TENANT_ENABLED · LABYRINTH_LIGHT_BASE_URL · LABYRINTH_LIGHT_API_TOKEN · ELEV8_FABRIC_ENABLED · ELEV8_FABRIC_SECRET · ELEV8_FABRIC_HEADER · ELEV8_SERAPH_URL.