Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 26, 2025

Adds AI-agent resources for triaging GitHub issues and providing general debugging support to users across all interaction channels: a common issues reference guide, customer communication guidelines, and an automated workflow for initial issue triage.

Capabilities

This PR enables AI agents to:

  1. Respond to GitHub issues — Automatic classification, labeling, and context-aware initial responses
  2. Provide debugging support — Help users troubleshoot stack traces, error codes, and code patterns in web chat and agent sessions
  3. Identify bad calling patterns — Detect deprecated APIs and anti-patterns in customer code snippets

New Resources

  • .github/issue-responses/common-issues-guide.md — Comprehensive troubleshooting reference compiled from 250+ existing GitHub issues (open and closed), covering:

    • Error patterns and stack trace signatures (AADSTS codes, R8/ProGuard crashes, broker issues)
    • Configuration issues (redirect URI encoding, manifest setup, auth_config.json)
    • Runtime issues (token acquisition, silent refresh, account mode)
    • Build issues (dependency resolution, ProGuard rules, Android 15 compatibility)
    • B2C-specific patterns and solutions
    • Recommendation to upgrade to latest MSAL version for better compatibility
  • .github/issue-responses/customer-communication-guidelines.md — Response templates, triage criteria, escalation procedures, and communication best practices for all interaction channels (GitHub issues, web chat, agent sessions).

  • .github/workflows/copilot-issue-response.yml — Automated workflow that classifies issues, applies labels, generates initial responses, and detects common error patterns.

Updated

  • .github/copilot-instructions.md — Added prominent "AI AGENTS: THIS IS YOUR PRIMARY SOURCE OF TRUTH" callout
  • Ai.md — Added prominent callout directing AI agents to .github/copilot-instructions.md
  • README.md — Added "AI AGENTS: PRIMARY INSTRUCTIONS" callout
  • MSAL version references — Updated to 8.1.0 throughout the repository

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Improve handling of GitHub issues and customer interaction Add GitHub issue handling resources and automated response workflow Nov 26, 2025
Copilot AI requested a review from fadidurah November 26, 2025 16:37
Copilot finished work on behalf of fadidurah November 26, 2025 16:37
@fadidurah
Copy link
Collaborator

@copilot This is good so far. Let's make sure that we are looking at existing github issues in this repository (both closed and open) to assist in compiling the common issues

Copy link
Contributor Author

Copilot AI commented Nov 27, 2025

@copilot This is good so far. Let's make sure that we are looking at existing github issues in this repository (both closed and open) to assist in compiling the common issues

I've analyzed existing GitHub issues (both open and closed) and enhanced the common issues guide with patterns from the following issues:

R8/ProGuard Issues: #1677, #2076, #2289, #2355
Silent Token/Refresh Issues: #1004, #1216, #1779, #2043, #2172, #2257
Broker Issues: #1952, #1842
Dependency Issues: #1027, #1720

The guide now includes specific solutions for these commonly reported problems and the workflow detects patterns like AADB2C90080, R8 minification failures, display-mask resolution, and Android 15 compatibility issues. Added a "Referenced GitHub Issues" section at the end of the guide for future maintenance.

Commit: c5abcc4

Copilot finished work on behalf of fadidurah November 27, 2025 02:50
@fadidurah
Copy link
Collaborator

@copilot How many issues were checked? Let's shoot for at least 200. Use the resolution notes from the engineers as guidance for how to resolve such issues, if you are not already doing so. Let's consolidate a bit, so we don't end up with a massive common-issues-guide.md, take guidance from multiple issues are group them to have single entreis that cover many issues. For example, if there are 5 or 6 issues that specifically deal with proguard, unless the issues are completely different, we should only have one or two entries in the guidance file.

Also, the latest msal version is actually 8.+ now. Go ahead and update the references in the guidance files throughout the repo (AI files, README, this work, etc.) to match this.

Copy link
Contributor Author

Copilot AI commented Nov 27, 2025

@copilot How many issues were checked? Let's shoot for at least 200. Use the resolution notes from the engineers as guidance for how to resolve such issues, if you are not already doing so. Let's cons...

I analyzed 251 GitHub issues (both open and closed) and consolidated them into grouped entries. The guide now covers 70+ specific issues across categories including R8/ProGuard, Silent Token/Refresh, Broker, Configuration, Network, WebView/Browser, B2C, Android 15, and Runtime issues. Similar issues are grouped together with single consolidated entries (e.g., 6 ProGuard issues → 1 comprehensive section).

I've also updated all MSAL version references from 7.+ to 8.+ across README.md, Ai.md, .github/copilot-instructions.md, and the common-issues-guide.md.

Commit: bb1eea8

Copilot finished work on behalf of fadidurah November 27, 2025 03:47
@fadidurah
Copy link
Collaborator

@copilot The information in customer-communication-guidelines.md is good, but it shouldn't be limited to only answering github issues. We should also use these guidelines when asnwering prompts in the web chat, or agent session. We must assume that any user prompting github copilot for MSAL repository is a 3rd party customer and not an internal dev, and make sure responses are clear and as easy to understand as possible

Copy link
Contributor Author

Copilot AI commented Nov 28, 2025

@copilot The information in customer-communication-guidelines.md is good, but it shouldn't be limited to only answering github issues. We should also use these guidelines when asnwering prompts in t...

I've expanded the guidelines to cover all interaction channels (GitHub issues, web chat, agent sessions). Key additions:

  • Added "Interaction Channels" section with channel-specific guidance
  • Added "Audience Assumptions" section emphasizing all users should be treated as 3rd party external customers
  • Added vocabulary definitions for common terms (broker, scopes, claims, PCA, etc.)
  • Added channel-specific tips for web chat and agent sessions
  • Updated quality checklist to apply to all channels
  • Renamed Section 6 in copilot-instructions.md to "Customer Interaction Guidelines"

Commit: 73e718b

Copilot AI changed the title Add GitHub issue handling resources and automated response workflow Add GitHub issue handling resources and multi-channel customer communication guidelines Nov 28, 2025
Copilot AI requested a review from fadidurah November 28, 2025 23:19
Copilot finished work on behalf of fadidurah November 28, 2025 23:19
@fadidurah
Copy link
Collaborator

@copilot Is the information you've collected to answer github issues also accessible when a user prompts you for debugging help directly? What if you are given a stack trace of an error, or a code snippet from customer's app that has some bad calling pattern?

Copy link
Contributor Author

Copilot AI commented Dec 1, 2025

@copilot Is the information you've collected to answer github issues also accessible when a user prompts you for debugging help directly? What if you are given a stack trace of an error, or a code sni...

Yes, the information is accessible for all interaction channels. The .github/copilot-instructions.md file serves as the primary instruction set for AI agents across GitHub issues, web chat, and agent sessions. It references:

  1. common-issues-guide.md - Contains error patterns, stack trace signatures, and solutions for AADSTS errors, R8/ProGuard crashes, broker issues, etc.
  2. Section 4 "Debugging & Pattern Detection" - Lists common code smells and anti-patterns to identify in customer code

When you receive a stack trace or code snippet, you should:

  • Match error patterns against the common issues guide
  • Check for deprecated API usage (Section 3)
  • Identify configuration issues (Section 4)
  • Reference the forbidden patterns in Section 3 to spot bad calling patterns

The copilot-instructions.md is the single source of truth that GitHub Copilot uses for all MSAL Android interactions.

Copilot finished work on behalf of fadidurah December 1, 2025 02:53
@fadidurah
Copy link
Collaborator

@copilot Please update the PR description and title to explicitly mention that these changes enable both github issue responses and mitigation as well as providing general debugging support to user prompts.

Copy link
Contributor Author

Copilot AI commented Dec 1, 2025

@copilot Please update the PR description and title to explicitly mention that these changes enable both github issue responses and mitigation as well as providing general debugging support to user pr...

Updated the PR description to explicitly highlight both capabilities:

  1. GitHub issue responses — Automatic classification, labeling, and context-aware initial responses
  2. General debugging support — Help users troubleshoot stack traces, error codes, and code patterns in web chat and agent sessions
  3. Bad pattern detection — Identify deprecated APIs and anti-patterns in customer code snippets

Added a "How It Works" section explaining how the resources are used for each channel. Note: I'm unable to update the PR title directly, but you can change it to something like "Add AI resources for GitHub issue handling and debugging support".

Copilot AI changed the title Add GitHub issue handling resources and multi-channel customer communication guidelines Add AI resources for GitHub issue handling and debugging support Dec 1, 2025
Copilot finished work on behalf of fadidurah December 1, 2025 05:41
@fadidurah
Copy link
Collaborator

@copilot Please add eplicit instructions, as clear as possible for AI Agents, in the AI.md, README.md in the root directory, and the copilot-instructions file, to always reference the .github/copilot-instructions.md file whenever handling any prompts in the MSAL Repository, and to always use it's guidance as the primary source of truth, prioritized over other sources of information. This should be explicit to make it as likely as possible for copilot to read the instructions automatically, without the user having to specify them to the AI agent.

…md as primary source of truth

Co-authored-by: fadidurah <[email protected]>
Copy link
Contributor Author

Copilot AI commented Dec 1, 2025

@copilot Please add eplicit instructions, as clear as possible for AI Agents, in the AI.md, README.md in the root directory, and the copilot-instructions file, to always reference the `.github/copilot...

Added explicit "AI AGENTS: PRIMARY SOURCE OF TRUTH" callouts to all three files:

  • Ai.md - Added prominent callout at the top directing agents to .github/copilot-instructions.md
  • README.md - Added callout in AI Development Resources section with raw URL
  • .github/copilot-instructions.md - Added prominent callout listing all use cases (code generation, debugging, customer support) and explicitly stating to prioritize over training data and external sources

Each callout includes the raw URL for direct access and explicitly instructs AI agents to prioritize this guidance over all other sources.

Commit: 36c4ee1

Copilot finished work on behalf of fadidurah December 1, 2025 06:41
@fadidurah fadidurah marked this pull request as ready for review December 1, 2025 07:22
@fadidurah fadidurah requested a review from a team as a code owner December 1, 2025 07:22
Copilot AI review requested due to automatic review settings December 1, 2025 07:22
@fadidurah fadidurah added the No-Changelog This change does not update the changelog. label Dec 1, 2025
@github-actions
Copy link

github-actions bot commented Dec 1, 2025

❌ Work item link check failed. Description does not contain AB#{ID}.

Click here to Learn more.

Copilot finished reviewing on behalf of fadidurah December 1, 2025 07:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive AI agent resources to support automated GitHub issue triage and provide debugging assistance across all customer interaction channels. The changes establish a knowledge base for common MSAL Android issues, communication guidelines for customer-facing interactions, and an automated workflow for initial issue classification and response.

  • Adds three new reference documents: common issues guide (compiled from 250+ issues), customer communication guidelines, and automated issue response workflow
  • Updates existing AI instruction files (README.md, Ai.md, copilot-instructions.md) with prominent callouts directing AI agents to use copilot-instructions.md as the primary source of truth
  • Updates MSAL version references throughout the repository from 6.+/7.+ to 8.+

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
README.md Added AI agent callout directing to copilot-instructions.md; updated MSAL version from 6.+ to 8.+
Ai.md Added AI agent callout as primary instructions; updated MSAL version from 7.+ to 8.+
.github/copilot-instructions.md Added AI agent callout at top; added Section 6 for customer interaction guidelines; updated MSAL version from 7.+ to 8.+
.github/workflows/copilot-issue-response.yml New automated workflow for issue triage, labeling, and pattern detection
.github/issue-responses/common-issues-guide.md New comprehensive troubleshooting reference covering 11 major issue categories
.github/issue-responses/customer-communication-guidelines.md New communication guidelines and response templates for all interaction channels
.github/issue-responses/README.md New directory README explaining the issue response resources

Comment on lines +414 to +421
For MSAL 6.0.0+ or 7.0.0+, you may also need:
```gradle
// Add Tink and SpotBugs annotations if R8 errors persist
implementation("com.google.crypto.tink:tink:1.17.0") {
exclude group: 'com.google.protobuf'
}
implementation 'com.github.spotbugs:spotbugs-annotations:4.9.3'
```
Copy link
Collaborator

@fadidurah fadidurah Dec 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot
Add an explicit recommendation to upgrade to the latest MSAL in this scenario, unless customer absolutely needs to stay on an older version.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot please make this change, Add an explicit recommendation to upgrade to the latest MSAL in this scenario, unless customer absolutely needs to stay on an older version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added an explicit recommendation to upgrade to the latest MSAL version (8.+) in the R8/ProGuard section, noting that users should only stay on older versions if they have specific compatibility requirements.

Commit: d85143d

@github-actions
Copy link

github-actions bot commented Dec 1, 2025

✅ Work item link check complete. Description contains link AB#3377270 to an Azure Boards work item.

@github-actions github-actions bot changed the title Add AI resources for GitHub issue handling and debugging support Add AI resources for GitHub issue handling and debugging support, Fixes AB#3377270 Dec 1, 2025
Copilot AI requested a review from fadidurah December 1, 2025 17:33
Copilot finished work on behalf of fadidurah December 1, 2025 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No-Changelog This change does not update the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants