@esthernandez/vibe-doc 0.2.1 → 0.2.3
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/.claude-plugin/plugin.json +8 -0
- package/commands/check.md +7 -0
- package/commands/generate.md +11 -0
- package/commands/scan.md +11 -0
- package/commands/status.md +7 -0
- package/dist/classifier/index.js +9 -0
- package/dist/classifier/llm-prompt.d.ts.map +1 -1
- package/dist/classifier/llm-prompt.js +1 -0
- package/dist/classifier/scoring-engine.d.ts +2 -1
- package/dist/classifier/scoring-engine.d.ts.map +1 -1
- package/dist/classifier/scoring-engine.js +16 -0
- package/dist/classifier/signals.d.ts.map +1 -1
- package/dist/classifier/signals.js +46 -7
- package/dist/gap-analyzer/breadcrumbs.d.ts.map +1 -1
- package/dist/gap-analyzer/breadcrumbs.js +77 -0
- package/dist/gap-analyzer/matrix.d.ts +5 -1
- package/dist/gap-analyzer/matrix.d.ts.map +1 -1
- package/dist/gap-analyzer/matrix.js +51 -0
- package/dist/gap-analyzer/tier-assigner.d.ts.map +1 -1
- package/dist/gap-analyzer/tier-assigner.js +14 -2
- package/dist/generator/docx-writer.d.ts.map +1 -1
- package/dist/generator/docx-writer.js +13 -1
- package/dist/generator/extractor.d.ts.map +1 -1
- package/dist/generator/extractor.js +91 -0
- package/dist/generator/markdown-writer.d.ts.map +1 -1
- package/dist/generator/markdown-writer.js +13 -1
- package/dist/scanner/file-scanner.d.ts.map +1 -1
- package/dist/scanner/file-scanner.js +10 -2
- package/dist/templates/embedded/adr.md +45 -0
- package/dist/templates/embedded/api-spec.md +55 -0
- package/dist/templates/embedded/changelog-contributing.md +67 -0
- package/dist/templates/embedded/data-model.md +55 -0
- package/dist/templates/embedded/deployment-procedure.md +63 -0
- package/dist/templates/embedded/install-guide.md +49 -0
- package/dist/templates/embedded/readme.md +55 -0
- package/dist/templates/embedded/runbook.md +55 -0
- package/dist/templates/embedded/skill-command-reference.md +77 -0
- package/dist/templates/embedded/test-plan.md +55 -0
- package/dist/templates/embedded/threat-model.md +47 -0
- package/dist/templates/index.d.ts +13 -0
- package/dist/templates/index.d.ts.map +1 -1
- package/dist/templates/index.js +18 -7
- package/dist/templates/renderer.d.ts.map +1 -1
- package/dist/templates/renderer.js +3 -1
- package/package.json +4 -1
- package/skills/check/SKILL.md +302 -0
- package/skills/generate/SKILL.md +391 -0
- package/skills/guide/AGENT_GUIDE.md +318 -0
- package/skills/guide/SKILL.md +270 -0
- package/skills/guide/references/breadcrumb-heuristics.md +441 -0
- package/skills/guide/references/classification-taxonomy.md +391 -0
- package/skills/guide/references/documentation-matrix.md +297 -0
- package/skills/scan/SKILL.md +219 -0
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: generate
|
|
3
|
+
description: >
|
|
4
|
+
This skill should be used when the user mentions "generate docs",
|
|
5
|
+
"write my documentation", "fix my gaps", "create a runbook",
|
|
6
|
+
"write the threat model", "generate missing docs", or wants to
|
|
7
|
+
produce technical documentation from their project artifacts.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Vibe Doc Generate Skill
|
|
11
|
+
|
|
12
|
+
Conversational pipeline to select documentation gaps and generate complete documents.
|
|
13
|
+
|
|
14
|
+
**Shared behavior:** Read `skills/guide/SKILL.md` for state management, CLI patterns, checkpoints, and output formatting.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Entry: Check for Existing Scan
|
|
19
|
+
|
|
20
|
+
**First step: verify state exists**
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
if [ ! -f "<project-path>/.vibe-doc/state.json" ]; then
|
|
24
|
+
echo "No project profile found. Run the Scan skill first."
|
|
25
|
+
exit 1
|
|
26
|
+
fi
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
If state doesn't exist, redirect user to **Scan skill** and exit.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Conversational Flow
|
|
34
|
+
|
|
35
|
+
### 1. Present Gap Summary & Offer Choices
|
|
36
|
+
|
|
37
|
+
Read state and show gaps:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
Documentation Gaps
|
|
41
|
+
━━━━━━━━━━━━━━━━━━
|
|
42
|
+
|
|
43
|
+
Required (Deployment Blockers) — 3 missing:
|
|
44
|
+
□ Threat Model
|
|
45
|
+
□ Architecture Decision Records
|
|
46
|
+
□ Runbook (Deployment & Operations)
|
|
47
|
+
|
|
48
|
+
Recommended (Should Do) — 4 missing:
|
|
49
|
+
□ API Specification
|
|
50
|
+
□ Deployment Procedure
|
|
51
|
+
□ Data Model Documentation
|
|
52
|
+
□ Security Hardening Guide
|
|
53
|
+
|
|
54
|
+
Optional (Nice to Have) — 3 missing:
|
|
55
|
+
□ Changelog
|
|
56
|
+
□ Contributing Guide
|
|
57
|
+
□ Performance Benchmarks
|
|
58
|
+
|
|
59
|
+
Which would you like to generate?
|
|
60
|
+
|
|
61
|
+
[required] → Start with all Required docs
|
|
62
|
+
[pick] → Let me choose specific gaps
|
|
63
|
+
[single <name>] → Generate one doc now
|
|
64
|
+
[all] → Generate everything
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**User chooses:**
|
|
68
|
+
- `required` → Go to step 2a (Generate Required, one at a time)
|
|
69
|
+
- `pick` → Go to step 2b (Selection menu)
|
|
70
|
+
- `single Threat Model` → Go directly to step 3 for that doc
|
|
71
|
+
- `all` → Go to step 2a with all gaps pre-selected
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
### 2a. Sequential Generation — One at a Time
|
|
76
|
+
|
|
77
|
+
For each selected gap, execute the generation workflow:
|
|
78
|
+
|
|
79
|
+
1. **Ask synthesis questions** (2-3 targeted questions for this doc type)
|
|
80
|
+
2. **Capture answers** (save to temporary JSON)
|
|
81
|
+
3. **Run generation command**
|
|
82
|
+
4. **Present results** (file paths, confidence summary)
|
|
83
|
+
5. **Confirm before moving to next doc**
|
|
84
|
+
|
|
85
|
+
**For example, generating a Threat Model:**
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
Threat Model Synthesis
|
|
89
|
+
━━━━━━━━━━━━━━━━━━━━━━
|
|
90
|
+
|
|
91
|
+
I found security discussion in your artifacts, but I need 2 more details:
|
|
92
|
+
|
|
93
|
+
1. Beyond authentication and data encryption, are there other sensitive
|
|
94
|
+
operations? (payments, PII access, admin functions, integrations?)
|
|
95
|
+
|
|
96
|
+
2. Are there known external dependencies or services your app relies on?
|
|
97
|
+
(Third-party APIs, databases, cache layers?)
|
|
98
|
+
|
|
99
|
+
[Capture answers and save to temp JSON]
|
|
100
|
+
|
|
101
|
+
Generating threat model...
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Then run:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
cd <project-path> && npx vibe-doc generate threat-model \
|
|
108
|
+
--format both \
|
|
109
|
+
--answers '{"externalDeps":["Firebase","Stripe"],"sensitiveOps":["payment","admin"]}'
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**If generation succeeds:**
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
✓ Threat Model generated
|
|
116
|
+
|
|
117
|
+
Files created:
|
|
118
|
+
• docs/generated/threat-model.md (2,400 words)
|
|
119
|
+
• docs/generated/threat-model.docx
|
|
120
|
+
|
|
121
|
+
Confidence summary:
|
|
122
|
+
• Attack surface (High) — extracted from code + interview
|
|
123
|
+
• Threat scenarios (Medium) — based on patterns, flagged for review
|
|
124
|
+
• Mitigations (Medium) — industry standard, review for your stack
|
|
125
|
+
• Compliance mapping (High) — HIPAA requirements auto-linked
|
|
126
|
+
|
|
127
|
+
Next: Review the markdown file, then approve or regenerate.
|
|
128
|
+
|
|
129
|
+
[approve] → Save and move to next doc
|
|
130
|
+
[revise] → Ask different questions and regenerate
|
|
131
|
+
[skip] → Move to next gap without saving
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**If user approves:**
|
|
135
|
+
- Move to next selected doc (repeat step 2a)
|
|
136
|
+
|
|
137
|
+
**If user revises:**
|
|
138
|
+
- Ask follow-up questions
|
|
139
|
+
- Re-run generation with new answers
|
|
140
|
+
|
|
141
|
+
**If user skips:**
|
|
142
|
+
- Mark gap as deferred
|
|
143
|
+
- Move to next doc
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
### 2b. Selection Menu (If User Picks)
|
|
148
|
+
|
|
149
|
+
Show all gaps as a checklist:
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
Which docs would you like to generate? (Mark with [x])
|
|
153
|
+
|
|
154
|
+
Required:
|
|
155
|
+
[x] Threat Model
|
|
156
|
+
[ ] Architecture Decision Records
|
|
157
|
+
[ ] Runbook
|
|
158
|
+
|
|
159
|
+
Recommended:
|
|
160
|
+
[x] API Specification
|
|
161
|
+
[ ] Deployment Procedure
|
|
162
|
+
[ ] Data Model Documentation
|
|
163
|
+
|
|
164
|
+
Optional:
|
|
165
|
+
[ ] Changelog
|
|
166
|
+
[ ] Contributing Guide
|
|
167
|
+
|
|
168
|
+
[done] → Generate the 2 checked docs
|
|
169
|
+
[add all required] → Select all Required docs
|
|
170
|
+
[clear] → Start over
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
After selection, confirm:
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
You've selected 2 docs to generate. Estimate time: 10-15 minutes.
|
|
177
|
+
|
|
178
|
+
Ready to start?
|
|
179
|
+
[yes] → Begin generation
|
|
180
|
+
[no] → Go back and adjust
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Then proceed to step 2a (Sequential Generation).
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
### 3. Synthesis Questions — Doc Type Specifics
|
|
188
|
+
|
|
189
|
+
For each document type, ask targeted questions to fill extraction gaps.
|
|
190
|
+
|
|
191
|
+
**Use breadcrumb heuristics from `skills/guide/references/breadcrumb-heuristics.md`.**
|
|
192
|
+
|
|
193
|
+
**Example questions per doc type:**
|
|
194
|
+
|
|
195
|
+
| Doc Type | Sample Questions |
|
|
196
|
+
|----------|------------------|
|
|
197
|
+
| **Threat Model** | What sensitive operations exist? Known external dependencies? Attack vectors you're concerned about? |
|
|
198
|
+
| **ADRs** | Major architecture decisions made? Tradeoffs considered (monolith vs. microservices)? Tech stack choices? |
|
|
199
|
+
| **Runbook** | Deployment frequency? Health checks and alerts? Rollback procedure? On-call escalation? |
|
|
200
|
+
| **API Spec** | Authentication method? Rate limiting? Pagination? Error codes? Versioning strategy? |
|
|
201
|
+
| **Deployment Procedure** | CI/CD pipeline stages? Approval gates? Rollback trigger? Monitoring post-deploy? |
|
|
202
|
+
| **Test Plan** | Coverage targets? Manual vs. automated split? Test environments? Performance benchmarks? |
|
|
203
|
+
| **Data Model** | Data retention requirements? PII classification? Schema versioning? Backup/restore? |
|
|
204
|
+
|
|
205
|
+
**Question delivery format:**
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
Threat Model — Question 1 of 2
|
|
209
|
+
|
|
210
|
+
[Question text]
|
|
211
|
+
|
|
212
|
+
Your answer: [capture user input]
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
### 4. Generation Command
|
|
218
|
+
|
|
219
|
+
After collecting answers, save to JSON and run CLI:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
ANSWERS_JSON='{"externalDeps":["..."],"sensitiveOps":["..."]}'
|
|
223
|
+
cd <project-path> && npx vibe-doc generate threat-model \
|
|
224
|
+
--format both \
|
|
225
|
+
--answers "$ANSWERS_JSON"
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**Parse output:**
|
|
229
|
+
- Extract file paths (e.g., `docs/generated/threat-model.md`)
|
|
230
|
+
- Extract confidence scores per section
|
|
231
|
+
- Extract source attributions
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
### 5. Present Results
|
|
236
|
+
|
|
237
|
+
Show what was created:
|
|
238
|
+
|
|
239
|
+
```
|
|
240
|
+
✓ Threat Model generated
|
|
241
|
+
|
|
242
|
+
Files:
|
|
243
|
+
markdown: docs/generated/threat-model.md (2,400 words)
|
|
244
|
+
docx: docs/generated/threat-model.docx
|
|
245
|
+
|
|
246
|
+
Content breakdown:
|
|
247
|
+
• Executive summary
|
|
248
|
+
• Attack surface inventory (extracted from code + your input)
|
|
249
|
+
• Threat scenarios (attack trees, entry points)
|
|
250
|
+
• Mitigations and controls
|
|
251
|
+
• Compliance checklist (HIPAA §164.308 mapping)
|
|
252
|
+
|
|
253
|
+
Confidence by section:
|
|
254
|
+
✓ Attack surface (94%) — High confidence
|
|
255
|
+
⚠ Mitigations (72%) — Medium, please review
|
|
256
|
+
✓ Compliance (88%) — High confidence
|
|
257
|
+
|
|
258
|
+
Source attributions included in document.
|
|
259
|
+
|
|
260
|
+
Next step: Review the markdown, then either:
|
|
261
|
+
[approve] → Mark as complete and generate more docs
|
|
262
|
+
[revise] → Ask different questions and regenerate
|
|
263
|
+
[skip] → Move to next gap
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
### 6. Document Review Checkpoint
|
|
269
|
+
|
|
270
|
+
Ask user to review before moving on:
|
|
271
|
+
|
|
272
|
+
```
|
|
273
|
+
Before we move to the next doc, take a moment to review what was generated.
|
|
274
|
+
|
|
275
|
+
Open: docs/generated/threat-model.md
|
|
276
|
+
|
|
277
|
+
Things to check:
|
|
278
|
+
• Does the attack surface match your app?
|
|
279
|
+
• Are mitigations practical for your stack?
|
|
280
|
+
• Any confidence flags (marked ⚠) that need manual review?
|
|
281
|
+
|
|
282
|
+
[approve] → Document is good, move to next gap
|
|
283
|
+
[revise] → I'll ask different questions and regenerate
|
|
284
|
+
[edit] → I'll open the markdown so you can edit manually
|
|
285
|
+
[skip] → Skip this doc for now, move to next
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
### 7. Completion Summary
|
|
291
|
+
|
|
292
|
+
After all selected docs are generated:
|
|
293
|
+
|
|
294
|
+
```
|
|
295
|
+
Generation Complete ✓
|
|
296
|
+
━━━━━━━━━━━━━━━━━━━━
|
|
297
|
+
|
|
298
|
+
Generated: 3 documents
|
|
299
|
+
✓ Threat Model
|
|
300
|
+
✓ API Specification
|
|
301
|
+
✓ Runbook
|
|
302
|
+
|
|
303
|
+
Files saved to: docs/generated/
|
|
304
|
+
|
|
305
|
+
Coverage improved: 28% → 57% (4 of 7 Required docs)
|
|
306
|
+
|
|
307
|
+
What's next?
|
|
308
|
+
|
|
309
|
+
[more] → Generate more docs
|
|
310
|
+
[check] → Run CI validation
|
|
311
|
+
[done] → Finish (docs are ready to review)
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
## Error Handling
|
|
317
|
+
|
|
318
|
+
### No Scan Exists
|
|
319
|
+
|
|
320
|
+
```
|
|
321
|
+
I don't see a project profile yet. Run the Scan skill first to:
|
|
322
|
+
• Analyze your artifacts
|
|
323
|
+
• Classify your app type
|
|
324
|
+
• Identify documentation gaps
|
|
325
|
+
|
|
326
|
+
Then come back here to generate docs.
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
### Generation Command Fails
|
|
330
|
+
|
|
331
|
+
```
|
|
332
|
+
Generation failed: [error message]
|
|
333
|
+
|
|
334
|
+
This could mean:
|
|
335
|
+
• The answers you provided didn't match expected format
|
|
336
|
+
• The doc template is missing or corrupted
|
|
337
|
+
• A file system error occurred
|
|
338
|
+
|
|
339
|
+
Options:
|
|
340
|
+
[retry] → Try again with same questions
|
|
341
|
+
[different] → Ask different synthesis questions
|
|
342
|
+
[manual] → Skip this doc and move to next
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### Low Confidence Sections
|
|
346
|
+
|
|
347
|
+
If a section has <70% confidence:
|
|
348
|
+
|
|
349
|
+
```
|
|
350
|
+
⚠ Low Confidence Flag: "Mitigations" section (68% confidence)
|
|
351
|
+
|
|
352
|
+
This section was generated from limited artifact information and may need
|
|
353
|
+
manual review or revision. I've marked it with flags in the document.
|
|
354
|
+
|
|
355
|
+
Suggestions:
|
|
356
|
+
• Review "Mitigations" manually and adjust
|
|
357
|
+
• Re-generate with more specific answers to synthesis questions
|
|
358
|
+
• Leave as-is (it's a starting point, not final)
|
|
359
|
+
|
|
360
|
+
[revise] → Ask different questions and regenerate
|
|
361
|
+
[continue] → Keep this version, move to next doc
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
## State & Output
|
|
367
|
+
|
|
368
|
+
**Read from `.vibe-doc/state.json`:**
|
|
369
|
+
- Classification (to select appropriate doc types)
|
|
370
|
+
- Gaps list (to show what's available to generate)
|
|
371
|
+
- Generation history (to track what's been done)
|
|
372
|
+
|
|
373
|
+
**Write to `.vibe-doc/state.json`:**
|
|
374
|
+
- Generated doc metadata (file paths, timestamps, confidence scores)
|
|
375
|
+
|
|
376
|
+
**Files created in user's project:**
|
|
377
|
+
- `docs/generated/<doc-type>.md` — markdown version
|
|
378
|
+
- `docs/generated/<doc-type>.docx` — docx version
|
|
379
|
+
- `docs/generated/.history/<doc-type>-<timestamp>.md` — version history
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
## Synthesis Questions Reference
|
|
384
|
+
|
|
385
|
+
Full question sets per doc type are in `skills/guide/references/breadcrumb-heuristics.md`.
|
|
386
|
+
|
|
387
|
+
Each skill consults that reference to build context-appropriate questions for each gap type.
|
|
388
|
+
|
|
389
|
+
---
|
|
390
|
+
|
|
391
|
+
**Last updated:** 2026-04-11 | **Version:** 1.0
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
# Agent Guide — How to Use Vibe Doc Skills
|
|
2
|
+
|
|
3
|
+
**This is for agents.** When a user invokes a Vibe Doc skill, read the corresponding SKILL.md file and follow its conversational pipeline exactly.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Quick Reference
|
|
8
|
+
|
|
9
|
+
| Skill | File | Purpose | User-Facing? |
|
|
10
|
+
|-------|------|---------|--------------|
|
|
11
|
+
| **scan** | `scan/SKILL.md` | Scan artifacts, classify app, report gaps | YES |
|
|
12
|
+
| **generate** | `generate/SKILL.md` | Generate selected documentation | YES |
|
|
13
|
+
| **check** | `check/SKILL.md` | Validate Required docs exist and are current | YES |
|
|
14
|
+
| **guide** | `guide/SKILL.md` | Shared behavior (reference only) | NO |
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Skill Invocation Pattern
|
|
19
|
+
|
|
20
|
+
When a user says something like:
|
|
21
|
+
- "Scan my project for documentation gaps"
|
|
22
|
+
- "Help me generate missing docs"
|
|
23
|
+
- "Check if my docs are current"
|
|
24
|
+
|
|
25
|
+
The agent should:
|
|
26
|
+
|
|
27
|
+
1. **Identify the skill:** Map user request to scan/generate/check
|
|
28
|
+
2. **Read the SKILL.md:** Open the corresponding file and read the full conversational flow
|
|
29
|
+
3. **Follow the pipeline:** Execute step-by-step as defined in the SKILL.md
|
|
30
|
+
4. **Reference guides:** Consult `skills/guide/references/` when needed (see below)
|
|
31
|
+
5. **Maintain state:** All skills interact with `.vibe-doc/state.json` via CLI commands
|
|
32
|
+
6. **Respect checkpoints:** Pause and ask for user confirmation at critical gates
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Step-by-Step: Scan Skill
|
|
37
|
+
|
|
38
|
+
User: "Scan my project for documentation gaps"
|
|
39
|
+
|
|
40
|
+
1. **Read** `skills/scan/SKILL.md`
|
|
41
|
+
2. **Section 1 — Entry Gate:**
|
|
42
|
+
- Greet user
|
|
43
|
+
- Present two paths: "Add context first" or "Start scanning"
|
|
44
|
+
- Wait for choice
|
|
45
|
+
3. **If Path A (Add context):**
|
|
46
|
+
- Go to section 2 (Intake Interview)
|
|
47
|
+
- Ask 6 questions, save answers
|
|
48
|
+
4. **If Path B (Cold start):**
|
|
49
|
+
- Jump to section 3 (Run Scan)
|
|
50
|
+
5. **Section 3 — Run Scan:**
|
|
51
|
+
- Execute: `cd <project-path> && npx vibe-doc scan .`
|
|
52
|
+
- If fails: show error, suggest next steps, exit
|
|
53
|
+
- If succeeds: proceed
|
|
54
|
+
6. **Section 4 — Present Classification:**
|
|
55
|
+
- Read `.vibe-doc/state.json` to get classification
|
|
56
|
+
- Show it to user in formatted output
|
|
57
|
+
- Checkpoint: ask user to confirm/revise/dispute
|
|
58
|
+
7. **Section 5 — Present Gap Report:**
|
|
59
|
+
- Show summary (counts by tier)
|
|
60
|
+
- Checkpoint: ask how to proceed (walkthrough/generate/check/exit)
|
|
61
|
+
8. **Section 6 — Interactive Walkthrough (optional):**
|
|
62
|
+
- If user picked walkthrough, go through gaps 1-by-1
|
|
63
|
+
- For each gap: show rationale, what was found, what's missing
|
|
64
|
+
- Ask: generate now, skip, or see details
|
|
65
|
+
9. **Section 7 — Completion:**
|
|
66
|
+
- Show final summary
|
|
67
|
+
- Offer next steps (generate, save, check)
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Step-by-Step: Generate Skill
|
|
72
|
+
|
|
73
|
+
User: "Help me generate the missing documentation"
|
|
74
|
+
|
|
75
|
+
1. **Read** `skills/generate/SKILL.md`
|
|
76
|
+
2. **Entry check:**
|
|
77
|
+
- Verify `.vibe-doc/state.json` exists
|
|
78
|
+
- If not: redirect to Scan skill and exit
|
|
79
|
+
3. **Section 1 — Show Gaps:**
|
|
80
|
+
- Read state
|
|
81
|
+
- Display gaps organized by tier
|
|
82
|
+
- Ask: generate Required/pick specific/generate all
|
|
83
|
+
4. **Section 2a — Sequential Generation:**
|
|
84
|
+
- For each selected gap:
|
|
85
|
+
- Consult `skills/guide/references/breadcrumb-heuristics.md` for the doc type
|
|
86
|
+
- Extract the "Gap Questions" section
|
|
87
|
+
- Ask user those 2-3 questions
|
|
88
|
+
- Save answers to temporary JSON
|
|
89
|
+
- Execute: `cd <project-path> && npx vibe-doc generate <docType> --format both --answers '<json>'`
|
|
90
|
+
- Parse output: show file paths, confidence per section
|
|
91
|
+
- Checkpoint: approve/revise/skip
|
|
92
|
+
5. **Section 7 — Completion:**
|
|
93
|
+
- Show summary of what was generated
|
|
94
|
+
- Offer: generate more/check/done
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Step-by-Step: Check Skill
|
|
99
|
+
|
|
100
|
+
User: "Check if my documentation is current"
|
|
101
|
+
|
|
102
|
+
1. **Read** `skills/check/SKILL.md`
|
|
103
|
+
2. **Section 1 — Run Check:**
|
|
104
|
+
- Execute: `cd <project-path> && npx vibe-doc check .`
|
|
105
|
+
3. **Section 2 — Present Results:**
|
|
106
|
+
- If pass: celebrate, show status, offer next steps
|
|
107
|
+
- If fail: show what's missing/stale, suggest fixes
|
|
108
|
+
4. **Section 3 — Checkpoint:**
|
|
109
|
+
- Ask: regenerate/scan/review/exit
|
|
110
|
+
5. **CI Integration:**
|
|
111
|
+
- If user asks about CI/CD, show the example in section "CI/CD Integration"
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## When to Consult Reference Guides
|
|
116
|
+
|
|
117
|
+
### Use `classification-taxonomy.md` when:
|
|
118
|
+
- Classifying an ambiguous application (could be Web App OR API)
|
|
119
|
+
- Determining what docs are appropriate for a category
|
|
120
|
+
- Explaining why a context modifier matters
|
|
121
|
+
|
|
122
|
+
**Example:** User says "My app is both a web app and an API." Consult taxonomy to explain primary vs. secondary categories.
|
|
123
|
+
|
|
124
|
+
### Use `documentation-matrix.md` when:
|
|
125
|
+
- Explaining which docs are Required vs. Recommended for their app type
|
|
126
|
+
- Showing why a doc tier changed (due to modifiers)
|
|
127
|
+
- Justifying a doc as "required for HIPAA compliance"
|
|
128
|
+
|
|
129
|
+
**Example:** Generate skill shows "Test Plan is Recommended for your Web App. However, because you're Customer-Facing, it's elevated to Required."
|
|
130
|
+
|
|
131
|
+
### Use `breadcrumb-heuristics.md` when:
|
|
132
|
+
- Generating a specific document (to get synthesis questions)
|
|
133
|
+
- Explaining confidence levels (why a section was low-confidence)
|
|
134
|
+
- Helping user understand what the scanner looks for
|
|
135
|
+
|
|
136
|
+
**Example:** Generate skill for "Threat Model" doc → consult breadcrumb-heuristics to extract Gap Questions → ask user "Beyond authentication and data encryption, what other sensitive operations exist?"
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## State Management
|
|
141
|
+
|
|
142
|
+
All skills operate on `.vibe-doc/state.json` in the mounted project folder.
|
|
143
|
+
|
|
144
|
+
**Never edit this file directly.** Always use CLI commands:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
# Scan produces/updates:
|
|
148
|
+
npx vibe-doc scan <path>
|
|
149
|
+
|
|
150
|
+
# Generate updates:
|
|
151
|
+
npx vibe-doc generate <docType> --format both --answers <json>
|
|
152
|
+
|
|
153
|
+
# Check reads (no modifications):
|
|
154
|
+
npx vibe-doc check <path>
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**State structure** (from `guide/SKILL.md`):
|
|
158
|
+
```json
|
|
159
|
+
{
|
|
160
|
+
"profile": {
|
|
161
|
+
"primaryCategory": "string",
|
|
162
|
+
"secondaryCategories": ["string"],
|
|
163
|
+
"deploymentContexts": ["string"],
|
|
164
|
+
"confidence": 0.0-1.0
|
|
165
|
+
},
|
|
166
|
+
"scan": {
|
|
167
|
+
"timestamp": "ISO8601",
|
|
168
|
+
"artifacts": [],
|
|
169
|
+
"gitHistory": {},
|
|
170
|
+
"codeStructure": {}
|
|
171
|
+
},
|
|
172
|
+
"gaps": {
|
|
173
|
+
"required": [],
|
|
174
|
+
"recommended": [],
|
|
175
|
+
"optional": []
|
|
176
|
+
},
|
|
177
|
+
"generated": {
|
|
178
|
+
"docs": [],
|
|
179
|
+
"timestamps": {}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Error Handling
|
|
187
|
+
|
|
188
|
+
When a CLI command fails, **always:**
|
|
189
|
+
|
|
190
|
+
1. Show the error message to the user
|
|
191
|
+
2. Explain what was being attempted
|
|
192
|
+
3. Suggest concrete next steps
|
|
193
|
+
4. Offer fallback options (if any)
|
|
194
|
+
|
|
195
|
+
See each SKILL.md's "Error Handling" section for specific error patterns and responses.
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Checkpoint Pattern (Critical)
|
|
200
|
+
|
|
201
|
+
Vibe Doc uses checkpoints to ensure user control at critical gates:
|
|
202
|
+
|
|
203
|
+
1. **Present findings clearly** (summary first, then details)
|
|
204
|
+
2. **Show the decision** (what's being asked, why it matters)
|
|
205
|
+
3. **Offer explicit choices** (yes/no/revise/skip/etc.)
|
|
206
|
+
4. **Wait for confirmation** (do NOT proceed without user response)
|
|
207
|
+
|
|
208
|
+
Examples of checkpoints:
|
|
209
|
+
- Classification confirmation ("Does this match your project?")
|
|
210
|
+
- Gap walkthrough start ("Would you like to walk through gaps one by one?")
|
|
211
|
+
- Document approval ("Approve this doc before moving to next?")
|
|
212
|
+
- Generation selection ("You've selected 2 docs. Ready to start?")
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## Output Formatting Standards
|
|
217
|
+
|
|
218
|
+
From `guide/SKILL.md`:
|
|
219
|
+
|
|
220
|
+
**Headers:** Use Markdown. Structure output with H1, H2, H3.
|
|
221
|
+
|
|
222
|
+
**Lists:** Bullet points for options/findings, numbered for steps.
|
|
223
|
+
|
|
224
|
+
**Code blocks:**
|
|
225
|
+
```bash
|
|
226
|
+
cd /project && npx vibe-doc scan .
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
**Checkpoints:** Use clear formatting with options in brackets:
|
|
230
|
+
```
|
|
231
|
+
[yes] → Proceed to next step
|
|
232
|
+
[no] → Go back and adjust
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Status indicators:** Use consistent symbols:
|
|
236
|
+
- ✓ Complete/Found
|
|
237
|
+
- ✗ Missing/Failed
|
|
238
|
+
- ⚠ Warning/Low confidence
|
|
239
|
+
- → Next step/redirect
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Example: Full Scan → Generate → Check Flow
|
|
244
|
+
|
|
245
|
+
```
|
|
246
|
+
User: "Help me document my project"
|
|
247
|
+
|
|
248
|
+
Agent reads: skills/scan/SKILL.md
|
|
249
|
+
Agent runs scan pipeline (sections 1-7)
|
|
250
|
+
Output: gaps listed, user prompted next steps
|
|
251
|
+
|
|
252
|
+
User: "Let's generate the required docs"
|
|
253
|
+
|
|
254
|
+
Agent reads: skills/generate/SKILL.md
|
|
255
|
+
Agent checks state, shows gaps, lets user pick
|
|
256
|
+
For each gap:
|
|
257
|
+
- Agent reads: breadcrumb-heuristics.md (for that doc type)
|
|
258
|
+
- Agent asks synthesis questions
|
|
259
|
+
- Agent runs generate CLI
|
|
260
|
+
- Agent shows results + checkpoint
|
|
261
|
+
|
|
262
|
+
User: "Before I commit these, can you verify everything?"
|
|
263
|
+
|
|
264
|
+
Agent reads: skills/check/SKILL.md
|
|
265
|
+
Agent runs check pipeline
|
|
266
|
+
Output: pass/fail status, recommendations
|
|
267
|
+
|
|
268
|
+
Done!
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## Tone & Style
|
|
274
|
+
|
|
275
|
+
All skills follow 626Labs communication style:
|
|
276
|
+
- **Direct and clear** — no filler, respect user's time
|
|
277
|
+
- **Technical but accessible** — explain concepts in plain language
|
|
278
|
+
- **Action-oriented** — lead with what to do, not why
|
|
279
|
+
- **Responsive to energy** — match user's pace (quick/thoughtful)
|
|
280
|
+
|
|
281
|
+
From `guide/SKILL.md`:
|
|
282
|
+
- Professional, direct, no filler
|
|
283
|
+
- Technical but accessible
|
|
284
|
+
- Checkpoint before proceeding
|
|
285
|
+
- Structured output (headers, lists, code blocks)
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## Testing Your Implementation
|
|
290
|
+
|
|
291
|
+
When integrating these skills, verify:
|
|
292
|
+
|
|
293
|
+
1. **Scan skill:**
|
|
294
|
+
- Entry gate works (context vs. cold)
|
|
295
|
+
- Classification resolves correctly
|
|
296
|
+
- Gap report shows Required/Recommended/Optional
|
|
297
|
+
- Interactive walkthrough processes gaps one by one
|
|
298
|
+
|
|
299
|
+
2. **Generate skill:**
|
|
300
|
+
- State check works (redirects if no scan)
|
|
301
|
+
- Synthesis questions asked and saved
|
|
302
|
+
- CLI commands execute and produce files
|
|
303
|
+
- Checkpoints work at each approval point
|
|
304
|
+
|
|
305
|
+
3. **Check skill:**
|
|
306
|
+
- CLI returns correct exit codes (0/1)
|
|
307
|
+
- Output is CI-safe (no prompts)
|
|
308
|
+
- Suggestions for fixes are clear
|
|
309
|
+
|
|
310
|
+
4. **Reference docs:**
|
|
311
|
+
- Agents can consult taxonomy for edge cases
|
|
312
|
+
- Matrix accurately maps categories to doc types
|
|
313
|
+
- Breadcrumbs provide useful synthesis questions
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
**Last updated:** 2026-04-11
|
|
318
|
+
**For:** Agents implementing Vibe Doc skills
|