Orchestrata Ultimate › Plans › ast-analysis-report

AST Analysis Report — orchestrata-ultimate Porting Status

Source: plans/ast-analysis-report.md at 8a2cb42ad · last changed 2026-07-27 · first committed 2026-04-14 · 213 lines.

Prose pending.

Plan text

AST Analysis Report — orchestrata-ultimate Porting Status

Generated: 2026-04-12
Source AST: plans/ast-ultimate-fresh.json (generated from src/orchestrata_ultimate/)
Comparison AST: plans/ast-orchestrata.json (original 26-package monorepo)
Deep Comparison: plans/ast-deep-comparison-fresh.json


1. Overview

Metric Value
Total orchestrata classes 853
Total ultimate classes 353
Class coverage 41.4% (353/853)
Total orchestrata LOC 121,692
Total ultimate LOC 36,858
LOC coverage 30.3%
Semantic pairs (mapped classes) 287
Unmapped orchestrata classes 567
Unmapped ultimate classes 73 (new code)

Porting Progress: ~30% of codebase ported, following tiered execution plan (currently at step 96/238).


2. Readiness of Mapped Classes

Readiness Count Description
equal 96 Exact match (identical signatures)
mostly_complete 164 >70% methods ported, minor diffs
partial 11 30–70% methods ported
stub 8 <30% methods ported
needs_creation 7 Orchestrata class missing in ultimate
orchestrata_missing 1 Ultimate class not in orchestrata

Interpretation: 260/287 (90%) of mapped classes are in good shape (equal + mostly_complete).
The remaining 27 pairs need attention.


3. Tier‑by‑Tier Progress

Tier Packages Orchestrata LOC Ultimate LOC LOC Coverage Class Coverage
0 core 6,439 8,852 137.5% 120.3%
1 14 packages (cxp, di, drivers, llm, provider, verification, etc.) 28,226 14,031 49.7% 85.4%
1+2 agents, verification 13,796 11,082 80.3% 124.3%
2 governance, kernel, orchestrator, postman 45,014 145 0.3% 0.2%
2+3 knowledge 8,449 2,124 25.1% 2.5%
3 memory, session 11,740 0 0.0% 0.0%
4 gateway, plugin 8,028 0 0.0% 0.0%

Key insight: Lower tiers (0‑1) are well advanced; higher tiers (2‑4) are largely untouched, as expected by the phased execution plan.


4. Subsystem Coverage (Detailed)

Package Tier Planned LOC Ultimate LOC Coverage Notes
orchestrata‑core 0 6,439 8,852 137.5% Extra code added (new utilities)
orchestrata‑cxp 1 9,525 7,550 79.3% Mostly complete
orchestrata‑di 1 856 828 96.7% Nearly done
orchestrata‑drivers 1 2,070 2,114 107.8% Slight expansion
orchestrata‑llm 1 722 732 101.4% Complete
orchestrata‑provider 1 1,936 1,895 97.9% Nearly done
orchestrata‑verification 1+2 6,458 6,429 99.6% Almost exact
orchestrata‑agents 1+2 7,338 4,653 63.4% Framework ported, role‑specific methods missing
orchestrata‑knowledge 2+3 8,449 2,124 25.1% Partial port
orchestrata‑analyst 1 729 309 42.4% Stub (2/10 methods)
orchestrata‑architect 1 2,028 42 2.5% Barely started
orchestrata‑codedirector 1 4,228 43 1.0% Barely started
orchestrata‑qa 1 3,039 39 1.3% Stub (4/42 methods)
orchestrata‑postman 2 12,674 0 0.0% Not started
orchestrata‑kernel 2 15,272 0 0.0% Not started
orchestrata‑orchestrator 2 11,332 0 0.0% Not started
orchestrata‑session 3 10,595 0 0.0% Not started
orchestrata‑memory 3 1,145 0 0.0% Not started
orchestrata‑gateway 4 4,429 0 0.0% Not started
orchestrata‑plugin 4 3,599 0 0.0% Not started

5. Critical Gaps

5.1 Stub Agent Implementations

The following agent roles are stubs (<<30% methods ported):

Agent Ultimate Methods Orchestrata Methods Missing Count Example Missing Methods
AnalystAgent 2 10 8 __init__, _build_escalation_packet, _call_llm, _init_kg, _parse_analysis, …
JuniorAgent 1 9 8 __init__, _apply_project_dir, _auto_ready, _build_review_response, _call_design_review_llm, …
CodeDirectorAgent 1 16 15 __init__, _build_aider_prompt, _extract_aider_prompt, _files_summary, _get_fan_out_decision, …
QualityAssuranceAgent 4 42 38 _autofix_aioredis, _autofix_f821_datetime, _autofix_hset_dict, _autofix_import_order, _autofix_line_length, …
ConciergeAgent 1 5 4 __init__, _finalize, _handle_intent, _handle_response
ComplianceAgent 1 9 8 __init__, _build_report_artifact, _build_response, _calculate_results, _extract_packet_fields, …
ValidationError 0 1 1 __init__
AuditLogger 3 27 24 _create_entry, _flush, _flush_loop, _query_file_logs, _worker_loop, …

5.2 Partial Classes (30‑70% methods)

Class Ultimate Methods Orchestrata Methods Gap
SeniorDevAgent 2 3 1
UserExperienceAgent 4 6 2
OrchestrataKernel 7 14 7
UltimateOrchestrator 5 11 6
GovernanceEngine 6 11 5
Neo4jGraph 8 14 6
SwarmCoordinator 9 17 8
CXPRouter 9 16 7
RoutingResult 1 2 1
GoalRegistry 8 14 6
GoalReportGenerator 3 6 3

5.3 Missing Orchestrata Classes (needs_creation)

These orchestrata classes have no counterpart in ultimate yet:

Orchestrata Class Module Methods
PMVolk orchestrata.volks.pm.volk 7
VolkRuntime orchestrata.agents.runtime 24
VolkPool orchestrata.agents.pool 8
VolkRegistry orchestrata.kernel.volk_registry 33
VolkCoordinator orchestrata.agents.coordinator 12
MemoryEngine orchestrata.memory.memory_engine 14
EventBus orchestrata.kernel.event_bus 14

5.4 New Ultimate‑Only Class (orchestrata_missing)

Ultimate Class Module Methods Note
ArchitectAgent agents.volks.architect.volk 1 Ultimate has a stub not present in orchestrata?

6. Unmapped Classes

Largest unmapped orchestrata packages:

Package Unmapped Classes
orchestrata‑postman ~80
orchestrata‑kernel ~78
orchestrata‑orchestrator ~54
orchestrata‑session ~58
orchestrata‑governance ~53
orchestrata‑plugin ~32
orchestrata‑gateway ~18
orchestrata‑memory ~11
… (others)

7. Import Translation Audit

All imports from orchestrata packages are correctly mapped to ultimate equivalents via the mapping table.


8. New External Dependencies in Ultimate

The ultimate codebase introduces the following external dependencies not present in orchestrata:

archive, argparse, bisect, carryover, constants, context, csv, exceptions, facts, fastapi,
fnmatch, glob, google, grpc, handover, heapq, hook_registry, importlib, interfaces, io,
jinja2, jwt, kg_context, kg_sync, models, msgpack, neo4j, pickle, portfolio,
prolog_interface, queue, secrets, session, signal, spec_parser, sqlite3, statistics,
watchfiles, yaml

Most are Python standard library modules; a few are new third‑party additions (fastapi, jinja2, msgpack, neo4j, yaml, watchfiles).


9. Recommendations

  1. Complete agent role implementations – The 8 stub agent classes are the most pressing gap. Each missing method should be ported from the corresponding orchestrata volk.

  2. Focus on Tier‑2 packages – The largest untouched subsystems (postman, kernel, orchestrator, governance) account for 45K LOC (37% of total). Starting these will significantly boost coverage.

  3. Leverage the automated porting harness – The existing harness (4 volks) can be directed to process the stub/partial classes, using the deep‑comparison output as a worklist.

  4. Update the execution plan – The AST analysis reveals which steps are still pending. The plan’s remaining 142 steps should be validated against this readiness report.

  5. Run the full test suite – Ensure the already‑ported code passes all tests (including parallel‑safe checks). The coverage gate for agents is 90%; currently it is likely lower due to stub methods.

  6. Monitor import translation – While currently clean, any new porting work must maintain the import‑mapping discipline.


10. Next Steps

  1. Generate a worklist of missing methods from stub/partial classes.
  2. Prioritize by tier and dependency order (e.g., VolkRuntime, VolkRegistry may be needed before agents can be fully functional).
  3. Integrate this analysis into the execution‑plan tracker (plans/TRACKER.md).
  4. Re‑run the deep comparison after each major sub‑phase to measure progress.

Report generated by scripts/analyze_porting_status.py using scripts/serialize_codebase_ast.py.