Skip to content

Commit 4552673

Browse files
committed
feat: enhance agent suggestion prompt to detect and update outdated agents
- Add version comparison process to identify outdated local agents - Introduce ⚠️ status icon for installed but outdated agents - Add detailed comparison of remote vs local agent content - Include update handling instructions for outdated agents - Enhance process to fetch and compare remote versions - Update output format to show outdated agents with specific differences
1 parent b06e0b6 commit 4552673

1 file changed

Lines changed: 45 additions & 10 deletions

File tree

prompts/suggest-awesome-github-copilot-agents.prompt.md

Lines changed: 45 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
agent: "agent"
3-
description: "Suggest relevant GitHub Copilot Custom Agents files from the awesome-copilot repository based on current repository context and chat history, avoiding duplicates with existing custom agents in this repository."
3+
description: "Suggest relevant GitHub Copilot Custom Agents files from the awesome-copilot repository based on current repository context and chat history, avoiding duplicates with existing custom agents in this repository, and identifying outdated agents that need updates."
44
tools: ["edit", "search", "runCommands", "runTasks", "changes", "testFailure", "openSimpleBrowser", "fetch", "githubRepo", "todos"]
55
---
66

@@ -13,14 +13,23 @@ Analyze current repository context and suggest relevant Custom Agents files from
1313
1. **Fetch Available Custom Agents**: Extract Custom Agents list and descriptions from [awesome-copilot README.agents.md](https://github.com/github/awesome-copilot/blob/main/docs/README.agents.md). Must use `fetch` tool.
1414
2. **Scan Local Custom Agents**: Discover existing custom agent files in `.github/agents/` folder
1515
3. **Extract Descriptions**: Read front matter from local custom agent files to get descriptions
16-
4. **Analyze Context**: Review chat history, repository files, and current project needs
17-
5. **Compare Existing**: Check against custom agents already available in this repository
18-
6. **Match Relevance**: Compare available custom agents against identified patterns and requirements
19-
7. **Present Options**: Display relevant custom agents with descriptions, rationale, and availability status
20-
8. **Validate**: Ensure suggested agents would add value not already covered by existing agents
21-
9. **Output**: Provide structured table with suggestions, descriptions, and links to both awesome-copilot custom agents and similar local custom agents
22-
**AWAIT** user request to proceed with installation of specific custom agents. DO NOT INSTALL UNLESS DIRECTED TO DO SO.
23-
10. **Download Assets**: For requested agents, automatically download and install individual agents to `.github/agents/` folder. Do NOT adjust content of the files. Use `#todos` tool to track progress. Prioritize use of `#fetch` tool to download assets, but may use `curl` using `#runInTerminal` tool to ensure all content is retrieved.
16+
4. **Fetch Remote Versions**: For each local agent, fetch the corresponding version from awesome-copilot repository using raw GitHub URLs (e.g., `https://raw.githubusercontent.com/github/awesome-copilot/main/agents/<filename>`)
17+
5. **Compare Versions**: Compare local agent content with remote versions to identify:
18+
- Agents that are up-to-date (exact match)
19+
- Agents that are outdated (content differs)
20+
- Key differences in outdated agents (tools, description, content)
21+
6. **Analyze Context**: Review chat history, repository files, and current project needs
22+
7. **Match Relevance**: Compare available custom agents against identified patterns and requirements
23+
8. **Present Options**: Display relevant custom agents with descriptions, rationale, and availability status including outdated agents
24+
9. **Validate**: Ensure suggested agents would add value not already covered by existing agents
25+
10. **Output**: Provide structured table with suggestions, descriptions, and links to both awesome-copilot custom agents and similar local custom agents
26+
**AWAIT** user request to proceed with installation or updates of specific custom agents. DO NOT INSTALL OR UPDATE UNLESS DIRECTED TO DO SO.
27+
11. **Download/Update Assets**: For requested agents, automatically:
28+
- Download new agents to `.github/agents/` folder
29+
- Update outdated agents by replacing with latest version from awesome-copilot
30+
- Do NOT adjust content of the files
31+
- Use `#fetch` tool to download assets, but may use `curl` using `#runInTerminal` tool to ensure all content is retrieved
32+
- Use `#todos` tool to track progress
2433

2534
## Context Analysis Criteria
2635

@@ -46,6 +55,7 @@ Display analysis results in structured table comparing awesome-copilot custom ag
4655
| ------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ---------------------------------- | ------------------------------------------------------------- |
4756
| [amplitude-experiment-implementation.agent.md](https://github.com/github/awesome-copilot/blob/main/agents/amplitude-experiment-implementation.agent.md) | This custom agent uses Amplitude's MCP tools to deploy new experiments inside of Amplitude, enabling seamless variant testing capabilities and rollout of product features | ❌ No | None | Would enhance experimentation capabilities within the product |
4857
| [launchdarkly-flag-cleanup.agent.md](https://github.com/github/awesome-copilot/blob/main/agents/launchdarkly-flag-cleanup.agent.md) | Feature flag cleanup agent for LaunchDarkly | ✅ Yes | launchdarkly-flag-cleanup.agent.md | Already covered by existing LaunchDarkly custom agents |
58+
| [principal-software-engineer.agent.md](https://github.com/github/awesome-copilot/blob/main/agents/principal-software-engineer.agent.md) | Provide principal-level software engineering guidance with focus on engineering excellence, technical leadership, and pragmatic implementation. | ⚠️ Outdated | principal-software-engineer.agent.md | Tools configuration differs: remote uses `'web/fetch'` vs local `'fetch'` - Update recommended |
4959

5060
## Local Agent Discovery Process
5161

@@ -54,19 +64,44 @@ Display analysis results in structured table comparing awesome-copilot custom ag
5464
3. Build comprehensive inventory of existing agents
5565
4. Use this inventory to avoid suggesting duplicates
5666

67+
## Version Comparison Process
68+
69+
1. For each local agent file, construct the raw GitHub URL to fetch the remote version:
70+
- Pattern: `https://raw.githubusercontent.com/github/awesome-copilot/main/agents/<filename>`
71+
2. Fetch the remote version using the `fetch` tool
72+
3. Compare entire file content (including front matter, tools array, and body)
73+
4. Identify specific differences:
74+
- **Front matter changes** (description, tools)
75+
- **Tools array modifications** (added, removed, or renamed tools)
76+
- **Content updates** (instructions, examples, guidelines)
77+
5. Document key differences for outdated agents
78+
6. Calculate similarity to determine if update is needed
79+
5780
## Requirements
5881

5982
- Use `githubRepo` tool to get content from awesome-copilot repository agents folder
6083
- Scan local file system for existing agents in `.github/agents/` directory
6184
- Read YAML front matter from local agent files to extract descriptions
85+
- Compare local agents with remote versions to detect outdated agents
6286
- Compare against existing agents in this repository to avoid duplicates
6387
- Focus on gaps in current agent library coverage
6488
- Validate that suggested agents align with repository's purpose and standards
6589
- Provide clear rationale for each suggestion
6690
- Include links to both awesome-copilot agents and similar local agents
91+
- Clearly identify outdated agents with specific differences noted
6792
- Don't provide any additional information or context beyond the table and the analysis
6893

6994
## Icons Reference
7095

71-
- ✅ Already installed in repo
96+
- ✅ Already installed and up-to-date
97+
- ⚠️ Installed but outdated (update available)
7298
- ❌ Not installed in repo
99+
100+
## Update Handling
101+
102+
When outdated agents are identified:
103+
1. Include them in the output table with ⚠️ status
104+
2. Document specific differences in the "Suggestion Rationale" column
105+
3. Provide recommendation to update with key changes noted
106+
4. When user requests update, replace entire local file with remote version
107+
5. Preserve file location in `.github/agents/` directory

0 commit comments

Comments
 (0)