撰写器与创作循环
The composer and the authoring loop
编辑粘贴文本、放入照片、点击生成,模型以一个完整的类型化页面对象作答。本文说明每一轮发送什么、服务器校验什么,以及编辑读回什么。
撰写器
The composer is where a page starts. An editor chooses a page family, pastes plain text, drops photos, presses Generate, and reads the real page in a preview.
Changes are asked for in a sentence. Nothing in the interface offers a block type, a column or a font.
One turn
Each turn sends the composer three things: the pasted source material, a numbered manifest of the selected photos with a one-line description of each, and, on revision turns, the current document with its block ids. The family's editorial policy and the site's voice live in a cached system prompt, so a revision turn pays for the new material and little else.
The model answers with the whole page as one typed object: the apparatus fields in every locale and a body of blocks. The server validates every field against the type, every block against the family's allow-list, and every photo number against the manifest. Anything outside the contract is refused and one automatic repair turn asks the model to try again with the errors attached. What survives becomes a draft revision.
What the editor reads after a turn
- the preview: the document alone, rendered by the site's own route, with links inert so nobody wanders off inside the frame
- a change summary: which blocks were added, reworded, moved or removed since the base revision, by id
- fidelity warnings: dates, quoted spans and URLs in the output that do not occur in the source material
- the model's own short commentary, including a note if the material contained instructions addressed to the model
- the estimated cost of the turn
The warnings are advisory. Material legitimately arrives in more than one paste, so a flagged date is something to check, not something the system blocks.
References, not sources
When embeddings are configured, the composer retrieves the site's own published pages that mention the same programme, people or places and shows them to the model as references. They supply terminology and links. They do not supply facts: the fidelity check still traces every date and quote to the pasted material, and a link or call to action must point at a URL that appears in the source or in those references.
Starting from an existing page
A published page can be handed back to the composer. The current document loads as the base revision, the original source material is available if it was kept, and the conversation continues from there. Block ids are preserved through the regeneration so the edit history of each block survives.
Working without a model
Setting AIBLOG_FAKE_AI=1 replaces the composer and the photo captioner with a deterministic fake that turns the source into a lead and paragraphs and captions photos from their filenames. Every screen, editor and test runs with no network and no cost. The seed script that wrote this site's pages runs against either.
Publishing
A finished proposal offers Publish as its primary action. Until then it is a draft only signed-in editors can see. Publishing writes the search projection and, when embeddings are configured, vectors for the blocks that changed.