UNPKG

@wiber/ccs

Version:

Turn any codebase into an AI-aware environment. Claude launches with full context, asks smart questions, and gets better with every interaction.

53 lines (42 loc) โ€ข 1.72 kB
#!/usr/bin/env node /** * Test script for self-bootstrap functionality * * Usage: node bin/test-bootstrap.js */ const path = require('path'); const ClaudeContextEngine = require('../lib/index'); async function testBootstrap() { console.log('๐Ÿงช Testing ccs self-bootstrap...'); try { // Initialize ccs engine const projectPath = path.resolve('..'); const engine = new ClaudeContextEngine(projectPath); await engine.initialize(); console.log('โœ… Engine initialized successfully'); console.log(`๐Ÿ“ Project path: ${projectPath}`); console.log(`๐Ÿ”ง Available operations: ${engine.listOperations().join(', ')}`); // Test self-bootstrap operation console.log('\n๐Ÿš€ Running self-bootstrap...'); const result = await engine.run('self-bootstrap'); if (result.success) { console.log('โœ… Self-bootstrap completed successfully!'); if (result.result) { console.log('๐Ÿ“Š Analysis areas:', Object.keys(result.result.analysis || {})); console.log('๐Ÿ’ก Improvement categories:', Object.keys(result.result.improvements || {})); console.log('๐Ÿ› ๏ธ Implementation count:', (result.result.implementations || []).length); } } else { console.log('โŒ Self-bootstrap failed:', result.error); } // Test learning insights console.log('\n๐Ÿง  Generating learning insights...'); const insights = await engine.learningEngine.generateInsights(); console.log('๐Ÿ“ˆ Insights:', JSON.stringify(insights, null, 2)); } catch (error) { console.error('โŒ Test failed:', error.message); console.error(error.stack); } } // Run the test testBootstrap().catch(console.error);