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 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.
Each stage needs the right subagent:
Analysis: Explore subagent for fast codebase searchDesign: General-Purpose subagent for architectural reasoningTests: plugin-architecture subagent that understands your testing frameworkImplementation: General-Purpose subagent for flexible problem-solvingDocumentation: docs-quality-reviewer subagent for consistent documentationVerification: Directbashcommands 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.
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.
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
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.
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.
