Darsh DaveAI Product Manager
Back to Darsh Dave

GitHub Copilot

Case study by Darsh Dave

Why Developers Still Don’t Trust AI Code

GitHub Copilot is an AI coding assistant built into the developer workflow. It helps write code, complete functions, explain logic, and suggest implementation paths directly inside the editor.

3D figure of Darsh Dave beside the case study.
Industry
Developer Tools · Generative AI · Software Engineering Productivity
Product Stage
Mature enterprise-grade AI product, already embedded across developer workflows including IDEs, GitHub, CLI, mobile, and agentic development surfaces.
Business Context
GitHub Copilot has moved beyond simple autocomplete. It now supports code suggestions, chat assistance, code explanation, test generation, pull request support, code review, CLI assistance, and agent-driven software development workflows.
GitHub Copilot interface visual
GitHub Copilot interface
Jump to section
  1. The vision
  2. Product users
  3. Finalised user persona
  4. User journey
  5. Understanding the trust gap
  6. Prioritisation of pain points
  7. Solution ideas
  8. Prioritise moonshot ideas
  9. Solution direction
  10. MVP scope
  11. Success metrics
  12. Risks, guardrails & constraints
  13. Final verdicts

The Vision

In VS Code today, from the official docs

GitHub Copilot Chat in Visual Studio Code. The developer asked Copilot to add a contacts page and include it in the navigation; Copilot reports it created src/routes/contacts/+page.svelte with a contact form and updated Header.svelte to link to /contacts, shows 2 files changed (+72 −2) with Keep and Undo buttons, and lists other chat sessions in a side panel.

Intent to code

The developer states the intent in Copilot Chat, and Copilot makes the change, summarises it and waits for Keep or Undo.

Inline Copilot menu in Visual Studio Code over a selected factorial function, offering a “Describe how to change this” box, Add Selection to Chat, Explain and Review.

Confidence check

Inline chat offers Explain and Review on the selected code before the developer owns the change.

A Copilot edit in Visual Studio Code shown as a diff: the loop-based factorial lines are highlighted for removal and replaced by a recursive return n * this.factorial(n - 1), with a “Done, 1 change” bar and Keep and Undo buttons.

Safe acceptance

Keep or Undo is the explicit acceptance step after a Copilot edit, with the diff in view.

Concept visuals from the original study

Concept visual: a chat prompt asking for a function that validates an email address and returns a boolean, turned into a generated isValidEmail function. Titled Intent to Code.
Intent to code
Concept visual: an analyze.py file beside a Confidence Check panel rating correctness high, security high and maintainability medium, with 87% overall confidence. Titled Confidence Check.
Confidence check
Concept visual: a flow from AI-generated code to reviewed and approved, safety checks passed, and deployed to repository or production. Titled Safe Acceptance.
Safe acceptance

Product Users

Our users are technically advanced and experienced, working inside complex engineering systems where speed matters, but code quality, security, and confidence matter more.

Arjun Mehta persona photo

Arjun Mehta

Senior Backend Engineer

Profession, goals and pain point
Profession:
Senior Backend Engineer
Occupation:
Builds and maintains backend services, APIs, database logic, and production systems for a SaaS company.
Experience:
7+ years in software engineering, strong in system design, code review, security practices, and production debugging.
Work Context:
Works on high-impact backend services where small bugs can affect payments, authentication, or customer data. Uses Copilot to speed up boilerplate, API handlers, tests, and refactoring tasks.
Behaviour:
Accepts simple Copilot suggestions quickly, but manually reviews complex suggestions line by line before committing them.
Goal:
Ship reliable code faster without compromising architecture, security, or maintainability.
Pain Point:
Copilot helps him move faster, but he does not always know whether generated code is safe enough to trust.
Priya Shah persona photo

Priya Shah

Junior Full-Stack Developer

Profession, goals and pain point
Profession:
Junior Full-Stack Developer
Occupation:
Works on frontend components, API integrations, bug fixes, and small product features.
Experience:
1.5 years in software development, still learning architecture, testing depth, and code review standards.
Work Context:
Uses Copilot heavily to understand unfamiliar code, generate implementation drafts, and move faster across frontend and backend tasks.
Behaviour:
Often accepts Copilot suggestions when they look correct, but struggles to judge hidden risks or incomplete logic.
Goal:
Learn faster, complete tasks independently, and build confidence in production code.
Pain Point:
Struggles to judge whether AI-generated code is safe to use without asking a senior engineer.
Miguel Torres persona photo

Miguel Torres

Application Security Engineer

Profession, goals and pain point
Profession:
Application Security Engineer
Occupation:
Reviews code for vulnerabilities, insecure patterns, authentication issues, dependency risks, and compliance concerns.
Experience:
6+ years in cybersecurity and application security, experienced with secure coding standards, threat modelling, and vulnerability review.
Work Context:
Supports multiple engineering teams and reviews pull requests before release. Concerned AI-generated code may introduce insecure defaults or weak validation.
Behaviour:
Does not reject AI coding tools, but wants developers to validate security before code reaches review.
Goal:
Reduce security risk without becoming a bottleneck for engineering teams.
Pain Point:
Copilot-generated code may look functional but still contain subtle security issues.
Neha Rao persona photo

Neha Rao

Engineering Manager

Profession, goals and pain point
Profession:
Engineering Manager
Occupation:
Manages backend, frontend, and full-stack developers responsible for product delivery.
Experience:
10+ years in engineering, including 4 years managing teams, with strong focus on velocity, quality, and delivery predictability.
Work Context:
Encourages Copilot usage to increase productivity, but owns code quality, incident reduction, and engineering standards.
Behaviour:
Tracks delivery speed, code review load, production bugs, and developer adoption of AI tools.
Goal:
Increase engineering velocity while maintaining code quality, security, and team learning.
Pain Point:
Blind acceptance of AI-generated code may increase review burden, bugs, inconsistent patterns, or production incidents.

Finalised User Persona

Final selected persona Arjun Mehta
Arjun Mehta

Arjun Mehta is the primary persona.

Arjun is the best starting persona because he sits at the exact decision point where GitHub Copilot's value and risk meet. He uses Copilot to move faster, but he is also responsible for accepting, modifying, or rejecting AI-generated code before it becomes part of the real codebase.

Frequent Copilot usage

He uses Copilot for API logic, backend services, refactoring, tests, and repetitive implementation work.

Owns the acceptance decision

He is responsible for the moment where AI-generated code becomes real production-facing code.

High-impact mistakes

Backend code touches authentication, payments, databases, APIs, permissions, and customer data.

Clear trust gap

Even with strong technical judgment, verifying correctness, security, edge cases, architecture fit, and maintainability takes time.

Balances speed with quality

He cannot sacrifice production stability just to gain AI velocity.

Solving for him scales

Helping Arjun also supports junior developers, security engineers, and engineering managers.

User Journey

The current Copilot journey moves quickly from intent to generated code, but confidence drops at the moment of acceptance. The real friction is not writing code, it is deciding whether the generated code is safe enough to own.

User journey
  1. Stage 1

    Start with coding intent

    Action
    Arjun begins a backend task inside the IDE with a clear implementation goal.
    Thinking
    He wants to move fast without leaving his existing workflow.
    Pain Point
    The intent is clear, but repository-specific constraints and risk are still mostly in his head.
    Opportunity
    Capture intent, surrounding code context, and acceptance criteria early.
  2. Stage 2

    Copilot generates code

    Action
    Copilot returns a plausible function, refactor, test, or implementation path.
    Thinking
    The code looks useful and saves time immediately.
    Pain Point
    The output can look polished even when assumptions, edge cases, or security gaps are hidden.
    Opportunity
    Pair generation with an explanation of assumptions and what changed.
  3. Stage 3

    Scan for fit

    Action
    Arjun reads the output quickly and checks whether it matches the task direction.
    Thinking
    It may be right, but he needs proof before owning it.
    Pain Point
    Correctness, maintainability, security, and architecture fit are not visible at a glance.
    Opportunity
    Surface confidence signals across logic, tests, security, and repository fit.
  4. Stage 4

    Verify manually

    Action
    He checks edge cases, failure handling, tests, security impact, and codebase conventions.
    Thinking
    This is where the speed benefit starts leaking away.
    Pain Point
    Verification depends on manual effort, memory, and context switching.
    Opportunity
    Give a guided review checklist inside the same coding flow.
  5. Stage 5

    Accept, edit, or reject

    Action
    Arjun decides whether to accept the code, modify it heavily, ask Copilot again, or discard it.
    Thinking
    Accepting code means inheriting its risks and maintenance cost.
    Pain Point
    The final decision still feels fragile when confidence is low.
    Opportunity
    Turn acceptance into an informed decision, not a leap of faith.

Understanding the Trust GapIt was deciding whether the code was safe to accept.

Pain point 1

Hard to understand code quickly

Developers can read the generated output, but they do not always understand the reasoning, tradeoffs, or assumptions behind it.

Creates. Extra mental effort before acceptance.

Pain point 2

Hard to trust generated code

Even when the code looks correct, developers worry about hidden bugs, security issues, edge cases, and performance problems.

Creates. Hesitation at the exact moment Copilot should feel useful.

Pain point 3

Hard to know what is missing

Generated code may omit tests, validation, error handling, and business-rule coverage that deeper review would normally catch.

Creates. Uncertainty around completeness.

Pain point 4

Manual validation breaks flow

The developer has to stop writing and switch into verification mode, weakening the productivity benefit Copilot initially created.

Creates. A workflow break between generation and acceptance.

Pain point 5

Acceptance lacks confidence

Copilot provides an answer, but not always a structured way to judge whether that answer is ready for real use.

Creates. A leap of faith instead of an informed decision.

Prioritisation of Pain Points

Each pain point was scored by user impact, frequency in the workflow, and product leverage. The goal was to identify the friction that matters most at the moment Copilot output becomes real code.

Pain-point scores
Pain PointUser ImpactFrequencyProduct LeverageTotal
Hard to understand code quickly Reasoning and assumptions are unclear.44412
Hard to trust generated code Hidden bugs, security issues, and edge cases create hesitation.55515
Hard to know what is missing Tests, validation, and business rules may be omitted.44513
Manual validation breaks flow Developers leave creation mode and switch into review mode.45413
Acceptance lacks confidence There is no clear signal that code is ready for real use.54514
Prioritised Pain Point

Developers hesitate to trust AI-generated code because Copilot does not provide enough confidence signals before acceptance.

Priority score

  • Trust generated code15
  • Acceptance confidence14
  • Missing coverage13
  • Manual validation13
  • Understand quickly12

Solution Ideas

Solutions are divided into OK, Best, and Moonshot categories. OK solutions are safe and expected. Best solutions balance feasibility and impact. Moonshot solutions can redefine trusted AI-assisted development.

Idea group 1

OK Solutions

  1. Code Explanation Panel Copilot adds a short explanation beside major code suggestions: what the code does, affected module, why the approach was suggested, and assumptions made.
  2. Test Suggestion Prompt After generating code, Copilot asks whether the user wants relevant unit tests and edge-case tests.
  3. Security Reminder Badge For auth, payments, database queries, permissions, and input handling, Copilot shows a security-sensitive warning badge.
  4. Accept / Edit / Explain Actions Each suggestion includes quick actions: Accept, Edit, Explain, Generate Tests.

Idea group 2

Best Solutions

  1. Copilot Confidence Score Each major suggestion gets a confidence signal based on correctness, repo pattern match, security risk, edge-case coverage, tests, and dependency impact.
  2. Repository Fit Check Copilot checks whether generated code matches naming conventions, folder structure, helpers, service patterns, error handling, and query patterns.
  3. AI Code Review Before Acceptance Before accepting a complex suggestion, Copilot runs a lightweight review inside the IDE for bugs, validations, security, performance, tests, and assumptions.
  4. PR Verification Summary When Copilot-assisted code enters a PR, GitHub adds a summary of AI-generated portions, manual edits, tests added, risks checked, and unresolved concerns.

Idea group 3

Moonshot Solutions

  1. Copilot Confidence Layer A full trust and verification layer before acceptance: what code does, why suggested, confidence signal, security risks, missing tests, edge cases, repo fit, and recommended fixes.
  2. Autonomous AI Verification Agent A background agent scans generated code, runs tests, checks linting, compares repo patterns, detects risky logic, and recommends safer alternatives.
  3. Safe Accept Mode Production-sensitive code gets safer acceptance options: Accept as Draft, Accept after Tests, Accept after Security Check, Accept with Review Note.
  4. Team-Level Copilot Trust Dashboard Managers and security teams see acceptance rate, rejected suggestions, bug rate, security warnings, test coverage impact, review impact, and developer trust trend.

Prioritise Moonshot Ideas

Framework used: Weighted Decision Matrix. Moonshot ideas have high uncertainty, so they are evaluated on strategic value, user impact, feasibility, risk control, and business value.

Moonshot scores
Moonshot SolutionUser ImpactStrategic FitFeasibilityRisk ControlBusiness ValueWeighted Score
Copilot Confidence Layer Full trust and verification layer before acceptance.554454.65 / 5
Autonomous AI Verification Agent Background verification agent for generated code.553354.25 / 5
Safe Accept Mode Safer acceptance options for production-sensitive code.444544.15 / 5
Team-Level Copilot Trust Dashboard Enterprise trust dashboard for teams and security leaders.443453.90 / 5
Finalised Idea

Copilot Confidence Layer

Final prioritised moonshot: Copilot Confidence Layer. It directly solves the highest-priority pain point: developers need a clear confidence signal before accepting AI-generated code. It also fits Copilot's strategic direction from AI that writes code to AI that helps developers ship trusted code.

Moonshot score

  • Copilot Confidence Layer4.65
  • AI Verification Agent4.25
  • Safe Accept Mode4.15
  • Team Trust Dashboard3.90

Solution Direction

Instead of only returning code, Copilot would also help developers evaluate that code through structured verification support.

Workflow Change: Before vs After

Before

Current flow: confidence comes too late

Current Copilot workflow before the confidence layer, in seven steps: task trigger, Copilot suggestion, manual review, accept or modify, write or update tests, PR and code review, rework and fix. Every check is manual, with no clear signal of correctness, so problems are discovered late: more rework, slower delivery and less trust in AI-generated code.Enlarge
After

New flow: confidence before acceptance

Proposed Copilot workflow after adding the confidence layer, in seven steps: task trigger, Copilot suggestion, confidence layer where AI verifies the suggestion across key dimensions, accept with confidence, tests with auto suggestions, PR with context, faster review and merge. Issues are caught early, with less rework, faster delivery and higher trust in AI.Enlarge

The solution turns Copilot from a suggestion engine into a more trustworthy implementation partner.

Step 1

Explain intent

Summarise what the generated code is doing, why it is structured that way, and which assumptions it made from context.

Step 2

Surface risk

Highlight likely concerns such as missing validation, security issues, edge cases, dependency assumptions, or possible performance risks.

Step 3

Recommend verification

Suggest what the developer should review next: tests to add, scenarios to validate, repository conventions to check, or business logic gaps to inspect.

  1. Input layer — Context enters the system. Developer prompt, task intent, current file context, repository patterns, conventions, and related code references.
  2. Generation layer — Code is drafted. Copilot generates the initial suggestion and adapts the output to local project structure and coding conventions.
  3. Confidence layer — Trust is explained. The system explains intent, identifies assumptions, flags issues, and suggests recommended tests or validation steps.
  4. Decision layer — Developer stays in control. The developer can accept, edit, compare alternatives, request clarification, or ask for tests and validation help.
  5. Outcome — Judgment gets support. The system does not remove human judgment. It gives better information at the exact moment judgment matters most.

MVP Scope

The first version focuses tightly on the acceptance decision, where the highest friction currently exists.

Workflow shift

The MVP focuses on changing the Copilot workflow from generate -> manually verify -> accept to generate -> verify early -> accept with confidence.

Product boundary

The goal is not to redesign GitHub Copilot completely. The goal is to add a lightweight verification step inside the existing developer workflow so developers can trust AI-generated code before accepting it.

MVP objective

Help developers verify Copilot-generated code across correctness, security, test coverage, and repository fit before accepting it into the codebase.

In-scope table
In ScopePurpose
Confidence Check Before AcceptanceRuns on multi-line or function-level suggestions and evaluates correctness risk, security risk, missing edge cases, missing tests, repository pattern fit, error-handling gaps, and performance-sensitive logic.
Verification SummaryExplains what code does, why suggested, assumptions, risks checked, unresolved risks, and test recommendations.
Risk LabelsLow Risk, Medium Risk, and High Risk labels help developers slow down when needed. High-risk areas include auth, payments, permissions, security, user data, and production-critical logic.
Suggested Test CasesRecommends happy path, invalid input, missing input, edge cases, failure cases, auth or permission cases, and performance-sensitive cases.
Accept with Confidence ActionDeveloper can accept, modify, reject, view summary, or generate tests without leaving the flow.
PR Verification ContextPull requests include lightweight context: Copilot-assisted code, confidence level, tests suggested or added, risks checked, and unresolved concerns.

Out of Scope

  • Fully autonomous code merging
  • Automatic production deployment
  • Enterprise-level trust dashboard
  • Full security audit replacement
  • Guaranteed bug-free code claims
  • Full architectural refactoring
  • Organisation-wide AI governance controls
  • Custom model training per company
  • Replacing human code review

Success Metrics

The values below are portfolio assumptions for a 90-day MVP pilot, not GitHub internal data.

North Star Metric

Verified Acceptance Rate

Percentage of Copilot-generated code suggestions accepted after the developer reviews the confidence check, verification summary, and suggested tests.

Formula
Accepted suggestions after confidence check / Total suggestions where confidence check was shown.
MVP target
30-40% verified acceptance within the pilot.
Strong outcome
45%+ within 90 days. Baseline is 0% because this workflow does not exist yet.
Activation metrics table

Activation Metrics

Activation metrics show whether developers are seeing, opening, and trying the confidence layer inside the Copilot workflow.

MetricMVP target
Confidence Layer Exposure Rate
% of eligible Copilot suggestions where confidence check appears
70-80%
Verification Summary Open Rate
% of users who open or view the verification summary
50-60%
First Verified Acceptance
% of users who accept at least one suggestion after verification
35-45%
Suggested Test Click Rate
% of users who click Generate Tests from the confidence flow
25-35%

Risks, Guardrails & Constraints

Copilot should help developers make better decisions, but it should not imply that AI-generated code is guaranteed safe, correct, or production-ready.

Product principle

The system should increase developer confidence without creating false confidence.

AI Reliability Risk

Reliability

Confidence Layer may incorrectly evaluate generated code and mark risky code as safe.

Guardrails and threshold metrics

Guardrails. Never say 100% safe or guaranteed correct. Use confidence bands. Show what was checked and not checked. Display unresolved risks.

Threshold Metrics. False High Confidence Rate <5%; risky code marked High Confidence <3%; high-risk code without review warning 0%.

Security Risk

Security

Copilot may miss weak validation, insecure auth, unsafe query handling, data leakage, or secret exposure.

Guardrails and threshold metrics

Guardrails. Classify security-sensitive areas. Trigger stronger warnings. Recommend security tests. Integrate with code scanning/secret scanning.

Threshold Metrics. Missed critical security risk <3%; security-sensitive code correctly classified >90%; high-risk warning shown >95%.

False Confidence Risk

Trust

Developers may trust the score and accept without reading details.

Guardrails and threshold metrics

Guardrails. Do not show a score alone. Pair with reasons, checks, missing checks, and next steps. Require summary view for medium/high risk.

Threshold Metrics. Blind acceptance for medium/high risk <15%; developers believing score means guaranteed safe <10%.

Workflow Friction

Flow

Verification may slow down developers and reduce Copilot's speed value.

Guardrails and threshold metrics

Guardrails. Trigger only on eligible suggestions. Avoid simple autocomplete. Keep checks fast and non-blocking. Allow expandable details.

Threshold Metrics. Lightweight latency <2s; dismissal rate <30%; feature disablement <10%; workflow slowdown feedback <15%.

Accuracy vs Speed Trade-off

Trade-off

Fast checks may miss issues; deep checks may slow flow.

Guardrails and threshold metrics

Guardrails. Use two-level model: lightweight automatic checks and deeper manual/triggered checks for high-risk code.

Threshold Metrics. Lightweight check <2s; deep check <5-8s; deep check precision for high-risk code >90%.

Repository Context Limitation

Context

Copilot may not have enough repo/business context to judge true fit.

Guardrails and threshold metrics

Guardrails. Show repo context used. Surface related files considered. Mark uncertain areas as low context. Allow developer to add context manually.

Threshold Metrics. Repo-fit confidence available >75%; context source listed >80%; low-context suggestions labelled >95%.

Test Coverage Risk

Testing

Generated implementation code may miss important tests and edge cases.

Guardrails and threshold metrics

Guardrails. Suggest test categories: happy path, invalid input, missing input, failure case, auth/permission, performance-sensitive case.

Threshold Metrics. Test suggestions for medium/high-risk code >85%; AI-suggested test adoption 30-40%; missing-test comments down 20-25%.

Over-automation Risk

Control

Developers may treat Copilot as a decision-maker instead of decision support.

Guardrails and threshold metrics

Guardrails. Keep developer as final decision-maker. Use "recommended" not "approved". No auto-merge or auto-accept.

Threshold Metrics. Auto-accepted code 0%; auto-merged code 0%; high-risk code accepted without human action 0%.

Privacy & Data Risk

Privacy

Repository context can include private code, business logic, secrets, and customer data.

Guardrails and threshold metrics

Guardrails. Mask secrets. Follow enterprise data controls. Let admins configure context use. Avoid unnecessary storage. Provide audit logs.

Threshold Metrics. Secret exposure 0 incidents; token masking >99%; admin control coverage 100% for pilot orgs.

Reviewer Trust Risk

Review

PR reviewers may distrust summaries if vague or incomplete.

Guardrails and threshold metrics

Guardrails. Add structured PR context: confidence, risks checked, tests suggested/added, unresolved concerns, files impacted.

Threshold Metrics. Reviewer usefulness 4.0+/5; PR back-and-forth down 10-15%; vague summaries <15%.

Other Constraints

Constraints that shape the MVP

Latency

Lightweight confidence check under 2 seconds.

Context Window

Use retrieval-based context selection: current file, related files, recent changes, tests, dependency graph.

Evaluation Quality

Focus MVP on risk indicators, not final correctness guarantees.

IDE Compatibility

MVP starts with VS Code and GitHub Pull Requests.

Security Review Scope

Position as early detection, not final approval.

Developer Adoption

Make verification automatic, lightweight, and optional to expand.

Enterprise Readiness

Pilot with enterprise teams using controlled settings and clear audit logs.

Cost

Trigger only for eligible suggestions and use tiered verification depth.

Final guardrail principle

Assist the developer. Do not overrule the developer.

Final Verdicts

The case study closes where the product decision happens: before generated code becomes accepted code.

The loop closes here: persona, pain point, solution, and outcome, as written in the live study.

Case study by

Darsh Dave