Sentinel
Sentinel

Sentinel

Version 1.5.0

Rigorous, repeatable quality gates for any AI coding agent, any project, any language.

Install View on GitHub

What it does

Sentinel is a set of four prompts that give an AI coding agent a disciplined process for any code or design project. The agent learns what the project is, audits its code and design quality, and maps every place a future change needs to touch. Then it builds automated checks that hold those standards in place.

Setup is the expensive part. The prompts read your actual codebase and history, which costs real time and tokens once. What you get in return is a pre-commit hook that checks only each commit’s diff, plus a periodic full-repo scan for slower drift. Ordinary commits stay cheap.

Three terms come up often. A hook is a script your version control runs automatically at a set moment, such as just before a commit is saved. A gate check is an automated test of one of your project’s rules. Some gate checks block a commit, and others only remind you. A diff is the set of lines a commit adds, changes, or removes.

It is a guided setup. The agent will stop and ask about your preferences (commit style, comment philosophy, whether docs stay local or shared), and your answers become enforced rules. Treat those questions as real decisions.

Requirements

You need an AI coding agent with file-system and shell access, started in your project. Sentinel is confirmed to work with Claude Code and OpenAI Codex. Cursor, Gemini CLI, Windsurf, and GitHub Copilot are likely compatible but untested.

How each prompt adapts to your agent.

Each prompt identifies which agent it is running under and adapts to it. That includes the name of the persistent context file, the permission mechanism, and any automatic commit attribution the tool adds. The context file is AGENTS.md for most tools and CLAUDE.md for Claude Code.

Installation

Three steps get you started:

  1. Copy the Sentinel-Prompts/ folder from the GitHub repo into your project. Using the curl or wget command will do it in one step.
  2. Start your agent from your project’s root.
  3. Tell it to read and run Sentinel-Prompts/sentinel-init.md. It starts the first stage and asks you questions as it goes.

Run one of these commands from your project’s root. Use the wget command if you don’t have curl. Neither needs git.

Curl

mkdir -p Sentinel-Prompts && cd Sentinel-Prompts && for f in 00-project-discovery.md 01-design-quality-audit.md 02-integration-audit.md 03-gate-check-implementation.md sentinel-init.md; do curl -sO "https://raw.githubusercontent.com/timsamoff/Sentinel/main/Sentinel-Prompts/$f"; done && cd ..

Wget

mkdir -p Sentinel-Prompts && cd Sentinel-Prompts && for f in 00-project-discovery.md 01-design-quality-audit.md 02-integration-audit.md 03-gate-check-implementation.md sentinel-init.md; do wget -q "https://raw.githubusercontent.com/timsamoff/Sentinel/main/Sentinel-Prompts/$f"; done && cd ..

You can also clone this repo, copy the folder out, and delete the clone.

Always start your agent from your project’s root, not from inside Sentinel-Prompts/. Everything the prompts produce is written to the project root.

The prompts

sentinel-init.md runs the four stages in order. It is the recommended way to use the suite. It is unnumbered because it is a wrapper.

  1. 00-project-discovery.md detects the project’s stack, surfaces, and conventions, and asks you for what it can’t detect. It produces PROJECT_PROFILE.md, which the later prompts read. On a blank or nearly empty project, it asks you directly instead of inferring.
  2. 01-design-quality-audit.md audits code quality. Where there is a user interface, it also checks design consistency: color and spacing systems, responsive layout, accessibility, and whether the interface looks generic or machine-made. It checks for a design document or offers to create one. It makes small, low-risk cleanups and reports everything else.
  3. 02-integration-audit.md reads the project’s history to find every place a new feature has needed to touch, including places that were missed. It produces INTEGRATION_CHECKLIST.md and proposes gate checks without building them.
  4. 03-gate-check-implementation.md re-validates the proposals from 01 and 02 against the current code, then builds and wires in the checks. It is the only prompt that implements.

Running the suite

Point your agent at Sentinel-Prompts/sentinel-init.md and it will run all four stages. It moves from one stage to the next on its own. Before stage 3, it always stops and asks you to confirm you have reviewed what 01 and 02 proposed. Each stage’s own questions also stop and wait for you.

Running one prompt at a time.

You can also run a single prompt. Paste its contents into a session, or ask the agent to read and run the file. When you want to review between stages, need only one or two prompts, or are re-running part of the suite after an update, run the prompts individually.

The best order is 0, 1, 2, 3, since each stage reads what the previous one produced. Prompts 1 and 2 can run without 0, though you’ll fill in the project details yourself. Prompt 3 requires INTEGRATION_CHECKLIST.md. If it’s missing, prompt 3 tells you to run 2 first.

What to expect

Plan to be present.

Prompts 0 through 2 pause to ask questions, and your answers become permanent parts of the hook that prompt 3 builds. Where a question has fixed answers, the agent will show clickable options if your tool supports them.

Git is the default.

Without version control, prompt 3 builds a manual command instead of a hook. That command checks for a .git directory each time it runs and offers once to switch to a real hook if one appears. A version control system with its own trigger mechanism, such as Perforce, is treated the same as git.

The manual command is also used for any Sentinel output you choose to keep out of version control, since a hook can’t see ignored files. When git is in use but you choose the manual command, commit-message rules are still checked against your most recent commit after the fact.

Existing gate checks are audited.

Prompt 2 reads any existing system for known weaknesses, such as checking the working tree instead of staged files, or failing silently. It then asks whether new checks should follow that system’s style or Sentinel’s.

A design document is offered.

If one exists, the audits check the code against it. If not, you’re asked before one is created. A generated design document reads as ordinary documentation, but it won’t state a rationale as fact without evidence.

Once a design document exists, it gets two checks. One is a per-commit gate for architecturally significant changes. The other is an occasional review, tied to releases, that confirms its content is still true.

Design checks adapt to the project.

A full graphical interface (web, mobile, desktop, or game) gets the complete design audit. A presentational surface without a GUI, such as a CLI’s color scheme, gets the parts that apply. A backend service or library gets only the code-quality section.

New kinds of work don’t need a full re-run.

If you add something with no precedent in the project, name it and ask what covers it. The agent will point you to the right prompt and section.

Commits and comments

Commit autonomy is your choice.

Prompt 3 asks once whether the agent should confirm every commit (the default), commit freely but confirm before pushing, or run fully automatically. Your answer is recorded in AGENTS.md.

Commits read as yours.

Whatever style you pick, commit messages are written in your voice and describe the change. No “at the user’s direction,” no mentions of the agent or the session, and no trailers the agent makes up. A trailer is a line at the end of a commit message in the form Name: value, such as Co-authored-by:.

The hook rejects trailer-shaped lines that aren’t on your allowed list, and a short list of agent-voice phrases. The phrase list is weaker than the trailer check and will miss wordings it doesn’t contain, so the rule also lives in AGENTS.md.

The plain terse commit style means no body, ever.

The hook enforces this as a hard block. If a change is too broad for one honest subject line, split it into several commits.

Single line by default, bullets when needed.

The subject line alone is the norm. A short bullet body is allowed only when a change has three or more separate parts, or a behavior change a later reader needs to know about.

The hook accepts no body or a valid bullet body and blocks prose. It can’t judge whether a body was needed, so the trigger is also recorded in AGENTS.md.

Terse comments have a hard length.

If you pick the terse comment style, comments are limited to one or two sentences. Longer explanations go in AGENTS.md, not in the code.

Sessions and handoffs

The backlog stays visible.

If the agent finishes an unrelated task while TODO.md items remain open, it mentions them briefly before ending its response.

Unfinished work survives the end of a session.

The agent keeps Sentinel-Notes/HANDOFF.md current while it works: what’s in progress, what failed, and the next steps in order. It rewrites the file as each step finishes, so closing the window or a crash loses at most the last step. Telling the agent you’re done before you close still gives the most complete handoff.

The next session reads it before anything else, then the open TODO.md items. If the handoff doesn’t account for uncommitted changes, that session says it may be out of date.

If your setup already uses a handoff file, the agent uses that one instead. It still writes the rules for that file into AGENTS.md, because your personal configuration and the agent’s own memory don’t reach a cloud or remote session.

The agent also records a short close-out that covers the handoff, any log you keep, and any step that needs your approval. It ends the close-out with one line saying what was done and what was skipped. If you sometimes work in remote sessions, it asks once, because those sessions see only what is committed to the repository.

Where your tool can run a command at session start, prompt 3 offers a hook. The hook puts the handoff in front of the agent automatically, so reading it doesn’t depend on the agent remembering to.

Upgrading

Running a newer version of Sentinel on a project it has already touched is treated as an update. Prompt 0 compares the version recorded in PROJECT_PROFILE.md with the current one, flags renamed conventions, and tells prompt 3 to re-validate the existing hook.

A hook built under an older version can carry bugs that later versions fixed in the prompt text. An update isn’t complete until the hook has been re-checked.

Copy the new Sentinel-Prompts/ folder over the old one before starting.

With sentinel-init.md, you don’t need to work out which stages to re-run. It runs prompt 0 and follows its recommendation.

How version numbers work.

Versions are written major.minor.patch, and a recorded two-part version such as 1.1 means 1.1.0. Prompt 0 carries a version history listing what each release changed, where, and how to tell whether a project already has it. The agent applies changes that only add standing notes to AGENTS.md directly, without re-running a full audit.

If you run the prompts individually.

If you run the prompts individually, decide what the update actually changed. If it only affects gate-check implementation, run 0 and then 3. If it adds a new design check, re-run 1. If it adds a new integration gate category, re-run 2 before 3, since 3 can only build what 2 has proposed.

What you end up with

PROJECT_PROFILE.md
The confirmed project context, including your agent’s conventions.
AGENTS.md or CLAUDE.md
The project’s authoritative internal record, kept current by the gate check.
A design document (optional)
A narrative overview, stored at the root by default or wherever the project already keeps docs.
Sentinel-Notes/
Audit findings and a brief TODO.md with one line per item. Items that need more detail link to their own design brief file. It also holds HANDOFF.md while a session’s work is unfinished.
scratch/
A git-ignored folder for throwaway verification scripts.
INTEGRATION_CHECKLIST.md
The touchpoint checklist and gate-check description.
Checks, hooks, and exceptions.
Exceptions
A sentinel-exceptions file for documented, owned, expiring exceptions. If you choose it during setup, you also get a Sentinel-Override: <reason> commit trailer for one-off cases. Only you write it, never the agent. Both are deliberate acknowledgments.
A TODO.md sync check
A hard gate for items linked to a design brief, and a non-blocking reminder for everything else.
The pre-commit hook itself
Stored in a tracked location so it survives a fresh clone, plus a full-repo scan run on a schedule or on push.
A session-start hook (optional)
Where your tool supports one, it shows the agent any open handoff at the start of every session.
A new-file-category check
Flags the first file of a type the project hasn’t used before, such as the first image or the first 3D model. It asks a few questions to route the file to the right audit.

Limitations

About

Sentinel teaches an AI coding agent what “good” means for a specific project, then puts checks in place to keep it that way.

Sentinel builds on the work of two people. Marco van Hylckama Vlieg’s AI-Created UI informed how Sentinel approaches design quality. Sivan Grünberg’s work on AI-assisted development workflows helped shape how Sentinel keeps a project continuous across sessions. The session handoff file comes from his handoff-index pattern.

Developed by Tim Samoff

Support this project

License

MIT. See LICENSE. You may use, modify, and redistribute these prompts freely, including in closed-source or commercial work, as long as the original copyright notice is kept.