Blog

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

Emanuele Bartolesi

Emanuele Bartolesi

September 3, 2025
11 minutes
ā€Œ

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

  1. I create theĀ copilot-instructions.mdĀ file.
  2. I useĀ Claude Sonnet 4Ā with theĀ /newĀ command to scaffold the project based on these guardrails.
  3. 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:

  1. Open theĀ Copilot ChatĀ panel in VS Code.
  2. Click theĀ ā€œ+ā€Ā button next toĀ Chat Modes.
  3. Give your mode a clear name (e.g.,Ā Software Architect).
  4. Paste your persona prompt into the configuration.
  5. 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:
    1. Store templates in SQL via EF Core entities.
    2. Use Quartz.NET jobs for scheduling.
    3. 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

Let’s discuss how we can support your journey.

ā€Œ
ā€Œ
ā€Œ
ā€Œ
ā€Œ
ā€Œ
ā€Œ
ā€Œ
ā€Œ