The AI Writer module is off until coullworks-blog.ai.enabled is true. Configuration keys are listed in the configuration reference.
Providers#
| Name | Values | What it is |
|---|
| Provider: openai | | Capabilities: AiProvider, MakesImages, ResearchesWeb, WritesStructured. Models: gpt-6.1-sol (default), gpt-6-astra, gpt-6-luna; images gpt-image-2.5-flare (default), gpt-image-2.5-sunburst; endpoints /v1/responses and /v1/images/generations. Keys stored encrypted per blog (ai_credentials); custom provider: tag a class implementing AiProvider with cwb.ai-providers. |
| Provider: gemini | | Capabilities: AiProvider, MakesImages. Models: images only: gemini-3-pro-image; no text models. Keys stored encrypted per blog (ai_credentials); custom provider: tag a class implementing AiProvider with cwb.ai-providers. |
Writer#
| Name | Values | What it is |
|---|
| Run steps enum | research, outline, write, images, review | The steps an AI writer run goes through. |
| Run kinds | new, refresh | Whether a run writes a new article or refreshes an existing one. |
| Run statuses | queued, running, done, failed, cancelled | The states of an AI writer run. |
| Generation kinds (spend ledger) | research, outline, article, meta, image, refresh_diff | The kinds of provider call recorded in the spend ledger. |
| Generation statuses | running, done, failed | The states of one recorded provider call. |
| Run-post role | created, refreshed | How a run relates to a post: it created the post, or refreshed it. |
Prompts#
| Name | Values | What it is |
|---|
| Prompt asset: humanizer-v2 | | Rules the writer must follow so the text does not read machine-written; local HumanizerCheck scores 100 and takes 12 off per finding. Versioned; sent as written. |
| Prompt asset: research-v1 | | Research step prompt (web research with sources and claims). Versioned; sent as written. |
| Prompt asset: writer-v1 | | Outline/article writing prompt. Versioned; sent as written. |
| Prompt asset: refresh-v1 | | Refresh prompt (diff against the existing article). Versioned; sent as written. |
| Prompt asset: image-v1 | | Image prompt. Versioned; sent as written. |
Behaviour#
| Name | Values | What it is |
|---|
| Spend guard | | Monthly cap and hourly call limit are checked before each provider call; a reservation priced from max_tokens is written first (cache lock cwb-ai-spend:{blog}); settle() records real usage; SpendCapExceeded / RateLimitExceeded refuse the call. |
| Writer block types | | Config ai.writer_block_types: heading, text, callout, table; takeaways, FAQ, images and sources are added by code. |
| Credential store | | Per-blog provider keys encrypted at rest; only last four characters ever shown; key field write-only; "Check key" calls the provider models endpoint. |
| Claims and sources | | Research stores ai_sources and ai_claims; pinned sources are kept, dropped ones excluded; citations contributor adds sources to SEO output (CitationContributor). |
| Retention | | cwb:ai-prune deletes stored output older than ai.retention_days; runs, sources, claims and usage stay. |
| Drafts only | | DraftSaver creates a draft; the queue never publishes. |
Queue#
| Name | Values | What it is |
|---|
| Queue item states | queued, running, done, failed, paused, cancelled | The states of an item in the bulk queue. |