LLM-Orchestrated Coding Workflow

Layered prompting, multi-LLM verification, iterative implementation and manual validation

Input Stage

You start with a crude idea for a feature, component, refactor, or fix.
Discuss it casually and freely with LLM-1 (strong model, e.g. Claude / Grok) to clarify requirements, edge cases, and intent.
Goal: Reach clear mutual understanding before any structuring.

Refinement Stage

LLM-1 rewrites the validated idea into a precise, cohesive, LLM-optimized specification/prompt.
Output: One polished high-level description ready for breakdown.

Breakdown Stage

LLM-1 decomposes the specification into small, ordered, testable steps.
Format example: Phase 1 Step 1a to Phase n Step nc
Each step is focused, incremental, and designed to minimize hallucinations/errors.

Implementation and Verification Loop

You orchestrate in your editor (VS Code, etc.) using two LLM instances:

  • LLM-1 for oversight, analysis, correction planning (usually stronger model)
  • LLM-2 for code generation / application (e.g. Copilot, another Claude tab, extension)

Per step:

Provide primer/context to LLM-2 if needed
Send current granular prompt to LLM-2
LLM-2 generates/applies code and reports diff, changes, or output
Copy report and feed to LLM-1
LLM-1 reviews: correct? complete? regressions introduced?
If issues, LLM-1 writes targeted correction prompt
Send correction to LLM-2 and repeat until LLM-1 approves
Manual Validation Stage

You manually test the changes in your real environment:
Run the code, exercise features, check edge cases, observe behavior/logs.
Document results in detail: what passes, what fails, unexpected outputs, screenshots if helpful.

↓ (feed results back)
Feedback and Iteration Stage

Share full test report with both LLM-1 and LLM-2.
LLM-1 analyzes and suggests fixes, refinements, or new steps.
Loop back to Implementation stage (or earlier) until the feature is correct and stable.
Proceed to next phase/step or mark complete.

↻ full cycle per major feature/component
End State

Feature complete: implemented via verified LLM generations,
cross-checked by multiple models, battle-tested manually.
Ready for commit, integration, or deployment.
Repeat process for next task.

Why this approach?

This method reduces LLM hallucinations and low-quality code by:

Workflow designed for reliability on non-trivial coding projects.
Adapt LLM-1/LLM-2 roles to your preferred models and tools.