forge-workflow 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/check.md +145 -0
- package/.claude/commands/dev.md +184 -0
- package/.claude/commands/merge.md +170 -0
- package/.claude/commands/plan.md +141 -0
- package/.claude/commands/research.md +125 -0
- package/.claude/commands/review.md +393 -0
- package/.claude/commands/ship.md +120 -0
- package/.claude/commands/sonarcloud.md +156 -0
- package/.claude/commands/status.md +76 -0
- package/.claude/commands/verify.md +185 -0
- package/.claude/rules/workflow.md +98 -0
- package/.claude/scripts/load-env.sh +32 -0
- package/.claude/skills/parallel-ai/README.md +135 -0
- package/.claude/skills/parallel-ai/SKILL.md +94 -0
- package/.claude/skills/parallel-ai/api-reference.md +141 -0
- package/.claude/skills/parallel-ai/quick-reference.md +100 -0
- package/.claude/skills/parallel-ai/research-workflows.md +77 -0
- package/.claude/skills/sonarcloud/SKILL.md +154 -0
- package/.claude/skills/sonarcloud/reference.md +466 -0
- package/README.md +205 -0
- package/bin/forge.js +140 -0
- package/docs/WORKFLOW.md +251 -0
- package/docs/research/TEMPLATE.md +292 -0
- package/install.sh +88 -0
- package/package.json +36 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Deep research with parallel-ai, document findings
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Research a feature comprehensively using codebase exploration and web research.
|
|
6
|
+
|
|
7
|
+
# Research
|
|
8
|
+
|
|
9
|
+
This command performs comprehensive research before planning a feature.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
/research <feature-name>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## What This Command Does
|
|
18
|
+
|
|
19
|
+
### Step 1: Codebase Research
|
|
20
|
+
Use the Explore agent to:
|
|
21
|
+
- Search for similar patterns/implementations
|
|
22
|
+
- Identify affected files and modules
|
|
23
|
+
- Check existing tests and test infrastructure
|
|
24
|
+
- Find integration points
|
|
25
|
+
- Review similar features
|
|
26
|
+
|
|
27
|
+
### Step 2: Web Research (MANDATORY: parallel-ai skill)
|
|
28
|
+
Use the `parallel-ai` skill for:
|
|
29
|
+
|
|
30
|
+
**Best Practices**:
|
|
31
|
+
- "Next.js 16 [feature] best practices 2026"
|
|
32
|
+
- "Supabase [feature] implementation patterns"
|
|
33
|
+
- "TypeScript [feature] production patterns"
|
|
34
|
+
|
|
35
|
+
**Security Research**:
|
|
36
|
+
- "OWASP Top 10 risks for [feature] 2026"
|
|
37
|
+
- "[Feature] security vulnerabilities common attacks"
|
|
38
|
+
- "Secure [feature] implementation checklist"
|
|
39
|
+
- "[Library/framework] security best practices"
|
|
40
|
+
- "CVEs related to [feature] vulnerability"
|
|
41
|
+
|
|
42
|
+
**Known Issues**:
|
|
43
|
+
- GitHub issues/discussions
|
|
44
|
+
- Stack Overflow solutions
|
|
45
|
+
- Common pitfalls and gotchas
|
|
46
|
+
- Security advisories
|
|
47
|
+
|
|
48
|
+
**Library Documentation** (Context7 MCP):
|
|
49
|
+
- Official API references
|
|
50
|
+
- Migration guides
|
|
51
|
+
- Code examples
|
|
52
|
+
- Security guidelines
|
|
53
|
+
|
|
54
|
+
**Case Studies**:
|
|
55
|
+
- Real-world implementations
|
|
56
|
+
- Blog posts from production use
|
|
57
|
+
- Community tutorials
|
|
58
|
+
- Security incident reports
|
|
59
|
+
|
|
60
|
+
### Step 3: Document Research
|
|
61
|
+
Save to `docs/research/<feature-slug>.md` with:
|
|
62
|
+
- **Objective**: What we're trying to achieve
|
|
63
|
+
- **Codebase Analysis**: Existing patterns, affected modules, test infrastructure
|
|
64
|
+
- **Web Research**: Best practices, known issues, library docs (with sources)
|
|
65
|
+
- **Key Decisions & Reasoning**: What, why, evidence, alternatives
|
|
66
|
+
- **TDD Test Scenarios**: Test files, assertions, test data
|
|
67
|
+
- **Security Analysis**: OWASP Top 10 + feature-specific risks
|
|
68
|
+
- **Scope Assessment**: Tactical/Strategic, complexity, parallelization
|
|
69
|
+
|
|
70
|
+
## Research Template
|
|
71
|
+
|
|
72
|
+
See `docs/research/TEMPLATE.md` for the complete template structure.
|
|
73
|
+
|
|
74
|
+
## Example Output
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
✓ Codebase Research: Complete
|
|
78
|
+
- Found: 3 similar payment integrations
|
|
79
|
+
- Affected: 8 files across 4 modules
|
|
80
|
+
- Tests: Existing payment test harness available
|
|
81
|
+
|
|
82
|
+
✓ Web Research (parallel-ai): Complete
|
|
83
|
+
- Best practices: 12 sources reviewed
|
|
84
|
+
- Known issues: 5 gotchas identified
|
|
85
|
+
- Documentation: Context7 Stripe SDK reviewed
|
|
86
|
+
- Case studies: 3 production implementations analyzed
|
|
87
|
+
|
|
88
|
+
✓ Research Document: docs/research/stripe-billing-integration.md
|
|
89
|
+
- Codebase analysis: ✓
|
|
90
|
+
- Web research: ✓
|
|
91
|
+
- Key decisions: 8 documented with reasoning
|
|
92
|
+
- TDD scenarios: 4 identified
|
|
93
|
+
- Security analysis: OWASP Top 10 completed
|
|
94
|
+
- Scope: Strategic (architecture change)
|
|
95
|
+
|
|
96
|
+
✓ Key Decision Example:
|
|
97
|
+
Decision: Use Stripe SDK v4 (not v3)
|
|
98
|
+
Reasoning: v4 has built-in retry logic and better TypeScript types
|
|
99
|
+
Evidence: Stripe migration guide + 3 blog posts on production experience
|
|
100
|
+
Alternatives: v3 (rejected due to manual retry handling)
|
|
101
|
+
|
|
102
|
+
Next: /plan stripe-billing-integration
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Integration with Workflow
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
1. /status → Understand current context
|
|
109
|
+
2. /research <name> → Research and document (you are here)
|
|
110
|
+
3. /plan <feature-slug> → Create plan and tracking
|
|
111
|
+
4. /dev → Implement with TDD
|
|
112
|
+
5. /check → Validate
|
|
113
|
+
6. /ship → Create PR
|
|
114
|
+
7. /review → Address comments
|
|
115
|
+
8. /merge → Merge and cleanup
|
|
116
|
+
9. /verify → Final documentation check
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Tips
|
|
120
|
+
|
|
121
|
+
- **Always use parallel-ai**: Never skip web research
|
|
122
|
+
- **Document sources**: Include URLs for all research
|
|
123
|
+
- **Identify TDD scenarios upfront**: Tests before implementation
|
|
124
|
+
- **Security first**: OWASP Top 10 analysis is mandatory
|
|
125
|
+
- **Evidence-based decisions**: Every decision needs reasoning + evidence
|
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Address ALL PR issues (GitHub Actions, Greptile, SonarCloud, CI/CD)
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Process ALL pull request issues including GitHub Actions failures, Greptile inline comments, SonarCloud analysis, and other CI/CD checks.
|
|
6
|
+
|
|
7
|
+
# Review
|
|
8
|
+
|
|
9
|
+
This command handles ALL issues that arise after creating a pull request.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
/review <pr-number>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## What This Command Does
|
|
18
|
+
|
|
19
|
+
### Step 1: Fetch Complete PR Status
|
|
20
|
+
```bash
|
|
21
|
+
# Get full PR details including all checks
|
|
22
|
+
gh pr view <pr-number> --json number,url,isDraft,reviews,statusCheckRollup,comments
|
|
23
|
+
|
|
24
|
+
# Check individual status checks
|
|
25
|
+
gh pr checks <pr-number>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Review ALL status checks:
|
|
29
|
+
- GitHub Actions workflows
|
|
30
|
+
- Greptile code review (inline comments + summary)
|
|
31
|
+
- SonarCloud quality gate
|
|
32
|
+
- Any other CI/CD integrations
|
|
33
|
+
- Vercel deployments
|
|
34
|
+
- Security scanners
|
|
35
|
+
|
|
36
|
+
### Step 2: Address GitHub Actions Failures
|
|
37
|
+
|
|
38
|
+
If any GitHub Actions workflows fail:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# View failed workflow logs
|
|
42
|
+
gh run view <run-id> --log-failed
|
|
43
|
+
|
|
44
|
+
# Identify failure cause:
|
|
45
|
+
# - Build failures
|
|
46
|
+
# - Test failures
|
|
47
|
+
# - Lint/type check failures
|
|
48
|
+
# - Deployment failures
|
|
49
|
+
# - Security scan failures
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**For each failure**:
|
|
53
|
+
1. **Analyze the error**: Read logs to understand root cause
|
|
54
|
+
2. **Fix the issue**: Make necessary code changes
|
|
55
|
+
3. **Re-run checks**: GitHub Actions will auto-rerun on push
|
|
56
|
+
4. **Document fix**: Note what was fixed in commit message
|
|
57
|
+
|
|
58
|
+
**Common GitHub Actions Issues**:
|
|
59
|
+
- Build failures: Missing dependencies, compilation errors
|
|
60
|
+
- Test failures: Failing test cases (should not happen if /check passed)
|
|
61
|
+
- Lint failures: Code style violations
|
|
62
|
+
- Type failures: TypeScript type errors
|
|
63
|
+
- Deployment failures: Env vars, configuration issues
|
|
64
|
+
|
|
65
|
+
### Step 3: Process Greptile Review
|
|
66
|
+
|
|
67
|
+
Greptile provides TWO types of feedback:
|
|
68
|
+
1. **Inline comments** on specific code lines
|
|
69
|
+
2. **Summary** with overall recommendations
|
|
70
|
+
|
|
71
|
+
#### 3A. Check Greptile Inline Comments
|
|
72
|
+
```bash
|
|
73
|
+
# View all PR comments (includes Greptile inline comments)
|
|
74
|
+
gh pr view <pr-number> --comments --json comments
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
For each Greptile inline comment:
|
|
78
|
+
- **What Greptile does**: AI code review bot that provides context-aware suggestions
|
|
79
|
+
- **How it helps**: Catches bugs, suggests improvements, identifies security issues, recommends best practices
|
|
80
|
+
|
|
81
|
+
Categorize each comment:
|
|
82
|
+
- **Valid**: Should be implemented (security issue, bug, clear improvement)
|
|
83
|
+
- **Invalid**: Greptile misunderstood context
|
|
84
|
+
- **Conflicting**: Contradicts research decisions with good reason
|
|
85
|
+
- **Out of scope**: Valid but not for this PR
|
|
86
|
+
|
|
87
|
+
#### 3B. Check Greptile Summary
|
|
88
|
+
```bash
|
|
89
|
+
# Greptile usually posts a summary comment on the PR
|
|
90
|
+
# Review the overall assessment and recommendations
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The summary typically includes:
|
|
94
|
+
- Overall code quality assessment
|
|
95
|
+
- Key issues to address
|
|
96
|
+
- Security concerns
|
|
97
|
+
- Performance considerations
|
|
98
|
+
- Best practice violations
|
|
99
|
+
|
|
100
|
+
### Step 4: Analyze SonarCloud (via sonarcloud skill)
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# Use sonarcloud skill to query PR-specific issues
|
|
104
|
+
/sonarcloud
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**What SonarCloud does**: Static code analysis for quality, security, and maintainability
|
|
108
|
+
|
|
109
|
+
**How it helps**:
|
|
110
|
+
- Identifies code smells and technical debt
|
|
111
|
+
- Finds security vulnerabilities (complementing OWASP Top 10)
|
|
112
|
+
- Calculates code coverage
|
|
113
|
+
- Tracks code duplication
|
|
114
|
+
- Assesses maintainability
|
|
115
|
+
|
|
116
|
+
**Query PR-specific data**:
|
|
117
|
+
- Quality gate status (pass/fail)
|
|
118
|
+
- New issues introduced in this PR
|
|
119
|
+
- Security hotspots
|
|
120
|
+
- Code coverage changes
|
|
121
|
+
- Technical debt added
|
|
122
|
+
|
|
123
|
+
**Prioritize issues**:
|
|
124
|
+
1. **Blocker/Critical**: Must fix before merge
|
|
125
|
+
2. **Major**: Should fix if valid
|
|
126
|
+
3. **Minor/Info**: Optional improvements
|
|
127
|
+
|
|
128
|
+
### Step 5: Check Other CI/CD Tools
|
|
129
|
+
|
|
130
|
+
Review any other automated checks:
|
|
131
|
+
- **Vercel**: Preview deployment successful?
|
|
132
|
+
- **Security scanners**: Any vulnerabilities detected?
|
|
133
|
+
- **Custom scripts**: Any failures?
|
|
134
|
+
- **Dependency checks**: Outdated or vulnerable packages?
|
|
135
|
+
|
|
136
|
+
### Step 6: Categorize and Prioritize ALL Issues
|
|
137
|
+
|
|
138
|
+
Create a master list of all issues from:
|
|
139
|
+
- GitHub Actions failures
|
|
140
|
+
- Greptile inline comments
|
|
141
|
+
- Greptile summary recommendations
|
|
142
|
+
- SonarCloud issues
|
|
143
|
+
- Other CI/CD tool failures
|
|
144
|
+
|
|
145
|
+
Prioritize by:
|
|
146
|
+
1. **Critical**: Blocks merge (failing tests, security vulnerabilities, build failures)
|
|
147
|
+
2. **High**: Should address (valid bugs, important improvements)
|
|
148
|
+
3. **Medium**: Optional but valuable (code quality, best practices)
|
|
149
|
+
4. **Low**: Nice to have (minor refactorings, style suggestions)
|
|
150
|
+
|
|
151
|
+
### Step 7: Address Issues Systematically
|
|
152
|
+
|
|
153
|
+
For **GitHub Actions failures** (Critical):
|
|
154
|
+
```bash
|
|
155
|
+
# Fix the issue
|
|
156
|
+
# Commit with clear description
|
|
157
|
+
git add .
|
|
158
|
+
git commit -m "fix: resolve GitHub Actions failure in <workflow-name>
|
|
159
|
+
|
|
160
|
+
- Fixed: [specific issue]
|
|
161
|
+
- Root cause: [explanation]
|
|
162
|
+
- Solution: [what was changed]"
|
|
163
|
+
|
|
164
|
+
git push
|
|
165
|
+
# Actions will auto-rerun
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
For **Greptile inline comments** (Valid):
|
|
169
|
+
```bash
|
|
170
|
+
# Fix the issue
|
|
171
|
+
# Reply to inline comment (NOT separate comment)
|
|
172
|
+
gh pr comment <pr-number> --body-file - <<EOF
|
|
173
|
+
**Addressing comment on <file>:<line>**
|
|
174
|
+
|
|
175
|
+
✓ Fixed: [description of change]
|
|
176
|
+
Commit: <commit-sha>
|
|
177
|
+
|
|
178
|
+
[Optional: reasoning if decision was reconsidered]
|
|
179
|
+
EOF
|
|
180
|
+
|
|
181
|
+
# Mark comment as resolved (via GitHub web or API)
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
For **Greptile inline comments** (Invalid/Conflicting):
|
|
185
|
+
```bash
|
|
186
|
+
# Reply with reasoning
|
|
187
|
+
gh pr comment <pr-number> --body-file - <<EOF
|
|
188
|
+
**Re: comment on <file>:<line>**
|
|
189
|
+
|
|
190
|
+
This approach is correct because:
|
|
191
|
+
- Reasoning: [from research doc]
|
|
192
|
+
- Evidence: [link to research source]
|
|
193
|
+
- Alternative considered: [what Greptile suggested]
|
|
194
|
+
- Why rejected: [specific reason]
|
|
195
|
+
|
|
196
|
+
See: docs/research/<feature-slug>.md (Decision #X)
|
|
197
|
+
EOF
|
|
198
|
+
|
|
199
|
+
# Mark comment as resolved
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
For **Greptile summary recommendations**:
|
|
203
|
+
```bash
|
|
204
|
+
# Add a PR comment addressing the summary
|
|
205
|
+
gh pr comment <pr-number> --body "## Greptile Summary Response
|
|
206
|
+
|
|
207
|
+
Addressed all key recommendations:
|
|
208
|
+
- [Recommendation 1]: ✓ Fixed in commit <sha>
|
|
209
|
+
- [Recommendation 2]: ✓ Explained (see inline response)
|
|
210
|
+
- [Recommendation 3]: ⏭️ Out of scope for this PR (created issue bd-xxx)
|
|
211
|
+
|
|
212
|
+
All critical and high-priority items resolved."
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
For **SonarCloud issues** (via sonarcloud skill):
|
|
216
|
+
```bash
|
|
217
|
+
# For critical/blocker issues: Fix immediately
|
|
218
|
+
# For security vulnerabilities: Fix immediately
|
|
219
|
+
# For code smells: Fix if valid, justify if not
|
|
220
|
+
|
|
221
|
+
# After fixes, SonarCloud will re-analyze on next push
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
For **other CI/CD failures**:
|
|
225
|
+
```bash
|
|
226
|
+
# Debug the specific tool's logs
|
|
227
|
+
# Fix the underlying issue
|
|
228
|
+
# Commit and push
|
|
229
|
+
# Verify the check passes
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Step 8: Commit ALL Fixes
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
git add .
|
|
236
|
+
git commit -m "fix: address ALL PR review feedback
|
|
237
|
+
|
|
238
|
+
GitHub Actions:
|
|
239
|
+
- Fixed: [list of workflow failures resolved]
|
|
240
|
+
|
|
241
|
+
Greptile:
|
|
242
|
+
- Fixed: [list of valid inline comments addressed]
|
|
243
|
+
- Explained: [list of invalid comments with reasoning]
|
|
244
|
+
- Summary: [key recommendations addressed]
|
|
245
|
+
|
|
246
|
+
SonarCloud:
|
|
247
|
+
- Fixed: [security vulnerabilities and critical issues]
|
|
248
|
+
- Justified: [code smells that are intentional]
|
|
249
|
+
|
|
250
|
+
Other CI/CD:
|
|
251
|
+
- Fixed: [any other tool failures]
|
|
252
|
+
|
|
253
|
+
All review feedback resolved, all checks passing."
|
|
254
|
+
|
|
255
|
+
git push
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Step 9: Verify ALL Checks Pass
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
# Wait for checks to complete
|
|
262
|
+
gh pr checks <pr-number>
|
|
263
|
+
|
|
264
|
+
# Ensure all status checks are green:
|
|
265
|
+
# ✓ GitHub Actions workflows
|
|
266
|
+
# ✓ Greptile review (no unresolved critical comments)
|
|
267
|
+
# ✓ SonarCloud quality gate
|
|
268
|
+
# ✓ Other CI/CD checks
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Step 10: Update Beads
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
bd update <id> --comment "PR review complete: all issues addressed, all checks passing"
|
|
275
|
+
bd sync
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
## Example Output
|
|
279
|
+
|
|
280
|
+
```
|
|
281
|
+
✓ GitHub Actions: 3 workflows
|
|
282
|
+
- Build: ✓ Passing (was failing, fixed missing dependency)
|
|
283
|
+
- Tests: ✓ Passing
|
|
284
|
+
- Deploy Preview: ✓ Passing
|
|
285
|
+
|
|
286
|
+
✓ Greptile Review:
|
|
287
|
+
Inline Comments: 8 total
|
|
288
|
+
- Valid: 5 → Fixed & replied inline
|
|
289
|
+
- Invalid: 2 → Explained with research evidence & replied inline
|
|
290
|
+
- Out of scope: 1 → Noted for future work & replied inline
|
|
291
|
+
- All marked resolved ✓
|
|
292
|
+
|
|
293
|
+
Summary:
|
|
294
|
+
- Key recommendations: 3/3 addressed
|
|
295
|
+
- Overall assessment: Ready for merge
|
|
296
|
+
- Posted summary response comment ✓
|
|
297
|
+
|
|
298
|
+
✓ SonarCloud (via sonarcloud skill):
|
|
299
|
+
Quality Gate: ✓ Passing
|
|
300
|
+
Issues: 3 total
|
|
301
|
+
- Security: 1 → Fixed (SQL injection risk)
|
|
302
|
+
- Code smells: 2 → 1 fixed, 1 justified
|
|
303
|
+
- Coverage: Maintained at 85%
|
|
304
|
+
|
|
305
|
+
✓ Vercel Preview: ✓ Deployed successfully
|
|
306
|
+
✓ Security Scan: ✓ No vulnerabilities
|
|
307
|
+
|
|
308
|
+
✓ All Issues Addressed:
|
|
309
|
+
- Critical: 2/2 fixed (GitHub Actions build, SonarCloud security)
|
|
310
|
+
- High: 5/5 fixed (Greptile valid comments)
|
|
311
|
+
- Medium: 3/3 addressed (1 fixed, 2 explained)
|
|
312
|
+
- Low: 0 (none found)
|
|
313
|
+
|
|
314
|
+
✓ Fixes committed: 3c4d5e6
|
|
315
|
+
✓ All checks passing: ✓
|
|
316
|
+
✓ Beads updated: Ready for merge
|
|
317
|
+
|
|
318
|
+
Next: /merge <pr-number> (user approval required)
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
## Integration with Workflow
|
|
322
|
+
|
|
323
|
+
```
|
|
324
|
+
1. /status → Understand current context
|
|
325
|
+
2. /research <name> → Research and document
|
|
326
|
+
3. /plan <feature-slug> → Create plan and tracking
|
|
327
|
+
4. /dev → Implement with TDD
|
|
328
|
+
5. /check → Validate
|
|
329
|
+
6. /ship → Create PR
|
|
330
|
+
7. /review → Address ALL PR issues (you are here)
|
|
331
|
+
8. /merge → Merge and cleanup
|
|
332
|
+
9. /verify → Final documentation check
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
## Understanding the Tools
|
|
336
|
+
|
|
337
|
+
### Greptile
|
|
338
|
+
- **What it is**: AI-powered code review bot
|
|
339
|
+
- **How it helps**:
|
|
340
|
+
- Context-aware code analysis
|
|
341
|
+
- Catches bugs and security issues
|
|
342
|
+
- Suggests improvements and best practices
|
|
343
|
+
- Provides inline comments and summary
|
|
344
|
+
- **How to use feedback**:
|
|
345
|
+
- Inline comments: Address specific code issues
|
|
346
|
+
- Summary: Get overall assessment and key recommendations
|
|
347
|
+
- Reply directly to each comment (not separate)
|
|
348
|
+
- Mark resolved after addressing
|
|
349
|
+
|
|
350
|
+
### SonarCloud (via sonarcloud skill)
|
|
351
|
+
- **What it is**: Static code analysis platform
|
|
352
|
+
- **How it helps**:
|
|
353
|
+
- Quality gate enforcement
|
|
354
|
+
- Security vulnerability detection
|
|
355
|
+
- Code smell identification
|
|
356
|
+
- Technical debt tracking
|
|
357
|
+
- Test coverage analysis
|
|
358
|
+
- **How to use the skill**:
|
|
359
|
+
- Query PR-specific issues
|
|
360
|
+
- Get quality metrics
|
|
361
|
+
- Identify security hotspots
|
|
362
|
+
- Track code coverage changes
|
|
363
|
+
- **Prioritization**:
|
|
364
|
+
- Blocker/Critical: Must fix
|
|
365
|
+
- Major: Should fix if valid
|
|
366
|
+
- Minor/Info: Optional
|
|
367
|
+
|
|
368
|
+
### GitHub Actions
|
|
369
|
+
- **What it is**: CI/CD automation platform
|
|
370
|
+
- **How it helps**:
|
|
371
|
+
- Automated testing
|
|
372
|
+
- Build verification
|
|
373
|
+
- Deployment automation
|
|
374
|
+
- Security scanning
|
|
375
|
+
- Quality checks
|
|
376
|
+
- **Common failures**:
|
|
377
|
+
- Build: Dependencies, compilation
|
|
378
|
+
- Tests: Failing test cases
|
|
379
|
+
- Lint: Code style violations
|
|
380
|
+
- Deploy: Configuration issues
|
|
381
|
+
|
|
382
|
+
## Tips
|
|
383
|
+
|
|
384
|
+
- **Address ALL issues**: Not just Greptile and SonarCloud
|
|
385
|
+
- **Prioritize critical**: Fix blockers first (GitHub Actions failures, security issues)
|
|
386
|
+
- **Reply inline to Greptile**: Respond to each comment directly
|
|
387
|
+
- **Post summary response**: Address Greptile's overall assessment
|
|
388
|
+
- **Use sonarcloud skill**: Don't just check the web UI
|
|
389
|
+
- **Verify all checks**: Ensure everything is green before /merge
|
|
390
|
+
- **Update Beads**: Keep issue status current
|
|
391
|
+
- **Research if needed**: Use parallel-ai for unclear suggestions
|
|
392
|
+
- **Document fixes**: Clear commit messages for all fixes
|
|
393
|
+
- **Don't leave unresolved**: Address every comment and check
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create PR with comprehensive documentation
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Push code and create a pull request with full context and documentation links.
|
|
6
|
+
|
|
7
|
+
# Ship
|
|
8
|
+
|
|
9
|
+
This command creates a PR after validation passes.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
/ship
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## What This Command Does
|
|
18
|
+
|
|
19
|
+
### Step 1: Verify /check Passed
|
|
20
|
+
Ensure all validation completed successfully.
|
|
21
|
+
|
|
22
|
+
### Step 2: Update Beads
|
|
23
|
+
```bash
|
|
24
|
+
bd update <id> --status done
|
|
25
|
+
bd sync
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Step 3: Push Branch
|
|
29
|
+
```bash
|
|
30
|
+
git push -u origin <branch-name>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Step 4: Create PR
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
gh pr create --title "feat: <feature-name>" --body "$(cat <<'EOF'
|
|
37
|
+
## Summary
|
|
38
|
+
[Auto-generated from commits and research doc]
|
|
39
|
+
|
|
40
|
+
## Research
|
|
41
|
+
See: docs/research/<feature-slug>.md
|
|
42
|
+
|
|
43
|
+
## Beads Issue
|
|
44
|
+
Closes: <issue-id>
|
|
45
|
+
|
|
46
|
+
## OpenSpec (if strategic)
|
|
47
|
+
See: openspec/changes/<feature-slug>/
|
|
48
|
+
|
|
49
|
+
## Key Decisions
|
|
50
|
+
[From research doc - 3-5 key decisions with reasoning]
|
|
51
|
+
|
|
52
|
+
## TDD Test Coverage
|
|
53
|
+
- Unit tests: [count] tests, [X] scenarios
|
|
54
|
+
- Integration tests: [count] tests
|
|
55
|
+
- E2E tests: [count] tests
|
|
56
|
+
- All tests passing ✓
|
|
57
|
+
|
|
58
|
+
## Security Review
|
|
59
|
+
- OWASP Top 10: All mitigations implemented
|
|
60
|
+
- Security tests: [count] scenarios passing
|
|
61
|
+
- Automated scan: No vulnerabilities
|
|
62
|
+
|
|
63
|
+
## Test Plan
|
|
64
|
+
- [x] Type check passing
|
|
65
|
+
- [x] Lint passing
|
|
66
|
+
- [x] Code review passing
|
|
67
|
+
- [x] E2E tests passing
|
|
68
|
+
- [x] Security review completed
|
|
69
|
+
|
|
70
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
71
|
+
EOF
|
|
72
|
+
)"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Example Output
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
✓ Validation: /check passed
|
|
79
|
+
✓ Beads: Marked done & synced (bd-x7y2)
|
|
80
|
+
✓ Pushed: feat/stripe-billing
|
|
81
|
+
✓ PR created: https://github.com/.../pull/123
|
|
82
|
+
- Beads linked: bd-x7y2
|
|
83
|
+
- OpenSpec linked: openspec/changes/stripe-billing/
|
|
84
|
+
- Research linked: docs/research/stripe-billing.md
|
|
85
|
+
- Test coverage documented
|
|
86
|
+
- Security review documented
|
|
87
|
+
|
|
88
|
+
PR Summary:
|
|
89
|
+
- 18 commits (across 3 parallel tracks + integration)
|
|
90
|
+
- 42 test cases, all passing
|
|
91
|
+
- OWASP Top 10 security review completed
|
|
92
|
+
- 3 key architectural decisions documented
|
|
93
|
+
|
|
94
|
+
⏸️ PR created, awaiting automated checks (Greptile, SonarCloud, GitHub Actions)
|
|
95
|
+
|
|
96
|
+
Next: /review <pr-number> (after automated checks complete)
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Integration with Workflow
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
1. /status → Understand current context
|
|
103
|
+
2. /research <name> → Research and document
|
|
104
|
+
3. /plan <feature-slug> → Create plan and tracking
|
|
105
|
+
4. /dev → Implement with TDD
|
|
106
|
+
5. /check → Validate
|
|
107
|
+
6. /ship → Create PR (you are here)
|
|
108
|
+
7. /review → Address comments
|
|
109
|
+
8. /merge → Merge and cleanup
|
|
110
|
+
9. /verify → Final documentation check
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Tips
|
|
114
|
+
|
|
115
|
+
- **Complete PR body**: Include all research, decisions, and test coverage
|
|
116
|
+
- **Link everything**: Research doc, OpenSpec, Beads issue
|
|
117
|
+
- **Document security**: OWASP Top 10 review in PR body
|
|
118
|
+
- **Test coverage**: Show all test scenarios passing
|
|
119
|
+
- **Wait for checks**: Let GitHub Actions, Greptile, SonarCloud run
|
|
120
|
+
- **NO auto-merge**: Always wait for /review phase
|