Let’s analyze in detail the usage, workflow, and applicable scenarios of the core command <span>/multi-agent-workflow</span> in the <span>Claude-Code-Multi-Agent</span> project.
<span>/multi-agent-workflow</span> Core Overview
<span>/multi-agent-workflow</span> is the most powerful and complex command in this ecosystem. It is designed to handle large, complex projects requiring deep collaboration among multiple domain experts, such as:
- Building a complete full-stack application from scratch
- Large-scale refactoring of existing major projects or adding core modules
- Tasks involving complex business logic, multiple technology stacks, and strict quality requirements
It is no longer a simple “input-output” model, but a coordinated, intelligent, multi-layered agent team collaboration process led by a “chief coordinator”.
Detailed Usage and Command Format
1. Basic Command Syntax
This command is usually followed by a function name or specification file path.
- Usage One (most common): Start based on the generated Kiro specification file
/multi-agent-workflow [kiro/specs/your_project_spec_file.md] <span>[</span>and<span>]</span>are not literal but indicate that you need to replace the content within. In actual use, you typically copy and paste the filename generated by the<span>/kiro:spec</span>command from the<span>kiro/specs/</span>directory.- Example: Suppose you previously ran
<span>/kiro:spec "I want to create an online Markdown note application"</span>, and the system generated a file named<span>kiro/specs/markdown_note_app.md</span>. To start the advanced workflow, you would enter:/multi-agent-workflow [kiro/specs/markdown_note_app.md] - Usage Two: Directly specify the function name (less common)
/multi-agent-workflow <your_complex_project_name> - In this case, the system will attempt to automatically find or create the relevant specifications in the background, but it is not as direct and controllable as using an existing specification file.
2. Workflow Details (Three-Layer Agent Architecture)
When you execute <span>/multi-agent-workflow</span>, a sophisticated automated process is initiated:First Layer: Chief Coordinator (<span>spec-orchestrator</span>)
- Take over the task: The
<span>spec-orchestrator</span>agent is first activated as the project’s “chief coordinator.” - Analyze the blueprint: It will carefully read and analyze the provided
<span>kiro/specs/xxx.md</span>file to fully understand the project requirements, architectural design, technology stack, and task list. - Intelligent team formation: This is the most critical step. The chief coordinator will intelligently select and assemble the most suitable “expert team” from over 100 specialized agents based on project needs.
- Backend:
<span>nodejs-pro</span>,<span>express-expert</span>,<span>database-admin</span>(if a database is involved) - Frontend:
<span>react-nextjs-expert</span>,<span>tailwind-css-expert</span> - Architecture:
<span>backend-architect</span>,<span>api-architect</span> - Testing:
<span>test-automator</span>,<span>api-tester</span> - Project Management:
<span>spec-planner</span>,<span>spec-task-reviewer</span>
- For example, to build a Markdown full-stack application, it might assemble a team with the following roles:
Second Layer: Nine Specialist Supervisors (The 9 Specialists)Under the chief coordinator are 9 core specialist supervisor agents (such as <span>spec-architect</span>, <span>spec-developer</span>, <span>spec-tester</span>, etc.). They are each responsible for a domain, receiving instructions from the chief coordinator and managing the specific execution agents in the third layer.Third Layer: 100+ Specialized Agents (The 100+ Agents)This is the “engineer” layer that does the actual work. They receive very specific atomic tasks from the supervisor agents (e.g., “create User model,” “write login API,” “implement Markdown editor component”) and perform coding, testing, debugging, and other operations.Execution and Automation Hooks (Hook-Driven Automation)Throughout the process, the Hook system continuously monitors the workflow:
- When an agent completes editing a file, the Hook may trigger automated tests or code quality checks.
- When a sub-agent completes a task, the Hook may trigger
<span>git add & git commit</span>, automatically committing code and recording work progress. - These automated operations ensure the coherence, traceability, and reduction of manual intervention throughout the development process.
Final DeliveryThe entire workflow will continue running until all tasks defined in the specification file are completed and pass all validations (testing, code review, etc.). Ultimately, you will receive a fully operational project or module, along with a detailed completion report.
Comparison with <span>/agent-workflow</span>
To help you better understand when to use it, here is a comparison table:
| Feature | <span>/agent-workflow</span> (Intermediate Workflow) |
<span>/multi-agent-workflow</span> (Advanced Workflow) |
|---|---|---|
| Complexity | Medium | Very High |
| Typical Scenarios | Add a functional module, write a complex utility function | Build a complete application, large refactoring, projects involving multiple technology stacks |
| Architecture | Linear pipeline: A -> B -> C -> D | Intelligently coordinated three-layer architecture: Chief Coordinator -> Specialist Supervisors -> Professional Teams |
| Agent Selection | A predefined set of agents | Dynamic, intelligent team formation based on project needs |
| Degree of Automation | Medium, requires more user context management | Very High, Hook system automates git, testing, task handover |
| Token Consumption | Relatively low | Very High (project mentions may require $10+) |
| User Control | More mid-process interactions and decisions | More inclined towards “fully automated,” running based on prior specification files |
Summary and Usage Recommendations
In summary:<span>/multi-agent-workflow</span> is the “autopilot” mode you activate after having a detailed project blueprint (Kiro Spec), allowing the AI agent team to automatically turn the blueprint into reality.Usage Process Recommendations:
- Planning Phase: First, use
<span>/kiro:spec "My complex project idea"</span>to generate detailed requirements, design, and task planning documents (<span>kiro/specs/xxx.md</span>). - Review and Adjust: (Key Step) Open the generated
<span>.md</span>file and review whether the AI-generated plan meets your expectations. You can manually edit this file for fine-tuning. - Execution Phase: When you are satisfied with the blueprint, use
<span>/multi-agent-workflow [kiro/specs/your_project_spec_file.md]</span>to initiate this powerful automated workflow. - Supervision and Cost Control: Due to high token consumption, it is recommended to monitor progress during operation and ensure reasonable API usage limits are set.
Essentially, <span>/multi-agent-workflow</span> represents the ultimate embodiment of the project’s “Context Engineering” concept: providing AI with an exceptionally complete contextual environment (detailed specifications + large agent library + automated hooks), enabling it to efficiently and reliably deliver complex software like a human team.