@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.
- package/bin/vdoc.mjs +78 -11
- 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 +341 -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 -41
- package/skills/claude/references/exploration-strategies.md +341 -0
- package/skills/claude/references/init-workflow.md +44 -7
- 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 +341 -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 +341 -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 +341 -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 +341 -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 +341 -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 +341 -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 +341 -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 +341 -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/bin/vdoc.mjs
CHANGED
|
@@ -14,26 +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/
|
|
18
|
-
{ src: 'claude/
|
|
19
|
-
{ src: 'claude/references/
|
|
20
|
-
{ src: 'claude/references/audit-workflow.md', dest: '.claude/skills/vdoc/references/audit-workflow.md' },
|
|
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' },
|
|
21
20
|
],
|
|
22
21
|
},
|
|
23
22
|
cursor: {
|
|
24
23
|
files: [
|
|
25
|
-
{ src: 'cursor/
|
|
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' },
|
|
26
30
|
{ src: 'cursor/vdoc-command.md', dest: '.cursor/commands/vdoc.md' },
|
|
27
31
|
],
|
|
28
32
|
},
|
|
29
33
|
windsurf: {
|
|
30
34
|
files: [
|
|
31
|
-
{ src: 'windsurf/
|
|
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' },
|
|
32
41
|
{ src: 'windsurf/vdoc-workflow.md', dest: '.windsurf/workflows/vdoc.md' },
|
|
33
42
|
],
|
|
34
43
|
},
|
|
35
44
|
vscode: {
|
|
36
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' },
|
|
37
52
|
{ src: 'vscode/vdoc.instructions.md', dest: '.github/instructions/vdoc.instructions.md' },
|
|
38
53
|
{ src: 'vscode/vdoc.prompt.md', dest: '.github/prompts/vdoc.prompt.md' },
|
|
39
54
|
{ src: 'vscode/copilot-instructions.md', dest: '.github/copilot-instructions.md', inject: true },
|
|
@@ -43,33 +58,63 @@ const PLATFORMS = {
|
|
|
43
58
|
files: [
|
|
44
59
|
{ src: 'continue/vdoc.md', dest: '.continue/rules/vdoc.md' },
|
|
45
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' },
|
|
46
66
|
],
|
|
47
67
|
},
|
|
48
68
|
cline: {
|
|
49
69
|
files: [
|
|
50
70
|
{ src: 'cline/vdoc.md', dest: '.clinerules/vdoc.md' },
|
|
51
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' },
|
|
52
77
|
],
|
|
53
78
|
},
|
|
54
79
|
gemini: {
|
|
55
80
|
files: [
|
|
56
81
|
{ src: 'gemini/vdoc.toml', dest: '.gemini/commands/vdoc.toml' },
|
|
57
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' },
|
|
58
88
|
],
|
|
59
89
|
},
|
|
60
90
|
jetbrains: {
|
|
61
91
|
files: [
|
|
62
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' },
|
|
63
98
|
],
|
|
64
99
|
},
|
|
65
100
|
junie: {
|
|
66
101
|
files: [
|
|
67
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' },
|
|
68
108
|
],
|
|
69
109
|
},
|
|
70
110
|
agents: {
|
|
71
111
|
files: [
|
|
72
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' },
|
|
73
118
|
],
|
|
74
119
|
},
|
|
75
120
|
};
|
|
@@ -210,11 +255,33 @@ function uninstall() {
|
|
|
210
255
|
}
|
|
211
256
|
}
|
|
212
257
|
|
|
213
|
-
//
|
|
214
|
-
const
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
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++;
|
|
218
285
|
}
|
|
219
286
|
|
|
220
287
|
if (removed === 0) {
|
package/package.json
CHANGED
package/skills/agents/AGENTS.md
CHANGED
|
@@ -1,164 +1,38 @@
|
|
|
1
1
|
# vdoc — Documentation Generator
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Documentation must be feature-centric, plan-approved, and grounded in source code. Never generate docs from assumptions.
|
|
4
4
|
|
|
5
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
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
|
-
##
|
|
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
|
-
##
|
|
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.
|
|
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}*
|