@appiq/flutter-workflow 1.4.3 → 2.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.
@@ -0,0 +1,562 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * AppIQ Flutter Workflow - Independent Mode Setup
5
+ * Automatically adds Independent Mode capabilities to all agents
6
+ */
7
+
8
+ const fs = require('fs').promises;
9
+ const path = require('path');
10
+
11
+ class IndependentModeSetup {
12
+ constructor() {
13
+ this.agentConfigs = {
14
+ 'ui-agent': {
15
+ name: 'Maya',
16
+ specialty: 'Flutter UI/UX Design Specialist',
17
+ skills: 'platform-adaptive design, Material Design 3, responsive layouts, and creating beautiful native-feeling interfaces',
18
+ domain: 'ui',
19
+ deliverable: 'component',
20
+ specificFeatures: 'platform-adaptive elements, responsive design, animations and interactions',
21
+ qualityChecks: 'responsiveness across screen sizes, accessibility compliance, performance metrics',
22
+ complianceRequirements: 'WCAG 2.1 AA standards, Material Design 3 compliance',
23
+ deliverables: [
24
+ 'Responsive layouts for all screen sizes',
25
+ 'Platform-adaptive components (iOS/Android)',
26
+ 'Accessibility compliance (WCAG 2.1 AA)',
27
+ 'Performance optimized animations'
28
+ ],
29
+ escalationTriggers: [
30
+ 'Changes require backend/API modifications',
31
+ 'State management changes are needed',
32
+ 'Security implications are identified',
33
+ 'Business logic modifications required'
34
+ ],
35
+ relatedAgents: ['cubit-agent', 'domain-agent', 'data-agent', 'security-agent', 'test-agent'],
36
+ collaborationScenarios: {
37
+ 'cubit-agent': 'If state management updates needed',
38
+ 'domain-agent': 'If business logic impacts UI',
39
+ 'data-agent': 'If new data requirements identified',
40
+ 'security-agent': 'If security-sensitive UI elements',
41
+ 'test-agent': 'For comprehensive UI testing'
42
+ }
43
+ },
44
+ 'cubit-agent': {
45
+ name: 'Sage',
46
+ specialty: 'State Management Expert',
47
+ skills: 'Cubit pattern implementation, state architecture, event handling, and performance optimization',
48
+ domain: 'state',
49
+ deliverable: 'cubit',
50
+ specificFeatures: 'state management, event handling, business logic integration, error handling',
51
+ qualityChecks: 'state isolation, performance optimization, memory leak prevention',
52
+ complianceRequirements: 'Clean Architecture compliance, flutter_bloc patterns',
53
+ deliverables: [
54
+ 'Complete Cubit implementations for feature states',
55
+ 'State management architecture',
56
+ 'Performance optimized state updates',
57
+ 'Comprehensive error handling'
58
+ ],
59
+ escalationTriggers: [
60
+ 'Domain layer changes required',
61
+ 'New business rules needed',
62
+ 'API integration changes required',
63
+ 'Complex state coordination needed'
64
+ ],
65
+ relatedAgents: ['ui-agent', 'domain-agent', 'data-agent', 'test-agent'],
66
+ collaborationScenarios: {
67
+ 'ui-agent': 'For UI state integration and event handling',
68
+ 'domain-agent': 'For business logic and use case integration',
69
+ 'data-agent': 'For data layer state management',
70
+ 'test-agent': 'For state management testing'
71
+ }
72
+ },
73
+ 'domain-agent': {
74
+ name: 'Atlas',
75
+ specialty: 'Business Logic Architect',
76
+ skills: 'Clean Architecture, business entities, use cases, and domain-driven design',
77
+ domain: 'domain',
78
+ deliverable: 'entity',
79
+ specificFeatures: 'business entities, use cases, repository interfaces, domain services',
80
+ qualityChecks: 'Clean Architecture compliance, business rule validation, domain isolation',
81
+ complianceRequirements: 'Framework independence, single responsibility principle',
82
+ deliverables: [
83
+ 'Complete domain entities with business rules',
84
+ 'Use case implementations for feature scenarios',
85
+ 'Repository interfaces and contracts',
86
+ 'Domain service implementations'
87
+ ],
88
+ escalationTriggers: [
89
+ 'Data layer architecture changes needed',
90
+ 'External service integrations required',
91
+ 'Security requirements impact business logic',
92
+ 'Complex business workflows needed'
93
+ ],
94
+ relatedAgents: ['cubit-agent', 'data-agent', 'security-agent', 'test-agent'],
95
+ collaborationScenarios: {
96
+ 'cubit-agent': 'For state management and business logic integration',
97
+ 'data-agent': 'For repository implementation and data contracts',
98
+ 'security-agent': 'For business rule security validation',
99
+ 'test-agent': 'For business logic testing'
100
+ }
101
+ },
102
+ 'data-agent': {
103
+ name: 'Nova',
104
+ specialty: 'Data Layer Specialist',
105
+ skills: 'Repository pattern, API integration, caching strategies, and offline functionality',
106
+ domain: 'data',
107
+ deliverable: 'repository',
108
+ specificFeatures: 'API integration, local storage, caching, data serialization, offline support',
109
+ qualityChecks: 'repository pattern compliance, API error handling, caching effectiveness',
110
+ complianceRequirements: 'Data security measures, offline-first architecture',
111
+ deliverables: [
112
+ 'Complete repository implementations',
113
+ 'API integration with error handling',
114
+ 'Local storage and caching implementation',
115
+ 'Offline functionality validation'
116
+ ],
117
+ escalationTriggers: [
118
+ 'New API endpoints required',
119
+ 'Backend architecture changes needed',
120
+ 'Security requirements for data handling',
121
+ 'Complex data synchronization needed'
122
+ ],
123
+ relatedAgents: ['domain-agent', 'security-agent', 'test-agent'],
124
+ collaborationScenarios: {
125
+ 'domain-agent': 'For repository interface implementation',
126
+ 'security-agent': 'For data encryption and security measures',
127
+ 'test-agent': 'For data layer testing and validation'
128
+ }
129
+ },
130
+ 'security-agent': {
131
+ name: 'Guardian',
132
+ specialty: 'Security & Compliance Expert',
133
+ skills: 'COPPA compliance, encryption, authentication, and security auditing',
134
+ domain: 'security',
135
+ deliverable: 'security-implementation',
136
+ specificFeatures: 'authentication systems, encryption, COPPA compliance, security auditing',
137
+ qualityChecks: 'vulnerability assessment, compliance validation, encryption verification',
138
+ complianceRequirements: 'COPPA compliance, data protection regulations, security standards',
139
+ deliverables: [
140
+ 'Complete security implementation',
141
+ 'COPPA compliance documentation',
142
+ 'Security audit reports',
143
+ 'Vulnerability assessment results'
144
+ ],
145
+ escalationTriggers: [
146
+ 'Legal compliance requirements identified',
147
+ 'Backend security changes needed',
148
+ 'Complex authentication flows required',
149
+ 'Regulatory compliance issues found'
150
+ ],
151
+ relatedAgents: ['data-agent', 'domain-agent', 'test-agent'],
152
+ collaborationScenarios: {
153
+ 'data-agent': 'For data encryption and secure storage',
154
+ 'domain-agent': 'For business rule security validation',
155
+ 'test-agent': 'For security testing and vulnerability assessment'
156
+ }
157
+ },
158
+ 'test-agent': {
159
+ name: 'Trinity',
160
+ specialty: 'Quality Assurance Specialist',
161
+ skills: 'testing pyramid implementation, coverage analysis, performance testing, and quality validation',
162
+ domain: 'test',
163
+ deliverable: 'test-suite',
164
+ specificFeatures: 'unit tests, widget tests, integration tests, performance testing, quality metrics',
165
+ qualityChecks: 'test coverage validation, performance benchmarking, quality gate compliance',
166
+ complianceRequirements: 'Testing pyramid (70/20/10), 90%+ coverage, performance standards',
167
+ deliverables: [
168
+ 'Complete test suite with 90%+ coverage',
169
+ 'Performance benchmark validation',
170
+ 'Quality assurance documentation',
171
+ 'CI/CD integration setup'
172
+ ],
173
+ escalationTriggers: [
174
+ 'Complex integration testing required',
175
+ 'Performance bottlenecks identified',
176
+ 'Quality standards not achievable independently',
177
+ 'Full system testing needed'
178
+ ],
179
+ relatedAgents: ['ui-agent', 'cubit-agent', 'domain-agent', 'data-agent', 'security-agent'],
180
+ collaborationScenarios: {
181
+ 'ui-agent': 'For widget and UI testing',
182
+ 'cubit-agent': 'For state management testing',
183
+ 'domain-agent': 'For business logic testing',
184
+ 'data-agent': 'For data layer testing',
185
+ 'security-agent': 'For security testing'
186
+ }
187
+ }
188
+ };
189
+ }
190
+
191
+ async setupIndependentMode() {
192
+ console.log('🚀 Setting up Independent Mode for all agents...\n');
193
+
194
+ try {
195
+ // Ensure directories exist
196
+ await this.ensureDirectories();
197
+
198
+ // Process each agent
199
+ for (const [agentId, config] of Object.entries(this.agentConfigs)) {
200
+ console.log(`🎯 Updating ${agentId}...`);
201
+ await this.updateAgent(agentId, config);
202
+ }
203
+
204
+ // Create coordination docs
205
+ await this.createCoordinationDocs();
206
+
207
+ console.log('\n✅ Independent Mode setup completed successfully!');
208
+ console.log('\n📋 Summary:');
209
+ console.log(`- Updated ${Object.keys(this.agentConfigs).length} agents with Independent Mode`);
210
+ console.log('- Created Independent Agent Tracker system');
211
+ console.log('- Added coordination documentation');
212
+ console.log('- Set up lightweight tracking and history');
213
+
214
+ console.log('\n🎯 Usage:');
215
+ console.log('- Call any agent directly: "@ui-agent help me improve the login screen"');
216
+ console.log('- Agent will offer: standalone work, feature updates, or full workflow');
217
+ console.log('- Full tracking and history maintained automatically');
218
+ console.log('- Seamless escalation to full workflow when needed');
219
+
220
+ } catch (error) {
221
+ console.error('❌ Setup failed:', error.message);
222
+ throw error;
223
+ }
224
+ }
225
+
226
+ async updateAgent(agentId, config) {
227
+ const agentPath = path.join('agents', 'claude', `${agentId}.md`);
228
+
229
+ try {
230
+ // Read existing agent
231
+ let agentContent = await fs.readFile(agentPath, 'utf8');
232
+
233
+ // Check if already has Independent Mode
234
+ if (agentContent.includes('## Independent Agent Commands')) {
235
+ console.log(` ⚠️ ${agentId} already has Independent Mode - skipping`);
236
+ return;
237
+ }
238
+
239
+ // Generate independent mode content
240
+ const independentModeContent = this.generateIndependentModeContent(config);
241
+
242
+ // Find insertion point (after Context-Aware Operation Mode)
243
+ const insertionPoint = agentContent.indexOf('## Your Mission') ||
244
+ agentContent.indexOf('## Mandatory Codebase Analysis Phase') ||
245
+ agentContent.indexOf('## Available Commands') ||
246
+ agentContent.length;
247
+
248
+ if (insertionPoint > 0) {
249
+ agentContent = agentContent.slice(0, insertionPoint) +
250
+ independentModeContent + '\n\n' +
251
+ agentContent.slice(insertionPoint);
252
+ } else {
253
+ agentContent += '\n\n' + independentModeContent;
254
+ }
255
+
256
+ // Update context-aware mode if exists
257
+ agentContent = this.updateContextAwareMode(agentContent, config);
258
+
259
+ // Write updated agent
260
+ await fs.writeFile(agentPath, agentContent);
261
+ console.log(` ✅ Updated ${agentId} with Independent Mode capabilities`);
262
+
263
+ } catch (error) {
264
+ console.error(` ❌ Failed to update ${agentId}:`, error.message);
265
+ }
266
+ }
267
+
268
+ generateIndependentModeContent(config) {
269
+ return `## Independent Agent Commands
270
+
271
+ When working in **Independent Mode**, you have these specialized commands:
272
+
273
+ ### **Feature Detection & Integration:**
274
+ - \`*find-related-feature {description}\` - Search existing features that might be related to the ${config.domain} task
275
+ - \`*update-feature-${config.domain} {featureName}\` - Update ${config.domain} for existing feature with progress tracking
276
+ - \`*create-standalone-${config.deliverable} {name}\` - Create ${config.deliverable} outside feature workflow
277
+ - \`*suggest-feature-creation {description}\` - Recommend creating new feature and coordinate with FeatureMaster
278
+
279
+ ### **Lightweight Tracking:**
280
+ - \`*start-${config.domain}-session {taskDescription}\` - Initialize independent ${config.domain} session with tracking
281
+ - \`*log-${config.domain}-progress {activity}\` - Log current ${config.domain} work for history and collaboration
282
+ - \`*update-${config.domain}-status {status}\` - Update current status (analyzing/implementing/testing/completed)
283
+ - \`*create-${config.domain}-summary\` - Generate summary of ${config.domain} work done and next steps
284
+
285
+ ### **Quality & Integration:**
286
+ - \`*validate-${config.domain}-quality\` - Run ${config.domain} quality checks (${config.qualityChecks})
287
+ - \`*check-${config.domain}-consistency\` - Validate against existing patterns and standards
288
+ - \`*prepare-handoff {toAgent?}\` - Prepare work for handoff to another agent if needed
289
+
290
+ ### **Collaboration Commands:**
291
+ - \`*request-feedback\` - Request user feedback on current ${config.domain} implementation
292
+ - \`*coordinate-with-agents {agentList}\` - Coordinate with other agents if broader changes needed
293
+ - \`*escalate-to-workflow {reason}\` - Escalate to full feature workflow if complexity requires it
294
+
295
+ ## Independent Mode Implementation Protocol
296
+
297
+ When operating in **Independent Mode**, follow this workflow:
298
+
299
+ ### **Phase 1: Initialization & Detection**
300
+ 1. **Welcome & Capability Overview**:
301
+ - Greet user and explain independent vs workflow modes
302
+ - Show available options for ${config.domain} work
303
+
304
+ 2. **Context Detection**:
305
+ \`\`\`javascript
306
+ const tracker = new IndependentAgentTracker();
307
+ const session = await tracker.startIndependentSession(
308
+ '${config.domain}-agent',
309
+ userTaskDescription,
310
+ relatedFeature
311
+ );
312
+ \`\`\`
313
+
314
+ 3. **Feature Discovery**:
315
+ - Execute \`*find-related-feature {userDescription}\`
316
+ - Present options: Update existing feature, create standalone, or start new feature
317
+ - Let user choose approach
318
+
319
+ ### **Phase 2: Requirements & Planning**
320
+ 1. **Detailed Requirements Gathering**:
321
+ - Ask specific questions about ${config.domain} needs
322
+ - Understand ${config.domain} constraints and preferences
323
+ - Identify dependencies and integrations
324
+ - Assess ${config.complianceRequirements}
325
+
326
+ 2. **Codebase Analysis** (Mandatory):
327
+ - Analyze existing ${config.domain} patterns and implementations
328
+ - Check for reusable components and patterns
329
+ - Validate consistency with existing architecture
330
+ - Identify potential conflicts or dependencies
331
+
332
+ 3. **Planning & Estimation**:
333
+ \`\`\`javascript
334
+ await tracker.logActivity(sessionId, 'requirements_gathered', {
335
+ description: 'Completed ${config.domain} requirements analysis',
336
+ requirements: detailedRequirements,
337
+ estimatedDuration: estimatedTime
338
+ });
339
+ \`\`\`
340
+
341
+ ### **Phase 3: Implementation**
342
+ 1. **Progressive Implementation**:
343
+ - Start with core ${config.deliverable} structure
344
+ - Add ${config.specificFeatures}
345
+ - Implement quality measures and validations
346
+ - Add documentation and usage examples
347
+
348
+ 2. **Continuous Tracking**:
349
+ \`\`\`javascript
350
+ // Update progress as you work
351
+ await tracker.updateProgress(sessionId, progressPercent, 'implementing', currentActivity);
352
+ await tracker.logActivity(sessionId, '${config.domain}_milestone', {
353
+ description: 'Completed ${config.domain} implementation milestone',
354
+ files: createdFiles,
355
+ deliverables: completedDeliverables
356
+ });
357
+ \`\`\`
358
+
359
+ 3. **Quality Validation**:
360
+ - Execute \`*validate-${config.domain}-quality\` at regular intervals
361
+ - Test ${config.qualityChecks}
362
+ - Verify ${config.complianceRequirements}
363
+ - Validate performance and integration
364
+
365
+ ### **Phase 4: Integration & Completion**
366
+ 1. **Integration Choice**:
367
+ - If related to existing feature: Execute \`*update-feature-${config.domain} {featureName}\`
368
+ - If standalone: Execute \`*create-standalone-${config.deliverable} {name}\`
369
+ - If complex: Execute \`*escalate-to-workflow {reason}\`
370
+
371
+ 2. **Documentation & Handoff**:
372
+ \`\`\`javascript
373
+ await tracker.logActivity(sessionId, 'documentation_created', {
374
+ description: 'Created ${config.domain} documentation and usage examples',
375
+ deliverables: deliverablesList
376
+ });
377
+ \`\`\`
378
+
379
+ 3. **Session Completion**:
380
+ \`\`\`javascript
381
+ await tracker.completeSession(sessionId, \`
382
+ Completed ${config.domain} implementation for: \${taskDescription}
383
+
384
+ Deliverables:
385
+ ${config.deliverables.map(d => `- ${d}`).join('\n ')}
386
+
387
+ Quality Validations:
388
+ - ${config.qualityChecks}
389
+ - ${config.complianceRequirements}
390
+
391
+ Next steps: \${nextSteps}
392
+ \`);
393
+ \`\`\`
394
+
395
+ ### **Continuous Quality Gates**
396
+ - **After Requirements**: Validate completeness and clarity
397
+ - **During Implementation**: Check ${config.domain} consistency and quality
398
+ - **Before Completion**: Run full ${config.domain} validation suite
399
+ - **Post-Implementation**: Verify integration and documentation
400
+
401
+ ### **Escalation Triggers**
402
+ Automatically escalate to full workflow if:
403
+ ${config.escalationTriggers.map(trigger => `- ${trigger}`).join('\n')}
404
+ - User requests full feature development
405
+ - Complexity exceeds independent scope
406
+
407
+ ### **Collaboration Patterns**
408
+ ${Object.entries(config.collaborationScenarios).map(([agent, scenario]) =>
409
+ `- **With ${agent}**: ${scenario}`
410
+ ).join('\n')}
411
+ - **With FeatureMaster**: For workflow coordination and escalation`;
412
+ }
413
+
414
+ updateContextAwareMode(content, config) {
415
+ // Update existing context-aware mode to include Independent Mode
416
+ const oldPattern = /\*\*MANUAL ACTIVATION\*\* \(User calls you directly\):\s*\n1\. Introduce yourself:[^\n]*\n/;
417
+ const newIntro = `**INDEPENDENT MODE** (User calls you directly for specific tasks):
418
+ 1. Introduce yourself: "🎯 Hi! I'm ${config.name}, your ${config.specialty}. I can work independently or as part of the full workflow. I specialize in ${config.skills}. How can I help you with ${config.domain} today?"
419
+ 2. **Detect existing features**: Check \`docs/features/\` for related features to update
420
+ 3. **Offer options**:
421
+ - "🆕 Create new standalone ${config.deliverable}"
422
+ - "🔄 Improve existing feature ${config.domain} (I'll find and update the right feature)"
423
+ - "🏗️ Start new feature (I'll coordinate with FeatureMaster)"
424
+ 4. **Initialize tracking**: Set up lightweight progress tracking and history logging
425
+ 5. **Work collaboratively**: Get user requirements and implement with full documentation
426
+
427
+ **WORKFLOW ACTIVATION** (Called by FeatureMaster or other agents):
428
+ 1. Start directly with ${config.domain} requirements from the workflow
429
+ `;
430
+
431
+ if (oldPattern.test(content)) {
432
+ content = content.replace(oldPattern, newIntro);
433
+ }
434
+
435
+ return content;
436
+ }
437
+
438
+ async ensureDirectories() {
439
+ const dirs = [
440
+ 'docs/independent-sessions',
441
+ 'config',
442
+ 'lib'
443
+ ];
444
+
445
+ for (const dir of dirs) {
446
+ try {
447
+ await fs.mkdir(dir, { recursive: true });
448
+ } catch (error) {
449
+ if (error.code !== 'EEXIST') throw error;
450
+ }
451
+ }
452
+ }
453
+
454
+ async createCoordinationDocs() {
455
+ const coordDoc = `# Independent Agent Mode - Usage Guide
456
+
457
+ ## Quick Start
458
+
459
+ ### Direct Agent Usage
460
+ 1. **Call any agent directly**: \`@ui-agent\`, \`@cubit-agent\`, \`@domain-agent\`, etc.
461
+ 2. **Agent will offer options**:
462
+ - 🆕 Create standalone components
463
+ - 🔄 Improve existing features
464
+ - 🏗️ Start new feature workflow
465
+
466
+ ### Example Workflows
467
+
468
+ #### UI Improvements
469
+ \`\`\`
470
+ @ui-agent "Make the login screen more modern and add dark mode support"
471
+
472
+ Agent will:
473
+ 1. Check existing features for login-related features
474
+ 2. Offer to update existing feature or create standalone improvements
475
+ 3. Track all work with full history
476
+ 4. Coordinate with other agents if needed (e.g., theme changes affecting other screens)
477
+ \`\`\`
478
+
479
+ #### State Management Updates
480
+ \`\`\`
481
+ @cubit-agent "Add loading states and better error handling to the user profile feature"
482
+
483
+ Agent will:
484
+ 1. Find the user profile feature
485
+ 2. Analyze existing state management
486
+ 3. Implement improvements with full tracking
487
+ 4. Update feature documentation and history
488
+ \`\`\`
489
+
490
+ ## Benefits
491
+
492
+ ### 🚀 **Speed & Efficiency**
493
+ - Direct agent access for specific tasks
494
+ - No need to go through full workflow for simple improvements
495
+ - Lightweight tracking without workflow overhead
496
+
497
+ ### 📊 **Full Visibility**
498
+ - All work tracked in independent sessions
499
+ - Complete history and progress monitoring
500
+ - Integration with existing feature documentation
501
+
502
+ ### 🔄 **Seamless Escalation**
503
+ - Automatic escalation to full workflow when needed
504
+ - Agent coordination for complex changes
505
+ - Smooth handoffs between independent and workflow modes
506
+
507
+ ### 🎯 **Flexible Approaches**
508
+ - **Standalone work**: Quick improvements and new components
509
+ - **Feature updates**: Enhance existing features with tracking
510
+ - **Workflow coordination**: Seamless integration with full development process
511
+
512
+ ## Session Tracking
513
+
514
+ All independent agent work is tracked in:
515
+ - \`docs/independent-sessions/{sessionId}.json\` - Session details and progress
516
+ - \`docs/independent-sessions/activity-log.json\` - Central activity log
517
+ - Related feature state updates when working on existing features
518
+
519
+ ## Quality Assurance
520
+
521
+ Independent agents maintain the same quality standards:
522
+ - Comprehensive codebase analysis before implementation
523
+ - Continuous quality validation during work
524
+ - Integration with existing patterns and architecture
525
+ - Documentation and testing requirements
526
+
527
+ ## Agent Capabilities
528
+
529
+ Each agent can work independently while maintaining full coordination:
530
+
531
+ - **UI Agent (Maya)**: Platform-adaptive design, responsive layouts, accessibility
532
+ - **Cubit Agent (Sage)**: State management, performance optimization, error handling
533
+ - **Domain Agent (Atlas)**: Business logic, Clean Architecture, domain services
534
+ - **Data Agent (Nova)**: Repository implementation, API integration, caching
535
+ - **Security Agent (Guardian)**: COPPA compliance, encryption, security auditing
536
+ - **Test Agent (Trinity)**: Testing pyramid, coverage analysis, quality validation
537
+
538
+ ## Best Practices
539
+
540
+ 1. **Start with agent directly** for focused tasks
541
+ 2. **Let agent analyze** existing codebase and related features
542
+ 3. **Choose appropriate approach** based on agent recommendations
543
+ 4. **Monitor progress** through automatic tracking
544
+ 5. **Escalate when needed** for complex cross-domain changes
545
+
546
+ ---
547
+
548
+ **Built with ❤️ by AppIQ Solutions - Independent Mode v2.0.0**
549
+ `;
550
+
551
+ await fs.writeFile('docs/independent-agent-mode-guide.md', coordDoc);
552
+ console.log(' ✅ Created Independent Mode documentation');
553
+ }
554
+ }
555
+
556
+ // Run setup if called directly
557
+ if (require.main === module) {
558
+ const setup = new IndependentModeSetup();
559
+ setup.setupIndependentMode().catch(console.error);
560
+ }
561
+
562
+ module.exports = { IndependentModeSetup };