|
| 1 | +--- |
| 2 | +name: fast-forward-github-issues |
| 3 | +description: Iterates through all open GitHub issues in the repository and implements them one by one following a structured workflow. For each issue: creates a feature branch from main, implements the solution, creates or updates tests using fast-forward-tests, updates README with fast-forward-readme, updates docs with fast-forward-docs if applicable, and opens a pull request with Closes #<issue-number>. Triggers on requests like "implement issues", "work on issues", "handle all issues", "iterate through issues", "process issues", "implement all open issues". |
| 4 | +--- |
| 5 | + |
| 6 | +# Implement GitHub Issues |
| 7 | + |
| 8 | +This skill iterates through all open issues in the repository and implements them sequentially following a structured workflow. |
| 9 | + |
| 10 | +## Workflow Overview |
| 11 | + |
| 12 | +For each open issue: |
| 13 | + |
| 14 | +1. **Branching**: Create a new branch from `main` (never from another branch) |
| 15 | +2. **Implementation**: Implement the solution following the issue description and acceptance criteria |
| 16 | +3. **Commits**: Create well-structured commits with clear messages |
| 17 | +4. **Tests**: Create or update tests using the `fast-forward-tests` skill |
| 18 | +5. **Documentation**: Update README using `fast-forward-readme`, update docs using `fast-forward-docs` if applicable |
| 19 | +6. **Pull Request**: Open a PR targeting `main` with `Closes #<issue-number>` in the description |
| 20 | +7. **Issue Handling**: Never close issues directly; only reference via `Closes #<issue-number>` in PR |
| 21 | + |
| 22 | +## Global Rules |
| 23 | + |
| 24 | +- Everything must be written in English |
| 25 | +- Never branch from a non-main branch |
| 26 | +- Never accumulate work across issues in the same branch |
| 27 | +- Keep changes isolated per issue |
| 28 | +- Ensure code builds and tests pass before opening PR |
| 29 | + |
| 30 | +## Prerequisites |
| 31 | + |
| 32 | +Before starting, verify the repository context: |
| 33 | + |
| 34 | +- Ensure you are in the correct repository directory |
| 35 | +- Confirm `main` branch exists and is up-to-date |
| 36 | +- Verify GitHub CLI (`gh`) is authenticated |
| 37 | + |
| 38 | +## Step-by-Step Process |
| 39 | + |
| 40 | +### Step 1: List Open Issues |
| 41 | + |
| 42 | +Use the MCP tool `mcp__github__list_issues` to get all open issues: |
| 43 | + |
| 44 | +- State: `open` |
| 45 | +- Sort by: `created` (oldest first) or `updated` (most recently updated) |
| 46 | +- Per page: 100 (to get all issues) |
| 47 | + |
| 48 | +### Step 2: For Each Issue |
| 49 | + |
| 50 | +For each open issue, perform the following: |
| 51 | + |
| 52 | +#### 2.1 Read Issue Details |
| 53 | + |
| 54 | +Use `mcp__github__issue_read` to get the full issue content: |
| 55 | + |
| 56 | +- Title |
| 57 | +- Body/description |
| 58 | +- Labels |
| 59 | +- Assignees |
| 60 | +- Milestone |
| 61 | + |
| 62 | +#### 2.2 Create Branch |
| 63 | + |
| 64 | +Create a new branch from `main`: |
| 65 | + |
| 66 | +```bash |
| 67 | +git checkout main |
| 68 | +git pull origin main |
| 69 | +git checkout -b {type}/{issue-number}-{short-description} |
| 70 | +``` |
| 71 | + |
| 72 | +Branch naming convention: |
| 73 | + |
| 74 | +- `feature/123-description` for features |
| 75 | +- `fix/123-description` for bug fixes |
| 76 | +- `task/123-description` for tasks |
| 77 | + |
| 78 | +#### 2.3 Implement Solution |
| 79 | + |
| 80 | +Follow the issue description and acceptance criteria strictly: |
| 81 | + |
| 82 | +- Do not introduce unrelated changes |
| 83 | +- Keep implementation aligned with project architectural patterns |
| 84 | +- Write clean, maintainable code |
| 85 | + |
| 86 | +#### 2.4 Create Commits |
| 87 | + |
| 88 | +Create multiple well-structured commits: |
| 89 | + |
| 90 | +- Each commit represents a logical step |
| 91 | +- Clear, descriptive commit messages |
| 92 | +- Example: |
| 93 | + ```bash |
| 94 | + git add src/ChangedFile.php |
| 95 | + git commit -m "Add new feature for issue #123" |
| 96 | + ``` |
| 97 | + |
| 98 | +#### 2.5 Run Tests |
| 99 | + |
| 100 | +After implementation, run tests: |
| 101 | + |
| 102 | +```bash |
| 103 | +composer dev-tools tests |
| 104 | +``` |
| 105 | + |
| 106 | +If tests fail, fix the implementation before proceeding. |
| 107 | + |
| 108 | +#### 2.6 Create/Update Tests |
| 109 | + |
| 110 | +Use the `fast-forward-tests` skill to create or update tests: |
| 111 | + |
| 112 | +- Invoke the skill with `skill(name="fast-forward-tests")` |
| 113 | +- Follow the skill's workflow for test generation |
| 114 | + |
| 115 | +#### 2.7 Update Documentation |
| 116 | + |
| 117 | +If applicable: |
| 118 | + |
| 119 | +- Use `fast-forward-readme` skill for README updates |
| 120 | +- Use `fast-forward-docs` skill for Sphinx documentation |
| 121 | + |
| 122 | +#### 2.8 Ensure Code Quality |
| 123 | + |
| 124 | +Run the full dev-tools suite: |
| 125 | + |
| 126 | +```bash |
| 127 | +composer dev-tools |
| 128 | +``` |
| 129 | + |
| 130 | +Fix any issues found (code style, static analysis, etc.). |
| 131 | + |
| 132 | +#### 2.9 Push and Create PR |
| 133 | + |
| 134 | +```bash |
| 135 | +git push -u origin {branch-name} |
| 136 | +``` |
| 137 | + |
| 138 | +Create a pull request: |
| 139 | + |
| 140 | +- Target branch: `main` |
| 141 | +- Title: `[{type}] {issue-title}` |
| 142 | +- Description: |
| 143 | + ```markdown |
| 144 | + ## Summary |
| 145 | + Brief description of what was implemented. |
| 146 | + |
| 147 | + ## Changes |
| 148 | + - Change 1 |
| 149 | + - Change 2 |
| 150 | + |
| 151 | + ## Testing |
| 152 | + Describe testing approach and results. |
| 153 | + |
| 154 | + Closes #{issue-number} |
| 155 | + ``` |
| 156 | + |
| 157 | +**Important**: Include `Closes #<issue-number>` in the PR description so the issue is automatically closed only after the PR is merged. |
| 158 | + |
| 159 | +#### 2.10 Wait for Merge |
| 160 | + |
| 161 | +Wait for the PR to be merged before proceeding to the next issue. |
| 162 | + |
| 163 | +### Step 3: Iterate to Next Issue |
| 164 | + |
| 165 | +After a PR is merged, move to the next open issue and repeat the process. |
| 166 | + |
| 167 | +## Issue Processing Order |
| 168 | + |
| 169 | +Process issues in order of: |
| 170 | + |
| 171 | +1. Milestone (if any) |
| 172 | +2. Priority (if labels indicate priority) |
| 173 | +3. Creation date (oldest first) |
| 174 | + |
| 175 | +Skip issues that: |
| 176 | + |
| 177 | +- Are blocked by another open issue |
| 178 | +- Need more information from the reporter |
| 179 | +- Are marked as `wontfix` or `duplicate` |
| 180 | + |
| 181 | +## Notes |
| 182 | + |
| 183 | +- Never manually close issues - only through PR merge |
| 184 | +- Keep each branch focused on a single issue |
| 185 | +- If an issue is too large, consider breaking it into smaller tasks |
| 186 | +- Document any assumptions made during implementation |
| 187 | +- Reference related issues in commit messages when relevant |
0 commit comments