Multi-Agent Role Switching

Multi-stage role switching (general context): at each stage, the system prompt and toolset switch – effectively a new agent, but with full history. The requirements analyst asks questions and does not write code → the engineer implements → the reviewer checks critically. Triggers for transition – calls to special tools (completerequirementsanalysis, submitforreview), rollback is supported in case of problems. Benefit: each “identity” is refined independently, stage boundaries – quality control points; the agent focuses on the current task, without being distracted by inherited history. A variation – role switching between subject areas via transfertoagent.

Related: [Common and Separate Context], [Prompt Engineering]