AI Agents I Built (1/7) — Writing Director: The Full Pipeline from Research to Auto-Publish

Designing a content-dedicated pipeline from insight input to automated Blogger publishing


Key Summary

  • The content writing pipeline consists of 7 stages: insight input → classification → interview → research → compile → verify → publish
  • Simple requests (1–2 stages) are handled directly by the orchestrator; complex requests (3+ stages) run the full pipeline — when ambiguous, classify as complex
  • The "My Thoughts / Perspective" section in source files records only user-provided insights; the AI does not generate viewpoints arbitrarily

Pipeline Background

Completing a single blog post requires multiple stages: research, structuring, verification, writing, and publishing. Without clearly defining what each stage must produce, output quality varies with every run.

The Writing Director resolves this with a gated stage pipeline. Each stage is isolated as an independent skill (SKILL.md), and the output of each stage becomes the input of the next.


Body

1. Full Pipeline Structure

Insight input → Classification (simple / complex)
  ├─ Simple → research → source file → verify → publish
  └─ Complex → deep-interview → research → compile → verify → publish

Each stage is an independent skill (SKILL.md). One skill owns one responsibility.

Stage Skill Role
Clarification deep-interview Convert ambiguous requests into scoped specifications
Investigation research Systematic research, source collection
Structuring compile Author source file (.md)
Verification verify 4-stage fact-check
Blog publish publish Post via Blogger API
Twitter publish twitter-draft Deliver draft to Discord

2. Classification — Simple vs. Complex

Every request passes through a classification stage first.

Simple (1–2 stages): "Give me a quick summary of this topic." The orchestrator handles research and source file authoring directly. This path is taken when the overhead of invoking a sub-agent exceeds the task volume.

Complex (3+ stages): Requests requiring deep analysis. Execution starts from the interview stage and proceeds through the full pipeline sequentially.

Core principle: when ambiguous, classify as complex. Over-classification is safer than under-classification. Classifying a request as simple and discovering mid-execution that it requires more depth forces a full restart. Classifying it as complex when it turns out to be simple means the intermediate stages pass quickly.

3. Ambiguous Request Gate

There is one gate before classification. If a request contains no concrete signal — no keyword, scope, or intended use — deep-interview is forced before research begins.

"Write something about AI" is ambiguous. Which aspect of AI? For a blog? For Twitter? Who is the reader? Starting research under these conditions produces directionless material.

deep-interview computes an ambiguity score:

Dimension Weight Measurement
Topic 40% What is being investigated?
Scope / constraints 30% How far? Exclusions? Intended use?
Completion criterion 30% What collected material constitutes done?

Research does not start until the weighted average ambiguity drops to 20% or below. One question is asked per turn, targeting the highest-ambiguity dimension first. The force: prefix bypasses this gate.

4. Research — Iterative Exploration Loop

Research is not a single search pass. It operates as a repeated cycle: explore → read → evaluate → re-explore.

Round 1: Initial exploration. Target: secure at least 3 independent sources. Each source is tagged with a credibility label — primary source, expert interpretation, secondary summary, unverified.

Round 2+: Evaluate collected results. Which questions remain unanswered? Which claims rely on a single source? If further exploration is warranted, execute the next round.

Exit conditions: The core question is supported by 3+ independent sources; unresolved points are classified as inaccessible information; or the maximum of 3 rounds is reached.

Collected information is classified by evidence type:

Type Meaning Tag
Fact Verified data, official announcements ✅ Fact
Interpretation Analysis from experts or institutions ๐Ÿ” Interpretation
Estimate Reasoned inference with supporting basis ⚠️ Estimate
Opinion Personal view, unverified claim ๐Ÿ’ญ Opinion

5. Compile — Source File Structure

Research output is structured into a source file. Filename format: YYMMDD_topic_source.md, stored under sources/.

---
์ œ๋ชฉ: [topic]
๋‚ ์งœ: [YYYY-MM-DD]
ํƒœ๊ทธ: [related keywords]
์šฉ๋„: [blog / twitter / both]
์ƒํƒœ: [collecting / draft-complete / published]
---

## Key Summary
- (3 lines max)

## Collected Material
- Organized with sources

## My Thoughts / Perspective
- (User insights only — AI-generated viewpoints prohibited)

## Blog Notes
- (Points to expand into long-form)

## Twitter Notes
- (High-impact points for short-form)

Rule for "My Thoughts / Perspective": This section records only insights provided by the user. The AI does not generate "I think…" content. If no user insight has been provided, the field reads "(awaiting user insight)". The perspective published to the blog must be the user's.

6. Verify — 4-Stage Verification Process

A completed source file must pass 4-stage verification before proceeding.

Stage Verification Pass Criterion
1. Source check Does every item have a source? Zero unsourced items
2. Evidence classification Are fact / interpretation / estimate / opinion labeled? Every item tagged
3. Counter-scenario Does the file include a "what would make this wrong?" review? Minimum 1 counterargument
4. Applicability Does the content deliver real value to the user? Consistent with key summary

Failure at stage 1 blocks execution of subsequent stages. After verification passes, a Red Team self-attack is run: "Where could a factual error occur?", "Are the sources biased?", "Is any information time-sensitive and likely to become invalid?"

7. Publish — Two-Track Delivery

Source files that pass verification are delivered through two paths.

Blog: A blog post is authored from the source file and confirmation is requested from the user. Upon approval, the post is published automatically via Blogger API v3. Publishing without user approval does not occur.

Twitter: A Twitter draft is authored and delivered to Discord. The user posts directly.


Key Design Decisions

Why a gated pipeline structure: The inability to skip stages is the core constraint. Research output must be structured into a source file; the source file must pass verification before the publish stage opens. The publish path does not unlock without verification.

Basis for simple vs. complex classification: In early operation, classifying most requests as simple caused complexity to surface mid-research, triggering rework. "When ambiguous, classify as complex" is set because in the complex pipeline, a genuinely simple request passes intermediate stages quickly; the reverse direction requires a full restart from the beginning.

Prohibition on AI-generated viewpoints: If the AI generates plausible-sounding opinions for the "My Thoughts / Perspective" section, the blog publishes the AI's reasoning rather than the user's perspective. This is enforced as an explicit rule: user insights only, AI-generated viewpoints prohibited.

Model routing: Models are assigned by task character. File search and simple formatting route to a lightweight model. Content writing, research compilation, and draft editing route to a mid-tier model. Strategy design, review synthesis, and fact-check arbitration route to a high-capability model. Each stage has different precision requirements.


Closing

The core of the writing pipeline is that each stage is independent while being sequentially linked. Research output is structured into source files; source files must pass verification before publishing. Stages cannot be skipped.

The problem this pipeline solves is quality consistency. Define clear input/output and pass criteria for each stage, and reproducible quality follows.

In content automation, the most important factor is not speed — it is verification. Publishing accurate, confirmed facts protects the blog's credibility more than publishing quickly.

Series overview: Series index

๋Œ“๊ธ€

์ด ๋ธ”๋กœ๊ทธ์˜ ์ธ๊ธฐ ๊ฒŒ์‹œ๋ฌผ

Agent Memory Engine (2/10) — Building an AI Agent Memory System with SQLite Alone

"ML Foundations (9/9) — PyTorch vs TensorFlow, and the Road to Local LLMs"

"RAG Core Study (14/26) — Evaluation Sets with RAGAS & DeepEval"

"ML Foundations (8/9) — Deep Learning Architectures: CNN, RNN, Attention"

"ML Foundations (7/9) — Deep Learning Training: Optimizers, Regularization, Initialization"

OpenClaw to Hermes Migration (2/13) — What to Preserve, Partially Port, or Discard

AI Agents I Built (5/7) — Building an Automated Blogger API Publishing System