Skip to content

Latest commit

 

History

History
73 lines (57 loc) · 5.96 KB

File metadata and controls

73 lines (57 loc) · 5.96 KB

Module 06 — Summary

Key takeaways from Module 06: Agents and Role Specialization. Read this after the module; use it as your quick reference afterwards.


Key Concepts

  • Agent mode is the only mode with tool calls, multiple turns, and a working loop across files — and the most expensive mode to run incorrectly. It is correct only when all three conditions hold: multi-file/tool task, output not determinable in one turn, named deliverable with an exit condition.
  • An agent persona applies Module 05's 4 design principles to a role, plus one critical addition: an exit condition. A persona without one runs until the context window fills and output degrades.
  • Persona anatomy is exactly 4 fields: purpose, constraints, tool permissions, handoff criteria. A missing field makes the session unpredictable.
  • The course ships a 10-role reference library in agents/. Study and adapt it — you author your own personas in the capstone, using templates/agent-definition-template.md.
  • Roles that evaluate (Planner, Code Reviewer, Security Reviewer) never write to source files; implementation roles do. Evaluation produces text; implementation produces code.
  • A session is a bounded execution loop with four phases — initialization → execution → completion → handoff — and context fills in one direction only.
  • Higher context load means smaller scope: Security Reviewer, Solution Architect, and Performance Optimizer sessions must be scoped to one function or one small module.

Operational Rules

  1. Open every session with the initialization prompt pattern: role, purpose, scope, constraints, tool permissions, exit condition — set at initialization, never mid-session.
  2. All 4 anatomy fields, always. Apply the completeness test: what does it produce, what may it not do, which tools can it use, how do I know it's done.
  3. Permission discipline: every ✅ must be load-bearing for the deliverable; evaluation roles get ❌ Edit — a reviewer that can edit is not a reviewer.
  4. One role per session — one scoped objective, ≤ 45 minutes of active turns. End the session the moment the deliverable exists.
  5. Every session names an exit condition and a completion signal; never continue past it just because the session still responds coherently.
  6. Hand off with the 3-part prompt — Summary, Objective, Carry-forward — and always reference .github/copilot-instructions.md in the carry-forward.
  7. Pass committed file paths between sessions, not pasted output: the next role needs the task and its acceptance criterion, not the previous role's reasoning.
  8. Try auto model selection first; escalate to frontier only when multi-step causal reasoning demonstrably fails.

Mistakes to Avoid

  • Opening an agent session for a task a structured Ask prompt handles (5–15× the context for the same result).
  • "Act as a senior developer" personas — no anatomy, no exit condition, no scope.
  • Running Planner + Implementer + Reviewer in one session (context pollution).
  • Granting Edit access to evaluation roles, or any tool "just in case."
  • Duplicating instruction-file content in the init prompt instead of referencing it.
  • Fighting session drift with more instructions instead of closing and re-initializing.
  • Pinning a frontier model for every agent session.

Quick Reference

Role Scope Model tier
Planner / Analyst Feature / epic Auto
Solution Architect Module / system Frontier
Implementer / Developer Function / module Auto (frontier for complex algorithms)
Refactoring Specialist File / module Auto
Code Reviewer PR / module Auto
Security Reviewer Function / file Frontier
Test Engineer Function / module Auto
Documentation Writer File / module Auto
Performance Optimizer Function / module Frontier
DevOps / Release Assistant Repo / pipeline Auto

Agent-mode test: multi-file or tools? · multi-turn? · named deliverable + exit condition? All three yes → Agent; otherwise Ask, Plan, or Inline.

Handoff prompt: Summary → Objective → Carry-forward. Reference structures for the common transitions: agents/handoff-prompts.md.

Self-Check

Before moving to Module 07, confirm:

  • I can state the 3 conditions that make Agent mode the correct choice over Ask or Plan
  • I apply the cost test — "could a structured Ask prompt produce the same result?" — before opening any agent session
  • I can name all 4 anatomy fields and pass the completeness test on any persona I read
  • I can name all 10 roles and state each one's primary output
  • I know which roles have write access and why evaluation roles are always read-only
  • I can fill in the permissions matrix for Planner and Code Reviewer without referencing the table, and justify every ❌
  • I can state the 3 parts of a handoff prompt and write a Planner → Implementer handoff without a template
  • I can name all 3 failure modes and identify which one is operating from a session description, quoting the evidence
  • I know the session discipline rule — one role, one scoped objective, ≤ 45 minutes — and the 4 stop signals
  • I know which roles justify a frontier model — Security Reviewer, and sometimes Solution Architect and Performance Optimizer — and why the rest run on auto
  • I have read at least three definitions in agents/ and can adapt one to my own project without breaking the 4-field anatomy

Module 07: Multi-Agent Workflows