@esthernandez/vibe-doc 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/.claude-plugin/plugin.json +8 -0
  2. package/commands/check.md +7 -0
  3. package/commands/generate.md +11 -0
  4. package/commands/scan.md +11 -0
  5. package/commands/status.md +7 -0
  6. package/dist/classifier/index.js +9 -0
  7. package/dist/classifier/llm-prompt.d.ts.map +1 -1
  8. package/dist/classifier/llm-prompt.js +1 -0
  9. package/dist/classifier/scoring-engine.d.ts +2 -1
  10. package/dist/classifier/scoring-engine.d.ts.map +1 -1
  11. package/dist/classifier/scoring-engine.js +16 -0
  12. package/dist/classifier/signals.d.ts.map +1 -1
  13. package/dist/classifier/signals.js +46 -7
  14. package/dist/gap-analyzer/breadcrumbs.d.ts.map +1 -1
  15. package/dist/gap-analyzer/breadcrumbs.js +77 -0
  16. package/dist/gap-analyzer/matrix.d.ts +5 -1
  17. package/dist/gap-analyzer/matrix.d.ts.map +1 -1
  18. package/dist/gap-analyzer/matrix.js +51 -0
  19. package/dist/gap-analyzer/tier-assigner.d.ts.map +1 -1
  20. package/dist/gap-analyzer/tier-assigner.js +14 -2
  21. package/dist/generator/docx-writer.d.ts.map +1 -1
  22. package/dist/generator/docx-writer.js +13 -1
  23. package/dist/generator/extractor.d.ts.map +1 -1
  24. package/dist/generator/extractor.js +91 -0
  25. package/dist/generator/markdown-writer.d.ts.map +1 -1
  26. package/dist/generator/markdown-writer.js +13 -1
  27. package/dist/scanner/file-scanner.d.ts.map +1 -1
  28. package/dist/scanner/file-scanner.js +10 -2
  29. package/dist/templates/embedded/adr.md +45 -0
  30. package/dist/templates/embedded/api-spec.md +55 -0
  31. package/dist/templates/embedded/changelog-contributing.md +67 -0
  32. package/dist/templates/embedded/data-model.md +55 -0
  33. package/dist/templates/embedded/deployment-procedure.md +63 -0
  34. package/dist/templates/embedded/install-guide.md +49 -0
  35. package/dist/templates/embedded/readme.md +55 -0
  36. package/dist/templates/embedded/runbook.md +55 -0
  37. package/dist/templates/embedded/skill-command-reference.md +77 -0
  38. package/dist/templates/embedded/test-plan.md +55 -0
  39. package/dist/templates/embedded/threat-model.md +47 -0
  40. package/dist/templates/index.d.ts +13 -0
  41. package/dist/templates/index.d.ts.map +1 -1
  42. package/dist/templates/index.js +18 -7
  43. package/dist/templates/renderer.d.ts.map +1 -1
  44. package/dist/templates/renderer.js +3 -1
  45. package/package.json +4 -1
  46. package/skills/check/SKILL.md +302 -0
  47. package/skills/generate/SKILL.md +391 -0
  48. package/skills/guide/AGENT_GUIDE.md +318 -0
  49. package/skills/guide/SKILL.md +270 -0
  50. package/skills/guide/references/breadcrumb-heuristics.md +441 -0
  51. package/skills/guide/references/classification-taxonomy.md +391 -0
  52. package/skills/guide/references/documentation-matrix.md +297 -0
  53. package/skills/scan/SKILL.md +219 -0
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "vibe-doc",
3
+ "version": "0.2.3",
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
@@ -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.
@@ -106,6 +106,8 @@ function buildLowConfidenceClassification(ruleResults, inventory) {
106
106
  function mapCategoryToDeploymentContext(category, contexts) {
107
107
  const result = [];
108
108
  // Determine platform based on category
109
+ // TODO: these platform/environment/scale strings are untyped magic strings —
110
+ // worth promoting to enums when the classifier gets its next overhaul.
109
111
  let platform = 'cloud';
110
112
  if (category === scoring_engine_1.Category.MobileApplication) {
111
113
  platform = 'mobile';
@@ -113,6 +115,9 @@ function mapCategoryToDeploymentContext(category, contexts) {
113
115
  else if (category === scoring_engine_1.Category.InfrastructurePlatform) {
114
116
  platform = 'kubernetes';
115
117
  }
118
+ else if (category === scoring_engine_1.Category.ClaudeCodePlugin) {
119
+ platform = 'plugin';
120
+ }
116
121
  // Check for EdgeEmbedded context
117
122
  if (contexts.includes(scoring_engine_1.Context.EdgeEmbedded)) {
118
123
  platform = 'edge';
@@ -122,6 +127,10 @@ function mapCategoryToDeploymentContext(category, contexts) {
122
127
  if (contexts.includes(scoring_engine_1.Context.InternalTooling)) {
123
128
  environment = 'staging';
124
129
  }
130
+ if (category === scoring_engine_1.Category.ClaudeCodePlugin) {
131
+ // Plugins are distributed, not deployed in the SaaS sense
132
+ environment = 'distribution';
133
+ }
125
134
  // Determine scale based on contexts
126
135
  let scale = 'small';
127
136
  if (contexts.includes(scoring_engine_1.Context.CustomerFacing)) {
@@ -1 +1 @@
1
- {"version":3,"file":"llm-prompt.d.ts","sourceRoot":"","sources":["../../src/classifier/llm-prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAA+B,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE9E;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,iBAAiB,EAC5B,WAAW,EAAE,aAAa,GACzB,MAAM,CA0DR"}
1
+ {"version":3,"file":"llm-prompt.d.ts","sourceRoot":"","sources":["../../src/classifier/llm-prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAA+B,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE9E;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,iBAAiB,EAC5B,WAAW,EAAE,aAAa,GACzB,MAAM,CA2DR"}
@@ -39,6 +39,7 @@ Choose ONE primary category that best describes this project:
39
39
  - **MobileApplication**: Native or cross-platform mobile apps
40
40
  - **AIMLSystem**: ML/AI-focused projects with models, training, inference
41
41
  - **IntegrationConnector**: Adapters, SDKs, connectors for third-party services
42
+ - **ClaudeCodePlugin**: A Claude Code plugin or plugin marketplace — characterized by a .claude-plugin/plugin.json manifest, skills/*/SKILL.md files, commands/*.md files, or a .claude-plugin/marketplace.json. No runtime deployment in the traditional sense; distributed to users via npm or a marketplace.
42
43
 
43
44
  ## Operational Contexts
44
45
 
@@ -10,7 +10,8 @@ export declare enum Category {
10
10
  InfrastructurePlatform = "InfrastructurePlatform",
11
11
  MobileApplication = "MobileApplication",
12
12
  AIMLSystem = "AIMLSystem",
13
- IntegrationConnector = "IntegrationConnector"
13
+ IntegrationConnector = "IntegrationConnector",
14
+ ClaudeCodePlugin = "ClaudeCodePlugin"
14
15
  }
15
16
  export declare enum Context {
16
17
  Regulated = "Regulated",
@@ -1 +1 @@
1
- {"version":3,"file":"scoring-engine.d.ts","sourceRoot":"","sources":["../../src/classifier/scoring-engine.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGnC,oBAAY,QAAQ;IAClB,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IACnC,YAAY,iBAAiB;IAC7B,sBAAsB,2BAA2B;IACjD,iBAAiB,sBAAsB;IACvC,UAAU,eAAe;IACzB,oBAAoB,yBAAyB;CAC9C;AAED,oBAAY,OAAO;IACjB,SAAS,cAAc;IACvB,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IACnC,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;CAC9B;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EAAE,EACjB,mBAAmB,GAAE,MAAa,GACjC,aAAa,CAuMf"}
1
+ {"version":3,"file":"scoring-engine.d.ts","sourceRoot":"","sources":["../../src/classifier/scoring-engine.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGnC,oBAAY,QAAQ;IAClB,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IACnC,YAAY,iBAAiB;IAC7B,sBAAsB,2BAA2B;IACjD,iBAAiB,sBAAsB;IACvC,UAAU,eAAe;IACzB,oBAAoB,yBAAyB;IAC7C,gBAAgB,qBAAqB;CACtC;AAED,oBAAY,OAAO;IACjB,SAAS,cAAc;IACvB,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IACnC,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;CAC9B;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EAAE,EACjB,mBAAmB,GAAE,MAAa,GACjC,aAAa,CA0Nf"}
@@ -16,6 +16,7 @@ var Category;
16
16
  Category["MobileApplication"] = "MobileApplication";
17
17
  Category["AIMLSystem"] = "AIMLSystem";
18
18
  Category["IntegrationConnector"] = "IntegrationConnector";
19
+ Category["ClaudeCodePlugin"] = "ClaudeCodePlugin";
19
20
  })(Category || (exports.Category = Category = {}));
20
21
  var Context;
21
22
  (function (Context) {
@@ -160,6 +161,21 @@ function scoreClassification(signals, confidenceThreshold = 0.85) {
160
161
  case 'has-github-actions':
161
162
  contextScores[Context.InternalTooling] += 1 * w;
162
163
  break;
164
+ // Claude Code Plugin signals
165
+ // Weighted to dominate: plugin.json is an unambiguous marker that
166
+ // overrides any incidental web/framework signals in the repo.
167
+ case 'has-claude-plugin-manifest':
168
+ categoryScores[Category.ClaudeCodePlugin] += 20 * w;
169
+ break;
170
+ case 'has-claude-skill-files':
171
+ categoryScores[Category.ClaudeCodePlugin] += 8 * w;
172
+ break;
173
+ case 'has-claude-command-files':
174
+ categoryScores[Category.ClaudeCodePlugin] += 6 * w;
175
+ break;
176
+ case 'has-claude-marketplace':
177
+ categoryScores[Category.ClaudeCodePlugin] += 10 * w;
178
+ break;
163
179
  default:
164
180
  logger_1.logger.warn(`Unknown signal: ${signal.name}`);
165
181
  }
@@ -1 +1 @@
1
- {"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../../src/classifier/signals.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGpD,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,iBAAiB,GAAG,MAAM,EAAE,CAgWrE"}
1
+ {"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../../src/classifier/signals.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGpD,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,iBAAiB,GAAG,MAAM,EAAE,CAkZrE"}
@@ -12,16 +12,20 @@ const logger_1 = require("../utils/logger");
12
12
  */
13
13
  function extractSignals(inventory) {
14
14
  const signals = [];
15
+ // Normalize paths to forward slashes before any substring matching —
16
+ // otherwise Windows backslash paths break signal detection for anything
17
+ // that looks across path components (.github/workflows, .claude-plugin/...)
18
+ const norm = (s) => s.replace(/\\/g, '/').toLowerCase();
15
19
  // Source code patterns
16
- const sourceFiles = inventory.categories.sourceCode.files.join('|').toLowerCase();
17
- const configFiles = inventory.categories.configuration.files.join('|').toLowerCase();
18
- const infraFiles = inventory.categories.infrastructure.files.join('|').toLowerCase();
19
- const docFiles = inventory.categories.documentation.files.join('|').toLowerCase();
20
- const allFiles = inventory.categories.sourceCode.files
20
+ const sourceFiles = norm(inventory.categories.sourceCode.files.join('|'));
21
+ const configFiles = norm(inventory.categories.configuration.files.join('|'));
22
+ const infraFiles = norm(inventory.categories.infrastructure.files.join('|'));
23
+ const docFiles = norm(inventory.categories.documentation.files.join('|'));
24
+ const allFiles = norm(inventory.categories.sourceCode.files
21
25
  .concat(inventory.categories.configuration.files)
22
26
  .concat(inventory.categories.infrastructure.files)
23
- .join('|')
24
- .toLowerCase();
27
+ .concat(inventory.categories.documentation.files)
28
+ .join('|'));
25
29
  // Express/Fastify/Koa routes
26
30
  if (sourceFiles.includes('routes') || sourceFiles.includes('controller')) {
27
31
  if (allFiles.includes('express') ||
@@ -300,6 +304,41 @@ function extractSignals(inventory) {
300
304
  weight: 1,
301
305
  });
302
306
  }
307
+ // Claude Code Plugin manifest — the dominant signal for plugin repos.
308
+ // Path-anchored to avoid false positives on stray files named plugin.json.
309
+ if (configFiles.includes('.claude-plugin/plugin.json') ||
310
+ allFiles.includes('.claude-plugin/plugin.json')) {
311
+ signals.push({
312
+ name: 'has-claude-plugin-manifest',
313
+ source: 'file-scanner',
314
+ weight: 10,
315
+ });
316
+ }
317
+ // Claude Code marketplace manifest (multi-plugin repo)
318
+ if (configFiles.includes('.claude-plugin/marketplace.json') ||
319
+ allFiles.includes('.claude-plugin/marketplace.json')) {
320
+ signals.push({
321
+ name: 'has-claude-marketplace',
322
+ source: 'file-scanner',
323
+ weight: 8,
324
+ });
325
+ }
326
+ // SKILL.md files under a skills/ directory (plugin skill surface)
327
+ if (docFiles.match(/\/skills\/[^/|]+\/skill\.md/)) {
328
+ signals.push({
329
+ name: 'has-claude-skill-files',
330
+ source: 'file-scanner',
331
+ weight: 6,
332
+ });
333
+ }
334
+ // Command markdown files under a commands/ directory
335
+ if (docFiles.match(/\/commands\/[^/|]+\.md/)) {
336
+ signals.push({
337
+ name: 'has-claude-command-files',
338
+ source: 'file-scanner',
339
+ weight: 5,
340
+ });
341
+ }
303
342
  logger_1.logger.debug(`Extracted ${signals.length} signals from inventory`);
304
343
  return signals;
305
344
  }
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/gap-analyzer/breadcrumbs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAsT1D"}
1
+ {"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/gap-analyzer/breadcrumbs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAuY1D"}
@@ -296,6 +296,83 @@ function getBreadcrumbs(docType) {
296
296
  'What indexing strategy do you use?',
297
297
  ],
298
298
  },
299
+ readme: {
300
+ docType: 'readme',
301
+ keywords: ['readme'],
302
+ filePatterns: ['**/README.md', '**/README', '**/README.*'],
303
+ gitPatterns: ['readme:', 'docs: readme', 'docs:readme'],
304
+ codePatterns: [],
305
+ // Single-file docs: presence of the file is the satisfaction signal.
306
+ // The generate-time template enforces the sections; the gap analyzer
307
+ // only needs to know "does a README exist anywhere?"
308
+ requiredSections: ['present'],
309
+ gapQuestions: [
310
+ 'What does your project actually do, in one sentence?',
311
+ 'How does a new user install and run it for the first time?',
312
+ 'What does a minimal working example look like?',
313
+ 'Where should someone go next after reading the README?',
314
+ ],
315
+ },
316
+ 'install-guide': {
317
+ docType: 'install-guide',
318
+ keywords: ['install', 'setup', 'getting-started'],
319
+ filePatterns: [
320
+ '**/INSTALL.md',
321
+ '**/INSTALLATION.md',
322
+ '**/docs/install*',
323
+ '**/docs/setup*',
324
+ '**/docs/getting-started*',
325
+ ],
326
+ gitPatterns: ['install:', 'setup:', 'docs: install'],
327
+ codePatterns: [],
328
+ requiredSections: ['present'],
329
+ gapQuestions: [
330
+ 'What does a user need before installing (OS, runtimes, accounts)?',
331
+ 'What is the exact command or set of steps to install?',
332
+ 'How does a user verify the install worked?',
333
+ 'What are the most common installation problems and fixes?',
334
+ ],
335
+ },
336
+ 'skill-command-reference': {
337
+ docType: 'skill-command-reference',
338
+ keywords: ['skill', 'command'],
339
+ filePatterns: [
340
+ '**/SKILL.md',
341
+ '**/skills/**',
342
+ '**/commands/**',
343
+ '**/docs/commands*',
344
+ '**/docs/skills*',
345
+ ],
346
+ gitPatterns: ['skill:', 'command:', 'docs: skill'],
347
+ codePatterns: ['SKILL.md', 'description:', 'commands/'],
348
+ requiredSections: ['present'],
349
+ gapQuestions: [
350
+ 'What skills or slash commands does this plugin expose?',
351
+ 'For each, what does it do and when should someone reach for it?',
352
+ 'What arguments or inputs does each command accept?',
353
+ 'What does typical output look like?',
354
+ ],
355
+ },
356
+ 'changelog-contributing': {
357
+ docType: 'changelog-contributing',
358
+ keywords: ['changelog', 'contributing', 'history'],
359
+ filePatterns: [
360
+ '**/CHANGELOG.md',
361
+ '**/CONTRIBUTING.md',
362
+ '**/HISTORY.md',
363
+ '**/docs/releases*',
364
+ '**/docs/contributing*',
365
+ ],
366
+ gitPatterns: ['release:', 'changelog:', 'docs: changelog'],
367
+ codePatterns: [],
368
+ requiredSections: ['present'],
369
+ gapQuestions: [
370
+ 'Where do you track notable changes between releases?',
371
+ 'How should a contributor get set up and propose changes?',
372
+ 'What is the review and merge process?',
373
+ 'Is there a code of conduct for contributors?',
374
+ ],
375
+ },
299
376
  };
300
377
  const breadcrumb = breadcrumbs[docType];
301
378
  if (!breadcrumb) {
@@ -9,7 +9,11 @@ export declare enum DocType {
9
9
  APISpec = "api-spec",
10
10
  DeploymentProcedure = "deployment-procedure",
11
11
  TestPlan = "test-plan",
12
- DataModel = "data-model"
12
+ DataModel = "data-model",
13
+ README = "readme",
14
+ InstallGuide = "install-guide",
15
+ SkillCommandReference = "skill-command-reference",
16
+ ChangelogContributing = "changelog-contributing"
13
17
  }
14
18
  export declare enum Tier {
15
19
  Required = "required",
@@ -1 +1 @@
1
- {"version":3,"file":"matrix.d.ts","sourceRoot":"","sources":["../../src/gap-analyzer/matrix.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,oBAAY,OAAO;IACjB,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,WAAW,iBAAiB;IAC5B,OAAO,aAAa;IACpB,mBAAmB,yBAAyB;IAC5C,QAAQ,cAAc;IACtB,SAAS,eAAe;CACzB;AAED,oBAAY,IAAI;IACd,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAuED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAAE,GACjB,cAAc,EAAE,CAmDlB"}
1
+ {"version":3,"file":"matrix.d.ts","sourceRoot":"","sources":["../../src/gap-analyzer/matrix.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,oBAAY,OAAO;IACjB,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,WAAW,iBAAiB;IAC5B,OAAO,aAAa;IACpB,mBAAmB,yBAAyB;IAC5C,QAAQ,cAAc;IACtB,SAAS,eAAe;IACxB,MAAM,WAAW;IACjB,YAAY,kBAAkB;IAC9B,qBAAqB,4BAA4B;IACjD,qBAAqB,2BAA2B;CACjD;AAED,oBAAY,IAAI;IACd,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAsHD;;GAEG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAAE,GACjB,cAAc,EAAE,CAmDlB"}
@@ -16,6 +16,10 @@ var DocType;
16
16
  DocType["DeploymentProcedure"] = "deployment-procedure";
17
17
  DocType["TestPlan"] = "test-plan";
18
18
  DocType["DataModel"] = "data-model";
19
+ DocType["README"] = "readme";
20
+ DocType["InstallGuide"] = "install-guide";
21
+ DocType["SkillCommandReference"] = "skill-command-reference";
22
+ DocType["ChangelogContributing"] = "changelog-contributing";
19
23
  })(DocType || (exports.DocType = DocType = {}));
20
24
  var Tier;
21
25
  (function (Tier) {
@@ -35,6 +39,7 @@ const BASE_MATRIX = {
35
39
  MobileApplication: Tier.Recommended,
36
40
  AIMLSystem: Tier.Recommended,
37
41
  IntegrationConnector: Tier.Recommended,
42
+ ClaudeCodePlugin: Tier.Recommended,
38
43
  },
39
44
  [DocType.Runbook]: {
40
45
  WebApplication: Tier.Required,
@@ -44,6 +49,7 @@ const BASE_MATRIX = {
44
49
  MobileApplication: Tier.Required,
45
50
  AIMLSystem: Tier.Required,
46
51
  IntegrationConnector: Tier.Recommended,
52
+ ClaudeCodePlugin: Tier.Optional,
47
53
  },
48
54
  [DocType.ThreatModel]: {
49
55
  WebApplication: Tier.Recommended,
@@ -53,6 +59,7 @@ const BASE_MATRIX = {
53
59
  MobileApplication: Tier.Required,
54
60
  AIMLSystem: Tier.Required,
55
61
  IntegrationConnector: Tier.Recommended,
62
+ ClaudeCodePlugin: Tier.Optional,
56
63
  },
57
64
  [DocType.APISpec]: {
58
65
  WebApplication: Tier.Required,
@@ -62,6 +69,7 @@ const BASE_MATRIX = {
62
69
  MobileApplication: Tier.Recommended,
63
70
  AIMLSystem: Tier.Recommended,
64
71
  IntegrationConnector: Tier.Required,
72
+ ClaudeCodePlugin: Tier.Optional,
65
73
  },
66
74
  [DocType.DeploymentProcedure]: {
67
75
  WebApplication: Tier.Required,
@@ -71,6 +79,7 @@ const BASE_MATRIX = {
71
79
  MobileApplication: Tier.Required,
72
80
  AIMLSystem: Tier.Required,
73
81
  IntegrationConnector: Tier.Recommended,
82
+ ClaudeCodePlugin: Tier.Optional,
74
83
  },
75
84
  [DocType.TestPlan]: {
76
85
  WebApplication: Tier.Recommended,
@@ -80,6 +89,7 @@ const BASE_MATRIX = {
80
89
  MobileApplication: Tier.Required,
81
90
  AIMLSystem: Tier.Required,
82
91
  IntegrationConnector: Tier.Recommended,
92
+ ClaudeCodePlugin: Tier.Recommended,
83
93
  },
84
94
  [DocType.DataModel]: {
85
95
  WebApplication: Tier.Required,
@@ -89,6 +99,47 @@ const BASE_MATRIX = {
89
99
  MobileApplication: Tier.Recommended,
90
100
  AIMLSystem: Tier.Required,
91
101
  IntegrationConnector: Tier.Optional,
102
+ ClaudeCodePlugin: Tier.Optional,
103
+ },
104
+ [DocType.README]: {
105
+ WebApplication: Tier.Required,
106
+ APIMicroservice: Tier.Required,
107
+ DataPipeline: Tier.Required,
108
+ InfrastructurePlatform: Tier.Required,
109
+ MobileApplication: Tier.Required,
110
+ AIMLSystem: Tier.Required,
111
+ IntegrationConnector: Tier.Required,
112
+ ClaudeCodePlugin: Tier.Required,
113
+ },
114
+ [DocType.InstallGuide]: {
115
+ WebApplication: Tier.Recommended,
116
+ APIMicroservice: Tier.Recommended,
117
+ DataPipeline: Tier.Recommended,
118
+ InfrastructurePlatform: Tier.Required,
119
+ MobileApplication: Tier.Required,
120
+ AIMLSystem: Tier.Recommended,
121
+ IntegrationConnector: Tier.Required,
122
+ ClaudeCodePlugin: Tier.Required,
123
+ },
124
+ [DocType.SkillCommandReference]: {
125
+ WebApplication: Tier.Optional,
126
+ APIMicroservice: Tier.Optional,
127
+ DataPipeline: Tier.Optional,
128
+ InfrastructurePlatform: Tier.Optional,
129
+ MobileApplication: Tier.Optional,
130
+ AIMLSystem: Tier.Optional,
131
+ IntegrationConnector: Tier.Recommended,
132
+ ClaudeCodePlugin: Tier.Required,
133
+ },
134
+ [DocType.ChangelogContributing]: {
135
+ WebApplication: Tier.Recommended,
136
+ APIMicroservice: Tier.Recommended,
137
+ DataPipeline: Tier.Recommended,
138
+ InfrastructurePlatform: Tier.Recommended,
139
+ MobileApplication: Tier.Recommended,
140
+ AIMLSystem: Tier.Recommended,
141
+ IntegrationConnector: Tier.Recommended,
142
+ ClaudeCodePlugin: Tier.Recommended,
92
143
  },
93
144
  };
94
145
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"tier-assigner.d.ts","sourceRoot":"","sources":["../../src/gap-analyzer/tier-assigner.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAkB,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3D,MAAM,WAAW,GAAG;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,YAAY,EAAE,cAAc,EAAE,EAC9B,SAAS,EAAE,iBAAiB,EAC5B,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,GACnC,GAAG,EAAE,CA+BP;AAmGD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"tier-assigner.d.ts","sourceRoot":"","sources":["../../src/gap-analyzer/tier-assigner.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAkB,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3D,MAAM,WAAW,GAAG;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,YAAY,EAAE,cAAc,EAAE,EAC9B,SAAS,EAAE,iBAAiB,EAC5B,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,GACnC,GAAG,EAAE,CA+BP;AAiHD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
@@ -67,19 +67,31 @@ function searchForDocumentationEvidence(breadcrumb, inventory) {
67
67
  }
68
68
  /**
69
69
  * Simple glob pattern matcher
70
+ * Normalizes Windows backslashes to forward slashes so glob patterns
71
+ * that reference path segments (e.g., "** /docs/adr/**") work cross-platform.
70
72
  */
71
73
  function matchPattern(filePath, pattern) {
72
74
  const regex = patternToRegex(pattern);
73
- return regex.test(filePath.toLowerCase());
75
+ const normalized = filePath.replace(/\\/g, '/').toLowerCase();
76
+ return regex.test(normalized);
74
77
  }
75
78
  /**
76
79
  * Convert glob pattern to regex
80
+ *
81
+ * Uses a placeholder for `**` to prevent the subsequent `*` → `[^/]*`
82
+ * replacement from clobbering the `*` inside `.*`. A naive two-pass
83
+ * replacement silently produced `.[^/]*` for every `**` pattern,
84
+ * which broke glob matching for every doc type.
77
85
  */
78
86
  function patternToRegex(pattern) {
87
+ // Escape regex-special characters first
79
88
  const escaped = pattern.replace(/[.+^${}()|[\]\\]/g, '\\$&');
89
+ // Use a placeholder token that can't appear in a normal path
90
+ const DOUBLE_STAR = '\u0000DOUBLESTAR\u0000';
80
91
  const globRegex = escaped
81
- .replace(/\*\*/g, '.*')
92
+ .replace(/\*\*/g, DOUBLE_STAR)
82
93
  .replace(/\*/g, '[^/]*')
94
+ .replace(new RegExp(DOUBLE_STAR, 'g'), '.*')
83
95
  .replace(/\?/g, '.');
84
96
  return new RegExp(`^${globRegex}$`, 'i');
85
97
  }
@@ -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;AAOhD;;;;;;;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"}
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 v0.1.0`,
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;AAib/C;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,YAAY,EACnB,WAAW,GAAE,MAAsB,GAClC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA2CxB"}
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;AAMH;;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"}
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"}