@sandrinio/vdoc 3.0.1 → 3.4.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.
Files changed (70) hide show
  1. package/bin/vdoc.mjs +78 -11
  2. package/package.json +1 -1
  3. package/skills/agents/AGENTS.md +17 -143
  4. package/skills/agents/references/audit-workflow.md +65 -0
  5. package/skills/agents/references/doc-template.md +67 -0
  6. package/skills/agents/references/exploration-strategies.md +341 -0
  7. package/skills/agents/references/init-workflow.md +123 -0
  8. package/skills/agents/references/manifest-schema.json +16 -0
  9. package/skills/claude/SKILL.md +14 -41
  10. package/skills/claude/references/exploration-strategies.md +341 -0
  11. package/skills/claude/references/init-workflow.md +44 -7
  12. package/skills/claude/vdoc-audit.md +80 -0
  13. package/skills/claude/vdoc-init.md +216 -0
  14. package/skills/cline/references/audit-workflow.md +65 -0
  15. package/skills/cline/references/doc-template.md +67 -0
  16. package/skills/cline/references/exploration-strategies.md +341 -0
  17. package/skills/cline/references/init-workflow.md +123 -0
  18. package/skills/cline/references/manifest-schema.json +16 -0
  19. package/skills/cline/vdoc-workflow.md +3 -13
  20. package/skills/cline/vdoc.md +10 -148
  21. package/skills/continue/references/audit-workflow.md +65 -0
  22. package/skills/continue/references/doc-template.md +67 -0
  23. package/skills/continue/references/exploration-strategies.md +341 -0
  24. package/skills/continue/references/init-workflow.md +123 -0
  25. package/skills/continue/references/manifest-schema.json +16 -0
  26. package/skills/continue/vdoc-command.md +3 -13
  27. package/skills/continue/vdoc.md +9 -147
  28. package/skills/cursor/RULE.md +68 -0
  29. package/skills/cursor/references/audit-workflow.md +65 -0
  30. package/skills/cursor/references/doc-template.md +67 -0
  31. package/skills/cursor/references/exploration-strategies.md +341 -0
  32. package/skills/cursor/references/init-workflow.md +123 -0
  33. package/skills/cursor/references/manifest-schema.json +16 -0
  34. package/skills/cursor/vdoc-command.md +3 -13
  35. package/skills/gemini/GEMINI.md +17 -143
  36. package/skills/gemini/references/audit-workflow.md +65 -0
  37. package/skills/gemini/references/doc-template.md +67 -0
  38. package/skills/gemini/references/exploration-strategies.md +341 -0
  39. package/skills/gemini/references/init-workflow.md +123 -0
  40. package/skills/gemini/references/manifest-schema.json +16 -0
  41. package/skills/gemini/vdoc.toml +3 -9
  42. package/skills/jetbrains-ai/references/audit-workflow.md +65 -0
  43. package/skills/jetbrains-ai/references/doc-template.md +67 -0
  44. package/skills/jetbrains-ai/references/exploration-strategies.md +341 -0
  45. package/skills/jetbrains-ai/references/init-workflow.md +123 -0
  46. package/skills/jetbrains-ai/references/manifest-schema.json +16 -0
  47. package/skills/jetbrains-ai/vdoc.md +17 -143
  48. package/skills/junie/guidelines.md +17 -143
  49. package/skills/junie/references/audit-workflow.md +65 -0
  50. package/skills/junie/references/doc-template.md +67 -0
  51. package/skills/junie/references/exploration-strategies.md +341 -0
  52. package/skills/junie/references/init-workflow.md +123 -0
  53. package/skills/junie/references/manifest-schema.json +16 -0
  54. package/skills/vscode/SKILL.md +39 -0
  55. package/skills/vscode/references/audit-workflow.md +65 -0
  56. package/skills/vscode/references/doc-template.md +67 -0
  57. package/skills/vscode/references/exploration-strategies.md +341 -0
  58. package/skills/vscode/references/init-workflow.md +123 -0
  59. package/skills/vscode/references/manifest-schema.json +16 -0
  60. package/skills/vscode/vdoc.instructions.md +30 -146
  61. package/skills/vscode/vdoc.prompt.md +5 -15
  62. package/skills/windsurf/SKILL.md +67 -0
  63. package/skills/windsurf/resources/audit-workflow.md +65 -0
  64. package/skills/windsurf/resources/doc-template.md +67 -0
  65. package/skills/windsurf/resources/exploration-strategies.md +341 -0
  66. package/skills/windsurf/resources/init-workflow.md +123 -0
  67. package/skills/windsurf/resources/manifest-schema.json +16 -0
  68. package/skills/windsurf/vdoc-workflow.md +3 -13
  69. package/skills/cursor/vdoc.mdc +0 -176
  70. package/skills/windsurf/vdoc.md +0 -94
@@ -1,157 +1,27 @@
1
1
  ---
2
2
  name: vdoc
3
- 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)."
3
+ description: "Use when user says /vdoc, 'document this project', 'audit docs', or asks about existing project documentation, stale docs, undocumented features, or documentation coverage gaps"
4
4
  alwaysApply: false
5
5
  globs:
6
6
  ---
7
7
 
8
8
  # vdoc — Documentation Generator
9
9
 
10
- You generate and maintain feature-centric documentation for codebases. You have three modes: **init**, **audit**, and **query**.
10
+ Three modes: **init**, **audit**, **query**. All docs live in `vdocs/`. Manifest at `vdocs/_manifest.json` is the semantic index.
11
11
 
12
- All documentation lives in `vdocs/` at the project root. The manifest at `vdocs/_manifest.json` is the semantic index you read first.
12
+ ## Init (`/vdoc init`)
13
13
 
14
- ---
15
-
16
- ## Mode 1: Init
17
-
18
- **Trigger:** User says "document this project" or similar.
19
-
20
- ### Step 1 — Explore
21
-
22
- Read the codebase thoroughly. Identify:
23
-
24
- - **Tech stack**: languages, frameworks, databases, ORMs
25
- - **Features**: authentication, API, payments, notifications, search, etc.
26
- - **Architecture**: monolith vs microservices, frontend/backend split, key patterns
27
- - **Integrations**: third-party services (Stripe, AWS, Redis, etc.)
28
- - **Entry points**: where requests come in, how they flow through the system
29
-
30
- Do not skim. Read key files — entry points, config, routes, schemas, middleware.
31
-
32
- ### Step 2 — Plan
33
-
34
- 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.
35
-
36
- ### Step 3 — Generate
37
-
38
- For each approved doc, read ALL relevant source files and generate using this template:
39
-
40
- ```markdown
41
- # {Feature Title}
42
-
43
- > {One-line description}
44
-
45
- ---
46
-
47
- ## Overview
48
- {What it does, why it exists, how it fits in the system.}
49
-
50
- ---
51
-
52
- ## How It Works
53
- {Core logic and flow.}
54
- {Mermaid diagram(s) — max 7-9 nodes per diagram, split if larger.}
55
-
56
- ---
57
-
58
- ## Data Model
59
- {Entities this feature owns. Mermaid ER diagram or table.}
60
-
61
- ---
62
-
63
- ## Key Files
64
- | File | Purpose |
65
- |------|---------|
66
- | `src/path/file.ts` | What this file does |
67
-
68
- ---
69
-
70
- ## Dependencies & Integrations
71
- {External services, internal features, packages this relies on.}
72
-
73
- ---
14
+ Read the detailed workflow at `.continue/references/vdoc/init-workflow.md`.
74
15
 
75
- ## Configuration
76
- | Variable | Purpose | Required |
77
- |----------|---------|----------|
78
- | `ENV_VAR` | What it controls | Yes/No |
16
+ Summary: Explore codebase → Plan docs → User approves → Generate using template → Build manifest → Self-review.
79
17
 
80
- ---
81
-
82
- ## Error Handling
83
- {Failure modes, what the user sees, retry logic. Mermaid diagram if non-trivial.}
84
-
85
- ---
86
-
87
- ## Constraints & Decisions
88
- {Why it's built this way. What you CANNOT change without breaking things.}
89
-
90
- ---
91
-
92
- ## Related Features
93
- {Cross-references to other docs by filename. Blast radius notes.}
94
-
95
- ---
96
-
97
- *Generated by vdoc v3.0.0 • Last updated: {timestamp}*
98
- ```
99
-
100
- **Writing rules:**
101
-
102
- - **Mermaid diagrams are mandatory** in "How It Works". Max 7-9 nodes — split larger flows.
103
- - **Data Model** must show real entities from the code, not placeholders.
104
- - **Constraints & Decisions** is the most valuable section. Dig for non-obvious choices. If unclear, write: `Reason: unknown — verify with team`.
105
- - **Related Features** must reference other doc filenames and explain coupling.
106
- - **Configuration** must list actual env vars from the code.
107
- - **Error Handling** — trace what happens when things fail.
108
-
109
- ### Step 4 — Manifest
110
-
111
- Create `vdocs/_manifest.json`:
18
+ ## Audit (`/vdoc audit`)
112
19
 
113
- ```json
114
- {
115
- "project": "<project-name>",
116
- "vdoc_version": "3.0.0",
117
- "created_at": "<ISO-8601>",
118
- "last_updated": "<ISO-8601>",
119
- "last_commit": "<short-sha>",
120
- "documentation": [
121
- {
122
- "filepath": "FEATURE_NAME_DOC.md",
123
- "title": "Human-Readable Title",
124
- "version": "1.0.0",
125
- "description": "Rich semantic description with technology names, patterns, concepts. Detailed enough for AI to route questions to this doc.",
126
- "tags": ["keyword-tag"]
127
- }
128
- ]
129
- }
130
- ```
20
+ Read the detailed workflow at `.continue/references/vdoc/audit-workflow.md`.
131
21
 
132
- ### Step 5 Self-Review
22
+ Summary: Read manifest Detect stale/gaps/dead docs → Check cross-refs → Report → Patch with approval.
133
23
 
134
- Verify: every doc has mermaid diagrams, at least 2 constraints, real file paths, actual env vars, cross-references. Manifest descriptions are detailed for semantic routing. No hallucinated content.
135
-
136
- ---
137
-
138
- ## Mode 2: Audit
139
-
140
- **Trigger:** User says "audit docs" or similar.
141
-
142
- 1. **Read manifest** — load `vdocs/_manifest.json`
143
- 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.
144
- 3. **Detect gaps** — scan codebase for significant source files not covered by any doc (new routes, services, models, config).
145
- 4. **Detect dead docs** — check each doc's "Key Files" against filesystem. Flag docs referencing deleted files.
146
- 5. **Check cross-refs** — verify "Related Features" links still exist and coupling is accurate.
147
- 6. **Report** — present stale, gaps, dead, cross-ref issues, and current docs. Wait for user direction.
148
- 7. **Patch** — update stale docs, generate new docs for gaps, flag dead docs, fix cross-refs. Update manifest.
149
-
150
- ---
151
-
152
- ## Mode 3: Query
153
-
154
- **Trigger:** User asks any question about the codebase or documentation.
24
+ ## Query (any documentation question)
155
25
 
156
26
  1. Read `vdocs/_manifest.json`
157
27
  2. Match question against `description` and `tags` fields
@@ -159,14 +29,6 @@ Verify: every doc has mermaid diagrams, at least 2 constraints, real file paths,
159
29
  4. Answer from documented knowledge
160
30
  5. If no match, suggest running an audit
161
31
 
162
- ---
163
-
164
- ## Naming Convention
165
-
166
- Files: `FEATURE_NAME_DOC.md` — uppercase, feature-named, `_DOC` suffix.
167
-
168
- ---
169
-
170
32
  ## Rules
171
33
 
172
34
  1. **Feature-centric, not file-centric.** One doc per logical feature, not per source file.
@@ -0,0 +1,68 @@
1
+ ---
2
+ description: "Use when user says /vdoc, 'document this project', 'audit docs', or asks questions about existing project documentation, stale docs, undocumented features, or documentation coverage gaps"
3
+ globs:
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # vdoc — Documentation Generator
8
+
9
+ ## Overview
10
+
11
+ Documentation must be feature-centric, plan-approved, and grounded in source code. Never generate docs from assumptions.
12
+
13
+ ## When to Use
14
+ - User says `/vdoc`, "document this project", "audit docs", or asks about documentation
15
+ - Docs are stale, missing, or out of sync with code (documentation drift, undocumented features, coverage gaps)
16
+ - After significant feature work that changed codebase behavior
17
+
18
+ ## When NOT to Use
19
+ - API reference docs (use JSDoc/TSDoc)
20
+ - README files or contribution guides
21
+ - Inline code comments
22
+
23
+ ---
24
+
25
+ Three modes: **init**, **audit**, **query**. All docs live in `vdocs/`. Manifest at `vdocs/_manifest.json` is the semantic index.
26
+
27
+ ## Init (`/vdoc init`)
28
+
29
+ Read the detailed workflow at `.cursor/rules/vdoc/references/init-workflow.md`.
30
+
31
+ Summary: Explore codebase → Plan docs → User approves → Generate using template → Build manifest → Self-review.
32
+
33
+ ## Audit (`/vdoc audit`)
34
+
35
+ Read the detailed workflow at `.cursor/rules/vdoc/references/audit-workflow.md`.
36
+
37
+ Summary: Read manifest → Detect stale/gaps/dead docs → Check cross-refs → Report → Patch with approval.
38
+
39
+ ## Query (any documentation question)
40
+
41
+ 1. Read `vdocs/_manifest.json`
42
+ 2. Match question against `description` and `tags` fields
43
+ 3. Read matching doc(s)
44
+ 4. Answer from documented knowledge
45
+ 5. If no match, suggest running an audit
46
+
47
+ ## Rules
48
+
49
+ 1. **Feature-centric, not file-centric.** One doc per logical feature, not per source file.
50
+ 2. **Mermaid over prose.** Diagram flows. Max 7-9 nodes per diagram.
51
+ 3. **Constraints are gold.** Always fill "Constraints & Decisions".
52
+ 4. **Rich manifest descriptions.** Pack with specific terms for semantic routing.
53
+ 5. **No hallucination.** Only document what exists in code.
54
+ 6. **Plan first, always.** Never generate without user-approved plan.
55
+
56
+ ## Common Mistakes
57
+ - **File-centric instead of feature-centric** — Don't create one doc per source file. Group by logical feature.
58
+ - **Documenting aspirations** — Only document what the code actually does today, not planned work.
59
+ - **Skipping the plan** — Generating without user approval leads to rework and coverage gaps.
60
+ - **Oversized diagrams** — Keep Mermaid to 7-9 nodes; split if larger.
61
+ - **Shallow constraints** — "Constraints & Decisions" is the most valuable section. Dig for non-obvious choices.
62
+
63
+ ## Red Flags — STOP
64
+ - Generating docs without an approved plan
65
+ - Documenting something you haven't verified in source code
66
+ - Creating one doc per file instead of per feature
67
+ - Skipping Mermaid diagrams in "How It Works"
68
+ - Writing manifest descriptions too vague for semantic routing
@@ -0,0 +1,65 @@
1
+ # Audit Workflow
2
+
3
+ ## Step 1 — Read Current State
4
+
5
+ Read `vdocs/_manifest.json`. Load the list of documented features and their metadata.
6
+
7
+ ## Step 2 — Detect Stale Docs
8
+
9
+ Run `git log --name-only --since="<last_updated>" --pretty=format:""` or use `git diff` to find all source files that changed since the last audit.
10
+
11
+ Cross-reference changed files against each doc's "Key Files" section to identify which docs are stale.
12
+
13
+ ## Step 3 — Detect Coverage Gaps
14
+
15
+ Scan the codebase for significant features not covered by any doc. Look for:
16
+ - New route files / API endpoints
17
+ - New service classes or modules
18
+ - New database models / schema changes
19
+ - New configuration or infrastructure files
20
+
21
+ If you find undocumented features, propose new docs.
22
+
23
+ ## Step 4 — Detect Dead Docs
24
+
25
+ Check each doc's "Key Files" section against the actual filesystem. If key files no longer exist, the doc may be dead. Flag it: "PAYMENT_PROCESSING_DOC.md references 3 files that no longer exist — remove or archive?"
26
+
27
+ ## Step 5 — Check Cross-References
28
+
29
+ Read each doc's "Related Features" section. Verify that:
30
+ - Referenced doc filenames still exist
31
+ - The described coupling is still accurate (skim the relevant code)
32
+
33
+ ## Step 6 — Report
34
+
35
+ Present a clear report:
36
+
37
+ ```
38
+ Audit Results:
39
+
40
+ STALE (source files changed):
41
+ - AUTHENTICATION_DOC.md — src/lib/auth.ts changed (added GitHub provider)
42
+ - API_REFERENCE_DOC.md — 2 new endpoints added
43
+
44
+ COVERAGE GAPS (undocumented features):
45
+ - src/services/notification.ts — no doc covers notifications
46
+
47
+ DEAD DOCS (source files removed):
48
+ - LEGACY_ADMIN_DOC.md — all 4 source files deleted
49
+
50
+ CROSS-REF ISSUES:
51
+ - AUTHENTICATION_DOC.md references BILLING_DOC.md which no longer exists
52
+
53
+ CURRENT (no changes needed):
54
+ - DATABASE_SCHEMA_DOC.md
55
+ - PROJECT_OVERVIEW_DOC.md
56
+
57
+ Proceed with fixes?
58
+ ```
59
+
60
+ Wait for user direction, then:
61
+ - Patch stale docs (re-read source files, update affected sections only)
62
+ - Generate new docs for coverage gaps (follow init workflow for each)
63
+ - Flag dead docs for user to confirm deletion
64
+ - Fix cross-reference issues
65
+ - Update manifest: bump versions, update `last_updated`, `last_commit`
@@ -0,0 +1,67 @@
1
+ # {Feature Title}
2
+
3
+ > {One-line description of what this covers}
4
+
5
+ ---
6
+
7
+ ## Overview
8
+
9
+ {What it does, why it exists, how it fits in the system.}
10
+
11
+ ---
12
+
13
+ ## How It Works
14
+
15
+ {Core logic and flow.}
16
+
17
+ {Mermaid diagram(s) — max 7-9 nodes per diagram, split into multiple if larger.}
18
+
19
+ ---
20
+
21
+ ## Data Model
22
+
23
+ {Entities this feature owns and their relationships. Mermaid ER diagram or table.}
24
+
25
+ ---
26
+
27
+ ## Key Files
28
+
29
+ | File | Purpose |
30
+ |------|---------|
31
+ | `src/path/file.ts` | What this file does |
32
+
33
+ ---
34
+
35
+ ## Dependencies & Integrations
36
+
37
+ {External services, internal features, packages this relies on.}
38
+
39
+ ---
40
+
41
+ ## Configuration
42
+
43
+ | Variable | Purpose | Required |
44
+ |----------|---------|----------|
45
+ | `ENV_VAR` | What it controls | Yes/No |
46
+
47
+ ---
48
+
49
+ ## Error Handling
50
+
51
+ {Failure modes, what the user sees, retry logic. Mermaid diagram if the error flow is non-trivial.}
52
+
53
+ ---
54
+
55
+ ## Constraints & Decisions
56
+
57
+ {Why it's built this way. What you CANNOT change without breaking things.}
58
+
59
+ ---
60
+
61
+ ## Related Features
62
+
63
+ {Cross-references to other docs by filename. Blast radius — what breaks if this changes.}
64
+
65
+ ---
66
+
67
+ *Generated by vdoc v3.0.0 • Last updated: {timestamp}*