@sandrinio/vdoc 3.0.0 → 3.3.1
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/README.md +13 -13
- package/bin/vdoc.mjs +78 -9
- package/package.json +1 -1
- package/skills/agents/AGENTS.md +17 -143
- package/skills/agents/references/audit-workflow.md +65 -0
- package/skills/agents/references/doc-template.md +67 -0
- package/skills/agents/references/exploration-strategies.md +289 -0
- package/skills/agents/references/init-workflow.md +123 -0
- package/skills/agents/references/manifest-schema.json +16 -0
- package/skills/claude/SKILL.md +14 -198
- package/skills/claude/references/audit-workflow.md +65 -0
- package/skills/claude/references/exploration-strategies.md +289 -0
- package/skills/claude/references/init-workflow.md +123 -0
- package/skills/claude/vdoc-audit.md +80 -0
- package/skills/claude/vdoc-init.md +216 -0
- package/skills/cline/references/audit-workflow.md +65 -0
- package/skills/cline/references/doc-template.md +67 -0
- package/skills/cline/references/exploration-strategies.md +289 -0
- package/skills/cline/references/init-workflow.md +123 -0
- package/skills/cline/references/manifest-schema.json +16 -0
- package/skills/cline/vdoc-workflow.md +3 -13
- package/skills/cline/vdoc.md +10 -148
- package/skills/continue/references/audit-workflow.md +65 -0
- package/skills/continue/references/doc-template.md +67 -0
- package/skills/continue/references/exploration-strategies.md +289 -0
- package/skills/continue/references/init-workflow.md +123 -0
- package/skills/continue/references/manifest-schema.json +16 -0
- package/skills/continue/vdoc-command.md +3 -13
- package/skills/continue/vdoc.md +9 -147
- package/skills/cursor/RULE.md +68 -0
- package/skills/cursor/references/audit-workflow.md +65 -0
- package/skills/cursor/references/doc-template.md +67 -0
- package/skills/cursor/references/exploration-strategies.md +289 -0
- package/skills/cursor/references/init-workflow.md +123 -0
- package/skills/cursor/references/manifest-schema.json +16 -0
- package/skills/cursor/vdoc-command.md +3 -13
- package/skills/gemini/GEMINI.md +17 -143
- package/skills/gemini/references/audit-workflow.md +65 -0
- package/skills/gemini/references/doc-template.md +67 -0
- package/skills/gemini/references/exploration-strategies.md +289 -0
- package/skills/gemini/references/init-workflow.md +123 -0
- package/skills/gemini/references/manifest-schema.json +16 -0
- package/skills/gemini/vdoc.toml +3 -9
- package/skills/jetbrains-ai/references/audit-workflow.md +65 -0
- package/skills/jetbrains-ai/references/doc-template.md +67 -0
- package/skills/jetbrains-ai/references/exploration-strategies.md +289 -0
- package/skills/jetbrains-ai/references/init-workflow.md +123 -0
- package/skills/jetbrains-ai/references/manifest-schema.json +16 -0
- package/skills/jetbrains-ai/vdoc.md +17 -143
- package/skills/junie/guidelines.md +17 -143
- package/skills/junie/references/audit-workflow.md +65 -0
- package/skills/junie/references/doc-template.md +67 -0
- package/skills/junie/references/exploration-strategies.md +289 -0
- package/skills/junie/references/init-workflow.md +123 -0
- package/skills/junie/references/manifest-schema.json +16 -0
- package/skills/vscode/SKILL.md +39 -0
- package/skills/vscode/references/audit-workflow.md +65 -0
- package/skills/vscode/references/doc-template.md +67 -0
- package/skills/vscode/references/exploration-strategies.md +289 -0
- package/skills/vscode/references/init-workflow.md +123 -0
- package/skills/vscode/references/manifest-schema.json +16 -0
- package/skills/vscode/vdoc.instructions.md +30 -146
- package/skills/vscode/vdoc.prompt.md +5 -15
- package/skills/windsurf/SKILL.md +67 -0
- package/skills/windsurf/resources/audit-workflow.md +65 -0
- package/skills/windsurf/resources/doc-template.md +67 -0
- package/skills/windsurf/resources/exploration-strategies.md +289 -0
- package/skills/windsurf/resources/init-workflow.md +123 -0
- package/skills/windsurf/resources/manifest-schema.json +16 -0
- package/skills/windsurf/vdoc-workflow.md +3 -13
- package/skills/cursor/vdoc.mdc +0 -176
- package/skills/windsurf/vdoc.md +0 -94
package/skills/cursor/vdoc.mdc
DELETED
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Generate and maintain feature-centric product documentation. Handles init (explore codebase, plan docs, generate), audit (detect stale/missing/dead docs, patch), and query (route questions via semantic manifest). Activates when user asks about documentation, says 'document this project', 'audit docs', or asks questions about codebase features."
|
|
3
|
-
globs:
|
|
4
|
-
alwaysApply: false
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# vdoc — Documentation Generator
|
|
8
|
-
|
|
9
|
-
You generate and maintain feature-centric documentation for codebases. You have three modes: **init**, **audit**, and **query**.
|
|
10
|
-
|
|
11
|
-
All documentation lives in `vdocs/` at the project root. The manifest at `vdocs/_manifest.json` is the semantic index you read first.
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Mode 1: Init
|
|
16
|
-
|
|
17
|
-
**Trigger:** User says "document this project" or similar.
|
|
18
|
-
|
|
19
|
-
### Step 1 — Explore
|
|
20
|
-
|
|
21
|
-
Read the codebase thoroughly. Identify:
|
|
22
|
-
|
|
23
|
-
- **Tech stack**: languages, frameworks, databases, ORMs
|
|
24
|
-
- **Features**: authentication, API, payments, notifications, search, etc.
|
|
25
|
-
- **Architecture**: monolith vs microservices, frontend/backend split, key patterns
|
|
26
|
-
- **Integrations**: third-party services (Stripe, AWS, Redis, etc.)
|
|
27
|
-
- **Entry points**: where requests come in, how they flow through the system
|
|
28
|
-
|
|
29
|
-
Do not skim. Read key files — entry points, config, routes, schemas, middleware.
|
|
30
|
-
|
|
31
|
-
### Step 2 — Plan
|
|
32
|
-
|
|
33
|
-
Create `vdocs/_DOCUMENTATION_PLAN.md` listing each proposed doc with a one-line description. Present to user. Suggest merges, additions, or removals. Wait for approval.
|
|
34
|
-
|
|
35
|
-
### Step 3 — Generate
|
|
36
|
-
|
|
37
|
-
For each approved doc, read ALL relevant source files and generate using this template:
|
|
38
|
-
|
|
39
|
-
```markdown
|
|
40
|
-
# {Feature Title}
|
|
41
|
-
|
|
42
|
-
> {One-line description}
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
## Overview
|
|
47
|
-
{What it does, why it exists, how it fits in the system.}
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## How It Works
|
|
52
|
-
{Core logic and flow.}
|
|
53
|
-
{Mermaid diagram(s) — max 7-9 nodes per diagram, split if larger.}
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
## Data Model
|
|
58
|
-
{Entities this feature owns. Mermaid ER diagram or table.}
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## Key Files
|
|
63
|
-
| File | Purpose |
|
|
64
|
-
|------|---------|
|
|
65
|
-
| `src/path/file.ts` | What this file does |
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Dependencies & Integrations
|
|
70
|
-
{External services, internal features, packages this relies on.}
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## Configuration
|
|
75
|
-
| Variable | Purpose | Required |
|
|
76
|
-
|----------|---------|----------|
|
|
77
|
-
| `ENV_VAR` | What it controls | Yes/No |
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
## Error Handling
|
|
82
|
-
{Failure modes, what the user sees, retry logic. Mermaid diagram if non-trivial.}
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
## Constraints & Decisions
|
|
87
|
-
{Why it's built this way. What you CANNOT change without breaking things.}
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
## Related Features
|
|
92
|
-
{Cross-references to other docs by filename. Blast radius notes.}
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
*Generated by vdoc v3.0.0 • Last updated: {timestamp}*
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
**Writing rules:**
|
|
100
|
-
|
|
101
|
-
- **Mermaid diagrams are mandatory** in "How It Works". Max 7-9 nodes — split larger flows into multiple diagrams.
|
|
102
|
-
- **Data Model** must show real entities from the code, not placeholders.
|
|
103
|
-
- **Constraints & Decisions** is the most valuable section. Dig for non-obvious choices. If the reason is unclear, write: `Reason: unknown — verify with team`.
|
|
104
|
-
- **Related Features** must reference other doc filenames and explain the coupling.
|
|
105
|
-
- **Configuration** must list actual env vars from the code.
|
|
106
|
-
- **Error Handling** — trace what happens when things fail.
|
|
107
|
-
|
|
108
|
-
### Step 4 — Manifest
|
|
109
|
-
|
|
110
|
-
Create `vdocs/_manifest.json`:
|
|
111
|
-
|
|
112
|
-
```json
|
|
113
|
-
{
|
|
114
|
-
"project": "<project-name>",
|
|
115
|
-
"vdoc_version": "3.0.0",
|
|
116
|
-
"created_at": "<ISO-8601>",
|
|
117
|
-
"last_updated": "<ISO-8601>",
|
|
118
|
-
"last_commit": "<short-sha>",
|
|
119
|
-
"documentation": [
|
|
120
|
-
{
|
|
121
|
-
"filepath": "FEATURE_NAME_DOC.md",
|
|
122
|
-
"title": "Human-Readable Title",
|
|
123
|
-
"version": "1.0.0",
|
|
124
|
-
"description": "Rich semantic description with technology names, patterns, concepts. Detailed enough for AI to route questions to this doc.",
|
|
125
|
-
"tags": ["keyword-tag"]
|
|
126
|
-
}
|
|
127
|
-
]
|
|
128
|
-
}
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### Step 5 — Self-Review
|
|
132
|
-
|
|
133
|
-
Verify: every doc has mermaid diagrams, at least 2 constraints, real file paths, actual env vars, cross-references. Manifest descriptions are detailed enough for semantic routing. No hallucinated content.
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
## Mode 2: Audit
|
|
138
|
-
|
|
139
|
-
**Trigger:** User says "audit docs" or similar.
|
|
140
|
-
|
|
141
|
-
1. **Read manifest** — load `vdocs/_manifest.json`
|
|
142
|
-
2. **Detect stale** — `git diff` or `git log --name-only --since="<last_updated>"` to find changed source files. Cross-reference with each doc's "Key Files" section.
|
|
143
|
-
3. **Detect gaps** — scan codebase for significant features not covered by any doc (new routes, services, models, config).
|
|
144
|
-
4. **Detect dead docs** — check each doc's "Key Files" against filesystem. Flag docs referencing deleted files.
|
|
145
|
-
5. **Check cross-refs** — verify "Related Features" links still exist and coupling descriptions are accurate.
|
|
146
|
-
6. **Report** — present stale docs, coverage gaps, dead docs, cross-ref issues, and current docs. Wait for user direction.
|
|
147
|
-
7. **Patch** — update stale docs (re-read source, update affected sections). Generate new docs for gaps. Flag dead docs for removal. Fix cross-refs. Update manifest.
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
151
|
-
## Mode 3: Query
|
|
152
|
-
|
|
153
|
-
**Trigger:** User asks any question about the codebase or documentation.
|
|
154
|
-
|
|
155
|
-
1. Read `vdocs/_manifest.json`
|
|
156
|
-
2. Match question against `description` and `tags` fields
|
|
157
|
-
3. Read matching doc(s)
|
|
158
|
-
4. Answer from documented knowledge
|
|
159
|
-
5. If no match, say so and suggest running an audit
|
|
160
|
-
|
|
161
|
-
---
|
|
162
|
-
|
|
163
|
-
## Naming Convention
|
|
164
|
-
|
|
165
|
-
Files: `FEATURE_NAME_DOC.md` — uppercase, feature-named, `_DOC` suffix.
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
## Rules
|
|
170
|
-
|
|
171
|
-
1. **Feature-centric, not file-centric.** One doc per logical feature, not per source file.
|
|
172
|
-
2. **Mermaid over prose.** Diagram flows. Max 7-9 nodes per diagram.
|
|
173
|
-
3. **Constraints are gold.** Always fill "Constraints & Decisions". It prevents breaking changes.
|
|
174
|
-
4. **Rich manifest descriptions.** Pack with specific terms for semantic routing.
|
|
175
|
-
5. **No hallucination.** Only document what exists in code.
|
|
176
|
-
6. **Plan first, always.** Never generate without user-approved plan. Report before patching.
|
package/skills/windsurf/vdoc.md
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
trigger: model_decision
|
|
3
|
-
description: "Generate and maintain feature-centric product documentation. Modes: init (explore, plan, generate docs), audit (detect stale/missing/dead docs, patch), query (route questions via manifest). Activates on 'document this project', 'audit docs', or documentation questions."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# vdoc — Documentation Generator
|
|
7
|
-
|
|
8
|
-
Three modes: **init**, **audit**, **query**. All docs live in `vdocs/`. Manifest at `vdocs/_manifest.json` is the semantic index.
|
|
9
|
-
|
|
10
|
-
## Init ("document this project")
|
|
11
|
-
|
|
12
|
-
1. **Explore** — Read codebase: tech stack, features, architecture, integrations, entry points. Read actual files, don't skim.
|
|
13
|
-
2. **Plan** — Create `vdocs/_DOCUMENTATION_PLAN.md` listing proposed docs. Present to user, suggest changes. Wait for approval.
|
|
14
|
-
3. **Generate** — For each doc, read ALL relevant source files. Write `vdocs/FEATURE_NAME_DOC.md` using template below.
|
|
15
|
-
4. **Manifest** — Create `vdocs/_manifest.json` (schema below).
|
|
16
|
-
5. **Self-review** — Verify: mermaid diagrams present, real file paths, actual env vars, 2+ constraints per doc, cross-references exist.
|
|
17
|
-
|
|
18
|
-
## Audit ("audit docs")
|
|
19
|
-
|
|
20
|
-
1. Read `vdocs/_manifest.json`
|
|
21
|
-
2. **Stale**: git diff since `last_updated`, cross-ref with each doc's "Key Files" section
|
|
22
|
-
3. **Gaps**: find significant undocumented source files (routes, services, models)
|
|
23
|
-
4. **Dead**: docs referencing deleted source files
|
|
24
|
-
5. **Cross-refs**: verify Related Features links still valid
|
|
25
|
-
6. **Report** to user, wait for direction, then patch/create/remove as approved
|
|
26
|
-
7. Update manifest versions and timestamps
|
|
27
|
-
|
|
28
|
-
## Query (any documentation question)
|
|
29
|
-
|
|
30
|
-
Read manifest → match `description`/`tags` → read matching doc → answer. If no match, suggest audit.
|
|
31
|
-
|
|
32
|
-
## Doc Template
|
|
33
|
-
|
|
34
|
-
```markdown
|
|
35
|
-
# {Feature Title}
|
|
36
|
-
> {One-line description}
|
|
37
|
-
|
|
38
|
-
## Overview
|
|
39
|
-
{What it does, why it exists, system fit.}
|
|
40
|
-
|
|
41
|
-
## How It Works
|
|
42
|
-
{Core flow. Mermaid diagram(s) — max 7-9 nodes, split if larger.}
|
|
43
|
-
|
|
44
|
-
## Data Model
|
|
45
|
-
{Entities and relationships. Mermaid ER or table.}
|
|
46
|
-
|
|
47
|
-
## Key Files
|
|
48
|
-
| File | Purpose |
|
|
49
|
-
|------|---------|
|
|
50
|
-
|
|
51
|
-
## Dependencies & Integrations
|
|
52
|
-
{External services, internal features, packages.}
|
|
53
|
-
|
|
54
|
-
## Configuration
|
|
55
|
-
| Variable | Purpose | Required |
|
|
56
|
-
|----------|---------|----------|
|
|
57
|
-
|
|
58
|
-
## Error Handling
|
|
59
|
-
{Failure modes, user impact, retry logic. Mermaid if non-trivial.}
|
|
60
|
-
|
|
61
|
-
## Constraints & Decisions
|
|
62
|
-
{Why built this way. What CANNOT change without breaking things.}
|
|
63
|
-
|
|
64
|
-
## Related Features
|
|
65
|
-
{Cross-refs to other doc filenames. Blast radius.}
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
## Manifest Schema
|
|
69
|
-
|
|
70
|
-
```json
|
|
71
|
-
{
|
|
72
|
-
"project": "<name>",
|
|
73
|
-
"vdoc_version": "3.0.0",
|
|
74
|
-
"created_at": "<ISO-8601>",
|
|
75
|
-
"last_updated": "<ISO-8601>",
|
|
76
|
-
"last_commit": "<sha>",
|
|
77
|
-
"documentation": [{
|
|
78
|
-
"filepath": "FEATURE_NAME_DOC.md",
|
|
79
|
-
"title": "Title",
|
|
80
|
-
"version": "1.0.0",
|
|
81
|
-
"description": "Rich semantic description for AI routing.",
|
|
82
|
-
"tags": ["keyword-tag"]
|
|
83
|
-
}]
|
|
84
|
-
}
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## Rules
|
|
88
|
-
|
|
89
|
-
- **Feature-centric**: one doc per feature, not per file
|
|
90
|
-
- **Mermaid mandatory**: diagram flows, max 7-9 nodes
|
|
91
|
-
- **Constraints are gold**: always fill, prevents breaking changes
|
|
92
|
-
- **Rich descriptions**: manifest descriptions are semantic search indexes
|
|
93
|
-
- **No hallucination**: only document what exists in code
|
|
94
|
-
- **Plan first**: never generate without user approval
|