- audit-inflection-point.js: Identify fictional content in research paper - fix-inflection-point-fiction.js: Remove fabricated statistics - audit-all-card-sequences.js: Check card sequence quality - audit-card-category-sequences.js: Analyze pedagogical flow - resequence-cards-pedagogically.js: Reorder cards for better learning flow - apply-production-fixes.js: Production deployment script - inspect-*: Helper scripts for analysis Quality improvements: - Removed fictional content from Inflection Point document (3 sections) - Resequenced 21 documents pedagogically (22-67% jumpiness reduction) - Implemented proper learning flow: concepts → warnings → technical → reference
55 lines
2 KiB
JavaScript
55 lines
2 KiB
JavaScript
/**
|
|
* Inspect Inflection Point document sections
|
|
*/
|
|
const { MongoClient } = require('mongodb');
|
|
|
|
async function run() {
|
|
const client = new MongoClient('mongodb://localhost:27017');
|
|
await client.connect();
|
|
|
|
const db = client.db('tractatus_dev');
|
|
const collection = db.collection('documents');
|
|
|
|
const doc = await collection.findOne({ slug: 'executive-summary-tractatus-inflection-point' });
|
|
|
|
if (!doc) {
|
|
console.log('Document not found');
|
|
process.exit(1);
|
|
}
|
|
|
|
console.log('═══════════════════════════════════════════════════════════');
|
|
console.log(' INFLECTION POINT SECTIONS');
|
|
console.log('═══════════════════════════════════════════════════════════\n');
|
|
|
|
console.log(`Title: ${doc.title}`);
|
|
console.log(`Sections: ${doc.sections?.length || 0}\n`);
|
|
|
|
if (doc.sections) {
|
|
doc.sections.forEach((section, idx) => {
|
|
console.log(`${section.number}. "${section.title}"`);
|
|
console.log(` Category: ${section.category}`);
|
|
console.log(` Reading time: ${section.readingTime}`);
|
|
console.log(` Excerpt: ${section.excerpt.substring(0, 80)}...`);
|
|
|
|
// Check for fictional content markers
|
|
const text = section.content_html + section.excerpt;
|
|
const hasStats = /\d+%/.test(text);
|
|
const hasTimeline = /Year 1|Timeline:|Months \d|Phase \d/i.test(text);
|
|
const hasMetrics = /reduction|target|metric|success/i.test(text) && hasStats;
|
|
|
|
if (hasStats || hasTimeline || hasMetrics) {
|
|
console.log(` ⚠️ Contains:`, [
|
|
hasStats && 'Statistics',
|
|
hasTimeline && 'Timeline',
|
|
hasMetrics && 'Performance metrics'
|
|
].filter(Boolean).join(', '));
|
|
}
|
|
|
|
console.log('');
|
|
});
|
|
}
|
|
|
|
await client.close();
|
|
}
|
|
|
|
run().catch(console.error);
|