Claude Code Pipeline Patterns12 paste-ready patterns that turn Claude Code sessions into verified artifacts.
Stop shipping subagent output you can't verify. Wire your first gated pipeline this afternoon.
The same pipeline shipped 2 complete digital products in 1 day — 12 gate PASS lines logged, every line quoted verbatim in the book.
An agent run ends. Something new sits in your files. It reads fine. Whether it's right, you don't know — because a long Claude Code session grades itself on vibes, and plausible garbage survives a skim better than anything else it produces.
Gates beat vibes. A gate is a deterministic check between stages: a script wherever a script can exist, an exit code instead of an opinion, one dated evidence line a stranger could re-run. Wire gates between your stages and agent runs stop being vibes. They become verified artifacts.
Proof, not promises
The runnable gate script that ships in this pack proves itself before you paste it:
$ python3 gate-scripts-starter-v1.py --selftest
[case 1] PASS ledger accepts the clean ledger (exit 0 as expected)
[case 2] PASS ledger rejects the bad ledger (exit 1 as expected)
[case 3] PASS manifest passes when every claim holds (exit 0 as expected)
[case 4] PASS manifest fails on broken claims (exit 1 as expected)
[case 5] PASS textcheck passes short sentences, fence exempt (exit 0 as expected)
[case 6] PASS textcheck flags the long sentence (exit 1 as expected)
SELFTEST: 6/6 case(s) behaved as expected
Six cases. Three commands. Both the pass and fail branch of each. A gate that can only pass isn't a gate.
From the maintainer of Kesslernity prompt repos — 921 stars, 104 forks combined.
The demonstration
Section 2 does what most agent material skips: the same small task run twice, ungated and gated, with the mechanical gate report reproduced on the page. Honest result included — the ungated run came back 6/6 contract-compliant, and the book says so plainly. The gated run's 6/6 was knowledge. The ungated 6/6 was luck you'd only discover by auditing. That difference is what you're buying.
What's inside
📘 The book — 28-page PDF + EPUB. 11 sections, 62-entry outline, glossary. The two-run demonstration, the anatomy of a gated pipeline, all 12 patterns with receipts.
🃏 12 pattern cards — All patterns in one markdown file. Each carries: name, when to use it, orchestrator prompt, subagent prompts, gate check, fail-back rule. 26/26 prompt fences verified byte-identical to the book.
⚙️ Orchestrator starter — Drop-in system prompt for CLAUDE.md. Stage-order enforcement and one-stage fail-back pre-wired. Includes the gate-log grammar, parsing regex, HUMAN-decision line grammar, and the one-git-commit-per-gate-event hardening rule.
📋 Pipeline design worksheet — Six questions that turn any task into stages and gates. Factory's own answers in a completed example column beside your blank one.
✅ Gate-design checklist — Seven checkbox groups that audit any existing gate in five minutes. Real factory thresholds quoted.
🐍 Runnable gate scripts — One python3 file, standard library only. Three subcommands (ledger, manifest, textcheck) plus the --selftest you saw above.
📄 One-page cheat sheet (PDF) — Five nouns, both grammars, fail-back and stop-the-line triggers, 12 patterns at a glance. Print it and stop re-opening the book mid-run.
🗂️ Clone-ready extras — examples/ folder with a real shipped product's gate log, a fan-out worker contract, and a live manifest the pack checks itself with. hooks/ folder with a working Claude Code gate hook. Troubleshooting guide + changelog.
The 12 patterns
Foundation: Stage-Gate Orchestrator · Gate-Log Ledger · Fresh-Context Handoff
Fan-out: Contract-First Fan-Out · Consistency Gate-Keeper · Background Watchdog
Verification: Adversarial Verifier · Judge Panel · Self-Verifying Generator
Recovery: Fail-Back One Stage · Loop-Until-Dry · Stop-the-Line
Every prompt in a fenced block you paste unchanged. No pattern ships without a gate.
Who it's for
Senior engineers and technical founders running Claude Code past the single-prompt stage. You've hit the "agent said done, wasn't done" wall. You want structure, not more prompt-of-the-day content.
Who it's NOT for
New to agents: nothing here explains what a subagent or a prompt is.
Framework hunters: no LangGraph, CrewAI, or AutoGen chapters. One line on portability, then back to work.
CI/CD readers: these patterns gate agent runs, not software delivery pipelines.
MCP builders: the book leans on five Claude Code basics and stays there on purpose.
FAQ
How long until my first gated pipeline?One afternoon. Section 10 is the plan: 20 minutes on the worksheet, paste the orchestrator starter into CLAUDE.md, wire one gate against the checklist, run cards 1 and 2 on a task with a countable artifact. Fan-out comes later, once the single-stage log holds for two consecutive runs.
Is this just AI-generated fluff?
It's AI-drafted, inside the exact gated pipeline the book teaches — that's the honest answer. Every file passed a deterministic slop scanner. A consistency gate-keeper hunted cross-file drift before anything merged. The 26 prompt fences are verified byte-identical to the book. A build checker validated the PDF, the outline, every deliverable at exit 0. A human reviewed the result. Every gate is logged in the product's own STATUS file. The product is its own case study. If the pipeline hadn't held, you'd be reading the evidence instead of this page.
Licensing ?Personal and internal-business use for you and your team. No redistribution. Full terms at kesslernity.com/license, plain-words LICENSE.md ships in the zip.