moicle 1.1.1 → 1.1.2
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/README.md +12 -2
- package/assets/architecture/go-backend.md +930 -108
- package/assets/commands/brainstorm.md +1 -0
- package/assets/skills/api-integration/SKILL.md +883 -0
- package/assets/skills/deprecation/SKILL.md +923 -0
- package/assets/skills/documentation/SKILL.md +1333 -0
- package/assets/skills/fix-pr-comment/SKILL.md +283 -0
- package/assets/skills/go-module/SKILL.md +77 -0
- package/assets/skills/incident-response/SKILL.md +946 -0
- package/assets/skills/onboarding/SKILL.md +607 -0
- package/assets/skills/pr-review/SKILL.md +620 -0
- package/assets/skills/refactor/SKILL.md +756 -0
- package/assets/skills/spike/SKILL.md +535 -0
- package/assets/skills/tdd/SKILL.md +828 -0
- package/bin/cli.js +2 -1
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +20 -2
- package/dist/commands/install.js.map +1 -1
- package/dist/utils/symlink.d.ts +1 -0
- package/dist/utils/symlink.d.ts.map +1 -1
- package/dist/utils/symlink.js +1 -0
- package/dist/utils/symlink.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fix-pr-comment
|
|
3
|
+
description: Fix PR review comments workflow. Use when fixing review comments from a pull request, or when user says "fix pr comment", "fix review comment", "fix-pr-comment", "address pr feedback".
|
|
4
|
+
args: PR_NUMBER
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Fix PR Comment Workflow
|
|
8
|
+
|
|
9
|
+
Workflow for fetching and fixing review comments from a pull request.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/fix-pr-comment {PR_NUMBER}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Workflow Overview
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
|
|
21
|
+
│ 1. FETCH │──▶│ 2. ANALYZE │──▶│ 3. FIX │──▶│ 4. RESPOND │
|
|
22
|
+
│ Comments │ │ Comments │ │ Issues │ │ to PR │
|
|
23
|
+
└──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Phase 1: FETCH
|
|
29
|
+
|
|
30
|
+
**Goal**: Fetch all review comments from the PR
|
|
31
|
+
|
|
32
|
+
### Actions
|
|
33
|
+
|
|
34
|
+
1. Get PR details:
|
|
35
|
+
```bash
|
|
36
|
+
gh pr view {PR_NUMBER} --json number,title,state,headRefName,baseRefName
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
2. Fetch all review comments:
|
|
40
|
+
```bash
|
|
41
|
+
gh api repos/{owner}/{repo}/pulls/{PR_NUMBER}/comments --jq '.[] | {id: .id, path: .path, line: .line, body: .body, user: .user.login, created_at: .created_at}'
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
3. Fetch PR review threads (for threaded discussions):
|
|
45
|
+
```bash
|
|
46
|
+
gh api repos/{owner}/{repo}/pulls/{PR_NUMBER}/reviews --jq '.[] | {id: .id, user: .user.login, state: .state, body: .body}'
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
4. Get the current diff:
|
|
50
|
+
```bash
|
|
51
|
+
gh pr diff {PR_NUMBER}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Output
|
|
55
|
+
```markdown
|
|
56
|
+
## PR #{NUMBER}: {TITLE}
|
|
57
|
+
|
|
58
|
+
### Branch
|
|
59
|
+
- Head: {headRefName}
|
|
60
|
+
- Base: {baseRefName}
|
|
61
|
+
|
|
62
|
+
### Review Comments
|
|
63
|
+
1. **[{file}:{line}]** by @{user}
|
|
64
|
+
> {comment body}
|
|
65
|
+
|
|
66
|
+
2. **[{file}:{line}]** by @{user}
|
|
67
|
+
> {comment body}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Gate
|
|
71
|
+
- [ ] PR details fetched
|
|
72
|
+
- [ ] Review comments fetched
|
|
73
|
+
- [ ] Current branch checked out
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Phase 2: ANALYZE
|
|
78
|
+
|
|
79
|
+
**Goal**: Categorize and prioritize comments
|
|
80
|
+
|
|
81
|
+
### Comment Categories
|
|
82
|
+
|
|
83
|
+
| Category | Description | Priority |
|
|
84
|
+
|----------|-------------|----------|
|
|
85
|
+
| 🔴 **Bug** | Code bug or logic error | Must fix |
|
|
86
|
+
| 🟠 **Security** | Security concern | Must fix |
|
|
87
|
+
| 🟡 **Architecture** | Design/structure issue | Should fix |
|
|
88
|
+
| 🟢 **Style** | Code style/formatting | Nice to fix |
|
|
89
|
+
| 💬 **Question** | Needs clarification | Respond |
|
|
90
|
+
| 💡 **Suggestion** | Optional improvement | Consider |
|
|
91
|
+
|
|
92
|
+
### Analysis Output
|
|
93
|
+
```markdown
|
|
94
|
+
## Comment Analysis
|
|
95
|
+
|
|
96
|
+
### Must Fix (Critical)
|
|
97
|
+
1. [{file}:{line}] - {summary}
|
|
98
|
+
2. [{file}:{line}] - {summary}
|
|
99
|
+
|
|
100
|
+
### Should Fix
|
|
101
|
+
1. [{file}:{line}] - {summary}
|
|
102
|
+
|
|
103
|
+
### Nice to Fix
|
|
104
|
+
1. [{file}:{line}] - {summary}
|
|
105
|
+
|
|
106
|
+
### Questions to Answer
|
|
107
|
+
1. [{file}:{line}] - {question}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Gate
|
|
111
|
+
- [ ] All comments categorized
|
|
112
|
+
- [ ] Priorities assigned
|
|
113
|
+
- [ ] Fix order determined
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Phase 3: FIX
|
|
118
|
+
|
|
119
|
+
**Goal**: Address each comment systematically
|
|
120
|
+
|
|
121
|
+
### Fix Process
|
|
122
|
+
|
|
123
|
+
For each comment (in priority order):
|
|
124
|
+
|
|
125
|
+
1. **Read the file** at the specified location
|
|
126
|
+
2. **Understand the feedback**
|
|
127
|
+
3. **Apply the fix** following project conventions
|
|
128
|
+
4. **Mark as addressed** in your tracking
|
|
129
|
+
|
|
130
|
+
### Fix Template
|
|
131
|
+
```markdown
|
|
132
|
+
### Fixing: [{file}:{line}]
|
|
133
|
+
**Comment**: {original comment}
|
|
134
|
+
**Action**: {what you're changing}
|
|
135
|
+
**Status**: ✅ Fixed / ❓ Need clarification / ⏭️ Skipped (reason)
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Commit Strategy
|
|
139
|
+
|
|
140
|
+
Option A: Single commit for all fixes
|
|
141
|
+
```bash
|
|
142
|
+
git add .
|
|
143
|
+
git commit -m "fix: address PR review comments
|
|
144
|
+
|
|
145
|
+
- Fix {issue 1}
|
|
146
|
+
- Fix {issue 2}
|
|
147
|
+
- Address {feedback 3}"
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Option B: Separate commits per fix (for complex changes)
|
|
151
|
+
```bash
|
|
152
|
+
git commit -m "fix: {specific fix description}"
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Gate
|
|
156
|
+
- [ ] All "Must Fix" addressed
|
|
157
|
+
- [ ] All "Should Fix" addressed
|
|
158
|
+
- [ ] Code compiles/builds
|
|
159
|
+
- [ ] Tests pass
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Phase 4: RESPOND
|
|
164
|
+
|
|
165
|
+
**Goal**: Push changes and respond to reviewers
|
|
166
|
+
|
|
167
|
+
### Actions
|
|
168
|
+
|
|
169
|
+
1. Push the fixes:
|
|
170
|
+
```bash
|
|
171
|
+
git push
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
2. Reply to each comment on GitHub:
|
|
175
|
+
```bash
|
|
176
|
+
# Reply to a specific comment
|
|
177
|
+
gh api repos/{owner}/{repo}/pulls/{PR_NUMBER}/comments/{comment_id}/replies \
|
|
178
|
+
-f body="Fixed in {commit_sha}. {additional context if needed}"
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
3. Request re-review:
|
|
182
|
+
```bash
|
|
183
|
+
gh pr edit {PR_NUMBER} --add-reviewer {reviewer_username}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
4. Add summary comment to PR:
|
|
187
|
+
```bash
|
|
188
|
+
gh pr comment {PR_NUMBER} --body "$(cat <<'EOF'
|
|
189
|
+
## Review Comments Addressed
|
|
190
|
+
|
|
191
|
+
### Fixed
|
|
192
|
+
- ✅ [{file}:{line}] - {description}
|
|
193
|
+
- ✅ [{file}:{line}] - {description}
|
|
194
|
+
|
|
195
|
+
### Clarifications
|
|
196
|
+
- 💬 [{file}:{line}] - {response to question}
|
|
197
|
+
|
|
198
|
+
### Deferred
|
|
199
|
+
- ⏭️ [{file}:{line}] - {reason for deferring}
|
|
200
|
+
|
|
201
|
+
Ready for re-review!
|
|
202
|
+
EOF
|
|
203
|
+
)"
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Response Templates
|
|
207
|
+
|
|
208
|
+
**For bug fixes:**
|
|
209
|
+
```
|
|
210
|
+
Fixed in {commit}. Good catch! The issue was {brief explanation}.
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**For style/suggestions:**
|
|
214
|
+
```
|
|
215
|
+
Updated as suggested. Thanks for the feedback!
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**For questions:**
|
|
219
|
+
```
|
|
220
|
+
{Answer the question}. Let me know if you need more context.
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
**For disagreements (respectful):**
|
|
224
|
+
```
|
|
225
|
+
I considered this, but kept the current approach because {reason}. Happy to discuss further if you still have concerns.
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Gate
|
|
229
|
+
- [ ] All fixes pushed
|
|
230
|
+
- [ ] Comments replied to
|
|
231
|
+
- [ ] Re-review requested
|
|
232
|
+
- [ ] Summary posted
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Quick Reference
|
|
237
|
+
|
|
238
|
+
### GitHub CLI Commands
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
# View PR
|
|
242
|
+
gh pr view {NUMBER}
|
|
243
|
+
|
|
244
|
+
# Get PR comments
|
|
245
|
+
gh api repos/{owner}/{repo}/pulls/{NUMBER}/comments
|
|
246
|
+
|
|
247
|
+
# Get PR reviews
|
|
248
|
+
gh api repos/{owner}/{repo}/pulls/{NUMBER}/reviews
|
|
249
|
+
|
|
250
|
+
# Reply to comment
|
|
251
|
+
gh api repos/{owner}/{repo}/pulls/{NUMBER}/comments/{comment_id}/replies -f body="message"
|
|
252
|
+
|
|
253
|
+
# Add PR comment
|
|
254
|
+
gh pr comment {NUMBER} --body "message"
|
|
255
|
+
|
|
256
|
+
# Request reviewer
|
|
257
|
+
gh pr edit {NUMBER} --add-reviewer {username}
|
|
258
|
+
|
|
259
|
+
# View PR diff
|
|
260
|
+
gh pr diff {NUMBER}
|
|
261
|
+
|
|
262
|
+
# Checkout PR branch
|
|
263
|
+
gh pr checkout {NUMBER}
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Comment Response Etiquette
|
|
267
|
+
|
|
268
|
+
1. **Be grateful** - Reviewers spent time helping you
|
|
269
|
+
2. **Be clear** - Explain what you changed and why
|
|
270
|
+
3. **Be timely** - Address comments promptly
|
|
271
|
+
4. **Be thorough** - Don't leave comments unaddressed
|
|
272
|
+
5. **Be open** - Accept feedback gracefully
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## Success Criteria
|
|
277
|
+
|
|
278
|
+
PR comments are properly addressed when:
|
|
279
|
+
1. All critical/must-fix comments resolved
|
|
280
|
+
2. All comments have responses
|
|
281
|
+
3. Changes pushed to the PR branch
|
|
282
|
+
4. Reviewers notified for re-review
|
|
283
|
+
5. No new issues introduced
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: go-module
|
|
3
|
+
description: Generate complete Go module with Clean Architecture. Triggers: "generate go module", "scaffold go", "new go module"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Go Module Generator
|
|
7
|
+
|
|
8
|
+
Generate complete Go module following Clean Architecture pattern.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
python scripts/module-generator.py --stack go --name <module_name> --fields "<fields>" --project <go_module_path> [--validators]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Examples
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Basic CRUD
|
|
20
|
+
python scripts/module-generator.py \
|
|
21
|
+
--stack go \
|
|
22
|
+
--name product \
|
|
23
|
+
--fields "name:string,description:*string,price:int64,status:string" \
|
|
24
|
+
--project github.com/user/myapp
|
|
25
|
+
|
|
26
|
+
# With validators
|
|
27
|
+
python scripts/module-generator.py \
|
|
28
|
+
--stack go \
|
|
29
|
+
--name bank_account \
|
|
30
|
+
--fields "user_id:string,bank_name:string,account_number:string,is_verified:bool" \
|
|
31
|
+
--project github.com/user/myapp \
|
|
32
|
+
--validators
|
|
33
|
+
|
|
34
|
+
# Optional fields (use ?)
|
|
35
|
+
python scripts/module-generator.py \
|
|
36
|
+
--stack go \
|
|
37
|
+
--name order \
|
|
38
|
+
--fields "user_id:string,total:int64,status:string,note:string?" \
|
|
39
|
+
--project github.com/user/myapp
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Field Types
|
|
43
|
+
|
|
44
|
+
| Type | Example |
|
|
45
|
+
|------|---------|
|
|
46
|
+
| `string` | `name:string` |
|
|
47
|
+
| `*string` | `description:*string` (nullable) |
|
|
48
|
+
| `int64` | `price:int64` |
|
|
49
|
+
| `int` | `count:int` |
|
|
50
|
+
| `bool` | `is_active:bool` |
|
|
51
|
+
| `float64` | `rate:float64` |
|
|
52
|
+
|
|
53
|
+
## Generated Structure
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
internal/modules/{module}/
|
|
57
|
+
├── controllers/{module}_controller.go
|
|
58
|
+
├── usecases/{module}_usecase.go
|
|
59
|
+
├── dtos/{module}_dto.go
|
|
60
|
+
├── validators/{module}_validator.go # if --validators
|
|
61
|
+
└── init.go
|
|
62
|
+
|
|
63
|
+
pkg/database/{module}.go
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## After Generation
|
|
67
|
+
|
|
68
|
+
1. Register in `cmd/api/router.go`:
|
|
69
|
+
```go
|
|
70
|
+
import "project/internal/modules/{module}"
|
|
71
|
+
{module}.Init(r, db, authMiddleware)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
2. Add to `pkg/database/database.go`:
|
|
75
|
+
```go
|
|
76
|
+
db.AutoMigrate(&{Entity}{})
|
|
77
|
+
```
|