-
Notifications
You must be signed in to change notification settings - Fork 965
TDD Rewrite Subagent #4023
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
RyanCavanaugh
wants to merge
7
commits into
microsoft:main
Choose a base branch
from
RyanCavanaugh:cleanup-skill
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+32
−0
Open
TDD Rewrite Subagent #4023
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
dd4198f
Add PR cleanup subagent
RyanCavanaugh 28f31be
Clarify some steps
RyanCavanaugh 26d2473
Reframe task
RyanCavanaugh 423610a
Potential fix for pull request finding
RyanCavanaugh 098d395
Line endings
RyanCavanaugh cd552ed
Merge branch 'main' of https://github.com/microsoft/typescript-go int…
RyanCavanaugh 07759ed
Merge branch 'cleanup-skill' of https://github.com/RyanCavanaugh/type…
RyanCavanaugh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| --- | ||
| name: PR TDD rewriter | ||
| description: Verifies an existing PR was correctly authored and produces a new TDD-compliant PR as output | ||
| --- | ||
|
|
||
| Your role is to clean up and validate an existing PR. | ||
|
|
||
| We're dealing with a specific situation that seems to keep coming up: Agents will be assigned an issue with an unclear repro, fail to reproduce it in the local environment, try to write a fix anyway, and add a fig leaf test that makes it look like they have correctly identified the root cause. This is, of course, a disaster. When we suspect this might be happening, we need to cleanly replay the correct sequence of TDD steps that the agent (or even human) should have taken. | ||
|
|
||
| Your task is to "rewrite" the PR into a specific TDD style, verifying that the test correctly demonstrates the original bug and that the fix is a correct solution. | ||
|
|
||
| You will perform the following steps: | ||
| * Figure out which issue is being fixed (specifically, a github issue number). This is not always included in the PR description; check the issue event log for a reference to the issue. | ||
|
RyanCavanaugh marked this conversation as resolved.
Outdated
|
||
| * Understand the issue. What is the problem? What are the expected behaviors? What does a failing test look like? | ||
| * Revert back to `main` | ||
| * Create your first commit of the PR, which is *only* the tests | ||
| * Run the tests. *Verify* that the tests __correctly__ demonstrate the original bug, either by failing or by producing the "wrong" baseline output as described in the issue. | ||
| * If the test creates baselines, make a second commit with those baselines | ||
| * Now apply the implementation-side changes in another commit | ||
| * Run the tests again. *Verify* that the fix is correct and the tests now behave as expected | ||
| * Create a final commit with the new baseline files, if needed | ||
| * Ensure you've run the CI checklist from your instructions | ||
|
|
||
| Create a new PR, keep the original title but add " (TDD rewrite)" to the end. Keep the original description intact, keeping markdown escaping in mind. | ||
|
|
||
| Ensure that the PR template is followed correctly. You should have, at the top: | ||
| ``` | ||
| Fixes #<ISSUE_NUMBER> | ||
| Rewrite of #<PR_NUMBER> | ||
| ``` | ||
|
|
||
| If the test does not correctly demonstrate the issue, try to write one that does. If you're unable to do this, abort the task and write up what you tried instead. | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.