@sandrinio/vdoc 3.5.2 → 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 +68 -16
- package/bin/vdoc.mjs +15 -7
- package/package.json +1 -1
- package/skills/agents/references/init-workflow.md +11 -5
- package/skills/claude/SKILL.md +46 -0
- package/skills/claude/{vdoc-update.md → references/audit-workflow.md} +4 -17
- package/skills/claude/{vdoc-create.md → references/create-workflow.md} +5 -19
- package/skills/claude/{vdoc-init.md → references/init-workflow.md} +32 -28
- package/skills/cline/references/init-workflow.md +11 -5
- package/skills/continue/references/init-workflow.md +11 -5
- package/skills/cursor/references/init-workflow.md +11 -5
- package/skills/gemini/references/init-workflow.md +11 -5
- package/skills/gemini/vdoc.toml +2 -2
- package/skills/jetbrains-ai/references/init-workflow.md +11 -5
- package/skills/junie/references/init-workflow.md +11 -5
- package/skills/vscode/references/init-workflow.md +11 -5
- package/skills/windsurf/resources/init-workflow.md +11 -5
- package/skills/claude/vdoc-audit.md +0 -80
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
|
|
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
|
|
24
|
+
npx @sandrinio/vdoc install claude
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
Then
|
|
27
|
+
Then type: **`/vdoc-init`**
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
@@ -47,30 +47,48 @@ Then open Cursor and type: **`/vdoc init`**
|
|
|
47
47
|
|
|
48
48
|
## How It Works
|
|
49
49
|
|
|
50
|
+
vdoc is **plan-first**. The AI proposes — you decide. Nothing gets generated until you approve.
|
|
51
|
+
|
|
50
52
|
### 1. Install (~5 seconds)
|
|
51
53
|
|
|
52
54
|
```bash
|
|
53
55
|
npx @sandrinio/vdoc install claude
|
|
54
56
|
```
|
|
55
57
|
|
|
56
|
-
Copies skill files to your AI platform's
|
|
58
|
+
Copies skill files to your AI platform's config. No dependencies, no build step.
|
|
59
|
+
|
|
60
|
+
### 2. Init — `/vdoc-init`
|
|
61
|
+
|
|
62
|
+
This is the main workflow. Type `/vdoc-init` (or say "document this project") and the AI runs through four phases:
|
|
63
|
+
|
|
64
|
+
**Phase 1: Explore** — The AI reads your project's config files and directory structure to identify the language, framework, and architecture. It uses archetype-based strategies (Web API, SPA, Full-Stack, CLI, Library, etc.) to know exactly which files to scan. The result is an exploration log documenting every file read and every feature signal detected.
|
|
65
|
+
|
|
66
|
+
**Phase 2: Plan** — Based on what it found, the AI creates a documentation plan — a list of proposed docs, each covering one logical feature (not one file). The plan is saved as a file you can review.
|
|
67
|
+
|
|
68
|
+
**Phase 3: You review** — The AI presents the plan and asks for your input:
|
|
69
|
+
- *"Should I merge API routes and middleware into one doc?"*
|
|
70
|
+
- *"I found a websocket system — want that documented separately?"*
|
|
71
|
+
- *"Any legacy systems I should skip?"*
|
|
72
|
+
|
|
73
|
+
You can add, remove, rename, or restructure docs before approving. **Nothing is generated until you say go.**
|
|
57
74
|
|
|
58
|
-
|
|
75
|
+
**Phase 4: Generate** — For each approved doc, the AI reads all relevant source files, follows a consistent template, and writes feature-centric documentation with mermaid diagrams, real code references, and a semantic manifest for future AI queries.
|
|
59
76
|
|
|
60
|
-
|
|
77
|
+
### 3. Update — `/vdoc-update`
|
|
61
78
|
|
|
62
|
-
|
|
63
|
-
2. **Plan** — propose a documentation plan for your approval
|
|
64
|
-
3. **Generate** — create feature-centric docs using a consistent template
|
|
65
|
-
4. **Index** — build a semantic manifest for future queries
|
|
79
|
+
Type `/vdoc-update` (or `/vdoc-audit`) when your code has changed. The AI:
|
|
66
80
|
|
|
67
|
-
|
|
81
|
+
1. Checks git history to find which source files changed since docs were last updated
|
|
82
|
+
2. Cross-references changes against each doc's "Key Files" to identify stale docs
|
|
83
|
+
3. Scans for new features not covered by any doc
|
|
84
|
+
4. Flags dead docs whose source files were deleted
|
|
85
|
+
5. Verifies cross-references between docs
|
|
68
86
|
|
|
69
|
-
|
|
87
|
+
It presents a report and waits for your direction before patching anything.
|
|
70
88
|
|
|
71
|
-
### 4. Create
|
|
89
|
+
### 4. Create — `/vdoc-create <feature>`
|
|
72
90
|
|
|
73
|
-
Type
|
|
91
|
+
Type `/vdoc-create authentication system` to document a single feature on demand. The AI locates the relevant source files, generates one doc following the same template, and updates the manifest. Useful for adding docs incrementally without re-running the full init.
|
|
74
92
|
|
|
75
93
|
---
|
|
76
94
|
|
|
@@ -97,6 +115,38 @@ Docs are **feature-centric** — organized by what your system does, not by file
|
|
|
97
115
|
|
|
98
116
|
---
|
|
99
117
|
|
|
118
|
+
## The Workflow
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
┌─────────────────────────────────────────────────────────┐
|
|
122
|
+
│ /vdoc-init │
|
|
123
|
+
│ │
|
|
124
|
+
│ Explore ──→ Plan ──→ You Review ──→ Generate │
|
|
125
|
+
│ (auto) (auto) (you decide) (auto) │
|
|
126
|
+
│ │ │
|
|
127
|
+
│ add / remove / rename │
|
|
128
|
+
│ merge / split docs │
|
|
129
|
+
│ skip features │
|
|
130
|
+
└─────────────────────────────────────────────────────────┘
|
|
131
|
+
|
|
132
|
+
┌─────────────────────────────────────────────────────────┐
|
|
133
|
+
│ /vdoc-update or /vdoc-audit │
|
|
134
|
+
│ │
|
|
135
|
+
│ Git Diff ──→ Detect Stale ──→ Report ──→ You Approve │
|
|
136
|
+
│ Detect Gaps (auto) ──→ Patch │
|
|
137
|
+
│ Detect Dead │
|
|
138
|
+
└─────────────────────────────────────────────────────────┘
|
|
139
|
+
|
|
140
|
+
┌─────────────────────────────────────────────────────────┐
|
|
141
|
+
│ /vdoc-create <feature> │
|
|
142
|
+
│ │
|
|
143
|
+
│ Locate Source ──→ Generate Doc ──→ Update Manifest │
|
|
144
|
+
│ (auto) (auto) (auto) │
|
|
145
|
+
└─────────────────────────────────────────────────────────┘
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
100
150
|
## Documentation Template
|
|
101
151
|
|
|
102
152
|
Every generated doc follows a consistent structure:
|
|
@@ -115,7 +165,9 @@ Every generated doc follows a consistent structure:
|
|
|
115
165
|
|
|
116
166
|
## Manifest
|
|
117
167
|
|
|
118
|
-
The `_manifest.json`
|
|
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.
|
|
119
171
|
|
|
120
172
|
```json
|
|
121
173
|
{
|
|
@@ -171,4 +223,4 @@ None. Your AI coding agent is the runtime.
|
|
|
171
223
|
|
|
172
224
|
---
|
|
173
225
|
|
|
174
|
-
*vdoc v3.5.
|
|
226
|
+
*vdoc v3.5.2 — Documentation skills for AI coding agents*
|
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/
|
|
17
|
-
{ src: 'claude/
|
|
18
|
-
{ src: 'claude/
|
|
19
|
-
{ src: 'claude/
|
|
20
|
-
{ src: 'claude/references/exploration-strategies.md', dest: '.claude/skills/vdoc
|
|
21
|
-
{ src: 'claude/references/doc-template.md', dest: '.claude/skills/vdoc
|
|
22
|
-
{ src: 'claude/references/manifest-schema.json', dest: '.claude/skills/vdoc
|
|
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: {
|
|
@@ -232,6 +232,13 @@ function install(platform) {
|
|
|
232
232
|
|
|
233
233
|
console.log(`\nvdoc → installing for ${platform}\n`);
|
|
234
234
|
|
|
235
|
+
// Create vdocs/ output directory
|
|
236
|
+
const vdocsDir = join(CWD, 'vdocs');
|
|
237
|
+
if (!existsSync(vdocsDir)) {
|
|
238
|
+
mkdirSync(vdocsDir, { recursive: true });
|
|
239
|
+
console.log(` ✓ vdocs/`);
|
|
240
|
+
}
|
|
241
|
+
|
|
235
242
|
for (const file of config.files) {
|
|
236
243
|
if (file.inject) {
|
|
237
244
|
injectFile(file.src, file.dest);
|
|
@@ -265,6 +272,7 @@ function uninstall() {
|
|
|
265
272
|
join(CWD, '.claude', 'skills', 'vdoc-update'),
|
|
266
273
|
join(CWD, '.claude', 'skills', 'vdoc-create'),
|
|
267
274
|
join(CWD, '.claude', 'skills', 'vdoc-audit'),
|
|
275
|
+
join(CWD, '.claude', 'skills', 'vdoc'),
|
|
268
276
|
join(CWD, '.cursor', 'rules', 'vdoc'),
|
|
269
277
|
join(CWD, '.windsurf', 'skills', 'vdoc'),
|
|
270
278
|
join(CWD, '.github', 'skills', 'vdoc'),
|
package/package.json
CHANGED
|
@@ -51,7 +51,9 @@ This log is your working memory. It feeds directly into Step 2 (Plan).
|
|
|
51
51
|
|
|
52
52
|
## Step 2 — Plan
|
|
53
53
|
|
|
54
|
-
|
|
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.
|
|
55
|
+
|
|
56
|
+
Use this format:
|
|
55
57
|
|
|
56
58
|
```markdown
|
|
57
59
|
# Documentation Plan
|
|
@@ -68,7 +70,7 @@ Create `vdocs/_DOCUMENTATION_PLAN.md` listing each proposed doc:
|
|
|
68
70
|
- Docs should be useful for onboarding AND as AI context for planning changes
|
|
69
71
|
```
|
|
70
72
|
|
|
71
|
-
|
|
73
|
+
After writing the file, present the plan to the user. Actively suggest changes:
|
|
72
74
|
- "Should I merge X and Y into one doc?"
|
|
73
75
|
- "I found a websocket system — want that documented separately?"
|
|
74
76
|
- "Any internal/legacy systems I should skip?"
|
|
@@ -77,11 +79,15 @@ Wait for user approval before proceeding.
|
|
|
77
79
|
|
|
78
80
|
## Step 3 — Generate
|
|
79
81
|
|
|
80
|
-
|
|
82
|
+
Read the template from `.agents/vdoc/doc-template.md` once before starting.
|
|
83
|
+
|
|
84
|
+
Then generate docs **one at a time, sequentially**. For each approved doc:
|
|
81
85
|
|
|
82
86
|
1. Read ALL relevant source files for that feature — not just the main file, but helpers, types, middleware, tests
|
|
83
|
-
2.
|
|
84
|
-
3.
|
|
87
|
+
2. Write `vdocs/FEATURE_NAME_DOC.md` following the template exactly
|
|
88
|
+
3. Confirm the file was written before moving to the next doc
|
|
89
|
+
|
|
90
|
+
Do NOT attempt to generate multiple docs from memory. Each doc is a fresh cycle: read sources → write doc → next.
|
|
85
91
|
|
|
86
92
|
**Writing rules:**
|
|
87
93
|
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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 (
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
20
|
+
After exploring, write `vdocs/_exploration_log.md` documenting what you found:
|
|
28
21
|
|
|
29
22
|
```markdown
|
|
30
23
|
# Exploration Log
|
|
@@ -58,7 +51,9 @@ This log is your working memory. It feeds directly into Step 2 (Plan).
|
|
|
58
51
|
|
|
59
52
|
## Step 2 — Plan
|
|
60
53
|
|
|
61
|
-
|
|
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.
|
|
55
|
+
|
|
56
|
+
Use this format:
|
|
62
57
|
|
|
63
58
|
```markdown
|
|
64
59
|
# Documentation Plan
|
|
@@ -75,35 +70,51 @@ Create `.claude/skills/vdoc-config/_DOCUMENTATION_PLAN.md` listing each proposed
|
|
|
75
70
|
- Docs should be useful for onboarding AND as AI context for planning changes
|
|
76
71
|
```
|
|
77
72
|
|
|
78
|
-
|
|
73
|
+
After writing the file, present the plan to the user. Actively suggest changes:
|
|
79
74
|
- "Should I merge X and Y into one doc?"
|
|
80
75
|
- "I found a websocket system — want that documented separately?"
|
|
81
76
|
- "Any internal/legacy systems I should skip?"
|
|
82
77
|
|
|
83
|
-
|
|
78
|
+
Wait for user approval before proceeding.
|
|
84
79
|
|
|
85
80
|
## Step 3 — Generate
|
|
86
81
|
|
|
87
|
-
|
|
82
|
+
Read the template from [doc-template.md](./doc-template.md) once before starting.
|
|
83
|
+
|
|
84
|
+
Then generate docs **one at a time, sequentially**. For each approved doc:
|
|
88
85
|
|
|
89
86
|
1. Read ALL relevant source files for that feature — not just the main file, but helpers, types, middleware, tests
|
|
90
|
-
2.
|
|
91
|
-
3.
|
|
87
|
+
2. Write `vdocs/FEATURE_NAME_DOC.md` following the template exactly
|
|
88
|
+
3. Confirm the file was written before moving to the next doc
|
|
92
89
|
|
|
93
|
-
|
|
90
|
+
Do NOT attempt to generate multiple docs from memory. Each doc is a fresh cycle: read sources → write doc → next.
|
|
91
|
+
|
|
92
|
+
**Writing rules:**
|
|
94
93
|
|
|
95
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.
|
|
96
95
|
- **Data Model** must show real entities from the code, not generic placeholders. Use mermaid ER diagrams for relational data, tables for simpler models.
|
|
97
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`.
|
|
98
|
-
- **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)."
|
|
99
98
|
- **Configuration** must list actual env vars/secrets from the code, not hypothetical ones.
|
|
100
99
|
- **Error Handling** — trace what happens when things fail. What does the user see? What gets logged? Is there retry logic?
|
|
101
100
|
|
|
102
101
|
## Step 4 — Manifest
|
|
103
102
|
|
|
104
|
-
Create `vdocs/_manifest.json` using the schema in
|
|
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.
|
|
106
|
+
|
|
107
|
+
Example:
|
|
105
108
|
|
|
106
|
-
|
|
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
|
+
```
|
|
107
118
|
|
|
108
119
|
## Step 5 — Self-Review
|
|
109
120
|
|
|
@@ -116,10 +127,3 @@ Before finishing, verify:
|
|
|
116
127
|
- [ ] Every doc's "Related Features" references other doc filenames
|
|
117
128
|
- [ ] Manifest `description` is detailed enough for semantic routing
|
|
118
129
|
- [ ] No doc is just a shallow restatement of file names — each explains WHY and HOW
|
|
119
|
-
|
|
120
|
-
## Rules
|
|
121
|
-
|
|
122
|
-
1. **Feature-centric, not file-centric.** One doc per logical feature, not per source file.
|
|
123
|
-
2. **No hallucination.** Only document what exists in code.
|
|
124
|
-
3. **No scripts.** Do NOT create shell scripts, scanners, or build tools. Use Read/Glob/Grep.
|
|
125
|
-
4. **Plan first.** Never generate without user-approved plan.
|
|
@@ -51,7 +51,9 @@ This log is your working memory. It feeds directly into Step 2 (Plan).
|
|
|
51
51
|
|
|
52
52
|
## Step 2 — Plan
|
|
53
53
|
|
|
54
|
-
|
|
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.
|
|
55
|
+
|
|
56
|
+
Use this format:
|
|
55
57
|
|
|
56
58
|
```markdown
|
|
57
59
|
# Documentation Plan
|
|
@@ -68,7 +70,7 @@ Create `vdocs/_DOCUMENTATION_PLAN.md` listing each proposed doc:
|
|
|
68
70
|
- Docs should be useful for onboarding AND as AI context for planning changes
|
|
69
71
|
```
|
|
70
72
|
|
|
71
|
-
|
|
73
|
+
After writing the file, present the plan to the user. Actively suggest changes:
|
|
72
74
|
- "Should I merge X and Y into one doc?"
|
|
73
75
|
- "I found a websocket system — want that documented separately?"
|
|
74
76
|
- "Any internal/legacy systems I should skip?"
|
|
@@ -77,11 +79,15 @@ Wait for user approval before proceeding.
|
|
|
77
79
|
|
|
78
80
|
## Step 3 — Generate
|
|
79
81
|
|
|
80
|
-
|
|
82
|
+
Read the template from `references/doc-template.md` once before starting.
|
|
83
|
+
|
|
84
|
+
Then generate docs **one at a time, sequentially**. For each approved doc:
|
|
81
85
|
|
|
82
86
|
1. Read ALL relevant source files for that feature — not just the main file, but helpers, types, middleware, tests
|
|
83
|
-
2.
|
|
84
|
-
3.
|
|
87
|
+
2. Write `vdocs/FEATURE_NAME_DOC.md` following the template exactly
|
|
88
|
+
3. Confirm the file was written before moving to the next doc
|
|
89
|
+
|
|
90
|
+
Do NOT attempt to generate multiple docs from memory. Each doc is a fresh cycle: read sources → write doc → next.
|
|
85
91
|
|
|
86
92
|
**Writing rules:**
|
|
87
93
|
|
|
@@ -51,7 +51,9 @@ This log is your working memory. It feeds directly into Step 2 (Plan).
|
|
|
51
51
|
|
|
52
52
|
## Step 2 — Plan
|
|
53
53
|
|
|
54
|
-
|
|
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.
|
|
55
|
+
|
|
56
|
+
Use this format:
|
|
55
57
|
|
|
56
58
|
```markdown
|
|
57
59
|
# Documentation Plan
|
|
@@ -68,7 +70,7 @@ Create `vdocs/_DOCUMENTATION_PLAN.md` listing each proposed doc:
|
|
|
68
70
|
- Docs should be useful for onboarding AND as AI context for planning changes
|
|
69
71
|
```
|
|
70
72
|
|
|
71
|
-
|
|
73
|
+
After writing the file, present the plan to the user. Actively suggest changes:
|
|
72
74
|
- "Should I merge X and Y into one doc?"
|
|
73
75
|
- "I found a websocket system — want that documented separately?"
|
|
74
76
|
- "Any internal/legacy systems I should skip?"
|
|
@@ -77,11 +79,15 @@ Wait for user approval before proceeding.
|
|
|
77
79
|
|
|
78
80
|
## Step 3 — Generate
|
|
79
81
|
|
|
80
|
-
|
|
82
|
+
Read the template from `references/doc-template.md` once before starting.
|
|
83
|
+
|
|
84
|
+
Then generate docs **one at a time, sequentially**. For each approved doc:
|
|
81
85
|
|
|
82
86
|
1. Read ALL relevant source files for that feature — not just the main file, but helpers, types, middleware, tests
|
|
83
|
-
2.
|
|
84
|
-
3.
|
|
87
|
+
2. Write `vdocs/FEATURE_NAME_DOC.md` following the template exactly
|
|
88
|
+
3. Confirm the file was written before moving to the next doc
|
|
89
|
+
|
|
90
|
+
Do NOT attempt to generate multiple docs from memory. Each doc is a fresh cycle: read sources → write doc → next.
|
|
85
91
|
|
|
86
92
|
**Writing rules:**
|
|
87
93
|
|
|
@@ -51,7 +51,9 @@ This log is your working memory. It feeds directly into Step 2 (Plan).
|
|
|
51
51
|
|
|
52
52
|
## Step 2 — Plan
|
|
53
53
|
|
|
54
|
-
|
|
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.
|
|
55
|
+
|
|
56
|
+
Use this format:
|
|
55
57
|
|
|
56
58
|
```markdown
|
|
57
59
|
# Documentation Plan
|
|
@@ -68,7 +70,7 @@ Create `vdocs/_DOCUMENTATION_PLAN.md` listing each proposed doc:
|
|
|
68
70
|
- Docs should be useful for onboarding AND as AI context for planning changes
|
|
69
71
|
```
|
|
70
72
|
|
|
71
|
-
|
|
73
|
+
After writing the file, present the plan to the user. Actively suggest changes:
|
|
72
74
|
- "Should I merge X and Y into one doc?"
|
|
73
75
|
- "I found a websocket system — want that documented separately?"
|
|
74
76
|
- "Any internal/legacy systems I should skip?"
|
|
@@ -77,11 +79,15 @@ Wait for user approval before proceeding.
|
|
|
77
79
|
|
|
78
80
|
## Step 3 — Generate
|
|
79
81
|
|
|
80
|
-
|
|
82
|
+
Read the template from `references/doc-template.md` once before starting.
|
|
83
|
+
|
|
84
|
+
Then generate docs **one at a time, sequentially**. For each approved doc:
|
|
81
85
|
|
|
82
86
|
1. Read ALL relevant source files for that feature — not just the main file, but helpers, types, middleware, tests
|
|
83
|
-
2.
|
|
84
|
-
3.
|
|
87
|
+
2. Write `vdocs/FEATURE_NAME_DOC.md` following the template exactly
|
|
88
|
+
3. Confirm the file was written before moving to the next doc
|
|
89
|
+
|
|
90
|
+
Do NOT attempt to generate multiple docs from memory. Each doc is a fresh cycle: read sources → write doc → next.
|
|
85
91
|
|
|
86
92
|
**Writing rules:**
|
|
87
93
|
|
|
@@ -51,7 +51,9 @@ This log is your working memory. It feeds directly into Step 2 (Plan).
|
|
|
51
51
|
|
|
52
52
|
## Step 2 — Plan
|
|
53
53
|
|
|
54
|
-
|
|
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.
|
|
55
|
+
|
|
56
|
+
Use this format:
|
|
55
57
|
|
|
56
58
|
```markdown
|
|
57
59
|
# Documentation Plan
|
|
@@ -68,7 +70,7 @@ Create `vdocs/_DOCUMENTATION_PLAN.md` listing each proposed doc:
|
|
|
68
70
|
- Docs should be useful for onboarding AND as AI context for planning changes
|
|
69
71
|
```
|
|
70
72
|
|
|
71
|
-
|
|
73
|
+
After writing the file, present the plan to the user. Actively suggest changes:
|
|
72
74
|
- "Should I merge X and Y into one doc?"
|
|
73
75
|
- "I found a websocket system — want that documented separately?"
|
|
74
76
|
- "Any internal/legacy systems I should skip?"
|
|
@@ -77,11 +79,15 @@ Wait for user approval before proceeding.
|
|
|
77
79
|
|
|
78
80
|
## Step 3 — Generate
|
|
79
81
|
|
|
80
|
-
|
|
82
|
+
Read the template from `.gemini/vdoc/doc-template.md` once before starting.
|
|
83
|
+
|
|
84
|
+
Then generate docs **one at a time, sequentially**. For each approved doc:
|
|
81
85
|
|
|
82
86
|
1. Read ALL relevant source files for that feature — not just the main file, but helpers, types, middleware, tests
|
|
83
|
-
2.
|
|
84
|
-
3.
|
|
87
|
+
2. Write `vdocs/FEATURE_NAME_DOC.md` following the template exactly
|
|
88
|
+
3. Confirm the file was written before moving to the next doc
|
|
89
|
+
|
|
90
|
+
Do NOT attempt to generate multiple docs from memory. Each doc is a fresh cycle: read sources → write doc → next.
|
|
85
91
|
|
|
86
92
|
**Writing rules:**
|
|
87
93
|
|
package/skills/gemini/vdoc.toml
CHANGED
|
@@ -10,8 +10,8 @@ Run documentation workflows for this project. Full instructions are in GEMINI.md
|
|
|
10
10
|
## If "init" or no vdocs/ folder exists:
|
|
11
11
|
|
|
12
12
|
1. **Explore** — Read the codebase: tech stack, features, architecture, integrations, entry points. Read actual files.
|
|
13
|
-
2. **Plan** —
|
|
14
|
-
3. **Generate** —
|
|
13
|
+
2. **Plan** — Write `vdocs/_DOCUMENTATION_PLAN.md` to disk listing proposed docs. Present to user. Wait for approval.
|
|
14
|
+
3. **Generate** — Read template from @.gemini/vdoc/doc-template.md once. Then generate docs **one at a time**: read sources → write `vdocs/FEATURE_NAME_DOC.md` → confirm → next
|
|
15
15
|
4. **Manifest** — Create `vdocs/_manifest.json` using schema at @.gemini/vdoc/manifest-schema.json
|
|
16
16
|
5. **Verify** — Every doc has mermaid diagrams, real paths, 2+ constraints, cross-references.
|
|
17
17
|
|
|
@@ -51,7 +51,9 @@ This log is your working memory. It feeds directly into Step 2 (Plan).
|
|
|
51
51
|
|
|
52
52
|
## Step 2 — Plan
|
|
53
53
|
|
|
54
|
-
|
|
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.
|
|
55
|
+
|
|
56
|
+
Use this format:
|
|
55
57
|
|
|
56
58
|
```markdown
|
|
57
59
|
# Documentation Plan
|
|
@@ -68,7 +70,7 @@ Create `vdocs/_DOCUMENTATION_PLAN.md` listing each proposed doc:
|
|
|
68
70
|
- Docs should be useful for onboarding AND as AI context for planning changes
|
|
69
71
|
```
|
|
70
72
|
|
|
71
|
-
|
|
73
|
+
After writing the file, present the plan to the user. Actively suggest changes:
|
|
72
74
|
- "Should I merge X and Y into one doc?"
|
|
73
75
|
- "I found a websocket system — want that documented separately?"
|
|
74
76
|
- "Any internal/legacy systems I should skip?"
|
|
@@ -77,11 +79,15 @@ Wait for user approval before proceeding.
|
|
|
77
79
|
|
|
78
80
|
## Step 3 — Generate
|
|
79
81
|
|
|
80
|
-
|
|
82
|
+
Read the template from `.aiassistant/vdoc/doc-template.md` once before starting.
|
|
83
|
+
|
|
84
|
+
Then generate docs **one at a time, sequentially**. For each approved doc:
|
|
81
85
|
|
|
82
86
|
1. Read ALL relevant source files for that feature — not just the main file, but helpers, types, middleware, tests
|
|
83
|
-
2.
|
|
84
|
-
3.
|
|
87
|
+
2. Write `vdocs/FEATURE_NAME_DOC.md` following the template exactly
|
|
88
|
+
3. Confirm the file was written before moving to the next doc
|
|
89
|
+
|
|
90
|
+
Do NOT attempt to generate multiple docs from memory. Each doc is a fresh cycle: read sources → write doc → next.
|
|
85
91
|
|
|
86
92
|
**Writing rules:**
|
|
87
93
|
|
|
@@ -51,7 +51,9 @@ This log is your working memory. It feeds directly into Step 2 (Plan).
|
|
|
51
51
|
|
|
52
52
|
## Step 2 — Plan
|
|
53
53
|
|
|
54
|
-
|
|
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.
|
|
55
|
+
|
|
56
|
+
Use this format:
|
|
55
57
|
|
|
56
58
|
```markdown
|
|
57
59
|
# Documentation Plan
|
|
@@ -68,7 +70,7 @@ Create `vdocs/_DOCUMENTATION_PLAN.md` listing each proposed doc:
|
|
|
68
70
|
- Docs should be useful for onboarding AND as AI context for planning changes
|
|
69
71
|
```
|
|
70
72
|
|
|
71
|
-
|
|
73
|
+
After writing the file, present the plan to the user. Actively suggest changes:
|
|
72
74
|
- "Should I merge X and Y into one doc?"
|
|
73
75
|
- "I found a websocket system — want that documented separately?"
|
|
74
76
|
- "Any internal/legacy systems I should skip?"
|
|
@@ -77,11 +79,15 @@ Wait for user approval before proceeding.
|
|
|
77
79
|
|
|
78
80
|
## Step 3 — Generate
|
|
79
81
|
|
|
80
|
-
|
|
82
|
+
Read the template from `.junie/vdoc/doc-template.md` once before starting.
|
|
83
|
+
|
|
84
|
+
Then generate docs **one at a time, sequentially**. For each approved doc:
|
|
81
85
|
|
|
82
86
|
1. Read ALL relevant source files for that feature — not just the main file, but helpers, types, middleware, tests
|
|
83
|
-
2.
|
|
84
|
-
3.
|
|
87
|
+
2. Write `vdocs/FEATURE_NAME_DOC.md` following the template exactly
|
|
88
|
+
3. Confirm the file was written before moving to the next doc
|
|
89
|
+
|
|
90
|
+
Do NOT attempt to generate multiple docs from memory. Each doc is a fresh cycle: read sources → write doc → next.
|
|
85
91
|
|
|
86
92
|
**Writing rules:**
|
|
87
93
|
|
|
@@ -51,7 +51,9 @@ This log is your working memory. It feeds directly into Step 2 (Plan).
|
|
|
51
51
|
|
|
52
52
|
## Step 2 — Plan
|
|
53
53
|
|
|
54
|
-
|
|
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.
|
|
55
|
+
|
|
56
|
+
Use this format:
|
|
55
57
|
|
|
56
58
|
```markdown
|
|
57
59
|
# Documentation Plan
|
|
@@ -68,7 +70,7 @@ Create `vdocs/_DOCUMENTATION_PLAN.md` listing each proposed doc:
|
|
|
68
70
|
- Docs should be useful for onboarding AND as AI context for planning changes
|
|
69
71
|
```
|
|
70
72
|
|
|
71
|
-
|
|
73
|
+
After writing the file, present the plan to the user. Actively suggest changes:
|
|
72
74
|
- "Should I merge X and Y into one doc?"
|
|
73
75
|
- "I found a websocket system — want that documented separately?"
|
|
74
76
|
- "Any internal/legacy systems I should skip?"
|
|
@@ -77,11 +79,15 @@ Wait for user approval before proceeding.
|
|
|
77
79
|
|
|
78
80
|
## Step 3 — Generate
|
|
79
81
|
|
|
80
|
-
|
|
82
|
+
Read the template from [doc-template.md](./doc-template.md) once before starting.
|
|
83
|
+
|
|
84
|
+
Then generate docs **one at a time, sequentially**. For each approved doc:
|
|
81
85
|
|
|
82
86
|
1. Read ALL relevant source files for that feature — not just the main file, but helpers, types, middleware, tests
|
|
83
|
-
2.
|
|
84
|
-
3.
|
|
87
|
+
2. Write `vdocs/FEATURE_NAME_DOC.md` following the template exactly
|
|
88
|
+
3. Confirm the file was written before moving to the next doc
|
|
89
|
+
|
|
90
|
+
Do NOT attempt to generate multiple docs from memory. Each doc is a fresh cycle: read sources → write doc → next.
|
|
85
91
|
|
|
86
92
|
**Writing rules:**
|
|
87
93
|
|
|
@@ -51,7 +51,9 @@ This log is your working memory. It feeds directly into Step 2 (Plan).
|
|
|
51
51
|
|
|
52
52
|
## Step 2 — Plan
|
|
53
53
|
|
|
54
|
-
|
|
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.
|
|
55
|
+
|
|
56
|
+
Use this format:
|
|
55
57
|
|
|
56
58
|
```markdown
|
|
57
59
|
# Documentation Plan
|
|
@@ -68,7 +70,7 @@ Create `vdocs/_DOCUMENTATION_PLAN.md` listing each proposed doc:
|
|
|
68
70
|
- Docs should be useful for onboarding AND as AI context for planning changes
|
|
69
71
|
```
|
|
70
72
|
|
|
71
|
-
|
|
73
|
+
After writing the file, present the plan to the user. Actively suggest changes:
|
|
72
74
|
- "Should I merge X and Y into one doc?"
|
|
73
75
|
- "I found a websocket system — want that documented separately?"
|
|
74
76
|
- "Any internal/legacy systems I should skip?"
|
|
@@ -77,11 +79,15 @@ Wait for user approval before proceeding.
|
|
|
77
79
|
|
|
78
80
|
## Step 3 — Generate
|
|
79
81
|
|
|
80
|
-
|
|
82
|
+
Read the template from `resources/doc-template.md` once before starting.
|
|
83
|
+
|
|
84
|
+
Then generate docs **one at a time, sequentially**. For each approved doc:
|
|
81
85
|
|
|
82
86
|
1. Read ALL relevant source files for that feature — not just the main file, but helpers, types, middleware, tests
|
|
83
|
-
2.
|
|
84
|
-
3.
|
|
87
|
+
2. Write `vdocs/FEATURE_NAME_DOC.md` following the template exactly
|
|
88
|
+
3. Confirm the file was written before moving to the next doc
|
|
89
|
+
|
|
90
|
+
Do NOT attempt to generate multiple docs from memory. Each doc is a fresh cycle: read sources → write doc → next.
|
|
85
91
|
|
|
86
92
|
**Writing rules:**
|
|
87
93
|
|
|
@@ -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.
|