Inspiration
Long-form fiction breaks under its own weight. A novel spans hundreds of pages; a manga runs for a decade. Somewhere in there, even the author loses the thread — a hair colour that changes between chapters, a character who dies and then shows up alive, a timeline that quietly stops making sense. Creators of long-running series have publicly admitted to re-reading their own back catalog just to stay consistent. Franchises worth billions are built on exactly this fragile continuity.
We wanted to build what a human continuity editor does — read every page, remember every promise the story made, and flag it the moment something contradicts it — except it never gets tired, never forgets, and runs while you write instead of after you've shipped 300 pages you now have to fix.
What it does
Quill is an AI writing partner with persistent memory for long-form fiction. As a writer drafts a chapter, Quill reads each paragraph in the background and:
- Extracts entities and relationships — characters, places, objects, factions, events — into a persistent graph, one per fictional universe.
- Detects contradictions and plot holes live, using a tool-calling reasoning agent, not a single-shot prompt.
- Validates timeline consistency when an event's chronological position looks wrong.
- Forgets what stops mattering — relevance decays over time and archives quietly, then reactivates the moment something is mentioned again.
- Recalls only what fits — a hybrid retrieval system fuses six independently-ranked signals (vector, graph-walk, recency, keyword, consolidated summaries, writer preferences), then fits the result into a token budget instead of dumping everything into the prompt.
- Learns the author, not just the story — accepted/rejected suggestions get promoted into durable writer preferences that shape future craft reviews.
A fourth agent, the Arbiter, sits on top of three specialist agents (continuity, plot-hole, timeline) and synthesizes their raw findings into one prioritized note, instead of three disconnected alerts for what's really one underlying issue.
How we built it — with Codex
Quill is a pre-existing project (first commit June 29, 2026), and under Build Week's pre-existing-project rules only the work added during the Submission Period (July 13–21) is submitted for judging. Before that window, only a rough, unstable pass at the memory core existed — manuscript upload, entity extraction, chapter splitting.
Everything from that point on was built with OpenAI Codex driving implementation: the live-analysis fix and E2E suite, MAP/REDUCE ingestion performance, a native DashScope client (see the codex/sprint3-dashscope-native branch, merged July 16), the writer-memory learning loop, the Skills/craft-review framework, the resilient editor and MCP server, and the full jury-facing frontend refactor, the Arbiter agent, and the eval numbers published in the README — all in the final week. Codex /feedback session ID: 019f6423-55a1-72f3-905e-79d1db0dc16f.
The human decisions throughout: which of the six recall pipelines to trust and in what order, when a "contradiction" is actually intentional foreshadowing (the writer's call, never the AI's), and what to cut from the UI so a judge understands the product's value in one screen instead of eleven technical tabs.
Stack: Go 1.22 + Fiber v2, PostgreSQL 16 with pgvector and Apache AGE, React 18 + TypeScript + Vite, TipTap for the editor, Cytoscape for the relationship graph. The deployed app's model calls run on Qwen Cloud (DashScope) — a separate, parallel submission to Qwen Cloud's own hackathon track used the same codebase; this submission is judged on the Codex-built implementation, not on which inference API the shipped product calls.
Challenges we ran into
- AGE + Cypher injection: Apache AGE forbids parameterized queries inside its Cypher blocks, and entity/relationship labels come from LLM output — every interpolation point had to be defended explicitly.
- The hybrid recall ablation told us something we didn't expect: on our eval corpus, vector+graph alone beat the full six-pipeline fusion. We kept the full fusion in production anyway — six queries is exploratory evidence, not a statistically powered basis for hard-coding a narrower default — and said so directly instead of only reporting the number that looked best.
- A deployment bug we only found by testing the live public URL, not localhost:
crypto.randomUUID()andnavigator.clipboardare restricted to secure browser contexts. Deployed over plain HTTP on a public IP — exactly how a judge reaches it — both the guided-demo entry point and the "copy MCP endpoint" button failed silently, until we caught it end-to-end and shipped a fallback the same session.
Accomplishments that we're proud of
- A genuinely multi-agent system — four independent agents with distinct personas and tool access, not one prompt reused four ways — with a consensus-forming Arbiter on top.
- Measured, not asserted, results: a small but real eval harness reporting recall per pipeline, latency, a forgetting timeline, and consolidation fidelity — published with an honest caveat about sample size.
- A memory system with two subjects, not one: the manuscript and the author.
What we learned
Hybrid retrieval isn't automatically better just because it's hybrid — the ablation matters more than the pitch. And that testing against localhost isn't testing your deployment; the most convincing bug we found all week came from opening the actual public URL a judge would use.
What's next for Quill
- Grow the eval corpus past six gold queries into a properly powered retrieval benchmark.
- Let the Arbiter's synthesis feed back into writer-preference learning, not just the live alert.
- Support importing manuscripts from more formats (DOCX, Scrivener) beyond Markdown/plaintext.
Log in or sign up for Devpost to join the conversation.