Stet
v0.10.0Guardrails for AI coding agents: scope guard and locked behaviours for Claude Code, Cursor, Codex
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
stet_context
Get the live state of this repository: working agreement (charter, scope, locked behaviours, decisions), recent commits, uncommitted changes and the file tree. Call this at the start of every task and whenever you are unsure what exists. Optionally include file contents.
| Parameter | Type | Description |
|---|---|---|
changed | boolean | Include contents of files changed since the scope was set |
diff | boolean | Include the diff since the scope was set |
files | array | Paths or globs whose contents to include, e.g. ["src/auth/**"] |
stet_guard
Check that every file changed so far is inside the agreed task scope and outside protected paths. Run after making changes and before reporting a task as done.
stet_check
Run the locked behaviours (the commands that prove existing features still work). Run before reporting a task as done. If one fails, fix your change; never edit the test or weaken the check. Snapshot locks compare output with an approved copy: never edit .stet/snapshots/ or approve a new snapshot yourself; tell the human.
| Parameter | Type | Description |
|---|---|---|
only | array | Lock IDs to run, e.g. ["L2"]. Default: all. |
stet_scope
Read the current task scope: the task and the file globs you may change. Only the human can change the scope.
stet_pr
Write the commit message and pull request description for the current task. This is the only allowed PR format in this repo: use the returned PR description verbatim as the PR body and do not write your own or edit its sections (Changes, Scope, Locked behaviours and Decisions are facts from git and Stet). Pass `what` with 1–2 sentences on what changes for the user and why; that is the only part you write. Compares with the up-to-date remote base branch by default. Use runCheck to run the locked behaviours first.
| Parameter | Type | Description |
|---|---|---|
base | string | Branch or commit to compare against, e.g. "main". Default: the up-to-date remote base branch, else where the scope was set. |
runCheck | boolean | Run stet check first |
what | string | 1–2 sentences: what changes for the user, and why |
stet_pr_lint
Check a pull request description against this repo's PR format before you open or update a PR. Fix every problem it reports; usually by regenerating with stet_pr.
| Parameter | Type | Description |
|---|---|---|
body * | string | The full PR description |
stet_report
Before you say a task is done, get the same report reviewers see on the pull request: scope, locked behaviours compared with the base branch, and AI red flags (tests deleted, assertions removed, tests skipped, type or lint checks switched off). Fix every problem and explain every red flag in your summary.
| Parameter | Type | Description |
|---|---|---|
base | string | Branch or commit to compare against. Default: the up-to-date remote base branch. |
stet_study
Map how a part of the codebase works: key files, entry points (routes), import flow (mermaid), tests and what protects it. Writes docs/flows/<topic>.md and returns it. Use before changing unfamiliar code.
| Parameter | Type | Description |
|---|---|---|
topic * | string | e.g. "reconciliation", "checkout", "xero sync" |
stet_decide
Record an architectural or product decision in the decision log so future sessions and teammates do not reopen it.
| Parameter | Type | Description |
|---|---|---|
decision * | string | |
why | string |