Inspiration

Maliang (马良) is the boy from the ancient Chinese fable whose pen brings drawings to life. AI image tools have made that real — and taught exactly the wrong lesson: mumble anything, get a masterpiece. The craft of expression disappears.

This matters more than it sounds. Prompting is now a production skill. The gap between "make me an app" and a prompt that actually builds what you pictured is the same gap writing teachers have always tried to close: the distance between a vague idea and a precise one. Weak expression used to mean a bad essay grade. Now it means a bad product.

Maliang inverts the fable. The pen only answers to the words you actually wrote. Vague writing gets a pencil sketch; specific, revised writing gets inked. Revision stops being homework and becomes the game mechanic.

What it does

You write a comic panel in your own words. Maliang draws exactly what the words say — every renderable detail is bound to a source span in your sentence, and anything you didn't specify stays visibly provisional (pencil). Write "Mara waits in the dark cave" and the cave appears, but Mara is a blank outline until you say what she looks like.

When a picture comes out pencil-heavy, a consent-first writing helper can open: you choose whether the picture already matches your idea, pick one focus (action, appearance, setting), get one question, and return to your editor unchanged. After you revise, Maliang redraws. The helper never writes for you — no inserted text, no replacement words, no story ideas, no scores, no gates.

Resolved diagnostics earn craft cards: real author tricks like "show, don't tell" and "strong verbs," unlocked only when your own rewrite visibly fixed the picture.

Everything is local-first and private: encrypted persistence, encrypted illustration cache, dialogue composed locally, PDF export.

How we built it

GPT-5.6 is the runtime engine, not just the build tool. gpt-5.6-terra runs every structured text job — safety classification, scene extraction with source-span evidence, render inspection, complaint diagnosis — through sandboxed, ephemeral Codex exec subprocesses with schema-constrained output. gpt-5.6-sol orchestrates image generation against a deterministic render contract compiled from the scene graph, so the model illustrates only facts the writer actually wrote.

I built the core in the Codex app, steered long test runs from Codex Mobile while commuting, used Sol's ultra mode with subagents to adversarially review every major design idea before implementation, and let tests run overnight. Codex also ran a renderer bake-off during design: a raster image-model path, a constrained SVG vector-plan path, and the direct Images API path, benchmarked head-to-head on latency and quality. The data picked the shipped default; the losing paths remain as selectable, tested modes.

Subagents also did product design work: I had them walk through the app as a nine-year-old, a reluctant writer, a classroom teacher — and used what broke to rewrite the interaction contracts before building them. Sol handled this kind of open-ended decomposition without needing a carefully engineered /goal prompt; I could describe the scenario in plain language and it figured out the structure. Even the demo video was built through Codex — screen recording, editing, and it walked me through getting voiceover added on my Mac.

Challenges we ran into

Latency vs. authority. Short attention spans demand speed, but the core promise demands validated, evidence-bound output. The answer: revision-aware job supersession (a newer revision kills the older subprocess; superseded results never publish), a semantic visual-hash cache that survives restarts, and saved scene graphs so Retry resumes at image generation instead of repeating extraction. The image model still takes ~60 seconds at the lowest setting. That's too long for anyone, especially a kid. I'm working on ways to make the wait itself feel like part of the experience — progressive pencil-to-ink reveals, animation of the scene graph assembling, maybe a "watch your words become a picture" moment — so the latency becomes anticipation instead of dead time.

Keeping generated text away from the writer. Every coaching sentence a child reads is fixed, reviewed application copy. Getting real diagnostic power out of GPT-5.6 while restricting its output to structured codes took careful schema and contract design.

Accomplishments that we're proud of

A rendering pipeline where every visual fact is traceable to the exact words the writer wrote — provisionality is visible, honest pencil.

A coaching loop that provably never authors a single word of the story.

70 passing tests across 15 files, plus a deterministic fake provider so the whole product can be developed and judged with zero model spend.

What we learned

Constraint is the product. The interesting move isn't letting the model imagine; it's binding the model to what the writer imagined. Schema-constrained output and deterministic hydration turn "AI draws for you" into "AI holds you to your own words."

Benchmarks beat instincts. The renderer we assumed would win lost on the data. Head-to-head numbers made the decision obvious.

Agentic tooling changes how you build. Steering overnight test runs from a phone, having subagents walk through the app as different users, and reviewing designs before writing code compressed days of iteration into hours. Sol in particular surprised me — it decomposed complex product-design questions without needing a carefully structured /goal prompt, which meant I spent less time prompt-engineering the tool and more time thinking about the product.

What's next for Maliang

Ship the speech bridge ("Something's wrong? Say it!") for pre-writers.

Classroom pilot with teacher-facing craft-card progress views.

Close the ≤5-second render gate with a persistent app-server Codex session.

Port to iOS and iPad. I built the web/Electron version first because it's faster to iterate and test with Codex, but I've shipped Codex-built iOS projects before and the tablet form factor is where kids actually write.

The same evidence-bound write-see-revise loop works for anyone learning to express an idea — not just kids.

Built With

  • codex
Share this project:

Updates