Skip to content

Architecture

The intro flagged the two gates and the two tracks. This section looks at how that’s shaped as agent teams and a Phase flow, and where the outputs land. Two things are worth watching: agents hand off through _workspace/ files rather than passing bodies through chat, and two gates sit in series right before publishing.

When a natural-language trigger comes in, blog-orchestrator routes the Phases. “Publish it” runs all of Phase 0–5, “just review it” runs Phase 0–4, “just translate” runs Phase 0 and the localization part of Production.

graph TB
start[Natural-language trigger - write a post about this]
p0[Phase 0 Orientation - check local state, slug collisions]
p1[Phase 1 Strategy - produce brief]
p2[Phase 2 Production - research, write, edit, translate]
p3[Phase 3 Quality - AdSense, SEO, E-E-A-T, ko/en parity]
p4[Phase 4 AI Pattern Gate - 14-category score]
p5[Phase 5 Publish - Blogger upload]
start --> p0 --> p1 --> p2 --> p3 --> p4
p4 -->|pass under 30| p5
p4 -->|fail over 60| p2
p3 -->|FAIL| stop[Stop before publishing]

Phase 3 and Phase 4 are both gates. If the Phase 3 quality verdict is FAIL, it stops before publishing; if NEEDS_REVIEW, it fixes the Phase 2 outputs and runs again. If the Phase 4 AI-smell score fails, it hands back to Phase 2 for a rewrite, loops up to twice, and if it still fails, hands off to the user. Only a post that clears both gates reaches the Phase 5 Blogger upload.

Six agents map onto Phases and tracks. Each agent’s responsibility and the skills it reads are listed one line at a time in the Module Source Map in AI_AUTOMATION.md.

AgentTrackResponsibility
strategy-agentWritingPhase 1. Title candidates, slug, category, target reader, keywords, search intent, outline, differentiation angle
production-agentWritingPhase 2. Research, drafting, editing, Korean–English translation
quality-agentWritingPhase 3. AdSense, SEO, E-E-A-T, ko/en parity verdicts
content-leadWritingContent direction and consistency for the writing track
seo-discovery-leadMarketingKeyword discovery, AI-SEO angles
marketing-directorMarketingDistribution after publishing. X, Reddit, Hacker News, AI-SEO

The four writing-track agents fill Phase 1–3, and the two marketing-track agents fill distribution after publishing. The AI Pattern Gate (Phase 4) isn’t an agent; it’s the ai-pattern-check skill running directly.

The two tracks coexist on one channel. Only the entry points fork; they meet over the shared asset of the published post.

graph LR
user[User utterance]
user -->|write a post about this| bo[blog-orchestrator]
user -->|spread this post| md[marketing-director]
bo --> post[Published post - Blogger]
post --> md
md --> x[X thread]
md --> reddit[Reddit]
md --> hn[Hacker News]
md --> aiseo[AI-SEO - LLM citation tuning]

Once the writing track publishes a post, that post becomes the marketing track’s input. To run only the distribution of an already-published post without writing, you call the marketing track directly. The reason the two tracks aren’t bound to one orchestrator is that writing and distribution move at different paces. Distribution happens several times over the life of one post, and re-running just the distribution is a frequent need.

Every agent output is isolated inside one _workspace/ folder. Files outside _workspace/scripts/, .claude/, AI_AUTOMATION.md, CLAUDE.md — are not modified or deleted without human approval. That’s security baseline S2.

_workspace/
├── briefs/
│ ├── {slug}-brief.md Phase 1 strategy
│ ├── {slug}-research.md Phase 2 research
│ ├── {slug}-edit-notes.md Phase 2 edit notes
│ ├── {slug}-quality.md Phase 3 quality report
│ └── {slug}-ai-check.md Phase 4 AI-smell report
├── posts/
│ ├── new/{ko,en}/{category}/{slug}.md awaiting publish (staging)
│ ├── {ko,en}/{category}/{slug}.md archived after publish
│ └── images/ embedded images
└── pages/{ko,en}/*.md Blogger static pages (about, privacy, etc.)

The split between staging and archive is the key spot. A post is written under posts/new/, and after the publish script uploads it successfully, it moves under posts/ preserving the same relative path. blogger_post_id and blogger_url aren’t planted in the staging file; the script fills them in after a successful upload.

When the category isn’t obvious, tool or platform analysis goes under ai, and opinion or workflow essays under thoughts.

The place that binds the Korean and English versions is the frontmatter.

title: "..."
slug: "{slug}"
date: "YYYY-MM-DD"
description: "..."
keywords:
- "..."
lang: "ko"
hreflang_en: "/posts/en/{category}/{slug}"

The English version points back with lang: "en" and hreflang_ko. Because the two bodies point at each other through hreflang, if only one publishes or a path drifts, a search engine won’t recognize the two posts as a pair. The path mapping is deterministic, so a human doesn’t have to align it every time.

The automation entry point points at one place

Section titled “The automation entry point points at one place”

.claude/agents/ and .claude/skills/ are the Claude Code storage location, and AGENTS.md is the Codex entry point. Both read AI_AUTOMATION.md. The Phase definitions, the Module Source Map, the directory contract, and the gate thresholds live in that one file, so the Phase and output contracts are the same in whichever runtime you work.

The next section is verification. It covers what the Phase 3 quality-check judges across four axes, how the Phase 4 ai-pattern-check scores a post, and where the security baseline S1–S8 is enforced.