A Test-Enforced Claude Code Production Pipeline: Decision Logs, Specialist Reviewers, Blind-Solve Gates, and Commit-Locked Deploy Checks
Workflow value: 82/100
Level: advanced · Categories: Quality Control, Token Saving, Context & Memory, Debugging, Shipping, CLAUDE.md, Skills, Subagents, Multi-Agent
Original source: r/ClaudeCode
What problem this solves
Maintaining quality, consistency, and human control while using Claude Code and multiple agents to produce a large volume of code and educational content across many sessions and deployments.
Summary
A sophisticated Claude Code operating model for reliably producing and shipping a large project: keep durable decisions outside chat context, place minimal navigation in CLAUDE.md, turn non-negotiable rules into tests, define repeatable skills for every recurring process, assign narrowly scoped model-pinned subagents, impose bounded evidence-based review rounds, and make human approval plus commit-locked deployment checks mandatory.
Why it is useful
It presents a concrete, reusable pattern for turning Claude Code from an ad-hoc coding assistant into a controlled production workflow: persist decisions, encode rules as tests, use narrowly scoped read-only reviewers, limit review rounds, replace subjective checks with measurable gates, record findings, and block deployment without evidence that checks ran on the exact commit.
Workflow
- Create a numbered decision log that records the owner’s intent, the decision, and alternatives considered; have each new Claude session read only the relevant entries.
- Keep CLAUDE.md concise and use it to point to durable style or process guides rather than embedding large rule sets in prompt context.
- Convert important style, terminology, policy, and product constraints into deterministic tests so violations fail CI rather than relying on agents to remember prose guidance.
- Write a skill for each repeated workflow. Each skill should define inputs, ordered steps, responsible reviewer or agent, required artifacts, and an explicit definition of done.
- Create specialist subagents with narrow responsibilities and read-only access where possible. Pin each role to an intended model tier and maintain a permissions allowlist for safe commands and constrained edit paths.
- For new work, begin with owner-defined goals and source-backed briefs. Run a set/plan review, then require human approval before implementation begins.
- Generate a complete work package, including the user-facing content or feature, executable rules/configuration, reference implementation, hints, explanation, and package-level tests.
- Run deterministic checks before subjective reviews. Then perform one architecture review, blind-solve or behavioral checks, difficulty/quality scoring, and copy review.
- Prevent endless reviewer loops by using a fixed round budget. Require evidence for a must-fix finding: a failing test, quoted user-facing cue, sourced factual error, or demonstrably valid alternate answer.
- Replace subjective quality judgments with measurable gates where feasible. For example, use blind solvers with different context levels to test whether success depends on the intended concept rather than guessing or wording tricks.
- Treat reviewer suggestions as facts to restate, not text to paste. Require the drafting agent to write final prose itself, read it aloud, and revert a review round when the result is less readable.
- Place all completed work in a human review queue. The owner should exercise/play/test it and explicitly approve, send it back with notes, or discard it before publication or deployment.
Tools / artifacts
- A numbered decision-log file containing decisions, quoted owner intent, and considered options.
- A deliberately small CLAUDE.md that links to style guides, with enforceable style requirements encoded in tests.
- Nine repeatable slash skills, including drafting, pre-deploy checks, persona runs, reviewer checks, scouting, incidents, site features, release notes, and note refreshes.
- Seven model-pinned, read-only specialist subagents for architecture, set planning, difficulty, copy, site review, curriculum scouting, and blind solving.
- A deterministic package checker and package tests for each problem.
- A local human review queue for playtesting, approval, return-with-notes, or discard decisions.
- A pre-deploy script that builds production output, captures page text for guest and signed-in states, creates an inventory, assigns review lanes, and stamps the checked commit.
- A findings ledger whose rows resolve as fixed-with-test, accepted, kept-out-with-reason, did-not-reproduce, or planned.
Validation signals
- The project reportedly contains 105 problems, six tutorials, about 98,000 lines of TypeScript/Svelte, 320 test files, and roughly 590 commits, suggesting sustained use rather than a one-off experiment.
- The draft pipeline includes deterministic checks, architecture review, blind solving, difficulty scoring, copy review, and a final human play/approval gate.
- The author reports replacing unstable review judgments with three repeatable blind-solver measurements, at lower cost than an Opus review.
- The deploy process refuses to run unless the pre-deploy check is stamped on the exact clean commit.
- The findings ledger is itself tested: purportedly fixed findings must link to an existing test, and planned findings cannot remain open after the associated work is completed.
- The author reports observed reviewer failure modes—quota behavior, review-loop drift, and degraded prose after repeated rewriting—and describes specific mitigations.
Cautions
- The permissions allowlist and read-only reviewer agents are positive boundary controls; preserve these restrictions rather than broadly granting shell or write access.
- The post describes use of an OpenRouter key in the browser. Implementers should ensure keys are never committed, logged, exposed through server responses, or granted unnecessary scopes.
- Automated reviewer findings remain advisory: retain the human approval queue and do not allow agents to deploy or publish unreviewed work.
Limitations
- The post describes the system but does not provide the actual skill definitions, agent prompts, scripts, test patterns, or repository configuration needed to reproduce it directly.
- Most validation is self-reported and anecdotal; the Reddit item has minimal community validation so far (score 1, one comment).
- The approach is tailored to content/problem production for one large project and may be operationally heavy for smaller repositories or solo users without a large test suite.
- The supplied text is truncated at the end, so any model-versioning practices and final conclusions are incomplete.
Vote on this post to rate the workflow. Share what worked or failed in the comments.