From cdbb05fac94081fd815010de27783673702b77f8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 20 May 2025 21:11:59 +0000 Subject: [PATCH 1/2] Initial plan for issue From 3347632137fec511155d3e2d8282b7561b6b557c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 20 May 2025 21:17:19 +0000 Subject: [PATCH 2/2] Implement Copilot coding agent environment components Co-authored-by: erinloy <315465+erinloy@users.noreply.github.com> --- .github/copilot/commands.json | 37 ++++++++++++++++++++++ .github/copilot/environment-variables.json | 9 ++++++ AI_COMPONENTS_INDEX.md | 2 ++ COPILOT.md | 9 ++++++ docs/COPILOT_IMPLEMENTATION.md | 11 +++++++ 5 files changed, 68 insertions(+) create mode 100644 .github/copilot/commands.json create mode 100644 .github/copilot/environment-variables.json diff --git a/.github/copilot/commands.json b/.github/copilot/commands.json new file mode 100644 index 0000000..6a69745 --- /dev/null +++ b/.github/copilot/commands.json @@ -0,0 +1,37 @@ +[ + { + "name": "list-copilot-configs", + "description": "List all Copilot configuration files in the repository", + "command": "find .github/copilot -type f -name \"*.yml\" -o -name \"*.json\" | sort" + }, + { + "name": "validate-json", + "description": "Validate a JSON file", + "command": "jq . \"$1\"" + }, + { + "name": "validate-yml", + "description": "Validate a YAML file", + "command": "yamllint \"$1\"" + }, + { + "name": "git-show-copilot-changes", + "description": "Show recent changes to Copilot configuration files", + "command": "git log -p -- .github/copilot/" + }, + { + "name": "update-docs", + "description": "Update the AI components index with new information", + "command": "echo \"Remember to update AI_COMPONENTS_INDEX.md with any new Copilot components\"" + }, + { + "name": "check-workflows", + "description": "List all GitHub workflows in the repository", + "command": "find .github/workflows -type f -name \"*.yml\" | sort" + }, + { + "name": "run-markdown-lint", + "description": "Lint markdown files", + "command": "npx markdownlint-cli \"*.md\" \"docs/*.md\"" + } +] \ No newline at end of file diff --git a/.github/copilot/environment-variables.json b/.github/copilot/environment-variables.json new file mode 100644 index 0000000..bf6ac13 --- /dev/null +++ b/.github/copilot/environment-variables.json @@ -0,0 +1,9 @@ +{ + "REPO_NAME": "stuff", + "PROJECT_ROOT": "${workspaceFolder}", + "DOCS_DIR": "${workspaceFolder}/docs", + "NODE_ENV": "development", + "EDITOR": "code", + "LOG_LEVEL": "info", + "DEFAULT_BRANCH": "master" +} \ No newline at end of file diff --git a/AI_COMPONENTS_INDEX.md b/AI_COMPONENTS_INDEX.md index 80e7e57..fe373d4 100644 --- a/AI_COMPONENTS_INDEX.md +++ b/AI_COMPONENTS_INDEX.md @@ -9,6 +9,8 @@ This document serves as a comprehensive index of all AI-related components in th | [.github/copilot/config.yml](/.github/copilot/config.yml) | Main configuration file for GitHub Copilot | [GitHub Copilot Overview](https://docs.github.com/en/copilot/overview-of-github-copilot) | | [.github/copilot/chat-config.yml](/.github/copilot/chat-config.yml) | Configuration for GitHub Copilot Chat | [GitHub Copilot Chat](https://docs.github.com/en/copilot/github-copilot-chat/about-github-copilot-chat) | | [.github/copilot/cli-config.yml](/.github/copilot/cli-config.yml) | Configuration for GitHub Copilot CLI | [GitHub Copilot in the CLI](https://docs.github.com/en/copilot/github-copilot-in-the-cli/about-github-copilot-in-the-cli) | +| [.github/copilot/environment-variables.json](/.github/copilot/environment-variables.json) | Environment variables for Copilot agent | [Copilot Agent Environment](https://docs.github.com/en/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent) | +| [.github/copilot/commands.json](/.github/copilot/commands.json) | Custom commands for Copilot agent | [Copilot Agent Commands](https://docs.github.com/en/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent) | ## GitHub Workflows diff --git a/COPILOT.md b/COPILOT.md index 0060847..18d79ff 100644 --- a/COPILOT.md +++ b/COPILOT.md @@ -10,6 +10,7 @@ This repository has been configured with various GitHub Copilot features to enha - **GitHub Copilot for PRs**: Automated pull request summaries and reviews - **GitHub Copilot for Issues**: AI assistance for GitHub issues - **GitHub Copilot CLI**: Command-line assistance for shell commands +- **GitHub Copilot Coding Agent**: AI coding agent with customized environment ## How to Use @@ -42,12 +43,20 @@ GitHub Copilot is available in various editors: - Install Copilot extension: `gh extension install github/gh-copilot` - Use with `gh copilot` or enable suggestions with `gh copilot alias` +### GitHub Copilot Coding Agent +# Documentation: https://docs.github.com/en/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent +- Use the Copilot coding agent for advanced coding tasks +- The agent has access to custom commands specific to this repository +- Environment variables are pre-configured for the agent's development environment + ## Configuration This repository uses the following configuration files for Copilot features: - `.github/copilot/config.yml`: Main configuration file (https://docs.github.com/en/copilot/overview-of-github-copilot) - `.github/copilot/chat-config.yml`: Chat-specific settings (https://docs.github.com/en/copilot/github-copilot-chat/about-github-copilot-chat) - `.github/copilot/cli-config.yml`: CLI-specific settings (https://docs.github.com/en/copilot/github-copilot-in-the-cli/about-github-copilot-in-the-cli) +- `.github/copilot/environment-variables.json`: Environment variables for Copilot agent (https://docs.github.com/en/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent) +- `.github/copilot/commands.json`: Custom commands for Copilot agent (https://docs.github.com/en/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent) - `.github/workflows/copilot-pr-feedback.yml`: Workflow for PR feedback (https://docs.github.com/en/copilot/github-copilot-for-pull-requests/about-github-copilot-for-pull-requests) - `.github/workflows/copilot-for-issues.yml`: Workflow for issues support (https://docs.github.com/en/copilot/github-copilot-for-issues/about-github-copilot-for-issues) - `.github/copilot-instructions.md`: Repository-specific instructions for Copilot (https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot) diff --git a/docs/COPILOT_IMPLEMENTATION.md b/docs/COPILOT_IMPLEMENTATION.md index 524a0c2..40fa223 100644 --- a/docs/COPILOT_IMPLEMENTATION.md +++ b/docs/COPILOT_IMPLEMENTATION.md @@ -16,6 +16,8 @@ This document outlines the steps taken to implement GitHub Copilot workflows in - `.github/copilot/config.yml`: Main configuration file - `.github/copilot/chat-config.yml`: Chat-specific settings - `.github/copilot/cli-config.yml`: CLI-specific settings + - `.github/copilot/environment-variables.json`: Environment variables for Copilot agent + - `.github/copilot/commands.json`: Custom commands for Copilot agent - `.github/copilot-instructions.md`: Repository-specific instructions for Copilot 3. Created GitHub Actions workflows: @@ -34,6 +36,7 @@ This document outlines the steps taken to implement GitHub Copilot workflows in - GitHub Copilot for Pull Requests: https://docs.github.com/en/copilot/github-copilot-for-pull-requests/about-github-copilot-for-pull-requests - GitHub Copilot for Issues: https://docs.github.com/en/copilot/github-copilot-for-issues/about-github-copilot-for-issues - GitHub Copilot CLI: https://docs.github.com/en/copilot/github-copilot-in-the-cli/about-github-copilot-in-the-cli +- GitHub Copilot Coding Agent: https://docs.github.com/en/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent ## Configuration Details @@ -53,6 +56,14 @@ Configures GitHub Copilot for CLI, enabling command suggestions and explanations Documentation: https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot Provides custom instructions for GitHub Copilot when working with this repository. +### Environment Variables (environment-variables.json) +Documentation: https://docs.github.com/en/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent +Defines environment variables that will be available to the Copilot agent when running tasks in the repository. + +### Custom Commands (commands.json) +Documentation: https://docs.github.com/en/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent +Defines custom commands that the Copilot agent can use when working with the repository. + ## Workflow Details ### PR Feedback Workflow