create-universal-ai-context 2.0.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 (136) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +171 -0
  3. package/bin/create-ai-context.js +337 -0
  4. package/lib/adapters/antigravity.js +160 -0
  5. package/lib/adapters/claude.js +122 -0
  6. package/lib/adapters/cline.js +111 -0
  7. package/lib/adapters/copilot.js +117 -0
  8. package/lib/adapters/index.js +69 -0
  9. package/lib/ai-context-generator.js +234 -0
  10. package/lib/ai-orchestrator.js +431 -0
  11. package/lib/call-tracer.js +444 -0
  12. package/lib/detector.js +726 -0
  13. package/lib/environment-detector.js +239 -0
  14. package/lib/index.js +310 -0
  15. package/lib/installer.js +418 -0
  16. package/lib/migrate.js +319 -0
  17. package/lib/placeholder.js +541 -0
  18. package/lib/prompts.js +287 -0
  19. package/lib/spinner.js +60 -0
  20. package/lib/static-analyzer.js +729 -0
  21. package/lib/template-populator.js +843 -0
  22. package/lib/template-renderer.js +382 -0
  23. package/lib/validate.js +155 -0
  24. package/package.json +70 -0
  25. package/templates/AI_CONTEXT.md.template +245 -0
  26. package/templates/base/README.md +257 -0
  27. package/templates/base/RPI_WORKFLOW_PLAN.md +320 -0
  28. package/templates/base/agents/api-developer.md +76 -0
  29. package/templates/base/agents/context-engineer.md +525 -0
  30. package/templates/base/agents/core-architect.md +76 -0
  31. package/templates/base/agents/database-ops.md +76 -0
  32. package/templates/base/agents/deployment-ops.md +76 -0
  33. package/templates/base/agents/integration-hub.md +76 -0
  34. package/templates/base/analytics/README.md +114 -0
  35. package/templates/base/automation/config.json +58 -0
  36. package/templates/base/automation/generators/code-mapper.js +308 -0
  37. package/templates/base/automation/generators/index-builder.js +321 -0
  38. package/templates/base/automation/hooks/post-commit.sh +83 -0
  39. package/templates/base/automation/hooks/pre-commit.sh +103 -0
  40. package/templates/base/ci-templates/README.md +108 -0
  41. package/templates/base/ci-templates/github-actions/context-check.yml +144 -0
  42. package/templates/base/ci-templates/github-actions/validate-docs.yml +105 -0
  43. package/templates/base/commands/analytics.md +238 -0
  44. package/templates/base/commands/auto-sync.md +172 -0
  45. package/templates/base/commands/collab.md +194 -0
  46. package/templates/base/commands/help.md +450 -0
  47. package/templates/base/commands/rpi-implement.md +115 -0
  48. package/templates/base/commands/rpi-plan.md +93 -0
  49. package/templates/base/commands/rpi-research.md +88 -0
  50. package/templates/base/commands/session-resume.md +144 -0
  51. package/templates/base/commands/session-save.md +112 -0
  52. package/templates/base/commands/validate-all.md +77 -0
  53. package/templates/base/commands/verify-docs-current.md +86 -0
  54. package/templates/base/config/base.json +57 -0
  55. package/templates/base/config/environments/development.json +13 -0
  56. package/templates/base/config/environments/production.json +17 -0
  57. package/templates/base/config/environments/staging.json +13 -0
  58. package/templates/base/config/local.json.example +21 -0
  59. package/templates/base/context/.meta/generated-at.json +18 -0
  60. package/templates/base/context/ARCHITECTURE_SNAPSHOT.md +156 -0
  61. package/templates/base/context/CODE_TO_WORKFLOW_MAP.md +94 -0
  62. package/templates/base/context/FILE_OWNERSHIP.md +57 -0
  63. package/templates/base/context/INTEGRATION_POINTS.md +92 -0
  64. package/templates/base/context/KNOWN_GOTCHAS.md +195 -0
  65. package/templates/base/context/TESTING_MAP.md +95 -0
  66. package/templates/base/context/WORKFLOW_INDEX.md +129 -0
  67. package/templates/base/context/workflows/WORKFLOW_TEMPLATE.md +294 -0
  68. package/templates/base/indexes/agents/CAPABILITY_MATRIX.md +255 -0
  69. package/templates/base/indexes/agents/CATEGORY_INDEX.md +44 -0
  70. package/templates/base/indexes/code/CATEGORY_INDEX.md +38 -0
  71. package/templates/base/indexes/routing/CATEGORY_INDEX.md +39 -0
  72. package/templates/base/indexes/search/CATEGORY_INDEX.md +39 -0
  73. package/templates/base/indexes/workflows/CATEGORY_INDEX.md +38 -0
  74. package/templates/base/knowledge/README.md +98 -0
  75. package/templates/base/knowledge/sessions/README.md +88 -0
  76. package/templates/base/knowledge/sessions/TEMPLATE.md +150 -0
  77. package/templates/base/knowledge/shared/decisions/0001-adopt-context-engineering.md +144 -0
  78. package/templates/base/knowledge/shared/decisions/README.md +49 -0
  79. package/templates/base/knowledge/shared/decisions/TEMPLATE.md +123 -0
  80. package/templates/base/knowledge/shared/patterns/README.md +62 -0
  81. package/templates/base/knowledge/shared/patterns/TEMPLATE.md +120 -0
  82. package/templates/base/plans/PLAN_TEMPLATE.md +250 -0
  83. package/templates/base/plans/active/.gitkeep +0 -0
  84. package/templates/base/plans/completed/.gitkeep +0 -0
  85. package/templates/base/research/RESEARCH_TEMPLATE.md +153 -0
  86. package/templates/base/research/active/.gitkeep +0 -0
  87. package/templates/base/research/completed/.gitkeep +0 -0
  88. package/templates/base/schemas/agent.schema.json +141 -0
  89. package/templates/base/schemas/anchors.schema.json +54 -0
  90. package/templates/base/schemas/automation.schema.json +93 -0
  91. package/templates/base/schemas/command.schema.json +134 -0
  92. package/templates/base/schemas/hashes.schema.json +40 -0
  93. package/templates/base/schemas/manifest.schema.json +117 -0
  94. package/templates/base/schemas/plan.schema.json +136 -0
  95. package/templates/base/schemas/research.schema.json +115 -0
  96. package/templates/base/schemas/roles.schema.json +34 -0
  97. package/templates/base/schemas/session.schema.json +77 -0
  98. package/templates/base/schemas/settings.schema.json +244 -0
  99. package/templates/base/schemas/staleness.schema.json +53 -0
  100. package/templates/base/schemas/team-config.schema.json +42 -0
  101. package/templates/base/schemas/workflow.schema.json +126 -0
  102. package/templates/base/session/checkpoints/.gitkeep +2 -0
  103. package/templates/base/session/current/state.json +20 -0
  104. package/templates/base/session/history/.gitkeep +2 -0
  105. package/templates/base/settings.json +3 -0
  106. package/templates/base/standards/COMPATIBILITY.md +219 -0
  107. package/templates/base/standards/EXTENSION_GUIDELINES.md +280 -0
  108. package/templates/base/standards/QUALITY_CHECKLIST.md +211 -0
  109. package/templates/base/standards/README.md +66 -0
  110. package/templates/base/sync/anchors.json +6 -0
  111. package/templates/base/sync/hashes.json +6 -0
  112. package/templates/base/sync/staleness.json +10 -0
  113. package/templates/base/team/README.md +168 -0
  114. package/templates/base/team/config.json +79 -0
  115. package/templates/base/team/roles.json +145 -0
  116. package/templates/base/tools/bin/claude-context.js +151 -0
  117. package/templates/base/tools/lib/anchor-resolver.js +276 -0
  118. package/templates/base/tools/lib/config-loader.js +363 -0
  119. package/templates/base/tools/lib/detector.js +350 -0
  120. package/templates/base/tools/lib/diagnose.js +206 -0
  121. package/templates/base/tools/lib/drift-detector.js +373 -0
  122. package/templates/base/tools/lib/errors.js +199 -0
  123. package/templates/base/tools/lib/index.js +36 -0
  124. package/templates/base/tools/lib/init.js +192 -0
  125. package/templates/base/tools/lib/logger.js +230 -0
  126. package/templates/base/tools/lib/placeholder.js +201 -0
  127. package/templates/base/tools/lib/session-manager.js +354 -0
  128. package/templates/base/tools/lib/validate.js +521 -0
  129. package/templates/base/tools/package.json +49 -0
  130. package/templates/handlebars/antigravity.hbs +337 -0
  131. package/templates/handlebars/claude.hbs +184 -0
  132. package/templates/handlebars/cline.hbs +63 -0
  133. package/templates/handlebars/copilot.hbs +131 -0
  134. package/templates/handlebars/partials/gotcha-list.hbs +11 -0
  135. package/templates/handlebars/partials/header.hbs +3 -0
  136. package/templates/handlebars/partials/workflow-summary.hbs +16 -0
@@ -0,0 +1,431 @@
1
+ /**
2
+ * AI Context Engineering - AI Orchestrator
3
+ *
4
+ * Coordinates with @context-engineer agent for full AI-powered analysis.
5
+ * Creates initialization requests and generates agent instructions.
6
+ */
7
+
8
+ const fs = require('fs');
9
+ const path = require('path');
10
+
11
+ /**
12
+ * Context directory and file names
13
+ */
14
+ const AI_CONTEXT_DIR = '.ai-context';
15
+ const AI_CONTEXT_FILE = 'AI_CONTEXT.md';
16
+
17
+ /**
18
+ * Marker file for pending initialization
19
+ */
20
+ const INIT_MARKER = '.init-pending';
21
+
22
+ /**
23
+ * Instruction file for agent
24
+ */
25
+ const INIT_REQUEST_FILE = 'INIT_REQUEST.md';
26
+
27
+ /**
28
+ * Progress tracking file
29
+ */
30
+ const PROGRESS_FILE = 'INIT_PROGRESS.json';
31
+
32
+ /**
33
+ * Create an initialization request marker
34
+ * @param {string} contextDir - .ai-context directory path
35
+ * @param {object} config - Configuration from CLI
36
+ * @returns {object} Request object
37
+ */
38
+ function createInitializationRequest(contextDir, config) {
39
+ const request = {
40
+ version: '2.0.0',
41
+ createdAt: new Date().toISOString(),
42
+ projectName: config.projectName || path.basename(path.dirname(contextDir)),
43
+ config: {
44
+ techStack: config.techStack,
45
+ features: config.features,
46
+ installPlugin: config.installPlugin
47
+ },
48
+ phases: [
49
+ { id: 'repository-analysis', name: 'Repository Analysis', status: 'pending', progress: 0 },
50
+ { id: 'workflow-discovery', name: 'Workflow Discovery', status: 'pending', progress: 0 },
51
+ { id: 'template-population', name: 'Template Population', status: 'pending', progress: 0 },
52
+ { id: 'index-generation', name: 'Index Generation', status: 'pending', progress: 0 },
53
+ { id: 'validation', name: 'Validation', status: 'pending', progress: 0 },
54
+ { id: 'finalization', name: 'Finalization', status: 'pending', progress: 0 }
55
+ ],
56
+ status: 'pending',
57
+ completedAt: null
58
+ };
59
+
60
+ const markerPath = path.join(contextDir, INIT_MARKER);
61
+ fs.writeFileSync(markerPath, JSON.stringify(request, null, 2));
62
+
63
+ return request;
64
+ }
65
+
66
+ /**
67
+ * Generate agent instruction file with pre-analysis results
68
+ * @param {string} contextDir - .ai-context directory path
69
+ * @param {object} analysis - Pre-analysis results from static analyzer
70
+ * @param {object} config - Configuration from CLI
71
+ */
72
+ function generateAgentInstructions(contextDir, analysis, config) {
73
+ const projectName = config.projectName || path.basename(path.dirname(contextDir));
74
+ const pkgVersion = getPackageVersion();
75
+
76
+ const instructions = `# Context Engineering Initialization Request
77
+
78
+ > **Auto-generated by \`create-ai-context\` v${pkgVersion}**
79
+ > Generated: ${new Date().toISOString()}
80
+
81
+ ## Status: Awaiting AI Completion
82
+
83
+ The CLI has performed static pre-analysis and prepared the template structure.
84
+ Full AI-powered context engineering is requested to complete initialization.
85
+
86
+ ---
87
+
88
+ ## Project Overview
89
+
90
+ | Property | Value |
91
+ |----------|-------|
92
+ | **Project Name** | ${projectName} |
93
+ | **Tech Stack** | ${analysis.techStack?.summary || 'Detected during analysis'} |
94
+ | **Source Files** | ${analysis.sourceFiles || 'TBD'} |
95
+ | **Lines of Code** | ${analysis.linesOfCode?.total || 'TBD'} |
96
+
97
+ ---
98
+
99
+ ## Pre-Analysis Results
100
+
101
+ ### Entry Points Discovered (${analysis.entryPoints?.length || 0})
102
+
103
+ ${formatEntryPoints(analysis.entryPoints)}
104
+
105
+ ### Workflow Candidates (${analysis.workflows?.length || 0})
106
+
107
+ ${formatWorkflows(analysis.workflows)}
108
+
109
+ ### Architecture Layers
110
+
111
+ ${formatLayers(analysis.architecture?.layers)}
112
+
113
+ ### Dependencies (${analysis.dependencies?.length || 0})
114
+
115
+ ${formatDependencies(analysis.dependencies)}
116
+
117
+ ---
118
+
119
+ ## Requested Actions
120
+
121
+ Please complete the context engineering initialization by:
122
+
123
+ ### Phase 1: Verify Pre-Analysis
124
+ - [ ] Review discovered entry points for accuracy
125
+ - [ ] Confirm workflow candidates are valid
126
+ - [ ] Identify any missed entry points or workflows
127
+
128
+ ### Phase 2: Deep Workflow Discovery
129
+ - [ ] Trace call chains for each workflow (3 levels deep)
130
+ - [ ] Identify database operations per workflow
131
+ - [ ] Map external API calls per workflow
132
+ - [ ] Document error handling patterns
133
+
134
+ ### Phase 3: Template Population
135
+ - [ ] Fill ARCHITECTURE_SNAPSHOT.md with real architecture
136
+ - [ ] Create individual workflow files (8-15 total)
137
+ - [ ] Populate CODE_TO_WORKFLOW_MAP.md with file references
138
+ - [ ] Update WORKFLOW_INDEX.md with all workflows
139
+
140
+ ### Phase 4: Index Generation
141
+ - [ ] Generate proper category indexes
142
+ - [ ] Create semantic anchors for key functions
143
+ - [ ] Build reverse lookup indexes
144
+
145
+ ### Phase 5: Validation
146
+ - [ ] Verify line number accuracy (target: 60%+)
147
+ - [ ] Check all internal links
148
+ - [ ] Confirm no placeholder values remain
149
+
150
+ ### Phase 6: Finalization
151
+ - [ ] Generate summary report
152
+ - [ ] Update AI_CONTEXT.md with project-specific info
153
+ - [ ] Create maintenance schedule
154
+
155
+ ---
156
+
157
+ ## Quick Start Command
158
+
159
+ \`\`\`bash
160
+ @context-engineer "Complete initialization for ${projectName} using the pre-analysis in INIT_REQUEST.md"
161
+ \`\`\`
162
+
163
+ Or use the dedicated command:
164
+
165
+ \`\`\`bash
166
+ /rpi-research "Complete context engineering initialization"
167
+ \`\`\`
168
+
169
+ ---
170
+
171
+ ## Files to Update
172
+
173
+ | File | Action |
174
+ |------|--------|
175
+ | \`context/ARCHITECTURE_SNAPSHOT.md\` | Populate with real architecture |
176
+ | \`context/WORKFLOW_INDEX.md\` | Add all discovered workflows |
177
+ | \`context/CODE_TO_WORKFLOW_MAP.md\` | Map files to workflows |
178
+ | \`context/workflows/*.md\` | Create individual workflow docs |
179
+ | \`indexes/workflows/CATEGORY_INDEX.md\` | Generate category index |
180
+ | \`../AI_CONTEXT.md\` | Finalize with project info |
181
+
182
+ ---
183
+
184
+ ## Pre-Analysis Data
185
+
186
+ The following JSON contains the full pre-analysis for programmatic use:
187
+
188
+ \`\`\`json
189
+ ${JSON.stringify(analysis.summary || {}, null, 2)}
190
+ \`\`\`
191
+
192
+ ---
193
+
194
+ *This file will be deleted automatically after successful initialization.*
195
+ *Generated by create-ai-context v${pkgVersion}*
196
+ `;
197
+
198
+ const instructionPath = path.join(contextDir, INIT_REQUEST_FILE);
199
+ fs.writeFileSync(instructionPath, instructions);
200
+
201
+ return instructionPath;
202
+ }
203
+
204
+ /**
205
+ * Format entry points for markdown
206
+ * @param {object[]} entryPoints - Entry points array
207
+ * @returns {string}
208
+ */
209
+ function formatEntryPoints(entryPoints) {
210
+ if (!entryPoints || entryPoints.length === 0) {
211
+ return '*No entry points discovered during pre-analysis. AI analysis will discover them.*\n';
212
+ }
213
+
214
+ const limited = entryPoints.slice(0, 15);
215
+ let output = '| File | Line | Route | Method |\n|------|------|-------|--------|\n';
216
+
217
+ for (const ep of limited) {
218
+ output += `| \`${ep.file}\` | ${ep.line} | ${ep.route || '-'} | ${ep.method || '-'} |\n`;
219
+ }
220
+
221
+ if (entryPoints.length > 15) {
222
+ output += `\n*...and ${entryPoints.length - 15} more entry points*\n`;
223
+ }
224
+
225
+ return output;
226
+ }
227
+
228
+ /**
229
+ * Format workflows for markdown
230
+ * @param {object[]} workflows - Workflows array
231
+ * @returns {string}
232
+ */
233
+ function formatWorkflows(workflows) {
234
+ if (!workflows || workflows.length === 0) {
235
+ return '*No workflows discovered during pre-analysis. AI analysis will discover them.*\n';
236
+ }
237
+
238
+ let output = '| Workflow | Category | Complexity | Files | Confidence |\n|----------|----------|------------|-------|------------|\n';
239
+
240
+ for (const wf of workflows) {
241
+ output += `| **${wf.name}** | ${wf.category} | ${wf.complexity} | ${wf.fileCount || wf.files?.length || 0} | ${wf.confidence || '-'}% |\n`;
242
+ }
243
+
244
+ return output;
245
+ }
246
+
247
+ /**
248
+ * Format architecture layers for markdown
249
+ * @param {object[]} layers - Layers array
250
+ * @returns {string}
251
+ */
252
+ function formatLayers(layers) {
253
+ if (!layers || layers.length === 0) {
254
+ return '*Architecture layers will be determined during AI analysis.*\n';
255
+ }
256
+
257
+ let output = '| Layer | Directories | Purpose |\n|-------|-------------|----------|\n';
258
+
259
+ for (const layer of layers) {
260
+ output += `| **${layer.name}** | ${layer.directories?.join(', ') || '-'} | ${layer.purpose || '-'} |\n`;
261
+ }
262
+
263
+ return output;
264
+ }
265
+
266
+ /**
267
+ * Format dependencies for markdown
268
+ * @param {object[]} dependencies - Dependencies array
269
+ * @returns {string}
270
+ */
271
+ function formatDependencies(dependencies) {
272
+ if (!dependencies || dependencies.length === 0) {
273
+ return '*No dependencies detected.*\n';
274
+ }
275
+
276
+ // Group by ecosystem
277
+ const byEcosystem = {};
278
+ for (const dep of dependencies) {
279
+ const eco = dep.ecosystem || 'unknown';
280
+ if (!byEcosystem[eco]) byEcosystem[eco] = [];
281
+ byEcosystem[eco].push(dep);
282
+ }
283
+
284
+ let output = '';
285
+ for (const [ecosystem, deps] of Object.entries(byEcosystem)) {
286
+ output += `\n**${ecosystem.toUpperCase()}** (${deps.length}):\n`;
287
+ const topDeps = deps.slice(0, 10);
288
+ output += topDeps.map(d => `- ${d.name}@${d.version}`).join('\n') + '\n';
289
+ if (deps.length > 10) {
290
+ output += `- *...and ${deps.length - 10} more*\n`;
291
+ }
292
+ }
293
+
294
+ return output;
295
+ }
296
+
297
+ /**
298
+ * Get package version
299
+ * @returns {string}
300
+ */
301
+ function getPackageVersion() {
302
+ try {
303
+ const pkgPath = path.join(__dirname, '..', 'package.json');
304
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
305
+ return pkg.version || '1.0.0';
306
+ } catch {
307
+ return '1.0.0';
308
+ }
309
+ }
310
+
311
+ /**
312
+ * Check initialization status
313
+ * @param {string} contextDir - .ai-context directory path
314
+ * @returns {object}
315
+ */
316
+ function checkInitializationStatus(contextDir) {
317
+ const markerPath = path.join(contextDir, INIT_MARKER);
318
+
319
+ if (!fs.existsSync(markerPath)) {
320
+ return { status: 'not-started', request: null };
321
+ }
322
+
323
+ try {
324
+ const request = JSON.parse(fs.readFileSync(markerPath, 'utf-8'));
325
+ const completedPhases = request.phases.filter(p => p.status === 'completed').length;
326
+ const totalPhases = request.phases.length;
327
+
328
+ return {
329
+ status: completedPhases === totalPhases ? 'completed' : 'in-progress',
330
+ progress: Math.round((completedPhases / totalPhases) * 100),
331
+ completedPhases,
332
+ totalPhases,
333
+ request
334
+ };
335
+ } catch {
336
+ return { status: 'error', request: null };
337
+ }
338
+ }
339
+
340
+ /**
341
+ * Update initialization progress
342
+ * @param {string} contextDir - .ai-context directory path
343
+ * @param {string} phaseId - Phase ID to update
344
+ * @param {string} status - New status ('in-progress', 'completed', 'failed')
345
+ * @param {number} progress - Progress percentage (0-100)
346
+ */
347
+ function updateInitializationProgress(contextDir, phaseId, status, progress = 0) {
348
+ const markerPath = path.join(contextDir, INIT_MARKER);
349
+
350
+ if (!fs.existsSync(markerPath)) {
351
+ return false;
352
+ }
353
+
354
+ try {
355
+ const request = JSON.parse(fs.readFileSync(markerPath, 'utf-8'));
356
+ const phase = request.phases.find(p => p.id === phaseId);
357
+
358
+ if (phase) {
359
+ phase.status = status;
360
+ phase.progress = progress;
361
+ phase.updatedAt = new Date().toISOString();
362
+ }
363
+
364
+ // Check if all phases are completed
365
+ const allCompleted = request.phases.every(p => p.status === 'completed');
366
+ if (allCompleted) {
367
+ request.status = 'completed';
368
+ request.completedAt = new Date().toISOString();
369
+ } else {
370
+ request.status = 'in-progress';
371
+ }
372
+
373
+ fs.writeFileSync(markerPath, JSON.stringify(request, null, 2));
374
+ return true;
375
+ } catch {
376
+ return false;
377
+ }
378
+ }
379
+
380
+ /**
381
+ * Mark initialization as complete and clean up
382
+ * @param {string} contextDir - .ai-context directory path
383
+ * @param {boolean} removeMarker - Whether to remove the marker file
384
+ */
385
+ function completeInitialization(contextDir, removeMarker = true) {
386
+ const markerPath = path.join(contextDir, INIT_MARKER);
387
+ const instructionPath = path.join(contextDir, INIT_REQUEST_FILE);
388
+
389
+ if (fs.existsSync(markerPath)) {
390
+ const request = JSON.parse(fs.readFileSync(markerPath, 'utf-8'));
391
+ request.status = 'completed';
392
+ request.completedAt = new Date().toISOString();
393
+
394
+ // Archive to progress file
395
+ const progressPath = path.join(contextDir, PROGRESS_FILE);
396
+ fs.writeFileSync(progressPath, JSON.stringify(request, null, 2));
397
+
398
+ if (removeMarker) {
399
+ fs.unlinkSync(markerPath);
400
+ }
401
+ }
402
+
403
+ // Remove instruction file
404
+ if (removeMarker && fs.existsSync(instructionPath)) {
405
+ fs.unlinkSync(instructionPath);
406
+ }
407
+ }
408
+
409
+ /**
410
+ * Check if initialization is pending
411
+ * @param {string} contextDir - .ai-context directory path
412
+ * @returns {boolean}
413
+ */
414
+ function isInitializationPending(contextDir) {
415
+ const markerPath = path.join(contextDir, INIT_MARKER);
416
+ return fs.existsSync(markerPath);
417
+ }
418
+
419
+ module.exports = {
420
+ createInitializationRequest,
421
+ generateAgentInstructions,
422
+ checkInitializationStatus,
423
+ updateInitializationProgress,
424
+ completeInitialization,
425
+ isInitializationPending,
426
+ INIT_MARKER,
427
+ INIT_REQUEST_FILE,
428
+ PROGRESS_FILE,
429
+ AI_CONTEXT_DIR,
430
+ AI_CONTEXT_FILE
431
+ };