How Cortex Learned to Write: Autonomous Blog Post Creation
TL;DR
Cortex just learned to create blog posts autonomously. By cloning and comprehensively analyzing the blog repository, it now understands the entire content creation workflow—from Astro’s content collections to animated SVG generation to SEO optimization. The result: AI-powered blog post creation that follows existing patterns, maintains consistency, and optimizes for both human readers and search engines.
What Cortex Learned:
- Astro 5 + TailwindCSS 4 tech stack
- Content collections schema and frontmatter structure
- 8 content categories with specific color palettes
- Animated SVG hero image generation spec
- SEO/AEO integration (Open Graph, Schema.org, RSS, sitemap)
- Build and deployment workflow
The Process:
- Clone repository to /Users/ryandahlberg/Projects/blog
- Analyze tech stack, framework configuration, content structure
- Learn from 66+ existing posts
- Extract patterns from templates and specifications
- Document complete workflow for autonomous execution
The Challenge: Teaching AI to Create Content
Most AI systems can write content when given detailed instructions. But truly autonomous content creation requires understanding the entire ecosystem:
- Technical constraints - What framework? What file structure? What formats?
- Content patterns - What makes a good post? How are they structured?
- Visual standards - What do hero images look like? How are they created?
- SEO requirements - What metadata is needed? How is it structured?
- Build process - How does content get from markdown to production?
This isn’t just about writing words—it’s about understanding a complete publishing system.
The Learning Process
Step 1: Tech Stack Analysis
Cortex started by reading the core configuration files:
Astro Configuration (astro.config.mjs):
- Framework: Astro 5.16.1
- Styling: TailwindCSS 4 via Vite plugin
- Image optimization: Sharp service
- Site URL: https://ry-ops.dev
- Build optimizations: CSS code splitting, HTML compression
Content Schema (src/content/config.ts):
- Content collections using Zod validation
- Frontmatter structure with strict typing
- 8 defined categories
- Hero image configuration (new: generated SVGs, legacy: stock photos)
- Series support for connected posts
Step 2: Content Structure Discovery
By analyzing existing posts, Cortex learned:
Post Anatomy:
---
title: 'Post Title (under 60 chars for SEO)'
description: 'Meta description (150-160 chars for SEO)'
category: 'AI & ML' # One of 8 categories
date: 2025-12-13T14:00:00.000Z # ISO format, 2pm UTC = 8am CST
author:
name: Ryan Dahlberg
avatar: /ryan-dahlberg-avatar.svg
featured: false # Homepage feature flag
tags:
- Tag1
- Tag2
hero:
image: /images/posts/{slug}-hero.svg
generated: true
---
## TL;DR
Brief summary with bullet points
---
## Main Content
Structured with H2/H3 headings
Content Patterns Observed:
- TL;DR section at the top (readers love quick summaries)
- Clear H2/H3 hierarchy for skimmability
- Technical details with code blocks
- Tables for structured data
- Horizontal rules to separate major sections
- Call-to-action or repository link at the end
Step 3: Visual System Learning
The most interesting discovery: every post needs a unique animated SVG hero image.
SVG Specification (.claude/specs/svg-hero.md):
- Dimensions: 1200x630px (Open Graph standard)
- Must be animated (CSS keyframes)
- NO text allowed (accessibility + internationalization)
- Category-specific color palettes
- File size under 50KB
- Loosely relatable to post topic
Example Color Palettes:
- AI & ML: Indigo/purple (#6366f1, #8b5cf6, #a855f7)
- Developer skills: Emerald greens (#10b981, #34d399)
- Engineering: Blue spectrum (#3b82f6, #60a5fa)
- Security: Red spectrum (#ef4444, #f87171)
Animation Types:
- Float/bob (8-15s duration)
- Rotation (continuous, linear)
- Pulse/scale (breathing effect)
- Opacity fade (twinkle effect)
- Orbital movement (for particles)
Step 4: SEO/AEO Integration
Cortex discovered a comprehensive SEO strategy built into the Layout:
Metadata Layers:
- Basic SEO - Title, description, canonical URL, robots directives
- Open Graph - Facebook/LinkedIn sharing optimization
- Twitter Cards - Rich Twitter previews
- Schema.org - Structured data (BlogPosting, Person, Organization)
- RSS Feed - Auto-generated from posts
- Sitemap - Dynamic XML with images, AMP links, priorities
- AMP Pages - Accelerated Mobile Pages support
Key Insights:
- Image URLs must be absolute for OG tags
- Structured data includes publisher, author, keywords
- RSS excludes “Docs” category posts
- Sitemap includes category pages, legal pages, blog posts
- Google Analytics with anonymized IP
Step 5: Build & Deployment
Development Workflow:
npm run dev # Local dev server (localhost:4321)
npm run build # Production build to ./dist/
npm run preview # Preview production build
Image Management Scripts:
npm run generate-images # Generate hero images
npm run generate-images:dry # Dry run (preview)
npm run check-images # Check for duplicates
npm run convert-webp # Convert to WebP
Deployment:
- Static site generation (SSG)
- Builds to
./dist/directory - GitHub Actions for security scanning
- Likely deployed to Netlify/Vercel (no config found, using defaults)
The Autonomous Creation Workflow
Based on this learning, Cortex can now:
1. Receive Content Request
User: "Write a post about Cortex's parallel execution capabilities"
2. Analyze & Plan
- Determine category (AI & ML)
- Extract key topics (parallel execution, worker pools, concurrency)
- Select appropriate tags
- Choose color palette for SVG
- Plan visual metaphor (parallel streams, concurrent nodes)
3. Generate SVG Hero
Create unique animated SVG following the spec:
- 1200x630 dimensions
- AI & ML color palette (indigo/purple)
- Visual metaphor: flowing parallel streams with orbiting particles
- 3 animation types: float, fade, orbit
- No text, under 50KB
4. Write Content
Structure following observed patterns:
- TL;DR with bullet points
- Clear section hierarchy
- Code examples where relevant
- Technical accuracy (Cortex knows its own architecture)
- SEO-optimized length (1000-1500 words)
5. Generate Frontmatter
---
title: 'Cortex Parallel Execution: Massive Concurrency Explained'
description: 'How Cortex achieves true parallel execution with worker pools, handling hundreds of concurrent tasks while maintaining coordination and learning.'
category: AI & ML
date: 2025-12-13T14:00:00.000Z
author:
name: Ryan Dahlberg
avatar: /ryan-dahlberg-avatar.svg
featured: true
tags:
- Concurrency
- Parallel Execution
- Worker Pools
- Architecture
hero:
image: /images/posts/cortex-parallel-execution-massive-concurrency-hero.svg
generated: true
---
6. Verify & Validate
- Check frontmatter schema compliance
- Verify SVG dimensions and animations
- Ensure description length (150-160 chars)
- Validate date format
- Confirm category matches allowed list
- Test build (
npm run build)
7. Optional: Social Publishing
Using the social publisher daemon:
- Generate LinkedIn post (professional tone)
- Generate Twitter/X thread (concise, engaging)
- Schedule publication
- Track engagement
What Makes This Autonomous
The key difference between “AI writes content” and “autonomous content creation”:
Traditional AI Content:
- Requires detailed prompt for every post
- Needs manual image selection/creation
- Requires frontmatter specification
- Needs SEO metadata guidance
- Build/deployment is separate process
Autonomous Cortex Content:
- Understands blog ecosystem completely
- Generates compliant SVG heroes automatically
- Follows established patterns without prompting
- Applies SEO best practices automatically
- Can execute full workflow end-to-end
Real-World Application
This learning enables Cortex to:
-
Generate Content Calendar Posts
- 260 posts planned (Mon-Fri schedule)
- Autonomous generation of each post
- Maintains consistency across series
-
Create Technical Documentation
- Analyze new features
- Write comprehensive guides
- Generate appropriate visuals
-
Respond to Events
- New Cortex milestone? Write announcement post
- Security vulnerability fixed? Document the fix
- Performance improvement? Explain the optimization
-
Maintain Blog Health
- Update outdated posts
- Fix broken links
- Optimize underperforming content
The Meta-Learning Cycle
The fascinating part: Cortex can now improve its own blog content creation:
Write Post → Analyze Performance → Learn Patterns → Improve Next Post
Metrics to Learn From:
- Page views (what topics resonate?)
- Time on page (what length is optimal?)
- Social shares (what’s shareable?)
- SEO rankings (what keywords work?)
- User feedback (what’s valuable?)
This creates a feedback loop where blog content gets progressively better, informed by real engagement data.
Privacy & Control
Important notes on autonomous operation:
Safe to Generate:
- High-level architecture discussions
- Concept explanations
- Tutorial content
- Anonymized examples
- Open-source integrations
Requires Review:
- Specific implementation details
- Production metrics
- Customer examples
- Proprietary algorithms
Cortex maintains the content calendar’s privacy guidelines, ensuring public posts never expose sensitive information.
What’s Next
With this foundation, future enhancements include:
- AEO Optimization - Answer Engine Optimization for AI search
- Multi-Format Content - Generate video scripts, podcast outlines
- Localization - Multi-language support
- Interactive Content - Embedded demos, code playgrounds
- Performance Analytics - Real-time content optimization
Try It Yourself
The blog repository structure is designed for both human and AI authorship:
- Clear Specifications -
.claude/specs/directory with formal specs - Templates -
.claude/POST_TEMPLATE.mdfor structure - Scripts - Automation in
scripts/directory - Content Schema - Zod validation ensures consistency
Whether you’re a human writer or an AI system, the structure guides you to create high-quality, consistent content.
Technical Details
Repository: https://github.com/ry-ops/blog Framework: Astro 5.16.1 + TailwindCSS 4 Total Posts: 66+ posts Categories: 8 (AI & ML, Developer skills, Engineering, Enterprise software, News & insights, Open Source, Security, Docs) Image Format: Animated SVG (1200x630) Deployment: Static site generation SEO: Full Open Graph, Schema.org, RSS, Sitemap
Learning Artifacts:
- Blog system analysis documentation
- Post creation workflow guide
- SVG hero generation spec
- SEO/AEO integration points
- Example templates
The result: Cortex can now autonomously create blog posts that match the quality, structure, and SEO optimization of human-written content—while scaling to handle the ambitious 260-post content calendar.
This post was created as an example during Cortex’s blog repository learning phase—demonstrating the very capabilities it describes.