Skip to content
Maxwell CollinsContact

Plugins that hold AI coding agents to a senior engineer's habits

Plugins for the Claude Code AI coding tool that hold its agents to a careful senior engineer's habits.

What it achieved

AI coding agents under these plugins cannot write before approval, cut the job short, or claim unproven success.

The short version

AI coding agents under these plugins cannot write before approval, cut the job short, or claim unproven success. They are a family of plugins for Claude Code that hold the agent to a careful senior engineer's habits. It reads first, proposes, waits for approval, stays in scope, finishes the job and proves it. Their built-in checks refuse code writes, scope-shrinking answers, wording that puts work off, and self-approval until a human approves. One plugin (guardrails-plugin) turns eleven plain-English questions into a project's whole set of rules and safeguards. Another (deliberate) puts every write behind a contract the operator confirms. A third (goalpost) keeps the goal in front of the agent and blocks any "done" without evidence.

The problem

AI coding agents fail the same way whoever runs them. They start writing before they understand the project, quietly shrink the job, stop at a "good stopping point" halfway through, announce success they haven't proved, and edit their own instructions when the instructions get in the way. An operator who judges work by the evidence the machine produces, not by reading every line, needs that evidence enforced in the moment. Asking the agent to behave isn't enough, because the agent is the one misbehaving.

In use

  1. A project owner answers eleven questions about the business, and guardrails-plugin writes the architecture, rules and enforcement: 13 files and up to 21 blocking rules.
  2. When the agent starts work, deliberate makes it read the project and propose a contract. Nothing is written until the operator confirms it.
  3. The agent can touch only the files the contract names, and anything irreversible waits for the operator to type it out.
  4. When the agent tries to stop, goalpost refuses until evidence of done is recorded, and the agent can't rewrite the rules that hold it.

What it achieved

  • A project owner answers eleven plain-English questions and gets the safeguards a senior architect would set up by hand: 13 files, among them a constitution, 17 testing rules and up to 21 blocking rules, and for a new project a ready-to-build code base on one of three stacks.
  • An agent that cannot act unasked: every write waits for a plan the operator has confirmed, the agent stays inside the files that plan names, and anything irreversible waits until the operator types it out word for word.
  • No early stops: 14 phrases that put work off, such as "good stopping point", are refused, and every claim of done is blocked until its evidence is recorded.
  • The agent cannot rewrite the rules that hold it, and the governance documents, database migrations and secrets are protected.
  • guardrails-plugin was built in one day across 12 commits, and it closes his governance manual as its case study.

The full record

On this page
In one sentence

Maxwell built a family of Claude Code governance plugins (guardrails-plugin, deliberate, goalpost and gnothi, beside his separate vision-to-plan pipeline), 18,409 lines across 170 files, whose hooks refuse code writes, scope-shrinking answers, deferral language and model self-approval until a human approves, so that an AI coding agent orients before it acts, works only inside a scope its operator has confirmed, cannot stop early or declare itself done without evidence, and cannot edit the rules it is held to: guardrails-plugin turns an eleven-question plain-English wizard into a project's full governance stack of 13 generated artifacts and up to 21 hookify rules, deliberate gates every write behind an operator-confirmed contract and a computed risk level (19 hook tests), and goalpost keeps a goal in front of the agent and blocks unproven "done" across five hook events (129 test assertions). He builds by directing AI agents, and he built these plugins that way.

lines
18,409
artifacts from 11 questions
13
hookify rules generated
21
test assertions
129
hook tests
19

What it does

Each plugin installs into Claude Code and works through hooks, short programs that run at fixed moments (before a tool is used, when a prompt is sent, when a session starts, when a helper agent starts, when the agent tries to stop) and can refuse the action outright. Together they give an operator who judges work by the evidence the machine produces, rather than by reading every line, a way to hold an AI agent to the behavior of a careful senior engineer: read first, propose, wait for approval, stay in scope, finish the job and prove it. His idea-to-plan pipeline, vision-to-plan, belongs to the same family and has its own page.

guardrails-plugin: a whole governance stack from eleven questions

GuardRails asks a project's owner eleven plain-English questions, one at a time, and generates the governance a senior architect would set up by hand. It is written entirely in Markdown, JSON and shell, installs from its own plugin marketplace, and orchestrates four other plugins (superpowers, hookify, code-review and reflexion).

The eleven questions: what the app does; who uses it and in which roles; the main user flow, step by step; whether money changes hands, and the refund rules; what sensitive data it holds; the one thing that can never go wrong (which becomes principle number one of the constitution); what happens on an unauthorized action (deny by default, or public); which records must never be deleted; the stack (Next.js, NestJS or Express); expected users in year one (mapped to a startup, growth, scale or enterprise tier); and a confirmation summary.

The wizard's phases: locate its templates, check prerequisites and plugins, detect the project's state (already governed, an existing project whose stack it detects, or a new project), ask the questions, generate the files, set up the infrastructure (install packages, start a Postgres database in Docker, run the first migration, initialize git and offer to create the GitHub repository) and report in plain English.

What it generates, 13 artifacts:

  1. The governance folder structure for documents and memory.
  2. An agent instruction file: a 276-line base plus a stack-specific section (71 lines for Next.js, 88 for NestJS, 95 for Express).
  3. A constitution in eight sections: the critical invariant, data integrity, access control, architecture, financial integrity, quality, security and AI principles.
  4. An architecture document for the chosen stack.
  5. A patterns document of six patterns and five anti-patterns.
  6. Testing rules: 17 rules on structure, assertions, isolation, naming and traps.
  7. An enforcement map of what enforces what.
  8. Hookify rules: 18 universal rules (8 that block: empty catch blocks, git hook bypass, hard-coded secrets, lint suppressions, protected files, skipped tests, TODO comments and unsafe types; 10 that warn: weak test patterns, vague test names, a feature without a plan, implementation without a specification or tasks, committing without the gate and naming), plus up to three conditional rules drawn from the answers: blocking deletion of the records named in question eight, blocking unguarded financial mutations when money moves, and warning on missing authorization when there is more than one role.
  9. Hook registration, carried by the plugin itself.
  10. Project settings with permissions and the five plugins enabled.
  11. Git hooks: before a commit, staged-file linting, a type check and a dependency audit; before a push, the full gate.
  12. A project memory file.
  13. For a new project, the full scaffold: package manifest, TypeScript, linting, formatting, Docker Compose, test configuration, environment template, ignore file, deployment configuration and an initial data model, on Next.js 15 with Prisma, Vitest and Vercel, NestJS 11 with TypeORM, Jest and Railway, or Express 5 with Prisma, Jest and Supertest, all in strict TypeScript on Postgres.

Its eight hooks: block to-do items too coarse to verify ("build entire," "implement all," "whole system"); block destructive deletes of source, tests, specifications, governance, CI and database folders; block edits to the governance documents, database migrations and secrets; refuse to create a new source file until a specification exists for it; triage every prompt as a quick tweak, a contained change or a feature for the full pipeline; welcome the agent back at session start and send it to the instruction file, memory and constitution; re-orient it after its context is compacted or cleared; and tell every helper agent to read the instruction file, constitution, patterns and testing rules before it starts.

Its seven skills run an eight-step pipeline (understand, specify, plan, tasks, implement, review, learn, finish): setup (the wizard, which a person must start), specify (a specification with given-when-then criteria), plan (design, plan and codebase context), tasks (failing test, passing code, refactor and gate steps), review (three parallel reviewers for specification compliance, truth-document compliance and completeness), status and help. A failure protocol stops the agent after two or three failed attempts and hands the problem to the person.

deliberate: orient, contract, verify

deliberate makes the agent behave like a careful senior engineer for an operator who judges work by evidence: it orients first, proposes, and waits.

  • At session start it records the session, tells the agent to orient before doing anything, and reports any earlier orientation, any open contract (with the choice to finish it, revise it or abandon it), the git branch, uncommitted changes and the test command.
  • Before every write, edit or shell command a 285-line gate refuses the action unless an orientation exists from this session, a contract exists that is still open and that the operator has confirmed, and the file being touched is inside the contract's declared files. Irreversible commands (recursive deletes, force-pushes, hard resets, history rewrites, package publishing, dropping or truncating tables, deleting cloud storage) need the highest gate level. The only off-switch is a one-time, 60-second file the operator creates, and the agent is told never to create it.
  • When the agent tries to stop a hook reads its last message and refuses to let it stop on 14 deferral phrases such as "wrapping up," "pausing here," "good stopping point" and "ready when you are," more firmly while a contract is open. Only the operator can override it, for 60 seconds.

Three skills carry the work: /orient reads the project's state and writes a six-part orientation (where the project is, what is outstanding, what the agent can verify against, what is next and why, what it is unsure of, and any open contract), then asks the operator what they want. /contract restates the intent, declares four risk facts, sets success criteria each with its evidence fixed in advance, sets the files in scope and out of scope, and shows it all in plain English with a question the operator must answer to prove they read it. /verify runs each evidence check, saves the output and calls the work done only if every criterion passes; an inconclusive result counts as not done.

The risk rubric turns four facts (could it break something that works; does it reach production; how reversible is it; is evidence available) into one of six gate levels, from minimal to maximum. At maximum the operator must type out the irreversible action word for word.

goalpost: the goal stays in front of the agent

goalpost works in four layers across five hook events.

  • The goal is injected into every prompt and into every helper agent at start, so it never drifts out of view, and a checkpoint is written at each stop and read back at every session start, resume, compaction or clear.
  • Five prompt lints warn the operator when a prompt is likely to produce bad work: asking to run tests or a browser without the prerequisite in place, hedging a requirement, giving no current state, paraphrasing an error instead of pasting it, or trailing off mid-sentence. A custom chain runs the operator's own lints after them.
  • A fail-closed completion gate blocks the agent from stopping on a claim of done, complete, verified, all set, ready to ship or "gate passed" (and the celebration emojis) until the goal is marked complete with evidence or the operator grants a fresh override. Narrow factual claims such as "completed reading the file" pass, and the agent may propose completion in a fixed form for the operator to accept.
  • The rules protect themselves: the agent cannot edit any goalpost file unless a goalpost skill is running, because an AI must not edit the rules it follows.

Its skills: set a goal, revise it with a reason and an audit trail, complete it with evidence, show status, grant a one-turn override, add a custom lint, and review, which sends the work to a fresh helper agent to trace the goal and grade it against a rubric (file size, type purity, error handling and security at boundaries, no placeholder code), passing findings back word for word. It also ships cct, a command-line tool that rewrites a prompt through Claude to strip wording that invites agreeable answers, with a fingerprint-keyed cache capped at 500 MB and 30-day expiry, three retries and a safe pass-through.

gnothi: an analyst that does not take testimony as truth

gnothi (from "know thyself") applies the same discipline to a person instead of a codebase: an AI analyst that builds a cited, testable model of its owner, under the rule that testimony is not truth. What the owner says is kept in an append-only record and cross-examined, never copied in as fact. The model is organized into 14 life domains with patterns, contradictions and a timeline; an interrogation layer tracks gaps, open questions and coverage. It runs in two modes, a Socratic questioner that maps the territory and a daily counselor that checks the owner against their own stated values under binding rules against passing judgment, and its unattended runs are fenced to accept edits with every bypass of permissions forbidden.

What it achieved

  • A complete governance stack in one sitting: eleven answers produce 13 artifacts, a constitution, 17 testing rules, up to 21 hookify rules, eight hooks, git hooks and, for a new project, a full scaffold on one of three stacks.
  • An agent that cannot act unasked: deliberate refuses every write until an orientation and an operator-confirmed contract exist, keeps the agent inside the declared files, and makes irreversible actions wait for the operator to type them out.
  • No early stops and no self-approval: deliberate refuses 14 deferral phrases, and goalpost blocks every unproven claim of done until evidence is recorded.
  • Rules the agent cannot rewrite: goalpost protects its own files, and GuardRails protects the governance documents, migrations and secrets.
  • Size: 18,409 lines across 170 files: guardrails-plugin 9,363 lines in 88 files with 7 skills (3,014 lines) and 8 hooks; deliberate 2,290 lines in 16 files with 3 hooks, 3 skills and 19 hook tests; goalpost 4,754 lines with 5 hook events, 5 lints, 8 skills and 129 test assertions; gnothi 2,002 lines in 33 files. guardrails-plugin is the case study that closes his governance manual.

The problem it solves

AI coding agents fail in the same ways whoever runs them: they start writing before they understand the project, quietly shrink the job to what is easy, stop with "good stopping point" when the work is half done, announce success they have not proved, and edit their own instructions when the instructions get in the way. An operator who judges work by the evidence the machine produces, not by reading every line, needs that evidence enforced in the moment. Asking the agent to behave is not enough, because the agent is the one misbehaving.

These plugins move the rules out of the conversation and into hooks the agent cannot argue with. A write is refused until the plan is confirmed, a stop is refused until the work is proved, and a human alone can lift the block. For a project starting from nothing, GuardRails removes the expertise barrier entirely: the owner answers questions about the business, and the plugin writes the architecture, rules and enforcement.

How he built it

Maxwell built each plugin from failures he had recorded in his own AI sessions, turning each recurring failure into a hook that refuses it. GuardRails packages the governance he had set up by hand across his own products, the constitution, truth documents, hookify rules, git hooks and test-first pipeline, into templates the wizard fills from the owner's answers; it was built in one day across 12 commits under its own governance instructions and build specification. deliberate carries forward the controls he ran on a large legacy estate, keeping what worked, with its 19 hook tests run in isolation. goalpost was built with a committed test harness of 10 test files and 129 assertions covering the completion gate, the prompt lints, the checkpoint, overrides, file protection, goal injection, review and the cct tool. Every off-switch in the family is a short-lived file only the operator creates, and every plugin is MIT-licensed and installs from its own marketplace or one install script.