@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
JavaScript
/**
* 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);