@programinglive/dev-workflow-mcp-server 1.8.1 → 1.10.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/.env.example +21 -1
- package/AGENTS.md +25 -0
- package/README.md +372 -649
- package/factory-client.js +554 -0
- package/git-facade.js +35 -0
- package/index.js +9 -34
- package/package.json +21 -20
- package/scripts/bootstrap-unix.sh +55 -0
- package/scripts/bootstrap-windows.ps1 +75 -0
- package/scripts/install-husky.js +43 -0
- package/scripts/setup-stack.js +436 -0
- package/scripts/setup-test-dbs.sh +61 -0
- package/scripts/test-db-adapters.sh +71 -0
- package/scripts/verify-bundle.mjs +92 -0
- package/tools/definitions.js +143 -0
- package/tools/handler-modules/commit-handlers.js +2 -1
- package/tools/handler-modules/factory-handlers.js +276 -0
- package/tools/handler-modules/index.js +24 -7
- package/tools/handler-modules/shared.js +7 -41
- package/tools/handler-modules/status-handlers.js +25 -3
- package/tools/handler-modules/workflow-handlers.js +57 -10
- package/vite.config.js +6 -0
- package/workflow-state.js +176 -2
- package/.agent/workflows/dev-workflow-bugfix.md +0 -250
- package/.agent/workflows/dev-workflow-feature.md +0 -201
- package/.agent/workflows/dev-workflow-full-cycle.md +0 -400
- package/.agent/workflows/dev-workflow-refactor.md +0 -238
- package/.env.production +0 -16
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -34
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -25
- package/.github/pull_request_template.md +0 -22
- package/.github/workflows/github-release.yml +0 -131
- package/.husky/commit-msg +0 -3
- package/.husky/pre-commit +0 -2
- package/CHANGELOG.md +0 -1145
- package/docs/GCP_DEPLOYMENT.md +0 -298
- package/docs/NETLIFY_DEPLOYMENT.md +0 -125
- package/docs/PLESK_DEPLOYMENT.md +0 -170
- package/docs/PRD.md +0 -86
- package/docs/WORKFLOW-BEST-PRACTICES.md +0 -58
- package/docs/antigravity/EXAMPLES.md +0 -535
- package/docs/antigravity/GETTING-STARTED.md +0 -292
- package/docs/antigravity/TROUBLESHOOTING.md +0 -742
- package/docs/antigravity/WALKTHROUGH.md +0 -25
- package/docs/antigravity/WORKFLOW-TEMPLATES.md +0 -670
- package/docs/release-notes/RELEASE_NOTES.md +0 -524
- package/docs/web-dashboard.md +0 -175
- package/scripts/test-auth-flow.js +0 -75
- package/tailwind.config.js +0 -8
- package/tests/build.test.js +0 -74
- package/tests/db-adapters.test.js +0 -108
- package/tests/env-support.test.js +0 -46
- package/tests/exec.test.js +0 -35
- package/tests/handlers-commit.test.js +0 -174
- package/tests/handlers-release.test.js +0 -212
- package/tests/handlers-workflow.test.js +0 -68
- package/tests/handlers.test.js +0 -1142
- package/tests/hello-world.test.js +0 -13
- package/tests/mcpRegistry.test.js +0 -65
- package/tests/patch-release.test.js +0 -7
- package/tests/release-wrapper.test.js +0 -107
- package/tests/startup-resilience.test.js +0 -73
- package/tests/test-helpers.js +0 -50
- package/tests/workflowState.test.js +0 -520
- package/web/Dockerfile.api +0 -25
- package/web/README.md +0 -133
- package/web/__tests__/api/workflow-history.test.js +0 -63
- package/web/api-server.js +0 -211
- package/web/app/docs/page.tsx +0 -202
- package/web/app/favicon.ico +0 -0
- package/web/app/globals.css +0 -91
- package/web/app/history/page.tsx +0 -220
- package/web/app/layout.tsx +0 -39
- package/web/app/login/page.tsx +0 -142
- package/web/app/page.tsx +0 -13
- package/web/components/ApiReference.tsx +0 -20
- package/web/components/Features.tsx +0 -61
- package/web/components/Footer.tsx +0 -9
- package/web/components/Hero.tsx +0 -96
- package/web/components/History.tsx +0 -175
- package/web/components/Navbar.tsx +0 -208
- package/web/components/Terminal.tsx +0 -114
- package/web/components/ThemeProvider.tsx +0 -58
- package/web/eslint.config.mjs +0 -18
- package/web/lib/api-client.ts +0 -123
- package/web/lib/auth.js +0 -75
- package/web/lib/db.js +0 -131
- package/web/lib/docs.js +0 -73
- package/web/middleware/auth.js +0 -26
- package/web/netlify.toml +0 -8
- package/web/next.config.ts +0 -19
- package/web/package-lock.json +0 -10911
- package/web/package.json +0 -42
- package/web/postcss.config.mjs +0 -9
- package/web/public/assets/android-chrome-192x192.png +0 -0
- package/web/public/assets/android-chrome-512x512.png +0 -0
- package/web/public/assets/apple-touch-icon.png +0 -0
- package/web/public/assets/favicon-16x16.png +0 -0
- package/web/public/assets/favicon-32x32.png +0 -0
- package/web/public/assets/favicon.ico +0 -0
- package/web/public/assets/favicon.png +0 -0
- package/web/public/assets/logo.png +0 -0
- package/web/public/assets/og-preview.png +0 -0
- package/web/public/assets/site.webmanifest +0 -1
- package/web/public/file.svg +0 -1
- package/web/public/globe.svg +0 -1
- package/web/public/next.svg +0 -1
- package/web/public/vercel.svg +0 -1
- package/web/public/window.svg +0 -1
- package/web/scripts/db-query-history.js +0 -120
- package/web/scripts/smoke-test.js +0 -30
- package/web/server.js +0 -184
- package/web/tailwind.config.ts +0 -20
- package/web/tsconfig.json +0 -42
|
@@ -1,400 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Complete workflow demonstration showing all dev-workflow MCP server phases
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Full Cycle Workflow Demonstration
|
|
6
|
-
|
|
7
|
-
This workflow demonstrates a complete dev-workflow cycle from start to finish, showing all phases and tools.
|
|
8
|
-
|
|
9
|
-
## Purpose
|
|
10
|
-
|
|
11
|
-
This is a reference workflow showing:
|
|
12
|
-
- All workflow phases
|
|
13
|
-
- All MCP tools in action
|
|
14
|
-
- Complete development cycle
|
|
15
|
-
- Best practices
|
|
16
|
-
|
|
17
|
-
## Scenario
|
|
18
|
-
|
|
19
|
-
**Task:** Add user profile page with avatar upload
|
|
20
|
-
|
|
21
|
-
## Complete Workflow
|
|
22
|
-
|
|
23
|
-
### Phase 1: Task Start
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
Use start_task tool:
|
|
27
|
-
- description: "Add user profile page with avatar upload and bio"
|
|
28
|
-
- type: "feature"
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
**Response:**
|
|
32
|
-
```
|
|
33
|
-
✅ Task started
|
|
34
|
-
📝 Task ID: task-20231122-001
|
|
35
|
-
🔄 Phase: implementation
|
|
36
|
-
Next: Implement the feature, then mark as fixed
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
### Phase 2: Implementation
|
|
42
|
-
|
|
43
|
-
Code the feature:
|
|
44
|
-
|
|
45
|
-
**Files created/modified:**
|
|
46
|
-
- `components/ProfilePage.jsx`
|
|
47
|
-
- `components/AvatarUpload.jsx`
|
|
48
|
-
- `api/profile.js`
|
|
49
|
-
- `styles/profile.css`
|
|
50
|
-
|
|
51
|
-
**Implementation includes:**
|
|
52
|
-
- Avatar upload with preview
|
|
53
|
-
- Bio text editor
|
|
54
|
-
- Form validation
|
|
55
|
-
- API integration
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
### Phase 3: Mark as Fixed
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
Use mark_bug_fixed tool:
|
|
63
|
-
- summary: "User profile page with avatar upload, bio editor, and form validation"
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
**Response:**
|
|
67
|
-
```
|
|
68
|
-
✅ Feature marked as fixed
|
|
69
|
-
⚠️ Reminder: Create tests now!
|
|
70
|
-
🔄 Phase: testing
|
|
71
|
-
Next: Create tests covering your changes
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
### Phase 4: Create Tests
|
|
77
|
-
|
|
78
|
-
Write comprehensive tests:
|
|
79
|
-
|
|
80
|
-
**Test files:**
|
|
81
|
-
- `components/ProfilePage.test.jsx`
|
|
82
|
-
- `components/AvatarUpload.test.jsx`
|
|
83
|
-
- `api/profile.test.js`
|
|
84
|
-
|
|
85
|
-
**Test coverage:**
|
|
86
|
-
- Avatar upload flow
|
|
87
|
-
- Image preview
|
|
88
|
-
- Form validation
|
|
89
|
-
- API calls
|
|
90
|
-
- Error handling
|
|
91
|
-
|
|
92
|
-
```
|
|
93
|
-
Use create_tests tool
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
**Response:**
|
|
97
|
-
```
|
|
98
|
-
✅ Tests created
|
|
99
|
-
📝 Phase: testing
|
|
100
|
-
Next: Run tests and record results
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
### Phase 5: Run Tests
|
|
106
|
-
|
|
107
|
-
// turbo
|
|
108
|
-
Execute test suite:
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
npm test
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
**Output:**
|
|
115
|
-
```
|
|
116
|
-
PASS components/ProfilePage.test.jsx
|
|
117
|
-
PASS components/AvatarUpload.test.jsx
|
|
118
|
-
PASS api/profile.test.js
|
|
119
|
-
|
|
120
|
-
Tests: 18 passed, 18 total
|
|
121
|
-
Coverage: 94.2%
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
Record results:
|
|
125
|
-
|
|
126
|
-
```
|
|
127
|
-
Use run_tests tool:
|
|
128
|
-
- passed: true
|
|
129
|
-
- testCommand: "npm test"
|
|
130
|
-
- details: "18 new profile tests added. All tests pass. Coverage: 94.2%"
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
**Response:**
|
|
134
|
-
```
|
|
135
|
-
✅ Tests passed!
|
|
136
|
-
🔄 Phase: documentation
|
|
137
|
-
Next: Create or update documentation
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
### Phase 6: Create Documentation
|
|
143
|
-
|
|
144
|
-
Update documentation:
|
|
145
|
-
|
|
146
|
-
**Updated files:**
|
|
147
|
-
- `README.md` - Added profile page usage section
|
|
148
|
-
- `docs/API.md` - Documented profile endpoints
|
|
149
|
-
- `CHANGELOG.md` - Added feature entry
|
|
150
|
-
|
|
151
|
-
**Documentation includes:**
|
|
152
|
-
- Component API reference
|
|
153
|
-
- Usage examples
|
|
154
|
-
- Screenshot of profile page
|
|
155
|
-
- Migration notes if needed
|
|
156
|
-
|
|
157
|
-
```
|
|
158
|
-
Use create_documentation tool:
|
|
159
|
-
- documentationType: "README"
|
|
160
|
-
- summary: "Added profile page documentation with API reference, usage examples, and screenshots"
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
**Response:**
|
|
164
|
-
```
|
|
165
|
-
✅ Documentation created
|
|
166
|
-
🔄 Phase: ready_to_commit
|
|
167
|
-
Next: Check if ready to commit
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
---
|
|
171
|
-
|
|
172
|
-
### Phase 7: Ready Check
|
|
173
|
-
|
|
174
|
-
```
|
|
175
|
-
Use check_ready_to_commit tool
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
**Response:**
|
|
179
|
-
```
|
|
180
|
-
✅ All required steps completed
|
|
181
|
-
✅ Fixed: Yes
|
|
182
|
-
✅ Tests created: Yes
|
|
183
|
-
✅ Tests passed: Yes
|
|
184
|
-
✅ Documentation: Yes
|
|
185
|
-
🎉 Ready to commit and push!
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
---
|
|
189
|
-
|
|
190
|
-
### Phase 8: Commit and Push
|
|
191
|
-
|
|
192
|
-
```
|
|
193
|
-
Use commit_and_push tool:
|
|
194
|
-
- commitMessage: "feat(profile): add user profile page with avatar upload"
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
**Execution:**
|
|
198
|
-
```bash
|
|
199
|
-
git add .
|
|
200
|
-
git commit -m "feat(profile): add user profile page with avatar upload"
|
|
201
|
-
git push origin main
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
**Response:**
|
|
205
|
-
```
|
|
206
|
-
✅ Changes committed and pushed
|
|
207
|
-
📦 Commit: feat(profile): add user profile page with avatar upload
|
|
208
|
-
🌿 Branch: main
|
|
209
|
-
🔄 Phase: release
|
|
210
|
-
Next: Perform release
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
---
|
|
214
|
-
|
|
215
|
-
### Phase 9: Perform Release
|
|
216
|
-
|
|
217
|
-
```
|
|
218
|
-
Use perform_release tool:
|
|
219
|
-
- command: "npm run release:minor"
|
|
220
|
-
- notes: "v1.5.0 - User profile page feature"
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
**Execution:**
|
|
224
|
-
```bash
|
|
225
|
-
npm run release:minor
|
|
226
|
-
# Creates tag v1.5.0
|
|
227
|
-
# Updates CHANGELOG
|
|
228
|
-
# Bumps version in package.json
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
**Response:**
|
|
232
|
-
```
|
|
233
|
-
✅ Release recorded
|
|
234
|
-
📦 Release: npm run release:minor
|
|
235
|
-
📝 Notes: v1.5.0 - User profile page feature
|
|
236
|
-
🔄 Phase: complete
|
|
237
|
-
Next: Complete the task
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
---
|
|
241
|
-
|
|
242
|
-
### Phase 10: Complete Task
|
|
243
|
-
|
|
244
|
-
```
|
|
245
|
-
Use complete_task tool:
|
|
246
|
-
- commitMessage: "feat(profile): add user profile page with avatar upload"
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
**Response:**
|
|
250
|
-
```
|
|
251
|
-
✅ Task completed successfully!
|
|
252
|
-
📋 Summary:
|
|
253
|
-
- Type: feature
|
|
254
|
-
- Description: Add user profile page with avatar upload and bio
|
|
255
|
-
- Tests: Passed (18 tests)
|
|
256
|
-
- Documentation: README
|
|
257
|
-
- Commit: feat(profile): add user profile page with avatar upload
|
|
258
|
-
- Release: npm run release:minor
|
|
259
|
-
|
|
260
|
-
🎉 Workflow reset - ready for next task!
|
|
261
|
-
📊 Task added to history
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
---
|
|
265
|
-
|
|
266
|
-
## View History
|
|
267
|
-
|
|
268
|
-
Check completed tasks:
|
|
269
|
-
|
|
270
|
-
```
|
|
271
|
-
Use view_history tool:
|
|
272
|
-
- limit: 5
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
**Response:**
|
|
276
|
-
```
|
|
277
|
-
📜 Recent Workflow History (5 tasks)
|
|
278
|
-
|
|
279
|
-
1. feat(profile): add user profile page with avatar upload
|
|
280
|
-
Type: feature
|
|
281
|
-
Completed: 2023-11-22 14:30
|
|
282
|
-
Tests: Passed
|
|
283
|
-
Release: npm run release:minor
|
|
284
|
-
|
|
285
|
-
2. fix(auth): correct token expiration handling
|
|
286
|
-
Type: bugfix
|
|
287
|
-
Completed: 2023-11-21 10:15
|
|
288
|
-
Tests: Passed
|
|
289
|
-
Release: npm run release:patch
|
|
290
|
-
|
|
291
|
-
[... more history ...]
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
---
|
|
295
|
-
|
|
296
|
-
## Alternative: Quick Workflow with run_full_workflow
|
|
297
|
-
|
|
298
|
-
For simple, well-defined tasks, use `run_full_workflow` to execute all steps at once:
|
|
299
|
-
|
|
300
|
-
```
|
|
301
|
-
Use run_full_workflow tool:
|
|
302
|
-
summary: "User profile page with avatar upload and bio editor"
|
|
303
|
-
testCommand: "npm test"
|
|
304
|
-
testsPassed: true
|
|
305
|
-
testDetails: "18 profile tests added, all pass, coverage 94.2%"
|
|
306
|
-
documentationType: "README"
|
|
307
|
-
documentationSummary: "Added profile page docs with API reference and examples"
|
|
308
|
-
commitMessage: "feat(profile): add user profile page with avatar upload"
|
|
309
|
-
releaseCommand: "npm run release:minor"
|
|
310
|
-
releaseNotes: "v1.5.0 - User profile page feature"
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
This executes all 9 steps in one call!
|
|
314
|
-
|
|
315
|
-
---
|
|
316
|
-
|
|
317
|
-
## Workflow State Tracking
|
|
318
|
-
|
|
319
|
-
Check status at any time:
|
|
320
|
-
|
|
321
|
-
```
|
|
322
|
-
Use get_workflow_status tool
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
**Example response (mid-workflow):**
|
|
326
|
-
```
|
|
327
|
-
📋 Current Workflow Status
|
|
328
|
-
|
|
329
|
-
Task: Add user profile page with avatar upload and bio
|
|
330
|
-
Type: feature
|
|
331
|
-
Phase: documentation
|
|
332
|
-
|
|
333
|
-
✅ Completed:
|
|
334
|
-
✓ Task started
|
|
335
|
-
✓ Feature fixed
|
|
336
|
-
✓ Tests created
|
|
337
|
-
✓ Tests passed
|
|
338
|
-
|
|
339
|
-
⏳ Pending:
|
|
340
|
-
○ Documentation
|
|
341
|
-
○ Commit & push
|
|
342
|
-
○ Release
|
|
343
|
-
○ Complete
|
|
344
|
-
|
|
345
|
-
Next step: Create documentation
|
|
346
|
-
```
|
|
347
|
-
|
|
348
|
-
---
|
|
349
|
-
|
|
350
|
-
## Complete Tool Summary
|
|
351
|
-
|
|
352
|
-
Tools used in this workflow:
|
|
353
|
-
|
|
354
|
-
1. **start_task** - Begin new task
|
|
355
|
-
2. **mark_bug_fixed** - Mark implementation complete
|
|
356
|
-
3. **create_tests** - Record test creation
|
|
357
|
-
4. **run_tests** - Record test execution (blocks if failed)
|
|
358
|
-
5. **create_documentation** - Record documentation
|
|
359
|
-
6. **check_ready_to_commit** - Verify all steps complete
|
|
360
|
-
7. **commit_and_push** - Automated git commit & push
|
|
361
|
-
8. **perform_release** - Record release details
|
|
362
|
-
9. **complete_task** - Finish and reset workflow
|
|
363
|
-
10. **view_history** - See completed tasks
|
|
364
|
-
11. **get_workflow_status** - Check current phase
|
|
365
|
-
|
|
366
|
-
Optional tools:
|
|
367
|
-
- **skip_tests** - Skip with justification (manual testing)
|
|
368
|
-
- **drop_task** - Abandon task without completing
|
|
369
|
-
- **force_complete_task** - Force complete (emergency use)
|
|
370
|
-
- **rerun_workflow** - Restart current task
|
|
371
|
-
- **run_full_workflow** - Execute all steps at once
|
|
372
|
-
|
|
373
|
-
---
|
|
374
|
-
|
|
375
|
-
## Workflow Benefits
|
|
376
|
-
|
|
377
|
-
This disciplined workflow ensures:
|
|
378
|
-
|
|
379
|
-
- ✅ **Clear intent** - Every task starts with description
|
|
380
|
-
- ✅ **Test coverage** - Tests are mandatory
|
|
381
|
-
- ✅ **Quality gates** - Failing tests block commits
|
|
382
|
-
- ✅ **Documentation** - Documentation is required
|
|
383
|
-
- ✅ **Conventional commits** - Consistent commit messages
|
|
384
|
-
- ✅ **Release tracking** - All releases are recorded
|
|
385
|
-
- ✅ **Audit trail** - Complete history of all tasks
|
|
386
|
-
|
|
387
|
-
---
|
|
388
|
-
|
|
389
|
-
## Next Steps
|
|
390
|
-
|
|
391
|
-
- Use this as a reference for your own workflows
|
|
392
|
-
- Customize for your project's needs
|
|
393
|
-
- See other workflow templates:
|
|
394
|
-
- [dev-workflow-feature.md](./dev-workflow-feature.md)
|
|
395
|
-
- [dev-workflow-bugfix.md](./dev-workflow-bugfix.md)
|
|
396
|
-
- [dev-workflow-refactor.md](./dev-workflow-refactor.md)
|
|
397
|
-
|
|
398
|
-
---
|
|
399
|
-
|
|
400
|
-
**Disciplined development leads to quality software!** 🚀
|
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Refactoring workflow using dev-workflow MCP server
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Refactoring Workflow
|
|
6
|
-
|
|
7
|
-
This workflow guides you through refactoring code while maintaining functionality with the dev-workflow MCP server.
|
|
8
|
-
|
|
9
|
-
## When to Use
|
|
10
|
-
|
|
11
|
-
- Improving code structure
|
|
12
|
-
- Removing code smells
|
|
13
|
-
- Optimizing performance
|
|
14
|
-
- Simplifying complex code
|
|
15
|
-
|
|
16
|
-
## Workflow Steps
|
|
17
|
-
|
|
18
|
-
### 1. Start the Task
|
|
19
|
-
|
|
20
|
-
Define your refactoring goal:
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
Use start_task tool:
|
|
24
|
-
- description: "Refactor [component/module] to [improvement goal]"
|
|
25
|
-
- type: "refactor"
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
### 2. Ensure Test Coverage
|
|
29
|
-
|
|
30
|
-
**Before refactoring**, verify you have good test coverage:
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
npm test -- --coverage
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
If coverage is low, write tests first to ensure refactoring doesn't break functionality.
|
|
37
|
-
|
|
38
|
-
### 3. Refactor Code
|
|
39
|
-
|
|
40
|
-
Make your improvements:
|
|
41
|
-
- Extract methods/components
|
|
42
|
-
- Simplify complex logic
|
|
43
|
-
- Remove duplication
|
|
44
|
-
- Optimize performance
|
|
45
|
-
|
|
46
|
-
**Key principle:** Behavior should remain unchanged.
|
|
47
|
-
|
|
48
|
-
### 4. Mark as Fixed
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
Use mark_bug_fixed tool:
|
|
52
|
-
- summary: "[Brief description of refactoring]"
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### 5. Update Tests
|
|
56
|
-
|
|
57
|
-
Adapt tests to new structure if needed:
|
|
58
|
-
- Update test structure for new organization
|
|
59
|
-
- Ensure all existing tests still pass
|
|
60
|
-
- Add tests for new abstractions
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
Use create_tests tool
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### 6. Run Tests
|
|
67
|
-
|
|
68
|
-
// turbo
|
|
69
|
-
Verify all tests still pass:
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
npm test -- --coverage
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Coverage should maintain or improve:
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
Use run_tests tool:
|
|
79
|
-
- passed: true
|
|
80
|
-
- testCommand: "npm test -- --coverage"
|
|
81
|
-
- details: "[All tests pass, coverage maintained/improved]"
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
### 7. Document Changes
|
|
85
|
-
|
|
86
|
-
Update documentation for new structure:
|
|
87
|
-
- **Inline comments** - Document new abstractions
|
|
88
|
-
- **Architecture docs** - Update diagrams if structure changed
|
|
89
|
-
- **README** - Update examples if API changed
|
|
90
|
-
|
|
91
|
-
```
|
|
92
|
-
Use create_documentation tool:
|
|
93
|
-
- documentationType: "inline-comments"
|
|
94
|
-
- summary: "[What you documented]"
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### 8. Commit and Push
|
|
98
|
-
|
|
99
|
-
Use `refactor` commit type:
|
|
100
|
-
|
|
101
|
-
```
|
|
102
|
-
Use commit_and_push tool:
|
|
103
|
-
- commitMessage: "refactor([scope]): [description]"
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
Examples:
|
|
107
|
-
- `refactor(auth): extract authentication logic to custom hooks`
|
|
108
|
-
- `refactor(api): simplify error handling with interceptors`
|
|
109
|
-
|
|
110
|
-
### 9. Perform Release
|
|
111
|
-
|
|
112
|
-
Refactoring can be minor or patch:
|
|
113
|
-
- **Minor** - Significant internal improvements
|
|
114
|
-
- **Patch** - Small structural improvements
|
|
115
|
-
|
|
116
|
-
```
|
|
117
|
-
Use perform_release tool:
|
|
118
|
-
- command: "npm run release:minor"
|
|
119
|
-
- notes: "v[X.Y.Z] - Internal improvements (refactoring)"
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### 10. Complete Task
|
|
123
|
-
|
|
124
|
-
```
|
|
125
|
-
Use complete_task tool:
|
|
126
|
-
- commitMessage: "refactor([scope]): [description]"
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
## Example: Extract Custom Hooks
|
|
130
|
-
|
|
131
|
-
```
|
|
132
|
-
1. start_task:
|
|
133
|
-
description: "Refactor authentication logic into reusable custom hooks"
|
|
134
|
-
type: "refactor"
|
|
135
|
-
|
|
136
|
-
2. [Check test coverage: 89%]
|
|
137
|
-
|
|
138
|
-
3. [Extract useAuth and usePermissions hooks from components]
|
|
139
|
-
|
|
140
|
-
4. mark_bug_fixed:
|
|
141
|
-
summary: "Extracted useAuth and usePermissions hooks from component logic"
|
|
142
|
-
|
|
143
|
-
5. [Update component tests to work with hooks]
|
|
144
|
-
|
|
145
|
-
6. create_tests
|
|
146
|
-
|
|
147
|
-
7. Run: npm test -- --coverage
|
|
148
|
-
|
|
149
|
-
8. run_tests:
|
|
150
|
-
passed: true
|
|
151
|
-
testCommand: "npm test -- --coverage"
|
|
152
|
-
details: "All 145 tests pass, coverage improved from 89% to 92%"
|
|
153
|
-
|
|
154
|
-
9. [Add JSDoc comments to hooks, update README with hook examples]
|
|
155
|
-
|
|
156
|
-
10. create_documentation:
|
|
157
|
-
documentationType: "inline-comments"
|
|
158
|
-
summary: "Added JSDoc for custom hooks and usage examples in README"
|
|
159
|
-
|
|
160
|
-
11. commit_and_push:
|
|
161
|
-
commitMessage: "refactor(auth): extract authentication logic to custom hooks"
|
|
162
|
-
|
|
163
|
-
12. perform_release:
|
|
164
|
-
command: "npm run release:minor"
|
|
165
|
-
notes: "v1.6.0 - Authentication refactoring (improved maintainability)"
|
|
166
|
-
|
|
167
|
-
13. complete_task:
|
|
168
|
-
commitMessage: "refactor(auth): extract authentication logic to custom hooks"
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
## Refactoring Checklist
|
|
172
|
-
|
|
173
|
-
Before starting:
|
|
174
|
-
- [ ] Current code has adequate test coverage
|
|
175
|
-
- [ ] Tests are passing
|
|
176
|
-
- [ ] Refactoring goal is clear
|
|
177
|
-
|
|
178
|
-
During refactoring:
|
|
179
|
-
- [ ] Run tests frequently
|
|
180
|
-
- [ ] Make small, incremental changes
|
|
181
|
-
- [ ] Commit logical chunks if needed locally
|
|
182
|
-
|
|
183
|
-
After refactoring:
|
|
184
|
-
- [ ] All tests pass
|
|
185
|
-
- [ ] Coverage maintained or improved
|
|
186
|
-
- [ ] Code is simpler/cleaner
|
|
187
|
-
- [ ] Documentation updated
|
|
188
|
-
|
|
189
|
-
## Quick Reference
|
|
190
|
-
|
|
191
|
-
```
|
|
192
|
-
1. start_task → 2. Verify tests → 3. Refactor → 4. mark_bug_fixed
|
|
193
|
-
→ 5. Update tests → 6. create_tests → 7. run_tests
|
|
194
|
-
→ 8. Document → 9. create_documentation → 10. commit_and_push
|
|
195
|
-
→ 11. perform_release → 12. complete_task
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
## Tips
|
|
199
|
-
|
|
200
|
-
- **Test first** - Ensure good coverage before refactoring
|
|
201
|
-
- **Small changes** - Refactor incrementally
|
|
202
|
-
- **Keep tests passing** - Run tests frequently
|
|
203
|
-
- **No behavior changes** - Functionality stays the same
|
|
204
|
-
- **Document abstractions** - Explain new patterns
|
|
205
|
-
- **Coverage goal** - Maintain or improve test coverage
|
|
206
|
-
|
|
207
|
-
## Common Refactoring Patterns
|
|
208
|
-
|
|
209
|
-
### Extract Method
|
|
210
|
-
```
|
|
211
|
-
refactor(utils): extract validation logic to separate functions
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
### Extract Component
|
|
215
|
-
```
|
|
216
|
-
refactor(ui): extract UserCard component from UserList
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
### Simplify Logic
|
|
220
|
-
```
|
|
221
|
-
refactor(cart): simplify price calculation logic
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
### Remove Duplication
|
|
225
|
-
```
|
|
226
|
-
refactor(api): consolidate duplicate request handlers
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
### Optimize Performance
|
|
230
|
-
```
|
|
231
|
-
refactor(search): optimize search algorithm complexity
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
## Need Help?
|
|
235
|
-
|
|
236
|
-
- `get_workflow_status` - Check current phase
|
|
237
|
-
- [EXAMPLES.md](../docs/antigravity/EXAMPLES.md) - Refactoring examples
|
|
238
|
-
- [TROUBLESHOOTING.md](../docs/antigravity/TROUBLESHOOTING.md) - Common issues
|
package/.env.production
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# Production Environment Configuration for Docker Deployment
|
|
2
|
-
# Copy this file to .env on your GCP instance
|
|
3
|
-
|
|
4
|
-
# Database Configuration
|
|
5
|
-
DEV_WORKFLOW_DB_TYPE=postgres
|
|
6
|
-
DEV_WORKFLOW_DB_URL=postgres://devworkflow:YOUR_SECURE_PASSWORD_HERE@postgres:5432/devworkflow
|
|
7
|
-
|
|
8
|
-
# PostgreSQL Password (used by docker-compose)
|
|
9
|
-
# IMPORTANT: Change this to a secure password!
|
|
10
|
-
POSTGRES_PASSWORD=YOUR_SECURE_PASSWORD_HERE
|
|
11
|
-
|
|
12
|
-
# Optional: User ID for multi-user environments
|
|
13
|
-
# DEV_WORKFLOW_USER_ID=your-username
|
|
14
|
-
|
|
15
|
-
# Node Environment
|
|
16
|
-
NODE_ENV=production
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Bug Report
|
|
3
|
-
about: Create a report to help us improve
|
|
4
|
-
labels: bug
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Describe the bug
|
|
8
|
-
|
|
9
|
-
A clear and concise description of what the bug is.
|
|
10
|
-
|
|
11
|
-
## To Reproduce
|
|
12
|
-
|
|
13
|
-
Steps to reproduce the behavior:
|
|
14
|
-
1. Go to '...'
|
|
15
|
-
2. Run command '...'
|
|
16
|
-
3. See error
|
|
17
|
-
|
|
18
|
-
## Expected behavior
|
|
19
|
-
|
|
20
|
-
A clear and concise description of what you expected to happen.
|
|
21
|
-
|
|
22
|
-
## Screenshots / Logs
|
|
23
|
-
|
|
24
|
-
If applicable, add screenshots or paste logs to help explain your problem.
|
|
25
|
-
|
|
26
|
-
## Environment (please complete the following information):
|
|
27
|
-
|
|
28
|
-
- OS: [e.g. macOS 14.5]
|
|
29
|
-
- Node version: [e.g. 20.14.0]
|
|
30
|
-
- npm version: [e.g. 10.8.2]
|
|
31
|
-
|
|
32
|
-
## Additional context
|
|
33
|
-
|
|
34
|
-
Add any other context about the problem here.
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Feature Request
|
|
3
|
-
about: Suggest an idea for this project
|
|
4
|
-
labels: enhancement
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Summary
|
|
8
|
-
|
|
9
|
-
Describe the feature you'd like to see added.
|
|
10
|
-
|
|
11
|
-
## Problem Statement
|
|
12
|
-
|
|
13
|
-
What problem does this feature solve? Why is it important?
|
|
14
|
-
|
|
15
|
-
## Proposed Solution
|
|
16
|
-
|
|
17
|
-
Describe how you think this should work.
|
|
18
|
-
|
|
19
|
-
## Alternatives Considered
|
|
20
|
-
|
|
21
|
-
List any alternative solutions or features you've considered.
|
|
22
|
-
|
|
23
|
-
## Additional context
|
|
24
|
-
|
|
25
|
-
Add any other context, screenshots, or references about the feature request here.
|