```html

Building a Multi-Site Technical Blog System with Auto-Generated Session Transcripts

This session focused on building an automated technical documentation system that captures granular development work across four separate domains and publishes it to dedicated tech blogs. The goal: create an audit trail detailed enough for stakeholders like Sergio to see exactly what engineering work is happening, without exposing credentials or sensitive data.

What Was Built

A complete infrastructure-as-code system that:

  • Auto-generates technical blog posts from Claude Code session transcripts
  • Deploys to four separate tech blogs: tech.queenofsandiego.com, tech.sailjada.com, tech.dangerouscentaur.com, and tech.burialsatseasandiego.com
  • Captures granular details: file paths, AWS resources, architectural decisions, command examples
  • Runs automatically via Claude Code Stop hook when sessions end
  • Adds navigation links to each site's Ship's Papers menu
  • Filters out all credentials, API keys, and sensitive data before publishing

Infrastructure Architecture

DNS & SSL/TLS

Leveraged existing wildcard certificates:

  • *.queenofsandiego.com wildcard ACM cert in us-east-1
  • *.sailjada.com wildcard ACM cert in us-east-1
  • dangerouscentaur.com uses existing wildcard CloudFront distribution (E2Q4UU71SRNTMB) on dc-sites S3 bucket
  • burialsatseasandiego.com DNS hosted at GoDaddy (manual CNAME validation for ACM cert)

Storage & CDN

Each tech blog uses S3 + CloudFront:

  • qos-tech-blog S3 bucket with CloudFront distribution for queenofsandiego.com tech blog
  • sailjada-tech-blog S3 bucket with CloudFront distribution for sailjada.com tech blog
  • dc-sites S3 bucket (existing) reused for dangerouscentaur tech blog via CNAME
  • bats-tech-blog S3 bucket with CloudFront distribution for burialsatseasandiego.com tech blog

Route53 DNS Records

Created A records in each hosted zone pointing to CloudFront distributions:

  • tech.queenofsandiego.com → CloudFront alias record
  • tech.sailjada.com → CloudFront alias record
  • tech.burialsatseasandiego.com → CloudFront alias record
  • tech.dangerouscentaur.com → Namecheap CNAME (manual setup)

Implementation Details

Core Scripts

tech_blog_init.py — Infrastructure provisioning script that:

  • Creates S3 buckets with versioning and public read ACL
  • Provisions CloudFront distributions with wildcard cert binding
  • Sets up Route53 A records (or provides Namecheap CNAME instructions)
  • Reads infrastructure config from ~/.claude/projects/[repo-path]/memory/infrastructure.json
  • Stores generated infrastructure details for reference

tech_blog_generator.py — Post generation engine that:

  • Reads the session transcript from Claude Code's JSONL format
  • Extracts file modifications, commands executed, and tool interactions
  • Generates semantic HTML with granular technical details
  • Sanitizes all credential patterns: AWS keys, API tokens, passwords, personal data
  • Groups changes by site (queenofsandiego.com, sailjada.com, dangerouscentaur.com, burialsatseasandiego.com)
  • Uploads to the appropriate S3 bucket and invalidates CloudFront cache

tech_blog_stop.sh — Claude Code Stop hook that:

  • Triggers automatically when a Claude Code session ends
  • Extracts the current session transcript from ~/.claude/sessions/
  • Calls the Python blog generator
  • Posts the article to the appropriate tech blog
  • Logs output to ~/.claude/logs/tech_blog_stop.log

Post Generation Logic

The generator parses session transcripts and extracts:

  • Files modified: Exact paths from Write/Edit entries
  • AWS operations: Route53, S3, CloudFront operations with resource IDs
  • Commands executed: Full command text (minus credentials)
  • Tool interactions: AWS SDK calls, domain lookups, infrastructure changes
  • Architectural decisions: Why wildcard certs vs single certs, why S3+CloudFront vs alternatives

Content is organized into semantic HTML sections:

<h2>Specific, Actionable Title</h2>
<h3>What Was Done</h3>
<h3>Technical Details</h3>
<h3>Infrastructure</h3>
<h3>Key Decisions</h3>
<h3>What's Next</h3>

Credential Filtering

Before publishing, the generator strips:

  • AWS access keys, secret keys, session tokens
  • API credentials (GoDaddy, Namecheap, Google Analytics)
  • Database passwords and connection strings
  • Personal email addresses and phone numbers
  • File paths containing /.claude/ or sensitive local paths
  • Full URLs containing auth parameters

Site Navigation Integration

Updated the Ship's Papers menu on each site's main navigation to include:

  • Link to tech.[domain]/ for each site
  • Descriptive text: "Engineering Blog - Technical details of site updates and infrastructure work"
  • Integrated into existing dropdown structure without breaking responsive design

Key Architectural Decisions

Why use Claude Code Stop hooks? The hook runs automatically when a development session ends, ensuring every piece of work gets documented without manual intervention. This creates a natural, chronological audit trail.