@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.
Files changed (53) hide show
  1. package/.claude-plugin/plugin.json +8 -0
  2. package/commands/check.md +7 -0
  3. package/commands/generate.md +11 -0
  4. package/commands/scan.md +11 -0
  5. package/commands/status.md +7 -0
  6. package/dist/classifier/index.js +9 -0
  7. package/dist/classifier/llm-prompt.d.ts.map +1 -1
  8. package/dist/classifier/llm-prompt.js +1 -0
  9. package/dist/classifier/scoring-engine.d.ts +2 -1
  10. package/dist/classifier/scoring-engine.d.ts.map +1 -1
  11. package/dist/classifier/scoring-engine.js +16 -0
  12. package/dist/classifier/signals.d.ts.map +1 -1
  13. package/dist/classifier/signals.js +46 -7
  14. package/dist/gap-analyzer/breadcrumbs.d.ts.map +1 -1
  15. package/dist/gap-analyzer/breadcrumbs.js +77 -0
  16. package/dist/gap-analyzer/matrix.d.ts +5 -1
  17. package/dist/gap-analyzer/matrix.d.ts.map +1 -1
  18. package/dist/gap-analyzer/matrix.js +51 -0
  19. package/dist/gap-analyzer/tier-assigner.d.ts.map +1 -1
  20. package/dist/gap-analyzer/tier-assigner.js +14 -2
  21. package/dist/generator/docx-writer.d.ts.map +1 -1
  22. package/dist/generator/docx-writer.js +13 -1
  23. package/dist/generator/extractor.d.ts.map +1 -1
  24. package/dist/generator/extractor.js +91 -0
  25. package/dist/generator/markdown-writer.d.ts.map +1 -1
  26. package/dist/generator/markdown-writer.js +13 -1
  27. package/dist/scanner/file-scanner.d.ts.map +1 -1
  28. package/dist/scanner/file-scanner.js +10 -2
  29. package/dist/templates/embedded/adr.md +45 -0
  30. package/dist/templates/embedded/api-spec.md +55 -0
  31. package/dist/templates/embedded/changelog-contributing.md +67 -0
  32. package/dist/templates/embedded/data-model.md +55 -0
  33. package/dist/templates/embedded/deployment-procedure.md +63 -0
  34. package/dist/templates/embedded/install-guide.md +49 -0
  35. package/dist/templates/embedded/readme.md +55 -0
  36. package/dist/templates/embedded/runbook.md +55 -0
  37. package/dist/templates/embedded/skill-command-reference.md +77 -0
  38. package/dist/templates/embedded/test-plan.md +55 -0
  39. package/dist/templates/embedded/threat-model.md +47 -0
  40. package/dist/templates/index.d.ts +13 -0
  41. package/dist/templates/index.d.ts.map +1 -1
  42. package/dist/templates/index.js +18 -7
  43. package/dist/templates/renderer.d.ts.map +1 -1
  44. package/dist/templates/renderer.js +3 -1
  45. package/package.json +4 -1
  46. package/skills/check/SKILL.md +302 -0
  47. package/skills/generate/SKILL.md +391 -0
  48. package/skills/guide/AGENT_GUIDE.md +318 -0
  49. package/skills/guide/SKILL.md +270 -0
  50. package/skills/guide/references/breadcrumb-heuristics.md +441 -0
  51. package/skills/guide/references/classification-taxonomy.md +391 -0
  52. package/skills/guide/references/documentation-matrix.md +297 -0
  53. package/skills/scan/SKILL.md +219 -0
@@ -0,0 +1,219 @@
1
+ ---
2
+ name: scan
3
+ description: >
4
+ This skill should be used when the user mentions "scan my project",
5
+ "check my documentation", "run vibe doc", "what docs am I missing",
6
+ "documentation gaps", "doc coverage", or wants to analyze their codebase
7
+ for missing technical documentation.
8
+ ---
9
+
10
+ # Vibe Doc Scan Skill
11
+
12
+ Conversational pipeline to scan a project, classify its type, and produce a documentation gap report.
13
+
14
+ **Shared behavior:** Read `skills/guide/SKILL.md` for state management, CLI patterns, checkpoints, and output formatting.
15
+
16
+ ---
17
+
18
+ ## Conversational Flow
19
+
20
+ ### 1. Entry Gate — Context vs. Cold Start
21
+
22
+ Greet the user and present two paths:
23
+
24
+ ```
25
+ Welcome to Vibe Doc. I'll scan your project's artifacts, classify your app,
26
+ and show you what documentation you need.
27
+
28
+ How would you like to start?
29
+
30
+ 1. Add project context first (4-6 questions, ~5 min)
31
+ → Helps me understand your goals, users, and deployment target
32
+
33
+ 2. Start scanning now (no questions)
34
+ → I'll analyze your artifacts and infer everything I can
35
+ ```
36
+
37
+ **User chooses:**
38
+ - **Path A: Add context** → Go to step 2 (Intake Interview)
39
+ - **Path B: Start scanning** → Go to step 3 (Run Scan)
40
+
41
+ ---
42
+
43
+ ### 2. Intake Interview — Context Gathering (Path A)
44
+
45
+ If user chooses context, run a focused interview. Max 6 questions. Save answers to a temporary profile that will seed the classification step.
46
+
47
+ **Questions to ask (in this order):**
48
+
49
+ 1. **Project name & description** → "What's your project called, and what does it do in one sentence?"
50
+ 2. **Primary purpose** → "Is this primarily a web app, API, data pipeline, infrastructure, mobile app, AI/ML system, or integration? Or something else?"
51
+ 3. **Deployment target** → "Where does this run? (Cloud provider, on-prem, edge, customer infrastructure?)"
52
+ 4. **Users & compliance** → "Who uses this? (Internal team, customers, public?) Any regulatory requirements? (HIPAA, SOC2, PCI, etc.)"
53
+ 5. **Architecture style** → "Monolith, microservices, serverless, or hybrid?"
54
+ 6. **Team context** → "Solo dev or team? Any deployments soon?"
55
+
56
+ **After collecting answers:**
57
+
58
+ ```
59
+ Got it. Here's what I heard:
60
+ - Project: [name]
61
+ - Purpose: [type]
62
+ - Deployment: [target]
63
+ - Users: [internal/customers/public] + [compliance]
64
+ - Architecture: [style]
65
+
66
+ I'll use this context when scanning your artifacts.
67
+ ```
68
+
69
+ Save this profile. Then proceed to step 3 (Run Scan).
70
+
71
+ ---
72
+
73
+ ### 3. Run Scan — Artifact Inventory
74
+
75
+ Execute the scan command:
76
+
77
+ ```bash
78
+ cd <project-path> && npx vibe-doc scan .
79
+ ```
80
+
81
+ **If scan succeeds:**
82
+ - Read `.vibe-doc/state.json`
83
+ - Show artifact inventory summary to user
84
+
85
+ **If scan fails:**
86
+ - Show error message and suggest next steps
87
+ - Offer retry or code-only mode
88
+
89
+ ---
90
+
91
+ ### 4. Present Classification
92
+
93
+ After successful scan, show the classification:
94
+
95
+ ```
96
+ Classification Summary
97
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
98
+
99
+ Primary Category: Web Application
100
+ Secondary Categories: Customer-Facing, Multi-Tenant
101
+ Deployment Context: Regulated (HIPAA), Cloud (AWS)
102
+ Confidence: 94%
103
+ ```
104
+
105
+ **Checkpoint:** Ask user to confirm or revise
106
+
107
+ ```
108
+ Does this match your project?
109
+
110
+ [yes] → Proceed to gap report
111
+ [no] → Let me ask follow-up questions
112
+ [revise] → I'll adjust manually
113
+ ```
114
+
115
+ ---
116
+
117
+ ### 5. Present Gap Report — Summary First
118
+
119
+ Show gap summary with Required/Recommended/Optional breakdown:
120
+
121
+ ```
122
+ Documentation Gap Report
123
+ ━━━━━━━━━━━━━━━━━━━━━━━━
124
+
125
+ Required Tier (Deployment Blockers): 1 of 4 exist (25%)
126
+ Recommended Tier (Should Do): 1 of 4 exist (25%)
127
+ Optional Tier (Nice to Have): 0 of 3 exist (0%)
128
+
129
+ Overall Coverage: 28% (2 of 7 critical docs)
130
+
131
+ Key Risks:
132
+ ⚠ No threat model — required before HIPAA submission
133
+ ⚠ No runbook — operational procedures missing
134
+ ```
135
+
136
+ **Checkpoint:** Ask how to proceed
137
+
138
+ ```
139
+ [walkthrough] → Go through gaps one at a time
140
+ [generate] → Pick which gaps to fill now
141
+ [check] → Run CI validation
142
+ [exit] → Save and come back later
143
+ ```
144
+
145
+ ---
146
+
147
+ ### 6. Interactive Walkthrough (Optional)
148
+
149
+ If user chooses "walkthrough", process gaps tier by tier, starting with Required.
150
+
151
+ **For each gap:**
152
+ - Show tier, rationale, what was found, what's missing
153
+ - Ask: Generate this doc now, skip, or see details?
154
+
155
+ ---
156
+
157
+ ### 7. Completion & Next Steps
158
+
159
+ ```
160
+ Scan Complete ✓
161
+ Your project: Web Application (Customer-Facing, Regulated)
162
+ Artifacts: 28 found
163
+ Coverage: 28% of required docs
164
+ Risk: High (missing Threat Model, Runbook)
165
+
166
+ Next: Generate required docs or save and return later?
167
+ ```
168
+
169
+ ---
170
+
171
+ ## Error Handling
172
+
173
+ ### Scan Command Fails
174
+
175
+ If the CLI command errors:
176
+
177
+ ```
178
+ Scan failed: [error]
179
+
180
+ Common causes:
181
+ 1. Folder isn't readable (permissions)
182
+ 2. Not a valid project (missing package.json, git repo)
183
+ 3. Git history corrupted or too large
184
+
185
+ Next steps:
186
+ → Check folder is valid project root
187
+ → Try again
188
+ → Or skip git analysis for code-only scan
189
+ ```
190
+
191
+ ### Ambiguous Classification
192
+
193
+ If multiple categories match equally:
194
+
195
+ ```
196
+ I found signals for both "API/Microservice" and "Web Application".
197
+ Which is primary for deployment?
198
+
199
+ [api] → API is primary (frontend is secondary)
200
+ [web] → Web app is primary (API is backend)
201
+ ```
202
+
203
+ ---
204
+
205
+ ## State & Output
206
+
207
+ **Saved to `.vibe-doc/state.json`:**
208
+ - Classification profile
209
+ - Artifact inventory
210
+ - Gap lists (required/recommended/optional)
211
+
212
+ **User sees:**
213
+ - Artifact summary
214
+ - Classification + rationale
215
+ - Gap report with risk assessment
216
+
217
+ ---
218
+
219
+ **Last updated:** 2026-04-11 | **Version:** 1.0