|
| 1 | +# GitHub Issue Workflow |
| 2 | + |
| 3 | +You are an autonomous developer working through GitHub issues. Work with MINIMAL user interaction - only pause when user review/merge is required. |
| 4 | + |
| 5 | +## PHASE 1: Issue Selection |
| 6 | +1. Run `gh issue list --state open --limit 10` to show open issues |
| 7 | +2. If user provided an issue number, use that. Otherwise, present the list and ask which issue to work on. |
| 8 | +3. Run `gh issue view <number>` to get full details |
| 9 | +4. Briefly summarize the issue and START WORKING IMMEDIATELY - do not ask for confirmation. |
| 10 | + |
| 11 | +## PHASE 2: Development (AUTONOMOUS) |
| 12 | +1. Switch to main branch and pull latest: `git checkout main && git pull` |
| 13 | +2. Create feature branch: `git checkout -b feature/issue-<number>-<short-description>` |
| 14 | +3. For non-trivial tasks, use EnterPlanMode to plan implementation |
| 15 | +4. Implement the solution following CLAUDE.md guidelines |
| 16 | +5. Update CHANGELOG.md with the changes |
| 17 | +6. Run `task ci` and fix any issues until CI passes |
| 18 | +7. Commit changes with descriptive message referencing the issue |
| 19 | +8. Push branch and create PR with proper format |
| 20 | + |
| 21 | +## PHASE 3: Automated Testing (AUTONOMOUS) |
| 22 | +Automatically test based on the type of change: |
| 23 | + |
| 24 | +**For UI changes:** |
| 25 | +- Use dev-browser skill to navigate to the affected page |
| 26 | +- Test the specific functionality that was changed |
| 27 | +- Take screenshots if helpful |
| 28 | +- Document any issues found and fix them |
| 29 | + |
| 30 | +**For API/backend changes:** |
| 31 | +- If there's a UI component (like a download button), test it via dev-browser |
| 32 | +- Verify the fix works as expected |
| 33 | + |
| 34 | +**For PDF/report changes:** |
| 35 | +- Navigate to a scan results page |
| 36 | +- Click the PDF download button |
| 37 | +- Verify no errors occur |
| 38 | + |
| 39 | +**For form/validation changes:** |
| 40 | +- Navigate to the relevant form |
| 41 | +- Test with valid and invalid inputs |
| 42 | + |
| 43 | +Fix any issues found during testing, commit, and push. |
| 44 | + |
| 45 | +## PHASE 4: Automated Code Review (AUTONOMOUS) |
| 46 | +1. Run Task tool with subagent_type='pr-review-toolkit:code-reviewer' |
| 47 | +2. Run Task tool with subagent_type='pr-review-toolkit:silent-failure-hunter' |
| 48 | +3. If HIGH priority issues are found, fix them automatically |
| 49 | +4. For MEDIUM/LOW issues, use judgment - fix if straightforward, otherwise note them |
| 50 | +5. Push any fixes made |
| 51 | + |
| 52 | +## PHASE 5: User Review & Merge (WAIT FOR USER) |
| 53 | +Present a summary to the user: |
| 54 | +- What was implemented |
| 55 | +- What was tested |
| 56 | +- Code review results and any fixes made |
| 57 | +- PR link |
| 58 | + |
| 59 | +Then say: "PR is ready for your review and merge. I'll wait for the merge to complete." |
| 60 | + |
| 61 | +Wait for merge using: |
| 62 | +```bash |
| 63 | +while true; do |
| 64 | + pr_state=$(gh pr view <PR_NUMBER> --json state -q '.state') |
| 65 | + if [ "$pr_state" = "MERGED" ]; then |
| 66 | + echo "PR merged!" |
| 67 | + break |
| 68 | + fi |
| 69 | + sleep 10 |
| 70 | +done |
| 71 | +``` |
| 72 | + |
| 73 | +## PHASE 6: Next Issue (AFTER MERGE) |
| 74 | +1. Switch to main and pull: `git checkout main && git pull` |
| 75 | +2. Check for remaining open issues: `gh issue list --state open --limit 5` |
| 76 | +3. If there are open issues, suggest the next one to tackle: |
| 77 | + "Merge complete! Here are the remaining open issues: |
| 78 | + [list issues] |
| 79 | + |
| 80 | + I suggest we tackle #XX next because [reason]. Should I start working on it?" |
| 81 | +4. If user confirms, immediately start Phase 1 with that issue number. |
| 82 | + |
| 83 | +## Important Rules |
| 84 | +- Work AUTONOMOUSLY through phases 1-4 without asking for confirmation |
| 85 | +- Only pause at Phase 5 for user review/merge |
| 86 | +- Always follow CLAUDE.md guidelines |
| 87 | +- Never commit directly to main |
| 88 | +- Always run `task ci` before creating PR |
| 89 | +- Fix issues found by automated testing and review without asking |
| 90 | +- Be efficient - don't ask unnecessary questions |
0 commit comments