|
| 1 | +# Implement GitHub Issue |
| 2 | + |
| 3 | +You are about to implement GitHub issue: $ARGUMENTS |
| 4 | + |
| 5 | +## Implementation Workflow |
| 6 | + |
| 7 | +### 1. Analyze the Issue |
| 8 | + |
| 9 | +```bash |
| 10 | +gh issue view $ARGUMENTS |
| 11 | +``` |
| 12 | + |
| 13 | +- Review the full issue description |
| 14 | +- If it contains Gherkin specs, parse acceptance criteria carefully |
| 15 | +- Identify non-goals and constraints |
| 16 | +- Note any technical requirements |
| 17 | + |
| 18 | +### 2. Research Codebase |
| 19 | + |
| 20 | +- Search for relevant existing code |
| 21 | +- Identify files needing modification |
| 22 | +- Look for similar patterns to maintain consistency |
| 23 | +- Review existing tests for patterns |
| 24 | + |
| 25 | +### 3. Plan Implementation |
| 26 | + |
| 27 | +Create a plan with: |
| 28 | + |
| 29 | +- Core functionality breakdown |
| 30 | +- Test strategy (unit + property-based) |
| 31 | +- Files to create/modify |
| 32 | +- Edge cases and risks |
| 33 | + |
| 34 | +### 4. Create Feature Branch |
| 35 | + |
| 36 | +```bash |
| 37 | +# Follow branch naming from CLAUDE.md |
| 38 | +git checkout -b <type>/<issue-number>-<description> |
| 39 | +# Example: feat/42-user-authentication |
| 40 | +``` |
| 41 | + |
| 42 | +### 5. Implement Solution |
| 43 | + |
| 44 | +- Follow patterns in CLAUDE.md (validation, testing, imports) |
| 45 | +- Write clean, focused functions |
| 46 | +- Add TypeScript types and Zod validation |
| 47 | +- Document public APIs with JSDoc |
| 48 | + |
| 49 | +### 6. Write Tests |
| 50 | + |
| 51 | +Required test coverage: |
| 52 | + |
| 53 | +- **Unit tests** in `tests/*.spec.ts` |
| 54 | +- **Property-based tests** in `tests/*.property.spec.ts` for business logic |
| 55 | +- Test both success and failure cases |
| 56 | +- Verify edge cases |
| 57 | + |
| 58 | +### 7. Verify Quality |
| 59 | + |
| 60 | +```bash |
| 61 | +pnpm verify # Runs all checks |
| 62 | +``` |
| 63 | + |
| 64 | +### 8. Create Changeset |
| 65 | + |
| 66 | +```bash |
| 67 | +pnpm changeset |
| 68 | +# Select: patch (fixes), minor (features), major (breaking) |
| 69 | +``` |
| 70 | + |
| 71 | +### 9. Commit Changes |
| 72 | + |
| 73 | +```bash |
| 74 | +git add . |
| 75 | +git commit -m "<type>: <description> |
| 76 | +
|
| 77 | +<body-if-needed> |
| 78 | +
|
| 79 | +Closes #<issue-number>" |
| 80 | +``` |
| 81 | + |
| 82 | +### 10. Create Pull Request |
| 83 | + |
| 84 | +```bash |
| 85 | +git push -u origin <branch-name> |
| 86 | + |
| 87 | +gh pr create \ |
| 88 | + --title "<type>: <description>" \ |
| 89 | + --body "## Summary |
| 90 | + <what-and-why> |
| 91 | +
|
| 92 | + ## Changes |
| 93 | + - <list-changes> |
| 94 | +
|
| 95 | + ## Testing |
| 96 | + - <how-tested> |
| 97 | +
|
| 98 | + Closes #<issue-number>" \ |
| 99 | + --assignee @me |
| 100 | +``` |
| 101 | + |
| 102 | +### 11. Monitor CI |
| 103 | + |
| 104 | +```bash |
| 105 | +gh pr checks --watch |
| 106 | +``` |
| 107 | + |
| 108 | +### 12. Address Feedback |
| 109 | + |
| 110 | +- Respond to review comments |
| 111 | +- Make requested changes |
| 112 | +- Re-verify after changes |
| 113 | + |
| 114 | +### 13. Merge PR |
| 115 | + |
| 116 | +```bash |
| 117 | +# After approval and passing checks |
| 118 | +gh pr merge --squash --delete-branch |
| 119 | +``` |
| 120 | + |
| 121 | +## Key Points |
| 122 | + |
| 123 | +- **Follow coding standards** in CLAUDE.md |
| 124 | +- **Test thoroughly** - Unit + property-based tests required |
| 125 | +- **Use changesets** for version management |
| 126 | +- **Conventional commits** for clear history |
| 127 | +- **Quality first** - All checks must pass |
| 128 | + |
| 129 | +## Success Checklist |
| 130 | + |
| 131 | +Before completing: |
| 132 | + |
| 133 | +- [ ] All acceptance criteria met |
| 134 | +- [ ] Tests comprehensive (unit + property) |
| 135 | +- [ ] `pnpm verify` passes |
| 136 | +- [ ] Documentation updated |
| 137 | +- [ ] Changeset created |
| 138 | +- [ ] PR reviewed and approved |
| 139 | + |
| 140 | +See CLAUDE.md for detailed patterns, troubleshooting, and coding standards. |
0 commit comments