chore: add PR reviewer and TDD refactor agent files#1515
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1515 +/- ##
=======================================
Coverage 99.91% 99.91%
=======================================
Files 6 6
Lines 1164 1164
Branches 156 156
=======================================
Hits 1163 1163
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds two GitHub agent definition files under .github/agents/ to standardize (1) how contributors perform pre-PR code reviews and (2) how TDD refactor phases are executed with quality/security guardrails, aligned to repository practices.
Changes:
- Added a “PR Reviewer” agent with constraints, checklist, and a required output format for reviewing diffs before opening/updating PRs.
- Added a “TDD Refactor Phase” agent describing refactoring principles, security hardening, and issue-compliance steps.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/agents/pr-review.agent.md |
Adds a structured PR review workflow, checklist, and output format. |
.github/agents/tdd-refactor.agent.md |
Adds a TDD refactor workflow with quality/security guidance and execution checklist. |
Comment on lines
+2
to
+4
| 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/*", "search/fileSearch", "edit/editFiles", "execute/runTests", "execute/runInTerminal", "execute/getTerminalOutput", "execute/testFailure", "read/readFile", "read/terminalLastCommand", "read/terminalSelection", "read/problems", "search/codebase"] |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This pull request introduces two new agent configuration files to the
.github/agentsdirectory, defining detailed instructions for code review and TDD-driven refactoring workflows. The primary goal is to formalize and automate best practices for code quality, security, and review processes in the repository.The most important changes are:
Agent Definitions for Review and Refactoring:
.github/agents/pr-review.agent.mdto provide a comprehensive, constraint-driven checklist and review process for code changes, ensuring reviews are minimal, lean, idiomatic, and well-tested, with explicit output formatting and validation instructions..github/agents/tdd-refactor.agent.mdto define a structured workflow for TDD-based refactoring, emphasizing code quality, security best practices, design improvements, and compliance with GitHub issue requirements, including detailed checklists and execution guidelines.