A developer is architecting a GitHub Copilot agent that will refactor a large codebase. The agent must first determine what changes are needed before making any modifications. Which architectural approach best separates planning from execution?
Select an answer to reveal the explanation.
Short Explanation and Infographic
An architect draws blueprints before the crew pours concrete — you don't mix those two activities. Separating planning from execution creates a natural checkpoint where humans or automated validators can review the plan before any irreversible work begins.
Full explanation below image
Full Explanation
Separating planning from execution is a core principle in agentic AI architecture. The planning phase produces an inspectable artifact — a structured document, JSON plan, or markdown checklist — that describes what the agent intends to do and why. The execution phase then consumes this artifact as its instruction set.
Why C is correct: This two-phase design creates a hard boundary between reasoning (which is cheap and reversible) and action (which may be expensive and irreversible). The planning artifact can be reviewed by humans, validated by automated checks, or stored for audit purposes. It also enables rollback: if execution goes wrong, the plan artifact shows exactly what was attempted.
Why A is wrong: Interleaving planning and execution blurs the boundary between thought and action. The agent may start executing before its plan is complete, leading to inconsistent or conflicting changes.
Why B is wrong: Combining reasoning and action in a single prompt reduces auditability and makes it difficult to insert human review or automated validation between the two phases. It also makes debugging harder.
Why D is wrong: While modern LLMs can perform both tasks, allowing them to do so without architectural separation removes critical control points. Autonomous planning-and-execution without a checkpoint is a design that accepts unnecessary risk.