@esthernandez/vibe-doc 0.2.2 → 0.3.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/.claude-plugin/plugin.json +8 -0
- package/commands/check.md +7 -0
- package/commands/generate.md +11 -0
- package/commands/scan.md +11 -0
- package/commands/status.md +7 -0
- package/dist/generator/docx-writer.d.ts.map +1 -1
- package/dist/generator/docx-writer.js +13 -1
- package/dist/generator/extractor.d.ts.map +1 -1
- package/dist/generator/extractor.js +91 -0
- package/dist/generator/markdown-writer.d.ts.map +1 -1
- package/dist/generator/markdown-writer.js +13 -1
- package/dist/templates/index.d.ts +13 -0
- package/dist/templates/index.d.ts.map +1 -1
- package/dist/templates/index.js +14 -7
- package/dist/templates/renderer.d.ts.map +1 -1
- package/dist/templates/renderer.js +3 -1
- package/package.json +4 -1
- package/skills/check/SKILL.md +302 -0
- package/skills/generate/SKILL.md +359 -0
- package/skills/guide/AGENT_GUIDE.md +318 -0
- package/skills/guide/SKILL.md +270 -0
- package/skills/guide/references/breadcrumb-heuristics.md +441 -0
- package/skills/guide/references/classification-taxonomy.md +391 -0
- package/skills/guide/references/documentation-matrix.md +297 -0
- package/skills/scan/SKILL.md +219 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "vibe-doc",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "AI-powered documentation gap analyzer. Scans your codebase, classifies your project, identifies missing technical documentation, and generates professional docs from your existing artifacts.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "626Labs LLC"
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Check documentation completeness for deployment
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `${CLAUDE_PLUGIN_ROOT}/skills/check/SKILL.md` and follow its instructions to run a CI-safe documentation check.
|
|
6
|
+
|
|
7
|
+
Run `npx vibe-doc check` in the user's project directory. Present pass/fail results clearly. If docs are missing or stale, suggest running `/generate` to fix gaps.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Generate missing documentation
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `${CLAUDE_PLUGIN_ROOT}/skills/generate/SKILL.md` and follow its full conversational flow to generate documentation for identified gaps.
|
|
6
|
+
|
|
7
|
+
The generate skill will guide you through:
|
|
8
|
+
1. Reviewing the current gap report
|
|
9
|
+
2. Selecting which gaps to address
|
|
10
|
+
3. Asking synthesis questions per doc type
|
|
11
|
+
4. Generating markdown and/or docx output
|
package/commands/scan.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Scan your project for documentation gaps
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read `${CLAUDE_PLUGIN_ROOT}/skills/scan/SKILL.md` and follow its full conversational flow to scan the user's project, classify it, and generate a documentation gap report.
|
|
6
|
+
|
|
7
|
+
The scan skill will guide you through:
|
|
8
|
+
1. Entry gate (context vs cold start)
|
|
9
|
+
2. Artifact inventory scan via CLI
|
|
10
|
+
3. Classification with user confirmation
|
|
11
|
+
4. Gap report presentation
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Show current Vibe Doc status
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Run `npx vibe-doc status` in the user's project directory via bash. Present the output in a clean format showing last scan time, classification, and documentation coverage.
|
|
6
|
+
|
|
7
|
+
If no state exists, tell the user to run `/scan` first.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docx-writer.d.ts","sourceRoot":"","sources":["../../src/generator/docx-writer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAoBH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"docx-writer.d.ts","sourceRoot":"","sources":["../../src/generator/docx-writer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAoBH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAmBhD;;;;;;;GAOG;AACH,wBAAsB,SAAS,CAC7B,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,WAAW,GACpB,OAAO,CAAC,MAAM,CAAC,CA0CjB"}
|
|
@@ -42,6 +42,18 @@ const path = __importStar(require("path"));
|
|
|
42
42
|
const fs = __importStar(require("fs"));
|
|
43
43
|
const docx_1 = require("docx");
|
|
44
44
|
const logger_1 = require("../utils/logger");
|
|
45
|
+
// Resolve vibe-doc's own version at module load time so generated docs
|
|
46
|
+
// stamp the correct tool version. __dirname in dist/generator/ is one
|
|
47
|
+
// level below the package root.
|
|
48
|
+
const pkgVersion = (() => {
|
|
49
|
+
try {
|
|
50
|
+
const pkgPath = path.resolve(__dirname, '..', '..', 'package.json');
|
|
51
|
+
return JSON.parse(fs.readFileSync(pkgPath, 'utf-8')).version;
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return 'unknown';
|
|
55
|
+
}
|
|
56
|
+
})();
|
|
45
57
|
// Color scheme
|
|
46
58
|
const NAVY = '1B2A4A';
|
|
47
59
|
const STEEL = '3D5A80';
|
|
@@ -101,7 +113,7 @@ function parseMarkdownContent(content, docType, metadata) {
|
|
|
101
113
|
let isFirstH1 = true;
|
|
102
114
|
// Add metadata header as paragraphs
|
|
103
115
|
sections.push(new docx_1.Paragraph({
|
|
104
|
-
text: `Generated by Vibe Doc
|
|
116
|
+
text: `Generated by Vibe Doc v${pkgVersion}`,
|
|
105
117
|
spacing: { line: 240, lineRule: 'auto' },
|
|
106
118
|
}));
|
|
107
119
|
sections.push(new docx_1.Paragraph({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../../src/generator/extractor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../../src/generator/extractor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AA+gB/C;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,YAAY,EACnB,WAAW,GAAE,MAAsB,GAClC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAuDxB"}
|
|
@@ -413,6 +413,85 @@ function extractThreatModel(projectPath, state) {
|
|
|
413
413
|
}
|
|
414
414
|
return result;
|
|
415
415
|
}
|
|
416
|
+
/**
|
|
417
|
+
* Extract data for README template.
|
|
418
|
+
* Pulls project name and description from package.json when available.
|
|
419
|
+
*/
|
|
420
|
+
function extractReadme(projectPath, _state) {
|
|
421
|
+
const pkg = readPackageJson(projectPath);
|
|
422
|
+
const extracted = {};
|
|
423
|
+
if (pkg?.name) {
|
|
424
|
+
extracted.projectName = pkg.name;
|
|
425
|
+
}
|
|
426
|
+
if (pkg?.description) {
|
|
427
|
+
extracted.tagline = pkg.description;
|
|
428
|
+
extracted.overview = pkg.description;
|
|
429
|
+
}
|
|
430
|
+
// Try to surface a reasonable install command for npm packages
|
|
431
|
+
if (pkg?.name) {
|
|
432
|
+
extracted.installation = `\`\`\`bash\nnpm install ${pkg.name}\n\`\`\``;
|
|
433
|
+
}
|
|
434
|
+
return extracted;
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* Extract data for Install Guide template.
|
|
438
|
+
* Uses package.json engines field for Node version prerequisites.
|
|
439
|
+
*/
|
|
440
|
+
function extractInstallGuide(projectPath, _state) {
|
|
441
|
+
const pkg = readPackageJson(projectPath);
|
|
442
|
+
const extracted = {};
|
|
443
|
+
const prereqParts = [];
|
|
444
|
+
if (pkg?.engines?.node) {
|
|
445
|
+
prereqParts.push(`- Node.js ${pkg.engines.node}`);
|
|
446
|
+
}
|
|
447
|
+
if (pkg?.engines && Object.keys(pkg.engines).length > 0) {
|
|
448
|
+
for (const [engine, version] of Object.entries(pkg.engines)) {
|
|
449
|
+
if (engine !== 'node') {
|
|
450
|
+
prereqParts.push(`- ${engine} ${version}`);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
if (prereqParts.length > 0) {
|
|
455
|
+
extracted.prerequisites = prereqParts.join('\n');
|
|
456
|
+
}
|
|
457
|
+
if (pkg?.name) {
|
|
458
|
+
extracted.installSteps = `\`\`\`bash\nnpm install -g ${pkg.name}\n\`\`\``;
|
|
459
|
+
}
|
|
460
|
+
return extracted;
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Extract data for Skill/Command Reference template.
|
|
464
|
+
* Lists SKILL.md files and commands/*.md files from the documentation inventory.
|
|
465
|
+
*/
|
|
466
|
+
function extractSkillCommandReference(_projectPath, state) {
|
|
467
|
+
const extracted = {};
|
|
468
|
+
const docFiles = state.artifactInventory?.categories?.documentation?.files ?? [];
|
|
469
|
+
const normalizedDocs = docFiles.map((f) => f.replace(/\\/g, '/'));
|
|
470
|
+
const skillFiles = normalizedDocs.filter((f) => /\/skills\/[^/]+\/SKILL\.md$/i.test(f));
|
|
471
|
+
const commandFiles = normalizedDocs.filter((f) => /\/commands\/[^/]+\.md$/i.test(f));
|
|
472
|
+
if (skillFiles.length > 0) {
|
|
473
|
+
const skillNames = skillFiles.map((f) => {
|
|
474
|
+
const match = f.match(/\/skills\/([^/]+)\//);
|
|
475
|
+
return match ? `- \`${match[1]}\`` : null;
|
|
476
|
+
}).filter(Boolean);
|
|
477
|
+
extracted.skillList = skillNames.join('\n');
|
|
478
|
+
}
|
|
479
|
+
if (commandFiles.length > 0) {
|
|
480
|
+
const commandNames = commandFiles.map((f) => {
|
|
481
|
+
const name = path.basename(f, '.md');
|
|
482
|
+
return `- \`/${name}\``;
|
|
483
|
+
});
|
|
484
|
+
extracted.commandList = commandNames.join('\n');
|
|
485
|
+
}
|
|
486
|
+
return extracted;
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* Extract data for Changelog/Contributing template.
|
|
490
|
+
* Minimal — the template is mostly user-filled.
|
|
491
|
+
*/
|
|
492
|
+
function extractChangelogContributing(_projectPath, _state) {
|
|
493
|
+
return {};
|
|
494
|
+
}
|
|
416
495
|
/**
|
|
417
496
|
* Main extraction function - maps doc type to specific extractor
|
|
418
497
|
*/
|
|
@@ -442,6 +521,18 @@ function extractDataForDocType(docType, state, projectPath = process.cwd()) {
|
|
|
442
521
|
case 'threat-model':
|
|
443
522
|
extracted = extractThreatModel(projectPath, state);
|
|
444
523
|
break;
|
|
524
|
+
case 'readme':
|
|
525
|
+
extracted = extractReadme(projectPath, state);
|
|
526
|
+
break;
|
|
527
|
+
case 'install-guide':
|
|
528
|
+
extracted = extractInstallGuide(projectPath, state);
|
|
529
|
+
break;
|
|
530
|
+
case 'skill-command-reference':
|
|
531
|
+
extracted = extractSkillCommandReference(projectPath, state);
|
|
532
|
+
break;
|
|
533
|
+
case 'changelog-contributing':
|
|
534
|
+
extracted = extractChangelogContributing(projectPath, state);
|
|
535
|
+
break;
|
|
445
536
|
default:
|
|
446
537
|
logger_1.logger.warn('Unknown doc type for extraction', { docType });
|
|
447
538
|
extracted = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-writer.d.ts","sourceRoot":"","sources":["../../src/generator/markdown-writer.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"markdown-writer.d.ts","sourceRoot":"","sources":["../../src/generator/markdown-writer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkBH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,WAAW,GACpB,MAAM,CAyBR"}
|
|
@@ -41,6 +41,18 @@ exports.writeMarkdown = writeMarkdown;
|
|
|
41
41
|
const path = __importStar(require("path"));
|
|
42
42
|
const fs = __importStar(require("fs"));
|
|
43
43
|
const logger_1 = require("../utils/logger");
|
|
44
|
+
// Resolve vibe-doc's own version at module load time so generated docs
|
|
45
|
+
// stamp the correct tool version. __dirname in dist/generator/ is one
|
|
46
|
+
// level below the package root.
|
|
47
|
+
const pkgVersion = (() => {
|
|
48
|
+
try {
|
|
49
|
+
const pkgPath = path.resolve(__dirname, '..', '..', 'package.json');
|
|
50
|
+
return JSON.parse(fs.readFileSync(pkgPath, 'utf-8')).version;
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
return 'unknown';
|
|
54
|
+
}
|
|
55
|
+
})();
|
|
44
56
|
/**
|
|
45
57
|
* Write rendered content to a markdown file with metadata header
|
|
46
58
|
* @param renderedContent - The rendered markdown content
|
|
@@ -75,7 +87,7 @@ function writeMarkdown(renderedContent, docType, projectPath, metadata) {
|
|
|
75
87
|
*/
|
|
76
88
|
function generateMetadataHeader(metadata, docType) {
|
|
77
89
|
const lines = [
|
|
78
|
-
|
|
90
|
+
`<!-- Generated by Vibe Doc v${pkgVersion} -->`,
|
|
79
91
|
`<!-- Date: ${metadata.generatedAt} -->`,
|
|
80
92
|
`<!-- Classification: ${metadata.classification} -->`,
|
|
81
93
|
`<!-- Source artifacts: ${metadata.sourceArtifacts} files scanned -->`,
|
|
@@ -10,6 +10,19 @@
|
|
|
10
10
|
export declare function loadTemplate(docType: string, cacheDir?: string): string;
|
|
11
11
|
/**
|
|
12
12
|
* Get path to the embedded template file
|
|
13
|
+
*
|
|
14
|
+
* __dirname at runtime is dist/templates/ (compiled from src/templates/index.ts).
|
|
15
|
+
* Templates are copied to dist/templates/embedded/ by scripts/copy-templates.js.
|
|
16
|
+
* So the templates directory relative to __dirname is just ./embedded/.
|
|
17
|
+
*
|
|
18
|
+
* The same path works in dev under tsx, where __dirname is src/templates/ and
|
|
19
|
+
* templates live at src/templates/embedded/.
|
|
20
|
+
*
|
|
21
|
+
* This was historically broken: the function looked for
|
|
22
|
+
* `__dirname/templates/embedded/` which produced `dist/templates/templates/embedded/`
|
|
23
|
+
* in published packages (nested "templates" directory). Combined with the
|
|
24
|
+
* copy-templates.js fast-glob bug (fixed in v0.2.2), template loading failed
|
|
25
|
+
* in every published version before v0.2.3.
|
|
13
26
|
*/
|
|
14
27
|
export declare function getTemplatePath(docType: string): string;
|
|
15
28
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAuBvE;AAED
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAuBvE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAGvD;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,EAAE,CAgBxC;AAED,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/templates/index.js
CHANGED
|
@@ -76,15 +76,22 @@ function loadTemplate(docType, cacheDir) {
|
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
78
|
* Get path to the embedded template file
|
|
79
|
+
*
|
|
80
|
+
* __dirname at runtime is dist/templates/ (compiled from src/templates/index.ts).
|
|
81
|
+
* Templates are copied to dist/templates/embedded/ by scripts/copy-templates.js.
|
|
82
|
+
* So the templates directory relative to __dirname is just ./embedded/.
|
|
83
|
+
*
|
|
84
|
+
* The same path works in dev under tsx, where __dirname is src/templates/ and
|
|
85
|
+
* templates live at src/templates/embedded/.
|
|
86
|
+
*
|
|
87
|
+
* This was historically broken: the function looked for
|
|
88
|
+
* `__dirname/templates/embedded/` which produced `dist/templates/templates/embedded/`
|
|
89
|
+
* in published packages (nested "templates" directory). Combined with the
|
|
90
|
+
* copy-templates.js fast-glob bug (fixed in v0.2.2), template loading failed
|
|
91
|
+
* in every published version before v0.2.3.
|
|
79
92
|
*/
|
|
80
93
|
function getTemplatePath(docType) {
|
|
81
|
-
|
|
82
|
-
// Look for templates in both src (dev) and dist (prod) locations
|
|
83
|
-
let templatesDir = path.join(__dirname, 'templates', 'embedded');
|
|
84
|
-
// In development, __dirname points to src/templates, so adjust
|
|
85
|
-
if (!fs.existsSync(templatesDir)) {
|
|
86
|
-
templatesDir = path.join(__dirname, '..', '..', 'src', 'templates', 'embedded');
|
|
87
|
-
}
|
|
94
|
+
const templatesDir = path.join(__dirname, 'embedded');
|
|
88
95
|
return path.join(templatesDir, `${docType}.md`);
|
|
89
96
|
}
|
|
90
97
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/templates/renderer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,QAAQ,EAAE;QACR,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,MAAM,CAAC;QACpB,cAAc,EAAE,MAAM,CAAC;QACvB,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAaD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/templates/renderer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,QAAQ,EAAE;QACR,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,MAAM,CAAC;QACpB,cAAc,EAAE,MAAM,CAAC;QACvB,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAaD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,CA0FzE"}
|
|
@@ -17,7 +17,9 @@ function renderTemplate(template, data) {
|
|
|
17
17
|
let rendered = template;
|
|
18
18
|
const confidenceLevels = [];
|
|
19
19
|
// Extract all token patterns
|
|
20
|
-
|
|
20
|
+
// Supports both kebab-case (existing convention: service-overview) and
|
|
21
|
+
// camelCase (new plugin-oriented templates: installSteps).
|
|
22
|
+
const tokenPattern = /\{\{(extracted|user)\.([a-zA-Z0-9\-]+)\}\}/g;
|
|
21
23
|
const tokens = new Map();
|
|
22
24
|
let match;
|
|
23
25
|
while ((match = tokenPattern.exec(template)) !== null) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esthernandez/vibe-doc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "AI-powered documentation gap analyzer and generator for modern codebases. Scans your project, classifies your architecture, and generates professional docs from your existing artifacts.",
|
|
5
5
|
"author": "626Labs LLC",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
"types": "./dist/index.d.ts",
|
|
25
25
|
"files": [
|
|
26
26
|
"dist",
|
|
27
|
+
"skills",
|
|
28
|
+
"commands",
|
|
29
|
+
".claude-plugin",
|
|
27
30
|
"README.md"
|
|
28
31
|
],
|
|
29
32
|
"scripts": {
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: check
|
|
3
|
+
description: >
|
|
4
|
+
This skill should be used when the user mentions "check my docs",
|
|
5
|
+
"am I ready to deploy", "documentation check", "CI check",
|
|
6
|
+
"are my docs current", "deployment readiness", or wants to verify
|
|
7
|
+
their project meets documentation requirements before shipping.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Vibe Doc Check Skill
|
|
11
|
+
|
|
12
|
+
Simple CI-safe validation: verify that Required documentation exists and is current.
|
|
13
|
+
|
|
14
|
+
**Shared behavior:** Read `skills/guide/SKILL.md` for state management, CLI patterns, and output formatting.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Conversational Flow
|
|
19
|
+
|
|
20
|
+
### 1. Run Check Command
|
|
21
|
+
|
|
22
|
+
Execute the validation:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
cd <project-path> && npx vibe-doc check .
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
### 2. Present Results
|
|
31
|
+
|
|
32
|
+
**If check passes:**
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
✓ Documentation Check PASSED
|
|
36
|
+
|
|
37
|
+
Your project meets all Required documentation standards.
|
|
38
|
+
|
|
39
|
+
Status Summary:
|
|
40
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
41
|
+
|
|
42
|
+
Classification: Web Application (Regulated, Customer-Facing)
|
|
43
|
+
|
|
44
|
+
Required Docs:
|
|
45
|
+
✓ Threat Model
|
|
46
|
+
✓ Architecture Decision Records
|
|
47
|
+
✓ Runbook
|
|
48
|
+
✓ Test Plan
|
|
49
|
+
|
|
50
|
+
All 4 required documents exist and are current.
|
|
51
|
+
Last generated: 2026-04-05 (6 days ago)
|
|
52
|
+
Last significant changes: 2026-04-08 (3 commits)
|
|
53
|
+
|
|
54
|
+
Status: CURRENT (no staleness concerns)
|
|
55
|
+
|
|
56
|
+
Next steps:
|
|
57
|
+
• Continue development
|
|
58
|
+
• Regenerate docs if major changes land (e.g., new deployment target, architecture pivot)
|
|
59
|
+
• Or just re-run this check before each deployment
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
**If check fails:**
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
✗ Documentation Check FAILED
|
|
68
|
+
|
|
69
|
+
Your project is missing or has stale Required documentation.
|
|
70
|
+
|
|
71
|
+
Classification: Web Application (Regulated, Customer-Facing)
|
|
72
|
+
|
|
73
|
+
Required Docs:
|
|
74
|
+
✓ Threat Model (current)
|
|
75
|
+
✗ Architecture Decision Records (MISSING)
|
|
76
|
+
✓ Runbook (STALE — 18 commits, last generated 2026-03-25)
|
|
77
|
+
✗ Test Plan (MISSING)
|
|
78
|
+
|
|
79
|
+
Status: 1 of 4 docs current (25%)
|
|
80
|
+
|
|
81
|
+
Why stale or missing?
|
|
82
|
+
• Runbook: 18 commits landed since generation, including deployment config changes
|
|
83
|
+
• ADRs: No generation history (may never have been created)
|
|
84
|
+
• Test Plan: No generation history (may never have been created)
|
|
85
|
+
|
|
86
|
+
Risk: HIGH — Cannot deploy with missing Required docs
|
|
87
|
+
|
|
88
|
+
Next steps to fix:
|
|
89
|
+
|
|
90
|
+
Option 1: Quick regeneration (5-10 min)
|
|
91
|
+
Run the Generate skill to refresh stale docs and create missing ones.
|
|
92
|
+
|
|
93
|
+
Option 2: Manual review
|
|
94
|
+
If you've already created these docs manually (not via Vibe Doc):
|
|
95
|
+
1. Review docs/generated/ to see what exists
|
|
96
|
+
2. Run Scan skill to update your project profile
|
|
97
|
+
3. Then re-run this check
|
|
98
|
+
|
|
99
|
+
Option 3: Mark as not-applicable
|
|
100
|
+
If a Required doc doesn't apply to your project:
|
|
101
|
+
1. Update your classification in the Scan skill
|
|
102
|
+
2. Re-run this check
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
### 3. Next Steps Checkpoint
|
|
108
|
+
|
|
109
|
+
Ask user how to proceed:
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
[regenerate] → Run the Generate skill to fix gaps
|
|
113
|
+
[scan] → Update project profile with Scan skill
|
|
114
|
+
[review] → I'll show you what's in docs/generated/
|
|
115
|
+
[exit] → Done with check (I'll report failure to CI)
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**If user picks "regenerate":**
|
|
119
|
+
- Transition to Generate skill with pre-selected stale/missing docs
|
|
120
|
+
|
|
121
|
+
**If user picks "scan":**
|
|
122
|
+
- Transition to Scan skill
|
|
123
|
+
|
|
124
|
+
**If user picks "review":**
|
|
125
|
+
- Show contents summary of docs/generated/ folder
|
|
126
|
+
- List which Required docs exist and their last-modified dates
|
|
127
|
+
|
|
128
|
+
**If user picks "exit":**
|
|
129
|
+
- Show exit code for CI integration
|
|
130
|
+
- Provide command to add to pipeline
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## CI/CD Integration
|
|
135
|
+
|
|
136
|
+
The check command is designed to be CI-safe. Show user how to integrate:
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
To add this check to your CI/CD pipeline:
|
|
140
|
+
|
|
141
|
+
GitHub Actions example:
|
|
142
|
+
|
|
143
|
+
name: Documentation Check
|
|
144
|
+
on: [push, pull_request]
|
|
145
|
+
|
|
146
|
+
jobs:
|
|
147
|
+
vibe-doc-check:
|
|
148
|
+
runs-on: ubuntu-latest
|
|
149
|
+
steps:
|
|
150
|
+
- uses: actions/checkout@v4
|
|
151
|
+
- uses: actions/setup-node@v4
|
|
152
|
+
with:
|
|
153
|
+
node-version: '20'
|
|
154
|
+
- run: npm install -g vibe-doc
|
|
155
|
+
- run: npx vibe-doc check .
|
|
156
|
+
# Command exits with:
|
|
157
|
+
# 0 = all Required docs exist and current
|
|
158
|
+
# 1 = missing or stale Required docs
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Other CI systems (GitLab CI, CircleCI, Jenkins):
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
# Run this command in your pipeline
|
|
165
|
+
npx vibe-doc check .
|
|
166
|
+
|
|
167
|
+
# Exit codes:
|
|
168
|
+
# 0 = PASS (deploy allowed)
|
|
169
|
+
# 1 = FAIL (deploy blocked)
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Exit Codes & Automation
|
|
175
|
+
|
|
176
|
+
The `check` command returns standard exit codes:
|
|
177
|
+
|
|
178
|
+
| Exit Code | Meaning | Action |
|
|
179
|
+
|-----------|---------|--------|
|
|
180
|
+
| `0` | All Required docs exist and are current | Deployment can proceed |
|
|
181
|
+
| `1` | Missing or stale Required docs | Deployment blocked; regenerate docs |
|
|
182
|
+
|
|
183
|
+
**Use in CI conditionals:**
|
|
184
|
+
|
|
185
|
+
```yaml
|
|
186
|
+
# GitHub Actions
|
|
187
|
+
- run: npx vibe-doc check .
|
|
188
|
+
continue-on-error: true # Optional: allow preview deployments on fail
|
|
189
|
+
|
|
190
|
+
- name: Report Status
|
|
191
|
+
if: success()
|
|
192
|
+
run: echo "Documentation verified ✓"
|
|
193
|
+
|
|
194
|
+
- name: Report Status
|
|
195
|
+
if: failure()
|
|
196
|
+
run: |
|
|
197
|
+
echo "Documentation check failed ✗"
|
|
198
|
+
echo "Regenerate docs before merging: run Generate skill"
|
|
199
|
+
exit 1
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Error Handling
|
|
205
|
+
|
|
206
|
+
### No Classification Profile
|
|
207
|
+
|
|
208
|
+
If no scan has been run:
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
Documentation check requires a project profile.
|
|
212
|
+
|
|
213
|
+
Run the Scan skill first to:
|
|
214
|
+
• Analyze your project's artifacts
|
|
215
|
+
• Classify your app type
|
|
216
|
+
• Identify what documentation you need
|
|
217
|
+
|
|
218
|
+
Then re-run this check.
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Check Command Fails
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
Check command failed: [error message]
|
|
225
|
+
|
|
226
|
+
This usually means:
|
|
227
|
+
• No .vibe-doc/state.json file (run Scan first)
|
|
228
|
+
• Corrupted state file
|
|
229
|
+
• File system permissions issue
|
|
230
|
+
|
|
231
|
+
Next steps:
|
|
232
|
+
1. Run Scan skill to create/repair project profile
|
|
233
|
+
2. Then re-run check
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### Ambiguous Staleness
|
|
237
|
+
|
|
238
|
+
If a doc's staleness is unclear (code changed but impact unknown):
|
|
239
|
+
|
|
240
|
+
```
|
|
241
|
+
⚠ Uncertain Staleness: Runbook
|
|
242
|
+
|
|
243
|
+
This doc was generated on 2026-03-25. Since then:
|
|
244
|
+
• 18 commits (mostly feature work)
|
|
245
|
+
• 3 commits touched deployment configs
|
|
246
|
+
• 1 commit changed environment variables
|
|
247
|
+
|
|
248
|
+
The doc may be outdated, but I'm not 100% certain.
|
|
249
|
+
|
|
250
|
+
[regenerate] → Re-create the doc to be safe
|
|
251
|
+
[keep] → The doc is still accurate (skip regeneration)
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## State & Output
|
|
257
|
+
|
|
258
|
+
**Read from `.vibe-doc/state.json`:**
|
|
259
|
+
- Classification (which Required docs apply)
|
|
260
|
+
- Generated doc metadata (timestamps, file locations)
|
|
261
|
+
- Generation history (to detect staleness)
|
|
262
|
+
|
|
263
|
+
**Output to user:**
|
|
264
|
+
- Pass/fail status
|
|
265
|
+
- List of missing/stale/current docs
|
|
266
|
+
- Exit code for CI
|
|
267
|
+
|
|
268
|
+
**No files created or modified by this skill.**
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## Use Cases
|
|
273
|
+
|
|
274
|
+
**Developer before local deployment:**
|
|
275
|
+
```
|
|
276
|
+
npx vibe-doc check .
|
|
277
|
+
# → Verify docs are current before deploying to staging
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
**CI pipeline (on every push):**
|
|
281
|
+
```
|
|
282
|
+
# Block merge if Required docs are missing
|
|
283
|
+
if ! npx vibe-doc check .; then
|
|
284
|
+
exit 1
|
|
285
|
+
fi
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
**CI pipeline (allow preview on fail):**
|
|
289
|
+
```
|
|
290
|
+
# Allow preview deployments, but warn on missing docs
|
|
291
|
+
npx vibe-doc check . || true
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
**Scheduled check (weekly reminder):**
|
|
295
|
+
```
|
|
296
|
+
# Every Monday, check if docs have gone stale
|
|
297
|
+
# If docs are >2 weeks old, alert the team
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
**Last updated:** 2026-04-11 | **Version:** 1.0
|