@esthernandez/vibe-doc 0.1.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.
Files changed (95) hide show
  1. package/dist/checker/index.d.ts +34 -0
  2. package/dist/checker/index.d.ts.map +1 -0
  3. package/dist/checker/index.js +154 -0
  4. package/dist/checker/staleness.d.ts +26 -0
  5. package/dist/checker/staleness.d.ts.map +1 -0
  6. package/dist/checker/staleness.js +56 -0
  7. package/dist/classifier/index.d.ts +26 -0
  8. package/dist/classifier/index.d.ts.map +1 -0
  9. package/dist/classifier/index.js +146 -0
  10. package/dist/classifier/llm-prompt.d.ts +12 -0
  11. package/dist/classifier/llm-prompt.d.ts.map +1 -0
  12. package/dist/classifier/llm-prompt.js +123 -0
  13. package/dist/classifier/scoring-engine.d.ts +41 -0
  14. package/dist/classifier/scoring-engine.d.ts.map +1 -0
  15. package/dist/classifier/scoring-engine.js +197 -0
  16. package/dist/classifier/signals.d.ts +16 -0
  17. package/dist/classifier/signals.d.ts.map +1 -0
  18. package/dist/classifier/signals.js +305 -0
  19. package/dist/gap-analyzer/breadcrumbs.d.ts +18 -0
  20. package/dist/gap-analyzer/breadcrumbs.d.ts.map +1 -0
  21. package/dist/gap-analyzer/breadcrumbs.js +314 -0
  22. package/dist/gap-analyzer/index.d.ts +13 -0
  23. package/dist/gap-analyzer/index.d.ts.map +1 -0
  24. package/dist/gap-analyzer/index.js +88 -0
  25. package/dist/gap-analyzer/matrix.d.ts +29 -0
  26. package/dist/gap-analyzer/matrix.d.ts.map +1 -0
  27. package/dist/gap-analyzer/matrix.js +137 -0
  28. package/dist/gap-analyzer/tier-assigner.d.ts +22 -0
  29. package/dist/gap-analyzer/tier-assigner.d.ts.map +1 -0
  30. package/dist/gap-analyzer/tier-assigner.js +112 -0
  31. package/dist/generator/docx-writer.d.ts +15 -0
  32. package/dist/generator/docx-writer.d.ts.map +1 -0
  33. package/dist/generator/docx-writer.js +271 -0
  34. package/dist/generator/extractor.d.ts +11 -0
  35. package/dist/generator/extractor.d.ts.map +1 -0
  36. package/dist/generator/extractor.js +459 -0
  37. package/dist/generator/index.d.ts +25 -0
  38. package/dist/generator/index.d.ts.map +1 -0
  39. package/dist/generator/index.js +106 -0
  40. package/dist/generator/markdown-writer.d.ts +27 -0
  41. package/dist/generator/markdown-writer.d.ts.map +1 -0
  42. package/dist/generator/markdown-writer.js +85 -0
  43. package/dist/index.d.ts +7 -0
  44. package/dist/index.d.ts.map +1 -0
  45. package/dist/index.js +372 -0
  46. package/dist/scanner/artifact-scanner.d.ts +16 -0
  47. package/dist/scanner/artifact-scanner.d.ts.map +1 -0
  48. package/dist/scanner/artifact-scanner.js +189 -0
  49. package/dist/scanner/code-scanner.d.ts +17 -0
  50. package/dist/scanner/code-scanner.d.ts.map +1 -0
  51. package/dist/scanner/code-scanner.js +69 -0
  52. package/dist/scanner/file-scanner.d.ts +16 -0
  53. package/dist/scanner/file-scanner.d.ts.map +1 -0
  54. package/dist/scanner/file-scanner.js +119 -0
  55. package/dist/scanner/git-scanner.d.ts +10 -0
  56. package/dist/scanner/git-scanner.d.ts.map +1 -0
  57. package/dist/scanner/git-scanner.js +120 -0
  58. package/dist/scanner/index.d.ts +15 -0
  59. package/dist/scanner/index.d.ts.map +1 -0
  60. package/dist/scanner/index.js +106 -0
  61. package/dist/state/index.d.ts +20 -0
  62. package/dist/state/index.d.ts.map +1 -0
  63. package/dist/state/index.js +141 -0
  64. package/dist/state/schema.d.ts +101 -0
  65. package/dist/state/schema.d.ts.map +1 -0
  66. package/dist/state/schema.js +6 -0
  67. package/dist/templates/embedded/adr.md +45 -0
  68. package/dist/templates/embedded/api-spec.md +55 -0
  69. package/dist/templates/embedded/data-model.md +55 -0
  70. package/dist/templates/embedded/deployment-procedure.md +63 -0
  71. package/dist/templates/embedded/runbook.md +55 -0
  72. package/dist/templates/embedded/test-plan.md +55 -0
  73. package/dist/templates/embedded/threat-model.md +47 -0
  74. package/dist/templates/index.d.ts +20 -0
  75. package/dist/templates/index.d.ts.map +1 -0
  76. package/dist/templates/index.js +106 -0
  77. package/dist/templates/registry.d.ts +31 -0
  78. package/dist/templates/registry.d.ts.map +1 -0
  79. package/dist/templates/registry.js +172 -0
  80. package/dist/templates/renderer.d.ts +26 -0
  81. package/dist/templates/renderer.d.ts.map +1 -0
  82. package/dist/templates/renderer.js +145 -0
  83. package/dist/utils/language-detect.d.ts +14 -0
  84. package/dist/utils/language-detect.d.ts.map +1 -0
  85. package/dist/utils/language-detect.js +58 -0
  86. package/dist/utils/logger.d.ts +16 -0
  87. package/dist/utils/logger.d.ts.map +1 -0
  88. package/dist/utils/logger.js +35 -0
  89. package/dist/versioning/differ.d.ts +20 -0
  90. package/dist/versioning/differ.d.ts.map +1 -0
  91. package/dist/versioning/differ.js +160 -0
  92. package/dist/versioning/index.d.ts +44 -0
  93. package/dist/versioning/index.d.ts.map +1 -0
  94. package/dist/versioning/index.js +165 -0
  95. package/package.json +40 -0
@@ -0,0 +1,197 @@
1
+ "use strict";
2
+ /**
3
+ * Scoring Engine Module
4
+ * Rule-based matrix for categorizing projects and contexts
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Context = exports.Category = void 0;
8
+ exports.scoreClassification = scoreClassification;
9
+ const logger_1 = require("../utils/logger");
10
+ var Category;
11
+ (function (Category) {
12
+ Category["WebApplication"] = "WebApplication";
13
+ Category["APIMicroservice"] = "APIMicroservice";
14
+ Category["DataPipeline"] = "DataPipeline";
15
+ Category["InfrastructurePlatform"] = "InfrastructurePlatform";
16
+ Category["MobileApplication"] = "MobileApplication";
17
+ Category["AIMLSystem"] = "AIMLSystem";
18
+ Category["IntegrationConnector"] = "IntegrationConnector";
19
+ })(Category || (exports.Category = Category = {}));
20
+ var Context;
21
+ (function (Context) {
22
+ Context["Regulated"] = "Regulated";
23
+ Context["CustomerFacing"] = "CustomerFacing";
24
+ Context["InternalTooling"] = "InternalTooling";
25
+ Context["MultiTenant"] = "MultiTenant";
26
+ Context["EdgeEmbedded"] = "EdgeEmbedded";
27
+ })(Context || (exports.Context = Context = {}));
28
+ /**
29
+ * Score classification based on signals
30
+ * @param signals - Array of detected signals
31
+ * @param confidenceThreshold - Threshold for high confidence classification (default: 0.85)
32
+ */
33
+ function scoreClassification(signals, confidenceThreshold = 0.85) {
34
+ const categoryScores = {};
35
+ const contextScores = {};
36
+ // Initialize scores
37
+ Object.values(Category).forEach((cat) => {
38
+ categoryScores[cat] = 0;
39
+ });
40
+ Object.values(Context).forEach((ctx) => {
41
+ contextScores[ctx] = 0;
42
+ });
43
+ // Apply signal scoring rules
44
+ for (const signal of signals) {
45
+ const w = signal.weight;
46
+ switch (signal.name) {
47
+ // Web framework signals
48
+ case 'has-express-routes':
49
+ categoryScores[Category.WebApplication] += 3 * w;
50
+ categoryScores[Category.APIMicroservice] += 3 * w;
51
+ break;
52
+ // Frontend signals
53
+ case 'has-react-components':
54
+ categoryScores[Category.WebApplication] += 4 * w;
55
+ break;
56
+ // Infrastructure signals
57
+ case 'has-dockerfile':
58
+ Object.values(Category).forEach((cat) => {
59
+ categoryScores[cat] += 1 * w;
60
+ });
61
+ break;
62
+ case 'has-terraform':
63
+ categoryScores[Category.InfrastructurePlatform] += 4 * w;
64
+ break;
65
+ // Python web framework signals
66
+ case 'has-flask-fastapi-django':
67
+ categoryScores[Category.WebApplication] += 3 * w;
68
+ categoryScores[Category.APIMicroservice] += 3 * w;
69
+ break;
70
+ // ML signals
71
+ case 'has-ml-model-files':
72
+ categoryScores[Category.AIMLSystem] += 5 * w;
73
+ break;
74
+ case 'has-ml-dependencies':
75
+ categoryScores[Category.AIMLSystem] += 4 * w;
76
+ break;
77
+ // Data pipeline signals
78
+ case 'has-etl-pipeline-keywords':
79
+ categoryScores[Category.DataPipeline] += 4 * w;
80
+ break;
81
+ // Mobile signals
82
+ case 'has-mobile-configs':
83
+ categoryScores[Category.MobileApplication] += 5 * w;
84
+ break;
85
+ // Integration signals
86
+ case 'has-third-party-api-clients':
87
+ categoryScores[Category.IntegrationConnector] += 3 * w;
88
+ break;
89
+ // Context signals
90
+ case 'has-compliance-requirements':
91
+ contextScores[Context.Regulated] += 5 * w;
92
+ break;
93
+ case 'has-rbac-tenant-patterns':
94
+ contextScores[Context.MultiTenant] += 3 * w;
95
+ break;
96
+ case 'has-sla-uptime-mentions':
97
+ contextScores[Context.CustomerFacing] += 3 * w;
98
+ break;
99
+ case 'has-internal-tooling':
100
+ contextScores[Context.InternalTooling] += 3 * w;
101
+ break;
102
+ // Quality signals
103
+ case 'has-tests':
104
+ // Boost all categories slightly
105
+ Object.values(Category).forEach((cat) => {
106
+ categoryScores[cat] += 0.5 * w;
107
+ });
108
+ break;
109
+ case 'has-api-spec':
110
+ categoryScores[Category.APIMicroservice] += 3 * w;
111
+ categoryScores[Category.WebApplication] += 1 * w;
112
+ break;
113
+ case 'has-microservices-pattern':
114
+ categoryScores[Category.APIMicroservice] += 2 * w;
115
+ categoryScores[Category.InfrastructurePlatform] += 1 * w;
116
+ break;
117
+ case 'has-database-orm':
118
+ categoryScores[Category.WebApplication] += 1 * w;
119
+ categoryScores[Category.APIMicroservice] += 1.5 * w;
120
+ categoryScores[Category.DataPipeline] += 1 * w;
121
+ break;
122
+ case 'has-monitoring-logging':
123
+ categoryScores[Category.InfrastructurePlatform] += 2 * w;
124
+ contextScores[Context.CustomerFacing] += 1 * w;
125
+ break;
126
+ // New 626Labs-specific signals
127
+ case 'has-firebase':
128
+ categoryScores[Category.WebApplication] += 3 * w;
129
+ categoryScores[Category.APIMicroservice] += 2 * w;
130
+ break;
131
+ case 'has-vite-config':
132
+ categoryScores[Category.WebApplication] += 2 * w;
133
+ break;
134
+ case 'has-tailwind':
135
+ categoryScores[Category.WebApplication] += 1 * w;
136
+ break;
137
+ case 'has-nextjs-nuxt':
138
+ categoryScores[Category.WebApplication] += 4 * w;
139
+ break;
140
+ case 'has-cloud-functions':
141
+ categoryScores[Category.APIMicroservice] += 3 * w;
142
+ categoryScores[Category.WebApplication] += 1 * w;
143
+ break;
144
+ case 'has-ai-sdk':
145
+ categoryScores[Category.AIMLSystem] += 3 * w;
146
+ categoryScores[Category.WebApplication] += 1 * w;
147
+ break;
148
+ case 'has-mcp-server':
149
+ categoryScores[Category.APIMicroservice] += 2 * w;
150
+ categoryScores[Category.IntegrationConnector] += 2 * w;
151
+ break;
152
+ case 'has-state-management':
153
+ categoryScores[Category.WebApplication] += 2 * w;
154
+ break;
155
+ case 'has-e2e-testing':
156
+ Object.values(Category).forEach((cat) => {
157
+ categoryScores[cat] += 0.5 * w;
158
+ });
159
+ break;
160
+ case 'has-github-actions':
161
+ contextScores[Context.InternalTooling] += 1 * w;
162
+ break;
163
+ default:
164
+ logger_1.logger.warn(`Unknown signal: ${signal.name}`);
165
+ }
166
+ }
167
+ // Build sorted category results
168
+ const sortedCategories = Object.entries(categoryScores)
169
+ .map(([category, score]) => ({
170
+ category: category,
171
+ score,
172
+ }))
173
+ .sort((a, b) => b.score - a.score);
174
+ // Build context results (filter out zero scores)
175
+ const activeContexts = Object.entries(contextScores)
176
+ .filter(([_, score]) => score > 0)
177
+ .map(([context, score]) => ({
178
+ context: context,
179
+ score,
180
+ }))
181
+ .sort((a, b) => b.score - a.score);
182
+ // Calculate confidence using 2x gap rule
183
+ let confidence = 0;
184
+ if (sortedCategories.length >= 2) {
185
+ const gap = sortedCategories[0].score - sortedCategories[1].score;
186
+ const maxScore = sortedCategories[0].score;
187
+ confidence = gap > maxScore * (1 - confidenceThreshold) ? 1.0 : 0.5;
188
+ }
189
+ else if (sortedCategories.length === 1 && sortedCategories[0].score > 0) {
190
+ confidence = 1.0;
191
+ }
192
+ return {
193
+ categories: sortedCategories,
194
+ contexts: activeContexts,
195
+ confidence,
196
+ };
197
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Signal Extraction Module
3
+ * Extracts named observations from scan results with weights
4
+ */
5
+ import { ArtifactInventory } from '../state/schema';
6
+ export interface Signal {
7
+ name: string;
8
+ source: string;
9
+ weight: number;
10
+ }
11
+ /**
12
+ * Extract signals from artifact inventory
13
+ * Each signal is a named observation with a source and weight
14
+ */
15
+ export declare function extractSignals(inventory: ArtifactInventory): Signal[];
16
+ //# sourceMappingURL=signals.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,305 @@
1
+ "use strict";
2
+ /**
3
+ * Signal Extraction Module
4
+ * Extracts named observations from scan results with weights
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.extractSignals = extractSignals;
8
+ const logger_1 = require("../utils/logger");
9
+ /**
10
+ * Extract signals from artifact inventory
11
+ * Each signal is a named observation with a source and weight
12
+ */
13
+ function extractSignals(inventory) {
14
+ const signals = [];
15
+ // 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
21
+ .concat(inventory.categories.configuration.files)
22
+ .concat(inventory.categories.infrastructure.files)
23
+ .join('|')
24
+ .toLowerCase();
25
+ // Express/Fastify/Koa routes
26
+ if (sourceFiles.includes('routes') || sourceFiles.includes('controller')) {
27
+ if (allFiles.includes('express') ||
28
+ allFiles.includes('fastify') ||
29
+ allFiles.includes('koa')) {
30
+ signals.push({
31
+ name: 'has-express-routes',
32
+ source: 'code-scanner',
33
+ weight: 3,
34
+ });
35
+ }
36
+ }
37
+ // React/Vue/Svelte components
38
+ if (sourceFiles.includes('.tsx') ||
39
+ sourceFiles.includes('.jsx') ||
40
+ sourceFiles.includes('.vue') ||
41
+ sourceFiles.includes('.svelte')) {
42
+ signals.push({
43
+ name: 'has-react-components',
44
+ source: 'file-scanner',
45
+ weight: 4,
46
+ });
47
+ }
48
+ // Dockerfile
49
+ if (infraFiles.includes('dockerfile')) {
50
+ signals.push({
51
+ name: 'has-dockerfile',
52
+ source: 'file-scanner',
53
+ weight: 1,
54
+ });
55
+ }
56
+ // Terraform
57
+ if (infraFiles.includes('.tf')) {
58
+ signals.push({
59
+ name: 'has-terraform',
60
+ source: 'file-scanner',
61
+ weight: 4,
62
+ });
63
+ }
64
+ // Flask/FastAPI/Django
65
+ if (allFiles.includes('flask') ||
66
+ allFiles.includes('fastapi') ||
67
+ allFiles.includes('django')) {
68
+ if (sourceFiles.includes('.py')) {
69
+ signals.push({
70
+ name: 'has-flask-fastapi-django',
71
+ source: 'code-scanner',
72
+ weight: 3,
73
+ });
74
+ }
75
+ }
76
+ // ML model files
77
+ if (sourceFiles.includes('.pkl') || sourceFiles.includes('.h5') || sourceFiles.includes('.onnx')) {
78
+ signals.push({
79
+ name: 'has-ml-model-files',
80
+ source: 'file-scanner',
81
+ weight: 5,
82
+ });
83
+ }
84
+ // ML dependencies
85
+ if (allFiles.includes('torch') ||
86
+ allFiles.includes('tensorflow') ||
87
+ allFiles.includes('transformers') ||
88
+ allFiles.includes('sklearn')) {
89
+ signals.push({
90
+ name: 'has-ml-dependencies',
91
+ source: 'code-scanner',
92
+ weight: 4,
93
+ });
94
+ }
95
+ // ETL pipeline keywords
96
+ if (sourceFiles.includes('pipeline') ||
97
+ sourceFiles.includes('etl') ||
98
+ sourceFiles.includes('dag') ||
99
+ sourceFiles.includes('airflow')) {
100
+ signals.push({
101
+ name: 'has-etl-pipeline-keywords',
102
+ source: 'code-scanner',
103
+ weight: 4,
104
+ });
105
+ }
106
+ // Mobile configs
107
+ if (infraFiles.includes('info.plist') ||
108
+ infraFiles.includes('androidmanifest.xml') ||
109
+ configFiles.includes('build.gradle')) {
110
+ signals.push({
111
+ name: 'has-mobile-configs',
112
+ source: 'file-scanner',
113
+ weight: 5,
114
+ });
115
+ }
116
+ // Third-party API clients (no routes)
117
+ if ((sourceFiles.includes('client') || sourceFiles.includes('adapter')) &&
118
+ !sourceFiles.includes('routes')) {
119
+ if (allFiles.includes('axios') ||
120
+ allFiles.includes('fetch') ||
121
+ allFiles.includes('requests') ||
122
+ allFiles.includes('httpx')) {
123
+ signals.push({
124
+ name: 'has-third-party-api-clients',
125
+ source: 'code-scanner',
126
+ weight: 3,
127
+ });
128
+ }
129
+ }
130
+ // Compliance signals
131
+ const complianceText = allFiles.toLowerCase();
132
+ if (complianceText.includes('hipaa') ||
133
+ complianceText.includes('sox') ||
134
+ complianceText.includes('pci')) {
135
+ signals.push({
136
+ name: 'has-compliance-requirements',
137
+ source: 'artifact-scanner',
138
+ weight: 5,
139
+ });
140
+ }
141
+ // RBAC/MultiTenant
142
+ if (sourceFiles.includes('rbac') ||
143
+ sourceFiles.includes('tenant') ||
144
+ sourceFiles.includes('permission') ||
145
+ sourceFiles.includes('role')) {
146
+ signals.push({
147
+ name: 'has-rbac-tenant-patterns',
148
+ source: 'code-scanner',
149
+ weight: 3,
150
+ });
151
+ }
152
+ // SLA/Uptime signals
153
+ if (docFiles.includes('sla') ||
154
+ sourceFiles.includes('uptime') ||
155
+ sourceFiles.includes('metrics') ||
156
+ sourceFiles.includes('monitoring')) {
157
+ signals.push({
158
+ name: 'has-sla-uptime-mentions',
159
+ source: 'artifact-scanner',
160
+ weight: 3,
161
+ });
162
+ }
163
+ // Internal/Tooling signals
164
+ if (sourceFiles.includes('admin') ||
165
+ sourceFiles.includes('internal') ||
166
+ sourceFiles.includes('tool') ||
167
+ sourceFiles.includes('utility')) {
168
+ signals.push({
169
+ name: 'has-internal-tooling',
170
+ source: 'code-scanner',
171
+ weight: 3,
172
+ });
173
+ }
174
+ // Test coverage signal
175
+ if (inventory.categories.tests.count > 0) {
176
+ signals.push({
177
+ name: 'has-tests',
178
+ source: 'file-scanner',
179
+ weight: 2,
180
+ });
181
+ }
182
+ // API spec signal
183
+ if (configFiles.includes('swagger') || configFiles.includes('openapi')) {
184
+ signals.push({
185
+ name: 'has-api-spec',
186
+ source: 'file-scanner',
187
+ weight: 3,
188
+ });
189
+ }
190
+ // Microservices patterns
191
+ if (sourceFiles.includes('service') && sourceFiles.includes('message')) {
192
+ signals.push({
193
+ name: 'has-microservices-pattern',
194
+ source: 'code-scanner',
195
+ weight: 2,
196
+ });
197
+ }
198
+ // Database/ORM signals
199
+ if (allFiles.includes('prisma') ||
200
+ allFiles.includes('typeorm') ||
201
+ allFiles.includes('sqlalchemy') ||
202
+ allFiles.includes('mongoose')) {
203
+ signals.push({
204
+ name: 'has-database-orm',
205
+ source: 'code-scanner',
206
+ weight: 2,
207
+ });
208
+ }
209
+ // Monitoring/Logging
210
+ if (allFiles.includes('prometheus') ||
211
+ allFiles.includes('grafana') ||
212
+ allFiles.includes('datadog') ||
213
+ allFiles.includes('sentry') ||
214
+ allFiles.includes('winston') ||
215
+ allFiles.includes('pino')) {
216
+ signals.push({
217
+ name: 'has-monitoring-logging',
218
+ source: 'code-scanner',
219
+ weight: 2,
220
+ });
221
+ }
222
+ // New 626Labs-specific signals
223
+ // Firebase/Firestore
224
+ if (configFiles.includes('firebase') || allFiles.includes('firestore') || allFiles.includes('firebase')) {
225
+ signals.push({
226
+ name: 'has-firebase',
227
+ source: 'file-scanner',
228
+ weight: 3,
229
+ });
230
+ }
231
+ // Vite config
232
+ if (configFiles.includes('vite.config')) {
233
+ signals.push({
234
+ name: 'has-vite-config',
235
+ source: 'file-scanner',
236
+ weight: 2,
237
+ });
238
+ }
239
+ // Tailwind CSS
240
+ if (configFiles.includes('tailwind')) {
241
+ signals.push({
242
+ name: 'has-tailwind',
243
+ source: 'file-scanner',
244
+ weight: 1,
245
+ });
246
+ }
247
+ // Next.js / Nuxt
248
+ if (configFiles.includes('next.config') || configFiles.includes('nuxt.config')) {
249
+ signals.push({
250
+ name: 'has-nextjs-nuxt',
251
+ source: 'file-scanner',
252
+ weight: 4,
253
+ });
254
+ }
255
+ // Cloud Functions
256
+ if (sourceFiles.includes('functions/')) {
257
+ signals.push({
258
+ name: 'has-cloud-functions',
259
+ source: 'file-scanner',
260
+ weight: 3,
261
+ });
262
+ }
263
+ // AI SDK
264
+ if (allFiles.includes('genkit') || allFiles.includes('@ai-sdk')) {
265
+ signals.push({
266
+ name: 'has-ai-sdk',
267
+ source: 'code-scanner',
268
+ weight: 3,
269
+ });
270
+ }
271
+ // MCP Server
272
+ if (sourceFiles.includes('mcp-server') || allFiles.includes('mcp')) {
273
+ signals.push({
274
+ name: 'has-mcp-server',
275
+ source: 'file-scanner',
276
+ weight: 2,
277
+ });
278
+ }
279
+ // State Management
280
+ if (allFiles.includes('zustand') || allFiles.includes('redux')) {
281
+ signals.push({
282
+ name: 'has-state-management',
283
+ source: 'code-scanner',
284
+ weight: 2,
285
+ });
286
+ }
287
+ // E2E Testing
288
+ if (allFiles.includes('playwright') || allFiles.includes('cypress')) {
289
+ signals.push({
290
+ name: 'has-e2e-testing',
291
+ source: 'file-scanner',
292
+ weight: 0.5,
293
+ });
294
+ }
295
+ // GitHub Actions
296
+ if (configFiles.includes('.github/workflows')) {
297
+ signals.push({
298
+ name: 'has-github-actions',
299
+ source: 'file-scanner',
300
+ weight: 1,
301
+ });
302
+ }
303
+ logger_1.logger.debug(`Extracted ${signals.length} signals from inventory`);
304
+ return signals;
305
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Breadcrumbs Module
3
+ * Search heuristics for finding evidence of documentation in artifacts
4
+ */
5
+ export interface Breadcrumb {
6
+ docType: string;
7
+ keywords: string[];
8
+ filePatterns: string[];
9
+ gitPatterns: string[];
10
+ codePatterns: string[];
11
+ requiredSections: string[];
12
+ gapQuestions: string[];
13
+ }
14
+ /**
15
+ * Get breadcrumbs for a specific doc type
16
+ */
17
+ export declare function getBreadcrumbs(docType: string): Breadcrumb;
18
+ //# sourceMappingURL=breadcrumbs.d.ts.map
@@ -0,0 +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"}