From Single Agents to Coordinated Pipelines

You've built a foundation for working with Claude on complex projects: providing persistent context (Lesson 1), understanding subagent delegation (Lesson 2), creating custom subagents (Lesson 3), and running asynchronous subagent workflows (Lesson 4). Now it's time to coordinate multiple subagents into workflows.

Real feature development rarely involves just one type of work. Building a complete feature requires exploration, design, testing, implementation, documentation, and verification. Trying to handle all this in a single conversation leads to context overload and inconsistent results.

This is where pipeline orchestration becomes essential. Instead of asking Claude to build a dark mode feature in one request, you'll break work into stages and coordinate specialized subagents for each stage. In this lesson, you'll build a dark mode theme switcher for Docusaurus using a 6-step pipeline.

The Feature Development Pipeline Pattern

The six stages are Analysis, Design, Tests, Implementation, Documentation, and Verification. This ordering follows test-driven development: understand the problem, plan the solution, write tests that define success, implement to pass those tests, document the work, and verify everything works together.

Analysis with the Explore subagent scans the codebase to identify relevant files, existing conventions, and integration points.

Design with a General-Purpose subagent plans component structure, state management, and user experience.

Tests are written before implementation using custom subagents that understand your testing frameworks.

Implementation builds the feature guided by the tests you wrote, using the General-Purpose subagent.

Documentation happens immediately after implementation with a specialized subagent to ensure accuracy.

Verification runs tests and build checks to confirm everything works without breaking existing functionality.

Mapping Subagents to Pipeline Stages

Each stage needs the right subagent:

  • Analysis: Explore subagent for fast codebase search
  • Design: General-Purpose subagent for architectural reasoning
  • Tests: plugin-architecture subagent that understands your testing framework
  • Implementation: General-Purpose subagent for flexible problem-solving
  • Documentation: docs-quality-reviewer subagent for consistent documentation
  • Verification: Direct bash commands to run tests and builds

For our dark mode feature: Explore analyzes the existing theme system, General-Purpose designs the ThemeToggle component, plugin-architecture writes tests, General-Purpose implements the component, docs-quality-reviewer creates documentation, and bash commands verify success.

Writing the Pipeline Prompt

Communicate multi-step workflows with explicit stage definitions:

Label each step with a number, name, and subagent type. Include brief descriptions of deliverables. The phrase Execute each step sequentially ensures proper handoffs between stages.

Reading Pipeline Execution Output

As Claude executes your pipeline, terminal output shows progress. While exact formatting may vary, you'll see patterns indicating:

Stage transitions: Clear markers showing when each step begins (e.g., "STEP 1: Analysis", "STEP 2: Design")

Subagent delegation: Evidence of which subagent is handling each stage (through delegation indicators, task notation, or explicit mentions)

Work completion: Indicators showing when each stage finishes (completion markers, results presentation, or transition to next stage)

File operations: Records of files created or modified at each stage

Verification results: Output from test runs and build commands showing success or failure

Even though each subagent works in an isolated context, the main agent acts as the memory hub for the pipeline. It receives the summary from one stage, keeps that distilled handoff in the main conversation, and passes the relevant parts forward in the instructions for the next stage. That means Step 2 does not inherit Step 1's full private context window—it works from the summarized results the main agent carries forward.

Focus on recognizing that:

  • Each stage completes before the next begins
  • The right type of subagent handles each stage
  • Files are created in appropriate locations
  • Tests pass and builds succeed
  • Results flow logically from analysis through implementation to verification
Optimizing with Parallel Execution

Some pipeline stages can run simultaneously if they don't depend on each other's output. In our pipeline, the Documentation template could be created while tests are being written — both need the design specification but not each other's output.

Modified pipeline with parallelization:

The phrase Execute these tasks simultaneously signals parallel execution. If tests take 2 minutes and docs take 1.5 minutes, parallel execution takes only 2 minutes versus 3.5 minutes sequentially.

Use parallelization conservatively. It consumes more resources and is harder to debug. Keep it for obvious wins where tasks are clearly independent.

Summary

You've completed the Advanced Project Configuration & Subagents course:

The dark mode example demonstrated a complete workflow: analysis, design, tests, implementation, documentation, and verification — all coordinated through clear stage definitions and subagent assignments.

As you continue, focus on breaking complex features into clear stages that map to appropriate subagents. Start with sequential pipelines, then add parallelization where it provides substantial benefits. The clarity of your prompts determines pipeline quality.

Congratulations on completing the course. Practice these techniques on your projects, experiment with different pipeline structures, and refine your custom subagents as you discover patterns specific to your work.

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal