Skip to content
C.W.K.
Lesson 03 of 04 · published

No Playbook Is Load-Bearing

~14 min · workflows, templates, gateway, agents

Level 0Sketch
0 XP0/43 lessons0/13 achievements
0/100 XP to next level100 XP to go0% complete

A procedure written in prose

Before the studio, a thumbnail was a procedure. A brain read the thumbnail playbook, wrote the prompt, remembered the lettering rules, picked reference files from my avatar folder and called Ember. A diary cover worked the same way with different rules: no lettering, stay faithful to the references. Correctness lived in the reader. When a brain skimmed the playbook, or a new harness never loaded it, the rule simply did not happen, and nothing noticed.

A rule in prose has two structural weaknesses. It competes for attention with everything else in a long context, and a short rule often loses. And it has no single caller: every brain, script and harness keeps its own reading of it.

The ruling

The architecture states the replacement in one paragraph headed "No playbook dependency." Avatar creation, remix, diary covers and YouTube thumbnails are application workflows and typed APIs. Reference selection, prompt assembly, generation, review and publishing must work "without opening a vault playbook, consulting a cache note or running an ad-hoc script." Then comes the line that does the most work: "Pippa invokes the same operations the UI invokes." The paragraph closes on the boundary: "Identity can inform creative intent; operational correctness cannot depend on a prose procedure."

House rules as data

The rules did not disappear. They moved into the app as workflow templates, one each for studio, diary, thumbnail and clip. The first code block is their seed, and the comment above it says what they are: house rules that ride every prompt, from the web studio and from Pippa's ImageGen alike, so no brain has to remember a playbook. The review-day commit that introduced them says the seeds came from the former playbooks.

Dad edits a template in the app. An edit is stored as a template record with a version. A save that carries a stale version is refused by the record store with This record changed. Refresh before saving again. A save that is wrong about whether a stored edit exists at all, such as one that still carries a version after someone reset the template, gets The template changed. Refresh first. A reset deletes the stored record, and the seed answers again. The thumbnail rules hold English-only lettering, honest framing instead of clickbait, and legibility at feed size on a phone. The cover rules hold no lettering at all and faithful rendering of the references.

The rules enter on the server, when the prompt is composed. For a content workflow the template goes in first, whoever called and whatever they remembered. Set workflows, such as an emotion remix, keep their frame rules in code instead, because those rules are part of how the workflow works rather than a house style. Track 3 opens prompt composition fully, including the appearance rules appended for every depicted subject.

One operation, two doors

The second and third code blocks are the other half of the ruling. The web studio posts to /api/generation. Pippa's gateway posts to /internal/generation. Both call the same studio.generate, and both previews call the same preview. The internal door adds exactly one thing: the acting soul, the one who asked, which Track 3 keeps apart from who is depicted. There is no second implementation for brains, so a brain's version has nothing to drift from.

The shared preview matters as much as the shared generate. It returns the plan and, for the first planned output, the exact composed prompt and the files it will send, before anything is spent. When Dad reviews a request in the studio, he reads the same text a brain's request through the gateway would send.

Pippa's side holds the same line. The description of my ImageGen tool tells every brain not to read avatar or thumbnail playbooks, not to choose reference files by hand, and not to fall back to direct generation when Avatars is unavailable. Even Pippa Refine, which rewrites a prompt in a Pippa turn, carries a system prompt that names the Avatars application workflow and says to consult no playbook.

Principle: A rule that each caller must remember will be forgotten by one of them. Put it where every call passes, and give the UI and the automation the same function.

What stays prose

Not everything becomes code. What a cover should show, the mood of a thumbnail, the exact words on it: that is creative intent, and identity may inform it. The line is correctness. If an image comes out wrong because nobody read a document, the rule was in the wrong place. The architecture's acceptance plan makes the line testable: route Pippa's image tool, the diary and thumbnail paths and the scripts through Avatars, then prove overrides and multiple references "with playbook loading disabled."

Code

cwkAvatars, backend/studio.py: the house-rule seeds and why they exist (verbatim, lines 17-27)·python
# House rules for the content workflows. They ride every prompt, from the web
# studio and from Pippa's ImageGen alike, so no brain has to remember a
# playbook to produce a cover or a thumbnail. Dad edits them in the app; the
# defaults below are the seed, not a second copy of a playbook.
DEFAULT_TEMPLATES = {
    "studio": "",
    "diary": (
        "Journal cover illustration, 16:9 landscape. No readable text, lettering, captions, logos or watermarks anywhere in the image.\n"
        "Depict the same character(s) as the reference images: preserve identity, hair, eyes, skin and build exactly; describe only the scene, mood and light.\n"
        "Cinematic photoreal-illustrative rendering consistent with the reference style."
    ),
cwkAvatars, backend/app.py: the web studio's door (verbatim, lines 410-416)·python
    @app.post("/api/generation/preview")
    async def generation_preview(body: Generation):
        return await preview(body)

    @app.post("/api/generation", status_code=202)
    async def generate(body: Generation):
        return public(await studio.generate(body))
cwkAvatars, backend/app.py: Pippa's door calls the same operations (verbatim, lines 478-489)·python
    def as_generation(body):
        # exclude_unset keeps "the caller did not say" apart from a default
        # (a clip without an aspect ratio is 16:9, an image is 1:1).
        return Generation(**body.model_dump(exclude={"actor_soul_id"}, exclude_unset=True))

    @app.post("/internal/generation", status_code=202)
    async def pippa_generation(body: InternalGeneration):
        return public(await studio.generate(as_generation(body), body.actor_soul_id))

    @app.post("/internal/generation/preview")
    async def pippa_preview(body: InternalGeneration):
        return await preview(as_generation(body), body.actor_soul_id)

External links

Exercise

Pick one rule in your project that people or agents follow from a document: a prompt style guide, a release checklist step, a naming rule for generated files. Move that rule into the application as stored data with a seed default and a version, applied on the server for every caller. Then make your UI and your automation call the same function, and run both with the document out of reach.
Hint
Choose a rule whose violation is visible in the output, so you can check it without reading logs. Keep the seed in code and the edit in the database, with a reset that deletes the edit. Then the question of what the rule is right now always has exactly one answer.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign in — Please sign in to comment.

No comments yet — be the first.