Blog
GitHub Copilot: A Persona-Based Approach to Real-World Development

If youāve ever used GitHub Copilot for more than a quick boilerplate snippet, youāve probably felt this:Ā itās brilliant⦠until it isnāt.
One moment, it autocompletes exactly what you need. The next, itās confidently generating nonsense or doubling down on the worst coding pattern in your repo. You go fromĀ āthis is magicāĀ toĀ āI could have written this faster myselfāĀ in a heartbeat.
Hereās the problem: most of us treat Copilot like aĀ single, all-knowing assistantĀ ā a kind of coding oracle that should always ājust get it.ā But thatās not how real software teams work. In real projects, you donāt expect one developer to gather requirements, design the architecture, write every line of code, debug the tricky parts, and then review their own work. That would be a recipe for burnout (and bugs).
So why do we expect Copilot to do exactly that?
After months of experimenting I found a better way:Ā stop treating Copilot as one helper, and start treating it like a team.
Just like a real software team has product managers, architects, engineers, and reviewers, Iāve built a flow where Copilot plays these roles throughĀ personas. Combined with solidĀ repo guardrailsĀ (instructions that act like Copilotās onboarding docs), this transforms Copilot from a āwild card junior devā into a reliable partner I can actually trust in production code.

In this article, Iāll share my exact flow, from setting up repo instructions, to defining personas, to switching between them in Visual Studio Code chat modes.
š ļø Why Instructions Matter
Imagine onboarding a brand-new senior developer to your repo.
Would you just say:
āHey, hereās the codebase ā good luck!ā
Of course not. Youād spend time explaining the projectās purpose, quirks, architecture patterns, and the ālandminesā they should avoid. Without that context, even the best dev will fall into the repoās worst habits.
Thatās exactly how GitHub Copilot works, too. If you drop it into your project cold, it happily mirrors the ugliest code it can find ā and it does soĀ confidently.
Thatās whereĀ repo instructionsĀ come in. Think of them asĀ Copilotās onboarding guide.Ā Instead of guessing, Copilot gets a clear description of:
- What the project is about
- Which patterns to follow
- Which patterns to avoid
- Where things live in the repo
š My Setup:Ā copilot-instructions.md
I always start a new project by creating aĀ copilot-instructions.mdĀ file in an empty folder. This file becomes Copilotās playbook ā guardrails + quick context.
Hereās an excerpt from myĀ Teams Status ManagerĀ project:
## Project Overview
**Teams Status Manager**: Create/Edit/Delete reusable Teams status templates, apply on demand, and schedule updates.
**Stack**: .NET 9 Minimal API ⢠React (TypeScript, Vite) ⢠SQL Server ⢠Microsoft Graph SDK ⢠Quartz.NET
**Auth Flow**: SPA ā API (custom scope) ā On-Behalf-Of (OBO) ā Microsoft Graph (`Presence.ReadWrite`)
## Architecture Patterns
### Backend (.NET 9 Minimal API)
- **Endpoints**: Located in `src/backend/TeamsStatusManager.Api/Endpoints/` - separate files per feature
- **Services**: Interface/implementation pattern in `Services/` folder
- **Validation**: FluentValidation validators in `Validators/` folder
- **Jobs**: Quartz.NET jobs in `Jobs/` folder with SQL job store
- **Data**: EF Core entities in `TeamsStatusManager.Data/Entities/`
### Frontend (React + TypeScript)
- **Auth**: MSAL React in `src/auth/` with `AuthProvider.tsx` wrapper
- **Data Fetching**: TanStack Query hooks in `src/hooks/` (co-located with features)
- **Forms**: react-hook-form + zod schemas
- **Components**: Feature-based folders in `src/components/`
This file tells CopilotĀ how we build things here. Instead of randomly generating code, it aligns with the same architectural rules every teammate would follow.
ā” The Workflow
- I create theĀ
copilot-instructions.mdĀ file. - I useĀ Claude Sonnet 4Ā with theĀ
/newĀ command to scaffold the project based on these guardrails. - I then ask Copilot to generate the VS Code tasks for launching the solution.
š„ Step 2: Work Like a Team of Personas
Even with solid repo instructions, I realized I was still making the same mistake: treating Copilot like a single developer who could do everything ā gather requirements, design the solution, implement it, and then debug it.
Thatās not how real teams work. In a real project, youād have:
- A product manager clarifying requirements
- An architect designing the solution
- Engineers writing the code
- Reviewers making sure everything matches the spec
- And, of course, someone to fix things when they inevitably break
So why not work with Copilot the same way?
Thatās when I shifted to aĀ persona-based approach. Instead of one Copilot, I now have several specialized Copilot personas I can āswitch intoā depending on what stage of development Iām in.
š§āš¼ Core Personas
- Product ManagerĀ ā Gathers requirements, writes user stories, and clarifies acceptance criteria.
- Software ArchitectĀ ā Produces a technical specification (step-by-step plan, no code).
- EngineerĀ ā Implements the code following the spec.
š§ Special Personas
- Problem Solver (Mr. Wolf šŗ)Ā ā Debugs tricky issues and comes up with fixes.
- Tech Spec ReviewerĀ ā Reviews the architecture for scalability, performance, and edge cases.
- Implementation ReviewerĀ ā Reviews the actual implementation against the spec.
Each persona has its ownĀ promptĀ (Iāll share mine later in this article) and its own strengths.
š¬ Adding Chat Modes in VS Code
Now hereās the best part: you donāt have to copy-paste prompts every time you want to switch personas. Visual Studio Code lets you addĀ custom chat modesĀ so you can jump straight into āProduct Manager modeā or āMr. Wolf modeā with a single click.
Hereās how to set them up:
- Open theĀ Copilot ChatĀ panel in VS Code.
- Click theĀ ā+āĀ button next toĀ Chat Modes.
- Give your mode a clear name (e.g.,Ā Software Architect).
- Paste your persona prompt into the configuration.
- Save it.
Now, whenever you want Copilot to act as your architect, product manager, or problem solver, you just switch modes. No re-prompting. No forgetting context.
Example:
- Iām gathering requirements ā I switch toĀ Product Manager.
- Designing the system ā I switch toĀ Architect.
- Debugging a weird async issue ā I bring inĀ Mr. Wolf.
It feels less like talking to āan AIā and more like leading aĀ team of specialistsĀ inside your IDE.
āļø Step 3: The Workflow in Action
With repo instructions in place and personas ready to go, the development process feels less like prompting an AI and more like coordinating a small dev team. Each stage has its own āowner,ā and Copilot stays focused instead of drifting into random guesses.
Hereās how my workflow looks in practice:
1. Gathering Requirements (Product Manager Persona)
I start with theĀ Product Manager persona, which turns vague feature ideas into clear product requirements.
- It writesĀ user storiesĀ with acceptance criteria.
- It forces me to clarify edge cases.
- If details are missing, it asks questions like a real PM would.
For each feature, the Product Manager creates a PRD file inside the docs folder (Ā e.g.,Ā docs/save-data-prd.md)
This step keeps me from rushing into implementation before I actually know what ādoneā looks like.

2. Designing the Solution (Software Architect Persona)
Once requirements are set, I switch to theĀ Software Architect persona.
- It creates aĀ technical specification: step-by-step instructions for how the feature should be implemented.
- It doesnāt write code ā instead, it documents exactlyĀ whereĀ changes go andĀ howcomponents should interact.
- If something is unclear, it flags it for clarification.
For each feature, the Software architect creates a techspec file inside the docs folder Ā (e.g.,Ā docs/save-data-techspec.md)
This is where Copilot stops guessing and starts working from a concrete plan.

3. Implementing the Feature (Engineer Persona)
Now I bring in theĀ Engineer persona.
- It follows the technical specification step by step.
- If it skips something, I prompt it to review its own work and fill in the gaps.
- Since itās working inside the guardrails of the repo instructions + tech spec, the code aligns with my architecture from the start.
This is where the productivity gains really show: Copilot writes the code, but it does so inside the framework Iāve already defined.

4. Debugging and Testing (Special Personas)
Inevitably, something doesnāt work as expected. Thatās when I switch to theĀ special personas:
- Mr. Wolf (Problem Solver)Ā ā Like the fixer inĀ Pulp Fiction, he jumps in when something breaks. Example prompt: āThe homepage isnāt updating the userās status after login. It should show the profile photo in the header. Fix it.ā
- Tech Spec ReviewerĀ ā Double-checks the architecture before implementation.
- Looks for scalability issues, missing edge cases, or race conditions.
- Implementation ReviewerĀ ā Validates that the code matches the spec.
- Lists issues in order of severity.
- Suggests fixes without rewriting everything.
These personas save me from the endless loop of āgenerate ā test ā sigh ā tweak ā repeat.ā Instead, Copilot becomes my QA safety net.

By moving through these stages, Iām not just āasking Copilot to code.ā Iām leading a structured process where AI acts asĀ different team members with specific responsibilities.
The result? More reliable code, fewer detours, and a workflow that feels like working with a real team instead of fighting with autocomplete.

š§© Example: Teams Status Manager Project
To make this less abstract, letās walk through how I applied this flow to a real-world project:Ā Teams Status Manager.
The goal was simple on paper: Create, edit, and delete reusable Teams status templates. Apply them on demand or schedule updates automatically.
But as every developer knows, āsimple on paperā often hides a lot of moving parts. Hereās how the persona-based approach + repo instructions played out.

š Step 1: Repo Instructions
I started with theĀ copilot-instructions.md.instructions.mdĀ file.
It outlined the projectāsĀ purpose,Ā stack, andĀ architecture guardrails.
That meant Copilot knew upfront:
- Backend is .NET 9 Minimal API, not MVC.
- Validation lives in FluentValidation classes.
- Jobs use Quartz.NET with a SQL job store.
- Frontend auth flows through MSAL React.
- Data fetching happens with TanStack Query.
Without this, Copilot would have happily mixed patterns, invented new folders, or stuffed logic into the wrong places. With instructions, it already felt ātrainedā on my project.
š§āš¼ Step 2: Personas in Action
- Product Manager: Turned āstatus templates with schedulingā into user stories with acceptance criteria. For example:
- As a user, I can schedule a status change so that my Teams presence updates automatically during a meeting.
- Software Architect: Designed the flow:
- Store templates in SQL via EF Core entities.
- Use Quartz.NET jobs for scheduling.
- Trigger Microsoft GraphĀ
Presence.ReadWriteĀ calls through an OBO flow.
- Engineer: Implemented the API endpoints and React hooks following that exact plan.
- Mr. Wolf: Debugged a nasty bug where scheduled jobs werenāt firing after a server restart. Copilot eventually suggested a SQL-backed job store for Quartz.NET ā which fixed it.
- Reviewers: Double-checked the spec and code against the requirements, catching edge cases like:Ā what happens if two jobs overlap?
ā” The Result
Instead of Copilot generating āwhatever it thinks is right,ā it worked like a real dev team:
- TheĀ PM personaĀ kept requirements sharp.
- TheĀ Architect personaĀ made the design consistent.
- TheĀ Engineer personaĀ implemented without freelancing.
- Mr. Wolf + ReviewersĀ caught issues before they slipped into production.
By the end, I didnāt just have code that compiled ā I had a solution aligned with my architecture and ready for real users.
š Benefits of the Persona Approach
After months of experimenting, this persona-based approach has completely changed how I work with GitHub Copilot. Instead of āsometimes brilliant, sometimes frustrating,ā itās become a consistent partner I can trust in real-world projects.
Hereās why this works so well:
ā 1. Structure Beats Chaos
Without personas, Copilot tries to do everything at once ā requirements, design, code, debugging ā and usually cuts corners. By assigning roles, you bringĀ structureto the interaction. Copilot knows its job, just like a human teammate would.
ā 2. Repo Guardrails = Consistency
TheĀ copilot-instructions.mdĀ file is theĀ onboarding docĀ for every AI assistant that touches the repo. No matter the model, the architecture stays consistent. This reduces those āwhy is there a random utils folder now?ā moments.
ā 3. Faster Iteration, Less Frustration
Instead of wrestling with Copilot when it goes off track, you just switch personas.
- Need clarity? Switch toĀ Product Manager.
- Designing? Switch toĀ Architect.
- Debugging? Call inĀ Mr. Wolf.
This saves hours of context-switching and re-prompting.
ā 4. Built-In Quality Control
Most devs donāt ask Copilot toĀ review its own output.Ā With theĀ Tech Spec ReviewerandĀ Implementation Reviewer, you get a built-in safety net. They donāt just rubber-stamp ā they catch scalability issues, race conditions, and missed steps before they land in your code.
ā 5. Scales with Complexity
On a small feature, maybe you only need PM ā Architect ā Engineer. On a complex enterprise flow, you can bring in reviewers and problem solvers. The model scales like a team would: add more specialists as the project grows.
Takeaways
GitHub Copilot is often marketed as an āAI pair programmer,ā but if you expect it to be a single, all-knowing coding partner, youāll eventually hit the wall of frustration. The real breakthrough comes when you stop treating Copilot asĀ one assistantĀ and start treating it as aĀ team.
By combining:
- Repo instructionsĀ ā your projectās onboarding doc and guardrails
- PersonasĀ ā specialized roles for requirements, design, implementation, debugging, and review
- Chat modes in VS CodeĀ ā quick persona switching without re-prompting
ā¦Copilot transforms from a wildcard into a structured, reliable collaborator.
For me, this approach turned Copilot from āa tool I sometimes fight withā into āa dev team I lead.ā
š Donāt just copy my personas ā create your own. What roles would your Copilot team have? AĀ Security Reviewer? AĀ Performance Optimizer? AĀ Documentation Writer?
You can find all my personas in these Gists I created to share them with customers and community here: #š GitHub Copilot: A Persona-Based Approach.mdĀ
Written by

Emanuele Bartolesi
Senior Cloud Engineer
Emanuele is a Senior Cloud Engineer and long-time community contributor, passionate about helping teams succeed with cloud, DevOps, and AI. Microsoft MVP for over 12 years, a GitHub Star for 4 years and GitHub Star of the Year 2023. Emanuele regularly blogs and speaks at international conferences, sharing his experience on GitHub, Azure, and modern software development practices. He is also active in the open-source community, creating tools to improve developer productivity and governance. Outside of work, he enjoys playing guitar, traveling, and pushing his limits through endurance sports like triathlons and marathons.
Contact