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.
- package/CHANGELOG.md +230 -0
- package/LICENSE +23 -0
- package/README.md +550 -0
- package/bin/viepilot.cjs +222 -0
- package/bin/vp-tools.cjs +912 -0
- package/dev-install.sh +109 -0
- package/docs/README.md +125 -0
- package/docs/advanced-usage.md +366 -0
- package/docs/api/README.md +12 -0
- package/docs/api/graphql-schema.md +5 -0
- package/docs/api/kafka-events.md +5 -0
- package/docs/api/rest-api.md +19 -0
- package/docs/api/websocket-api.md +5 -0
- package/docs/dev/architecture.md +226 -0
- package/docs/dev/cli-reference.md +324 -0
- package/docs/dev/contributing.md +195 -0
- package/docs/dev/deployment.md +204 -0
- package/docs/dev/getting-started.md +16 -0
- package/docs/dev/testing.md +171 -0
- package/docs/dev/ui-components-library.md +36 -0
- package/docs/getting-started.md +163 -0
- package/docs/skills-reference.md +399 -0
- package/docs/troubleshooting.md +297 -0
- package/docs/user/faq.md +117 -0
- package/docs/user/features/autonomous-mode.md +111 -0
- package/docs/user/features/checkpoint-recovery.md +76 -0
- package/docs/user/features/debug-mode.md +77 -0
- package/docs/user/features/ui-direction.md +29 -0
- package/docs/user/quick-start.md +157 -0
- package/docs/videos/01-installation.md +113 -0
- package/docs/videos/02-first-project.md +132 -0
- package/docs/videos/03-autonomous-mode.md +147 -0
- package/install.sh +144 -0
- package/lib/cli-shared.cjs +108 -0
- package/package.json +78 -0
- package/skills/vp-audit/SKILL.md +140 -0
- package/skills/vp-auto/SKILL.md +204 -0
- package/skills/vp-brainstorm/SKILL.md +75 -0
- package/skills/vp-crystallize/SKILL.md +175 -0
- package/skills/vp-debug/SKILL.md +96 -0
- package/skills/vp-docs/SKILL.md +258 -0
- package/skills/vp-evolve/SKILL.md +165 -0
- package/skills/vp-pause/SKILL.md +150 -0
- package/skills/vp-request/SKILL.md +250 -0
- package/skills/vp-resume/SKILL.md +141 -0
- package/skills/vp-rollback/SKILL.md +116 -0
- package/skills/vp-status/SKILL.md +137 -0
- package/skills/vp-task/SKILL.md +139 -0
- package/skills/vp-ui-components/SKILL.md +64 -0
- package/templates/phase/PHASE-STATE.md +35 -0
- package/templates/phase/SPEC.md +40 -0
- package/templates/phase/SUMMARY.md +67 -0
- package/templates/phase/TASK.md +101 -0
- package/templates/phase/VERIFICATION.md +49 -0
- package/templates/project/AI-GUIDE.md +114 -0
- package/templates/project/ARCHITECTURE.md +70 -0
- package/templates/project/CHANGELOG.md +36 -0
- package/templates/project/CONTRIBUTING.md +154 -0
- package/templates/project/CONTRIBUTORS.md +41 -0
- package/templates/project/PROJECT-CONTEXT.md +74 -0
- package/templates/project/PROJECT-META.md +133 -0
- package/templates/project/README.md +197 -0
- package/templates/project/ROADMAP.md +56 -0
- package/templates/project/SYSTEM-RULES.md +368 -0
- package/templates/project/TRACKER.md +50 -0
- package/ui-components/INDEX.md +9 -0
- package/ui-components/base/button/README.md +8 -0
- package/ui-components/base/button/metadata.json +8 -0
- package/ui-components/base/card/README.md +8 -0
- package/ui-components/base/card/metadata.json +8 -0
- package/ui-components/base/input/README.md +8 -0
- package/ui-components/base/input/metadata.json +8 -0
- package/workflows/audit.md +549 -0
- package/workflows/autonomous.md +425 -0
- package/workflows/brainstorm.md +257 -0
- package/workflows/crystallize.md +418 -0
- package/workflows/debug.md +241 -0
- package/workflows/documentation.md +587 -0
- package/workflows/evolve.md +258 -0
- package/workflows/pause-work.md +255 -0
- package/workflows/request.md +534 -0
- package/workflows/resume-work.md +226 -0
- package/workflows/rollback.md +202 -0
- package/workflows/ui-components.md +109 -0
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
ViePilot là một Markdown-native autonomous coding framework. Không có server, không có database — chỉ có files, git, và AI.
|
|
4
|
+
|
|
5
|
+
## System Overview
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
┌─────────────────────────────────────────────────────────────────────────┐
|
|
9
|
+
│ USER INTERFACE │
|
|
10
|
+
│ (Cursor / Claude / AI Assistant) │
|
|
11
|
+
└─────────────────────────────────────────────────────────────────────────┘
|
|
12
|
+
│
|
|
13
|
+
▼
|
|
14
|
+
┌─────────────────────────────────────────────────────────────────────────┐
|
|
15
|
+
│ SKILLS LAYER (14) │
|
|
16
|
+
│ brainstorm │ crystallize │ auto │ pause │ resume │ status │ request │
|
|
17
|
+
│ evolve │ docs │ task │ debug │ rollback │ audit │ ui-components │
|
|
18
|
+
└─────────────────────────────────────────────────────────────────────────┘
|
|
19
|
+
│
|
|
20
|
+
▼
|
|
21
|
+
┌─────────────────────────────────────────────────────────────────────────┐
|
|
22
|
+
│ WORKFLOWS LAYER (12) │
|
|
23
|
+
│ brainstorm.md │ crystallize.md │ autonomous.md │ pause-work.md │
|
|
24
|
+
│ resume-work.md │ request.md │ evolve.md │ documentation.md │
|
|
25
|
+
│ debug.md │ rollback.md │ audit.md │ ui-components.md │
|
|
26
|
+
└─────────────────────────────────────────────────────────────────────────┘
|
|
27
|
+
│
|
|
28
|
+
▼
|
|
29
|
+
┌─────────────────────────────────────────────────────────────────────────┐
|
|
30
|
+
│ TEMPLATES LAYER (16) │
|
|
31
|
+
│ Project Templates (11): AI-GUIDE, ARCHITECTURE, PROJECT-META, ... │
|
|
32
|
+
│ Phase Templates (5): SPEC, PHASE-STATE, TASK, VERIFICATION, SUMMARY │
|
|
33
|
+
└─────────────────────────────────────────────────────────────────────────┘
|
|
34
|
+
│
|
|
35
|
+
▼
|
|
36
|
+
┌─────────────────────────────────────────────────────────────────────────┐
|
|
37
|
+
│ CLI LAYER │
|
|
38
|
+
│ vp-tools.cjs (13 commands) │
|
|
39
|
+
│ init │ current-timestamp │ phase-info │ task-status │ commit │
|
|
40
|
+
│ progress │ version │ reset │ clean │ checkpoints │ conflicts │
|
|
41
|
+
│ save-state │ help │
|
|
42
|
+
└─────────────────────────────────────────────────────────────────────────┘
|
|
43
|
+
│
|
|
44
|
+
▼
|
|
45
|
+
┌─────────────────────────────────────────────────────────────────────────┐
|
|
46
|
+
│ STATE LAYER │
|
|
47
|
+
│ HANDOFF.json (machine state) │ TRACKER.md (human) │ Git Tags │
|
|
48
|
+
└─────────────────────────────────────────────────────────────────────────┘
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Technology Stack
|
|
52
|
+
|
|
53
|
+
| Layer | Technology | Purpose |
|
|
54
|
+
|-------|------------|---------|
|
|
55
|
+
| Skills | Markdown + YAML frontmatter | Skill definitions with metadata |
|
|
56
|
+
| Workflows | Markdown + XML-like tags | Step-by-step process definitions |
|
|
57
|
+
| Templates | Markdown with `{{PLACEHOLDER}}` | Reusable document templates |
|
|
58
|
+
| CLI | Node.js (CommonJS, no deps) | State management, progress tracking |
|
|
59
|
+
| State | JSON + Markdown | Machine + human readable state |
|
|
60
|
+
| VCS | Git with tags | Checkpoints and versioning |
|
|
61
|
+
|
|
62
|
+
## Skills Layer
|
|
63
|
+
|
|
64
|
+
Skills sống tại `skills/vp-{name}/SKILL.md` (installed: `~/.cursor/skills/`).
|
|
65
|
+
|
|
66
|
+
### Skill Structure
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
skills/vp-{name}/SKILL.md
|
|
70
|
+
├── YAML Frontmatter (name, description, version)
|
|
71
|
+
├── <cursor_skill_adapter> ← Cursor AI invocation rules
|
|
72
|
+
├── <objective> ← What it does
|
|
73
|
+
├── <execution_context> ← Workflow reference (or inline <process>)
|
|
74
|
+
├── <context> ← Flags and options
|
|
75
|
+
├── <process> ← Execution steps
|
|
76
|
+
└── <success_criteria> ← Completion checks
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Skill Categories
|
|
80
|
+
|
|
81
|
+
| Category | Skills | Purpose |
|
|
82
|
+
|----------|--------|---------|
|
|
83
|
+
| Setup | brainstorm, crystallize | Project initialization |
|
|
84
|
+
| Execute | auto, task | Development execution |
|
|
85
|
+
| Control | pause, resume | Session management |
|
|
86
|
+
| Monitor | status | Progress tracking |
|
|
87
|
+
| Develop | request, evolve | Ongoing development |
|
|
88
|
+
| Debug | debug | Systematic debugging |
|
|
89
|
+
| Recovery | rollback | Checkpoint recovery |
|
|
90
|
+
| Quality | audit | Documentation sync |
|
|
91
|
+
| Finalize | docs | Documentation generation |
|
|
92
|
+
|
|
93
|
+
## Workflows Layer
|
|
94
|
+
|
|
95
|
+
Workflows sống tại `workflows/*.md` (installed: `~/.cursor/viepilot/workflows/`).
|
|
96
|
+
|
|
97
|
+
### Workflow Structure
|
|
98
|
+
|
|
99
|
+
```xml
|
|
100
|
+
<purpose>Brief description</purpose>
|
|
101
|
+
|
|
102
|
+
<process>
|
|
103
|
+
<step name="step_name">
|
|
104
|
+
## Step Title
|
|
105
|
+
Instructions...
|
|
106
|
+
</step>
|
|
107
|
+
</process>
|
|
108
|
+
|
|
109
|
+
<success_criteria>
|
|
110
|
+
- [ ] Criteria
|
|
111
|
+
</success_criteria>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Workflow Flow
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
brainstorm.md → crystallize.md → autonomous.md
|
|
118
|
+
│
|
|
119
|
+
pause-work.md ←→ resume-work.md ▼
|
|
120
|
+
documentation.md
|
|
121
|
+
request.md ──────────────────────────────────────┘
|
|
122
|
+
evolve.md ───────────────────────────────────────┘
|
|
123
|
+
|
|
124
|
+
Debug & Recovery (anytime):
|
|
125
|
+
debug.md ──────► Track issues across sessions
|
|
126
|
+
rollback.md ───► Recover to any checkpoint
|
|
127
|
+
|
|
128
|
+
Quality:
|
|
129
|
+
audit.md ──────► Sync docs with implementation
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## State Layer
|
|
133
|
+
|
|
134
|
+
### HANDOFF.json (Machine State)
|
|
135
|
+
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"milestone": "M1",
|
|
139
|
+
"phase": 3,
|
|
140
|
+
"task": 2,
|
|
141
|
+
"status": "in_progress",
|
|
142
|
+
"last_activity": "2026-03-30T14:00:00Z",
|
|
143
|
+
"git": {
|
|
144
|
+
"head": "abc1234",
|
|
145
|
+
"branch": "main"
|
|
146
|
+
},
|
|
147
|
+
"context": {
|
|
148
|
+
"files_touched": ["..."],
|
|
149
|
+
"decisions": ["..."],
|
|
150
|
+
"blockers": []
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### TRACKER.md (Human State)
|
|
156
|
+
|
|
157
|
+
```markdown
|
|
158
|
+
## Current State
|
|
159
|
+
- Milestone: M1
|
|
160
|
+
- Phase: 3
|
|
161
|
+
|
|
162
|
+
## Progress Overview
|
|
163
|
+
Phase 1: [██████████] 100% ✅
|
|
164
|
+
Phase 2: [████████░░] 80% 🔄
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Git Tags (Checkpoints)
|
|
168
|
+
|
|
169
|
+
```
|
|
170
|
+
vp-p{N}-t{T} ← Starting task T in phase N
|
|
171
|
+
vp-p{N}-t{T}-done ← Completed task T
|
|
172
|
+
vp-p{N}-complete ← Completed phase N
|
|
173
|
+
v{semver} ← Release tag
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Data Flow
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
User Request
|
|
180
|
+
│
|
|
181
|
+
▼
|
|
182
|
+
┌─────────────┐
|
|
183
|
+
│ Skill │──── Parses VP_ARGS, loads context
|
|
184
|
+
└─────────────┘
|
|
185
|
+
│
|
|
186
|
+
▼
|
|
187
|
+
┌─────────────┐
|
|
188
|
+
│ Workflow │──── Executes step-by-step process
|
|
189
|
+
└─────────────┘
|
|
190
|
+
│
|
|
191
|
+
▼
|
|
192
|
+
┌─────────────┐
|
|
193
|
+
│ Templates │──── Generates/updates artifacts
|
|
194
|
+
└─────────────┘
|
|
195
|
+
│
|
|
196
|
+
▼
|
|
197
|
+
┌─────────────┐
|
|
198
|
+
│ State │──── Updates HANDOFF.json, TRACKER.md
|
|
199
|
+
└─────────────┘
|
|
200
|
+
│
|
|
201
|
+
▼
|
|
202
|
+
┌─────────────┐
|
|
203
|
+
│ Git │──── Commits, tags for checkpoints
|
|
204
|
+
└─────────────┘
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Design Decisions
|
|
208
|
+
|
|
209
|
+
| Decision | Rationale |
|
|
210
|
+
|----------|-----------|
|
|
211
|
+
| Markdown-based skills | AI-native, human-readable, versionable |
|
|
212
|
+
| Separate state files | Machine (JSON) vs Human (Markdown) readability |
|
|
213
|
+
| Git tags for checkpoints | Reliable recovery, no external dependencies |
|
|
214
|
+
| Template `{{PLACEHOLDER}}` | Customization without code changes |
|
|
215
|
+
| Workflow XML-like tags | Clear step boundaries, parseable |
|
|
216
|
+
| No external runtime | Works with any AI assistant |
|
|
217
|
+
| CommonJS (no ESM) | Maximum Node.js compatibility |
|
|
218
|
+
|
|
219
|
+
## Extension Points
|
|
220
|
+
|
|
221
|
+
| Point | How to Extend |
|
|
222
|
+
|-------|---------------|
|
|
223
|
+
| New Skill | Add `skills/vp-{name}/SKILL.md` |
|
|
224
|
+
| New Workflow | Add `workflows/{name}.md` |
|
|
225
|
+
| New Template | Add to `templates/project/` or `templates/phase/` |
|
|
226
|
+
| CLI Command | Add to `bin/vp-tools.cjs` |
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
# CLI Reference — vp-tools
|
|
2
|
+
|
|
3
|
+
`vp-tools` là CLI utility của ViePilot để quản lý state, progress, và workflow operations.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Sau khi install ViePilot
|
|
9
|
+
vp-tools help
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Commands
|
|
15
|
+
|
|
16
|
+
### `init`
|
|
17
|
+
|
|
18
|
+
Kiểm tra project root và load initialization state.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
vp-tools init
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Output (JSON)**:
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"project_root": "/path/to/project",
|
|
28
|
+
"viepilot_dir": "/path/to/project/.viepilot",
|
|
29
|
+
"tracker_exists": true,
|
|
30
|
+
"roadmap_exists": true,
|
|
31
|
+
"handoff_exists": true,
|
|
32
|
+
"handoff": { ... }
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Errors**:
|
|
37
|
+
- `No ViePilot project found` — Run từ directory chứa `.viepilot/`
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
### `current-timestamp`
|
|
42
|
+
|
|
43
|
+
Lấy timestamp hiện tại theo format chỉ định.
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
vp-tools current-timestamp [format] [--raw]
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Parameters**:
|
|
50
|
+
|
|
51
|
+
| Parameter | Values | Default | Description |
|
|
52
|
+
|-----------|--------|---------|-------------|
|
|
53
|
+
| `format` | `iso`, `date`, `full` | `iso` | Timestamp format |
|
|
54
|
+
| `--raw` | flag | off | Output raw string (no JSON wrapper) |
|
|
55
|
+
|
|
56
|
+
**Examples**:
|
|
57
|
+
```bash
|
|
58
|
+
vp-tools current-timestamp
|
|
59
|
+
# {"timestamp":"2026-03-30T14:00:00.000Z"}
|
|
60
|
+
|
|
61
|
+
vp-tools current-timestamp date
|
|
62
|
+
# {"timestamp":"2026-03-30"}
|
|
63
|
+
|
|
64
|
+
vp-tools current-timestamp full --raw
|
|
65
|
+
# 2026-03-30 14:00:00
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
### `phase-info <N>`
|
|
71
|
+
|
|
72
|
+
Lấy thông tin về phase N.
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
vp-tools phase-info <phase_number>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Parameters**:
|
|
79
|
+
|
|
80
|
+
| Parameter | Type | Required | Description |
|
|
81
|
+
|-----------|------|----------|-------------|
|
|
82
|
+
| `phase_number` | positive integer | yes | Phase number (1-based) |
|
|
83
|
+
|
|
84
|
+
**Output (JSON)**:
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"phase_number": 1,
|
|
88
|
+
"phase_dir": "/path/.viepilot/phases/01-name",
|
|
89
|
+
"phase_slug": "01-name",
|
|
90
|
+
"has_spec": true,
|
|
91
|
+
"has_state": true,
|
|
92
|
+
"tasks": [
|
|
93
|
+
{ "file": "task-1.md", "path": "..." }
|
|
94
|
+
],
|
|
95
|
+
"task_count": 3
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Errors**:
|
|
100
|
+
- `Phase N not found` — Phase directory không tồn tại
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
### `task-status <phase> <task> <status>`
|
|
105
|
+
|
|
106
|
+
Cập nhật status của một task.
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
vp-tools task-status <phase> <task> <status>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Parameters**:
|
|
113
|
+
|
|
114
|
+
| Parameter | Type | Required | Description |
|
|
115
|
+
|-----------|------|----------|-------------|
|
|
116
|
+
| `phase` | positive integer | yes | Phase number |
|
|
117
|
+
| `task` | positive integer | yes | Task number |
|
|
118
|
+
| `status` | enum | yes | New status |
|
|
119
|
+
|
|
120
|
+
**Valid statuses**: `not_started`, `in_progress`, `done`, `skipped`, `blocked`
|
|
121
|
+
|
|
122
|
+
**Output (JSON)**:
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"updated": true,
|
|
126
|
+
"phase": 1,
|
|
127
|
+
"task": 2,
|
|
128
|
+
"status": "done",
|
|
129
|
+
"timestamp": "2026-03-30T14:00:00.000Z"
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
### `commit <message> [--files ...]`
|
|
136
|
+
|
|
137
|
+
Generate git commit command với standard format.
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
vp-tools commit "<message>" [--files <file1> <file2> ...]
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Parameters**:
|
|
144
|
+
|
|
145
|
+
| Parameter | Type | Required | Description |
|
|
146
|
+
|-----------|------|----------|-------------|
|
|
147
|
+
| `message` | string | yes | Commit message (Conventional Commits) |
|
|
148
|
+
| `--files` | list | no | Files to include |
|
|
149
|
+
|
|
150
|
+
**Output (JSON)**:
|
|
151
|
+
```json
|
|
152
|
+
{
|
|
153
|
+
"command": "git",
|
|
154
|
+
"args": ["commit", "-m", "feat(cli): add validation"],
|
|
155
|
+
"files": ["src/index.js"]
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
### `progress`
|
|
162
|
+
|
|
163
|
+
Tính toán và hiển thị overall project progress.
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
vp-tools progress
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Output**: Visual progress bars + JSON:
|
|
170
|
+
```json
|
|
171
|
+
{
|
|
172
|
+
"phases": [
|
|
173
|
+
{ "name": "01-setup", "tasks": 4, "completed": 4, "progress": 100 }
|
|
174
|
+
],
|
|
175
|
+
"total_tasks": 17,
|
|
176
|
+
"total_completed": 17,
|
|
177
|
+
"overall": 100
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
### `version [get|bump] [major|minor|patch]`
|
|
184
|
+
|
|
185
|
+
Quản lý version của project.
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
vp-tools version get
|
|
189
|
+
vp-tools version bump [major|minor|patch]
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
**Examples**:
|
|
193
|
+
```bash
|
|
194
|
+
vp-tools version get
|
|
195
|
+
# {"version":"0.8.2"}
|
|
196
|
+
|
|
197
|
+
vp-tools version bump patch
|
|
198
|
+
# {"old_version":"0.8.2","new_version":"0.8.3","bump_type":"patch"}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**Bump rules** (SemVer):
|
|
202
|
+
- `major` — Breaking changes: `1.0.0 → 2.0.0`
|
|
203
|
+
- `minor` — New features: `0.1.0 → 0.2.0`
|
|
204
|
+
- `patch` — Bug fixes: `0.1.0 → 0.1.1`
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
### `reset <target> [-f]`
|
|
209
|
+
|
|
210
|
+
Reset task/phase/all state (destructive — requires confirmation).
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
vp-tools reset <target> [--force | -f]
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
**Targets**: `task`, `phase`, `all`
|
|
217
|
+
|
|
218
|
+
**Warning**: Resets status fields in state files. Does NOT undo git commits.
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
### `clean [-f] [--dry-run]`
|
|
223
|
+
|
|
224
|
+
Xóa generated files (HANDOFF.json).
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
vp-tools clean [--force | -f] [--dry-run]
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
**Flags**:
|
|
231
|
+
- `--dry-run` — Preview without deleting
|
|
232
|
+
- `--force` / `-f` — Skip confirmation prompt
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
### `checkpoints`
|
|
237
|
+
|
|
238
|
+
Liệt kê tất cả ViePilot git checkpoint tags.
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
vp-tools checkpoints
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
**Output**:
|
|
245
|
+
```
|
|
246
|
+
ViePilot Checkpoints
|
|
247
|
+
|
|
248
|
+
TAG COMMIT DATE
|
|
249
|
+
─────────────────────────────────────────────────────
|
|
250
|
+
✅ vp-p3-complete a1b2c3d 2026-03-30 14:00
|
|
251
|
+
✔️ vp-p3-t4-done b2c3d4e 2026-03-30 13:45
|
|
252
|
+
📌 vp-p3-t3 c3d4e5f 2026-03-30 12:00
|
|
253
|
+
|
|
254
|
+
Total: 14 checkpoints
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
### `conflicts`
|
|
260
|
+
|
|
261
|
+
Kiểm tra potential conflicts trong working directory.
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
vp-tools conflicts
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Hiển thị: modified, untracked, deleted, staged files. Resolve trước khi chạy `/vp-auto`.
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
### `save-state`
|
|
272
|
+
|
|
273
|
+
Lưu current state vào HANDOFF.json cho precise resume.
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
vp-tools save-state
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
Updates `HANDOFF.json` với: git HEAD, branch, Node.js version, timestamp.
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
### `help [command]`
|
|
284
|
+
|
|
285
|
+
Hiển thị help.
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
vp-tools help
|
|
289
|
+
vp-tools help version
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Exit Codes
|
|
295
|
+
|
|
296
|
+
| Code | Meaning |
|
|
297
|
+
|------|---------|
|
|
298
|
+
| `0` | Success |
|
|
299
|
+
| `1` | Error (validation failure, missing project, etc.) |
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## JSON Output Convention
|
|
304
|
+
|
|
305
|
+
Tất cả commands output:
|
|
306
|
+
1. Human-readable status line (colored nếu TTY)
|
|
307
|
+
2. JSON object trên các dòng tiếp theo
|
|
308
|
+
|
|
309
|
+
Để parse JSON trong scripts:
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
# Extract JSON từ output
|
|
313
|
+
OUTPUT=$(vp-tools version get)
|
|
314
|
+
VERSION=$(echo "$OUTPUT" | python3 -c "import sys,json; print(json.load(sys.stdin)['version'])")
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
## Environment Variables
|
|
320
|
+
|
|
321
|
+
| Variable | Effect |
|
|
322
|
+
|----------|--------|
|
|
323
|
+
| `NO_COLOR=1` | Disable ANSI color codes |
|
|
324
|
+
| `FORCE_COLOR=0` | Same as NO_COLOR |
|