feat(ci): add TDD bug-fix agent and triage cron#1938
Draft
Conversation
Add automated bug fixing via TDD approach: - Bug-fix agent workflow triggered by `auto-fix` label on Bug issues - Two-phase TDD: Opus writes failing test (red), Sonnet applies fix (green) - Up to 3 attempts per issue with 5 internal retries per phase - Hard gates verify test fails before fix and all checks pass after - Daily triage cron (Sonnet) evaluates open Bug issues for auto-fix suitability - Skips issues with comments, cross-repo fixes, and existing PRs - Only comments on issue after all 3 attempts are exhausted Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds automated bug fixing using a TDD approach with Claude Code agents:
_bug-fix-agent.yml): Triggered byauto-fixlabel on Bug issues. Two-phase TDD — Opus writes a failing test (red), Sonnet applies the minimum fix (green). Up to 3 attempts with 5 internal retries per phase.bug-fix-on-label.yml): Fires whenauto-fixlabel is added to a Bug issue.bug-triage-cron.yml): Daily (weekdays 8am UTC) Sonnet evaluates open Bug issues and labels suitable ones withauto-fix(max 3/day)..claude/skills/bug-fix-tdd/): Test patterns, placement rules, and workflow instructions for the agent.Key design decisions
continue-on-erroron TDD step ensures failure comment posts even on timeout${{ }}in run blocksConfiguration
Test plan
auto-fixlabel, verify agent creates PRauto-fixlabel, verify agent comments with analysis after 3 attemptsauto-fixlabel doesn't trigger if PR existsworkflow_dispatch), verify it only labels suitable issuesauto-fix-skiplabel, and cross-repo fixes🤖 Generated with Claude Code