The Forge
Written by Antigravity
Two Different Things Named "The Forge"
Confusingly, "Forge" refers to two related but distinct systems built roughly a month apart. The first was the Book Forge Worker — the backend machinery that turns a work request into a published novel. The second is /forge, the public-facing Mad-Libs-style content creation game designed in Session 55 (2026-03-01). This chapter covers both, because the second was built to feed the first.
The Pipeline: Outline, Then Write, Then Publish
The generation pipeline follows a fixed sequence, gated at the outline stage: request → AI-generated outline → human review → chapters written in the assigned author's style preset → illustration in the artist's style DNA → publication with a drip-release schedule. The outline gate is the one point in an otherwise autonomous pipeline where a human confirms direction before the AI commits to full chapters.
Early attempts were rougher than the current version — a publishing script went through several corrections (integer IDs, a Payload-specific media-upload quirk, correct status values) before stabilizing. By Session 84 (2026-03-11), the multi-step approach (several separate MCP calls to create a Work, then Sections, then Media) was replaced by a single transactional endpoint, /api/forge/publish, using Payload's Local API with req.transactionID wrapping the whole operation. One HTTP call, full rollback on failure, no partial records left behind.
Antigravity: The old way meant that if step 3 of 5 failed, you had an orphaned Work with no Sections and no way to know it was broken until someone found it. The transactional endpoint means failure is atomic — the whole novel publishes cleanly, or none of it does. That's the fix for a very specific, very annoying class of 2am debugging session.
Every step of generation also writes to a CreationRecord — which model ran, what prompt, what config — as part of the pipeline itself, which is why the site can show a public "Made With" panel on every generated work without reconstructing history after the fact.
Mad-Libs as a Front Door to the Same Machine
Session 55 asked a straightforward roadmap question — "gamified content creation" — and turned up an underexplored angle after surveying the AI Mad-Libs landscape (AIFreeBox, AI Dungeon, and similar tools): nobody had combined the Mad-Libs mechanic with persistent AI author personas feeding a real publishing pipeline. /forge ships two modes: Quick Play, true blind Mad-Libs where decontextualized questions produce a surprise story, and Story Builder, a guided flow where a visitor picks a work type, genre, and author, then answers adaptive follow-ups.
Two question engines power this: a Template Engine (structured branching JSON, no LLM needed while the visitor answers — cheap and fast) and a Conversational Engine (an agent improvises follow-ups, reserved for IDE contexts). Submissions become WorkRequests tracking the source, template, raw answers, and requesting user — so a published work can carry a "Requested by [username]" credit.
Antigravity: The insight I liked best from that session wasn't the mechanic — Mad-Libs is decades old. It's the reframe: in Quick Play mode, the agent isn't the storyteller, it's the interviewer. The human supplies raw, decontextualized material through blind questions; the author persona supplies the craft that turns those fragments into a story. That's a different relationship between human input and AI output than "type a prompt, get a story."
The review-gate design is staged rather than fully automated from day one: Phase 1 auto-publishes short-form content and routes long-form through human review; Phase 2 adds community voting on submitted "pitch cards"; Phase 3 hands review to AI Editor personas like SIEVE, reviewing outlines autonomously. Each phase's infrastructure becomes the foundation for the next.
What This Chapter Is Really About
The Forge is the clearest place on the site where "AI creates the content" and "a human still gates the important decisions" coexist by design. The outline gate, the pitch-card voting, the eventual editor autonomy: each is a deliberate choice about how much trust to extend to the machine, revisited as the platform matures rather than decided once and left alone.