Skip to content

Latest commit

 

History

History
67 lines (50 loc) · 5.15 KB

File metadata and controls

67 lines (50 loc) · 5.15 KB

Module 07 — Summary

Key takeaways from Module 07: Multi-Agent Workflows. Read this after the module; use it as your quick reference afterwards.


Key Concepts

  • A multi-agent workflow is an ordered sequence of bounded sessions: each role produces exactly one named, committed artifact and hands off with the 3-part prompt from Module 06.
  • The context window resets at every role boundary — that reset is the design, not a limitation. Planner output does not occupy the Implementer's context.
  • A well-formed sub-task has 3 properties: bounded scope (named files), single acceptance criterion, no compound steps. If it needs more than one role, it is too large.
  • Three patterns cover ~90% of scenarios: Feature Delivery (Planner → [Architect] → Implementer → Code Reviewer → [Test Engineer]), Bug Investigation (Analyst → Implementer → Test Engineer → Code Reviewer), Refactor and Validate (Refactoring Specialist → Test Engineer → Code Reviewer). Extend by inserting one role at the right position — do not invent new patterns.
  • The workflow file (agents/workflow-[purpose].md) is a plan written before the first session, never a transcript written after. Its 5 sections: Pattern, Problem statement, Steps, Active context, Outcome.
  • Artifact quality determines handoff quality: named and committed, self-contained, scoped, dated.

Operational Rules

  1. One role per session. End the session the moment the role's deliverable exists — never continue a Planner session into implementation.
  2. Artifacts over chat memory. Every session closes with a committed file; if output exists only in chat history, it does not exist.
  3. The 3-part handoff prompt (Summary / Objective / Carry-forward) is the only bridge between sessions — nothing else transfers reliably.
  4. State the active instruction file path explicitly in every initialization prompt; copy key constraints verbatim from the workflow file's ## Active context.
  5. Write the workflow file before opening any session; record deviations in ## Outcome instead of rewriting the plan mid-run.
  6. Every session has an exit condition; stop the Planner as soon as the sub-task list is complete.
  7. Stop rule for wrong hypotheses: if the Implementer cannot reproduce the bug from the Analyst's hypothesis, close the session without modifying anything and return to the Analyst with new evidence.
  8. Escalate only Solution Architect and Security Reviewer sessions to a frontier model; auto selection handles Planner, Implementer, Code Reviewer, and Test Engineer.

Mistakes to Avoid

The 4 workflow failure modes:

  • One-session sprawl — plan, implementation, and review in a single session. End at role completion; write the handoff before opening the next session.
  • No artifact discipline — output lives only in chat history. Commit a file before closing, no exceptions.
  • Skipped review — Implementer output merges without a Code Reviewer pass. The reviewer step is required, especially when you feel confident.
  • Workflow drift — the workflow file is edited mid-run to drop inconvenient steps. Keep the original plan; log deviations in ## Outcome.

Quick Reference

Decomposition decision matrix — run every sub-task through it before assigning a session:

Question If yes If no
Does the sub-task name at least one specific file? Proceed Narrow the scope to a named file
Does the sub-task have exactly one acceptance criterion? Proceed Split or rewrite to isolate one criterion
Can one agent role complete it without switching roles? Proceed Assign the second concern to a separate session
Is the expected implementation time under 20 minutes? Proceed Split the sub-task
Does the description contain the word "and"? Split immediately Proceed

Pattern selection: root cause unknown → Bug Investigation · written spec or new capability → Feature Delivery · behavior correct but structure poor → Refactor and Validate.

Self-Check

Before moving to Module 08, confirm:

  • I can define a multi-agent workflow and state the 4 properties that distinguish it from one long session
  • I can state the 3 properties of a well-formed sub-task and rewrite a broken one
  • I can state the role sequence of all three workflow patterns without looking them up
  • I can select the correct pattern for a feature, a bug, and a refactor scenario — and justify the choice
  • I know when to add the Solution Architect step to Feature Delivery and when to skip it
  • I write the workflow file before opening any session, with all 5 required sections
  • I can explain why ## Active context is not optional
  • I can state what transfers across session boundaries and what does not
  • I commit every session's output as a file before closing the session
  • I can name the 4 workflow failure modes and the safeguard for each
  • I know what to do when an Analyst hypothesis turns out to be wrong
  • I know which roles run on auto model selection and which two justify a frontier model

Module 08: Advanced Features