| … | … | @@ -0,0 +1,48 @@ |
| 1 | #!/usr/bin/env node |
| 2 | |
| 3 | // Full analysis pipeline — runs all three steps in sequence |
| 4 | // Usage: node analyze-all.js [--limit=N] |
| 5 | // |
| 6 | // Steps: |
| 7 | // 1. LLM analyzer (semantic correction detection) |
| 8 | // 2. Full ratchet pipeline (extract → validate → regress → migrate) |
| 9 | // 3. Deep sentiment analysis |
| 10 | |
| 11 | const { execSync } = require('child_process') |
| 12 | const path = require('path') |
| 13 | |
| 14 | const DIR = __dirname |
| 15 | const limitArg = process.argv.find(a => a.startsWith('--limit=')) || '--limit=50' |
| 16 | |
| 17 | function run (label, cmd) { |
| 18 | console.log(`\n${'═'.repeat(60)}`) |
| 19 | console.log(` ${label}`) |
| 20 | console.log('═'.repeat(60)) |
| 21 | try { |
| 22 | execSync(cmd, { cwd: DIR, encoding: 'utf8', stdio: 'inherit', timeout: 600000 }) |
| 23 | } catch (e) { |
| 24 | console.error(` Failed: ${e.message.slice(0, 200)}`) |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | console.log(`Knowledge Ratchet — Full Analysis`) |
| 29 | console.log(`Started: ${new Date().toISOString()}`) |
| 30 | |
| 31 | run( |
| 32 | 'Step 1/3: LLM Semantic Analysis', |
| 33 | `node ${path.join(DIR, 'llm-analyzer.js')} ${limitArg}` |
| 34 | ) |
| 35 | |
| 36 | run( |
| 37 | 'Step 2/3: Ratchet Pipeline (extract → validate → regress → migrate)', |
| 38 | `node ${path.join(DIR, 'run.js')} full` |
| 39 | ) |
| 40 | |
| 41 | run( |
| 42 | 'Step 3/3: Deep Sentiment Analysis', |
| 43 | `node ${path.join(DIR, 'analyze-transcripts.js')}` |
| 44 | ) |
| 45 | |
| 46 | console.log(`\n${'═'.repeat(60)}`) |
| 47 | console.log(` Complete: ${new Date().toISOString()}`) |
| 48 | console.log('═'.repeat(60)) |