Orchestrata Ultimate / Specs / 001-kernel

001-kernel: Orchestration Kernel (U:KR)

The Orchestration Kernel (U:KR) is the central nervous system of Orchestrata. It manages Volk (agent) registration, message routing, governance policy enforcement, session lifecycle, escalation handling, workflow orchestration, resource management, and audit trail logging.

At a glance

Item Value
Spec directory specs/001-kernel/
Status line in the spec Complete
Requirement IDs defined 373
With a @traces citation in src/ 298 (79.9%)
With a @traces citation in tests/ 64 (17.2%)
Tracked files 9
RTM page 001-kernel

Reading this spec

The Orchestration Kernel (U:KR) is the central nervous system of Orchestrata. It is the single coordination point for a multi-agent system: it registers Volks (agents), routes messages between them, enforces governance policy, manages sessions, handles escalations, runs workflows, manages resources and writes the audit trail.

The scope is ten user stories: Volk registration and discovery, message routing and dispatch, governance policy enforcement, session management, escalation handling, workflow orchestration, resource management, audit trail logging, configuration management, and performance and scalability. Requirement IDs take the form REQ-001-US-nnn for story requirements. Registration, routing and governance are marked critical; the workflow and resource stories are medium priority.

The design constraints stated in the overview are these. State is held in Redis. Governance decisions come from Prolog queries. All inter-agent communication uses the CXP protocol. The architecture is async-first for performance. The stated goals are deterministic message routing, governance enforced at the infrastructure level, scale to more than 1000 concurrent agents and a complete audit trail for compliance.

In the code, the kernel is spread over many modules. The largest tracers are orchestrata_ultimate/kernel/audit/logger for the audit trail, orchestrata_ultimate/kernel/config_manager for configuration, orchestrata_ultimate/core/protocols/decoupling, orchestrata_ultimate/agents/volk_registry for registration, and orchestrata_ultimate/kernel/router for routing. The per-requirement view is on the RTM page.

The spec's status line reads Complete. It tracks 9 files and defines 373 requirement IDs. The full text follows below.

Measured coverage is 298 of 373 requirements cited by at least one @traces in src/ (79.9%), spread over 129 modules; the module citing the most of them is orchestrata_ultimate/kernel/audit/logger (32 requirements). In tests/, 64 requirements are cited by a test-side @traces.

Coverage gaps: 75 requirements have no citing symbol. The largest untraced groups are REQ-001-US-006 (27), REQ-001-US-007 (15), REQ-001-US-005 (12). Untraced means no @traces names the ID; the behaviour may still exist in code that was never annotated. Test-side citations are thinner than code-side ones (64 against 298).

Requirements

Checkbox is the state recorded in the requirements checklist; Traced by is the count of src/ symbols whose @traces names the ID.

ID Done Requirement Traced by
REQ-001-001 yes Volk can register with unique alias (e.g., U:Ox, U:PS) 9
REQ-001-002 yes Registration includes capabilities declaration 2
REQ-001-003 yes Registration includes supported protocols (CXP, gRPC, WS) 2
REQ-001-004 yes Registration includes resource requirements 2
REQ-001-005 yes Registration validates alias uniqueness 4
REQ-001-006 yes Registration validates capability schema 3
REQ-001-007 yes Registration returns registration token 3
REQ-001-008 yes Registration updates Volk registry 6
REQ-001-009 yes Registration notifies other Volks of new agent 8
REQ-001-010 yes Registration persists to Redis state 2
REQ-001-011 yes Volk can query all registered Volks 6
REQ-001-012 yes Volk can query Volks by capability 3
REQ-001-013 yes Volk can query Volks by protocol support 2
REQ-001-014 yes Volk can subscribe to registry updates 10
REQ-001-015 yes Discovery returns Volk metadata (alias, capabilities, protocols) 9
REQ-001-016 yes Discovery uses caching for performance 2
REQ-001-017 yes Discovery handles partial failures gracefully 5
REQ-001-018 yes Discovery provides health status for each Volk 23
REQ-001-019 yes Discovery supports filtering and pagination 4
REQ-001-020 yes Discovery validates query parameters 2
REQ-001-021 yes Volk can deregister cleanly 5
REQ-001-022 yes Deregistration notifies dependent Volks 8
REQ-001-023 yes Deregistration updates registry 1
REQ-001-024 yes Deregistration cleans up resources 2
REQ-001-025 yes Deregistration handles in-flight messages 5
REQ-001-US-002-001 yes Route message based on TO field in CXP packet 22
REQ-001-US-002-002 yes Validate FROM field matches sender identity 1
REQ-001-US-002-003 yes Support unicast (single recipient) routing 12
REQ-001-US-002-004 yes Support multicast (multiple recipients) routing 5
REQ-001-US-002-005 yes Support broadcast (all Volks) routing 6
REQ-001-US-002-006 yes Route to specific Volk instance by alias 3
REQ-001-US-002-007 yes Route to Volk role (e.g., any QA agent) 2
REQ-001-US-002-008 yes Handle routing to offline Volks 8
REQ-001-US-002-009 yes Handle routing to unknown recipients 8
REQ-001-US-002-010 yes Validate message schema before routing 3
REQ-001-US-002-011 yes Dispatch message via Volk-specified protocol 5
REQ-001-US-002-012 yes Support CXP over gRPC dispatch 9
REQ-001-US-002-013 yes Support CXP over WebSocket dispatch 3
REQ-001-US-002-014 yes Support CXP over HTTP dispatch 3
REQ-001-US-002-015 yes Retry failed dispatches with exponential backoff 4
REQ-001-US-002-016 yes Track dispatch attempts and failures 7
REQ-001-US-002-017 yes Timeout stale dispatch attempts 3
REQ-001-US-002-018 yes Queue messages for offline Volks 1
REQ-001-US-002-019 yes Provide delivery acknowledgments 6
REQ-001-US-002-020 yes Handle partial delivery failures (multicast) none
REQ-001-US-002-021 yes Queue messages when recipient unavailable 4
REQ-001-US-002-022 yes Persist queue to Redis for durability 8
REQ-001-US-002-023 yes Support priority queuing (urgent messages first) 3
REQ-001-US-002-024 yes Apply backpressure when queue full 3
REQ-001-US-002-025 yes Monitor queue depth and latency 4
REQ-001-US-002-026 yes Expire stale messages from queue 1
REQ-001-US-002-027 yes Support dead-letter queue for failed messages 4
REQ-001-US-002-028 yes Provide queue statistics (depth, rate, latency) 6
REQ-001-US-002-029 yes Support queue inspection for debugging 1
REQ-001-US-002-030 yes Handle queue overflow gracefully 6
REQ-001-US-002-031 yes Track message status: queued 6
REQ-001-US-002-032 yes Track message status: dispatched 2
REQ-001-US-002-033 yes Track message status: delivered 9
REQ-001-US-002-034 yes Track message status: acknowledged 4
REQ-001-US-002-035 yes Track message status: failed 9
REQ-001-US-002-036 yes Provide message status query API 4
REQ-001-US-002-037 yes Store status transitions with timestamps 6
REQ-001-US-002-038 yes Notify sender of status changes 7
REQ-001-US-002-039 yes Support message tracing across hops 12
REQ-001-US-002-040 yes Generate routing metrics (latency, success rate) 5
REQ-001-US-003-001 yes Query Prolog for routing decisions 14
REQ-001-US-003-002 yes Query Prolog for permission checks 12
REQ-001-US-003-003 yes Query Prolog for ownership validation 6
REQ-001-US-003-004 yes Query Prolog for escalation rules 3
REQ-001-US-003-005 yes Cache Prolog query results for performance 13
REQ-001-US-003-006 yes Invalidate cache on policy updates 4
REQ-001-US-003-007 yes Handle Prolog query timeouts 2
REQ-001-US-003-008 yes Handle Prolog query failures 6
REQ-001-US-003-009 yes Log all policy queries for audit 6
REQ-001-US-003-010 yes Support policy dry-run mode (testing) 3
REQ-001-US-003-011 yes Validate message sender has authority 9
REQ-001-US-003-012 yes Validate message recipient is correct owner 4
REQ-001-US-003-013 yes Enforce component ownership boundaries 8
REQ-001-US-003-014 yes Block unauthorized cross-boundary messages 4
REQ-001-US-003-015 yes Allow whitelisted cross-boundary exceptions 3
REQ-001-US-003-016 yes Validate workflow step permissions 3
REQ-001-US-003-017 yes Enforce read/write/execute permissions 5
REQ-001-US-003-018 yes Support ownership delegation 8
REQ-001-US-003-019 yes Support temporary permission grants 3
REQ-001-US-003-020 yes Log all permission violations 4
REQ-001-US-003-021 yes Detect conflicts requiring escalation 4
REQ-001-US-003-022 yes Query Prolog for escalation path 3
REQ-001-US-003-023 yes Route escalation to correct authority (e.g., U:Ox) 6
REQ-001-US-003-024 yes Track escalation history 9
REQ-001-US-003-025 yes Timeout stale escalations 2
REQ-001-US-003-026 yes Notify stakeholders of escalation 2
REQ-001-US-003-027 yes Support escalation priority levels none
REQ-001-US-003-028 yes Handle recursive escalations 2
REQ-001-US-003-029 yes Provide escalation resolution feedback 2
REQ-001-US-003-030 yes Log all escalation events 2
REQ-001-US-004-001 yes Create new session with unique session ID 3
REQ-001-US-004-002 yes Initialize session context (facts, portfolio, carryover) none
REQ-001-US-004-003 yes Load session-specific Prolog rules 1
REQ-001-US-004-004 yes Notify all Volks of session start none
REQ-001-US-004-005 yes Persist session metadata to Redis 6
REQ-001-US-004-006 yes Support session templates (pre-configured sessions) none
REQ-001-US-004-007 yes Validate session configuration none
REQ-001-US-004-008 yes Handle concurrent session initialization none
REQ-001-US-004-009 yes Set session resource limits 3
REQ-001-US-004-010 yes Log session initialization events 2
REQ-001-US-004-011 yes Maintain session-specific facts 7
REQ-001-US-004-012 yes Maintain session portfolio (artifacts) 2
REQ-001-US-004-013 yes Maintain session carryover (todos) 7
REQ-001-US-004-014 yes Isolate session state from other sessions 4
REQ-001-US-004-015 yes Support session context queries 4
REQ-001-US-004-016 yes Support session context updates 8
REQ-001-US-004-017 yes Validate context schema 6
REQ-001-US-004-018 yes Persist context changes to Redis 7
REQ-001-US-004-019 yes Handle context merge conflicts none
REQ-001-US-004-020 yes Provide context versioning none
REQ-001-US-004-021 yes Gracefully terminate session 4
REQ-001-US-004-022 yes Archive session artifacts 3
REQ-001-US-004-023 yes Clean up session resources 7
REQ-001-US-004-024 yes Notify all Volks of session end 1
REQ-001-US-004-025 yes Generate session summary report none
REQ-001-US-004-026 yes Persist final session state 2
REQ-001-US-004-027 yes Handle forced session termination 1
REQ-001-US-004-028 yes Transfer carryover to next session 4
REQ-001-US-004-029 yes Log session teardown events 2
REQ-001-US-004-030 yes Validate session closure conditions none
REQ-001-US-005-001 yes Detect ownership conflicts 4
REQ-001-US-005-002 yes Detect permission conflicts 3
REQ-001-US-005-003 yes Detect resource conflicts 3
REQ-001-US-005-004 yes Detect workflow deadlocks none
REQ-001-US-005-005 yes Detect policy violations 1
REQ-001-US-005-006 yes Classify conflict severity (low, medium, high, critical) none
REQ-001-US-005-007 yes Log conflict detection events 1
REQ-001-US-005-008 yes Notify involved Volks of conflict none
REQ-001-US-005-009 yes Track conflict resolution time none
REQ-001-US-005-010 yes Generate conflict metrics none
REQ-001-US-005-011 yes Query Prolog for escalation authority 4
REQ-001-US-005-012 yes Route escalation to U:Ox (Orchestrator) 2
REQ-001-US-005-013 yes Route escalation to component owner none
REQ-001-US-005-014 yes Support multi-level escalation paths 8
REQ-001-US-005-015 yes Handle circular escalation dependencies 4
REQ-001-US-005-016 yes Timeout stale escalations 7
REQ-001-US-005-017 yes Provide escalation context (parties, issue, history) 4
REQ-001-US-005-018 yes Support escalation priority override 1
REQ-001-US-005-019 yes Log escalation routing decisions 2
REQ-001-US-005-020 yes Track escalation routing latency none
REQ-001-US-005-021 yes Apply escalation resolution decision 9
REQ-001-US-005-022 yes Notify all parties of resolution none
REQ-001-US-005-023 yes Update Prolog rules if needed none
REQ-001-US-005-024 yes Log resolution for future reference 5
REQ-001-US-005-025 yes Support resolution appeals none
REQ-001-US-005-026 yes Track resolution compliance 1
REQ-001-US-005-027 yes Generate resolution metrics 2
REQ-001-US-005-028 yes Archive escalation history 2
REQ-001-US-005-029 yes Learn from escalation patterns none
REQ-001-US-005-030 yes Prevent similar future escalations none
REQ-001-US-006-001 yes Parse workflow definitions (YAML or JSON) none
REQ-001-US-006-002 yes Validate workflow schema none
REQ-001-US-006-003 yes Support sequential workflow steps none
REQ-001-US-006-004 yes Support parallel workflow steps none
REQ-001-US-006-005 yes Support conditional branching (if/else) none
REQ-001-US-006-006 yes Support loops and retries none
REQ-001-US-006-007 yes Define step dependencies (DAG) none
REQ-001-US-006-008 yes Define step timeouts none
REQ-001-US-006-009 yes Define step rollback actions none
REQ-001-US-006-010 yes Persist workflow definitions none
REQ-001-US-006-011 yes Initialize workflow instance none
REQ-001-US-006-012 yes Execute steps in dependency order none
REQ-001-US-006-013 yes Track step completion status none
REQ-001-US-006-014 yes Handle step failures with retries none
REQ-001-US-006-015 yes Apply step timeouts none
REQ-001-US-006-016 yes Support workflow pause/resume 3
REQ-001-US-006-017 yes Support workflow cancellation none
REQ-001-US-006-018 yes Collect step outputs for next steps 8
REQ-001-US-006-019 yes Pass context between steps none
REQ-001-US-006-020 yes Log workflow execution events 4
REQ-001-US-006-021 yes Provide workflow status query API none
REQ-001-US-006-022 yes Track workflow progress percentage none
REQ-001-US-006-023 yes Track step-level metrics (duration, success rate) none
REQ-001-US-006-024 yes Generate workflow execution reports none
REQ-001-US-006-025 yes Alert on workflow failures none
REQ-001-US-006-026 yes Support workflow debugging none
REQ-001-US-006-027 yes Visualize workflow state none
REQ-001-US-006-028 yes Archive completed workflows none
REQ-001-US-006-029 yes Support workflow replay (for debugging) none
REQ-001-US-006-030 yes Generate workflow analytics none
REQ-001-US-007-001 yes Track available system resources (CPU, memory, network) 3
REQ-001-US-007-002 yes Allocate resources to Volks on request none
REQ-001-US-007-003 yes Enforce resource quotas per Volk none
REQ-001-US-007-004 yes Support resource reservation (future allocation) none
REQ-001-US-007-005 yes Handle resource contention (prioritization) 1
REQ-001-US-007-006 yes Deallocate resources when Volk completes none
REQ-001-US-007-007 yes Reclaim resources from idle Volks none
REQ-001-US-007-008 yes Log resource allocation events 1
REQ-001-US-007-009 yes Track resource utilization metrics 2
REQ-001-US-007-010 yes Alert on resource exhaustion 5
REQ-001-US-007-011 yes Enforce per-Volk CPU limits 2
REQ-001-US-007-012 yes Enforce per-Volk memory limits 2
REQ-001-US-007-013 yes Enforce per-Volk network bandwidth limits none
REQ-001-US-007-014 yes Enforce per-Volk storage limits none
REQ-001-US-007-015 yes Enforce system-wide resource limits none
REQ-001-US-007-016 yes Throttle Volks exceeding limits none
REQ-001-US-007-017 yes Terminate Volks violating hard limits none
REQ-001-US-007-018 yes Log limit violations none
REQ-001-US-007-019 yes Notify Volks of approaching limits 1
REQ-001-US-007-020 yes Support dynamic limit adjustments 1
REQ-001-US-007-021 yes Monitor CPU usage per Volk 1
REQ-001-US-007-022 yes Monitor memory usage per Volk 1
REQ-001-US-007-023 yes Monitor network usage per Volk none
REQ-001-US-007-024 yes Monitor storage usage per Volk 1
REQ-001-US-007-025 yes Provide resource usage query API 2
REQ-001-US-007-026 yes Generate resource usage reports 2
REQ-001-US-007-027 yes Track resource usage trends 4
REQ-001-US-007-028 yes Alert on anomalous resource usage none
REQ-001-US-007-029 yes Support resource profiling none
REQ-001-US-007-030 yes Archive resource usage history none
REQ-001-US-008-001 yes Log all message routing decisions 3
REQ-001-US-008-002 yes Log all policy queries and results 3
REQ-001-US-008-003 yes Log all escalation events 4
REQ-001-US-008-004 yes Log all session lifecycle events 2
REQ-001-US-008-005 yes Log all resource allocation events 2
REQ-001-US-008-006 yes Log all workflow execution steps 2
REQ-001-US-008-007 yes Log all Volk registration/deregistration 5
REQ-001-US-008-008 yes Include timestamps in all log entries 4
REQ-001-US-008-009 yes Include session context in log entries 3
REQ-001-US-008-010 yes Include correlation IDs for tracing 3
REQ-001-US-008-011 yes Persist logs to Neo4j knowledge graph 6
REQ-001-US-008-012 yes Persist logs to file system 6
REQ-001-US-008-013 yes Support log rotation (size and time-based) 4
REQ-001-US-008-014 yes Compress archived logs 4
REQ-001-US-008-015 yes Support log retention policies 3
REQ-001-US-008-016 yes Encrypt sensitive log data 3
REQ-001-US-008-017 yes Support log export (JSON, CSV) 1
REQ-001-US-008-018 yes Handle log storage failures gracefully 9
REQ-001-US-008-019 yes Provide log backup/restore 2
REQ-001-US-008-020 yes Support multi-destination logging 11
REQ-001-US-008-021 yes Query logs by session ID 1
REQ-001-US-008-022 yes Query logs by Volk alias 1
REQ-001-US-008-023 yes Query logs by event type 1
REQ-001-US-008-024 yes Query logs by time range 1
REQ-001-US-008-025 yes Query logs by correlation ID 1
REQ-001-US-008-026 yes Support full-text log search 3
REQ-001-US-008-027 yes Support log filtering and aggregation 2
REQ-001-US-008-028 yes Provide log visualization none
REQ-001-US-008-029 yes Support log export for external analysis 1
REQ-001-US-008-030 yes Generate audit reports from logs 1
REQ-001-US-009-001 yes Load configuration from YAML files 10
REQ-001-US-009-002 yes Load configuration from environment variables 9
REQ-001-US-009-003 yes Load configuration from Redis 4
REQ-001-US-009-004 yes Validate configuration schema 15
REQ-001-US-009-005 yes Support configuration defaults 1
REQ-001-US-009-006 yes Support configuration overrides (env > file > defaults) 9
REQ-001-US-009-007 yes Log configuration loading events 2
REQ-001-US-009-008 yes Handle configuration loading errors 2
REQ-001-US-009-009 yes Support encrypted configuration values 4
REQ-001-US-009-010 yes Persist configuration to Redis 2
REQ-001-US-009-011 yes Reload configuration without restart 9
REQ-001-US-009-012 yes Apply configuration changes incrementally 4
REQ-001-US-009-013 yes Validate configuration before applying 3
REQ-001-US-009-014 yes Rollback invalid configuration changes 3
REQ-001-US-009-015 yes Notify Volks of configuration changes 4
REQ-001-US-009-016 yes Support configuration versioning 6
REQ-001-US-009-017 yes Track configuration change history 5
REQ-001-US-009-018 yes Log all configuration changes 1
REQ-001-US-009-019 yes Support configuration dry-run (test mode) 1
REQ-001-US-009-020 yes Provide configuration diff API 1
REQ-001-US-009-021 yes Query current configuration 4
REQ-001-US-009-022 yes Query configuration history 1
REQ-001-US-009-023 yes Query configuration for specific Volk 1
REQ-001-US-009-024 yes Query configuration by key 4
REQ-001-US-009-025 yes Export configuration as YAML 1
REQ-001-US-009-026 yes Export configuration as JSON 2
REQ-001-US-009-027 yes Support configuration comparison 1
REQ-001-US-009-028 yes Validate configuration compliance 1
REQ-001-US-009-029 yes Generate configuration documentation 1
REQ-001-US-009-030 yes Support configuration templates 1
REQ-001-US-010-001 yes Achieve <50ms p95 routing latency 5
REQ-001-US-010-002 yes Achieve <100ms p99 routing latency 5
REQ-001-US-010-003 yes Achieve <10ms p95 policy query latency 5
REQ-001-US-010-004 yes Achieve <20ms p99 policy query latency 5
REQ-001-US-010-005 yes Support 10,000 messages/sec throughput 5
REQ-001-US-010-006 yes Maintain <5MB memory per session 6
REQ-001-US-010-007 yes Startup in <2 seconds 2
REQ-001-US-010-008 yes Handle 1000+ concurrent Volks 1
REQ-001-US-010-009 yes Maintain 99.9% uptime 6
REQ-001-US-010-010 yes Support graceful degradation under load 3
REQ-001-US-010-011 yes Cache Prolog query results 6
REQ-001-US-010-012 yes Use connection pooling for Redis 7
REQ-001-US-010-013 yes Use connection pooling for Neo4j 7
REQ-001-US-010-014 yes Batch message dispatches where possible 1
REQ-001-US-010-015 yes Use async I/O for all network operations 15
REQ-001-US-010-016 yes Minimize serialization overhead 4
REQ-001-US-010-017 yes Use efficient data structures (ring buffers, etc.) 3
REQ-001-US-010-018 yes Avoid blocking operations in critical paths 4
REQ-001-US-010-019 yes Profile and optimize hot paths 2
REQ-001-US-010-020 yes Implement backpressure mechanisms 5
REQ-001-US-010-021 yes Support horizontal scaling (multiple kernel instances) 3
REQ-001-US-010-022 yes Support sharding by session ID 3
REQ-001-US-010-023 yes Support sharding by Volk alias 3
REQ-001-US-010-024 yes Use consistent hashing for routing 4
REQ-001-US-010-025 yes Support leader election for coordination 10
REQ-001-US-010-026 yes Handle kernel instance failures 6
REQ-001-US-010-027 yes Rebalance load across kernel instances 3
REQ-001-US-010-028 yes Support autoscaling based on load 6
REQ-001-US-010-029 yes Provide metrics for scaling decisions 8
REQ-001-US-010-030 yes Test scaling with chaos engineering 5
REQ-006-031 yes PipelineEvent.event_type values SHALL be defined by a single 7
REQ-006-032 yes The change SHALL be byte-for-byte wire-compatible: serialized 1
REQ-006-033 yes Documented-but-never-emitted types (pipeline.governance, 7
REQ-003-US-004 - 102). The fallback producer's pipeline.stage / pipeline.paused / none
REQ-006-034 yes PipelineEvent SHALL carry a driver: str = "" field recording none
REQ-006-035 yes Attribution SHALL be resolve, never mutate. A wire producer none
REQ-006-036 yes There SHALL be exactly two production producers of the canonical none
REQ-006-037 yes Human-facing rendering of an event (the orchestrata watch CLI) none
REQ-008-001 - Log all message routing decisions 2
REQ-008-002 - Log all policy queries and results 6
REQ-008-003 - Log all escalation events 3
REQ-008-004 - Log all session lifecycle events 6
REQ-008-005 - Log all resource allocation events 11
REQ-008-006 - Log all workflow execution steps 19
REQ-008-007 - Log all Volk registration/deregistration 3
REQ-008-008 - Include timestamps in all log entries 1
REQ-008-009 - Include session context in log entries 2
REQ-008-010 - Include correlation IDs for tracing none
REQ-008-011 - Persist logs to Neo4j knowledge graph none
REQ-008-012 - Persist logs to file system 5
REQ-008-013 - Support log rotation (size and time-based) 19
REQ-008-014 - Compress archived logs 1
REQ-008-015 - Support log retention policies 6
REQ-008-016 - Encrypt sensitive log data 1
REQ-008-017 - Support log export (JSON, CSV) 6
REQ-008-018 - Handle log storage failures gracefully 6
REQ-008-019 - Provide log backup/restore 5
REQ-008-020 - Support multi-destination logging 1
REQ-008-021 - Query logs by session ID 32
REQ-008-022 - Query logs by Volk alias 2
REQ-008-023 - Query logs by event type 17
REQ-008-024 - Query logs by time range 6
REQ-008-025 - Query logs by correlation ID 12
REQ-008-026 - Support full-text log search 14
REQ-008-027 - Support log filtering and aggregation 3
REQ-008-028 - Provide log visualization 3
REQ-008-029 - Support log export for external analysis 7
REQ-008-030 - Generate audit reports from logs 4
REQ-010-001 - Achieve <50ms p95 routing latency 1
REQ-010-002 - Achieve <100ms p99 routing latency 5
REQ-010-003 - Achieve <10ms p95 policy query latency 6
REQ-010-004 - Achieve <20ms p99 policy query latency 2
REQ-010-005 - Support 10,000 messages/sec throughput 1
REQ-010-006 - Maintain <5MB memory per session 3
REQ-010-007 - Startup in <2 seconds 2
REQ-010-008 - Handle 1000+ concurrent Volks 1
REQ-010-009 - Maintain 99.9% uptime 2
REQ-010-010 - Support graceful degradation under load 1
REQ-010-011 - Cache Prolog query results 3
REQ-010-012 - Use connection pooling for Redis 1
REQ-010-013 - Use connection pooling for Neo4j 1
REQ-010-014 - Batch message dispatches where possible 1
REQ-010-015 - Use async I/O for all network operations 4
REQ-010-016 - Minimize serialization overhead none
REQ-010-017 - Use efficient data structures (ring buffers, etc.) 3
REQ-010-018 - Avoid blocking operations in critical paths 1
REQ-010-019 - Profile and optimize hot paths 3
REQ-010-020 - Implement backpressure mechanisms 2
REQ-010-021 - Support horizontal scaling (multiple kernel instances) 1
REQ-010-022 - Support sharding by session ID 2
REQ-010-023 - Support sharding by Volk alias 2
REQ-010-024 - Use consistent hashing for routing 2
REQ-010-025 - Support leader election for coordination 1
REQ-010-026 - Handle kernel instance failures none
REQ-010-027 - Rebalance load across kernel instances 2
REQ-010-028 - Support autoscaling based on load 2
REQ-010-029 - Provide metrics for scaling decisions 2
REQ-010-030 - Test scaling with chaos engineering 1

Code that traces this spec

Module Symbols Requirements
orchestrata_ultimate/agents/constraints 2 2
orchestrata_ultimate/agents/kernel_handler 8 11
orchestrata_ultimate/agents/prolog_bridge 2 2
orchestrata_ultimate/agents/runtime 1 1
orchestrata_ultimate/agents/task_executor 2 2
orchestrata_ultimate/agents/volk_registry 45 26
orchestrata_ultimate/context/providers/artifact_digest 1 1
orchestrata_ultimate/core/artifact_store 5 1
orchestrata_ultimate/core/config/manager 36 13
orchestrata_ultimate/core/graph/adapters/bolt_async 5 2
orchestrata_ultimate/core/graph/adapters/bolt_sync 1 1
orchestrata_ultimate/core/graph/interfaces 4 1
orchestrata_ultimate/core/logging 3 5
orchestrata_ultimate/core/monitoring/engine 3 2
orchestrata_ultimate/core/protocols/agent 1 1
orchestrata_ultimate/core/protocols/components 5 6
orchestrata_ultimate/core/protocols/decoupling 33 27
orchestrata_ultimate/core/protocols/memory 8 13
orchestrata_ultimate/core/protocols/volk_health 4 2
orchestrata_ultimate/core/redis_factory 2 1
orchestrata_ultimate/cxp/direct_cxp_adapter 2 1
orchestrata_ultimate/cxp/direct_transport 2 1
orchestrata_ultimate/cxp/handler 2 1
orchestrata_ultimate/cxp/prolog_bridge 1 1
orchestrata_ultimate/cxp/reply_router 9 4
orchestrata_ultimate/cxp/router 3 3
orchestrata_ultimate/cxp/servicer 2 3
orchestrata_ultimate/gateway/handlers/cxp 2 2
orchestrata_ultimate/gateway/handlers/knowledge 2 2
orchestrata_ultimate/gateway/handlers/memory 5 7
orchestrata_ultimate/gateway/rpc 1 2
orchestrata_ultimate/gateway/server 1 1
orchestrata_ultimate/governance/_strict 1 1
orchestrata_ultimate/governance/escalation_handler/handler 13 11
orchestrata_ultimate/governance/escalation_handler/resolver 8 4
orchestrata_ultimate/governance/escalation_handler/sla 8 5
orchestrata_ultimate/governance/policy_engine 2 2
orchestrata_ultimate/governance/resource_access 1 1
orchestrata_ultimate/infra/prolog_bridge 4 1
orchestrata_ultimate/infra/redis_state 9 6
orchestrata_ultimate/kernel/audit/_common 1 1
orchestrata_ultimate/kernel/audit/logger 27 32
orchestrata_ultimate/kernel/audit/model 6 17
orchestrata_ultimate/kernel/audit/queue 5 1
orchestrata_ultimate/kernel/audit/writers 16 8
orchestrata_ultimate/kernel/cli 1 1
orchestrata_ultimate/kernel/cli_main 4 4
orchestrata_ultimate/kernel/config_manager 53 29
orchestrata_ultimate/kernel/dispatcher 23 11
orchestrata_ultimate/kernel/event_bus 1 1
orchestrata_ultimate/kernel/heartbeat_pump 2 2
orchestrata_ultimate/kernel/pam/enforcer 14 10
orchestrata_ultimate/kernel/pam/escalation 11 18
orchestrata_ultimate/kernel/pam/types 11 18
orchestrata_ultimate/kernel/performance/chaos 1 1
orchestrata_ultimate/kernel/performance/cluster 27 8
orchestrata_ultimate/kernel/performance/manager 28 17
orchestrata_ultimate/kernel/performance/metrics 11 7
orchestrata_ultimate/kernel/performance/resources 10 11
orchestrata_ultimate/kernel/performance/scaling 6 2
orchestrata_ultimate/kernel/performance/sla 1 10
orchestrata_ultimate/kernel/pipeline 4 6
orchestrata_ultimate/kernel/pipeline_audit 4 1
orchestrata_ultimate/kernel/pipeline_escalation 4 4
orchestrata_ultimate/kernel/pipeline_events 12 6
orchestrata_ultimate/kernel/pipeline_kg 14 5
orchestrata_ultimate/kernel/pipeline_session 5 5
orchestrata_ultimate/kernel/policy_evaluator 34 13
orchestrata_ultimate/kernel/queue_manager 16 14
orchestrata_ultimate/kernel/resource_monitor 16 11
orchestrata_ultimate/kernel/router 24 20
orchestrata_ultimate/kernel/session_context 21 15
orchestrata_ultimate/kernel/session_manager 9 7
orchestrata_ultimate/kernel/volk_status_bridge 5 3
orchestrata_ultimate/knowledge_graph/anomaly_detector 8 1
orchestrata_ultimate/knowledge_graph/code_parser 7 3
orchestrata_ultimate/knowledge_graph/config 3 3
orchestrata_ultimate/knowledge_graph/context_injector 10 2
orchestrata_ultimate/knowledge_graph/context_validator_loop 1 1
orchestrata_ultimate/knowledge_graph/file_watcher 10 1
orchestrata_ultimate/knowledge_graph/function_extractor 1 1
orchestrata_ultimate/knowledge_graph/graph_client 2 2
orchestrata_ultimate/knowledge_graph/graph_context_validator 2 1
orchestrata_ultimate/knowledge_graph/graph_node_mixins 10 4
orchestrata_ultimate/knowledge_graph/history 4 2
orchestrata_ultimate/knowledge_graph/interfaces 6 9
orchestrata_ultimate/knowledge_graph/nodes 3 1
orchestrata_ultimate/knowledge_graph/pam_integration 5 4
orchestrata_ultimate/knowledge_graph/portfolio 5 3
orchestrata_ultimate/knowledge_graph/prolog_bridge 1 1
orchestrata_ultimate/knowledge_graph/query_engine 13 6
orchestrata_ultimate/knowledge_graph/relationships 1 2
orchestrata_ultimate/knowledge_graph/sync 22 7
orchestrata_ultimate/knowledge_graph/synchronizer 20 7
orchestrata_ultimate/knowledge_graph/temporal 4 4
orchestrata_ultimate/knowledge_graph/test_results_store 3 1
orchestrata_ultimate/knowledge_graph/types 5 5
orchestrata_ultimate/knowledge_graph/types_enums 1 1
orchestrata_ultimate/knowledge_graph/types_nodes 6 4
orchestrata_ultimate/knowledge_graph/versioning 7 2
orchestrata_ultimate/memory/cold_store 4 6
orchestrata_ultimate/memory/compressor 1 3
orchestrata_ultimate/memory/embedding 1 1
orchestrata_ultimate/memory/hot_store 8 7
orchestrata_ultimate/memory/memory_engine 10 11
orchestrata_ultimate/orchestrator/engine 13 13
orchestrata_ultimate/orchestrator/graph_audit 4 3
orchestrata_ultimate/orchestrator/intent_router 1 1
orchestrata_ultimate/orchestrator/intent_workflow 2 1
orchestrata_ultimate/orchestrator/orchestrator 9 10
orchestrata_ultimate/orchestrator/pipeline_runner 2 4
orchestrata_ultimate/orchestrator/policy_registry 3 1
orchestrata_ultimate/postman/delivery_outcome 2 4
orchestrata_ultimate/postman/exceptions 1 1
orchestrata_ultimate/postman/governance 9 6
orchestrata_ultimate/postman/guarantees 5 4
orchestrata_ultimate/postman/interfaces 1 1
orchestrata_ultimate/postman/postman 8 10
orchestrata_ultimate/postman/queue 2 1
orchestrata_ultimate/postman/queue_manager 1 1
orchestrata_ultimate/postman/router 5 5
orchestrata_ultimate/postman/sync_router 4 3
orchestrata_ultimate/session/carryover 1 1
orchestrata_ultimate/session/graph_store 1 1
orchestrata_ultimate/session/interfaces 6 3
orchestrata_ultimate/session/kg_sync/_base 1 1
orchestrata_ultimate/session/kg_sync/_stage_code 1 1
orchestrata_ultimate/session/kg_sync/_stage_session 2 2
orchestrata_ultimate/session/redis_store 4 1

Checklists

checklists/README.md

Orchestration Kernel (U:KR) Checklists

Project: Orchestrator-AI Orchestration Kernel (Spec 001)
Component: U:KR (Kernel)
Status: Implementation Phase
Owner: Architecture Team


Overview

The Orchestration Kernel (U:KR) is the central coordination component of the Orchestrator-AI system. It serves as the executive brain that:


Checklist Summary
Checklist Total Items Completed Progress
Requirements 150+ 0 0%
Constitutional Compliance 110+ 0 0%
Testing Plan 441+ 0 0%
TOTAL 700+ 0 0%

Key Responsibilities
1. Message Routing and Dispatch
2. Governance Policy Enforcement
3. Session Management
4. Workflow Orchestration
5. Resource Management
6. Audit and Observability

Performance Targets
Metric Target Critical Threshold
Routing Latency <50ms p95 <100ms p99
Policy Query Time <10ms p95 <20ms p99
Agent Capacity 1000+ agents 500 minimum
Message Throughput 10,000 msg/sec 5,000 msg/sec
Session Overhead <5MB per session <10MB per session
Startup Time <2 seconds <5 seconds

Checklist Files
1. requirements.md

Functional requirements organized by user stories:

2. constitutional.md

Compliance with all 11 constitutional articles:

3. testing.md

Comprehensive testing strategy:


Usage Guidelines
For Developers
  1. Review requirements.md for functional specifications
  2. Check constitutional.md for design constraints
  3. Follow testing.md for test implementation
  4. Update checkboxes as work completes
  5. Track progress in the summary table above
For Reviewers
  1. Verify all requirements are addressed
  2. Validate constitutional compliance
  3. Ensure test coverage meets targets
  4. Check for completeness of implementation
  5. Sign off on completed sections
For Project Managers
  1. Monitor progress via checklist completion
  2. Identify blockers and dependencies
  3. Track milestone completion
  4. Report status to stakeholders
  5. Coordinate with other component teams

Integration Points
Upstream Dependencies
Downstream Consumers

Key Metrics
Routing Metrics
Policy Metrics
Session Metrics
Resource Metrics

Dependencies
Required Services
Required Libraries
Optional Services

Next Steps
  1. [ ] Review all checklist files for completeness
  2. [ ] Assign owners to each user story
  3. [ ] Create implementation tasks in tracking system
  4. [ ] Set up development environment
  5. [ ] Begin implementation of US-001 (Volk Registration)
  6. [ ] Establish CI/CD pipeline for kernel component
  7. [ ] Create integration test environment
  8. [ ] Document API interfaces for Volks

References

Last Updated: 2026-01-15
Version: 1.0.0
Maintained By: Architecture Team

checklists/constitutional.md

Orchestration Kernel (U:KR) - Constitutional Compliance

Component: U:KR (Kernel)
Spec: 001-kernel
Status: Compliance Review
Total Compliance Items: 110+


Overview

This document tracks compliance of the Orchestration Kernel (U:KR) with all 11 articles of the Orchestrator-AI Constitution. Each article includes specific compliance requirements and verification checkpoints.


Article I: Agent Autonomy

Principle: Volks (agents) retain autonomy; the kernel coordinates but does not control.

Compliance Requirements
Autonomy Preservation
Coordination Without Control

Priority: Critical
Verification: Manual review + integration tests


Article II: Prolog as Single Source of Truth

Principle: All governance rules are defined in Prolog; the kernel queries Prolog for decisions.

Compliance Requirements
Prolog Integration
Policy Queries

Priority: Critical
Verification: Prolog integration tests + policy compliance tests


Article III: Session Isolation

Principle: Sessions are isolated; state does not leak between sessions.

Compliance Requirements
State Isolation
Cross-Session Operations

Priority: Critical
Verification: Session isolation tests + state leak detection


Article IV: Hooks for Extensibility

Principle: The kernel provides extension points for customization without core modification.

Compliance Requirements
Extension Points
Hook Management

Priority: High
Verification: Hook registration tests + extension tests


Article V: Minimal Core, Maximal Extension

Principle: Kernel core is minimal; features are added via extensions.

Compliance Requirements
Minimal Core
Extension System

Priority: High
Verification: Core size metrics + extension loading tests


Article VI: Python 3.11+ Implementation

Principle: Kernel is implemented in Python 3.11+ with modern async patterns.

Compliance Requirements
Python Version
Code Quality

Priority: High
Verification: CI/CD checks + static analysis


Article VII: Testing Without Mocks

Principle: Tests use real implementations, not mocks.

Compliance Requirements
Real Systems Testing
Test Authenticity

Priority: Critical
Verification: Test code review + mock detector


Article VIII: Metrics and Observability

Principle: All operations are observable and measurable.

Compliance Requirements
Metrics Collection
Observability

Priority: High
Verification: Metrics tests + observability review


Article IX: Graceful Degradation

Principle: System degrades gracefully under failure, does not crash.

Compliance Requirements
Failure Handling
Recovery

Priority: High
Verification: Failure injection tests + chaos tests


Article X: Version Compatibility

Principle: APIs are versioned; breaking changes are avoided.

Compliance Requirements
API Versioning
Backward Compatibility

Priority: Medium
Verification: Compatibility tests + version migration tests


Article XI: Documentation First

Principle: Documentation precedes implementation.

Compliance Requirements
Design Documentation
Living Documentation

Priority: High
Verification: Documentation review + doc tests


Summary Statistics
Article Total Items Completed Percentage
Article I (Autonomy) 20 0 0%
Article II (Prolog) 20 0 0%
Article III (Isolation) 20 0 0%
Article IV (Hooks) 20 0 0%
Article V (Minimal Core) 20 0 0%
Article VI (Python 3.11+) 20 0 0%
Article VII (No Mocks) 20 0 0%
Article VIII (Observability) 20 0 0%
Article IX (Degradation) 20 0 0%
Article X (Versioning) 20 0 0%
Article XI (Documentation) 20 0 0%
TOTAL 220 0 0%

Last Updated: 2026-01-15
Version: 1.0.0
Maintained By: Architecture Team

checklists/requirements.md

The requirement list above comes from this file; 312 of 312 checkbox items are ticked.

checklists/testing.md

Orchestration Kernel (U:KR) - Testing Plan

Component: U:KR (Kernel)
Spec: 001-kernel
Status: Test Planning Phase
Total Test Cases: 441+


Overview

This document defines the comprehensive testing strategy for the Orchestration Kernel (U:KR). All tests follow the strict "no mocking" policy and use real implementations.


Test Categories Summary
Category Test Count Purpose Priority
Unit Tests 150+ Core logic validation Critical
Integration Tests 100+ System integration Critical
Contract Tests 50 Volk interface contracts High
Performance Tests 80+ Latency & throughput High
Compliance Tests 11 Constitutional compliance Critical
Failure Scenario Tests 50+ Error handling & recovery High
TOTAL 441+

Unit Tests (150+)
Routing Tests (40 tests)
Policy Tests (30 tests)
Session Tests (30 tests)
Volk Registry Tests (25 tests)
Workflow Tests (25 tests)

Integration Tests (100+)
Prolog Integration Tests (30 tests)
Redis Integration Tests (35 tests)
Neo4j Integration Tests (35 tests)

Contract Tests (50 tests)
Volk Interface Contracts (50 tests)

Performance Tests (80+ tests)
Latency Tests (30 tests)
Throughput Tests (20 tests)
Scalability Tests (30 tests)

Compliance Tests (11 tests)

Failure Scenario Tests (50+ tests)
Network Failures (15 tests)
Resource Exhaustion (10 tests)
Data Corruption (10 tests)
Concurrency Issues (15 tests)

Summary Statistics
Category Total Tests Completed Percentage
Unit Tests 150 0 0%
Integration Tests 100 0 0%
Contract Tests 50 0 0%
Performance Tests 80 0 0%
Compliance Tests 11 0 0%
Failure Scenario Tests 50 0 0%
TOTAL 441 0 0%

Test Execution Strategy
Local Development
# Run unit tests
uv run pytest tests/unit/ -v

# Run integration tests (requires Redis, Neo4j, Prolog)
uv run pytest tests/integration/ -v

# Run contract tests
uv run pytest tests/contracts/ -v

# Run performance tests
uv run pytest tests/performance/ -v --benchmark

# Run compliance tests
uv run pytest tests/compliance/ -v

# Run failure tests
uv run pytest tests/failures/ -v

# Run all tests
uv run pytest tests/ -v --cov=src --cov-report=html
CI/CD Pipeline

Last Updated: 2026-01-15
Version: 1.0.0
Maintained By: Architecture Team

Other tracked files

Full spec text

Verbatim from specs/001-kernel/spec.md; headings are pushed down two levels.

SPEC-001: Orchestration Kernel (U:KR)

Metadata


Overview

What

The Orchestration Kernel (U:KR) is the central nervous system of Orchestrata. It manages Volk (agent) registration, message routing, governance policy enforcement, session lifecycle, escalation handling, workflow orchestration, resource management, and audit trail logging.

Why
How

User Scenarios & Stories

US-001: Volk Registration and Discovery (Critical)

As a Volk (agent) I want to register with the kernel and discover other Volks So that I can participate in the orchestration network

Acceptance Criteria:


US-002: Message Routing and Dispatch (Critical)

As a Kernel I want to route CXP messages to appropriate Volks So that agents can communicate deterministically

Acceptance Criteria:


US-003: Governance Policy Enforcement (Critical)

As a Kernel I want to enforce governance policies via Prolog So that the system respects PAM++ boundaries and rules

Acceptance Criteria:


US-004: Session Management (High)

As a Kernel I want to manage session lifecycle So that multi-session workflows maintain state correctly

Acceptance Criteria:


US-005: Escalation Handling (High)

As a Kernel I want to handle escalations when conflicts occur So that deadlocks and disputes are resolved

Acceptance Criteria:


US-006: Workflow Orchestration (Medium)

As a Kernel I want to coordinate multi-step workflows across Volks So that complex tasks complete correctly

Acceptance Criteria:


US-007: Resource Management (Medium)

As a Kernel I want to manage system resources So that Volks have what they need without overload

Acceptance Criteria:


US-008: Audit Trail Logging (High)

As a Kernel I want to log all orchestration decisions So that we have complete audit trails

Acceptance Criteria:


US-009: Configuration Management (Medium)

As a Kernel I want to manage configuration dynamically So that the system adapts without restarts

Acceptance Criteria:


US-010: Performance and Scalability (High)

As a Kernel I want to operate efficiently at scale So that the system supports 1000+ agents

Acceptance Criteria:


Functional Requirements

See checklists/requirements.md for 305+ detailed requirements organized by user story.

Core Capabilities
Capability Target
Volk Registration <50ms
Message Routing <50ms p95
Policy Query (cached) <10ms p95
Session Creation <100ms
Escalation Resolution <200ms
Workflow Step Execution <500ms

Technical Design

Architecture
┌─────────────────────────────────────────────────────────┐
│                  U:KR - Kernel                           │
├─────────────────────────────────────────────────────────┤
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐     │
│  │   Volk      │  │   Message   │  │   Policy    │     │
│  │   Registry  │  │   Router    │  │   Engine    │     │
│  └──────┬──────┘  └──────┬──────┘  └──────┬──────┘     │
│         │                │                │             │
│  ┌──────┴──────┐  ┌──────┴──────┐  ┌──────┴──────┐     │
│  │   Session   │  │  Workflow   │  │  Resource   │     │
│  │   Manager   │  │  Orchestrator│  │   Manager   │     │
│  └─────────────┘  └─────────────┘  └─────────────┘     │
├─────────────────────────────────────────────────────────┤
│  Redis (State)  │  Neo4j (Audit)  │  Prolog (Governance)│
└─────────────────────────────────────────────────────────┘
Key Interfaces
IVolkRegistry
class IVolkRegistry(Protocol):
    async def register(self, volk: VolkRegistration) -> str: ...
    async def deregister(self, alias: str) -> None: ...
    async def discover(self, capability: Optional[str] = None) -> List[Volk]: ...
    async def get_volk(self, alias: str) -> Optional[Volk]: ...
IMessageRouter
class IMessageRouter(Protocol):
    async def route(self, packet: CXPPacket) -> RoutingResult: ...
    async def dispatch(self, packet: CXPPacket, volk: Volk) -> DispatchResult: ...
    async def get_status(self, message_id: str) -> DeliveryStatus: ...
IPolicyEngine
class IPolicyEngine(Protocol):
    async def query(self, predicate: str, args: List[Any]) -> PolicyDecision: ...
    async def validate_route(self, from_volk: str, to_volk: str) -> bool: ...

Data Models

Volk Registration
class VolkRegistration:
    alias: str                    # U:Ox, U:PS, etc.
    role: str                     # orchestrator, postman, etc.
    capabilities: List[str]       # What the volk can do
    protocols: List[str]          # CXP, gRPC, WebSocket
    resources: ResourceRequirements
    endpoint: str                 # Connection address
Routing Table Entry
class RoutingEntry:
    message_id: str
    from_volk: str
    to_volk: str
    status: DeliveryStatus
    timestamp: datetime
    attempts: int
    error_reason: Optional[str]

Success Criteria

  1. Performance: <50ms p95 routing, <10ms p95 policy queries
  2. Scale: Support 1000+ concurrent Volks, 10K msg/sec
  3. Reliability: 99.9% uptime, zero message loss
  4. Governance: All routing decisions pass Prolog validation
  5. Audit: Complete audit trail for all operations

Dependencies


Integration Points

Component Integration
orchestrata-postman Message delivery
orchestrata-orchestrator Escalation handling
orchestrata-agents Volk lifecycle
orchestrata-session Session state

Revision History

Date Version Author Changes
2026-03-07 1.0 Mohamed Initial specification