Date: November 28, 2025
Status: ✅ Active & Experimental
Version: 0.1.0
- Core Concepts
- Domain Registry Architecture
- Fractal Patterns
- Code Analysis Pipeline
- Key Files & Tools
- Getting Started
Fractal orchestration encodes a recursive pattern where:
Domain → Orchestrated Domain → System → Subsystem → Higher-Level Domain → Meta-System → ...
Each level repeats the same structural pattern:
- Domains are static collections of related concerns
- Orchestrated Domains gain behavior through musical sequences (movements, beats, handlers)
- Systems emerge when orchestrated domains exhibit flow, telemetry, and feedback
- Subsystems are systems packaged as reusable black-box capabilities
- Higher-Level Domains promote subsystems to first-class governance entities
- Meta-Systems coordinate many orchestrated domains into a unified whole
At every scale, the architecture looks the same. A domain can be:
- A system when viewed from below (composed of handlers and beats)
- A domain when viewed from above (as a first-class citizen in governance)
- Both simultaneously in the meta-system level
Location: DOMAIN_REGISTRY.json (root)
Purpose: Global domain registration index for lineage, link resolution, and validation
Key Features:
{
"registry_principles": [
"Registry is append-only for active domains (mutations via lifecycle changes)",
"All domain_ids are globally unique",
"Lineage hashes are recomputed at validation time",
"Deprecation retains record but marks domain non-linkable unless migration",
"Handler scope/kind is immutable per beat (tracks system vs feature logic)"
]
}Each beat now includes handler-level scope/kind metadata that distinguishes:
pluginhandlers - Feature logic and business rulesorchestrationhandlers - System logic and governanceinfrahandlers - Infrastructure and platform concerns
This enables:
- Per-scope metrics in symphonic code analysis
- Registry audit to identify missing orchestration handlers
- Self-healing domain to target fixes by scope
- Clear separation: feature logic vs system logic
Location: orchestration-domains.json (root)
Purpose: Registry of all orchestration domains and their sequences
Structure:
{
"domains": [
{
"id": "fractal-orchestration-domain-symphony",
"name": "Fractal Orchestration Domain",
"type": "orchestration",
"status": "experimental",
"sequenceFile": "packages/orchestration/json-sequences/fractal-orchestration-domain-symphony.json",
"orchestration": {
"movements": 5,
"beats": 10,
"handlers": ["fractalNarrator"]
}
}
]
}Each domain in DOMAIN_REGISTRY.json contains:
{
"domain_id": "orchestration-core",
"domain_type": "orchestration",
"status": "active",
"root_ref": "docs/governance/UNIFIED_GOVERNANCE_AUTHORITY.json",
"parent_refs": [],
"checksum": "cc6785471d80179e9e78637bde4c56dc7437b1715c3fd42231c3ea425461d20d",
"supersedes": [],
"deprecated": false,
"ownership": "Platform-Orchestration",
"orchestration": {
"schema_ref": "docs/schemas/musical-sequence.schema.json",
"interface": {
"name": "MusicalSequence",
"source": "packages/musical-conductor/modules/communication/sequences/SequenceTypes.ts"
},
"registry_ref": {
"file": "orchestration-domains.json",
"id": "orchestration-domains-registry"
}
}
}Key Fields:
domain_id: Globally unique identifierdomain_type:orchestration,workflow,capability,plugin, etc.status:active,deprecated,experimental,plannedparent_refs: Array of parent domains in the hierarchychecksum: Immutable hash for validationownership: Responsible team/platform
File: packages/orchestration/json-sequences/fractal-orchestration-domain-symphony.json
This is a didactic symphony that demonstrates fractal behavior in 5 movements:
Event: fractal:domain:identified
└─ Recognize a cohesive domain with clear boundaries
Event: fractal:domain:orchestrated
└─ Bind the domain to a MusicalSequence (movements, beats, handlers, rules)
Event: fractal:system:emerges
└─ The orchestrated domain now has flow, telemetry, and self-awareness hooks
Event: fractal:system:stabilized
└─ Feedback loops and governance beats keep the system within safe bounds
Event: fractal:subsystem:packaged
└─ Treat the system as a black-box capability with manifest and contracts
Event: fractal:subsystem:composed
└─ Compose this subsystem alongside others inside a higher-order sequence
Event: fractal:domain:promoted
└─ Promote the subsystem to a first-class domain in the global registry
Event: fractal:domain:linked
└─ Link the new domain into orchestration registries and governance symphonies
Event: fractal:metasystem:formed
└─ Multiple orchestration domains now function as a coordinated meta-system
Event: fractal:ecosystem:self-similar
└─ Every level repeats the same pattern: domain as system, system as domain
All 10 events are tracked in the pipeline:
fractal:domain:identified
fractal:domain:orchestrated
fractal:system:emerges
fractal:system:stabilized
fractal:subsystem:packaged
fractal:subsystem:composed
fractal:domain:promoted
fractal:domain:linked
fractal:metasystem:formed
fractal:ecosystem:self-similar
File: packages/orchestration/json-sequences/symphonic-code-analysis-pipeline.json
This is a comprehensive 4-movement analysis pipeline that measures orchestration code quality and fractal architecture participation.
{
"id": "symphonic-code-analysis-pipeline",
"name": "Symphonic Code Analysis Pipeline",
"status": "active",
"movements": 4,
"beats": 16,
"tempo": 120
}Purpose: Discover all source files, map them to orchestration beats, establish baseline
- Beat 1: Scan orchestration files and identify beat definitions
- Beat 2: Map source code files to beat handlers
- Beat 3: Extract handler signatures and dependencies
- Beat 4: Identify analysis coverage gaps
Purpose: Calculate LOC, complexity, duplication, maintainability metrics
- Beat 1: Calculate lines of code per beat
- Beat 2: Analyze cyclomatic complexity
- Beat 3: Detect code duplication
- Beat 4: Calculate maintainability index
Purpose: Measure statement, branch, function, line coverage
- Beat 1: Collect statement coverage metrics
- Beat 2: Analyze branch coverage
- Beat 3: Calculate function coverage
- Beat 4: Correlate coverage to beats
Purpose: Validate handler-to-beat mapping, calculate conformity, generate reports
- Beat 1: Validate orchestration conformity
- Beat 2: Analyze handler implementation completeness
- Beat 3: Analyze fractal architecture ⭐
- Beat 4: Generate report and trend analysis
The pipeline measures several key metrics:
{
"metrics": [
"Lines of code per beat",
"Lines of code per movement",
"Test coverage percentage (statement, branch, function, line)",
"Cyclomatic complexity per beat",
"Code duplication percentage",
"Handler implementation completeness",
"Test assertion count per beat",
"Architecture conformity score",
"Dependency coupling metrics",
"Debt score (technical debt estimate)",
"Maintainability index per module"
],
"conformityMetrics": {
"fractalArchitecture": {
"description": "Fractal architecture participation of orchestration domains (domains-as-systems and systems-as-domains)",
"benchmark": "≥ 0.50 fractalScore (50%+ orchestration domains acting as systems-of-systems)",
"impact": "High - Indicates architecture follows recursive self-similar patterns"
}
}
}analysis:initiated
movement-1:discovery:started
movement-1:beat:files:collected
movement-1:beat:handlers:identified
movement-1:discovery:complete
movement-2:metrics:started
movement-2:loc:calculated
movement-2:complexity:analyzed
movement-2:duplication:detected
movement-2:metrics:complete
movement-3:coverage:started
movement-3:statement:coverage:calculated
movement-3:branch:coverage:calculated
movement-3:coverage:complete
movement-4:conformity:started
movement-4:architecture:validated
movement-4:fractal:analyzed ⭐ FRACTAL EVENT
movement-4:trend:analyzed
movement-4:report:generated
analysis:complete
| File | Purpose | Location |
|---|---|---|
DOMAIN_REGISTRY.json |
Global domain index, lineage, validation | Root |
orchestration-domains.json |
Orchestration domain registry | Root |
DOMAIN_REGISTRY_QUERY_TOOLS.md |
Query and analysis tools documentation | Root |
DOMAIN_REGISTRY_REPRESENTATION.md |
Domain registry data model | Root |
| File | Purpose | Location |
|---|---|---|
fractal-orchestration-domain-symphony.json |
Didactic fractal pattern demo | packages/orchestration/json-sequences/ |
symphonic-code-analysis-pipeline.json |
Code analysis and conformity pipeline | packages/orchestration/json-sequences/ |
| Script | Purpose | Location |
|---|---|---|
analyze-fractal-architecture.cjs |
Compute fractal metrics from registries | scripts/ |
symphonic-metrics-envelope.cjs |
Wire metrics into symphonic envelope | scripts/ |
validate-orchestration-registry.js |
Validate registry against catalog | scripts/ |
query-lineage.js |
Query data lineage and audit trail | scripts/ |
| Test | Purpose | Location |
|---|---|---|
symphonic-fractal-architecture.spec.ts |
Test fractal metrics computation | scripts/__tests__/ |
symphonic-code-analysis-fractal.spec.ts |
Test code analysis fractal encoding | tests/ |
| Document | Focus | Location |
|---|---|---|
SYMPHONIA_ORCHESTRATION_MASTER_REFERENCE.md |
Complete orchestration framework | Root |
SYMPHONY_ORCHESTRATION_FRAMEWORK_GUIDE.md |
Orchestration patterns and practices | Root |
SYMPHONIC_CODE_ANALYSIS_PIPELINE_DESIGN.md |
Code analysis architecture | Root |
ARCHITECTURE_GOVERNANCE_SYMPHONY_GUIDE.md |
Governance frameworks | Root |
Quick Tour:
# View the domain registry structure
cat DOMAIN_REGISTRY.json | head -100
# Query a specific domain
node scripts/query-lineage.js trace orchestration-core
# Validate the registry
node scripts/validate-orchestration-registry.jsKey Concepts:
- Open
packages/orchestration/json-sequences/fractal-orchestration-domain-symphony.json - Read the 5 movements to understand domain → system → domain recursion
- Note the 10 events that track the fractal lifecycle
Full Analysis:
# Run the symphonic code analysis pipeline
npm run analyze:symphonic:code
# Run specific tests
npx vitest run scripts/__tests__/symphonic-fractal-architecture.spec.ts tests/symphonic-code-analysis-fractal.spec.tsKey Test Files:
scripts/__tests__/symphonic-fractal-architecture.spec.ts:
- Tests fractal metrics computation
- Validates registry alignment
- Checks domain linkage across registries
- Verifies fractal score normalization (0-1)
Key Assertions:
// All orchestration domains that appear only in projection should be empty
expect(result.summary.projectionOnly).toEqual([]);
// Fractal domain must be in both registries
expect(result.fractalDomain.inOrchestrationRegistry).toBe(true);
expect(result.fractalDomain.inDomainRegistry).toBe(true);
// Fractal score normalizes between 0 and 1
expect(result.summary.fractalScore).toBeGreaterThanOrEqual(0);
expect(result.summary.fractalScore).toBeLessThanOrEqual(1);tests/symphonic-code-analysis-fractal.spec.ts:
- Tests that pipeline declares fractal architecture as metric
- Verifies
movement-4:fractal:analyzedevent exists - Confirms fractal work is described in movement 4 beats
Each beat handler now has:
- Scope:
plugin|orchestration|infra - Kind: Matches the scope (e.g.,
plugin,orchestration,infrastructure)
This allows:
- Separate metrics for system vs feature logic
- Targeted governance for orchestration handlers
- Self-healing domain to fix by scope
Example:
{
"beat": 1,
"event": "fractal:domain:identified",
"handler": "fractalNarrator",
"handler_scope": "orchestration",
"handler_kind": "orchestration"
}# Analyze fractal architecture
npm run analyze:symphonic:code
# Run all tests
npm run test
# Run specific test
npx vitest run scripts/__tests__/symphonic-fractal-architecture.spec.ts
# Validate registry
node scripts/validate-orchestration-registry.js
# Query domain lineage
node scripts/query-lineage.js trace orchestration-core┌────────────────────────────────────────────────────────────────┐
│ Fractal Orchestration Domain Architecture │
├────────────────────────────────────────────────────────────────┤
│ │
│ DOMAIN REGISTRY LAYER │
│ ├─ DOMAIN_REGISTRY.json (global index) │
│ ├─ orchestration-domains.json (orchestration index) │
│ └─ Handler scope/kind metadata (plugin|orch|infra) │
│ │
│ FRACTAL PATTERN LAYER │
│ └─ fractal-orchestration-domain-symphony.json │
│ ├─ Movement 1: Domain → Orchestrated Domain │
│ ├─ Movement 2: Orchestrated Domain → System │
│ ├─ Movement 3: System → Subsystem │
│ ├─ Movement 4: Subsystem → Domain (Promoted) │
│ └─ Movement 5: Meta-System (Ecosystem) │
│ │
│ CODE ANALYSIS LAYER │
│ └─ symphonic-code-analysis-pipeline.json │
│ ├─ Movement 1: Discovery & Beat Mapping │
│ ├─ Movement 2: Code Metrics │
│ ├─ Movement 3: Test Coverage │
│ └─ Movement 4: Conformity & Fractal Analysis ⭐ │
│ │
│ METRICS LAYER │
│ ├─ Per-beat code metrics (LOC, complexity, coverage) │
│ ├─ Per-scope handler metrics (plugin vs orchestration) │
│ ├─ Fractal architecture score (0-1) │
│ └─ Conformity score (0-100) │
│ │
└────────────────────────────────────────────────────────────────┘
- Explore the Domain Registry: Open
DOMAIN_REGISTRY.jsonand understand the global domain index - Study Fractal Patterns: Review the 5 movements in
fractal-orchestration-domain-symphony.json - Run Code Analysis: Execute
npm run analyze:symphonic:codeto see metrics - Review Test Coverage: Check the fractal and analysis test files
- Understand Handler Scopes: See how orchestration vs plugin handlers are distinguished
Last Updated: November 28, 2025
Framework Version: 1.0
Status: ✅ Active & Experimental