This document outlines the complete workflow for resolving GitHub issues using MCP tools and AI agentic development practices.
Ensure you have access to these MCP servers (configured via VS Code user settings):
- github: Documentation - Issue/PR management
- microsoft.docs.mcp: Documentation - Microsoft/Azure documentation
- playwright: Documentation - Browser automation
- upstash/context7: Documentation - Library documentation
For all MCP GitHub tool examples in this document:
- REPO_OWNER:
ken-guru - REPO_NAME:
github-copilot-agent-assisted-next-app
When using this workflow in other repositories, update these values accordingly.
# Get comprehensive issue information
mcp_github_issue_read(owner="${REPO_OWNER}", repo="${REPO_NAME}", issue_number=<NUMBER>)# Search existing memory logs for patterns
# Reference: docs/logged_memories/ for detailed debugging sessions
grep -r "relevant keywords" docs/logged_memories/For complex or unclear issues, delegate to the Researcher subagent for systematic analysis. The Researcher agent can search the codebase, find patterns, and provide a structured summary before implementation.
For UI/UX issues, verify the problem using Playwright tools:
# Navigate to the application
# First discover your LAN IP: ipconfig getifaddr en0
mcp_playwright_browser_navigate(url="http://<LAN_IP>:3000")
# Take accessibility snapshot for analysis
mcp_playwright_browser_snapshot()
# Test specific user interactions
mcp_playwright_browser_click(element="button description", ref="snapshot_reference")
mcp_playwright_browser_type(element="input field", ref="snapshot_reference", text="test data")
# Document current state
mcp_playwright_browser_take_screenshot(filename="issue-<NUMBER>-current-state.png")# Create and switch to feature branch
git checkout -b fix-<issue-number>-<brief-description>
# Example: git checkout -b fix-123-button-accessibility-issueCritical: Never work directly on main branch - it is protected and requires PR reviews.
Create entry in docs/PLANNED_CHANGES.md using the template:
# Use the standardized template
# Reference: docs/templates/PLANNED_CHANGES_TEMPLATE.mdCreate a memory log entry if the debugging process involves significant investigation:
# Create memory log in docs/logged_memories/
# Use template: docs/templates/DEBUGGING_SESSION_TEMPLATE.md# Write tests first (Jest for component logic)
npm test -- --testPathPatterns="ComponentName"
# Implement solution
# Update tests as needed
# Run full test suite
npm test# Run all quality checks
npm run lint
npm run type-check
npm run build
# Optional: Run Cypress for workflow testing
npm run cypress:rungit add .
git commit -m "Fix issue #<NUMBER>: <descriptive message>
- Specific change 1
- Specific change 2
- Reference any breaking changes or important notes"
git push origin fix-<issue-number>-<brief-description>mcp_github_create_pull_request({
owner: "ken-guru",
repo: "github-copilot-agent-assisted-next-app",
title: "Fix #<NUMBER>: <Clear, descriptive title>",
head: "fix-<issue-number>-<brief-description>",
base: "main",
body: `
## Problem
Brief description of the issue being resolved.
## Solution
Description of the implementation approach.
## Testing
- [ ] Unit tests added/updated
- [ ] All tests passing
- [ ] Manual testing completed
- [ ] No breaking changes
## Related Issues
Fixes #<NUMBER>
`
})# Check PR status and CI/CD results
mcp_github_pull_request_read(owner="${REPO_OWNER}", repo="${REPO_NAME}", pullNumber=<PR_NUMBER>)
# Monitor in real-time if needed (fallback to CLI)
gh pr checks <PR_NUMBER> --fail-fast --watch# Check for review comments
mcp_github_pull_request_read(owner="${REPO_OWNER}", repo="${REPO_NAME}", pullNumber=<PR_NUMBER>)
# Address each comment systematically
# Commit fixes following the same quality process
# Update PR with resolution notesRepeat Steps 5-8 until:
- All CI/CD checks pass
- All code review comments are addressed
- The solution is verified and complete
- PR is approved and ready for merge
# Create detailed memory log entry if significant debugging was involved
# Reference: docs/templates/DEBUGGING_SESSION_TEMPLATE.md
# Add entry to docs/MEMORY_LOG.md index- Move completed change from
docs/PLANNED_CHANGES.mdtodocs/IMPLEMENTED_CHANGES.md - Clear planning document for next development cycle
# GitHub tools for issue understanding
mcp_github_issue_read() → understand requirements and comments
mcp_github_search_issues() → find related issues# Tool names vary by MCP client. Use your client's tools panel to find
# the canonical tool names under the `microsoft.docs.mcp` server, then call e.g.:
# <your_microsoft_docs_tool_name>(...) → find relevant documentation
# Context7 for library documentation
# Likewise, discover the tools exposed by the `upstash/context7` server and use e.g.:
# <your_context7_tool_name>(...) → fetch current documentation# Playwright for browser automation
mcp_playwright_browser_navigate() → navigate to app
mcp_playwright_browser_snapshot() → capture accessibility tree
mcp_playwright_browser_take_screenshot() → visual documentationFor complex tasks, delegate to specialized agents in .github/agents/:
- Researcher: Context gathering and code analysis
- Implementer: Focused code implementation
- Reviewer: Security and quality review
Before considering any issue resolved:
- ✅ Issue Understanding: Problem clearly analyzed and verified
- ✅ Implementation Complete: Solution addresses root cause
- ✅ Tests Passing: All quality checks pass locally
- ✅ CI/CD Passing: All automated checks succeed
- ✅ Code Review: All reviewer comments addressed
- ✅ Documentation: Memory logs and planning documents updated
- ✅ Verification: Original issue requirements met
Branch Protection Errors:
- Ensure you're working on a feature branch, not main
- Create PR instead of direct push to main
CI/CD Failures:
- Run quality checks locally first:
npm test,npm run lint,npm run type-check - Address all errors before pushing
Code Review Delays:
- Use
mcp_github_pull_request_readto check status - Address comments promptly and comprehensively
- Update PR title/description to reflect current state
Complex Problem Analysis:
- Delegate research to Researcher subagent for systematic breakdown
- Search
docs/logged_memories/for similar historical issues - Verify problems with Playwright tools before implementing solutions
This workflow ensures systematic, high-quality issue resolution while leveraging all available MCP tools for enhanced development efficiency.