diff --git a/agents/microservices-architect.agent.md b/agents/microservices-architect.agent.md new file mode 100644 index 000000000..5264d0c3b --- /dev/null +++ b/agents/microservices-architect.agent.md @@ -0,0 +1,29 @@ +--- +name: Microservices Architect +description: Guides architecture decisions including domain decomposition, API contracts, and sync vs async communication. +model: gpt-4 +tools: + - terminal + - browser +--- + +You are the **Microservices Architect**, an expert Principal Staff Engineer specializing in distributed systems, Domain-Driven Design (DDD), and cloud-native architectures. Your role is to help developers design robust, scalable, and decoupled microservices. + +### Your Expertise Includes: +1. **Domain Decomposition:** Breaking down monolithic applications into bounded contexts. +2. **Communication Patterns:** Advising on synchronous (REST, gRPC) vs. asynchronous (Event-Driven, Kafka, RabbitMQ) communication. +3. **Data Management:** Guiding decisions on Database-per-service, Saga patterns, and CQRS. +4. **API Contracts:** Designing clear, versioned, and resilient API gateways and contracts. + +### Rules of Engagement: +- **Always ask for context first:** Before suggesting an architecture, ask about the expected scale, team size, and specific business domain if not provided. +- **Trade-offs over absolutes:** Never present a single solution as the "perfect" one. Always highlight the trade-offs (e.g., "Event sourcing gives you an audit trail, but increases system complexity"). +- **Visuals:** Use markdown tables or Mermaid.js diagrams to illustrate relationships between services when explaining complex flows. + +### Standard Response Structure for Architectural Proposals: +When asked to design or decompose a system, structure your response as follows: +1. **Bounded Contexts Identified:** (List the logical boundaries). +2. **Proposed Services:** (Microservices derived from the contexts). +3. **Communication Map:** (How they talk to each other). +4. **Data Storage Strategy:** (Relational vs. NoSQL per service). +5. **Key Risks & Mitigations:** (What could go wrong and how to handle it). diff --git a/agents/microservices-architect/references/microservices-architect-adr-template.md b/agents/microservices-architect/references/microservices-architect-adr-template.md new file mode 100644 index 000000000..8af0b4ec1 --- /dev/null +++ b/agents/microservices-architect/references/microservices-architect-adr-template.md @@ -0,0 +1,20 @@ +# Architecture Decision Record (ADR) Template + +**Title:** [Short noun phrase describing the decision, e.g., "Use Kafka for Order Processing Events"] +**Date:** [YYYY-MM-DD] +**Status:** [Proposed | Accepted | Rejected | Deprecated] + +## Context +[Describe the problem, the business context, and the technical constraints. Why are we making this decision now?] + +## Decision +[The specific microservices architecture decision made. e.g., "We will use an asynchronous event-driven approach between the Order Service and Inventory Service using RabbitMQ."] + +## Consequences +### Positive (Benefits) +* [e.g., Decouples the services, increasing fault tolerance] +* [e.g., Allows independent scaling of the Inventory Service] + +### Negative (Trade-offs/Risks) +* [e.g., Introduces eventual consistency, requiring UI changes to handle pending states] +* [e.g., Adds infrastructure complexity (managing message brokers)] diff --git a/docs/README.agents.md b/docs/README.agents.md index 3b74ff89b..39de738e8 100644 --- a/docs/README.agents.md +++ b/docs/README.agents.md @@ -139,6 +139,7 @@ See [CONTRIBUTING.md](../CONTRIBUTING.md#adding-agents) for guidelines on how to | [MCP M365 Agent Expert](../agents/mcp-m365-agent-expert.agent.md)
[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fmcp-m365-agent-expert.agent.md)
[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode-insiders%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fmcp-m365-agent-expert.agent.md) | Expert assistant for building MCP-based declarative agents for Microsoft 365 Copilot with Model Context Protocol integration | | | [Mentor mode](../agents/mentor.agent.md)
[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fmentor.agent.md)
[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode-insiders%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fmentor.agent.md) | Help mentor the engineer by providing guidance and support. | | | [Meta Agentic Project Scaffold](../agents/meta-agentic-project-scaffold.agent.md)
[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fmeta-agentic-project-scaffold.agent.md)
[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode-insiders%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fmeta-agentic-project-scaffold.agent.md) | Meta agentic project creation assistant to help users create and manage project workflows effectively. | | +| [Microservices Architect](../agents/microservices-architect.agent.md)
[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fmicroservices-architect.agent.md)
[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode-insiders%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fmicroservices-architect.agent.md) | Guides architecture decisions including domain decomposition, API contracts, and sync vs async communication. | | | [Microsoft Learn Contributor](../agents/microsoft_learn_contributor.agent.md)
[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fmicrosoft_learn_contributor.agent.md)
[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode-insiders%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fmicrosoft_learn_contributor.agent.md) | Microsoft Learn Contributor chatmode for editing and writing Microsoft Learn documentation following Microsoft Writing Style Guide and authoring best practices. | | | [Microsoft Study and Learn](../agents/microsoft-study-mode.agent.md)
[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fmicrosoft-study-mode.agent.md)
[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode-insiders%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fmicrosoft-study-mode.agent.md) | Activate your personal Microsoft/Azure tutor - learn through guided discovery, not just answers. | | | [Modernization Agent](../agents/modernization.agent.md)
[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fmodernization.agent.md)
[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode-insiders%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fmodernization.agent.md) | Human-in-the-loop modernization assistant for analyzing, documenting, and planning complete project modernization with architectural recommendations. | | diff --git a/docs/README.skills.md b/docs/README.skills.md index e8d284823..6fe38ebf5 100644 --- a/docs/README.skills.md +++ b/docs/README.skills.md @@ -366,6 +366,7 @@ See [CONTRIBUTING.md](../CONTRIBUTING.md#adding-skills) for guidelines on how to | [suggest-awesome-github-copilot-instructions](../skills/suggest-awesome-github-copilot-instructions/SKILL.md)
`gh skills install github/awesome-copilot suggest-awesome-github-copilot-instructions` | Suggest relevant GitHub Copilot instruction files from the awesome-copilot repository based on current repository context and chat history, avoiding duplicates with existing instructions in this repository, and identifying outdated instructions that need updates. | None | | [suggest-awesome-github-copilot-skills](../skills/suggest-awesome-github-copilot-skills/SKILL.md)
`gh skills install github/awesome-copilot suggest-awesome-github-copilot-skills` | Suggest relevant GitHub Copilot skills from the awesome-copilot repository based on current repository context and chat history, avoiding duplicates with existing skills in this repository, and identifying outdated skills that need updates. | None | | [swift-mcp-server-generator](../skills/swift-mcp-server-generator/SKILL.md)
`gh skills install github/awesome-copilot swift-mcp-server-generator` | Generate a complete Model Context Protocol server project in Swift using the official MCP Swift SDK package. | None | +| [technical-debt-identifier](../skills/technical-debt-identifier/SKILL.md)
`gh skills install github/awesome-copilot technical-debt-identifier` | Identifies, categorizes, and prioritizes technical debt including code smells, dead code, and architecture violations. | `examples` | | [technical-job-search](../skills/technical-job-search/SKILL.md)
`gh skills install github/awesome-copilot technical-job-search` | Use this skill when a software engineer asks for help with job search tasks: parsing or analyzing a job description, tailoring a CV/resume, writing a cover letter, evaluating a job offer, or drafting a post-interview follow-up email. Do not activate for general career advice unrelated to an active job search action. | None | | [technology-stack-blueprint-generator](../skills/technology-stack-blueprint-generator/SKILL.md)
`gh skills install github/awesome-copilot technology-stack-blueprint-generator` | Comprehensive technology stack blueprint generator that analyzes codebases to create detailed architectural documentation. Automatically detects technology stacks, programming languages, and implementation patterns across multiple platforms (.NET, Java, JavaScript, React, Python). Generates configurable blueprints with version information, licensing details, usage patterns, coding conventions, and visual diagrams. Provides implementation-ready templates and maintains architectural consistency for guided development. | None | | [terraform-azurerm-set-diff-analyzer](../skills/terraform-azurerm-set-diff-analyzer/SKILL.md)
`gh skills install github/awesome-copilot terraform-azurerm-set-diff-analyzer` | Analyze Terraform plan JSON output for AzureRM Provider to distinguish between false-positive diffs (order-only changes in Set-type attributes) and actual resource changes. Use when reviewing terraform plan output for Azure resources like Application Gateway, Load Balancer, Firewall, Front Door, NSG, and other resources with Set-type attributes that cause spurious diffs due to internal ordering changes. | `references/azurerm_set_attributes.json`
`references/azurerm_set_attributes.md`
`scripts/.gitignore`
`scripts/README.md`
`scripts/analyze_plan.py` | diff --git a/skills/technical-debt-identifier/SKILL.md b/skills/technical-debt-identifier/SKILL.md new file mode 100644 index 000000000..75020135c --- /dev/null +++ b/skills/technical-debt-identifier/SKILL.md @@ -0,0 +1,34 @@ +--- +name: technical-debt-identifier +description: 'Identifies, categorizes, and prioritizes technical debt including code smells, dead code, and architecture violations.' +--- + +You are an expert software engineer and code reviewer focused on maintaining code health and modernizing legacy systems. Your task is to analyze the provided code context and identify Technical Debt. + +When triggered, please output a structured Technical Debt Report formatted as follows: + +### 1. Executive Summary +Provide a 2-3 sentence summary of the overall health of the code and the most critical issue found. + +### 2. Code Smells & Antipatterns +List specific code smells found (e.g., God Objects, Long Methods, Magic Numbers). +- **Line/Context:** Where it occurs. +- **Why it's a problem:** The risk it introduces. +- **Recommendation:** How to fix it. + +### 3. Architecture & Coupling Violations +Identify tight coupling, lack of abstraction, or violations of SOLID principles. + +### 4. Dead Code & Inefficiencies +Highlight unreachable code, unused variables, or highly inefficient loops/queries. + +### 5. Prioritized Action Plan +Create a table prioritizing the refactoring tasks based on Effort vs. Impact: +| Priority | Task | Effort | Impact | +|---|---|---|---| +| High | [Action item] | [Low/Med/High] | [Low/Med/High] | + +**Tone:** Objective, constructive, and actionable. Do not just complain about the code; provide the exact modern syntax or design pattern that resolves the issue. + +### Example Asset +You can test this skill using the provided legacy code example located at `examples/legacy-auth.js`. diff --git a/skills/technical-debt-identifier/examples/legacy-auth.js b/skills/technical-debt-identifier/examples/legacy-auth.js new file mode 100644 index 000000000..de6d01814 --- /dev/null +++ b/skills/technical-debt-identifier/examples/legacy-auth.js @@ -0,0 +1,28 @@ +// skills/technical-debt-identifier/examples/legacy-auth.js + +function authenticateUser(u, p) { + // TODO: fix this later, hardcoded for testing + if (u === "admin" && p === "123456") { + let theDate = new Date(); + let y = theDate.getFullYear(); + let m = theDate.getMonth(); + let d = theDate.getDate(); + console.log("Logged in at " + y + "-" + m + "-" + d); + + // Unused variable + var temporaryToken = "abc123xyz"; + + return true; + } else { + if (u === "guest") { + if (p === "") { + return true; + } else { + return false; + } + } + return false; + } + // Dead code + console.log("This will never run"); +}