Skip to content

Commit e37cd31

Browse files
hddevteamMing
andauthored
fix(agents): replace deprecated tool names with official namespaced equivalents 🤖🤖🤖 (#1382)
Update tools lists in tdd-red, tdd-green, tdd-refactor, and github-actions-expert agents to use the current VS Code Copilot built-in tool names. Old names were silently ignored by VS Code (documented behaviour: 'If a given tool is not available when using the custom agent, it is ignored.'). Tool name mapping applied: - github → github/* - findTestFiles → search/fileSearch - runTests → execute/runTests - runCommands → execute/runInTerminal - terminalCommand → execute/runInTerminal - codebase → search/codebase - filesystem → read/readFile - problems → read/problems - testFailure → execute/testFailure - terminalLastCommand → read/terminalLastCommand - githubRepo → github/* Also added missing tools present in the current VS Code tool reference: - execute/getTerminalOutput - read/terminalSelection Additionally, generalised C#-specific content in TDD agents to be polyglot, covering JavaScript/TypeScript (Jest/Vitest), Python (pytest), Java/Kotlin (JUnit 5), and C# (.NET) — making the agents useful to the broader community. Reference: https://code.visualstudio.com/docs/copilot/reference/copilot-vscode-features#_chat-tools Co-authored-by: Ming <oncwnuAUeYAFR4UGlq8BEJq8Jy-k@git.weixin.qq.com>
1 parent 30ed357 commit e37cd31

File tree

4 files changed

+26
-24
lines changed

4 files changed

+26
-24
lines changed

agents/github-actions-expert.agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: 'GitHub Actions Expert'
33
description: 'GitHub Actions specialist focused on secure CI/CD workflows, action pinning, OIDC authentication, permissions least privilege, and supply-chain security'
4-
tools: ['codebase', 'edit/editFiles', 'terminalCommand', 'search', 'githubRepo']
4+
tools: ['github/*', 'search/codebase', 'edit/editFiles', 'execute/runInTerminal', 'read/readFile', 'search/fileSearch']
55
---
66

77
# GitHub Actions Expert

agents/tdd-green.agent.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: 'Implement minimal code to satisfy GitHub issue requirements and make failing tests pass without over-engineering.'
33
name: 'TDD Green Phase - Make Tests Pass Quickly'
4-
tools: ['github', 'findTestFiles', 'edit/editFiles', 'runTests', 'runCommands', 'codebase', 'filesystem', 'search', 'problems', 'testFailure', 'terminalLastCommand']
4+
tools: ['github/*', 'search/fileSearch', 'edit/editFiles', 'execute/runTests', 'execute/runInTerminal', 'execute/getTerminalOutput', 'execute/testFailure', 'read/readFile', 'read/terminalLastCommand', 'read/terminalSelection', 'read/problems', 'search/codebase']
55
---
66
# TDD Green Phase - Make Tests Pass Quickly
77

@@ -34,11 +34,11 @@ Write the minimal code necessary to satisfy GitHub issue requirements and make f
3434
- **Simple solutions first** - Choose the most straightforward implementation path from issue context
3535
- **Defer complexity** - Don't anticipate requirements beyond current issue scope
3636

37-
### C# Implementation Strategies
37+
### Implementation Strategies (Polyglot)
3838
- **Start with constants** - Return hard-coded values from issue examples initially
3939
- **Progress to conditionals** - Add if/else logic as more issue scenarios are tested
40-
- **Extract to methods** - Create simple helper methods when duplication emerges
41-
- **Use basic collections** - Simple List<T> or Dictionary<T,V> over complex data structures
40+
- **Extract to methods/functions** - Create simple helpers when duplication emerges
41+
- **Use basic collections** - Simple arrays, lists, or maps over complex data structures
4242

4343
## Execution Guidelines
4444

agents/tdd-red.agent.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Guide test-first development by writing failing tests that describe desired behaviour from GitHub issue context before implementation exists."
33
name: "TDD Red Phase - Write Failing Tests First"
4-
tools: ["github", "findTestFiles", "edit/editFiles", "runTests", "runCommands", "codebase", "filesystem", "search", "problems", "testFailure", "terminalLastCommand"]
4+
tools: ["github/*", "search/fileSearch", "edit/editFiles", "execute/runTests", "execute/runInTerminal", "execute/getTerminalOutput", "execute/testFailure", "read/readFile", "read/terminalLastCommand", "read/terminalSelection", "read/problems", "search/codebase"]
55
---
66

77
# TDD Red Phase - Write Failing Tests First
@@ -34,17 +34,19 @@ Focus on writing clear, specific failing tests that describe the desired behavio
3434

3535
### Test Quality Standards
3636

37-
- **Descriptive test names** - Use clear, behaviour-focused naming like `Should_ReturnValidationError_When_EmailIsInvalid_Issue{number}`
37+
- **Descriptive test names** - Use clear, behaviour-focused naming like `returnsValidationError_whenEmailIsInvalid_issue{number}` (adapt casing to your language convention)
3838
- **AAA Pattern** - Structure tests with clear Arrange, Act, Assert sections
3939
- **Single assertion focus** - Each test should verify one specific outcome from issue criteria
4040
- **Edge cases first** - Consider boundary conditions mentioned in issue discussions
4141

42-
### C# Test Patterns
42+
### Test Patterns (Polyglot)
4343

44-
- Use **xUnit** with **FluentAssertions** for readable assertions
45-
- Apply **AutoFixture** for test data generation
46-
- Implement **Theory tests** for multiple input scenarios from issue examples
47-
- Create **custom assertions** for domain-specific validations outlined in issue
44+
- **JavaScript/TypeScript**: Use **Jest** or **Vitest** with `describe`/`it` blocks and `expect` assertions
45+
- **Python**: Use **pytest** with descriptive function names and `assert` statements
46+
- **Java/Kotlin**: Use **JUnit 5** with **AssertJ** for fluent assertions
47+
- **C#/.NET**: Use **xUnit** or **NUnit** with **FluentAssertions**
48+
- Apply parameterised/data-driven tests for multiple input scenarios from issue examples
49+
- Create shared test utilities for domain-specific validations outlined in issue
4850

4951
## Execution Guidelines
5052

agents/tdd-refactor.agent.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Improve code quality, apply security best practices, and enhance design whilst maintaining green tests and GitHub issue compliance."
33
name: "TDD Refactor Phase - Improve Quality & Security"
4-
tools: ["github", "findTestFiles", "edit/editFiles", "runTests", "runCommands", "codebase", "filesystem", "search", "problems", "testFailure", "terminalLastCommand"]
4+
tools: ["github/*", "search/fileSearch", "edit/editFiles", "execute/runTests", "execute/runInTerminal", "execute/getTerminalOutput", "execute/testFailure", "read/readFile", "read/terminalLastCommand", "read/terminalSelection", "read/problems", "search/codebase"]
55
---
66

77
# TDD Refactor Phase - Improve Quality & Security
@@ -39,24 +39,24 @@ Clean up code, apply security best practices, and enhance design whilst keeping
3939
- **Authentication/Authorisation** - Implement proper access controls if specified in issue
4040
- **Data protection** - Encrypt sensitive data, use secure connection strings
4141
- **Error handling** - Avoid information disclosure through exception details
42-
- **Dependency scanning** - Check for vulnerable NuGet packages
43-
- **Secrets management** - Use Azure Key Vault or user secrets, never hard-code credentials
42+
- **Dependency scanning** - Check for vulnerable packages (`npm audit`, `pip audit`, `dotnet list package --vulnerable`, etc.)
43+
- **Secrets management** - Use environment variables or a secrets manager; never hard-code credentials
4444
- **OWASP compliance** - Address security concerns mentioned in issue or related security tickets
4545

4646
### Design Excellence
4747

4848
- **Design patterns** - Apply appropriate patterns (Repository, Factory, Strategy, etc.)
49-
- **Dependency injection** - Use DI container for loose coupling
50-
- **Configuration management** - Externalise settings using IOptions pattern
51-
- **Logging and monitoring** - Add structured logging with Serilog for issue troubleshooting
52-
- **Performance optimisation** - Use async/await, efficient collections, caching
49+
- **Dependency injection** - Use DI container or constructor injection for loose coupling
50+
- **Configuration management** - Externalise settings using environment variables or config files
51+
- **Logging and monitoring** - Add structured logging appropriate to your stack for issue troubleshooting
52+
- **Performance optimisation** - Use async/await or equivalent concurrency primitives, efficient collections, caching
5353

54-
### C# Best Practices
54+
### Language Best Practices (Polyglot)
5555

56-
- **Nullable reference types** - Enable and properly configure nullability
57-
- **Modern C# features** - Use pattern matching, switch expressions, records
58-
- **Memory efficiency** - Consider Span<T>, Memory<T> for performance-critical code
59-
- **Exception handling** - Use specific exception types, avoid catching Exception
56+
- **Null safety** - Enable strict null checks (TypeScript), nullable reference types (C#), or Optional types (Java/Kotlin)
57+
- **Modern language features** - Use pattern matching, destructuring, and idiomatic constructs for your language
58+
- **Memory & performance** - Apply language-specific optimisations only when profiling reveals a bottleneck
59+
- **Error handling** - Use specific error/exception types; avoid swallowing errors silently
6060

6161
## Security Checklist
6262

0 commit comments

Comments
 (0)