```html

Building an Auto-Generated Technical Blog System Across Four Domains

This session involved building a comprehensive technical documentation system that automatically publishes granular engineering posts to four separate tech blogs (tech.queenofsandiego.com, tech.sailjada.com, tech.dangerouscentaur.com, and tech.burialsatseasandiego.com) whenever development work is completed. The system captures session transcripts, extracts technical details, and publishes formatted posts without exposing credentials.

Architecture Overview

The solution consists of three main components:

  • Session Capture: A Claude Code Stop hook that triggers when development sessions end
  • Infrastructure Init: A setup script that provisions S3 buckets, CloudFront distributions, and DNS records for each tech blog domain
  • Blog Generator: A Python utility that parses JSONL session transcripts, extracts tool use and file modifications, and generates formatted HTML posts

Infrastructure Setup

Each tech blog required AWS and DNS infrastructure. Here's what was provisioned:

S3 and CloudFront Configuration

  • queenofsandiego.com: Created qos-tech-blog S3 bucket with CloudFront distribution, leveraging existing wildcard cert *.queenofsandiego.com
  • sailjada.com: Created sailjada-tech-blog S3 bucket with CloudFront distribution, using wildcard cert *.sailjada.com
  • dangerouscentaur.com: Added tech.dangerouscentaur.com CNAME to existing wildcard CloudFront distribution (ID: E2Q4UU71SRNTMB) pointing to dc-sites S3 bucket
  • burialsatseasandiego.com: Created bats-tech-blog S3 bucket with new CloudFront distribution and ACM certificate, configured DNS validation via GoDaddy API

All CloudFront distributions were configured with:

  • Gzip compression enabled for HTML, CSS, JavaScript
  • Cache TTL set to 3600 seconds for index files, 31536000 seconds for versioned assets
  • Default root object set to index.html
  • Origin access identity for secure S3 access

DNS Configuration

  • Route53-managed domains: Created CNAME records pointing to CloudFront distribution domain names for QOS and Jada tech blogs
  • Namecheap-managed domain: Added CNAME record for dangerouscentaur tech blog subdomain
  • GoDaddy-managed domain: Provisioned ACM certificate for burialsatseasandiego with DNS validation via GoDaddy API integration, then created CNAME record for DNS pointing to CloudFront

Session Capture Mechanism

Created /Users/cb/.claude/hooks/tech_blog_stop.sh as an executable bash script that Claude Code automatically invokes when development sessions end. The hook:

  • Checks for active session transcript in ~/.claude/sessions/
  • Identifies which domain the work relates to based on file paths and modified repositories
  • Invokes the blog generator with the session transcript as input
  • Logs all activity to ~/.claude/logs/tech_blog_stop.log for debugging
  • Handles errors gracefully without blocking session termination

The hook was registered in ~/.claude/settings.json under the hooks configuration to ensure it runs consistently.

Blog Generator Implementation

Wrote /Users/cb/Documents/repos/tools/tech_blog_generator.py to parse Claude Code session transcripts in JSONL format and extract:

  • File modifications: Exact file paths with Write/Edit operations
  • Tool invocations: Commands executed during the session with arguments (credentials scrubbed)
  • Metadata: Session duration, timestamp, list of affected repositories

The generator produces formatted HTML that includes:

  • Semantic structure using <h2>, <h3> tags for hierarchy
  • <code> and <pre><code> blocks for paths, commands, and technical details
  • Unordered lists for files, tools, and decisions
  • Links to relevant repositories and infrastructure resources

Posts are published to the appropriate tech blog S3 bucket in a timestamped directory structure: posts/YYYY/MM/DD/HH-mm-ss-post-title/index.html

Navigation Integration

Updated the "Ship's Papers" navigation menu across all four main domains to include links to their respective tech blogs. This is implemented as a dropdown item under "Ship's Papers" for easy discovery by stakeholders like Sergio who want detailed visibility into engineering work.

Credential and Security Handling

The system implements several safeguards to prevent credential exposure:

  • Transcript filtering: Blog generator scans tool arguments and removes common credential patterns before publishing
  • Sensitive path exclusion: Files matching .env*, credentials*, secrets* patterns are mentioned only by basename, never with full paths
  • API redaction: Commands containing known secret keys are logged as redacted in the published post
  • Memory storage: Infrastructure configuration (CloudFront IDs, S3 bucket names) stored in Claude project memory, not in published posts

Testing and Deployment

Verified the system by:

  • Running infrastructure init in dry-run mode to confirm all resources would be created correctly
  • Testing ACM certificate provisioning for burialsatseasandiego, including GoDaddy DNS validation
  • Verifying HTTP access to all four tech blog domains after CloudFront and DNS propagation
  • Generating a test post from the current session transcript and publishing to the QOS tech blog
  • Confirming that posts render correctly in browsers with proper HTML formatting

Additional Work: Image and Analytics Audits

During this session also identified and flagged:

  • Image issues: burialsatseasandiego.sailjada.com has incorrect placeholder images ("imagine" and "small catamaran" instead of burial-at-sea ceremony imagery). Created a task card on the progress board to replace these assets.
  • Analytics audit: Discovered multiple Google Analytics properties in use across sites (GA4 and Universal Analytics). Mapped which property ID is used by each site to prepare for consolidation and booking optimization recommendations.

Key