moicle 1.7.0 → 2.1.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/README.md +76 -27
- package/assets/architecture/_shared/severity-levels.md +34 -0
- package/assets/architecture/_shared/stack-detection.md +34 -0
- package/assets/commands/marketing.md +7 -7
- package/assets/skills/docs/sync/SKILL.md +245 -0
- package/assets/skills/docs/write/SKILL.md +274 -0
- package/assets/skills/feature/api/SKILL.md +277 -0
- package/assets/skills/feature/deprecate/SKILL.md +276 -0
- package/assets/skills/feature/new/SKILL.md +273 -0
- package/assets/skills/feature/refactor/SKILL.md +269 -0
- package/assets/skills/fix/hotfix/SKILL.md +233 -0
- package/assets/skills/fix/incident/SKILL.md +360 -0
- package/assets/skills/fix/pr-comment/SKILL.md +186 -0
- package/assets/skills/fix/root-cause/SKILL.md +276 -0
- package/assets/skills/marketing/content/SKILL.md +269 -0
- package/assets/skills/marketing/logo/SKILL.md +252 -0
- package/assets/skills/marketing/seo-blog/SKILL.md +367 -0
- package/assets/skills/marketing/video/SKILL.md +258 -0
- package/assets/skills/research/onboarding/SKILL.md +225 -0
- package/assets/skills/research/spike/SKILL.md +228 -0
- package/assets/skills/research/web/SKILL.md +204 -0
- package/assets/skills/review/architect/SKILL.md +274 -0
- package/assets/skills/review/branch/SKILL.md +277 -0
- package/assets/skills/review/pr/SKILL.md +231 -0
- package/assets/skills/review/tdd/SKILL.md +245 -0
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +2 -2
- package/dist/commands/list.js.map +1 -1
- package/dist/utils/symlink.d.ts +7 -0
- package/dist/utils/symlink.d.ts.map +1 -1
- package/dist/utils/symlink.js +82 -0
- package/dist/utils/symlink.js.map +1 -1
- package/package.json +1 -1
- package/assets/skills/api-integration/SKILL.md +0 -883
- package/assets/skills/architect-review/SKILL.md +0 -393
- package/assets/skills/content-writer/SKILL.md +0 -721
- package/assets/skills/deep-debug/SKILL.md +0 -114
- package/assets/skills/deprecation/SKILL.md +0 -923
- package/assets/skills/documentation/SKILL.md +0 -1333
- package/assets/skills/fix-pr-comment/SKILL.md +0 -283
- package/assets/skills/hotfix/SKILL.md +0 -397
- package/assets/skills/incident-response/SKILL.md +0 -946
- package/assets/skills/logo-design/SKILL.md +0 -477
- package/assets/skills/new-feature/SKILL.md +0 -297
- package/assets/skills/onboarding/SKILL.md +0 -607
- package/assets/skills/pr-review/SKILL.md +0 -620
- package/assets/skills/refactor/SKILL.md +0 -338
- package/assets/skills/research/SKILL.md +0 -124
- package/assets/skills/review-changes/SKILL.md +0 -312
- package/assets/skills/spike/SKILL.md +0 -535
- package/assets/skills/sync-docs/SKILL.md +0 -575
- package/assets/skills/tdd/SKILL.md +0 -828
- package/assets/skills/video-content/SKILL.md +0 -651
|
@@ -1,283 +0,0 @@
|
|
|
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
|
|
@@ -1,397 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: hotfix
|
|
3
|
-
description: Quick bug fix workflow with rollback plan. Use when fixing bugs, hotfixes, urgent issues, production bugs, or when user says "fix bug", "hotfix", "urgent fix", "production issue".
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Hotfix Workflow
|
|
7
|
-
|
|
8
|
-
Fast-track workflow for fixing bugs with safety rollback plan.
|
|
9
|
-
|
|
10
|
-
## IMPORTANT: Read Architecture First
|
|
11
|
-
|
|
12
|
-
**Before fixing, you MUST read the appropriate architecture reference:**
|
|
13
|
-
|
|
14
|
-
### Global Architecture Files
|
|
15
|
-
```
|
|
16
|
-
~/.claude/architecture/
|
|
17
|
-
├── clean-architecture.md # Core principles for all projects
|
|
18
|
-
├── flutter-mobile.md # Flutter + Riverpod
|
|
19
|
-
├── react-frontend.md # React + Vite + TypeScript
|
|
20
|
-
├── go-backend.md # Go + Gin
|
|
21
|
-
├── laravel-backend.md # Laravel + PHP
|
|
22
|
-
├── remix-fullstack.md # Remix fullstack
|
|
23
|
-
└── monorepo.md # Monorepo structure
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
### Project-specific (if exists)
|
|
27
|
-
```
|
|
28
|
-
.claude/architecture/ # Project overrides
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
**Understand the codebase structure before making changes.**
|
|
32
|
-
|
|
33
|
-
## Recommended Agents
|
|
34
|
-
|
|
35
|
-
| Phase | Agent | Purpose |
|
|
36
|
-
|-------|-------|---------|
|
|
37
|
-
| FIX | `@react-frontend-dev`, `@go-backend-dev`, `@laravel-backend-dev`, `@flutter-mobile-dev`, `@remix-fullstack-dev` | Stack-specific bug fix |
|
|
38
|
-
| FIX | `@security-audit` | Security-related bugs |
|
|
39
|
-
| VERIFY | `@test-writer` | Regression test |
|
|
40
|
-
| VERIFY | `@code-reviewer` | Quick code review |
|
|
41
|
-
| DEPLOY | `@devops` | CI/CD & deployment |
|
|
42
|
-
|
|
43
|
-
## Workflow Overview
|
|
44
|
-
|
|
45
|
-
```
|
|
46
|
-
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
|
|
47
|
-
│1. IDENTIFY──▶│2. REPRODUCE──▶│ 3. FIX │──▶│4. VERIFY │──▶│5. DEPLOY │
|
|
48
|
-
└──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
|
|
49
|
-
│ │
|
|
50
|
-
│ Fail? │
|
|
51
|
-
│ ┌────────────────────┘
|
|
52
|
-
▼ ▼
|
|
53
|
-
┌──────────────────┐
|
|
54
|
-
│ 6. ROLLBACK │
|
|
55
|
-
│ (if needed) │
|
|
56
|
-
└──────────────────┘
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
## Phase 1: IDENTIFY
|
|
62
|
-
|
|
63
|
-
**Goal**: Identify exactly what the bug is
|
|
64
|
-
|
|
65
|
-
### Actions
|
|
66
|
-
1. Gather information:
|
|
67
|
-
- Error message / stack trace
|
|
68
|
-
- Steps to reproduce
|
|
69
|
-
- Expected vs actual behavior
|
|
70
|
-
- Environment (prod/staging/dev)
|
|
71
|
-
- Affected users/scope
|
|
72
|
-
|
|
73
|
-
2. **Identify project stack and read architecture doc**
|
|
74
|
-
|
|
75
|
-
3. Assess severity:
|
|
76
|
-
```
|
|
77
|
-
🔴 CRITICAL - Production down, data loss
|
|
78
|
-
🟠 HIGH - Major feature broken, many users affected
|
|
79
|
-
🟡 MEDIUM - Feature degraded, workaround exists
|
|
80
|
-
🟢 LOW - Minor issue, cosmetic
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### Output
|
|
84
|
-
```markdown
|
|
85
|
-
## Bug Report
|
|
86
|
-
**Severity**: [CRITICAL/HIGH/MEDIUM/LOW]
|
|
87
|
-
**Stack**: [Flutter/React/Go/Laravel/Remix]
|
|
88
|
-
**Architecture Doc**: [path]
|
|
89
|
-
**Error**: [error message]
|
|
90
|
-
**Steps**:
|
|
91
|
-
1. ...
|
|
92
|
-
2. ...
|
|
93
|
-
**Expected**: [what should happen]
|
|
94
|
-
**Actual**: [what happens]
|
|
95
|
-
**Environment**: [prod/staging/dev]
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### Gate
|
|
99
|
-
- [ ] Bug clearly described
|
|
100
|
-
- [ ] Architecture doc identified
|
|
101
|
-
- [ ] Severity assessed
|
|
102
|
-
- [ ] Scope understood
|
|
103
|
-
|
|
104
|
-
---
|
|
105
|
-
|
|
106
|
-
## Phase 2: REPRODUCE & ANALYZE
|
|
107
|
-
|
|
108
|
-
**Goal**: Reproduce the bug and find root cause
|
|
109
|
-
|
|
110
|
-
### Actions
|
|
111
|
-
1. **Read architecture doc** to understand codebase structure
|
|
112
|
-
2. Reproduce locally following architecture patterns
|
|
113
|
-
3. Find root cause using 5 Whys:
|
|
114
|
-
```
|
|
115
|
-
Why did it fail? → [answer]
|
|
116
|
-
Why? → [deeper answer]
|
|
117
|
-
Why? → [even deeper]
|
|
118
|
-
Why? → [root cause emerging]
|
|
119
|
-
Why? → [ROOT CAUSE]
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
4. Identify fix location based on architecture:
|
|
123
|
-
- Which layer? (from architecture doc)
|
|
124
|
-
- Which file(s)?
|
|
125
|
-
- What's the minimal change?
|
|
126
|
-
|
|
127
|
-
5. Check git blame:
|
|
128
|
-
```bash
|
|
129
|
-
git log --oneline -10 -- [affected_file]
|
|
130
|
-
git blame [affected_file] | grep -A5 -B5 "[problem_area]"
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
### Analysis Output
|
|
134
|
-
```markdown
|
|
135
|
-
## Root Cause Analysis
|
|
136
|
-
**Architecture Reference**: [path to doc]
|
|
137
|
-
**Affected Layer**: [layer from architecture doc]
|
|
138
|
-
**Root Cause**: [description]
|
|
139
|
-
**Introduced**: [commit/PR if known]
|
|
140
|
-
**Affected Files**:
|
|
141
|
-
- file1:123
|
|
142
|
-
- file2:456
|
|
143
|
-
|
|
144
|
-
**Fix Strategy**: [brief description following architecture patterns]
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
### Gate
|
|
148
|
-
- [ ] Bug reproduced locally
|
|
149
|
-
- [ ] Root cause identified
|
|
150
|
-
- [ ] Fix location known (per architecture)
|
|
151
|
-
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
## Phase 3: FIX
|
|
155
|
-
|
|
156
|
-
**Goal**: Implement minimal fix following architecture
|
|
157
|
-
|
|
158
|
-
### Principles
|
|
159
|
-
1. **Minimal change** - Fix only what's broken
|
|
160
|
-
2. **Follow architecture** - Respect layer boundaries from doc
|
|
161
|
-
3. **No refactoring** - Save for later
|
|
162
|
-
4. **No new features** - Stay focused
|
|
163
|
-
5. **Preserve behavior** - Don't change anything else
|
|
164
|
-
|
|
165
|
-
### Actions
|
|
166
|
-
1. Create hotfix branch:
|
|
167
|
-
```bash
|
|
168
|
-
git checkout -b hotfix/[issue-id]-[short-description]
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
2. **Read architecture doc** for the affected layer
|
|
172
|
-
3. Implement fix following architecture patterns:
|
|
173
|
-
- Use correct patterns from doc
|
|
174
|
-
- Follow naming conventions from doc
|
|
175
|
-
- Respect layer boundaries
|
|
176
|
-
|
|
177
|
-
4. Add inline comment explaining fix:
|
|
178
|
-
```
|
|
179
|
-
// HOTFIX: [issue-id] - [brief description]
|
|
180
|
-
// Root cause: [why this fixes it]
|
|
181
|
-
[your fix code]
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
### Gate
|
|
185
|
-
- [ ] Fix follows architecture doc
|
|
186
|
-
- [ ] Fix implemented minimally
|
|
187
|
-
- [ ] Code compiles
|
|
188
|
-
- [ ] No unrelated changes
|
|
189
|
-
|
|
190
|
-
---
|
|
191
|
-
|
|
192
|
-
## Phase 4: VERIFY
|
|
193
|
-
|
|
194
|
-
**Goal**: Confirm fix works without breaking other things
|
|
195
|
-
|
|
196
|
-
### Actions
|
|
197
|
-
1. Test the fix:
|
|
198
|
-
- [ ] Original bug no longer occurs
|
|
199
|
-
- [ ] Related functionality still works
|
|
200
|
-
- [ ] Edge cases handled
|
|
201
|
-
|
|
202
|
-
2. Run existing tests (use command from architecture doc):
|
|
203
|
-
```bash
|
|
204
|
-
flutter test # Flutter
|
|
205
|
-
go test ./... # Go
|
|
206
|
-
bun test # React/Remix
|
|
207
|
-
php artisan test # Laravel
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
3. Add regression test following architecture patterns:
|
|
211
|
-
```
|
|
212
|
-
// Test to prevent regression
|
|
213
|
-
it('should [expected behavior] - fixes #[issue-id]', () => {
|
|
214
|
-
// Arrange: setup that caused bug
|
|
215
|
-
// Act: trigger the bug scenario
|
|
216
|
-
// Assert: verify correct behavior
|
|
217
|
-
});
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
4. Manual verification:
|
|
221
|
-
- [ ] Reproduce original steps
|
|
222
|
-
- [ ] Confirm bug is fixed
|
|
223
|
-
- [ ] Test happy path
|
|
224
|
-
- [ ] Test edge cases
|
|
225
|
-
|
|
226
|
-
### Gate
|
|
227
|
-
- [ ] Original bug fixed
|
|
228
|
-
- [ ] All tests pass
|
|
229
|
-
- [ ] Regression test added (following arch patterns)
|
|
230
|
-
- [ ] No new issues introduced
|
|
231
|
-
|
|
232
|
-
### Feedback Loop
|
|
233
|
-
If verification fails:
|
|
234
|
-
1. Note what failed
|
|
235
|
-
2. Return to FIX phase
|
|
236
|
-
3. Adjust fix (following architecture)
|
|
237
|
-
4. Re-verify
|
|
238
|
-
|
|
239
|
-
---
|
|
240
|
-
|
|
241
|
-
## Phase 5: DEPLOY
|
|
242
|
-
|
|
243
|
-
**Goal**: Ship the fix safely
|
|
244
|
-
|
|
245
|
-
### Actions
|
|
246
|
-
1. Commit with clear message:
|
|
247
|
-
```bash
|
|
248
|
-
git add .
|
|
249
|
-
git commit -m "fix: [short description] (#[issue-id])
|
|
250
|
-
|
|
251
|
-
Root cause: [brief explanation]
|
|
252
|
-
Fix: [what was changed]
|
|
253
|
-
|
|
254
|
-
Fixes #[issue-id]"
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
2. Create PR:
|
|
258
|
-
```bash
|
|
259
|
-
gh pr create --title "fix: [description]" --body "$(cat <<'EOF'
|
|
260
|
-
## Summary
|
|
261
|
-
Fixes #[issue-id]
|
|
262
|
-
|
|
263
|
-
## Root Cause
|
|
264
|
-
[explanation]
|
|
265
|
-
|
|
266
|
-
## Fix
|
|
267
|
-
[what was changed, following architecture patterns]
|
|
268
|
-
|
|
269
|
-
## Testing
|
|
270
|
-
- [ ] Original bug no longer occurs
|
|
271
|
-
- [ ] Regression test added
|
|
272
|
-
- [ ] All tests pass
|
|
273
|
-
|
|
274
|
-
## Rollback Plan
|
|
275
|
-
Revert commit: `git revert [commit-sha]`
|
|
276
|
-
EOF
|
|
277
|
-
)"
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
3. Deploy (if applicable):
|
|
281
|
-
```bash
|
|
282
|
-
# Follow your deployment process
|
|
283
|
-
# Monitor for issues
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
### Gate
|
|
287
|
-
- [ ] PR created/merged
|
|
288
|
-
- [ ] Deployed (if applicable)
|
|
289
|
-
- [ ] Monitoring in place
|
|
290
|
-
|
|
291
|
-
---
|
|
292
|
-
|
|
293
|
-
## Phase 6: ROLLBACK (If Needed)
|
|
294
|
-
|
|
295
|
-
**Goal**: Quickly revert if fix causes more problems
|
|
296
|
-
|
|
297
|
-
### When to Rollback
|
|
298
|
-
- [ ] Fix introduced new bugs
|
|
299
|
-
- [ ] Performance degraded
|
|
300
|
-
- [ ] Unexpected side effects
|
|
301
|
-
- [ ] Users reporting new issues
|
|
302
|
-
|
|
303
|
-
### Rollback Actions
|
|
304
|
-
|
|
305
|
-
1. **Quick Revert**:
|
|
306
|
-
```bash
|
|
307
|
-
# Find the hotfix commit
|
|
308
|
-
git log --oneline -5
|
|
309
|
-
|
|
310
|
-
# Revert it
|
|
311
|
-
git revert [hotfix-commit-sha]
|
|
312
|
-
git push
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
2. **Feature Flag** (if available):
|
|
316
|
-
```
|
|
317
|
-
// Disable the fix temporarily
|
|
318
|
-
if (!featureFlags.hotfix_123_enabled) {
|
|
319
|
-
// Original behavior
|
|
320
|
-
}
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
3. **Redeploy previous version**:
|
|
324
|
-
```bash
|
|
325
|
-
# Deploy previous known-good version
|
|
326
|
-
git checkout [previous-tag]
|
|
327
|
-
# Run deploy
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
### Post-Rollback
|
|
331
|
-
1. Document what went wrong
|
|
332
|
-
2. Return to REPRODUCE phase
|
|
333
|
-
3. Analyze why fix failed (check architecture compliance)
|
|
334
|
-
4. Create better fix
|
|
335
|
-
|
|
336
|
-
---
|
|
337
|
-
|
|
338
|
-
## Quick Reference
|
|
339
|
-
|
|
340
|
-
### Architecture Docs
|
|
341
|
-
| Stack | Doc |
|
|
342
|
-
|-------|-----|
|
|
343
|
-
| All | `clean-architecture.md` |
|
|
344
|
-
| Flutter | `flutter-mobile.md` |
|
|
345
|
-
| React | `react-frontend.md` |
|
|
346
|
-
| Go | `go-backend.md` |
|
|
347
|
-
| Laravel | `laravel-backend.md` |
|
|
348
|
-
| Remix | `remix-fullstack.md` |
|
|
349
|
-
| Monorepo | `monorepo.md` |
|
|
350
|
-
|
|
351
|
-
### Hotfix vs Feature
|
|
352
|
-
|
|
353
|
-
| Aspect | Hotfix | Feature |
|
|
354
|
-
|--------|--------|---------|
|
|
355
|
-
| Speed | Fast (< 1 hour) | Thorough |
|
|
356
|
-
| Scope | Minimal | Full |
|
|
357
|
-
| Testing | Targeted | Comprehensive |
|
|
358
|
-
| Design | Skip | Required |
|
|
359
|
-
| Risk | Higher, has rollback | Lower |
|
|
360
|
-
|
|
361
|
-
### Severity Response Time
|
|
362
|
-
|
|
363
|
-
| Severity | Response | Fix Target |
|
|
364
|
-
|----------|----------|------------|
|
|
365
|
-
| 🔴 CRITICAL | Immediate | < 1 hour |
|
|
366
|
-
| 🟠 HIGH | Same day | < 4 hours |
|
|
367
|
-
| 🟡 MEDIUM | Next sprint | < 1 week |
|
|
368
|
-
| 🟢 LOW | Backlog | When convenient |
|
|
369
|
-
|
|
370
|
-
### Commit Message Format
|
|
371
|
-
```
|
|
372
|
-
fix: [short description] (#issue-id)
|
|
373
|
-
|
|
374
|
-
Root cause: [why it happened]
|
|
375
|
-
Fix: [what was changed]
|
|
376
|
-
|
|
377
|
-
Fixes #[issue-id]
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
### Rollback Checklist
|
|
381
|
-
- [ ] Identify rollback commit
|
|
382
|
-
- [ ] Test rollback locally
|
|
383
|
-
- [ ] Execute rollback
|
|
384
|
-
- [ ] Verify system stable
|
|
385
|
-
- [ ] Notify stakeholders
|
|
386
|
-
- [ ] Document learnings
|
|
387
|
-
|
|
388
|
-
---
|
|
389
|
-
|
|
390
|
-
## Emergency Contacts
|
|
391
|
-
|
|
392
|
-
Add your team's emergency contacts here:
|
|
393
|
-
```
|
|
394
|
-
On-call: [contact]
|
|
395
|
-
Backend lead: [contact]
|
|
396
|
-
DevOps: [contact]
|
|
397
|
-
```
|