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,587 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Generate comprehensive documentation từ code và artifacts.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<process>
|
|
6
|
+
|
|
7
|
+
<step name="resolve_context">
|
|
8
|
+
## 0. Resolve Project Context
|
|
9
|
+
|
|
10
|
+
Before generating any file, collect actual project context from the environment:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# Get GitHub remote URL (supports both HTTPS and SSH formats)
|
|
14
|
+
REMOTE_URL=$(git remote get-url origin 2>/dev/null || echo "")
|
|
15
|
+
|
|
16
|
+
# Extract owner/repo slug
|
|
17
|
+
# https://github.com/0-CODE/viepilot.git → 0-CODE/viepilot
|
|
18
|
+
# git@github.com:0-CODE/viepilot.git → 0-CODE/viepilot
|
|
19
|
+
GITHUB_SLUG=$(echo "$REMOTE_URL" | sed 's|.*github\.com[:/]||; s|\.git$||')
|
|
20
|
+
GITHUB_OWNER=$(echo "$GITHUB_SLUG" | cut -d'/' -f1)
|
|
21
|
+
GITHUB_REPO=$(echo "$GITHUB_SLUG" | cut -d'/' -f2)
|
|
22
|
+
|
|
23
|
+
# Fallback if no remote
|
|
24
|
+
if [ -z "$GITHUB_OWNER" ]; then
|
|
25
|
+
GITHUB_OWNER="{GITHUB_OWNER}"
|
|
26
|
+
GITHUB_REPO="{GITHUB_REPO}"
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
# Get project name from package.json or directory name
|
|
30
|
+
PROJECT_NAME=$(node -e "try{console.log(require('./package.json').description||require('./package.json').name)}catch(e){console.log(basename('$PWD'))}" 2>/dev/null || basename "$PWD")
|
|
31
|
+
|
|
32
|
+
# Detect project version
|
|
33
|
+
if [ -f "package.json" ]; then
|
|
34
|
+
PROJECT_VERSION=$(node -p "require('./package.json').version" 2>/dev/null)
|
|
35
|
+
elif [ -f "pom.xml" ]; then
|
|
36
|
+
PROJECT_VERSION=$(grep -m1 "<version>" pom.xml 2>/dev/null | sed 's/.*<version>//;s/<.*//' | tr -d ' ')
|
|
37
|
+
elif [ -f "pyproject.toml" ]; then
|
|
38
|
+
PROJECT_VERSION=$(grep '^version' pyproject.toml 2>/dev/null | head -1 | cut -d'"' -f2)
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
# Framework-specific counts — only if this is a viepilot framework repo
|
|
42
|
+
IS_VIEPILOT_FRAMEWORK=false
|
|
43
|
+
if [ -d "skills" ] && ls skills/vp-*/SKILL.md 2>/dev/null | head -1 > /dev/null; then
|
|
44
|
+
IS_VIEPILOT_FRAMEWORK=true
|
|
45
|
+
ACTUAL_SKILLS=$(ls skills/*/SKILL.md 2>/dev/null | wc -l | tr -d ' ')
|
|
46
|
+
ACTUAL_WORKFLOWS=$(ls workflows/*.md 2>/dev/null | wc -l | tr -d ' ')
|
|
47
|
+
fi
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Use `$GITHUB_OWNER`, `$GITHUB_REPO` throughout all generated files.
|
|
51
|
+
For viepilot framework repos, also use `$ACTUAL_SKILLS`, `$ACTUAL_WORKFLOWS`.
|
|
52
|
+
**Never hardcode** `your-org`, `YOUR_USERNAME`, `YOUR_ORG`, or static skill/workflow counts.
|
|
53
|
+
|
|
54
|
+
Post-generation validation (run after all files generated):
|
|
55
|
+
```bash
|
|
56
|
+
PLACEHOLDERS=$(grep -r "your-org\|YOUR_USERNAME\|YOUR_ORG\|your-username" docs/ --include="*.md" -l 2>/dev/null)
|
|
57
|
+
if [ -n "$PLACEHOLDERS" ]; then
|
|
58
|
+
echo "⚠️ WARNING: Placeholder URLs still found in:"
|
|
59
|
+
echo "$PLACEHOLDERS"
|
|
60
|
+
echo "Fix these before committing."
|
|
61
|
+
fi
|
|
62
|
+
```
|
|
63
|
+
</step>
|
|
64
|
+
|
|
65
|
+
<step name="ask_scope">
|
|
66
|
+
## 1. Ask Documentation Scope
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
70
|
+
VIEPILOT ► DOCS
|
|
71
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
72
|
+
|
|
73
|
+
Which documentation would you like to generate?
|
|
74
|
+
|
|
75
|
+
1. All - Generate complete documentation
|
|
76
|
+
2. API - REST, GraphQL, Kafka, WebSocket docs
|
|
77
|
+
3. Developer Guide - Setup, architecture, contributing
|
|
78
|
+
4. User Guide - Quick start, feature guides
|
|
79
|
+
5. Changelog - Update from git history
|
|
80
|
+
```
|
|
81
|
+
</step>
|
|
82
|
+
|
|
83
|
+
<step name="api_docs">
|
|
84
|
+
## 2A. API Documentation
|
|
85
|
+
|
|
86
|
+
### Sources
|
|
87
|
+
```bash
|
|
88
|
+
# Find API-related files
|
|
89
|
+
find src -name "*Controller*.java" -o -name "*Resolver*.java"
|
|
90
|
+
find src -name "*Consumer*.java" -o -name "*Producer*.java"
|
|
91
|
+
cat .viepilot/schemas/api-contracts.yaml
|
|
92
|
+
cat .viepilot/schemas/kafka-topics.yaml
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Generate docs/api/rest-api.md
|
|
96
|
+
```markdown
|
|
97
|
+
# REST API Reference
|
|
98
|
+
|
|
99
|
+
## Authentication
|
|
100
|
+
{from SYSTEM-RULES or code}
|
|
101
|
+
|
|
102
|
+
## Endpoints
|
|
103
|
+
|
|
104
|
+
### {Resource}
|
|
105
|
+
|
|
106
|
+
#### GET /api/v1/{resource}
|
|
107
|
+
**Description**: {description}
|
|
108
|
+
|
|
109
|
+
**Parameters**:
|
|
110
|
+
| Name | Type | Required | Description |
|
|
111
|
+
|------|------|----------|-------------|
|
|
112
|
+
| ... | ... | ... | ... |
|
|
113
|
+
|
|
114
|
+
**Response**:
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"data": [...],
|
|
118
|
+
"meta": {...}
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Errors**:
|
|
123
|
+
| Code | Description |
|
|
124
|
+
|------|-------------|
|
|
125
|
+
| 400 | ... |
|
|
126
|
+
| 404 | ... |
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Generate docs/api/graphql-schema.md
|
|
130
|
+
```markdown
|
|
131
|
+
# GraphQL Schema
|
|
132
|
+
|
|
133
|
+
## Types
|
|
134
|
+
|
|
135
|
+
### {TypeName}
|
|
136
|
+
```graphql
|
|
137
|
+
type TypeName {
|
|
138
|
+
field: Type
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Queries
|
|
143
|
+
{list queries with descriptions}
|
|
144
|
+
|
|
145
|
+
## Mutations
|
|
146
|
+
{list mutations with descriptions}
|
|
147
|
+
|
|
148
|
+
## Subscriptions
|
|
149
|
+
{list subscriptions with descriptions}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Generate docs/api/kafka-events.md
|
|
153
|
+
```markdown
|
|
154
|
+
# Kafka Events
|
|
155
|
+
|
|
156
|
+
## Topics
|
|
157
|
+
|
|
158
|
+
### {topic.name}
|
|
159
|
+
**Description**: {description}
|
|
160
|
+
**Key**: {key format}
|
|
161
|
+
**Partitions**: {count}
|
|
162
|
+
|
|
163
|
+
**Message Schema**:
|
|
164
|
+
```json
|
|
165
|
+
{
|
|
166
|
+
"field": "type"
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Producers**: {services that produce}
|
|
171
|
+
**Consumers**: {services that consume}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Generate docs/api/websocket-api.md
|
|
175
|
+
```markdown
|
|
176
|
+
# WebSocket API
|
|
177
|
+
|
|
178
|
+
## Connection
|
|
179
|
+
**URL**: `wss://{host}/ws`
|
|
180
|
+
**Authentication**: {method}
|
|
181
|
+
|
|
182
|
+
## Events
|
|
183
|
+
|
|
184
|
+
### Server → Client
|
|
185
|
+
| Event | Description | Payload |
|
|
186
|
+
|-------|-------------|---------|
|
|
187
|
+
| ... | ... | ... |
|
|
188
|
+
|
|
189
|
+
### Client → Server
|
|
190
|
+
| Event | Description | Payload |
|
|
191
|
+
|-------|-------------|---------|
|
|
192
|
+
| ... | ... | ... |
|
|
193
|
+
```
|
|
194
|
+
</step>
|
|
195
|
+
|
|
196
|
+
<step name="dev_docs">
|
|
197
|
+
## 2B. Developer Guide
|
|
198
|
+
|
|
199
|
+
### Generate docs/dev/getting-started.md
|
|
200
|
+
```markdown
|
|
201
|
+
# Getting Started
|
|
202
|
+
|
|
203
|
+
## Prerequisites
|
|
204
|
+
- {requirement 1}
|
|
205
|
+
- {requirement 2}
|
|
206
|
+
|
|
207
|
+
## Installation
|
|
208
|
+
|
|
209
|
+
### Clone Repository
|
|
210
|
+
```bash
|
|
211
|
+
git clone {repo_url}
|
|
212
|
+
cd {project_name}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Setup Environment
|
|
216
|
+
{from docker-compose or setup scripts}
|
|
217
|
+
|
|
218
|
+
### Build
|
|
219
|
+
```bash
|
|
220
|
+
{build command}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Run
|
|
224
|
+
```bash
|
|
225
|
+
{run command}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Verify Installation
|
|
229
|
+
{verification steps}
|
|
230
|
+
|
|
231
|
+
## Common Issues
|
|
232
|
+
{from known issues or FAQ}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Generate docs/dev/architecture.md
|
|
236
|
+
Copy and enhance from `.viepilot/ARCHITECTURE.md`:
|
|
237
|
+
- Add diagrams
|
|
238
|
+
- Add more context
|
|
239
|
+
- Add examples
|
|
240
|
+
|
|
241
|
+
### Generate docs/dev/contributing.md
|
|
242
|
+
```markdown
|
|
243
|
+
# Contributing Guide
|
|
244
|
+
|
|
245
|
+
## Development Workflow
|
|
246
|
+
1. Fork repository
|
|
247
|
+
2. Create branch
|
|
248
|
+
3. Make changes
|
|
249
|
+
4. Write tests
|
|
250
|
+
5. Submit PR
|
|
251
|
+
|
|
252
|
+
## Code Standards
|
|
253
|
+
{from SYSTEM-RULES.md}
|
|
254
|
+
|
|
255
|
+
## Commit Messages
|
|
256
|
+
{Conventional Commits format}
|
|
257
|
+
|
|
258
|
+
## Pull Request Process
|
|
259
|
+
{process description}
|
|
260
|
+
|
|
261
|
+
## Testing
|
|
262
|
+
{testing requirements}
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### Generate docs/dev/testing.md
|
|
266
|
+
```markdown
|
|
267
|
+
# Testing Guide
|
|
268
|
+
|
|
269
|
+
## Test Structure
|
|
270
|
+
```
|
|
271
|
+
src/test/
|
|
272
|
+
├── unit/
|
|
273
|
+
├── integration/
|
|
274
|
+
└── e2e/
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
## Running Tests
|
|
278
|
+
```bash
|
|
279
|
+
{test commands}
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
## Writing Tests
|
|
283
|
+
{guidelines}
|
|
284
|
+
|
|
285
|
+
## Coverage
|
|
286
|
+
{requirements}
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### Generate docs/dev/deployment.md
|
|
290
|
+
```markdown
|
|
291
|
+
# Deployment Guide
|
|
292
|
+
|
|
293
|
+
## Environments
|
|
294
|
+
| Env | URL | Purpose |
|
|
295
|
+
|-----|-----|---------|
|
|
296
|
+
| dev | ... | ... |
|
|
297
|
+
| staging | ... | ... |
|
|
298
|
+
| prod | ... | ... |
|
|
299
|
+
|
|
300
|
+
## Deployment Process
|
|
301
|
+
{steps}
|
|
302
|
+
|
|
303
|
+
## Configuration
|
|
304
|
+
{config management}
|
|
305
|
+
|
|
306
|
+
## Monitoring
|
|
307
|
+
{monitoring setup}
|
|
308
|
+
```
|
|
309
|
+
</step>
|
|
310
|
+
|
|
311
|
+
<step name="user_docs">
|
|
312
|
+
## 2C. User Guide
|
|
313
|
+
|
|
314
|
+
### Generate docs/user/quick-start.md
|
|
315
|
+
```markdown
|
|
316
|
+
# Quick Start Guide
|
|
317
|
+
|
|
318
|
+
## What is {Project Name}?
|
|
319
|
+
{brief description}
|
|
320
|
+
|
|
321
|
+
## Getting Started
|
|
322
|
+
|
|
323
|
+
### Step 1: {First Step}
|
|
324
|
+
{instructions}
|
|
325
|
+
|
|
326
|
+
### Step 2: {Second Step}
|
|
327
|
+
{instructions}
|
|
328
|
+
|
|
329
|
+
## Basic Usage
|
|
330
|
+
{common tasks}
|
|
331
|
+
|
|
332
|
+
## Next Steps
|
|
333
|
+
- [Feature Guide](features/)
|
|
334
|
+
- [FAQ](faq.md)
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### Generate docs/user/features/
|
|
338
|
+
For each major feature:
|
|
339
|
+
```markdown
|
|
340
|
+
# {Feature Name}
|
|
341
|
+
|
|
342
|
+
## Overview
|
|
343
|
+
{description}
|
|
344
|
+
|
|
345
|
+
## How to Use
|
|
346
|
+
|
|
347
|
+
### {Task 1}
|
|
348
|
+
{step-by-step instructions}
|
|
349
|
+
|
|
350
|
+
### {Task 2}
|
|
351
|
+
{step-by-step instructions}
|
|
352
|
+
|
|
353
|
+
## Tips
|
|
354
|
+
{helpful tips}
|
|
355
|
+
|
|
356
|
+
## Troubleshooting
|
|
357
|
+
{common issues}
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### Generate docs/user/faq.md
|
|
361
|
+
```markdown
|
|
362
|
+
# Frequently Asked Questions
|
|
363
|
+
|
|
364
|
+
## General
|
|
365
|
+
|
|
366
|
+
### Q: {Question}?
|
|
367
|
+
A: {Answer}
|
|
368
|
+
|
|
369
|
+
## Technical
|
|
370
|
+
|
|
371
|
+
### Q: {Question}?
|
|
372
|
+
A: {Answer}
|
|
373
|
+
```
|
|
374
|
+
</step>
|
|
375
|
+
|
|
376
|
+
<step name="changelog">
|
|
377
|
+
## 2D. Changelog Update
|
|
378
|
+
|
|
379
|
+
### Gather Changes
|
|
380
|
+
```bash
|
|
381
|
+
# Get commits since last version
|
|
382
|
+
git log --oneline v{last_version}..HEAD
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
### Parse Commits
|
|
386
|
+
Group by type:
|
|
387
|
+
- `feat:` → Added
|
|
388
|
+
- `fix:` → Fixed
|
|
389
|
+
- `BREAKING CHANGE:` → Changed
|
|
390
|
+
- `deprecate:` → Deprecated
|
|
391
|
+
- `remove:` → Removed
|
|
392
|
+
- `security:` → Security
|
|
393
|
+
|
|
394
|
+
### Update CHANGELOG.md
|
|
395
|
+
```markdown
|
|
396
|
+
## [Unreleased]
|
|
397
|
+
|
|
398
|
+
### Added
|
|
399
|
+
- {feat commit description} ([{short_hash}]({commit_url}))
|
|
400
|
+
|
|
401
|
+
### Changed
|
|
402
|
+
- {change description}
|
|
403
|
+
|
|
404
|
+
### Fixed
|
|
405
|
+
- {fix commit description} ([{short_hash}]({commit_url}))
|
|
406
|
+
```
|
|
407
|
+
</step>
|
|
408
|
+
|
|
409
|
+
<step name="create_index">
|
|
410
|
+
## 3. Create Index
|
|
411
|
+
|
|
412
|
+
### Update docs/README.md
|
|
413
|
+
```markdown
|
|
414
|
+
# {Project Name} Documentation
|
|
415
|
+
|
|
416
|
+
## Quick Links
|
|
417
|
+
- [Quick Start](user/quick-start.md)
|
|
418
|
+
- [API Reference](api/rest-api.md)
|
|
419
|
+
- [Developer Guide](dev/getting-started.md)
|
|
420
|
+
|
|
421
|
+
## Documentation Index
|
|
422
|
+
|
|
423
|
+
### API Documentation
|
|
424
|
+
- [REST API](api/rest-api.md)
|
|
425
|
+
- [GraphQL Schema](api/graphql-schema.md)
|
|
426
|
+
- [Kafka Events](api/kafka-events.md)
|
|
427
|
+
- [WebSocket API](api/websocket-api.md)
|
|
428
|
+
|
|
429
|
+
### Developer Guide
|
|
430
|
+
- [Getting Started](dev/getting-started.md)
|
|
431
|
+
- [Architecture](dev/architecture.md)
|
|
432
|
+
- [Contributing](dev/contributing.md)
|
|
433
|
+
- [Testing](dev/testing.md)
|
|
434
|
+
- [Deployment](dev/deployment.md)
|
|
435
|
+
|
|
436
|
+
### User Guide
|
|
437
|
+
- [Quick Start](user/quick-start.md)
|
|
438
|
+
- [Features](user/features/)
|
|
439
|
+
- [FAQ](user/faq.md)
|
|
440
|
+
|
|
441
|
+
---
|
|
442
|
+
Last updated: {date}
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
### Update root README.md (sync Documentation section)
|
|
446
|
+
|
|
447
|
+
After generating docs/, update the root `README.md` to reflect newly created documentation:
|
|
448
|
+
|
|
449
|
+
1. **Documentation table** — scan `docs/` for all `.md` files and ensure they are linked:
|
|
450
|
+
```bash
|
|
451
|
+
# Find all docs generated
|
|
452
|
+
find docs/ -name "*.md" | sort
|
|
453
|
+
```
|
|
454
|
+
Add rows to Documentation table for any new files not yet listed.
|
|
455
|
+
|
|
456
|
+
2. **Project Structure `docs/` tree** — update to reflect actual subdirectories:
|
|
457
|
+
```bash
|
|
458
|
+
# Actual docs structure
|
|
459
|
+
find docs/ -type d | sort
|
|
460
|
+
```
|
|
461
|
+
Rewrite the `docs/` section of Project Structure to match filesystem.
|
|
462
|
+
|
|
463
|
+
3. Commit: `docs: sync README.md documentation links and project structure`
|
|
464
|
+
</step>
|
|
465
|
+
|
|
466
|
+
<step name="skills_reference">
|
|
467
|
+
## 3B. Generate/Update skills-reference.md (viepilot framework only)
|
|
468
|
+
|
|
469
|
+
> **Guard**: Only run this step if `skills/` directory exists and contains `*/SKILL.md` files.
|
|
470
|
+
> Skip entirely for non-framework projects (Java apps, Node services, Python projects, etc.).
|
|
471
|
+
|
|
472
|
+
```bash
|
|
473
|
+
# Check if this is a viepilot framework repo
|
|
474
|
+
if [ ! -d "skills" ] || ! ls skills/*/SKILL.md 2>/dev/null | head -1 > /dev/null; then
|
|
475
|
+
echo "→ Skipping skills-reference.md (not a viepilot framework repo)"
|
|
476
|
+
# Jump to step 4
|
|
477
|
+
fi
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
Always build `docs/skills-reference.md` by **scanning the actual `skills/` directory**, not from a hardcoded list.
|
|
481
|
+
|
|
482
|
+
### Algorithm
|
|
483
|
+
|
|
484
|
+
```bash
|
|
485
|
+
# Get sorted list of skills from filesystem
|
|
486
|
+
SKILLS=$(ls skills/*/SKILL.md 2>/dev/null | sed 's|skills/||; s|/SKILL.md||' | sort)
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
For each skill in `$SKILLS`:
|
|
490
|
+
1. Read `skills/{skill}/SKILL.md`
|
|
491
|
+
2. Extract from the file:
|
|
492
|
+
- `<objective>` first paragraph → **Purpose**
|
|
493
|
+
- `<context>` optional flags list → **Flags table**
|
|
494
|
+
- `Creates/Updates` list in `<objective>` → **Output**
|
|
495
|
+
3. Write a section `## /{skill}` with Purpose, Flags, Output
|
|
496
|
+
|
|
497
|
+
### Incremental update (if docs/skills-reference.md already exists)
|
|
498
|
+
|
|
499
|
+
Do NOT overwrite the entire file. Instead:
|
|
500
|
+
```bash
|
|
501
|
+
# Find skills already documented
|
|
502
|
+
DOCUMENTED=$(grep "^## /vp-" docs/skills-reference.md 2>/dev/null | sed 's|## /||' | sort)
|
|
503
|
+
# Find skills missing from docs
|
|
504
|
+
MISSING=$(comm -23 <(echo "$SKILLS") <(echo "$DOCUMENTED"))
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
For each skill in `$MISSING`:
|
|
508
|
+
- Append a new section at the end of `docs/skills-reference.md`
|
|
509
|
+
- Commit: `docs: add {skill} section to skills-reference.md`
|
|
510
|
+
|
|
511
|
+
This preserves any manual edits to existing sections.
|
|
512
|
+
|
|
513
|
+
### Verification
|
|
514
|
+
|
|
515
|
+
After generating/updating:
|
|
516
|
+
```bash
|
|
517
|
+
ACTUAL_COUNT=$(ls skills/*/SKILL.md 2>/dev/null | wc -l | tr -d ' ')
|
|
518
|
+
DOC_COUNT=$(grep "^## /vp-" docs/skills-reference.md | wc -l | tr -d ' ')
|
|
519
|
+
if [ "$ACTUAL_COUNT" != "$DOC_COUNT" ]; then
|
|
520
|
+
echo "⚠️ skills-reference.md has $DOC_COUNT sections but $ACTUAL_COUNT skills exist"
|
|
521
|
+
fi
|
|
522
|
+
```
|
|
523
|
+
</step>
|
|
524
|
+
|
|
525
|
+
<step name="commit">
|
|
526
|
+
## 4. Commit and Push
|
|
527
|
+
|
|
528
|
+
```bash
|
|
529
|
+
git add docs/ CHANGELOG.md README.md
|
|
530
|
+
git commit -m "docs: update documentation
|
|
531
|
+
|
|
532
|
+
- API documentation
|
|
533
|
+
- Developer guide
|
|
534
|
+
- User guide
|
|
535
|
+
- Changelog update"
|
|
536
|
+
git push
|
|
537
|
+
```
|
|
538
|
+
</step>
|
|
539
|
+
|
|
540
|
+
<step name="confirm">
|
|
541
|
+
## 5. Confirm
|
|
542
|
+
|
|
543
|
+
```
|
|
544
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
545
|
+
VIEPILOT ► DOCS COMPLETE ✓
|
|
546
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
547
|
+
|
|
548
|
+
Documentation generated:
|
|
549
|
+
|
|
550
|
+
docs/
|
|
551
|
+
├── api/ ({count} files)
|
|
552
|
+
│ ├── rest-api.md
|
|
553
|
+
│ ├── graphql-schema.md
|
|
554
|
+
│ ├── kafka-events.md
|
|
555
|
+
│ └── websocket-api.md
|
|
556
|
+
│
|
|
557
|
+
├── dev/ ({count} files)
|
|
558
|
+
│ ├── getting-started.md
|
|
559
|
+
│ ├── architecture.md
|
|
560
|
+
│ ├── contributing.md
|
|
561
|
+
│ ├── testing.md
|
|
562
|
+
│ └── deployment.md
|
|
563
|
+
│
|
|
564
|
+
├── user/ ({count} files)
|
|
565
|
+
│ ├── quick-start.md
|
|
566
|
+
│ ├── features/
|
|
567
|
+
│ └── faq.md
|
|
568
|
+
│
|
|
569
|
+
└── README.md (index)
|
|
570
|
+
|
|
571
|
+
CHANGELOG.md updated
|
|
572
|
+
|
|
573
|
+
View documentation: docs/README.md
|
|
574
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
575
|
+
```
|
|
576
|
+
</step>
|
|
577
|
+
|
|
578
|
+
</process>
|
|
579
|
+
|
|
580
|
+
<success_criteria>
|
|
581
|
+
- [ ] Requested documentation generated
|
|
582
|
+
- [ ] Code examples included
|
|
583
|
+
- [ ] Cross-references added
|
|
584
|
+
- [ ] Index updated
|
|
585
|
+
- [ ] Changelog reflects changes
|
|
586
|
+
- [ ] Git committed
|
|
587
|
+
</success_criteria>
|