@sandrinio/vdoc 3.6.0 → 3.6.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 CHANGED
@@ -8,7 +8,7 @@ One install command. Your AI handles the rest.
8
8
 
9
9
  ## What is vdoc?
10
10
 
11
- vdoc teaches your AI coding agent how to create and maintain feature-centric documentation for your codebase. It's not a CLI you run — it's a skill file that gets installed into your AI platform. After install, you just talk to your AI.
11
+ vdoc gives your AI coding agent the ability to create and maintain feature-centric documentation for your codebase. It's not a CLI you run — it's a skill file that gets installed into your AI platform. After install, you just talk to your AI.
12
12
 
13
13
  ```
14
14
  /vdoc-init → AI explores codebase → proposes plan → you approve → generates docs
@@ -21,10 +21,10 @@ vdoc teaches your AI coding agent how to create and maintain feature-centric doc
21
21
  ## Quick Start
22
22
 
23
23
  ```bash
24
- npx @sandrinio/vdoc install cursor
24
+ npx @sandrinio/vdoc install claude
25
25
  ```
26
26
 
27
- Then open Cursor and type: **`/vdoc init`**
27
+ Then type: **`/vdoc-init`**
28
28
 
29
29
  ---
30
30
 
@@ -165,7 +165,9 @@ Every generated doc follows a consistent structure:
165
165
 
166
166
  ## Manifest
167
167
 
168
- The `_manifest.json` acts as a semantic index. Each entry has a rich `description` field that AI uses to route queries to the right doc:
168
+ The `_manifest.json` is a map for your AI. Instead of reading every doc to find the right one, the AI reads the manifest first and picks the relevant doc based on rich descriptions and tags.
169
+
170
+ When you ask "how does authentication work?", the AI matches your question against manifest descriptions and goes straight to `AUTHENTICATION_DOC.md` — no scanning, no guessing.
169
171
 
170
172
  ```json
171
173
  {
package/bin/vdoc.mjs CHANGED
@@ -13,13 +13,13 @@ const CWD = process.cwd();
13
13
  const PLATFORMS = {
14
14
  claude: {
15
15
  files: [
16
- { src: 'claude/vdoc-init.md', dest: '.claude/skills/vdoc-init/SKILL.md' },
17
- { src: 'claude/vdoc-update.md', dest: '.claude/skills/vdoc-update/SKILL.md' },
18
- { src: 'claude/vdoc-audit.md', dest: '.claude/skills/vdoc-audit/SKILL.md' },
19
- { src: 'claude/vdoc-create.md', dest: '.claude/skills/vdoc-create/SKILL.md' },
20
- { src: 'claude/references/exploration-strategies.md', dest: '.claude/skills/vdoc-init/references/exploration-strategies.md' },
21
- { src: 'claude/references/doc-template.md', dest: '.claude/skills/vdoc-config/references/doc-template.md' },
22
- { src: 'claude/references/manifest-schema.json', dest: '.claude/skills/vdoc-config/references/manifest-schema.json' },
16
+ { src: 'claude/SKILL.md', dest: '.claude/skills/vdoc/SKILL.md' },
17
+ { src: 'claude/references/init-workflow.md', dest: '.claude/skills/vdoc/references/init-workflow.md' },
18
+ { src: 'claude/references/create-workflow.md', dest: '.claude/skills/vdoc/references/create-workflow.md' },
19
+ { src: 'claude/references/audit-workflow.md', dest: '.claude/skills/vdoc/references/audit-workflow.md' },
20
+ { src: 'claude/references/exploration-strategies.md', dest: '.claude/skills/vdoc/references/exploration-strategies.md' },
21
+ { src: 'claude/references/doc-template.md', dest: '.claude/skills/vdoc/references/doc-template.md' },
22
+ { src: 'claude/references/manifest-schema.json', dest: '.claude/skills/vdoc/references/manifest-schema.json' },
23
23
  ],
24
24
  },
25
25
  cursor: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sandrinio/vdoc",
3
- "version": "3.6.0",
3
+ "version": "3.6.1",
4
4
  "description": "Documentation skills for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: vdoc
3
+ description: "Generate and maintain feature-centric documentation from source code. Use when user says 'document this project', 'generate docs', 'create a doc for [feature]', 'update docs', 'audit docs', 'sync docs', or asks about documentation coverage and freshness."
4
+ ---
5
+
6
+ # vdoc — Documentation Generator
7
+
8
+ Four modes: **init**, **create**, **update**, **audit**, plus **query** for any documentation question. All docs live in `vdocs/`. Manifest at `vdocs/_manifest.json` is the semantic index.
9
+
10
+ Do NOT create scripts, shell files, scanners, or any tooling — use your built-in tools (Read, Glob, Grep) for everything.
11
+
12
+ ## Init
13
+
14
+ Read the detailed workflow at [init-workflow.md](./references/init-workflow.md).
15
+
16
+ Summary: Explore codebase → Write exploration log → Plan docs → User approves → Generate one-at-a-time using [doc template](./references/doc-template.md) → Build manifest per [schema](./references/manifest-schema.json) → Self-review.
17
+
18
+ ## Create
19
+
20
+ Read the detailed workflow at [create-workflow.md](./references/create-workflow.md).
21
+
22
+ Summary: Locate feature in codebase → Generate one doc using [doc template](./references/doc-template.md) → Update manifest per [schema](./references/manifest-schema.json) → Self-review.
23
+
24
+ ## Update / Audit
25
+
26
+ Read the detailed workflow at [audit-workflow.md](./references/audit-workflow.md).
27
+
28
+ Summary: Read manifest → Detect stale/gaps/dead docs → Check cross-refs → Report → Patch with approval.
29
+
30
+ ## Query (any documentation question)
31
+
32
+ 1. Read `vdocs/_manifest.json`
33
+ 2. Match question against `description` and `tags` fields
34
+ 3. Read matching doc(s)
35
+ 4. Answer from documented knowledge
36
+ 5. If no match, suggest running an audit
37
+
38
+ ## Rules
39
+
40
+ 1. **Feature-centric, not file-centric.** One doc per logical feature, not per source file.
41
+ 2. **Mermaid over prose.** Diagram flows. Max 7-9 nodes per diagram.
42
+ 3. **Constraints are gold.** Always fill "Constraints & Decisions".
43
+ 4. **Rich manifest descriptions.** Pack with specific terms for semantic routing.
44
+ 5. **No hallucination.** Only document what exists in code.
45
+ 6. **Plan first, always.** Never generate without user-approved plan.
46
+ 7. **No scripts.** Do NOT create shell scripts, scanners, or build tools.
@@ -1,14 +1,7 @@
1
- ---
2
- name: vdoc-update
3
- description: "Update existing vdocs to match current code. Use when user says 'update docs', 'sync docs', 'check docs', or documentation may be out of sync with code."
4
- ---
5
-
6
- # vdoc update — Documentation Update
1
+ # Audit Workflow
7
2
 
8
3
  Detect stale, missing, and dead documentation. Report and patch. Do NOT create scripts, shell files, scanners, or any tooling — use your built-in tools (Read, Glob, Grep, Bash for git commands) for everything.
9
4
 
10
- ---
11
-
12
5
  ## Step 1 — Read Current State
13
6
 
14
7
  Read `vdocs/_manifest.json`. Load the list of documented features and their metadata.
@@ -44,7 +37,7 @@ Read each doc's "Related Features" section. Verify that:
44
37
  Present a clear report:
45
38
 
46
39
  ```
47
- Update Report:
40
+ Audit Results:
48
41
 
49
42
  STALE (source files changed):
50
43
  - AUTHENTICATION_DOC.md — src/lib/auth.ts changed (added GitHub provider)
@@ -66,15 +59,9 @@ CURRENT (no changes needed):
66
59
  Proceed with fixes?
67
60
  ```
68
61
 
69
- **Wait for user direction**, then:
62
+ Wait for user direction, then:
70
63
  - Patch stale docs (re-read source files, update affected sections only)
71
- - Generate new docs for coverage gaps (use `/vdoc-create` for each)
64
+ - Generate new docs for coverage gaps (follow create workflow for each)
72
65
  - Flag dead docs for user to confirm deletion
73
66
  - Fix cross-reference issues
74
67
  - Update manifest: bump versions, update `last_updated`, `last_commit`
75
-
76
- ## Rules
77
-
78
- 1. **No scripts.** Do NOT create shell scripts, scanners, or build tools. Use Read/Glob/Grep/Bash(git).
79
- 2. **Report before patching.** Always present findings and wait for user direction.
80
- 3. **No hallucination.** Only report what you verified in the code and filesystem.
@@ -1,20 +1,12 @@
1
- ---
2
- name: vdoc-create
3
- description: "Create a single feature doc on demand. Use when user says 'document the auth system', 'create a doc for payments', or wants to add one specific doc to vdocs/."
4
- argument-hint: "<feature description>"
5
- ---
6
-
7
- # vdoc create — Single Doc Generator
1
+ # Create Workflow
8
2
 
9
3
  Create one feature doc based on the user's description. Do NOT create scripts, shell files, scanners, or any tooling — use your built-in tools (Read, Glob, Grep) for everything.
10
4
 
11
- ---
12
-
13
5
  ## Step 1 — Locate
14
6
 
15
7
  Use the user's description to find the relevant source files:
16
8
 
17
- 1. If `.claude/skills/vdoc-config/_exploration_log.md` exists, read it first — it maps the codebase and may already have the feature signal you need
9
+ 1. If `vdocs/_exploration_log.md` exists, read it first — it maps the codebase and may already have the feature signal you need
18
10
  2. Otherwise, search the codebase with Glob and Grep to find files matching the user's description
19
11
  3. Read ALL relevant source files — not just the main file, but helpers, types, middleware, tests, API routes, components
20
12
 
@@ -22,10 +14,10 @@ Do not skim. Understand how the feature actually works before writing.
22
14
 
23
15
  ## Step 2 — Generate
24
16
 
25
- 1. Read the template from `.claude/skills/vdoc-config/references/doc-template.md` and follow it exactly
17
+ 1. Read the template from [doc-template.md](./doc-template.md) and follow it exactly
26
18
  2. Write to `vdocs/FEATURE_NAME_DOC.md`
27
19
 
28
- ### Writing Rules
20
+ **Writing rules:**
29
21
 
30
22
  - **Mermaid diagrams are mandatory** in "How It Works". Show the actual flow — request lifecycle, state transitions, data pipeline. If a flow has more than 7-9 nodes, split into multiple diagrams.
31
23
  - **Data Model** must show real entities from the code, not generic placeholders. Use mermaid ER diagrams for relational data, tables for simpler models.
@@ -36,7 +28,7 @@ Do not skim. Understand how the feature actually works before writing.
36
28
 
37
29
  ## Step 3 — Update Manifest
38
30
 
39
- Read `vdocs/_manifest.json` and add the new doc entry using the schema in `.claude/skills/vdoc-config/references/manifest-schema.json`.
31
+ Read `vdocs/_manifest.json` and add the new doc entry using the schema in [manifest-schema.json](./manifest-schema.json).
40
32
 
41
33
  If `vdocs/_manifest.json` doesn't exist, create it with the project name, version, and this doc as the first entry.
42
34
 
@@ -51,9 +43,3 @@ Before finishing, verify:
51
43
  - [ ] "Related Features" references other doc filenames (if other docs exist)
52
44
  - [ ] Manifest `description` is detailed enough for semantic routing
53
45
  - [ ] Doc explains WHY and HOW, not just WHAT
54
-
55
- ## Rules
56
-
57
- 1. **Feature-centric, not file-centric.** The doc covers one logical feature, not one source file.
58
- 2. **No hallucination.** Only document what exists in code.
59
- 3. **No scripts.** Do NOT create shell scripts, scanners, or build tools. Use Read/Glob/Grep.
@@ -1,13 +1,4 @@
1
- ---
2
- name: vdoc-init
3
- description: "Generate feature-centric documentation from source code. Use when user says 'document this project', 'generate docs', or wants to create vdocs from scratch."
4
- ---
5
-
6
- # vdoc init — Generate Documentation
7
-
8
- Generate feature-centric documentation from source code. All docs go in `vdocs/`. Do NOT create scripts, shell files, scanners, or any tooling — use your built-in tools (Read, Glob, Grep) for everything.
9
-
10
- ---
1
+ # Init Workflow
11
2
 
12
3
  ## Step 1 — Explore
13
4
 
@@ -23,8 +14,10 @@ If no archetype matches, use the Fallback strategy and confirm with the user.
23
14
 
24
15
  Do not skim. Understand how the system actually works before proposing docs.
25
16
 
17
+ **Important:** Use your built-in tools (Read, Glob, Grep) to explore. Do NOT create scanner scripts, shell scripts, or any tooling. vdoc is purely AI-driven — no scripts, no build steps, no infrastructure.
18
+
26
19
  **Phase 3 — Write Exploration Log**
27
- After exploring, write `.claude/skills/vdoc-config/_exploration_log.md` documenting what you found:
20
+ After exploring, write `vdocs/_exploration_log.md` documenting what you found:
28
21
 
29
22
  ```markdown
30
23
  # Exploration Log
@@ -58,7 +51,7 @@ This log is your working memory. It feeds directly into Step 2 (Plan).
58
51
 
59
52
  ## Step 2 — Plan
60
53
 
61
- Write `.claude/skills/vdoc-config/_DOCUMENTATION_PLAN.md` to disk AND present it to the user in the same step. The file must be persisted — do not just show it in chat.
54
+ Write `vdocs/_DOCUMENTATION_PLAN.md` to disk AND present it to the user in the same step. The file must be persisted — do not just show it in chat.
62
55
 
63
56
  Use this format:
64
57
 
@@ -82,11 +75,11 @@ After writing the file, present the plan to the user. Actively suggest changes:
82
75
  - "I found a websocket system — want that documented separately?"
83
76
  - "Any internal/legacy systems I should skip?"
84
77
 
85
- **Wait for user approval before proceeding.**
78
+ Wait for user approval before proceeding.
86
79
 
87
80
  ## Step 3 — Generate
88
81
 
89
- Read the template from `.claude/skills/vdoc-config/references/doc-template.md` once before starting.
82
+ Read the template from [doc-template.md](./doc-template.md) once before starting.
90
83
 
91
84
  Then generate docs **one at a time, sequentially**. For each approved doc:
92
85
 
@@ -96,20 +89,32 @@ Then generate docs **one at a time, sequentially**. For each approved doc:
96
89
 
97
90
  Do NOT attempt to generate multiple docs from memory. Each doc is a fresh cycle: read sources → write doc → next.
98
91
 
99
- ### Writing Rules
92
+ **Writing rules:**
100
93
 
101
94
  - **Mermaid diagrams are mandatory** in "How It Works". Show the actual flow — request lifecycle, state transitions, data pipeline. If a flow has more than 7-9 nodes, split into multiple diagrams.
102
95
  - **Data Model** must show real entities from the code, not generic placeholders. Use mermaid ER diagrams for relational data, tables for simpler models.
103
96
  - **Constraints & Decisions** is the most valuable section. Dig into the code for non-obvious choices: "Uses polling instead of websockets because...", "Auth tokens expire in 15min because...". If you can't find the reason, state the constraint and mark it: `Reason: unknown — verify with team`.
104
- - **Related Features** must reference other docs by filename and explain the coupling.
97
+ - **Related Features** must reference other docs by filename and explain the coupling: "Changes to the JWT schema will require updates to API_REFERENCE_DOC.md (auth middleware affects all endpoints)."
105
98
  - **Configuration** must list actual env vars/secrets from the code, not hypothetical ones.
106
99
  - **Error Handling** — trace what happens when things fail. What does the user see? What gets logged? Is there retry logic?
107
100
 
108
101
  ## Step 4 — Manifest
109
102
 
110
- Create `vdocs/_manifest.json` using the schema in `.claude/skills/vdoc-config/references/manifest-schema.json`.
103
+ Create `vdocs/_manifest.json` using the schema in [manifest-schema.json](./manifest-schema.json).
104
+
105
+ The `description` field is critical — write it rich enough that you can route any user question to the right doc by matching against descriptions. Include specific technology names, patterns, and concepts.
111
106
 
112
- The `description` field is critical — write it rich enough that you can route any user question to the right doc by matching against descriptions.
107
+ Example:
108
+
109
+ ```json
110
+ {
111
+ "filepath": "AUTHENTICATION_DOC.md",
112
+ "title": "Authentication - OAuth2 & JWT",
113
+ "version": "1.0.0",
114
+ "description": "OAuth2 flow with Google/GitHub providers, JWT token lifecycle, session management via NextAuth.js, route protection middleware, and role-based access control.",
115
+ "tags": ["oauth2", "jwt", "session-management", "rbac"]
116
+ }
117
+ ```
113
118
 
114
119
  ## Step 5 — Self-Review
115
120
 
@@ -122,10 +127,3 @@ Before finishing, verify:
122
127
  - [ ] Every doc's "Related Features" references other doc filenames
123
128
  - [ ] Manifest `description` is detailed enough for semantic routing
124
129
  - [ ] No doc is just a shallow restatement of file names — each explains WHY and HOW
125
-
126
- ## Rules
127
-
128
- 1. **Feature-centric, not file-centric.** One doc per logical feature, not per source file.
129
- 2. **No hallucination.** Only document what exists in code.
130
- 3. **No scripts.** Do NOT create shell scripts, scanners, or build tools. Use Read/Glob/Grep.
131
- 4. **Plan first.** Never generate without user-approved plan.
@@ -1,80 +0,0 @@
1
- ---
2
- name: vdoc-audit
3
- description: "Audit existing vdocs for stale, missing, or dead documentation. Use when user says 'audit docs', 'check docs', or documentation may be out of sync with code."
4
- ---
5
-
6
- # vdoc audit — Documentation Audit
7
-
8
- Detect stale, missing, and dead documentation. Report and patch. Do NOT create scripts, shell files, scanners, or any tooling — use your built-in tools (Read, Glob, Grep, Bash for git commands) for everything.
9
-
10
- ---
11
-
12
- ## Step 1 — Read Current State
13
-
14
- Read `vdocs/_manifest.json`. Load the list of documented features and their metadata.
15
-
16
- ## Step 2 — Detect Stale Docs
17
-
18
- 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.
19
-
20
- Cross-reference changed files against each doc's "Key Files" section to identify which docs are stale.
21
-
22
- ## Step 3 — Detect Coverage Gaps
23
-
24
- Scan the codebase for significant features not covered by any doc. Look for:
25
- - New route files / API endpoints
26
- - New service classes or modules
27
- - New database models / schema changes
28
- - New configuration or infrastructure files
29
-
30
- If you find undocumented features, propose new docs.
31
-
32
- ## Step 4 — Detect Dead Docs
33
-
34
- 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?"
35
-
36
- ## Step 5 — Check Cross-References
37
-
38
- Read each doc's "Related Features" section. Verify that:
39
- - Referenced doc filenames still exist
40
- - The described coupling is still accurate (skim the relevant code)
41
-
42
- ## Step 6 — Report
43
-
44
- Present a clear report:
45
-
46
- ```
47
- Audit Report:
48
-
49
- STALE (source files changed):
50
- - AUTHENTICATION_DOC.md — src/lib/auth.ts changed (added GitHub provider)
51
- - API_REFERENCE_DOC.md — 2 new endpoints added
52
-
53
- COVERAGE GAPS (undocumented features):
54
- - src/services/notification.ts — no doc covers notifications
55
-
56
- DEAD DOCS (source files removed):
57
- - LEGACY_ADMIN_DOC.md — all 4 source files deleted
58
-
59
- CROSS-REF ISSUES:
60
- - AUTHENTICATION_DOC.md references BILLING_DOC.md which no longer exists
61
-
62
- CURRENT (no changes needed):
63
- - DATABASE_SCHEMA_DOC.md
64
- - PROJECT_OVERVIEW_DOC.md
65
-
66
- Proceed with fixes?
67
- ```
68
-
69
- **Wait for user direction**, then:
70
- - Patch stale docs (re-read source files, update affected sections only)
71
- - Generate new docs for coverage gaps (use `/vdoc-create` for each)
72
- - Flag dead docs for user to confirm deletion
73
- - Fix cross-reference issues
74
- - Update manifest: bump versions, update `last_updated`, `last_commit`
75
-
76
- ## Rules
77
-
78
- 1. **No scripts.** Do NOT create shell scripts, scanners, or build tools. Use Read/Glob/Grep/Bash(git).
79
- 2. **Report before patching.** Always present findings and wait for user direction.
80
- 3. **No hallucination.** Only report what you verified in the code and filesystem.