Dependency Graph and Optimal Ordering

Plan Dependencies Needed By
NxWorkspaceAndBoundaries None (foundational) All other plans
Walking Skeleton Nx Workspace Validates stack viability
SEA-DSL Toolchain Nx Workspace Compiler Chain, Semantic Core
Compiler Chain SEA-DSL Toolchain Most implementation plans
Knowledge Graph Runtime Compiler Chain, Nx Workspace Semantic Core, Cognitive
Semantic Core Services Knowledge Graph, SEA-DSL Toolchain LLM Provider, Cognitive
Runtime Kernel Nx Workspace, Compiler Chain Protocol Gateway, Messaging
Protocol Gateway Runtime Kernel Platform UI
Messaging Substrate Runtime Kernel Integration needs
Semantic Identity Messaging Governance, Observability
GovernedSpeed™ Runtime Messaging, Identity LLM Provider, Agent Society
Observability GovernedSpeed™, Identity All runtime services
Temporal Memory Observability, Knowledge Graph Cognitive, Simulation
LLM Provider GovernedSpeed™, Observability Cognitive, Agent Society
Simulation & Replay Temporal Memory, Observability TBD
Agent Society Runtime LLM Provider, GovernedSpeed™ Cognitive Extension
Cognitive Extension LLM Provider, Agent Society, Semantic Core PET, Case Mgmt, UI
Workbench UI Protocol Gateway, Cognitive User-facing
Platform UI Integration Protocol Gateway, Cognitive User-facing
Semantic Debt GovernedSpeed™, Identity Governance flows
Documentation System Compiler Chain, Cognitive Developer experience
PET Training App Cognitive Extension User-facing
MECE Quadrant Cognitive Extension, GovernedSpeed™ Advanced features
Case Management Cognitive Extension Business logic
User Feedback Loop Cognitive Extension Learning
VibesPro™ Integration Cognitive, GovernedSpeed™ Advanced features

Final Plan Ordering with Reasoning

# Plan Name Key Dependencies Reasoning
1 NxWorkspaceAndBoundaries None Foundation layer. Establishes Nx workspace structure, module boundary enforcement (ESLint rules), and the “kernel-shell” topology per ADR-033/034. Without this, other plans have no framework for code organization or boundary enforcement.
2 WalkingSkeleton #1 Stack validation. Proves end-to-end connectivity of all major components (SEA-DSL → LLM → Vector/Graph → Policy) before building features. Must run early to catch integration issues.
3 SeaDslToolchain #1 Language foundation. Implements SEA-DSL parsing, validation, and formatting (tree-sitter grammar, OPA policy evaluation). Required before any semantic compilation can occur.
4 CompilerChain #3 Delivery pipeline. Implements the 7-stage compiler chain (Specs → Plan → SEA™ DSL → AST → IR → Manifest → Generated Code). This is the core “no-agent-writes-code” invariant enforcement mechanism.
5 KnowledgeGraphRuntime #1, #4 Semantic storage. Oxigraph RDF store + SPARQL/SHACL support. Needed by Semantic Core and Cognitive services for semantic context queries.
6 RuntimeKernel #1, #4 Execution core. Port-driven kernel with command/query buses, unit-of-work, and event publication. The kernel is independent of shells (APIs/CLIs).
7 ProtocolGateway #6 Inbound adapters. HTTP API, OpenAI-compatible facade, LSP endpoints. These are shells that translate protocols to kernel commands. Depends on kernel being defined.
8 MessagingSubstrate #6 Cross-context communication. NATS JetStream with outbox/inbox patterns. Required for reliable event publishing between bounded contexts. Supersedes the old IntegrationGateway.
9 SemanticIdentity #8 Identity & provenance. IFL (Internal Federated Ledger), ifl:hash/ifl:token dual-state identity, Merkle proofs. Needed before governance decisions can be attestable.
10 GovernedSpeed™Runtime #8, #9 Unified governance. Consolidates Policy Gateway + Risk/Evidence + CALM validation. Depends on messaging and identity for audit trails.
11 ObservabilityAndEvidence #9, #10 Telemetry layer. OpenTelemetry + OTel Collector + semantic correlation. Depends on governance runtime for evidence capture and identity for provenance.
12 SemanticCoreServices #3, #5 Core services. SEA-DSL registry, policy evaluation, and KGS integration. Builds on toolchain and knowledge graph.
13 TemporalMemoryAndPatternOracle #5, #11 Institutional memory. pgvector + TimescaleDB + Pattern Oracle. Depends on KG for semantic context and observability for metric ingestion.
14 LlmProviderAbstraction #10, #11 AI infrastructure. LiteLLM unified interface. Explicitly depends on GovernedSpeed™ (LLM calls route through Policy Gateway) and Observability (spans).
15 AgentSocietyRuntime #10, #14 Multi-agent platform. Agent registry, tool execution, HITL escalations. Needs governance and LLM provider to be operational.
16 CognitiveExtensionLayer #12, #14, #15 AI services. Context analysis, artifact generation, CADSL renderer. Depends on Semantic Core, LLM provider, and agent infrastructure.
17 SimulationAndReplay #11, #13 What-if scenarios. Deterministic simulation from snapshots. Depends on observability traces and temporal memory for pattern comparison.
18 SemanticDebtAndIncidents #9, #10 Governance workflows. Debt ledger, incident grouping, change proposals. Needs identity for audit trails and governance for enforcement.
19 DocumentationSystem #4, #16 Automated docs. Generates docs from specs and manifests. Depends on compiler chain for traceability and cognitive layer for context analysis.
20 PlatformUIIntegration #7, #16 Shell integration. Zed IDE + LibreChat shells with LSP/OpenAI endpoints. Depends on protocol gateway and cognitive services.
21 WorkbenchUI #7, #16 Operator console. KGS explorer, manifest inspector, governance console. Depends on protocol gateway and cognitive for rendering.
22 PetTrainingApp #16 User-facing app. Prompt training with gamified learning. Depends on cognitive extension for the judge pipeline.
23 CaseManagement #16 Business logic. CMMN-based case management with artifact pipelines. Depends on cognitive extension for task automation.
24 UserFeedbackLoop #16 Learning integration. Feedback capture, RL signals, personalization. Depends on cognitive extension for adaptive responses.
25 MeceQuadrantIntegration #10, #16 Advanced architecture. Soul/Mind/Will/Body quadrant orchestration. Advanced feature depending on governance and cognitive layers.
26 VibesPro™Integration #10, #16 External integration. VibesPro™ substrate (Temporal AI, type sync, meta-generators). Advanced feature integrating governance and cognitive.

Ordering Rationale Summary

The ordering follows these principles:

  1. Foundation First (1-4): Workspace structure → Stack validation → Language tooling → Compiler pipeline. These are non-negotiable prerequisites.

  2. Infrastructure Layer (5-11): Knowledge storage → Kernel → Gateways → Messaging → Identity → Governance → Observability. Each layer builds on the previous.

  3. Core Services (12-16): Semantic Core → Temporal Memory → LLM → Agents → Cognitive. These implement the business logic atop the infrastructure.

  4. Advanced Features (17-26): Simulation, Debt/Incidents, Documentation, UIs, Apps, and integrations. These are higher-level features that consume the core services.