@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.
Files changed (72) hide show
  1. package/README.md +13 -13
  2. package/bin/vdoc.mjs +78 -9
  3. package/package.json +1 -1
  4. package/skills/agents/AGENTS.md +17 -143
  5. package/skills/agents/references/audit-workflow.md +65 -0
  6. package/skills/agents/references/doc-template.md +67 -0
  7. package/skills/agents/references/exploration-strategies.md +289 -0
  8. package/skills/agents/references/init-workflow.md +123 -0
  9. package/skills/agents/references/manifest-schema.json +16 -0
  10. package/skills/claude/SKILL.md +14 -198
  11. package/skills/claude/references/audit-workflow.md +65 -0
  12. package/skills/claude/references/exploration-strategies.md +289 -0
  13. package/skills/claude/references/init-workflow.md +123 -0
  14. package/skills/claude/vdoc-audit.md +80 -0
  15. package/skills/claude/vdoc-init.md +216 -0
  16. package/skills/cline/references/audit-workflow.md +65 -0
  17. package/skills/cline/references/doc-template.md +67 -0
  18. package/skills/cline/references/exploration-strategies.md +289 -0
  19. package/skills/cline/references/init-workflow.md +123 -0
  20. package/skills/cline/references/manifest-schema.json +16 -0
  21. package/skills/cline/vdoc-workflow.md +3 -13
  22. package/skills/cline/vdoc.md +10 -148
  23. package/skills/continue/references/audit-workflow.md +65 -0
  24. package/skills/continue/references/doc-template.md +67 -0
  25. package/skills/continue/references/exploration-strategies.md +289 -0
  26. package/skills/continue/references/init-workflow.md +123 -0
  27. package/skills/continue/references/manifest-schema.json +16 -0
  28. package/skills/continue/vdoc-command.md +3 -13
  29. package/skills/continue/vdoc.md +9 -147
  30. package/skills/cursor/RULE.md +68 -0
  31. package/skills/cursor/references/audit-workflow.md +65 -0
  32. package/skills/cursor/references/doc-template.md +67 -0
  33. package/skills/cursor/references/exploration-strategies.md +289 -0
  34. package/skills/cursor/references/init-workflow.md +123 -0
  35. package/skills/cursor/references/manifest-schema.json +16 -0
  36. package/skills/cursor/vdoc-command.md +3 -13
  37. package/skills/gemini/GEMINI.md +17 -143
  38. package/skills/gemini/references/audit-workflow.md +65 -0
  39. package/skills/gemini/references/doc-template.md +67 -0
  40. package/skills/gemini/references/exploration-strategies.md +289 -0
  41. package/skills/gemini/references/init-workflow.md +123 -0
  42. package/skills/gemini/references/manifest-schema.json +16 -0
  43. package/skills/gemini/vdoc.toml +3 -9
  44. package/skills/jetbrains-ai/references/audit-workflow.md +65 -0
  45. package/skills/jetbrains-ai/references/doc-template.md +67 -0
  46. package/skills/jetbrains-ai/references/exploration-strategies.md +289 -0
  47. package/skills/jetbrains-ai/references/init-workflow.md +123 -0
  48. package/skills/jetbrains-ai/references/manifest-schema.json +16 -0
  49. package/skills/jetbrains-ai/vdoc.md +17 -143
  50. package/skills/junie/guidelines.md +17 -143
  51. package/skills/junie/references/audit-workflow.md +65 -0
  52. package/skills/junie/references/doc-template.md +67 -0
  53. package/skills/junie/references/exploration-strategies.md +289 -0
  54. package/skills/junie/references/init-workflow.md +123 -0
  55. package/skills/junie/references/manifest-schema.json +16 -0
  56. package/skills/vscode/SKILL.md +39 -0
  57. package/skills/vscode/references/audit-workflow.md +65 -0
  58. package/skills/vscode/references/doc-template.md +67 -0
  59. package/skills/vscode/references/exploration-strategies.md +289 -0
  60. package/skills/vscode/references/init-workflow.md +123 -0
  61. package/skills/vscode/references/manifest-schema.json +16 -0
  62. package/skills/vscode/vdoc.instructions.md +30 -146
  63. package/skills/vscode/vdoc.prompt.md +5 -15
  64. package/skills/windsurf/SKILL.md +67 -0
  65. package/skills/windsurf/resources/audit-workflow.md +65 -0
  66. package/skills/windsurf/resources/doc-template.md +67 -0
  67. package/skills/windsurf/resources/exploration-strategies.md +289 -0
  68. package/skills/windsurf/resources/init-workflow.md +123 -0
  69. package/skills/windsurf/resources/manifest-schema.json +16 -0
  70. package/skills/windsurf/vdoc-workflow.md +3 -13
  71. package/skills/cursor/vdoc.mdc +0 -176
  72. package/skills/windsurf/vdoc.md +0 -94
package/README.md CHANGED
@@ -21,7 +21,7 @@ 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 vdoc install cursor
24
+ npx @sandrinio/vdoc install cursor
25
25
  ```
26
26
 
27
27
  Then open Cursor and type: **`/vdoc init`**
@@ -32,16 +32,16 @@ Then open Cursor and type: **`/vdoc init`**
32
32
 
33
33
  | Platform | Install Command | `/vdoc` Command | Invocation |
34
34
  |----------|----------------|----------------|------------|
35
- | **Claude Code** | `npx vdoc install claude` | `/vdoc init` `/vdoc audit` | Skill (SKILL.md) |
36
- | **Cursor** | `npx vdoc install cursor` | `/vdoc init` `/vdoc audit` | Command + Rule |
37
- | **Windsurf** | `npx vdoc install windsurf` | `/vdoc` | Workflow + Rule |
38
- | **VS Code (Copilot)** | `npx vdoc install vscode` | `/vdoc` | Prompt + Instructions |
39
- | **Continue** | `npx vdoc install continue` | `/vdoc init` `/vdoc audit` | Invokable Prompt + Rule |
40
- | **Cline** | `npx vdoc install cline` | `/vdoc` | Workflow + Rule |
41
- | **Gemini CLI** | `npx vdoc install gemini` | `/vdoc init` `/vdoc audit` | TOML Command + GEMINI.md |
42
- | **JetBrains AI** | `npx vdoc install jetbrains` | Natural language | Rule only |
43
- | **JetBrains Junie** | `npx vdoc install junie` | Natural language | Guidelines only |
44
- | **Universal** | `npx vdoc install agents` | Natural language | AGENTS.md |
35
+ | **Claude Code** | `npx @sandrinio/vdoc install claude` | `/vdoc init` `/vdoc audit` | Skill (SKILL.md) |
36
+ | **Cursor** | `npx @sandrinio/vdoc install cursor` | `/vdoc init` `/vdoc audit` | Command + Rule |
37
+ | **Windsurf** | `npx @sandrinio/vdoc install windsurf` | `/vdoc` | Workflow + Rule |
38
+ | **VS Code (Copilot)** | `npx @sandrinio/vdoc install vscode` | `/vdoc` | Prompt + Instructions |
39
+ | **Continue** | `npx @sandrinio/vdoc install continue` | `/vdoc init` `/vdoc audit` | Invokable Prompt + Rule |
40
+ | **Cline** | `npx @sandrinio/vdoc install cline` | `/vdoc` | Workflow + Rule |
41
+ | **Gemini CLI** | `npx @sandrinio/vdoc install gemini` | `/vdoc init` `/vdoc audit` | TOML Command + GEMINI.md |
42
+ | **JetBrains AI** | `npx @sandrinio/vdoc install jetbrains` | Natural language | Rule only |
43
+ | **JetBrains Junie** | `npx @sandrinio/vdoc install junie` | Natural language | Guidelines only |
44
+ | **Universal** | `npx @sandrinio/vdoc install agents` | Natural language | AGENTS.md |
45
45
 
46
46
  ---
47
47
 
@@ -50,7 +50,7 @@ Then open Cursor and type: **`/vdoc init`**
50
50
  ### 1. Install (~5 seconds)
51
51
 
52
52
  ```bash
53
- npx vdoc install claude
53
+ npx @sandrinio/vdoc install claude
54
54
  ```
55
55
 
56
56
  Copies skill files to your AI platform's rules and commands locations. That's it.
@@ -131,7 +131,7 @@ The `_manifest.json` acts as a semantic index. Each entry has a rich `descriptio
131
131
  ## Uninstall
132
132
 
133
133
  ```bash
134
- npx vdoc uninstall
134
+ npx @sandrinio/vdoc uninstall
135
135
  ```
136
136
 
137
137
  Removes all vdoc skill and rule files from **every** supported platform in one command. No platform argument needed — it scans for and deletes everything vdoc may have created:
package/bin/vdoc.mjs CHANGED
@@ -14,24 +14,41 @@ const PLATFORMS = {
14
14
  claude: {
15
15
  files: [
16
16
  { src: 'claude/SKILL.md', dest: '.claude/skills/vdoc/SKILL.md' },
17
- { src: 'claude/references/doc-template.md', dest: '.claude/skills/vdoc/references/doc-template.md' },
18
- { src: 'claude/references/manifest-schema.json', dest: '.claude/skills/vdoc/references/manifest-schema.json' },
17
+ { src: 'claude/vdoc-init.md', dest: '.claude/skills/vdoc-init/SKILL.md' },
18
+ { src: 'claude/vdoc-audit.md', dest: '.claude/skills/vdoc-audit/SKILL.md' },
19
+ { src: 'claude/references/exploration-strategies.md', dest: '.claude/skills/vdoc-init/references/exploration-strategies.md' },
19
20
  ],
20
21
  },
21
22
  cursor: {
22
23
  files: [
23
- { src: 'cursor/vdoc.mdc', dest: '.cursor/rules/vdoc.mdc' },
24
+ { src: 'cursor/RULE.md', dest: '.cursor/rules/vdoc/RULE.md' },
25
+ { src: 'cursor/references/init-workflow.md', dest: '.cursor/rules/vdoc/references/init-workflow.md' },
26
+ { src: 'cursor/references/audit-workflow.md', dest: '.cursor/rules/vdoc/references/audit-workflow.md' },
27
+ { src: 'cursor/references/doc-template.md', dest: '.cursor/rules/vdoc/references/doc-template.md' },
28
+ { src: 'cursor/references/manifest-schema.json', dest: '.cursor/rules/vdoc/references/manifest-schema.json' },
29
+ { src: 'cursor/references/exploration-strategies.md', dest: '.cursor/rules/vdoc/references/exploration-strategies.md' },
24
30
  { src: 'cursor/vdoc-command.md', dest: '.cursor/commands/vdoc.md' },
25
31
  ],
26
32
  },
27
33
  windsurf: {
28
34
  files: [
29
- { src: 'windsurf/vdoc.md', dest: '.windsurf/rules/vdoc.md' },
35
+ { src: 'windsurf/SKILL.md', dest: '.windsurf/skills/vdoc/SKILL.md' },
36
+ { src: 'windsurf/resources/init-workflow.md', dest: '.windsurf/skills/vdoc/resources/init-workflow.md' },
37
+ { src: 'windsurf/resources/audit-workflow.md', dest: '.windsurf/skills/vdoc/resources/audit-workflow.md' },
38
+ { src: 'windsurf/resources/doc-template.md', dest: '.windsurf/skills/vdoc/resources/doc-template.md' },
39
+ { src: 'windsurf/resources/manifest-schema.json', dest: '.windsurf/skills/vdoc/resources/manifest-schema.json' },
40
+ { src: 'windsurf/resources/exploration-strategies.md', dest: '.windsurf/skills/vdoc/resources/exploration-strategies.md' },
30
41
  { src: 'windsurf/vdoc-workflow.md', dest: '.windsurf/workflows/vdoc.md' },
31
42
  ],
32
43
  },
33
44
  vscode: {
34
45
  files: [
46
+ { src: 'vscode/SKILL.md', dest: '.github/skills/vdoc/SKILL.md' },
47
+ { src: 'vscode/references/init-workflow.md', dest: '.github/skills/vdoc/references/init-workflow.md' },
48
+ { src: 'vscode/references/audit-workflow.md', dest: '.github/skills/vdoc/references/audit-workflow.md' },
49
+ { src: 'vscode/references/doc-template.md', dest: '.github/skills/vdoc/references/doc-template.md' },
50
+ { src: 'vscode/references/manifest-schema.json', dest: '.github/skills/vdoc/references/manifest-schema.json' },
51
+ { src: 'vscode/references/exploration-strategies.md', dest: '.github/skills/vdoc/references/exploration-strategies.md' },
35
52
  { src: 'vscode/vdoc.instructions.md', dest: '.github/instructions/vdoc.instructions.md' },
36
53
  { src: 'vscode/vdoc.prompt.md', dest: '.github/prompts/vdoc.prompt.md' },
37
54
  { src: 'vscode/copilot-instructions.md', dest: '.github/copilot-instructions.md', inject: true },
@@ -41,33 +58,63 @@ const PLATFORMS = {
41
58
  files: [
42
59
  { src: 'continue/vdoc.md', dest: '.continue/rules/vdoc.md' },
43
60
  { src: 'continue/vdoc-command.md', dest: '.continue/prompts/vdoc-command.md' },
61
+ { src: 'continue/references/init-workflow.md', dest: '.continue/references/vdoc/init-workflow.md' },
62
+ { src: 'continue/references/audit-workflow.md', dest: '.continue/references/vdoc/audit-workflow.md' },
63
+ { src: 'continue/references/doc-template.md', dest: '.continue/references/vdoc/doc-template.md' },
64
+ { src: 'continue/references/manifest-schema.json', dest: '.continue/references/vdoc/manifest-schema.json' },
65
+ { src: 'continue/references/exploration-strategies.md', dest: '.continue/references/vdoc/exploration-strategies.md' },
44
66
  ],
45
67
  },
46
68
  cline: {
47
69
  files: [
48
70
  { src: 'cline/vdoc.md', dest: '.clinerules/vdoc.md' },
49
71
  { src: 'cline/vdoc-workflow.md', dest: '.clinerules/workflows/vdoc.md' },
72
+ { src: 'cline/references/init-workflow.md', dest: '.clinerules/vdoc/init-workflow.md' },
73
+ { src: 'cline/references/audit-workflow.md', dest: '.clinerules/vdoc/audit-workflow.md' },
74
+ { src: 'cline/references/doc-template.md', dest: '.clinerules/vdoc/doc-template.md' },
75
+ { src: 'cline/references/manifest-schema.json', dest: '.clinerules/vdoc/manifest-schema.json' },
76
+ { src: 'cline/references/exploration-strategies.md', dest: '.clinerules/vdoc/exploration-strategies.md' },
50
77
  ],
51
78
  },
52
79
  gemini: {
53
80
  files: [
54
81
  { src: 'gemini/vdoc.toml', dest: '.gemini/commands/vdoc.toml' },
55
82
  { src: 'gemini/GEMINI.md', dest: 'GEMINI.md', inject: true },
83
+ { src: 'gemini/references/init-workflow.md', dest: '.gemini/vdoc/init-workflow.md' },
84
+ { src: 'gemini/references/audit-workflow.md', dest: '.gemini/vdoc/audit-workflow.md' },
85
+ { src: 'gemini/references/doc-template.md', dest: '.gemini/vdoc/doc-template.md' },
86
+ { src: 'gemini/references/manifest-schema.json', dest: '.gemini/vdoc/manifest-schema.json' },
87
+ { src: 'gemini/references/exploration-strategies.md', dest: '.gemini/vdoc/exploration-strategies.md' },
56
88
  ],
57
89
  },
58
90
  jetbrains: {
59
91
  files: [
60
92
  { src: 'jetbrains-ai/vdoc.md', dest: '.aiassistant/rules/vdoc.md' },
93
+ { src: 'jetbrains-ai/references/init-workflow.md', dest: '.aiassistant/vdoc/init-workflow.md' },
94
+ { src: 'jetbrains-ai/references/audit-workflow.md', dest: '.aiassistant/vdoc/audit-workflow.md' },
95
+ { src: 'jetbrains-ai/references/doc-template.md', dest: '.aiassistant/vdoc/doc-template.md' },
96
+ { src: 'jetbrains-ai/references/manifest-schema.json', dest: '.aiassistant/vdoc/manifest-schema.json' },
97
+ { src: 'jetbrains-ai/references/exploration-strategies.md', dest: '.aiassistant/vdoc/exploration-strategies.md' },
61
98
  ],
62
99
  },
63
100
  junie: {
64
101
  files: [
65
102
  { src: 'junie/guidelines.md', dest: '.junie/guidelines.md', inject: true },
103
+ { src: 'junie/references/init-workflow.md', dest: '.junie/vdoc/init-workflow.md' },
104
+ { src: 'junie/references/audit-workflow.md', dest: '.junie/vdoc/audit-workflow.md' },
105
+ { src: 'junie/references/doc-template.md', dest: '.junie/vdoc/doc-template.md' },
106
+ { src: 'junie/references/manifest-schema.json', dest: '.junie/vdoc/manifest-schema.json' },
107
+ { src: 'junie/references/exploration-strategies.md', dest: '.junie/vdoc/exploration-strategies.md' },
66
108
  ],
67
109
  },
68
110
  agents: {
69
111
  files: [
70
112
  { src: 'agents/AGENTS.md', dest: 'AGENTS.md', inject: true },
113
+ { src: 'agents/references/init-workflow.md', dest: '.agents/vdoc/init-workflow.md' },
114
+ { src: 'agents/references/audit-workflow.md', dest: '.agents/vdoc/audit-workflow.md' },
115
+ { src: 'agents/references/doc-template.md', dest: '.agents/vdoc/doc-template.md' },
116
+ { src: 'agents/references/manifest-schema.json', dest: '.agents/vdoc/manifest-schema.json' },
117
+ { src: 'agents/references/exploration-strategies.md', dest: '.agents/vdoc/exploration-strategies.md' },
71
118
  ],
72
119
  },
73
120
  };
@@ -208,11 +255,33 @@ function uninstall() {
208
255
  }
209
256
  }
210
257
 
211
- // Also clean .claude/skills/vdoc/ directory if it exists
212
- const claudeSkillDir = join(CWD, '.claude', 'skills', 'vdoc');
213
- if (existsSync(claudeSkillDir)) {
214
- rmSync(claudeSkillDir, { recursive: true });
215
- cleanEmptyDirs(dirname(claudeSkillDir));
258
+ // Clean skill directories that may have nested files
259
+ const skillDirs = [
260
+ join(CWD, '.claude', 'skills', 'vdoc'),
261
+ join(CWD, '.claude', 'skills', 'vdoc-init'),
262
+ join(CWD, '.claude', 'skills', 'vdoc-audit'),
263
+ join(CWD, '.cursor', 'rules', 'vdoc'),
264
+ join(CWD, '.windsurf', 'skills', 'vdoc'),
265
+ join(CWD, '.github', 'skills', 'vdoc'),
266
+ join(CWD, '.continue', 'references', 'vdoc'),
267
+ join(CWD, '.clinerules', 'vdoc'),
268
+ join(CWD, '.gemini', 'vdoc'),
269
+ join(CWD, '.aiassistant', 'vdoc'),
270
+ join(CWD, '.junie', 'vdoc'),
271
+ join(CWD, '.agents', 'vdoc'),
272
+ ];
273
+ for (const dir of skillDirs) {
274
+ if (existsSync(dir)) {
275
+ rmSync(dir, { recursive: true });
276
+ console.log(` ✓ removed ${dir.slice(CWD.length + 1)}/`);
277
+ cleanEmptyDirs(dirname(dir));
278
+ }
279
+ }
280
+
281
+ // Clean legacy files from previous versions
282
+ const legacyFiles = ['.cursor/rules/vdoc.mdc', '.windsurf/rules/vdoc.md'];
283
+ for (const f of legacyFiles) {
284
+ if (removeFile(f)) removed++;
216
285
  }
217
286
 
218
287
  if (removed === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sandrinio/vdoc",
3
- "version": "3.0.0",
3
+ "version": "3.3.1",
4
4
  "description": "Documentation skills for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,164 +1,38 @@
1
1
  # vdoc — Documentation Generator
2
2
 
3
- You generate and maintain feature-centric documentation for codebases. You have three modes: **init**, **audit**, and **query**.
3
+ Documentation must be feature-centric, plan-approved, and grounded in source code. Never generate docs from assumptions.
4
4
 
5
- All documentation lives in `vdocs/` at the project root. The manifest at `vdocs/_manifest.json` is the semantic index you read first.
5
+ ## When to Use
6
+ - User says `/vdoc`, "document this project", "audit docs", or asks about documentation
7
+ - Docs are stale, missing, or out of sync with code
6
8
 
7
- ---
8
-
9
- ## Mode 1: Init
10
-
11
- **Trigger:** User says "document this project" or similar.
12
-
13
- ### Step 1 — Explore
14
-
15
- Read the codebase thoroughly. Identify:
16
-
17
- - **Tech stack**: languages, frameworks, databases, ORMs
18
- - **Features**: authentication, API, payments, notifications, search, etc.
19
- - **Architecture**: monolith vs microservices, frontend/backend split, key patterns
20
- - **Integrations**: third-party services (Stripe, AWS, Redis, etc.)
21
- - **Entry points**: where requests come in, how they flow through the system
22
-
23
- Do not skim. Read key files — entry points, config, routes, schemas, middleware.
24
-
25
- ### Step 2 — Plan
26
-
27
- 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.
28
-
29
- ### Step 3 — Generate
30
-
31
- For each approved doc, read ALL relevant source files and generate using this template:
32
-
33
- ```markdown
34
- # {Feature Title}
35
-
36
- > {One-line description}
37
-
38
- ---
39
-
40
- ## Overview
41
- {What it does, why it exists, how it fits in the system.}
42
-
43
- ---
44
-
45
- ## How It Works
46
- {Core logic and flow.}
47
- {Mermaid diagram(s) — max 7-9 nodes per diagram, split if larger.}
9
+ ## When NOT to Use
10
+ - API reference docs (use JSDoc/TSDoc), README files, inline code comments
48
11
 
49
12
  ---
50
13
 
51
- ## Data Model
52
- {Entities this feature owns. Mermaid ER diagram or table.}
14
+ You generate and maintain feature-centric documentation. Three modes: **init**, **audit**, **query**.
53
15
 
54
- ---
16
+ All docs live in `vdocs/`. The manifest at `vdocs/_manifest.json` is the semantic index you read first.
55
17
 
56
- ## Key Files
57
- | File | Purpose |
58
- |------|---------|
59
- | `src/path/file.ts` | What this file does |
18
+ ## Init (`/vdoc init`)
60
19
 
61
- ---
20
+ Read the detailed workflow at `.agents/vdoc/init-workflow.md`.
62
21
 
63
- ## Dependencies & Integrations
64
- {External services, internal features, packages this relies on.}
22
+ Use the doc template at `.agents/vdoc/doc-template.md`.
65
23
 
66
- ---
24
+ Use the manifest schema at `.agents/vdoc/manifest-schema.json`.
67
25
 
68
- ## Configuration
69
- | Variable | Purpose | Required |
70
- |----------|---------|----------|
71
- | `ENV_VAR` | What it controls | Yes/No |
26
+ ## Audit (`/vdoc audit`)
72
27
 
73
- ---
28
+ Read the detailed workflow at `.agents/vdoc/audit-workflow.md`.
74
29
 
75
- ## Error Handling
76
- {Failure modes, what the user sees, retry logic. Mermaid diagram if non-trivial.}
77
-
78
- ---
79
-
80
- ## Constraints & Decisions
81
- {Why it's built this way. What you CANNOT change without breaking things.}
82
-
83
- ---
84
-
85
- ## Related Features
86
- {Cross-references to other docs by filename. Blast radius notes.}
87
-
88
- ---
89
-
90
- *Generated by vdoc v3.0.0 • Last updated: {timestamp}*
91
- ```
92
-
93
- **Writing rules:**
94
-
95
- - **Mermaid diagrams are mandatory** in "How It Works". Max 7-9 nodes — split larger flows.
96
- - **Data Model** must show real entities from the code, not placeholders.
97
- - **Constraints & Decisions** is the most valuable section. Dig for non-obvious choices. If unclear, write: `Reason: unknown — verify with team`.
98
- - **Related Features** must reference other doc filenames and explain coupling.
99
- - **Configuration** must list actual env vars from the code.
100
- - **Error Handling** — trace what happens when things fail.
101
-
102
- ### Step 4 — Manifest
103
-
104
- Create `vdocs/_manifest.json`:
105
-
106
- ```json
107
- {
108
- "project": "<project-name>",
109
- "vdoc_version": "3.0.0",
110
- "created_at": "<ISO-8601>",
111
- "last_updated": "<ISO-8601>",
112
- "last_commit": "<short-sha>",
113
- "documentation": [
114
- {
115
- "filepath": "FEATURE_NAME_DOC.md",
116
- "title": "Human-Readable Title",
117
- "version": "1.0.0",
118
- "description": "Rich semantic description with technology names, patterns, concepts. Detailed enough for AI to route questions to this doc.",
119
- "tags": ["keyword-tag"]
120
- }
121
- ]
122
- }
123
- ```
124
-
125
- ### Step 5 — Self-Review
126
-
127
- 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.
128
-
129
- ---
130
-
131
- ## Mode 2: Audit
132
-
133
- **Trigger:** User says "audit docs" or similar.
134
-
135
- 1. **Read manifest** — load `vdocs/_manifest.json`
136
- 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.
137
- 3. **Detect gaps** — scan codebase for significant source files not covered by any doc (new routes, services, models, config).
138
- 4. **Detect dead docs** — check each doc's "Key Files" against filesystem. Flag docs referencing deleted files.
139
- 5. **Check cross-refs** — verify "Related Features" links still exist and coupling is accurate.
140
- 6. **Report** — present stale, gaps, dead, cross-ref issues, and current docs. Wait for user direction.
141
- 7. **Patch** — update stale docs, generate new docs for gaps, flag dead docs, fix cross-refs. Update manifest.
142
-
143
- ---
144
-
145
- ## Mode 3: Query
146
-
147
- **Trigger:** User asks any question about the codebase or documentation.
30
+ ## Query (any documentation question)
148
31
 
149
32
  1. Read `vdocs/_manifest.json`
150
33
  2. Match question against `description` and `tags` fields
151
- 3. Read matching doc(s)
152
- 4. Answer from documented knowledge
153
- 5. If no match, suggest running an audit
154
-
155
- ---
156
-
157
- ## Naming Convention
158
-
159
- Files: `FEATURE_NAME_DOC.md` — uppercase, feature-named, `_DOC` suffix.
160
-
161
- ---
34
+ 3. Read matching doc(s) and answer from documented knowledge
35
+ 4. If no match, suggest running an audit
162
36
 
163
37
  ## Rules
164
38
 
@@ -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}*