Orchestrata Ultimate › Plans › agent-implementation-plan

Agent Implementation — Pipeline Automation

Source: plans/agent-implementation-plan.md at 8a2cb42ad · last changed 2026-07-27 · first committed 2026-06-26 · 106 lines.

Prose pending.

Plan text

Agent Implementation — Pipeline Automation

Branch: deepseek-edition Specs: SPEC-103 (Tool-Calling), SPEC-019 (Agents) Status: Phase 4 — Observer Logging

Agent Roster

# Agent Alias LOC LLM Access Tool Access Pipeline Role
1 ConciergeVolk U:Cx 444 Yes (call_llm) search, ast_query Intake — elicits requirements, detects work type
2 AnalystAgent U:BA 336 Yes (call_llm) search, ast_query, read Analysis — requirements decomposition, story generation
3 PMVolk U:PM 338 Yes (call_llm_with_tools) ast_query, read_file Scoping — estimates, warnings
4 ArchitectVolk U:Ar 342 Yes (constitution-aware) read, search, ast_query, list_dir Design — architecture, file tree, API spec
5 CodeDirectorVolk U:Cd 391 Yes (call_llm_with_tools) read, write, list_dir, search, ast_query, run_shell Implementation — code generation, swarm delegation
6 QaVolk U:Qa 3,133 Yes (constitution-aware) read, write, run_shell, search, check_coverage QA — test generation, code review, auto-fix
7 ComplianceVolk U:Cp 443 No (deterministic) — Traceability — RTM generation, design-vs-code
8 DocumentorVolk U:Do 163 Yes (call_llm_with_tools) read, write, list_dir, search, ast_query Documentation — readme, specs, architecture, flow, API docs
9 JuniorVolk J:Junior 3,228 Yes (call_llm) read, write, run_shell, list_dir, search Parallel — design review, code gen, dep validation
10 UXVolk U:Ux 241 Yes (call_llm_with_tools) read_file, search_code UI Design — wireframes, design tokens, accessibility
11 SwarmCoordinator — 968 Yes (dispatches juniors) — Parallel dispatch — isolated workspaces, atomic merge

Tool Access by Agent

Agent read_file write_file list_dir search_code run_shell ast_query check_cov
U:Cx — — — ✓ — ✓ —
U:BA ✓ — — ✓ — ✓ —
U:PM ✓ — — — — ✓ —
U:Ar ✓ — ✓ ✓ — ✓ —
U:Cd ✓ ✓ ✓ ✓ ✓ ✓ —
U:Qa ✓ ✓ — ✓ ✓ — ✓
U:Cp — — — — — — —
U:Do ✓ ✓ ✓ ✓ — ✓ —
J:Junior ✓ ✓ ✓ ✓ ✓ — —
U:Ux ✓ — — ✓ — — —

Work Type → Agent Pipeline

Work Type Stages Description
feature U:Cx → U:BA → U:PM → U:Ar → U:Cd → U:Qa → U:Cp Full pipeline
refactor U:Ar → U:Cd → U:Qa → U:Cp Skip intake, redesign + fix
test U:Cd → U:Qa → U:Cp Generate tests, review
documentation U:Cx → U:Do → U:Cp Elicit context → doc agent
analysis U:Cx → U:BA → U:Cp Requirements analysis only
fix U:Qa → U:Cd → U:Qa → U:Cp Fix issues, re-review
review U:Qa → U:Cp Code review only
spec U:Cx → U:BA → U:Do → U:Cp New specification
dependency U:Ar → U:Cd → U:Qa → U:Cp Dependency updates
performance U:Qa → U:Ar → U:Cd → U:Qa → U:Cp Profile, optimize, verify

Communication Architecture

PipelineRunner
    │
    │ _register_handlers(stages)
    │   postman._handlers["U:Cx"] = handler_fn
    │   postman._handlers["U:BA"] = handler_fn
    │   ...
    │
    │ _run_stage(stage_spec, packet)
    │   postman.route_sync(packet)
    │       │
    │       ├── Deterministic message ID (based on thread_id + content hash)
    │       ├── Redis persistence (packet audit trail)
    │       ├── Deduplication check
    │       ├── CXPAuditor logging
    │       ├── _dispatch_sync() → handler(packet)
    │       │       agent = cls()
    │       │       return await agent.process(packet)
    │       └── Message log entry (CXPFeed visibility)
    │
    │ result = StageResult(status, output_packet, artifacts, duration_ms)
    │
    ▼
PipelineResult (thread_id, stages, artifacts, metrics, overall_status)

Files Created/Modified

File Status LOC Purpose
agents/tool_registry.py NEW 390 7 tool definitions, ToolRegistry, Agent tool sets
agents/volks/base.py MODIFIED +65 _call_llm_with_tools() — multi-turn tool-calling loop
agents/volks/codedirector/prompts.py NEW 57 CODEDIRECTOR_SYSTEM_PROMPT with tools
agents/volks/concierge/volk.py MODIFIED +81 WORK_TYPE detection + routing, observer logging
agents/volks/documentor/volk.py NEW 163 Documentor agent — 6 doc types, tool access
agents/volks/documentor/prompts.py NEW 56 DOCUMENTOR_SYSTEM_PROMPT with tools
orchestrator/pipeline_router.py NEW 274 10 work types → 9 capability → agent mapping
orchestrator/pipeline_runner.py NEW 309 Postman-routed pipeline executor
orchestrator/artifact_store.py NEW 91 Thread-safe artifact collection

Verification

# All imports resolve
python -c "from orchestrata_ultimate.agents.volks.documentor import DocumentorVolk; from orchestrata_ultimate.orchestrator.pipeline_runner import PipelineRunner; print('OK')"

# Agent class resolution
python -c "from orchestrata_ultimate.orchestrator.pipeline_router import PipelineRouter; r=PipelineRouter(); [print(f'{wt.value}: {[s.alias for s in r.route(wt)]}') for wt in r.route.__func__.__defaults__[0].__class__]"

# Smoke test (review work type = QA → Cp only, fastest path)
python scripts/pipeline_quick_test.py