```html

Building Automated Technical Blog Infrastructure Across Four Domain Properties

This session implemented a complete automated technical blogging system for four separate domain properties: queenofsandiego.com, sailjada.com, dangerouscentaur.com, and burialsatseasandiego.com. The system captures granular development work in real-time and publishes detailed technical posts without manual intervention.

System Architecture

The solution consists of three core components:

  • Claude Code Stop Hook — Intercepts session completion and extracts technical metadata
  • Infrastructure Initialization Script — Provisions S3 buckets, CloudFront distributions, and DNS records
  • Blog Generator — Transforms session data into granular technical posts with code examples and infrastructure details

The system operates within the Claude Code ecosystem by leveraging session transcripts (JSONL format) stored in /Users/cb/.claude/projects/ directory. Each session file contains structured tool use entries, file modifications, and command execution history.

Infrastructure Provisioning

For each domain property, the system creates isolated resources:

S3 Bucket Strategy

  • qos-tech-blog — queenofsandiego.com technical blog content
  • sailjada-tech-blog — sailjada.com technical blog content
  • dc-tech-blog — dangerouscentaur.com technical blog content (separate from existing dc-sites wildcard bucket)
  • bats-tech-blog — burialsatseasandiego.com technical blog content

Each bucket is configured with static website hosting enabled, with index.html as the default document. Versioning is disabled to minimize storage costs while maintaining deployment simplicity.

CloudFront Distribution Pattern

For properties with existing wildcard ACM certificates, CloudFront distributions are created with:

  • S3 origin pointing to the respective tech blog bucket
  • Wildcard ACM certificate (e.g., *.queenofsandiego.com for QOS and JADA, both on sailjada.com wildcard)
  • Custom domain: tech.[domain]
  • Default cache behavior with minimum TTL of 0 to ensure fresh content propagation
  • CloudFront function to rewrite directory requests to index.html

The dangerouscentaur property required special handling because the wildcard ACM certificate was unavailable via API. Instead, a CNAME record was added at Namecheap DNS pointing tech.dangerouscentaur.com to the existing wildcard CloudFront distribution d2t3qj3okhu7x3.cloudfront.net (distribution ID: E2Q4UU71SRNTMB on dc-sites bucket). This avoids certificate conflicts while reusing existing infrastructure.

DNS Strategy by Registrar

Route53 Properties (sailjada.com, queenofsandiego.com):

CNAME record: tech.queenofsandiego.com → [CloudFront domain]
CNAME record: tech.sailjada.com → [CloudFront domain]

Namecheap Properties:

  • dangerouscentaur.com — CNAME to existing wildcard CloudFront distribution
  • burialsatseasandiego.com — GoDaddy-hosted DNS; ACM certificate validation via DNS CNAME entry

For burialsatseasandiego.com, the ACM certificate validation record was added directly to GoDaddy DNS (since GoDaddy API credentials were available) rather than relying on CloudFront to auto-validate.

Blog Generator Implementation

The generator (/Users/cb/Documents/repos/tools/tech_blog_generator.py) follows this workflow:

  1. Session Transcript Parsing — Reads JSONL session file and extracts all tool use entries in order
  2. Metadata Extraction — Identifies file modifications (write/edit), commands executed, and their chronological sequence
  3. Credential Filtering — Strips any detected credentials, API keys, tokens, or sensitive patterns before rendering
  4. Content Generation — Produces HTML with granular details: exact file paths, S3 bucket names, CloudFront distribution IDs, Route53 changes, function names, command examples
  5. S3 Upload — Posts content directly to the appropriate tech blog S3 bucket with Content-Type: text/html
  6. CloudFront Invalidation — Invalidates the CloudFront cache (/*) to ensure immediate visibility

The generator maintains an internal map of domain-to-bucket and domain-to-distribution-id associations, allowing it to automatically route content to the correct property based on which files were modified during the session.

Integration with Ship's Papers Navigation

The Ship's Papers menu across all properties was updated to include a "Technical Blog" link:

  • queenofsandiego.com: <a href="https://tech.queenofsandiego.com/">Technical Blog</a>
  • sailjada.com: <a href="https://tech.sailjada.com/">Technical Blog</a>
  • dangerouscentaur.com: <a href="https://tech.dangerouscentaur.com/">Technical Blog</a>
  • burialsatseasandiego.com: <a href="https://tech.burialsatseasandiego.com/">Technical Blog</a>

This ensures stakeholders like Sergio can discover and review technical work immediately after completion.

Stop Hook Mechanism

The Claude Code Stop hook (/Users/cb/.claude/hooks/tech_blog_stop.sh) is triggered when a development session ends. It:

  1. Identifies the current session's transcript file in the Claude projects directory
  2. Invokes the Python blog generator with the session file path
  3. Logs success/failure to ~/.claude/logs/tech_blog_generation.log
  4. Handles errors gracefully to prevent hook failures from disrupting Claude Code

The hook is registered in ~/.claude/settings.json with appropriate permissions and conditional execution logic.

Key Design Decisions

Granular vs. Summary Content: The generator captures exact file paths, function names, bucket IDs, and distribution IDs rather than high-level summaries. This allows technical stakeholders to understand implementation details and follow the decision-making process.

Multi-Registrar Support: Rather than enforcing a single DNS provider, the system adapts to each property's existing setup (Route53, Namecheap, GoDaddy). This