opencode-goopspec 0.1.5 → 0.1.6
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 +7 -7
- package/agents/goop-debugger.md +2 -2
- package/agents/goop-designer.md +2 -2
- package/agents/goop-executor.md +17 -7
- package/agents/goop-explorer.md +2 -2
- package/agents/goop-librarian.md +1 -1
- package/agents/goop-orchestrator.md +47 -5
- package/agents/goop-planner.md +3 -3
- package/agents/goop-researcher.md +2 -2
- package/agents/goop-tester.md +1 -1
- package/agents/goop-verifier.md +2 -2
- package/agents/goop-writer.md +1 -1
- package/agents/memory-distiller.md +2 -2
- package/commands/goop-accept.md +27 -401
- package/commands/goop-discuss.md +29 -393
- package/commands/goop-execute.md +22 -356
- package/commands/goop-map-codebase.md +44 -478
- package/commands/goop-plan.md +23 -499
- package/commands/goop-quick.md +58 -31
- package/commands/goop-setup.md +7 -4
- package/commands/goop-specify.md +26 -291
- package/commands/goop-status.md +26 -261
- package/dist/index.js +808 -182
- package/dist/worker/index.js +1 -1
- package/package.json +2 -1
- package/references/accept-process.md +402 -0
- package/references/context-injection.md +1 -1
- package/references/discovery-interview.md +1 -1
- package/references/discuss-process.md +383 -0
- package/references/dispatch-patterns.md +46 -21
- package/references/enforcement-system.md +1 -1
- package/references/execute-process.md +358 -0
- package/references/git-workflow.md +349 -0
- package/references/handoff-protocol.md +1 -1
- package/references/map-codebase-process.md +353 -0
- package/references/model-profiles.md +16 -16
- package/references/orchestrator-philosophy.md +1 -1
- package/references/phase-gates.md +1 -1
- package/references/plan-process.md +397 -0
- package/references/plugin-architecture.md +1 -1
- package/references/quick-process.md +343 -0
- package/references/response-format.md +2 -2
- package/references/specify-process.md +251 -0
- package/references/status-process.md +253 -0
- package/references/subagent-protocol.md +2 -2
- package/references/team-coordination.md +183 -0
- package/references/xml-response-schema.md +5 -5
- package/skills/accessibility/skill.md +1 -1
- package/skills/accessibility-testing/skill.md +1 -1
- package/skills/api-docs/skill.md +1 -1
- package/skills/architecture-design/skill.md +1 -1
- package/skills/atomic-commits/skill.md +92 -15
- package/skills/code-review/skill.md +1 -1
- package/skills/codebase-mapping/skill.md +1 -1
- package/skills/convention-detection/skill.md +1 -1
- package/skills/debugging/skill.md +1 -1
- package/skills/deviation-handling/skill.md +1 -1
- package/skills/documentation/skill.md +1 -1
- package/skills/goop-core/skill.md +48 -11
- package/skills/memory-usage/skill.md +1 -1
- package/skills/parallel-planning/skill.md +1 -1
- package/skills/pattern-extraction/skill.md +1 -1
- package/skills/performance-optimization/skill.md +1 -1
- package/skills/playwright/skill.md +1 -1
- package/skills/playwright-testing/skill.md +1 -1
- package/skills/progress-tracking/skill.md +1 -1
- package/skills/readme-generation/skill.md +1 -1
- package/skills/research/skill.md +1 -1
- package/skills/responsive-design/skill.md +1 -1
- package/skills/scientific-method/skill.md +1 -1
- package/skills/security-audit/skill.md +1 -1
- package/skills/task-decomposition/skill.md +1 -1
- package/skills/task-delegation/skill.md +60 -34
- package/skills/technical-writing/skill.md +1 -1
- package/skills/testing/skill.md +1 -1
- package/skills/ui-design/skill.md +1 -1
- package/skills/ux-patterns/skill.md +1 -1
- package/skills/verification/skill.md +1 -1
- package/skills/visual-regression/skill.md +1 -1
- package/templates/blueprint.md +1 -1
- package/templates/chronicle.md +1 -1
- package/templates/handoff.md +1 -1
- package/templates/milestone.md +1 -1
- package/templates/project.md +1 -1
- package/templates/requirements.md +1 -1
- package/templates/research.md +1 -1
- package/templates/retrospective.md +1 -1
- package/templates/spec.md +1 -1
- package/templates/state.md +1 -1
- package/templates/summary.md +1 -1
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
# Execution Process
|
|
2
|
+
|
|
3
|
+
Detailed process for `/goop-execute` - wave-based implementation of the blueprint.
|
|
4
|
+
|
|
5
|
+
## Phase 1: Gate Check
|
|
6
|
+
|
|
7
|
+
**Execute BEFORE anything else:**
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
goop_status()
|
|
11
|
+
goop_state({ action: "get" }) # NEVER read state.json directly
|
|
12
|
+
Read(".goopspec/BLUEPRINT.md")
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### 1.1 Check specLocked
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
IF state.specLocked != true:
|
|
19
|
+
REFUSE with:
|
|
20
|
+
|
|
21
|
+
## 🔮 GoopSpec · Gate Blocked
|
|
22
|
+
|
|
23
|
+
✗ Specification must be locked before execution.
|
|
24
|
+
|
|
25
|
+
→ Run: `/goop-specify`
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### 1.2 Gate passed
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
## 🔮 GoopSpec · Execution
|
|
34
|
+
|
|
35
|
+
✓ Spec gate passed
|
|
36
|
+
|
|
37
|
+
⚡ Starting wave-based execution...
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Phase 2: Load Context
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
Read(".goopspec/SPEC.md") # Must-haves
|
|
48
|
+
Read(".goopspec/BLUEPRINT.md") # Waves and tasks
|
|
49
|
+
Read(".goopspec/CHRONICLE.md") # Progress (if resuming)
|
|
50
|
+
Read(".goopspec/PROJECT_KNOWLEDGE_BASE.md") # Conventions
|
|
51
|
+
|
|
52
|
+
memory_search({ query: "[feature] implementation patterns" })
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Identify:
|
|
56
|
+
- Current wave (from CHRONICLE or start at 1)
|
|
57
|
+
- Tasks to execute
|
|
58
|
+
- Dependencies between tasks
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Phase 3: Wave Execution Loop
|
|
63
|
+
|
|
64
|
+
**Display wave start:**
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
## 🔮 GoopSpec · Wave [N] of [M]: [Wave Name]
|
|
68
|
+
|
|
69
|
+
**Tasks:** [X] | **Execution:** [Parallel/Sequential]
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**For each task in wave:**
|
|
75
|
+
|
|
76
|
+
### 3.1 Delegate to executor
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
task({
|
|
80
|
+
subagent_type: "goop-executor",
|
|
81
|
+
description: "Execute Task [N.M]",
|
|
82
|
+
prompt: `
|
|
83
|
+
## TASK
|
|
84
|
+
Wave [N], Task [M]: [Task Name]
|
|
85
|
+
|
|
86
|
+
## PROJECT CONTEXT
|
|
87
|
+
[From PROJECT_KNOWLEDGE_BASE.md]
|
|
88
|
+
|
|
89
|
+
## SPEC REQUIREMENTS
|
|
90
|
+
[Relevant must-have from SPEC.md]
|
|
91
|
+
|
|
92
|
+
## TASK DETAILS
|
|
93
|
+
[From BLUEPRINT.md]
|
|
94
|
+
|
|
95
|
+
Intent: [intent]
|
|
96
|
+
Deliverables: [list]
|
|
97
|
+
Files: [paths]
|
|
98
|
+
Verification: [command]
|
|
99
|
+
Acceptance: [criteria]
|
|
100
|
+
|
|
101
|
+
## INSTRUCTIONS
|
|
102
|
+
1. Implement following existing patterns
|
|
103
|
+
2. Commit atomically
|
|
104
|
+
3. Return XML response envelope
|
|
105
|
+
4. Include spec coverage in response
|
|
106
|
+
`
|
|
107
|
+
})
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### 3.2 Parse XML response
|
|
111
|
+
|
|
112
|
+
- Extract status (COMPLETE/PARTIAL/BLOCKED)
|
|
113
|
+
- Extract artifacts (files, commits)
|
|
114
|
+
- Extract handoff instructions
|
|
115
|
+
|
|
116
|
+
### 3.3 Update CHRONICLE.md
|
|
117
|
+
|
|
118
|
+
```markdown
|
|
119
|
+
### Task [N.M]: [Name]
|
|
120
|
+
- Status: [Complete/Partial/Blocked]
|
|
121
|
+
- Commit: [sha]
|
|
122
|
+
- Files: [list]
|
|
123
|
+
- Time: [timestamp]
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### 3.4 Handle status
|
|
127
|
+
|
|
128
|
+
| Status | Action |
|
|
129
|
+
|--------|--------|
|
|
130
|
+
| COMPLETE | Continue to next task |
|
|
131
|
+
| PARTIAL | Resume with partial context |
|
|
132
|
+
| BLOCKED | Check deviation rules |
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Phase 4: Deviation Handling
|
|
137
|
+
|
|
138
|
+
**Apply deviation rules:**
|
|
139
|
+
|
|
140
|
+
| Rule | Trigger | Action |
|
|
141
|
+
|------|---------|--------|
|
|
142
|
+
| Rule 1 | Bug found | Auto-fix, document |
|
|
143
|
+
| Rule 2 | Missing critical | Auto-add, document |
|
|
144
|
+
| Rule 3 | Blocking issue | Auto-fix, document |
|
|
145
|
+
| Rule 4 | Architectural | **STOP**, ask user |
|
|
146
|
+
|
|
147
|
+
**On Rule 4:**
|
|
148
|
+
```
|
|
149
|
+
## 🔮 GoopSpec · Decision Required
|
|
150
|
+
|
|
151
|
+
⚠️ **Type:** Architectural Decision
|
|
152
|
+
|
|
153
|
+
**Context:** [From executor response]
|
|
154
|
+
|
|
155
|
+
**Options:**
|
|
156
|
+
- **A)** [option] — [impact]
|
|
157
|
+
- **B)** [option] — [impact]
|
|
158
|
+
|
|
159
|
+
**Recommendation:** [If any]
|
|
160
|
+
|
|
161
|
+
Which option? (A/B/other)
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Use `question` tool, then resume with decision.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Phase 5: Wave Completion
|
|
171
|
+
|
|
172
|
+
**At end of each wave:**
|
|
173
|
+
|
|
174
|
+
### 5.1 Run wave verification
|
|
175
|
+
```
|
|
176
|
+
Spawn goop-verifier for wave-level checks
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### 5.2 Update CHRONICLE.md
|
|
180
|
+
```markdown
|
|
181
|
+
## Wave [N]: COMPLETE
|
|
182
|
+
- Tasks: [X/X]
|
|
183
|
+
- Commits: [list]
|
|
184
|
+
- Verification: PASSED
|
|
185
|
+
- Time: [timestamp]
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### 5.3 Save checkpoint
|
|
189
|
+
```
|
|
190
|
+
goop_checkpoint({
|
|
191
|
+
action: "save",
|
|
192
|
+
context: { wave: N, phase: "execute" }
|
|
193
|
+
})
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### 5.4 Generate HANDOFF.md
|
|
197
|
+
```markdown
|
|
198
|
+
# Session Handoff
|
|
199
|
+
|
|
200
|
+
**Phase:** execute
|
|
201
|
+
**Wave:** [N] of [M] complete
|
|
202
|
+
|
|
203
|
+
## Accomplished
|
|
204
|
+
- [x] Task N.1: [description]
|
|
205
|
+
- [x] Task N.2: [description]
|
|
206
|
+
|
|
207
|
+
## Next Session
|
|
208
|
+
Run: /goop-execute
|
|
209
|
+
|
|
210
|
+
## Context
|
|
211
|
+
Wave [N] complete. Starting Wave [N+1] next.
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### 5.5 Suggest new session
|
|
215
|
+
```
|
|
216
|
+
## 🔮 GoopSpec · Wave [N] Complete
|
|
217
|
+
|
|
218
|
+
✨ Wave finished successfully
|
|
219
|
+
|
|
220
|
+
| Metric | Status |
|
|
221
|
+
|--------|--------|
|
|
222
|
+
| Tasks | ✓ [X/X] complete |
|
|
223
|
+
| Commits | [Y] |
|
|
224
|
+
| Verification | ✓ PASSED |
|
|
225
|
+
|
|
226
|
+
### Next
|
|
227
|
+
|
|
228
|
+
**Option A:** Continue to Wave [N+1] (current session)
|
|
229
|
+
**Option B:** Start new session for fresh context (Recommended)
|
|
230
|
+
|
|
231
|
+
For Option B:
|
|
232
|
+
1. Start a new session
|
|
233
|
+
2. Run: `/goop-execute`
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## Phase 6: Execution Complete
|
|
241
|
+
|
|
242
|
+
**When all waves done:**
|
|
243
|
+
|
|
244
|
+
```
|
|
245
|
+
## 🔮 GoopSpec · Execution Complete
|
|
246
|
+
|
|
247
|
+
✨ All waves finished successfully
|
|
248
|
+
|
|
249
|
+
| Metric | Status |
|
|
250
|
+
|--------|--------|
|
|
251
|
+
| Waves | ✓ [M/M] complete |
|
|
252
|
+
| Tasks | ✓ [P/P] complete |
|
|
253
|
+
| Commits | [Q] |
|
|
254
|
+
|
|
255
|
+
All must-haves implemented and verified.
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### 6.1 Offer Pull Request Creation
|
|
259
|
+
|
|
260
|
+
Use `question` tool:
|
|
261
|
+
- header: "Pull Request"
|
|
262
|
+
- question: "Execution complete. Would you like to create a pull request now?"
|
|
263
|
+
- options:
|
|
264
|
+
- "Create PR" — Create a well-formatted pull request
|
|
265
|
+
- "Create draft PR" — Create as draft, finalize after acceptance
|
|
266
|
+
- "Skip for now (Recommended)" — Create PR after verification in /goop-accept
|
|
267
|
+
|
|
268
|
+
**On "Create PR" or "Create draft PR":**
|
|
269
|
+
|
|
270
|
+
Follow the PR creation process from git-workflow reference:
|
|
271
|
+
|
|
272
|
+
1. Check branch status:
|
|
273
|
+
```bash
|
|
274
|
+
git branch --show-current
|
|
275
|
+
git log main..HEAD --oneline
|
|
276
|
+
git diff main...HEAD --stat
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
2. Generate PR title and description:
|
|
280
|
+
- **Title:** `type(scope): Descriptive summary` (no GoopSpec terminology)
|
|
281
|
+
- **Body:** Summary, Changes, Testing (from CHRONICLE.md), Notes
|
|
282
|
+
|
|
283
|
+
3. Create PR:
|
|
284
|
+
```bash
|
|
285
|
+
gh pr create --title "type(scope): Title" --body "..." [--draft]
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
4. Display PR URL
|
|
289
|
+
|
|
290
|
+
### 6.2 Display next steps
|
|
291
|
+
|
|
292
|
+
```
|
|
293
|
+
### Next Step
|
|
294
|
+
|
|
295
|
+
**Verify and accept** — Final verification against spec
|
|
296
|
+
|
|
297
|
+
→ `/goop-accept`
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
Start a new session for fresh context.
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
Update state using goop_state:
|
|
305
|
+
```
|
|
306
|
+
goop_state({ action: "transition", phase: "accept" })
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## Examples
|
|
312
|
+
|
|
313
|
+
### Starting Execution
|
|
314
|
+
```
|
|
315
|
+
User: /goop-execute
|
|
316
|
+
|
|
317
|
+
Orchestrator:
|
|
318
|
+
## 🔮 GoopSpec · Execution
|
|
319
|
+
|
|
320
|
+
✓ Spec gate passed
|
|
321
|
+
|
|
322
|
+
## 🔮 GoopSpec · Wave 1 of 3: Foundation
|
|
323
|
+
|
|
324
|
+
[Delegating Task 1.1...]
|
|
325
|
+
|
|
326
|
+
goop-executor: Task 1.1 COMPLETE (commit: abc123)
|
|
327
|
+
|
|
328
|
+
[Delegating Task 1.2...]
|
|
329
|
+
|
|
330
|
+
goop-executor: Task 1.2 COMPLETE (commit: def456)
|
|
331
|
+
|
|
332
|
+
## 🔮 GoopSpec · Wave 1 Complete
|
|
333
|
+
|
|
334
|
+
**Recommend:** Start new session for Wave 2
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### Checkpoint Reached
|
|
338
|
+
```
|
|
339
|
+
goop-executor: BLOCKED - Rule 4 deviation
|
|
340
|
+
|
|
341
|
+
## 🔮 GoopSpec · Decision Required
|
|
342
|
+
|
|
343
|
+
**Context:** Database schema change needed
|
|
344
|
+
|
|
345
|
+
**Options:**
|
|
346
|
+
| A | Add index | Better performance |
|
|
347
|
+
| B | Skip index | Faster deployment |
|
|
348
|
+
|
|
349
|
+
Which option?
|
|
350
|
+
|
|
351
|
+
User: A
|
|
352
|
+
|
|
353
|
+
Orchestrator: Resuming with Option A...
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
358
|
+
*Execution Process v0.1.6*
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
# Git Workflow
|
|
2
|
+
|
|
3
|
+
Best practices for Git operations in GoopSpec agents. All commits should be professional, well-formatted, and universally understandable by any developer.
|
|
4
|
+
|
|
5
|
+
## Core Principles
|
|
6
|
+
|
|
7
|
+
### Universal Commit Messages
|
|
8
|
+
|
|
9
|
+
**CRITICAL:** Commit messages must be understandable by anyone. Never reference:
|
|
10
|
+
- GoopSpec phases, waves, or task IDs
|
|
11
|
+
- Internal planning documents (SPEC.md, BLUEPRINT.md, etc.)
|
|
12
|
+
- Agent names or orchestration concepts
|
|
13
|
+
- Tool names or MCP terminology
|
|
14
|
+
|
|
15
|
+
Write commits as if you're on a team where no one knows GoopSpec exists.
|
|
16
|
+
|
|
17
|
+
### Professional Quality
|
|
18
|
+
|
|
19
|
+
Commits should:
|
|
20
|
+
- Be indistinguishable from expert human developers
|
|
21
|
+
- Follow conventional commit format
|
|
22
|
+
- Explain the "why" not just the "what"
|
|
23
|
+
- Be atomic (one logical change per commit)
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Commit Message Format
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
type(scope): concise but descriptive title (max 72 chars)
|
|
31
|
+
|
|
32
|
+
[2-4 sentence paragraph explaining context, motivation, and approach.
|
|
33
|
+
Why was this change needed? What problem does it solve?]
|
|
34
|
+
|
|
35
|
+
Changes:
|
|
36
|
+
- Specific change with context
|
|
37
|
+
- Another change with why it matters
|
|
38
|
+
- Include file/module names when helpful
|
|
39
|
+
|
|
40
|
+
[Optional: Breaking changes, migration notes, or follow-up needed]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Types
|
|
44
|
+
|
|
45
|
+
| Type | Use For |
|
|
46
|
+
|------|---------|
|
|
47
|
+
| `feat` | New feature or capability |
|
|
48
|
+
| `fix` | Bug fix |
|
|
49
|
+
| `refactor` | Code restructuring (no behavior change) |
|
|
50
|
+
| `docs` | Documentation only |
|
|
51
|
+
| `test` | Adding or updating tests |
|
|
52
|
+
| `chore` | Config, deps, build tooling |
|
|
53
|
+
| `style` | Formatting, whitespace (no logic change) |
|
|
54
|
+
| `perf` | Performance improvements |
|
|
55
|
+
|
|
56
|
+
### Scope
|
|
57
|
+
|
|
58
|
+
The affected area/module. Required for non-trivial changes.
|
|
59
|
+
|
|
60
|
+
Examples: `auth`, `api`, `ui`, `database`, `config`, `deps`
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Good vs Bad Examples
|
|
65
|
+
|
|
66
|
+
### Title Examples
|
|
67
|
+
|
|
68
|
+
**Good:**
|
|
69
|
+
```
|
|
70
|
+
feat(auth): Add OAuth2 login with Google and GitHub
|
|
71
|
+
fix(api): Resolve race condition in concurrent requests
|
|
72
|
+
refactor(ui): Extract shared button styles into component
|
|
73
|
+
perf(database): Add index to users.email for faster lookups
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Bad:**
|
|
77
|
+
```
|
|
78
|
+
Update files # Too vague
|
|
79
|
+
Fix bug # Says nothing
|
|
80
|
+
feat: W2.T4 complete # References internal task
|
|
81
|
+
chore: Task from BLUEPRINT.md # References planning docs
|
|
82
|
+
feat(auth): Added feature # Redundant, past tense
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Full Message Examples
|
|
86
|
+
|
|
87
|
+
**Good commit:**
|
|
88
|
+
```
|
|
89
|
+
feat(users): Add avatar upload with image resizing
|
|
90
|
+
|
|
91
|
+
Users can now upload profile avatars. The system accepts common image
|
|
92
|
+
formats and automatically resizes them to standard dimensions (150x150
|
|
93
|
+
for thumbnails, 400x400 for full size) to optimize storage and load times.
|
|
94
|
+
|
|
95
|
+
Changes:
|
|
96
|
+
- Add AvatarUpload component with drag-and-drop support
|
|
97
|
+
- Implement server-side image processing with Sharp
|
|
98
|
+
- Create avatar storage service with S3 integration
|
|
99
|
+
- Add migration for avatar_url column on users table
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Bad commit:**
|
|
103
|
+
```
|
|
104
|
+
feat(users): Wave 2 Task 3 - implement avatar upload per SPEC MH-04
|
|
105
|
+
|
|
106
|
+
Completed task W2.T3 from BLUEPRINT.md. This satisfies must-have MH-04
|
|
107
|
+
from the specification. Moving to next task in the wave.
|
|
108
|
+
|
|
109
|
+
Changes:
|
|
110
|
+
- Implemented the feature as specified
|
|
111
|
+
- Added required files
|
|
112
|
+
- Tests pass
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Single vs Multiple Commits
|
|
118
|
+
|
|
119
|
+
### Use Single Commit When:
|
|
120
|
+
- All changes serve one purpose
|
|
121
|
+
- Changes are tightly coupled
|
|
122
|
+
- Total changes are small (<100 lines or <5 files)
|
|
123
|
+
|
|
124
|
+
### Use Multiple Commits When:
|
|
125
|
+
- Changes include unrelated fixes/features
|
|
126
|
+
- Cleanup/refactoring mixed with new functionality
|
|
127
|
+
- Tests added separately from implementation
|
|
128
|
+
- Documentation updated independently
|
|
129
|
+
- Config changes separate from code changes
|
|
130
|
+
|
|
131
|
+
### Multi-Commit Order
|
|
132
|
+
|
|
133
|
+
When splitting into multiple commits, order from independent to dependent:
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
1. chore(deps): Update axios to v1.6.0
|
|
137
|
+
2. fix(ui): Correct typo in welcome message
|
|
138
|
+
3. feat(users): Add avatar upload with resizing
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Branching
|
|
144
|
+
|
|
145
|
+
### Branch Naming
|
|
146
|
+
|
|
147
|
+
Format: `type/short-description`
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
feat/user-avatars
|
|
151
|
+
fix/login-race-condition
|
|
152
|
+
refactor/button-components
|
|
153
|
+
chore/update-dependencies
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Creating Branches
|
|
157
|
+
|
|
158
|
+
Before creating:
|
|
159
|
+
1. Check existing branches: `git branch --list`
|
|
160
|
+
2. Ensure name is unique and descriptive
|
|
161
|
+
3. If similar exists, make more specific: `feat/auth` → `feat/auth-oauth`
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Pre-Commit Checklist
|
|
166
|
+
|
|
167
|
+
Before committing, verify:
|
|
168
|
+
|
|
169
|
+
- [ ] All tests pass
|
|
170
|
+
- [ ] No TypeScript/linting errors
|
|
171
|
+
- [ ] No console.log or debug statements
|
|
172
|
+
- [ ] Commit message is specific (not generic)
|
|
173
|
+
- [ ] Message explains WHY, not just WHAT
|
|
174
|
+
- [ ] No internal references (phases, waves, tasks)
|
|
175
|
+
- [ ] Someone unfamiliar could understand the change
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Commit Workflow
|
|
180
|
+
|
|
181
|
+
### Step 1: Review Changes
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
git status # See modified files
|
|
185
|
+
git diff # Review unstaged changes
|
|
186
|
+
git diff --staged # Review staged changes
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Step 2: Stage Thoughtfully
|
|
190
|
+
|
|
191
|
+
Stage related changes together:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
git add src/components/Avatar.tsx
|
|
195
|
+
git add src/services/avatar.ts
|
|
196
|
+
git add tests/avatar.test.ts
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Or stage all if changes are cohesive:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
git add -A
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Step 3: Commit with Quality Message
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
git commit -m "type(scope): title" -m "Body paragraph explaining why."
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Or for longer messages, let the editor open:
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
git commit
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Step 4: Verify
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
git log -1 # Review the commit
|
|
221
|
+
git show HEAD --stat # See files changed
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Pull Request Guidelines
|
|
227
|
+
|
|
228
|
+
### PR Title
|
|
229
|
+
|
|
230
|
+
Same format as commits: `type(scope): Descriptive summary`
|
|
231
|
+
|
|
232
|
+
### PR Description Template
|
|
233
|
+
|
|
234
|
+
```markdown
|
|
235
|
+
## Summary
|
|
236
|
+
|
|
237
|
+
[2-4 sentences: WHAT this PR does and WHY it was needed.
|
|
238
|
+
What problem does it solve? What's the approach?]
|
|
239
|
+
|
|
240
|
+
## Changes
|
|
241
|
+
|
|
242
|
+
- [Specific change with context]
|
|
243
|
+
- [Another change with why it matters]
|
|
244
|
+
- [Group related changes together]
|
|
245
|
+
|
|
246
|
+
## Testing
|
|
247
|
+
|
|
248
|
+
- [How was this tested?]
|
|
249
|
+
- [Manual testing performed]
|
|
250
|
+
- [Automated tests added/modified]
|
|
251
|
+
|
|
252
|
+
## Notes
|
|
253
|
+
|
|
254
|
+
[Breaking changes, migration steps, follow-up work, deployment notes]
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## Safety Rules
|
|
260
|
+
|
|
261
|
+
### Never
|
|
262
|
+
|
|
263
|
+
- Force push to main/master without explicit user request
|
|
264
|
+
- Commit secrets, credentials, or .env files
|
|
265
|
+
- Skip GPG signing if configured
|
|
266
|
+
- Create empty commits
|
|
267
|
+
- Commit with `--no-verify` (skips hooks)
|
|
268
|
+
- Add AI attribution or "Generated with" footers
|
|
269
|
+
|
|
270
|
+
### Always
|
|
271
|
+
|
|
272
|
+
- Run tests before committing
|
|
273
|
+
- Preserve GPG signing configuration
|
|
274
|
+
- Check for sensitive files before staging
|
|
275
|
+
- Use atomic commits (one logical change each)
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## Handling Merge Conflicts
|
|
280
|
+
|
|
281
|
+
### Step 1: Identify Conflicts
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
git status # Shows conflicted files
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### Step 2: Resolve
|
|
288
|
+
|
|
289
|
+
Open each conflicted file and resolve:
|
|
290
|
+
- Keep their changes: accept incoming
|
|
291
|
+
- Keep your changes: accept current
|
|
292
|
+
- Combine both: manual merge
|
|
293
|
+
|
|
294
|
+
### Step 3: Mark Resolved
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
git add <resolved-file>
|
|
298
|
+
git commit # Complete the merge
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## Recovery Commands
|
|
304
|
+
|
|
305
|
+
### Undo Last Commit (Keep Changes)
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
git reset --soft HEAD~1
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
### Undo Last Commit (Discard Changes)
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
git reset --hard HEAD~1
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### Amend Last Commit
|
|
318
|
+
|
|
319
|
+
Only if NOT pushed:
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
git commit --amend
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### Stash Changes
|
|
326
|
+
|
|
327
|
+
```bash
|
|
328
|
+
git stash # Save changes
|
|
329
|
+
git stash pop # Restore changes
|
|
330
|
+
git stash list # See stashed items
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
## Quality Checklist for Agents
|
|
336
|
+
|
|
337
|
+
Before any commit, verify:
|
|
338
|
+
|
|
339
|
+
1. **Message is universal** - No GoopSpec terminology
|
|
340
|
+
2. **Title is specific** - Not "Update files" or "Fix bug"
|
|
341
|
+
3. **Body explains why** - Context and motivation included
|
|
342
|
+
4. **Changes are atomic** - One logical unit of work
|
|
343
|
+
5. **Tests pass** - Verified before committing
|
|
344
|
+
6. **No debug code** - console.log removed
|
|
345
|
+
7. **GPG preserved** - Don't disable signing
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
*Git Workflow Reference v1.0*
|