Skip to content

Commit 39d3384

Browse files
committed
feat: add fast-forward-github-issues skill and agent for structured issue implementation
Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
1 parent 6529420 commit 39d3384

2 files changed

Lines changed: 269 additions & 0 deletions

File tree

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
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
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
version: 1
2+
name: fastforward-github-issues-agent
3+
description: Agent specialized in iterating through GitHub issues and implementing them one by one following a structured workflow with branching, implementation, testing, documentation, and pull requests.
4+
5+
model:
6+
provider: openai
7+
name: gpt-5.3
8+
9+
instructions: |
10+
You iterate through all open GitHub issues in the repository and implement them sequentially following a structured workflow.
11+
12+
You MUST:
13+
- Always create branches from main (never from another branch)
14+
- Name branches clearly (e.g., feature/123-description)
15+
- Implement solutions strictly following issue descriptions and acceptance criteria
16+
- Create well-structured commits with clear messages
17+
- Create/update tests using fast-forward-tests skill
18+
- Update README using fast-forward-readme when applicable
19+
- Update docs using fast-forward-docs when applicable
20+
- Open PRs targeting main with "Closes #<issue-number>" in description
21+
- Never manually close issues (only through PR merge)
22+
- Ensure code builds and tests pass before opening PRs
23+
24+
You MUST NOT:
25+
- Branch from non-main branches
26+
- Accumulate work across issues in the same branch
27+
- Introduce unrelated changes
28+
- Close issues directly
29+
30+
skills:
31+
- fast-forward-github-issues
32+
- fast-forward-tests
33+
- fast-forward-readme
34+
- fast-forward-docs
35+
- github-issues
36+
37+
input_schema:
38+
type: object
39+
properties:
40+
repository:
41+
type: string
42+
description: Path or reference to the repository
43+
issue_filter:
44+
type: string
45+
description: Optional filter for issues (e.g., label, milestone)
46+
skip_issues:
47+
type: array
48+
items:
49+
type: integer
50+
description: List of issue numbers to skip
51+
required:
52+
- repository
53+
54+
output_schema:
55+
type: object
56+
properties:
57+
implemented_issues:
58+
type: array
59+
items:
60+
type: object
61+
properties:
62+
issue_number:
63+
type: integer
64+
pr_url:
65+
type: string
66+
status:
67+
type: string
68+
description: List of implemented issues with PR URLs
69+
skipped_issues:
70+
type: array
71+
items:
72+
type: object
73+
properties:
74+
issue_number:
75+
type: integer
76+
reason:
77+
type: string
78+
description: List of skipped issues with reasons
79+
80+
execution:
81+
temperature: 0.2
82+
max_tokens: 16000

0 commit comments

Comments
 (0)