Skip to content

v3.3 — New craft files, real pipeline, personalization

Choose a tag to compare

@donaldbrinkman donaldbrinkman released this 31 Aug 19:38
· 2 commits to main since this release

Craft files v3.3

This is everything from 3.0 through 3.3 arriving at once, because the repository had been sitting at 2.0 while I messed around with various features. So, yeah, this is a big update. Eleven files have become sixty-four.

If you were here before, the craft files you know still work the same way. They moved into pipeline/. What's new is a layer underneath them, a set of tools beside them, and four disciplines that changed how the pipeline behaves toward you.

What this is

A library that turns writing craft into instructions an AI assistant can actually follow, and a pipeline that applies them in order. Eight stages, each backed by a file distilled from a source worth reading on its own.

This isn't meant for machine-generated writing. It's meant for machine-supported writing. The pipeline can rewrite plenty as it works, but the design assumes a writer in the loop, and most of what's new in v3 is enforcement.

Drop pipeline/ into a project, hand an assistant a draft, say "run the pipeline on this draft" and watch the magic happen.

The new disciplines

The ultimate goal of this library is to help you become a better writer by learning from some of the world's best writers. To that end, I have begun making the pipeline more interactive.

Stage one stops. After finding the single claim your piece is built to prove (known as the armature), the pipeline states that claim and hands it back, asking you to approve, refine, or replace it. That halt is unconditional. It fires when the armature looks settled as much as when it looks contested, because it's meaningful for you to know what the inherent point of your writing is, and confirm it's the right one before proceeding further.

Pushback. The pipeline is now obligated to tell you when there's nothing worth it doing yet. Six triggers require it: when the material is missing and only you have it, when the human pass never happened, when there's no armature or you haven't ruled on one, when the close needs a verdict the pipeline can't supply, when the trajectory is drifting toward the safe middle, and when a budget override has become a reflex. There's an anti-nag clause to stop it becoming a tic. The reasoning is capability honesty rather than user discipline. An assistant that pretends it can fix what it can't produces slop with a straight face. It is also here to encourage you to take part in the writing process.

The calibration protocol. Out of the box this library has generic values for the pipeline's actions: how strongly they apply, where the floors and ceilings sit, and so on. But these can change. Point the protocol at your own pre-pipeline writing, quality public-domain prose, and raw machine output, and your writing style can alter the existing budgets and even create new rules for the pipeline to follow. This is intended to slowly morph the results from simply "reads as human" into "reads as you".

Versioning against drift. The craft files are durable; Orwell's rules aren't ever going to change. The scrubbing material below, on the other hand, is perishable, because vendors change model habits, sometimes in response to the very notoriety the scrubbing material records. So perishable files carry version blocks with a review-by date. An expired block doesn't mean the file is wrong. It means the file no longer knows whether it's right. I hope to keep updating this as the state of the art evolves.

The machine-artifact layer

Version 2.0 asked whether prose was good. Version 3 adds a second question: does it carry the residue of machine generation?

hallmarks-and-the-scrub.md is a tiered catalog of the tells like em dash density, the marked lexicon, negation-antithesis, rule-of-three saturation, the sentence that grades its own homework. scrub-gate.py counts them mechanically. It runs last, because it's the only pass dumb enough to be safe there: it counts and matches, it doesn't interpret, so it can't undo the judgment work above it.

The machine-tell scrub is built on corpus work rather than folk wisdom: Wikipedia's WikiProject AI Cleanup, Kobak et al. on excess vocabulary across fifteen million abstracts, Liang et al. on detector bias against non-native writers, and Herbold et al. on how machine and human essays actually differ.

That last one produced the most useful finding here. Everyone believes machines hedge more than humans. The corpus evidence says the opposite: machine text carries fewer hedges and epistemic markers.

The file also says plainly what it's for. It scrubs; it does not accuse. Its precision is miserable for detection. This wasn't designed to detect AI text. There are other tools that claim to do that. I don't believe them but, whatever, not my monkeys, yadda yadda. This file is just there to detect and soften the overt and covert aspects of writing that "smell like AI" to many readers.

The obvious objection is that a tool like this is a humanizer, a way to launder machine text past detectors. That's not the point of this tool. The gate counts and matches; it doesn't write, so it has no prose of its own to hide behind. And it runs last, downstream of a pipeline that keeps halting to hand decisions back to you and works best when the first draft is yours. What the scrub actually sweeps is the pipeline's own residue: the stages above it can rewrite non-trivially, so the gate nudges the result back toward a human register and catches the obvious machine artifacts the human editor missed.

Registers

register-profiles.md replaced the single calibration overlay with six profiles. Same base library, different numbers. They let you tune the pipeline to how the text will be used:

Default (analytical long-form) is the foundation, and the other five are deltas from it. It's the maximal case: every stage runs, every file loads, and the attention layer stays live throughout. It's built for argumentative long-form — essays, criticism, technical and cultural analysis — and it assumes an audience of intelligent generalists who can be trusted to assemble the point themselves. The voice it aims at is dense and committed and allergic to the safe middle: claims with edges, wit permitted, whimsy to keep it entertaining. If you don't pick a register, this is what you get.

Creative long-form is the closest delta: the same spine leaning into its figures, with more room for the intensification stage and for scene, image, and interiority.

Job-search bans em dashes outright and raises the specificity floor, because numbers are the genre's currency. It favors terse, informative content suitable for resumes and cover letters.

Satire inverts the budgets to produce period-accurate slop on purpose. Want to make your handwritten essay sound like it was written by a bot? Here you go!

Fairy-tale turns the rule-of-three ceiling into a floor, because three brothers across three episodes is exactly the sort of thing that fairy tales thrive on. It also introduces three new craft files specific to the genre: Max Lüthi's The European Folktale, Vladimir Propp's Morphology of the Folktale, and J.R.R. Tolkien's "On Fairy-Stories". They ship as a set because they describe one form at three layers: the surface it's told on, the order of events beneath, and the contract with the reader both exist to serve.

LLM-script is my favorite of the new files. This is designed to use the library to optimize LLM prompts, and it fascinates me because it's basically a compiler for prompts. It assumes that good writing can convey ideas more effectively to LLMs than bad writing. It attempts to compress prompt files down as much as possible while preserving the intent.

I ran this on the files in the pipeline itself — you can find the results in compiled/ — and it compressed them by an average of 20%, from 37,853 words down to 30,115. One file, goldberg-first-thoughts.md, came down 39%, from 1,576 words to 954. At the floor, register-profiles.md lost only 3%, because it's six budget tables and the fold's own rules say every number survives exactly. I tested an earlier version of this semi-rigorously against the uncompiled files and found the compiled versions performed at par or occasionally better. This is practical as well, because the smaller your prompts are (particularly ones that live in project libraries and get read by LLMs repeatedly), the fewer tokens you consume.

The flags

Six of them, all off by default. Flags set defaults, conversations override them, and overrides are stated rather than silent: a setting an agent flips without telling you is a decision taken from you.

--verbose stops at every stage boundary to say what it did and where the run stands. Turn it on when you want to watch the pipeline work.

--evidence makes the gate write a per-match audit file: every location, quoted in context, plus the candidates its filters rejected. Turn it on when you want to argue with flags.

--calibrate is measurement mode. Bare rates as TSV, no verdicts, for running across a corpus.

--grid is the master switch for accretion writes. Off means nothing accretes.

--fired-view emits the single grid frame for an artifact after a gated run.

--provenance-file appends the run's records to the reel, the append-only history file.

Experimental: the accretion layer

The provisional budgets are just guesses and represent their own "safe middle". Your preferences might differ, and in ways you don't realize. That is the problem this feature exists to solve.

After you edit a draft the pipeline produced, a conversation reads the difference between what the machine did and what you did about it, and asks what each change meant. A rule you keep striking hardens. A rule you override softens. Edits answering to no named rule collect in an undefined region, and a cluster that keeps recurring there is how a rule you've never articulated becomes visible.

It's off by default. Turning it on takes three steps. Seed a desk from canon:

python3 ship-check.py seed --desk my-desk --out grid.json

Run the pipeline on a draft as usual and edit the result yourself. Then run the accretion conversation on that pass, which produces a ratified template of what your edits meant, and feed the template to the generator:

python3 -m craftgen.cli generate --grid grid.json --template t.json --out grid.json

There is an experimental feature to visualize your desk's live rule state, but it does not work yet. The grid is a file, the file works, and it accretes correctly. What was never built is the code that turns it into something you can glance at. The visual specification is frozen and three reference renderings exist as hand-cut artifacts, but a real pass returns JSON. That's the one part of this library that promises more than it delivers, and it's marked in the README, in the specification, and here. I hope to get this working in V4, perhaps as an interactive web page so you can play with sliders and see how the writing changes.

Also included

compiled/ holds folded versions of all seventeen pipeline files, compressed for a model audience to about eighty percent of the original word count. It should save you some tokens and is a working example of what the LLM-script profile can do.

They are not certified. An earlier fold was measured against the project's behavioral evaluation kit and passed six of six cells. These weren't measured. The fold's claim is that it behaves like its source, that's a measured property, and nobody measured these. The source files are master; where a fold and its source disagree, the source wins.

The compiled versions also lose a lot of information about why these rules apply. If you're interested in the thinking behind this library, read the uncompiled versions or, better yet, buy the books they're actually based on and read those.


CC BY 4.0. No warranty. CHANGELOG.md has the full entry.