---
title: Nexus Capability Gap Analysis
eyebrow: Strategy / Gap Analysis
version: GAP-2.0
date: 2026-05-08
owner: Uued Viljapuuaiad
status: Active
authority: Tier 3
sub: >
  Maps required capabilities from all active and planned use cases to current platform
  component status. Identifies gaps, priorities, and use case dependencies.
  GAP-2.0 adds Section 5: Orchestrator Canvas UI layer gaps (previously undocumented).
---

## 1. Methodology

Each use case document (UCT-3.1 compliant) was analysed for:
- Required node executors (pipeline steps)
- Required platform services (deltaPrism, ChameleonV2, Atlas OCR)
- Required infrastructure (scheduling, SMS gateway, voice processing)
- Required new capabilities (not yet in component registry)

Gap status is determined by cross-referencing against NEXUS_COMPONENT_STATUS.md (CS-1.0).

---

## 2. Platform Capability Summary

| Capability | Component | Current Status | Lines | Test Coverage |
|-----------|-----------|----------------|-------|---------------|
| Rule Engine | core/rule_engine.py | **Production** | 238 | Full |
| BDT Validator | core/data_validator.py | **Production** | 373 | Full |
| Formula Parser | core/formula_parser.py | **Production** | 600 | Full |
| Orchestration | core/orchestration_engine.py | **Implemented** | 316 | test_orchestration_engine |
| AI Transform | nodes/AiTransform | **Implemented** | 119 | test_node_executors_bl06_bl12 |
| Atlas OCR | nodes/AtlasOcr | **Implemented** | 112 | test_node_executors_bl06_bl12 |
| Form Node | nodes/FormNode | **Implemented** | 110 | test_node_executors_bl13_bl15 |
| Human Gate | nodes/HumanGateNode | **Implemented** | 90 | test_orchestration_engine |
| Dashboard | nodes/DashboardNode | **Implemented** | 177 | test_arc_ui_nodes |
| Store Node | nodes/StoreNode | **Implemented** | 120 | test_node_executors_bl06_bl12 |
| deltaPrism Adapter | core/delta_prism_adapter.py | **Implemented** | 777 | test_delta_prism_adapter |
| Voice Ingest | nodes/VoiceIngest | **Implemented** | 114 | test_node_executors_bl16 |
| SMS Ingest | nodes/SmsIngest | **Implemented** | 130 | test_sms_nodes |
| SMS Reply | nodes/SmsReply | **Implemented** | 145 | test_sms_nodes |
| Scheduler Trigger | nodes/SchedulerTrigger | **Implemented** | 220 | test_scheduler_trigger |
| PDF Generator | nodes/PdfGenerator | **Implemented** | 236 | test_node_executors_bl06_bl12 |
| Field Mapper | nodes/FieldMapper | **Implemented** | 136 | test_node_executors_bl06_bl12 |
| ChameleonV2 Forms | External (CodeCommit) | **v1.2.2** | -- | 1047 tests |
| ChameleonBI | Not started | **Declared** | 0 | -- |
| GraphBuildExecutor | nodes/GraphBuild | **Implemented** | 195 | test_graph_build |
| XmlParse | nodes/XmlParse | **DECLARED** | 0 | -- |

---

## 3. Use Case Dependency Matrix

| Capability | Nesto (D1) | ARC (D2) | ENDO (D3) | CA (D4) | EDR (D5) | AER (P1) | AES (P2) | ENDO-DeBuk (D6) |
|-----------|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| Rule Engine | REQ | REQ | REQ | -- | REQ | REQ | REQ | -- |
| BDT Validator | REQ | -- | -- | -- | REQ | REQ | REQ | -- |
| Orchestration | REQ | REQ | REQ | REQ | REQ | REQ | REQ | REQ |
| AiTransform | -- | REQ | REQ | REQ | -- | -- | REQ | OPT |
| AtlasOcr | -- | -- | REQ | -- | -- | -- | -- | -- |
| FormNode | REQ | REQ | REQ | -- | -- | REQ | REQ | REQ |
| HumanGateNode | REQ | REQ | REQ | -- | -- | REQ | -- | -- |
| DashboardNode | -- | REQ | -- | -- | REQ | REQ | REQ | -- |
| StoreNode | REQ | REQ | REQ | -- | REQ | REQ | REQ | REQ |
| deltaPrism | REQ | REQ | REQ | REQ | -- | -- | -- | -- |
| VoiceIngest | -- | -- | REQ | -- | -- | -- | -- | -- |
| SmsIngest | -- | -- | REQ | -- | -- | -- | -- | -- |
| SmsReply | -- | -- | REQ | -- | -- | -- | -- | -- |
| SchedulerTrigger | -- | -- | REQ | REQ | -- | -- | -- | -- |
| PdfGenerator | -- | REQ | -- | -- | -- | -- | -- | -- |
| FieldMapper | -- | REQ | -- | -- | -- | -- | -- | -- |
| GraphBuildExecutor | -- | -- | -- | REQ | -- | -- | -- | -- |
| XmlParse | -- | -- | -- | -- | -- | -- | -- | REQ |
| ChameleonV2 Phase 1 | REQ | OPT | REQ | -- | -- | REQ | REQ | -- |
| ChameleonBI | -- | REQ | -- | -- | REQ | REQ | REQ | -- |

---

## 4. Identified Gaps (Ordered by Impact)

### GAP-01: HumanGateNode -- RESOLVED (2026-05-03)

| Aspect | Detail |
|--------|--------|
| **Current State** | 90 lines, FULLY IMPLEMENTED. Raises HumanGateAwaiting, resume via POST /pipelines/runs/{run_id}/resume API route. ApprovalGate (194 lines) adds RevisionRequested loop. |
| **Resolution** | Was never actually a scaffold -- full suspend/resume mechanism exists in orchestration_engine.py (resume() method) with API endpoint. |
| **Status** | **RESOLVED** |

### GAP-02: ChameleonV2 BDT + Validation Layer (Phase 1 Not Started)

| Aspect | Detail |
|--------|--------|
| **Current State** | M-NEXUS-CV-2 and M-NEXUS-CV-3 not started. ChameleonV2 v1.2.2 has layout engine but no file uploads, entity links, or pattern validation. |
| **Blocks** | Nesto (UC-D1), ENDO (UC-D3), AER (UC-P1), AES (UC-P2) |
| **Impact** | 4 use cases need form capabilities beyond current ChameleonV2. |
| **Required Capabilities** | File Reference field (V-CAP-02a), Entity Link field (V-CAP-02b), Computed Display (V-CAP-02c), Pattern Validation (V-CAP-04a), Min/Max (V-CAP-04b), Conditional Visibility (V-CAP-04c), Async Custom Validator (V-CAP-04d) |
| **Priority** | **P0 -- Critical Path** |
| **Effort** | Large (7 capabilities across Sprints S3-S4) |
| **Dependency** | ChameleonV2 repo (separate CodeCommit) |

### GAP-03: GraphBuildExecutor -- RESOLVED (2026-05-03)

| Aspect | Detail |
|--------|--------|
| **Current State** | 195 lines, IMPLEMENTED. Batch entity/relationship upserts with SHA-256 hash-based idempotency. Live mode calls deltaPrism API, mock mode for demo. |
| **Resolution** | New node executor created: `wormwood/core/node_executors/graph_build.py`. Registered in REGISTRY as "GraphBuild" and "GraphBuildNode". Tests: test_graph_build.py. |
| **Status** | **RESOLVED** |

### GAP-04: SchedulerTrigger -- RESOLVED (2026-05-03)

| Aspect | Detail |
|--------|--------|
| **Current State** | 220 lines, IMPLEMENTED. Full 5-field cron parser (CronExpression class), named months/weekdays, ranges/steps/lists, next_run(), count_occurrences_between(), missed-run detection. |
| **Resolution** | Complete rewrite of scheduler_trigger.py with CronExpression class. 30 tests in test_scheduler_trigger.py. |
| **Status** | **RESOLVED** |

### GAP-05: SMS Gateway Integration -- RESOLVED (2026-05-03)

| Aspect | Detail |
|--------|--------|
| **Current State** | SmsIngest (130 lines) and SmsReply (145 lines) IMPLEMENTED with Twilio production mode. |
| **Resolution** | SmsIngest: Twilio webhook parsing (From/Body/MessageSid), E.164 validation, allowed_numbers whitelist. SmsReply: Twilio REST API with Basic auth. Both retain mock mode. Tests: test_sms_nodes.py. |
| **Status** | **RESOLVED** |

### GAP-06: ChameleonBI -- Declared (Not Started)

| Aspect | Detail |
|--------|--------|
| **Current State** | Declared in Chameleon roadmap Phase 3. No implementation. ArcDashboardGrid and ArcDataTable exist as base components. |
| **Blocks** | EDR (UC-D5 monitoring dashboard), ARC (UC-D2 lead dashboard), AER (UC-P1 asset dashboard), AES (UC-P2 results dashboard) |
| **Impact** | 4 use cases need dashboard rendering from pipeline output. |
| **Required Capabilities** | BI-01 Schema-driven dashboard, BI-02 DashboardNode consumer, BI-03 ListViewNode consumer, BI-04 NavMenuNode consumer |
| **Priority** | **P2 -- Medium** (existing React components can serve as interim) |
| **Effort** | Large (schema binding layer on top of existing components) |
| **Dependency** | ChameleonV2 Layout Engine (M-NEXUS-CV-5, COMPLETE) |

### GAP-07: PdfGenerator -- RESOLVED (2026-05-03)

| Aspect | Detail |
|--------|--------|
| **Current State** | 236 lines, IMPLEMENTED. Local template rendering + remote PDF service mode. EDR compliance report templates with render_edr_compliance_report() helper. |
| **Resolution** | Was already implemented (236 lines) — gap doc was outdated. |
| **Status** | **RESOLVED** |

### GAP-08: FieldMapper -- RESOLVED (2026-05-03)

| Aspect | Detail |
|--------|--------|
| **Current State** | 136 lines, IMPLEMENTED. Rename/copy/drop/coerce fields + NBP API currency conversion. |
| **Resolution** | Was already implemented (136 lines) — gap doc was outdated. |
| **Status** | **RESOLVED** |

### GAP-09: deltaPrism Tenant Isolation

| Aspect | Detail |
|--------|--------|
| **Current State** | deltaPrism Adapter (777 lines) is implemented. Multi-tenancy/isolation model not verified. |
| **Blocks** | CA (UC-D4 needs CA tenant), ENDO (needs ENDO tenant), Nesto (needs Nesto tenant) |
| **Impact** | 3 use cases need isolated graph namespaces. |
| **Required Capability** | Tenant-scoped graph operations. Entity/relation isolation between tenants. Tenant creation/migration API. |
| **Priority** | **P1 -- High** |
| **Effort** | Medium (verify adapter supports tenant_id parameter, add isolation logic if missing) |
| **Dependency** | deltaPrism Adapter |

### GAP-10: AiTransform Provider Abstraction -- RESOLVED (2026-05-03)

| Aspect | Detail |
|--------|--------|
| **Current State** | 230 lines, IMPLEMENTED. Multi-provider factory: Anthropic (SDK), OpenAI (urllib), Local/Ollama (urllib). Config-driven via `provider` field. |
| **Resolution** | Expanded ai_transform.py with _call_anthropic(), _call_openai(), _call_local() methods. Provider dispatch via config. AiTransformVoice inherits multi-provider. |
| **Status** | **RESOLVED** |

### GAP-11: XmlParseNode -- DECLARED (Not Started)

| Aspect | Detail |
|--------|--------|
| **Current State** | Not declared in any existing executor. No structured XML ingestion node exists. `AtlasOcr` handles scanned-document OCR only — it cannot parse structured XML. `IngestNode` handles unstructured/semi-structured input, not KNR cost schema. |
| **Identified By** | ENDO DeBuk offer generation use case (O6) — 2026-05-13. Tomasz Polczyk sales call: DeBuk exports KNR-standard XML (same format used by ZUZIA and Norma4). |
| **Blocks** | ENDO-DeBuk (D6) Path A (production). Without this node, pipeline must use Path B (AiTransformExecutor direct XML read — lower precision, requires ANTHROPIC_API_KEY). |
| **Impact** | Single use case (ENDO-DeBuk D6). Does not block other use cases. Path B available as demo workaround. |
| **Required Capabilities** | XP-01: Parse KNR XML schema (`<Kosztorys><Naglowek>` + `<Dzialy><Dzial><Pozycje><Pozycja>`); XP-02: Calculate R/M/S/KP/Zysk/VAT from KNR norms and header rates; XP-03: Apply margin rules from node config (per-section overrides, per-cost-type percentages); XP-04: Emit `construction-offer` entity JSON; XP-05: Support DeBuk, ZUZIA, Norma4 file origins (all use same KNR XML schema). |
| **Reference Implementation** | `Endo-exec/demo/debuk_sample/parse_debuk.py` — pure stdlib, dataclasses, full KNR calculation. This becomes the executor body. |
| **Priority** | **P2 — Medium** (Path B unblocks demo; Path A required for production use) |
| **Effort** | Small-Medium (reference implementation exists — wrap in NodeExecutor contract, add config layer, register in engine) |
| **Dependency** | None (stdlib only, no new external dependencies required) |
| **Work Package** | WP-2.14 (see NEXUS_ROADMAP.md Phase 2b) |

---

## 5. Critical Path Analysis

### Minimum Viable for Each Use Case

| Use Case | Gaps That Block It | Minimum Gaps to Close |
|----------|-------------------|----------------------|
| **Nesto (UC-D1)** | GAP-01, GAP-02, GAP-09 | All three required |
| **ARC (UC-D2)** | GAP-01, GAP-06, GAP-07, GAP-08 | GAP-01 (others have workarounds) |
| **ENDO (UC-D3)** | GAP-01, GAP-02, GAP-04, GAP-05, GAP-09 | GAP-01, GAP-04, GAP-05 minimum |
| **ENDO-DeBuk (D6)** | GAP-11 | GAP-11 (Path A) or ANTHROPIC_API_KEY (Path B workaround) |
| **CA (UC-D4)** | GAP-03, GAP-04, GAP-09, GAP-10 | GAP-03, GAP-09 minimum |
| **EDR (UC-D5)** | GAP-06 | GAP-06 (or use existing React directly) |
| **AER (UC-P1)** | GAP-01, GAP-02, GAP-06 | All three (planned, not urgent) |
| **AES (UC-P2)** | GAP-02, GAP-06 | Both (planned, not urgent) |

### Recommended Closure Order (Maximum Use Case Unblocking)

| Order | Gap | Effort | Unblocks |
|-------|-----|--------|----------|
| 1 | GAP-01: HumanGateNode | Medium | Nesto, ARC, ENDO, AER |
| 2 | GAP-02: ChameleonV2 Phase 1 | Large | Nesto, ENDO, AER, AES |
| 3 | GAP-09: deltaPrism Tenant Isolation | Medium | CA, ENDO, Nesto |
| 4 | GAP-04: SchedulerTrigger | Small-Medium | ENDO, CA |
| 5 | GAP-05: SMS Gateway | Small | ENDO |
| 6 | GAP-03: GraphBuildExecutor | Medium | CA |
| 7 | GAP-06: ChameleonBI | Large | EDR, ARC, AER, AES |
| 8 | GAP-07: PdfGenerator | Small | ARC |
| 9 | GAP-08: FieldMapper | Small-Medium | ARC |
| 10 | GAP-10: AiTransform Provider | Small | CA |

---

## 6. Component Roadmap Assignments

### Nexus Core (Python -- this repo)

| Gap | Target Milestone | Component |
|-----|-----------------|-----------|
| GAP-01 | M-CORE-01 | HumanGateNode completion |
| GAP-03 | M-CORE-02 | GraphBuildExecutor (new node) |
| GAP-04 | M-CORE-03 | SchedulerTrigger expansion |
| GAP-05 | M-CORE-04 | SMS Gateway integration |
| GAP-07 | M-CORE-05 | PdfGenerator template engine |
| GAP-08 | M-CORE-06 | FieldMapper expression engine |
| GAP-09 | M-CORE-07 | deltaPrism tenant isolation verification |
| GAP-10 | M-CORE-08 | AiTransform provider abstraction |

### ChameleonV2 (TypeScript -- CodeCommit repo)

| Gap | Target Milestone | Component |
|-----|-----------------|-----------|
| GAP-02 | M-NEXUS-CV-2/CV-3 | BDT + Validation Layer (Sprint S3-S4) |
| GAP-06 | M-NEXUS-CV-BI | ChameleonBI (Phase 3) |

---

## 5. Orchestrator Canvas UI Layer Gaps (GAP-11 — GAP-13)

**Scope:** These gaps are specific to the Orchestrator SPA (`WORMWOOD_APP.html`). The canvas editor,
palette, run controls, and Level tabs are all implemented and wired to live API. The gaps below are
completeness issues within the existing implementation.

**Read NEXUS_COMPONENT_STATUS.md Section 8.1 first** — it lists all implemented functions.
Do not treat these as missing capabilities; treat them as partial implementations requiring
targeted completion work.

---

### GAP-11: Per-Node-Type Property Form Schemas

| Aspect | Detail |
|--------|--------|
| **Current State** | `_open(pid, nid, nd)` provides a generic property editor shell with breadcrumb navigation and field rendering. It does not have specific field definitions for each of the 44 registered node types. |
| **Symptom** | Opening the property editor for HttpForward, FieldMapper, AiTransform, etc. shows a generic form rather than the node-specific fields (url/method/headers, mappings table, provider/model/prompt). |
| **Scope** | 44 node types. Priority order: HttpForward, FormNode, AiTransform, FieldMapper, StoreNode, IngestNode (6 most-used in demo pipelines). |
| **Blocks** | App-owner self-service pipeline configuration via UI. AWS deployment goal. |
| **Priority** | **P1 -- High** |
| **Effort** | Medium-per-node (each type needs a JSON schema + field renderer registration). 6 priority nodes = ~2 sprints. |
| **Dependency** | `_open()` framework exists. Only schema definitions are needed, not new infrastructure. |

---

### GAP-12: `USE_CASES` Array — Not DB-Driven (Hardcoded)

| Aspect | Detail |
|--------|--------|
| **Current State** | `WORMWOOD_APP.html` line ~942 contains `var USE_CASES = [...]` (6 entries). This drives the initial org/app card grid in the Orchestrator. Not fetched from any API. |
| **Symptom** | Adding a new org to the database does not make it appear in the Orchestrator card grid. The grid is static. |
| **Fix** | Replace with `fetch('/apps/catalog')` when the `GET /apps/catalog` endpoint (LLD Section 4.1) is implemented. |
| **Dependency** | `GET /apps/catalog` (new route) + `app_catalog` table + `app_component` table (LLD Section 6). |
| **Priority** | **P1 -- High** (blocks app-owner self-service onboarding) |
| **Effort** | Small frontend change. Backend route = Medium. |
| **Note** | This gap does NOT affect pipeline editing, running, or the Level tabs. Only the initial card grid is affected. |

---

### GAP-13: NANO/PICO Level Deep Wiring

| Aspect | Detail |
|--------|--------|
| **Current State** | The property editor panel (`_open()`) opens and navigates with breadcrumbs. Rule references can be set via `setRuleRef()`. The full rule editor (PICO level) is declared as a navigation target but `GET /rules/{rule_id}` editing is not wired per-field inside the property form. |
| **Symptom** | Clicking a rule reference badge in the property editor shows the rule ID but does not navigate to a live rule edit view within the canvas (PICO level). |
| **Fix** | Wire `setRuleRef()` to open rule detail panel via `GET /rules/{rule_id}` + inline edit using `routes_rule_editor.py` endpoints. |
| **Priority** | **P2 -- Medium** |
| **Effort** | Medium. Rule editor route (`routes_rule_editor.py`, 239 lines) exists on backend. Frontend integration needed. |

---

## 6. Critical Path — Updated (GAP-2.0)

| Priority | Gap | Effort | Primary Blocker For |
|----------|-----|--------|---------------------|
| P0 | GAP-02: ChameleonV2 Phase 1 | Large | Nesto, ENDO, AER, AES forms |
| P1 | GAP-11: Node property schemas | Medium | App-owner self-service pipeline config |
| P1 | GAP-12: USE_CASES → /apps/catalog | Medium | Dynamic org/app onboarding |
| P1 | GAP-09: deltaPrism tenant isolation | Medium | CA, ENDO, Nesto isolation |
| P2 | GAP-06: ChameleonBI | Large | EDR, ARC dashboards |
| P2 | GAP-13: NANO/PICO rule wiring | Medium | Full in-canvas rule editing |

---

## 7. Use Case Roadmap Dependencies (Mermaid)

```mermaid
graph TD
    subgraph "Platform Gaps"
        G01[GAP-01: HumanGate]
        G02[GAP-02: Chameleon Phase 1]
        G03[GAP-03: GraphBuildExecutor]
        G04[GAP-04: Scheduler]
        G05[GAP-05: SMS Gateway]
        G06[GAP-06: ChameleonBI]
        G07[GAP-07: PdfGenerator]
        G08[GAP-08: FieldMapper]
        G09[GAP-09: deltaPrism Tenants]
        G10[GAP-10: AI Provider]
    end

    subgraph "Use Cases"
        UC1[Nesto UC-D1]
        UC2[ARC UC-D2]
        UC3[ENDO UC-D3]
        UC4[CA UC-D4]
        UC5[EDR UC-D5]
        UC6[AER UC-P1]
    end

    G01 --> UC1
    G01 --> UC2
    G01 --> UC3
    G01 --> UC6
    G02 --> UC1
    G02 --> UC3
    G02 --> UC6
    G03 --> UC4
    G04 --> UC3
    G04 --> UC4
    G05 --> UC3
    G06 --> UC5
    G06 --> UC2
    G06 --> UC6
    G07 --> UC2
    G08 --> UC2
    G09 --> UC1
    G09 --> UC3
    G09 --> UC4
    G10 --> UC4
```

---

## 9. Version History

| Version | Date | Changes |
|---------|------|---------|
| **GAP-1.0** | 2026-05-03 | Initial gap analysis: 10 gaps identified across 7 use cases. Critical path: HumanGate > ChameleonV2 > deltaPrism tenants. |
| **GAP-2.0** | 2026-05-08 | Added Section 5: Orchestrator Canvas UI Layer gaps (GAP-11, GAP-12, GAP-13). Updated authority to Tier 3. Added Section 6 updated critical path. Previous engine-layer gaps (GAP-01, GAP-03..10) status unchanged. |
