Consultation Workflow

Iconsult's 7-step guided architecture review — applied to OpenAI's Financial Research Agent

1
Read Codebase LLM

Fetched manager.py, agents/*.py. Identified orchestrator pattern, .as_tool() delegation, silent except Exception: return None, and terminal verifier.

2
Match Concepts Deterministic
match_concepts

Embedded project description (text-embedding-3-small) and ranked all 141 concepts by cosine similarity against pre-computed KG embeddings. Same input → same ranking — no LLM.

2b
Plan Deterministic
plan_consultation

Assessed complexity as complex (86/100). Controls depth: simple (3 concepts, 1 hop) → moderate (5, 2 hops, optional critique) → complex (8, parallel subagents, 2nd traversal, mandatory critique).

3
Traverse Graph LLM + Tools
get_subgraph log_pattern_assessment emit_event

4 parallel subagents, 2 traversal rounds (39 nodes, 45 edges). Logged 20 pattern assessments (7 implemented, 3 partial, 7 missing, 3 N/A).

💡 Key discovery: verification feedback loop gap blocks entire self-correction → self-improvement path
4
Retrieve Passages RAG
ask_book

Scoped to discovered concepts — returned exact chapter numbers, page ranges, and quotes. Follow-up questions generated deterministically from graph edge templates.

5
Coverage + Score + Stress Test Deterministic
consultation_report score_architecture generate_failure_scenarios

4 coverage dimensions (concept, relationship type, passage diversity, critical edges). 7-category maturity scorecard. 5 failure walkthroughs for missing patterns.

5b
Critique Deterministic
critique_consultation

No LLM — 7 rule-based checks against fixed thresholds (workflow completeness, traversal ≥ 3, assessments ≥ 5, coverage ≥ 50%, critical edges). Flagged 2 issues; backfilled 6 concepts.

6
Render Report Template
render_report

Server-side HTML — scores, scenarios, and coverage from DB merged with Claude-provided narrative (~1700 tokens). Full CSS/JS/zoom/tooltips baked in.

7
Implementation Plan Deterministic
generate_implementation_plan

Phased checklist classifying each step as mechanical (concrete code change) or design decision (architectural choice). Persisted in DB for cross-session tracking.