DEV Community

Cover image for πŸ› Fix a Chat App with Copilot Chat using Prompt Driven Development
Cynthia Zanoni for Microsoft Azure

Posted on

πŸ› Fix a Chat App with Copilot Chat using Prompt Driven Development

This article is part of the Prompt Driven Development series from the VS Code YouTube channel. It is based on the video Fix a Chat App with Copilot Chat and explains the concepts, tools, and workflows demonstrated when using GitHub Copilot to diagnose and fix issues in an existing application.

πŸŽ₯ Video Reference

Fix a Chat App with Copilot Chat using Prompt Driven Development

Fixing bugs in an existing application often requires context switching between documentation, code, logs, tests, and tooling. As applications grow more complex, even small issues can require navigating a large surface area of code.


πŸ—οΈ Understanding the Application Context

The application demonstrated in the video is a chat application built using Retrieval Augmented Generation.

At a high level, the app:

  • Answers questions based on a knowledge base
  • Includes citations in responses
  • Acts as an internal HR style chatbot for a fictional company

Both the frontend and backend are running locally and the project contains multiple directories and integrations. Rather than manually inspecting every folder, the workflow begins by asking Copilot to explain the architecture.

Using Ask mode, Copilot provides a concise overview of:

  • The RAG architecture
  • Frontend technologies such as React and TypeScript
  • Backend services written in Python
  • Search, ingestion, deployment, and testing components

This step demonstrates how prompts can quickly establish situational awareness before any changes are made.


🎯 Identifying and Fixing an Accessibility Issue

The first issue addressed in the video is an accessibility problem reported by users.

An accessibility scanning tool is used to analyze the UI, immediately identifying multiple issues. A screenshot of the results is taken and passed directly to GitHub Copilot Chat running in agent mode.

Key aspects of this workflow include:

  • Uploading visual context through a screenshot
  • Allowing the agent to read and reason about the image
  • Letting the agent inspect relevant files before making changes

Copilot proposes fixes and presents them as diffs, allowing the developer to review changes before accepting them. Once applied, the application is rebuilt and rescanned, resulting in zero remaining accessibility issues.

This demonstrates how multimodal prompting can significantly reduce time spent diagnosing UI related problems.


πŸ“Œ Five Key Learnings from the Video

1️⃣ Start by Asking Questions, Not Making Changes

The workflow begins with Ask mode, not agent mode.

Before editing anything, Copilot is used to explain the architecture at a high level. This reinforces an important principle: Prompt Driven Development values understanding before execution.


2️⃣ Visual Context Improves Debugging Accuracy

By uploading a screenshot of accessibility issues, the agent can directly reference what the user sees.

This approach reduces ambiguity and enables Copilot to propose targeted fixes rather than generic suggestions.


3️⃣ Custom Chat Modes Enable Specialized Workflows

The video introduces a custom chat mode called Fixer.

This mode defines:

  • A preferred model
  • Allowed tools, including MCP servers
  • Instructions focused on minimal fixes and verification

By encoding these expectations once, future bug fixes become more consistent and require less repeated instruction.


4️⃣ External Context Can Be Integrated Seamlessly

For more complex issues, the workflow pulls data from GitHub issues using an MCP server.

Copilot:

  • Fetches the issue description
  • Locates the relevant code
  • Updates both implementation and tests
  • Verifies changes by running the test suite

This shows how Prompt Driven Development can span code, issues, and tests in a single flow.


5️⃣ Validation Is a First Class Step

Fixes are not considered complete until:

  • Tests are executed
  • Results are reviewed
  • Behavior is verified

Only after successful validation are changes committed, a branch created, and a pull request opened. The workflow mirrors standard engineering practices, with AI accelerating execution rather than bypassing safeguards.


πŸ› οΈ Tools and Features Demonstrated

The video showcases how several GitHub Copilot and VS Code features work together:

  • Ask Mode for exploration and understanding
  • Agent Mode for editing, testing, and iteration
  • Custom Chat Modes for repeatable fixing strategies
  • MCP Servers for GitHub and tool integration
  • Test Runner Integration for automated verification
  • GitHub CLI for branch creation and pull requests

Together, these features support a cohesive and end to end debugging workflow.


Conclusion

This example demonstrates how Prompt Driven Development can be applied effectively to debugging and maintenance tasks, not just feature development.

By combining structured prompts, rich context, and continuous validation, developers can fix issues faster while maintaining confidence in the results.

Rather than replacing developer judgment, GitHub Copilot acts as a powerful collaborator, helping navigate complexity and reduce repetitive work while keeping engineering standards intact.

Top comments (0)