QuestionQ48

Agentic Architecture & Orchestration

You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It relies on the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers.

Your code review assistant must analyze pull requests and provide feedback on three aspects:

  • Code style compliance
  • Potential security issues
  • Documentation completeness

Each aspect requires reading files, running analysis tools, and generating a report section. The review process follows this same three-step workflow for every PR.

Which task decomposition pattern is most appropriate for this workflow?

Explanation

This workflow always performs the same three review aspects in the same fixed order for every pull request, with each aspect's analysis (read files, run tools, generate a section) proceeding independently before the results are merged into a final report. This is the defining characteristic of the prompt chaining pattern: decomposing a task into a fixed sequence of LLM call steps (optionally with programmatic checks between them) when the task cleanly decomposes into stable, predictable subtasks. Because the subtasks here (style, security, documentation) are known in advance and consistent across every PR, there is no need for dynamic, input-driven delegation — which is what distinguishes orchestrator-workers, where a central LLM must dynamically determine unpredictable subtasks per input. Prompt chaining also allows the output of each analysis step to be validated and then combined in a final synthesis step, matching the described workflow of separate sections that are ultimately merged into a review report.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!