tractatus/scripts/seed-scaling-blog-post.js
TheFlow 4618f7a5c8 feat(content): enhance About page and publish scaling roadmap blog article
SUMMARY:
Enhanced About page with democratic legitimacy themes and published new blog
article addressing Tractatus scaling strategy. Preserves Economist first
publication rights by creating substantially different content.

ABOUT PAGE ENHANCEMENTS:
- Added "Why This Matters" section (4 paragraphs on democratic legitimacy)
- Added "Pluralism" as 5th core value (teal border, values-sensitive content)
- Enhanced Mission section with values pluralism opening paragraph
- Updated locale file (about.json) with all new i18n keys
- Themes: constitutional governance, affected communities, plural values

BLOG ARTICLE - "How to Scale Tractatus: Breaking the Chicken-and-Egg Problem":
- 3,500+ words on staged scaling roadmap
- Stage 1: Proof of Concept  Complete (October 2025)
- Stage 2: Enterprise Pilots 🔄 In Progress (Q1-Q2 2026 target)
- Stage 3: Critical Workloads  (Q3-Q4 2026)
- Stage 4: Industry Standards  (2027+)
- Call to action: Pilot partners needed for Stage 2
- Published: https://agenticgovernance.digital/blog-post.html?slug=scaling-tractatus-roadmap

CONTENT DIFFERENTIATION:
- 40%+ unique content from Economist article
- Different audience: Implementers/CTOs vs. business leaders/policymakers
- Different angle: Practical scaling vs. philosophical values argument
- Preserves Economist first publication rights (submit tomorrow)

FILES:
- public/about.html: Democratic legitimacy, Why This Matters, Pluralism
- public/locales/en/about.json: New i18n keys for enhanced content
- docs/outreach/Blog-Article-Scaling-Tractatus.md: Source markdown
- docs/outreach/PUBLISHING_RIGHTS_ANALYSIS.md: Publishing research
- scripts/seed-scaling-blog-post.js: Blog database seeding script
- .claude/metrics/hooks-metrics.json: Session activity tracking

PUBLISHING WORKFLOW:
- Local: Seeded successfully (6 total blog posts)
- Production: Seeded via `node -r dotenv/config scripts/seed-scaling-blog-post.js`
- Accessible via /api/blog and /blog-post.html?slug=scaling-tractatus-roadmap

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 20:29:58 +13:00

109 lines
3.2 KiB
JavaScript

/**
* Seed Scaling Blog Post
* "How to Scale Tractatus: Breaking the Chicken-and-Egg Problem"
*/
const { getCollection, connect, close } = require('../src/utils/db.util');
const fs = require('fs');
const path = require('path');
// Read the markdown content
const markdown = fs.readFileSync(
path.join(__dirname, '../docs/outreach/Blog-Article-Scaling-Tractatus.md'),
'utf8'
);
// Extract content (skip frontmatter-style metadata at top)
const contentStart = markdown.indexOf('---', markdown.indexOf('---') + 3) + 3;
const content = markdown.substring(contentStart).trim();
const BLOG_POST = {
title: 'How to Scale Tractatus: Breaking the Chicken-and-Egg Problem',
slug: 'scaling-tractatus-roadmap',
author: {
type: 'human',
name: 'John Stroh'
},
content: content,
excerpt: 'Every governance framework faces the same chicken-and-egg problem: need deployments to validate, need validation to deploy. Here\'s our staged roadmap for breaking the cycle and scaling Tractatus from proof-of-concept to industry adoption.',
category: 'Implementation',
status: 'published',
published_at: new Date('2025-10-20'),
moderation: {
ai_analysis: null,
human_reviewer: 'John Stroh',
review_notes: 'Scaling roadmap and pilot partner call-to-action',
approved_at: new Date()
},
tractatus_classification: {
quadrant: 'STRATEGIC',
values_sensitive: false,
requires_strategic_review: false
},
tags: [
'scaling',
'roadmap',
'implementation',
'enterprise',
'governance',
'pilot-partners',
'stage-2',
'chicken-and-egg'
],
view_count: 0,
engagement: {
shares: 0,
comments: 0
}
};
async function seedBlogPost() {
try {
console.log('🌱 Seeding scaling blog post...');
await connect();
const collection = await getCollection('blog_posts');
// Check if post already exists
const existing = await collection.findOne({ slug: BLOG_POST.slug });
if (existing) {
console.log('📝 Blog post already exists:', BLOG_POST.slug);
console.log(' Deleting existing post and creating new one...');
await collection.deleteOne({ slug: BLOG_POST.slug });
}
// Insert the blog post
const result = await collection.insertOne(BLOG_POST);
console.log('✅ Blog post created successfully');
console.log(' ID:', result.insertedId);
console.log(' Slug:', BLOG_POST.slug);
console.log(' Title:', BLOG_POST.title);
console.log(' Status:', BLOG_POST.status);
console.log(' Category:', BLOG_POST.category);
console.log(' Tags:', BLOG_POST.tags.join(', '));
console.log('');
console.log('📍 View at: http://localhost:9000/blog-post.html?slug=' + BLOG_POST.slug);
console.log('📍 Blog list: http://localhost:9000/blog.html');
} catch (error) {
console.error('❌ Error seeding blog post:', error);
throw error;
} finally {
await close();
}
}
// Run if called directly
if (require.main === module) {
seedBlogPost()
.then(() => {
console.log('\n✨ Seeding complete');
process.exit(0);
})
.catch(error => {
console.error('\n💥 Seeding failed:', error);
process.exit(1);
});
}
module.exports = { seedBlogPost, BLOG_POST };