viepilot 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/CHANGELOG.md +230 -0
  2. package/LICENSE +23 -0
  3. package/README.md +550 -0
  4. package/bin/viepilot.cjs +222 -0
  5. package/bin/vp-tools.cjs +912 -0
  6. package/dev-install.sh +109 -0
  7. package/docs/README.md +125 -0
  8. package/docs/advanced-usage.md +366 -0
  9. package/docs/api/README.md +12 -0
  10. package/docs/api/graphql-schema.md +5 -0
  11. package/docs/api/kafka-events.md +5 -0
  12. package/docs/api/rest-api.md +19 -0
  13. package/docs/api/websocket-api.md +5 -0
  14. package/docs/dev/architecture.md +226 -0
  15. package/docs/dev/cli-reference.md +324 -0
  16. package/docs/dev/contributing.md +195 -0
  17. package/docs/dev/deployment.md +204 -0
  18. package/docs/dev/getting-started.md +16 -0
  19. package/docs/dev/testing.md +171 -0
  20. package/docs/dev/ui-components-library.md +36 -0
  21. package/docs/getting-started.md +163 -0
  22. package/docs/skills-reference.md +399 -0
  23. package/docs/troubleshooting.md +297 -0
  24. package/docs/user/faq.md +117 -0
  25. package/docs/user/features/autonomous-mode.md +111 -0
  26. package/docs/user/features/checkpoint-recovery.md +76 -0
  27. package/docs/user/features/debug-mode.md +77 -0
  28. package/docs/user/features/ui-direction.md +29 -0
  29. package/docs/user/quick-start.md +157 -0
  30. package/docs/videos/01-installation.md +113 -0
  31. package/docs/videos/02-first-project.md +132 -0
  32. package/docs/videos/03-autonomous-mode.md +147 -0
  33. package/install.sh +144 -0
  34. package/lib/cli-shared.cjs +108 -0
  35. package/package.json +78 -0
  36. package/skills/vp-audit/SKILL.md +140 -0
  37. package/skills/vp-auto/SKILL.md +204 -0
  38. package/skills/vp-brainstorm/SKILL.md +75 -0
  39. package/skills/vp-crystallize/SKILL.md +175 -0
  40. package/skills/vp-debug/SKILL.md +96 -0
  41. package/skills/vp-docs/SKILL.md +258 -0
  42. package/skills/vp-evolve/SKILL.md +165 -0
  43. package/skills/vp-pause/SKILL.md +150 -0
  44. package/skills/vp-request/SKILL.md +250 -0
  45. package/skills/vp-resume/SKILL.md +141 -0
  46. package/skills/vp-rollback/SKILL.md +116 -0
  47. package/skills/vp-status/SKILL.md +137 -0
  48. package/skills/vp-task/SKILL.md +139 -0
  49. package/skills/vp-ui-components/SKILL.md +64 -0
  50. package/templates/phase/PHASE-STATE.md +35 -0
  51. package/templates/phase/SPEC.md +40 -0
  52. package/templates/phase/SUMMARY.md +67 -0
  53. package/templates/phase/TASK.md +101 -0
  54. package/templates/phase/VERIFICATION.md +49 -0
  55. package/templates/project/AI-GUIDE.md +114 -0
  56. package/templates/project/ARCHITECTURE.md +70 -0
  57. package/templates/project/CHANGELOG.md +36 -0
  58. package/templates/project/CONTRIBUTING.md +154 -0
  59. package/templates/project/CONTRIBUTORS.md +41 -0
  60. package/templates/project/PROJECT-CONTEXT.md +74 -0
  61. package/templates/project/PROJECT-META.md +133 -0
  62. package/templates/project/README.md +197 -0
  63. package/templates/project/ROADMAP.md +56 -0
  64. package/templates/project/SYSTEM-RULES.md +368 -0
  65. package/templates/project/TRACKER.md +50 -0
  66. package/ui-components/INDEX.md +9 -0
  67. package/ui-components/base/button/README.md +8 -0
  68. package/ui-components/base/button/metadata.json +8 -0
  69. package/ui-components/base/card/README.md +8 -0
  70. package/ui-components/base/card/metadata.json +8 -0
  71. package/ui-components/base/input/README.md +8 -0
  72. package/ui-components/base/input/metadata.json +8 -0
  73. package/workflows/audit.md +549 -0
  74. package/workflows/autonomous.md +425 -0
  75. package/workflows/brainstorm.md +257 -0
  76. package/workflows/crystallize.md +418 -0
  77. package/workflows/debug.md +241 -0
  78. package/workflows/documentation.md +587 -0
  79. package/workflows/evolve.md +258 -0
  80. package/workflows/pause-work.md +255 -0
  81. package/workflows/request.md +534 -0
  82. package/workflows/resume-work.md +226 -0
  83. package/workflows/rollback.md +202 -0
  84. package/workflows/ui-components.md +109 -0
@@ -0,0 +1,534 @@
1
+ <purpose>
2
+ Tạo và quản lý requests cho dự án: bugs, features, enhancements, tech debt, và brainstorm continuation.
3
+ </purpose>
4
+
5
+ <process>
6
+
7
+ <step name="init">
8
+ ## 1. Initialize
9
+
10
+ Check project exists:
11
+ ```bash
12
+ if [ ! -f ".viepilot/TRACKER.md" ]; then
13
+ echo "No ViePilot project found. Run /vp-crystallize first."
14
+ exit 1
15
+ fi
16
+
17
+ # Create requests directory if not exists
18
+ mkdir -p .viepilot/requests
19
+ ```
20
+
21
+ Get next request number:
22
+ ```bash
23
+ # Count existing requests
24
+ BUG_COUNT=$(ls .viepilot/requests/BUG-*.md 2>/dev/null | wc -l)
25
+ FEAT_COUNT=$(ls .viepilot/requests/FEAT-*.md 2>/dev/null | wc -l)
26
+ ENH_COUNT=$(ls .viepilot/requests/ENH-*.md 2>/dev/null | wc -l)
27
+ DEBT_COUNT=$(ls .viepilot/requests/DEBT-*.md 2>/dev/null | wc -l)
28
+ ```
29
+ </step>
30
+
31
+ <step name="detect_type">
32
+ ## 2. Detect Request Type
33
+
34
+ Parse `{{VP_ARGS}}` for type flag:
35
+ - `--bug` → Bug Report
36
+ - `--feature` → Feature Request
37
+ - `--enhance` → Enhancement
38
+ - `--debt` → Technical Debt
39
+ - `--brainstorm` → Brainstorm Continuation
40
+ - `--list` → List Requests
41
+
42
+ If no flag, ask user:
43
+ ```
44
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
45
+ VIEPILOT ► REQUEST
46
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
47
+
48
+ What type of request?
49
+
50
+ 1. 🐛 Bug Report - Something is broken
51
+ 2. ✨ Feature Request - New functionality
52
+ 3. 🔧 Enhancement - Improve existing feature
53
+ 4. 🧹 Technical Debt - Code cleanup/refactor
54
+ 5. 💡 Brainstorm - Explore new ideas
55
+ 6. 📋 List Requests - View pending requests
56
+ ```
57
+ </step>
58
+
59
+ <step name="list_requests">
60
+ ## 3. List Requests (if --list)
61
+
62
+ ```bash
63
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
64
+ echo " PENDING REQUESTS"
65
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
66
+ echo ""
67
+ echo "| ID | Type | Title | Priority | Status |"
68
+ echo "|----|------|-------|----------|--------|"
69
+
70
+ for file in .viepilot/requests/*.md; do
71
+ # Parse each file and display
72
+ done
73
+ ```
74
+
75
+ After listing, offer options:
76
+ ```
77
+ Options:
78
+ 1. Work on a request
79
+ 2. Create new request
80
+ 3. Close a request
81
+ ```
82
+ </step>
83
+
84
+ <step name="gather_bug">
85
+ ## 4A. Gather Bug Details
86
+
87
+ ```
88
+ 🐛 Bug Report
89
+
90
+ 1. Title/Summary?
91
+ >
92
+
93
+ 2. What happened? (actual behavior)
94
+ >
95
+
96
+ 3. What should happen? (expected behavior)
97
+ >
98
+
99
+ 4. Steps to reproduce?
100
+ >
101
+
102
+ 5. Which part of system affected?
103
+ (service/module/file)
104
+ >
105
+
106
+ 6. Severity?
107
+ 1. Critical - System down, data loss
108
+ 2. High - Major feature broken
109
+ 3. Medium - Feature impaired
110
+ 4. Low - Minor issue
111
+ >
112
+
113
+ 7. Any error messages or logs?
114
+ >
115
+ ```
116
+
117
+ Create `BUG-{N}.md`:
118
+ ```markdown
119
+ # 🐛 BUG: {TITLE}
120
+
121
+ ## Meta
122
+ - **ID**: BUG-{N}
123
+ - **Type**: Bug
124
+ - **Status**: new
125
+ - **Severity**: {SEVERITY}
126
+ - **Created**: {timestamp}
127
+ - **Affected**: {SERVICE/MODULE}
128
+
129
+ ## Summary
130
+ {TITLE}
131
+
132
+ ## Actual Behavior
133
+ {ACTUAL}
134
+
135
+ ## Expected Behavior
136
+ {EXPECTED}
137
+
138
+ ## Steps to Reproduce
139
+ 1. {step1}
140
+ 2. {step2}
141
+ 3. {step3}
142
+
143
+ ## Error Messages
144
+ ```
145
+ {ERROR_LOGS}
146
+ ```
147
+
148
+ ## Environment
149
+ - Version: {from TRACKER.md}
150
+ - Phase: {current_phase}
151
+
152
+ ## Acceptance Criteria
153
+ - [ ] Bug no longer occurs
154
+ - [ ] Root cause identified
155
+ - [ ] Test added to prevent regression
156
+
157
+ ## Fix
158
+ {To be filled when resolved}
159
+ ```
160
+ </step>
161
+
162
+ <step name="gather_feature">
163
+ ## 4B. Gather Feature Details
164
+
165
+ ```
166
+ ✨ Feature Request
167
+
168
+ 1. Title/Summary?
169
+ >
170
+
171
+ 2. What problem does this solve?
172
+ >
173
+
174
+ 3. Describe the feature:
175
+ >
176
+
177
+ 4. Who benefits from this?
178
+ >
179
+
180
+ 5. Priority?
181
+ 1. Must-have - Critical for release
182
+ 2. Should-have - Important but not blocking
183
+ 3. Nice-to-have - Can defer
184
+ >
185
+
186
+ 6. Any specific requirements?
187
+ >
188
+
189
+ 7. Want to brainstorm this in detail? (y/n)
190
+ >
191
+ ```
192
+
193
+ If brainstorm = yes:
194
+ → Route to mini brainstorm session
195
+ → Append discussion to feature file
196
+
197
+ Create `FEAT-{N}.md`:
198
+ ```markdown
199
+ # ✨ FEATURE: {TITLE}
200
+
201
+ ## Meta
202
+ - **ID**: FEAT-{N}
203
+ - **Type**: Feature
204
+ - **Status**: new
205
+ - **Priority**: {PRIORITY}
206
+ - **Created**: {timestamp}
207
+
208
+ ## Summary
209
+ {TITLE}
210
+
211
+ ## Problem Statement
212
+ {PROBLEM}
213
+
214
+ ## Proposed Solution
215
+ {DESCRIPTION}
216
+
217
+ ## Target Users
218
+ {WHO_BENEFITS}
219
+
220
+ ## Requirements
221
+ {SPECIFIC_REQUIREMENTS}
222
+
223
+ ## Acceptance Criteria
224
+ - [ ] {criteria_1}
225
+ - [ ] {criteria_2}
226
+ - [ ] {criteria_3}
227
+
228
+ ## Brainstorm Notes
229
+ {If brainstormed}
230
+
231
+ ## Implementation Plan
232
+ {To be filled when triaged}
233
+ ```
234
+ </step>
235
+
236
+ <step name="gather_enhancement">
237
+ ## 4C. Gather Enhancement Details
238
+
239
+ ```
240
+ 🔧 Enhancement Request
241
+
242
+ 1. Title/Summary?
243
+ >
244
+
245
+ 2. Which existing feature to enhance?
246
+ >
247
+
248
+ 3. Current behavior:
249
+ >
250
+
251
+ 4. Desired improvement:
252
+ >
253
+
254
+ 5. Why is this valuable?
255
+ >
256
+
257
+ 6. Breaking changes? (y/n)
258
+ >
259
+ ```
260
+
261
+ Create `ENH-{N}.md`:
262
+ ```markdown
263
+ # 🔧 ENHANCEMENT: {TITLE}
264
+
265
+ ## Meta
266
+ - **ID**: ENH-{N}
267
+ - **Type**: Enhancement
268
+ - **Status**: new
269
+ - **Created**: {timestamp}
270
+ - **Breaking**: {YES/NO}
271
+
272
+ ## Summary
273
+ {TITLE}
274
+
275
+ ## Current Feature
276
+ {EXISTING_FEATURE}
277
+
278
+ ## Current Behavior
279
+ {CURRENT}
280
+
281
+ ## Desired Improvement
282
+ {IMPROVEMENT}
283
+
284
+ ## Value Proposition
285
+ {WHY_VALUABLE}
286
+
287
+ ## Acceptance Criteria
288
+ - [ ] Enhancement implemented
289
+ - [ ] Existing functionality preserved
290
+ - [ ] Documentation updated
291
+
292
+ ## Implementation Notes
293
+ {To be filled}
294
+ ```
295
+ </step>
296
+
297
+ <step name="gather_debt">
298
+ ## 4D. Gather Tech Debt Details
299
+
300
+ ```
301
+ 🧹 Technical Debt
302
+
303
+ 1. Title/Summary?
304
+ >
305
+
306
+ 2. What needs cleanup?
307
+ >
308
+
309
+ 3. Current issues:
310
+ 1. Performance
311
+ 2. Maintainability
312
+ 3. Security
313
+ 4. Code quality
314
+ 5. Other
315
+ >
316
+
317
+ 4. Proposed solution:
318
+ >
319
+
320
+ 5. Effort estimate?
321
+ 1. S - Few hours
322
+ 2. M - 1-2 days
323
+ 3. L - 3-5 days
324
+ 4. XL - 1+ week
325
+ >
326
+
327
+ 6. Risk if not addressed?
328
+ >
329
+ ```
330
+
331
+ Create `DEBT-{N}.md`:
332
+ ```markdown
333
+ # 🧹 TECH DEBT: {TITLE}
334
+
335
+ ## Meta
336
+ - **ID**: DEBT-{N}
337
+ - **Type**: Technical Debt
338
+ - **Status**: new
339
+ - **Effort**: {S/M/L/XL}
340
+ - **Created**: {timestamp}
341
+
342
+ ## Summary
343
+ {TITLE}
344
+
345
+ ## Current State
346
+ {WHAT_NEEDS_CLEANUP}
347
+
348
+ ## Issues
349
+ - Type: {ISSUE_TYPE}
350
+ - Impact: {IMPACT}
351
+
352
+ ## Proposed Solution
353
+ {SOLUTION}
354
+
355
+ ## Risk if Not Addressed
356
+ {RISK}
357
+
358
+ ## Acceptance Criteria
359
+ - [ ] Code cleaned up
360
+ - [ ] Tests still passing
361
+ - [ ] No new technical debt introduced
362
+
363
+ ## Implementation Notes
364
+ {To be filled}
365
+ ```
366
+ </step>
367
+
368
+ <step name="brainstorm_continuation">
369
+ ## 4E. Brainstorm Continuation
370
+
371
+ ```
372
+ 💡 Brainstorm Continuation
373
+
374
+ You have an existing project. Let's explore new ideas.
375
+
376
+ 1. What do you want to explore?
377
+ >
378
+
379
+ 2. Is this related to an existing feature or completely new?
380
+ 1. Extend existing feature
381
+ 2. Completely new area
382
+ 3. Not sure yet
383
+ >
384
+
385
+ 3. Any initial ideas or constraints?
386
+ >
387
+ ```
388
+
389
+ Load project context:
390
+ ```bash
391
+ cat .viepilot/PROJECT-CONTEXT.md
392
+ cat .viepilot/ARCHITECTURE.md
393
+ cat .viepilot/TRACKER.md # for current state
394
+ ```
395
+
396
+ Start focused brainstorm session:
397
+ - Load existing architecture
398
+ - Understand current state
399
+ - Explore new ideas within context
400
+ - Check compatibility with existing system
401
+ - Document decisions
402
+
403
+ Save to brainstorm session file with prefix `continuation-`:
404
+ `docs/brainstorm/continuation-{YYYY-MM-DD}-{topic}.md`
405
+
406
+ After brainstorm:
407
+ ```
408
+ Brainstorm complete!
409
+
410
+ Summary:
411
+ - Topic: {topic}
412
+ - Key ideas: {count}
413
+ - Decisions: {count}
414
+
415
+ Options:
416
+ 1. Create Feature request from this
417
+ 2. Create Enhancement request
418
+ 3. Add to backlog for later
419
+ 4. Discard
420
+ ```
421
+ </step>
422
+
423
+ <step name="triage">
424
+ ## 5. Triage & Route
425
+
426
+ Based on type and priority:
427
+
428
+ ### Critical Bug
429
+ ```
430
+ ⚠️ CRITICAL BUG DETECTED
431
+
432
+ This needs immediate attention.
433
+
434
+ Options:
435
+ 1. Fix immediately (pause current work)
436
+ 2. Add to top of current phase
437
+ 3. Schedule for next slot
438
+
439
+ Current phase: {phase}
440
+ Current task: {task}
441
+ ```
442
+
443
+ If option 1:
444
+ - Save current state (like /vp-pause)
445
+ - Create emergency fix phase
446
+ - Route to /vp-auto
447
+
448
+ ### High Priority Feature
449
+ ```
450
+ Feature logged: FEAT-{N}
451
+
452
+ Options:
453
+ 1. Add to current milestone
454
+ 2. Brainstorm more first
455
+ 3. Schedule for next milestone
456
+ 4. Start working now
457
+ ```
458
+
459
+ ### Regular Request
460
+ ```
461
+ Request logged: {TYPE}-{N}
462
+
463
+ Added to backlog.
464
+
465
+ Options:
466
+ 1. Continue with current work
467
+ 2. Work on this instead
468
+ 3. Create another request
469
+ ```
470
+ </step>
471
+
472
+ <step name="update_tracker">
473
+ ## 6. Update Tracking
474
+
475
+ Add to `.viepilot/TRACKER.md`:
476
+
477
+ ```markdown
478
+ ## Backlog
479
+
480
+ ### Pending Requests
481
+ | ID | Type | Title | Priority | Status |
482
+ |----|------|-------|----------|--------|
483
+ | BUG-001 | 🐛 | {title} | {priority} | new |
484
+ | FEAT-002 | ✨ | {title} | {priority} | new |
485
+ ```
486
+
487
+ Commit:
488
+ ```bash
489
+ git add .viepilot/requests/
490
+ git add .viepilot/TRACKER.md
491
+ git commit -m "chore: add {TYPE}-{N} - {TITLE}"
492
+ git push
493
+ ```
494
+ </step>
495
+
496
+ <step name="confirm">
497
+ ## 7. Confirm
498
+
499
+ ```
500
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
501
+ VIEPILOT ► REQUEST CREATED ✓
502
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
503
+
504
+ ID: {TYPE}-{N}
505
+ Type: {TYPE_EMOJI} {TYPE}
506
+ Title: {TITLE}
507
+ Priority: {PRIORITY}
508
+ Status: new
509
+
510
+ File: .viepilot/requests/{TYPE}-{N}.md
511
+
512
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
513
+ Next Steps
514
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
515
+
516
+ /vp-request --list View all requests
517
+ /vp-auto Start working on requests
518
+ /vp-request Create another request
519
+ /vp-status See overall progress
520
+
521
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
522
+ ```
523
+ </step>
524
+
525
+ </process>
526
+
527
+ <success_criteria>
528
+ - [ ] Request type correctly identified
529
+ - [ ] All relevant details gathered
530
+ - [ ] Request file created
531
+ - [ ] TRACKER.md updated with backlog item
532
+ - [ ] Git committed
533
+ - [ ] Appropriate routing suggested
534
+ </success_criteria>