One process for every non-trivial ticket. Research β Plan β Implement β Review.
This is the ResearchβPlanβImplementβReview (RPIR) flow. Use it for any ticket that touches more than one file or requires understanding existing code. For trivial one-file changes, skip straight to implement.
Multi-file changes, refactoring, new features, brownfield extraction, anything touching unfamiliar code
Single-file bug fixes, config changes, copy edits, or changes where you already know exactly what to do
Fresh AI context. Full codebase access. Goal: understand before you change.
Prompt examples:
Artefact: research.md β dense summary of architecture, dependencies, risks. (~1β2 pages)
Fresh AI context. Input: research.md only (information diet). Goal: ordered steps before touching code.
Prompt example:
Artefact: plan.md β numbered steps with verification commands + risk register
Agent mode or coding agent. Input: plan.md. Harnesses running after every change.
Prompt example:
Artefact: Working code, all tests green, handoff.md if handing off to someone else
Human + AI review. Validate against the original intent, not just the code.
Prompt example:
Artefact: Approved PR with ADC record
Before merging, verify:
research.md and plan.md committed to ADC foldercopilot-instructions.md not violated| Role | Responsibility |
|---|---|
| Developer | Runs the RPIR flow. Owns the research and plan quality. |
| Tech Lead | Reviews plan.md before implementation starts. Validates architectural decisions. |
| Reviewer | Reviews PR against plan.md intent, not just code style. Checks ADC record. |
| Agent (Copilot) | Executes within constraints. Self-corrects from harness feedback. Never approves β only suggests. |
| Command | When to Use |
|---|---|
@workspace /explain #file |
Research phase β understand a file's role |
@workspace + question |
Research phase β explore architecture |
/tests #file |
Before implementing β establish baseline coverage |
/fix #selection |
Implement phase β fix errors inline |
/doc #function |
Post-implement β document what you built |
| Agent mode (Ctrl+I) | Implement phase β multi-file changes |
Each phase gets a fresh context with only the artefacts from the previous phase. Don't carry a long conversation through all four steps β start fresh each time. This is the 'information diet' that prevents hallucination and drift.
Want to practise this flow? Try the Modernize Legacy Code lab β it walks through research, planning, and implementation on a real codebase in under 30 minutes.