Four hats. Four gates.

4hat is a quality framework for shipping software. Every change passes four gates, and each gate has one reviewer wearing one hat, one question to answer and one clear exit.

All four gates passed. Clear to ship.

Tap a hat to fail its gate and see what happens to the release.

What each hat checks

Build gate

The hard hat asks: is it built properly?

  • Lint and type checks pass
  • Unit tests pass
  • A second person reviewed the code

Exit: green build and one approving review.

Test gate

The detective's cap asks: does it work the way people use it?

  • Integration and end-to-end tests pass
  • Regression suite is clean
  • Test coverage did not drop

Exit: no open critical bugs.

Security gate

The black hat asks: how could this be abused?

  • Dependencies audited for known flaws
  • No secrets or keys in the code
  • Static analysis and permissions reviewed

Exit: no high-severity findings.

Release gate

The captain's cap asks: is it safe to put in front of users?

  • Canary rollout is healthy
  • Performance stays within budget
  • Alerts are live and rollback is tested

Exit: rollback works and the dashboard is watched.

How the gates work

In order, fail fast

Cheap checks run first. A broken build never reaches the security scan.

The same bar for everyone

Hotfixes and big launches pass the same four gates. Only the size of the checks changes.

Automate, then add judgment

Machines run what can be scripted. People wear the hat for what needs a decision.

One owner per gate

Every gate has a named person who can say stop, and nobody can skip it silently.