Coast Standards

Free to use · source-available

Coast Standards: rules and checks for code written by AI agents

Coast Standards is a set of engineering rules and the git hooks that enforce them. Install it in a project and every commit and push is checked. It covers iOS, macOS, Android, React Native, TypeScript web apps and Python services.

$ git push origin main✓ build 0 warnings✓ tests 212 passed in 41s✗ rules-scan src/app/page.tsx:41 hard-coded colour "#f06d35": use a token✗ jscpd 2 new duplicated blocks (baseline 14)push refused. 2 findings, 0 excused. Fix them or ask the owner to excuse the check.

The agent problem

An agent forgets a rule when the conversation ends. A git hook refuses the push every time.

Told not to hard-code a value, an agent does it again in the next session, and writes the same function twice because it never saw the first one.

Coast Standards writes the rules down once, in the project, and adds git hooks that check every commit. A commit that breaks a rule is refused with the file and line. The agent reads the refusal and fixes it, without you.

Six of the rules, and what enforces each one

Machine rules are checked by a script on every commit. Reviewer rules are checked in code review, which has to answer each one.

  • MachineDo not repeat yourselfA duplicate-code scan runs on every push, and the count of duplicates may only go down.
  • MachineNo hard-coded valuesColours, sizes, strings and spacing come from tokens and strings files. The scanner refuses a literal.
  • MachineWarnings are errorsThe build fails on a warning, so none pile up.
  • MachineNo skipping the checksNo --no-verify, no force push, no editing the checks themselves. The session hooks refuse the command.
  • ReviewerTests before codeA change comes with the test that proves it.
  • ReviewerSecurity by the OWASP listInputs validated at the edge, secrets never in the repo, nothing logged that identifies a person.

A project that already had problems gets a baseline. The count may only fall, and each one has a deadline.

  1. 1. Run the installer

    macOS or Linux, git and Python 3.10 or newer. The quickstart fetches the newest release and runs it on your project.

  2. 2. It writes the checks in

    Git hooks, the rules scanner, the linter config for your platform, and a baseline of what the project already had.

  3. 3. Point your agent at the rules

    The project's CLAUDE.md names the rules file to read on every task. From then on, the checks catch the rules the agent forgets.

Abbey Jackson

You're supposed to use your engineering brain. Do not repeat yourself. Create an abstracted layer and then only interact with your abstracted layer.

Abbey Jackson, about me

Link to github.com

Coast Standards

Rules and git hooks · source-available licence

Needs git and Python 3.10 or newer.

Get the rules and join my list

I add you to my email list. I write when I release a new free tool, when I need beta testers, and when I have something for sale. Every email has an unsubscribe link.

Get the rules without joining

You give me no name and no email, and I can't see who you are. GitHub opens in a new tab. You can join the list later from the footer of any page.

Open the Rules on GitHub →

Install

You need macOS or Linux, git and Python 3.10 or newer. The quickstart downloads the latest release and installs it in your project.

The licence

Coast Standards is source-available, not open source. You can use it, including at work, and share copies you haven't changed. You can't sell it, share a changed copy as Coast Standards, or build a product that is mostly Coast Standards. The full licence is LICENSE.md in the repository.