AI ProgramsRetreat
AboutCareersBook a Conversation
Workflows/RevenueBuilt

The Writer Agent

A good post is not one model call; it is eight passes, each with its own lens and its own check. This agent runs them in the brand’s own order, one function per step, and refuses to move on until the step holds. What comes out is a post with figures, links, a FAQ and a hero, waiting on the hub for a person to read it and press Publish.

Trigger Run the writer, on the campaign hubSteps Eleven, one function eachHuman touchpoints The idea, the Publish button

An idea in, a publishable post out

Seven model passes and one pure check between the button and the approver. The brand profile is the spec: the pipeline hard-codes no word count, no channel list and no lens; it reads them from the profile and fails a step whose rule is missing.

01Written by a person
Idea and Brand
Marketer
02Every active channel
Draft
Claude
03The editing lens
Edit
Claude
04Slug, keyword, five FAQ
SEO and AEO
Claude
05Two or three figures
Exhibits
Claude
0616:9
Hero Image
Gemini
07Internal and source
Links
Claude
08The house format
Assemble
Claude
09Zero errors or stop
Validate
System
10Email, LinkedIn, Facebook
Channels
Claude
11On the date, or by a person
Publish
System

How each step works

01
The idea and the brandMarketerBefore the button

A campaign needs two things before the button is live: a brand, whose profile carries the voice, hard rules, lenses, image style and word range; and a written idea with its sources, which is the only material the model may quote or cite. Pressing Run the writer sets the step pointer to draft and runs the first step in the same request, so the hub shows movement at once.

02
DraftClaudeClaude, one call

The brand writer drafts every channel the profile lists as active (the blog always, plus email, LinkedIn or Facebook when the profile says so), each with an image brief. The step passes only when every asked-for channel came back, the blog sits inside the brand’s word range and carries no em dash. Nothing is stored on a failed check, so a retry drafts again rather than editing a short post into shape.

03
EditClaudeClaude, one call

One pass with the brand’s editing lens: editor, not author. The model returns the edited body and a change log of what was cut, moved or sharpened, and may add no fact that is not in the post or its sources. The server checks the house rules and the word range and requires a non-empty log, then writes the body and appends the log to the asset’s notes.

04
SEO and AEOClaudeClaude, one call

The search package as fields: a keyword-led title tag split from the H1, a meta description, a kebab-case slug, primary and secondary keywords, an excerpt, a category, and five FAQ questions an AI assistant would extract, the first starting with How or What and carrying the primary keyword verbatim. The server writes it in the one labelled format the publish gate reads and fails the step if the slug is taken, the title tag is the generic pattern, or the package does not parse back.

05
ExhibitsClaudeClaude, then resvg

Two or three figures as self-contained SVG in the brand palette, each anchored to an existing heading. The server rejects any SVG that references external content, checks that every number in the figure’s text is stated in the body, renders each to PNG, uploads it, and places a figure block under the named heading. A retry strips the old figures first, so nothing stacks.

06
Hero imageGeminiGemini image model

The hero at 16:9 from the image brief the draft wrote and the brand’s image style, generated by the image model the rest of the marketing hub uses. The step passes when the new version is recorded and is the asset’s selected image; a generated image that did not land as the selection fails the step.

07
LinksClaudeClaude, one call

Two to four related published posts, each linked from a phrase already in a body paragraph, and one link per source URL the idea supplies at its first mention. The model picks phrases; the server does the wrapping, so the anchor text is always the author’s words. The step fails if fewer than two internal links could be placed, if any link points at an audit page, or if the reader’s text changed by a character.

08
AssembleClaudeClaude, one call

The house format. An Idea in Brief box (problem, insight, way forward) before the first heading, one to three pull quotes copied verbatim from the idea’s sources and placed under the heading that discusses them, and the five-item FAQ at the end. A quote the server cannot find verbatim in the idea is dropped; if none survive, the step fails. The assembled body is then rendered through the real sanitizer and the step passes only if every block came through: one brief, five FAQ items, at least one blockquote, and every figure the exhibits step placed.

09
ValidateSystemNo model

The publish gate plus the process checks, run once more on the finished body: presence of body, SEO package and hero; a free slug; the word range; no em dash, no audit or hiring language, the brand name spelled Edge8; exactly one Idea in Brief; at least two exhibits; a pull quote; at least two bolded data points; and the FAQ rule. Zero errors, or the run stops here with every failure listed. For a brand without the auto-publish switch the run parks at ready here and the ops channel hears once; with the switch on, the run carries on.

10
ChannelsClaudeClaude, then an image per channel

The email, LinkedIn and Facebook posts, written from the final validated article rather than the first draft, each per its channel rules and each with an image from its own brief. The post's URL is known from its slug, so the channels can link to it before it is live. With auto-publish on the channel assets are approved as written, so the campaign reads as built.

11
PublishSystemOn the date, or by a person

Without the switch, a person reads the post on the hub and presses the same Publish button the hub always had. With it, the pipeline finishes the job: a post dated today goes live at once and the live URL is confirmed; a post dated later is scheduled and the daily publish routine puts it live that morning. Either way the campaign is marked done on the day its post goes live.

Every exception has an owner

A run stops at the first step whose check fails, writes the error on the campaign, and tells the ops channel once. Nothing retries on its own. The hub offers three verbs: Retry step, Continue, Stop.

ConditionWhat happensWhere you hear about it
The campaign has no brand or no written ideaThe button is disabled; a run cannot startThe hub, before anything runs
The brand profile states no blog word rangeDraft fails with the text to add under Marketing > BrandsLark ops message, the hub
The draft misses a channel the brand asks for, or the blog is outside the word rangeDraft fails; nothing is stored, so a retry drafts again rather than editing a short post into shapeLark ops message, the hub
Any step returns an em dash, audit or hiring language, or the brand name misspelledThat step fails with every rule it brokeLark ops message, the hub
The slug is invalid or another post already owns itSEO fails; the package is not writtenLark ops message, the hub
An exhibit shows a number the body never statesExhibits fails; an exhibit illustrates, it never introduces a factLark ops message, the hub
An exhibit references external content (a script, an image, a URL)Exhibits fails before renderingLark ops message, the hub
Fewer than two internal links land on phrases already in the bodyLinks fails; the model never proposes new wordingLark ops message, the hub
No pull quote can be verified verbatim against the idea’s sourcesAssemble failsLark ops message, the hub
The sanitizer drops a block on renderAssemble fails naming the block, so a broken post never reaches validateLark ops message, the hub
Validate finds any publish or process errorThe run stops with every failure listed; nothing is parked at readyLark ops message, the hub
A retry runs exhibits or assemble againOld figures, brief, quotes and FAQ are stripped first; nothing stacksNowhere, by design
A hand-off between steps is droppedThe run sits on its current step with no error; Continue hands it on againThe hub shows the step, still marked running
A person presses StopThe run ends; the assets keep what the steps so far wroteThe hub

Data, timing, and how we know it works

Reads and writes

  • Reads: the campaign (idea, objective, brand, pillar); the brand profile; the campaign’s blog asset; the published post list; existing slugs
  • Writes: the blog asset’s body, title, SEO package, image brief, hero and notes; exhibit PNGs in the asset’s folder; the step pointer, error and start time on the campaign; one routine run row per step
  • Models: seven steps run on the frontier tier with a structured-output schema at high effort; the hero runs on the image model; validate calls no model
  • Every model call is structured output only: the pipeline, not the model, decides what runs next

Timing model

  • On demand only. There is no schedule; the route sits under the cron path because it shares the cron bearer and the run log
  • The first step runs inside the button’s request; each passing step then makes one authenticated call to its own route for the next
  • One step per function call, so every step fits the platform’s request limit and gets its own run row
  • The run parks at ready; nothing moves it past that state except a person, or the brand’s auto-publish switch
  • Run the writer again restarts from draft and rewrites the post

How we know it works

  • Every check is a pure function over markdown with a test that proves it blocks
  • The change log on the asset says what each pass did, so a bad edit can be traced to its step
  • Settings → Agents shows the run per step with its tokens; the cost of a post is a sum, not a guess
  • A run that stops is loud; a run that parks is loud once; silence means nobody pressed the button

The seven elements

Every workflow we document has the same anatomy: seven elements, each assigned to a human, a machine, or both. This is the Centaur Map from our workflow design method.

01 TriggerBoth

A person presses Run the writer on a campaign that has a brand and a written idea, or the hourly schedule starts it the day before the campaign date. Either way a run starts because the idea was written and dated.

02 InputsBoth

The idea and its sources, written by a person. The brand profile: voice, hard rules, editing lens, SEO lens, image style, channel rules and word range. The published post list for internal links.

03 DecisionBoth

The model decides the words, the keyword, the figures and the quotes. The pipeline decides the order, refuses to skip, and rejects any output that breaks a house rule. A person decides whether the finished post goes live.

04 RoutingMachine

The step pointer lives on the campaign. After each passing step the function makes one authenticated call to its own route for the next step, so a run chains through with nothing polling.

05 OutputMachine

One blog asset: body, SEO package with five FAQ, two or more exhibits as PNG, a 16:9 hero, internal and source links, an Idea in Brief box and a verbatim pull quote. A dated change log on the asset, one block per step.

06 DeliveryBoth

The run parks at ready and the ops channel hears once. A person opens the post from the hub and publishes it with the same button they always had. A brand with auto-publish switched on skips that step: a post dated today goes live at once, a post dated later is scheduled and the daily publish routine puts it live that morning.

07 MeasurementMachine

One routine run row per step on Settings → Agents, with the model tokens it cost, so the price of a post is a number per step, not a monthly surprise.

The posts this agent finishes are what the letter agent picks from every Monday, and the publish button it stops at is the one described in Blog Publishing. Same pattern in each: the machine does the passes, a person does the deciding.