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>
This commit is contained in:
ming
2026-04-13 09:02:14 +08:00
committed by GitHub
parent 30ed357edc
commit e37cd3123f
4 changed files with 26 additions and 24 deletions

View File

@@ -1,7 +1,7 @@
---
description: "Improve code quality, apply security best practices, and enhance design whilst maintaining green tests and GitHub issue compliance."
name: "TDD Refactor Phase - Improve Quality & Security"
tools: ["github", "findTestFiles", "edit/editFiles", "runTests", "runCommands", "codebase", "filesystem", "search", "problems", "testFailure", "terminalLastCommand"]
tools: ["github/*", "search/fileSearch", "edit/editFiles", "execute/runTests", "execute/runInTerminal", "execute/getTerminalOutput", "execute/testFailure", "read/readFile", "read/terminalLastCommand", "read/terminalSelection", "read/problems", "search/codebase"]
---
# TDD Refactor Phase - Improve Quality & Security
@@ -39,24 +39,24 @@ Clean up code, apply security best practices, and enhance design whilst keeping
- **Authentication/Authorisation** - Implement proper access controls if specified in issue
- **Data protection** - Encrypt sensitive data, use secure connection strings
- **Error handling** - Avoid information disclosure through exception details
- **Dependency scanning** - Check for vulnerable NuGet packages
- **Secrets management** - Use Azure Key Vault or user secrets, never hard-code credentials
- **Dependency scanning** - Check for vulnerable packages (`npm audit`, `pip audit`, `dotnet list package --vulnerable`, etc.)
- **Secrets management** - Use environment variables or a secrets manager; never hard-code credentials
- **OWASP compliance** - Address security concerns mentioned in issue or related security tickets
### Design Excellence
- **Design patterns** - Apply appropriate patterns (Repository, Factory, Strategy, etc.)
- **Dependency injection** - Use DI container for loose coupling
- **Configuration management** - Externalise settings using IOptions pattern
- **Logging and monitoring** - Add structured logging with Serilog for issue troubleshooting
- **Performance optimisation** - Use async/await, efficient collections, caching
- **Dependency injection** - Use DI container or constructor injection for loose coupling
- **Configuration management** - Externalise settings using environment variables or config files
- **Logging and monitoring** - Add structured logging appropriate to your stack for issue troubleshooting
- **Performance optimisation** - Use async/await or equivalent concurrency primitives, efficient collections, caching
### C# Best Practices
### Language Best Practices (Polyglot)
- **Nullable reference types** - Enable and properly configure nullability
- **Modern C# features** - Use pattern matching, switch expressions, records
- **Memory efficiency** - Consider Span<T>, Memory<T> for performance-critical code
- **Exception handling** - Use specific exception types, avoid catching Exception
- **Null safety** - Enable strict null checks (TypeScript), nullable reference types (C#), or Optional types (Java/Kotlin)
- **Modern language features** - Use pattern matching, destructuring, and idiomatic constructs for your language
- **Memory & performance** - Apply language-specific optimisations only when profiling reveals a bottleneck
- **Error handling** - Use specific error/exception types; avoid swallowing errors silently
## Security Checklist