The Recommended Approach

One process for every non-trivial ticket. Research β†’ Plan β†’ Implement β†’ Review.

← Back to AI-SDLC main site

🎯 The Process at a Glance

1
Research
15–30 min
Understand before change
β†’
2
Plan
15–30 min
Ordered steps
β†’
3
Implement
30–90 min
Execute with harness
β†’
4
Review
15–30 min
Validate intent

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.

Use when

Multi-file changes, refactoring, new features, brownfield extraction, anything touching unfamiliar code

Skip when

Single-file bug fixes, config changes, copy edits, or changes where you already know exactly what to do

πŸ“‹ The Four Steps

Step 1 β€” Research (15–30 min)

Fresh AI context. Full codebase access. Goal: understand before you change.

Prompt examples:

@workspace Trace the [feature] flow from UI to database. Map every file, class, and method involved. List dependencies and potential risks.
@workspace What would break if I changed [X]? List all callers and downstream effects.

Artefact: research.md β€” dense summary of architecture, dependencies, risks. (~1–2 pages)

Step 2 β€” Plan (15–30 min)

Fresh AI context. Input: research.md only (information diet). Goal: ordered steps before touching code.

Prompt example:

Given this research document, create an implementation plan with ordered steps. Each step must include: - What to change and where - A verification command (build, test, or lint) - What could go wrong

Artefact: plan.md β€” numbered steps with verification commands + risk register

Step 3 β€” Implement (30–90 min)

Agent mode or coding agent. Input: plan.md. Harnesses running after every change.

Prompt example:

Follow this plan step by step. After each change: run the build, run the tests, fix any failures before moving to the next step. Do not skip steps.

Artefact: Working code, all tests green, handoff.md if handing off to someone else

Step 4 β€” Review (15–30 min)

Human + AI review. Validate against the original intent, not just the code.

Prompt example:

Review this PR against the original plan.md. Flag any deviations, missing test coverage, or architectural concerns.

Artefact: Approved PR with ADC record

βœ… PR Checklist

Before merging, verify:

  • All tests pass (unit + E2E if applicable)
  • Build succeeds in CI
  • research.md and plan.md committed to ADC folder
  • Provenance tagged: AI-generated code marked EXTRACTED vs INFERRED
  • No secrets, credentials, or magic strings introduced
  • Copilot added as PR reviewer (comments addressed or acknowledged)
  • At least one human reviewer approved
  • Architecture constraints in copilot-instructions.md not violated

Roles & Responsibilities

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.

Quick Commands

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
⚑ Key Principle

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.

Open Lab β†’

Self-Paced Resources

πŸ”—
Build Applications with Copilot Agent Mode
Learn how to use agent mode for multi-file implementations
πŸ”—
Copilot Code Review
Interactive GitHub Skills course on code review
πŸ”—
Modernize Legacy Code with Copilot
Research and planning for brownfield extraction
πŸ”—
Customize Your Copilot Experience
Build custom agents and control copilot-instructions.md