← Methodology
Guardrailsv0.1

Hard rules

Write the non-negotiables down before the features.

Last updated2026-07-02
Last reviewed2026-07-11

The pattern

Before feature work starts, write down the short list of things that must never happen in this product, number them, and give each one a sentence of rationale. These are the hard rules. Everything else in this methodology points back at them.

Why before features

Non-negotiables written under deadline pressure are negotiable. The only time you can honestly decide what you will never trade away is before there is something tempting to trade it for. A rule written the week you need to break it is not a rule.

Hard rules are also load-bearing for every downstream artifact. Written first, the rules shape the system. Written later, they become a compliance layer bolted onto a system that already violates them somewhere.

Worked example

The hard rules of the fictional rulebook-navigator product used throughout this repo, whose moat is a hand-curated knowledge base.

HR-1The product never asserts what a rule requires.

It shows official text verbatim, with a citation. Explanation copy may define terms, never restate obligations.

Rationale: Paraphrased requirements are where liability lives. Verbatim-plus-citation is defensible and mechanically checkable. (Origin: D-002 in the decision log.)

HR-2No real user-submitted text is ever stored, ingested, or used in fixtures.

All test data is synthetic. All knowledge base content comes from approved source types via their profiles.

Rationale: The product must be able to say “we do not hold that” and mean it. One real query pasted into a fixture makes that sentence false forever.

HR-3Every knowledge base entry carries provenance and a confidence level.

No source, no merge. No exceptions for “obvious” entries.

Rationale: The knowledge base is the IP. Its value is exactly the trustworthiness of its provenance. An entry without a source is a rumor stored in the moat.

HR-4When a guardrail check conflicts with a deadline, the guardrail wins.

Checks are never disabled, skipped, or weakened to get a merge through. If a check is genuinely wrong, fixing it is its own reviewed PR.

Rationale: The first “temporary” bypass converts every check from a rule into a suggestion. This rule protects all the others.

ci-spec.mdCLAUDE.md
Hard Rules Worksheet

Write your non-negotiables before you write features.

Work through the Hard Rules Worksheet, a guided version of the hard-rules exercise. Fifteen minutes, and you leave with your own card.

Start the worksheet