What it does
Guardrails for AI coding agents: scope guard and locked behaviours for Claude Code, Cursor, Codex
- Connects パソコンで動く
- Account or key No key needed
- Category 開発者ツール
一緒に使える
この種の作業を AI に教える Skill。これと一緒に使えます
andrej-karpathy-skills
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
graphify
Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.
この順位の理由
一覧は利用スコア(100 点満点)で並びます。内訳は次のとおり
| 人気 | 25/80 | GitHub スターか週間ダウンロード数。大きい方を 60、小さい方を 20 で数えます |
|---|---|---|
| 新しさ | 12/12 | 30 日以内のリリースかコード更新で満点 |
| 応答中 | 0/8 | 前回の確認でクラウドのエンドポイントが応答 |
| 利用スコア | 37/100 |
品質: 基本チェック 3/3 項目に合格(表示のみ、並び順には不使用) · 勢い: 124 (「急上昇」タブでのみ使用)
インストール
使っているAIアプリを選んで、設定をコピーしてください。
ひとことで AI にインストールしてもらう
Stet をインストールして。https://mcp.popnx.com/i/shamazkhan-stet.md に従い、コマンドを見せて、私が OK するまで実行しないで。パソコンで作業できる AI(Claude Code や Cursor など)に貼り付けます。手順を読み、コマンドを見せて、あなたの OK を待ちます。キー不要・登録不要。 · AI が読む全文を見る
チェック 3/3 合格 · あなたのパソコンで動きます · ✓ コマンド確認済み 2026年11月15日
まず:どの AI を使っていますか?
使っているアプリを選ぶと、下に手順が表示されます。
Claude につなげますが、先に準備が必要です
先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
AI にインストールしてもらう
このメッセージを Claude のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。
このパソコンの Claude に MCP server Stet を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "mcpServers": { "stet": { "command": "npx", "args": [ "-y", "stet-cli", "mcp" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、Stet のツールが本当に表示されるか確認する。このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。
Node.js を入れる(まだなければ)
もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter
node -v- バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
- "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
ターミナルの開き方
Mac:⌘ + Space を押し、Terminal と入力して Enter
Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」
まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です
入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です:
node -v一度入れれば、Node.js を使うすべてのツールで使えます
パソコン版 Claude アプリの設定ファイルを開く
SettingsDeveloperEdit Config
この設定を貼り付けて保存
{ "mcpServers": { "stet": { "command": "npx", "args": [ "-y", "stet-cli", "mcp" ] } } }Claude を終了してもう一度開く
試してみる
Stet を使って、私に何ができるか教えて、1 つやってみせて✓ Claude が Stet を使っていると言うか、回答に Stet のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
ChatGPT はまだ Stet につなげません
Stet はパソコンに入れて使うものですが、ChatGPT は Web 上で動くサーバーにしかつなげません
代わりにできること
A · Stet につなげるアプリを使う
- 先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
- 先にパソコンへ Node.js を入れてください(1 回だけ)
- 先にパソコンへ Node.js を入れてください(1 回だけ)
- 先にパソコンへ Node.js を入れてください(1 回だけ)
B · 開発者ツール の中で ChatGPT につなげる別のサーバー
同じカテゴリでよく使われているものから、キーなしでアドレスだけでつなげるものを選びました
- Sentry✓ ChatGPT
- Compiler Explorer✓ ChatGPT
- GitDiagram✓ ChatGPT
Claude Code につなげますが、先に準備が必要です
先にパソコンへ Node.js を入れてください(1 回だけ)
AI にインストールしてもらう
このメッセージを Claude Code のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。
このパソコンの Claude Code に MCP server Stet を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):claude mcp add --scope user stet -- npx -y stet-cli mcp 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、Stet のツールが本当に表示されるか確認する。このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。
Node.js を入れる(まだなければ)
もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter
node -v- バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
- "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
ターミナルの開き方
Mac:⌘ + Space を押し、Terminal と入力して Enter
Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」
まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です
入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です:
node -v一度入れれば、Node.js を使うすべてのツールで使えます
ターミナルを開く
Mac:Command+スペースで Terminal と入力 · Windows:PowerShell を開く
このコマンドを貼り付けて Enter
claude mcp add --scope user stet -- npx -y stet-cli mcpClaude Code で /mcp と入力
Stet が一覧にあり、接続済みと表示されれば OK です
試してみる
Stet を使って、私に何ができるか教えて、1 つやってみせて✓ Claude Code が Stet を使っていると言うか、回答に Stet のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
Cursor につなげますが、先に準備が必要です
先にパソコンへ Node.js を入れてください(1 回だけ)
AI にインストールしてもらう
このメッセージを Cursor のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。
このパソコンの Cursor に MCP server Stet を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "mcpServers": { "stet": { "command": "npx", "args": [ "-y", "stet-cli", "mcp" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、Stet のツールが本当に表示されるか確認する。このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。
Node.js を入れる(まだなければ)
もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter
node -v- バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
- "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
ターミナルの開き方
Mac:⌘ + Space を押し、Terminal と入力して Enter
Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」
まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です
入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です:
node -v一度入れれば、Node.js を使うすべてのツールで使えます
Cursor の AI チャットを Agent モードで開く
試してみる
Stet を使って、私に何ができるか教えて、1 つやってみせて✓ Cursor が Stet を使っていると言うか、回答に Stet のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Cursor のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
VS Code につなげますが、先に準備が必要です
先にパソコンへ Node.js を入れてください(1 回だけ)
AI にインストールしてもらう
このメッセージを VS Code のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。
このパソコンの VS Code に MCP server Stet を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "servers": { "stet": { "type": "stdio", "command": "npx", "args": [ "-y", "stet-cli", "mcp" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、Stet のツールが本当に表示されるか確認する。このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。
Node.js を入れる(まだなければ)
もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter
node -v- バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
- "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
ターミナルの開き方
Mac:⌘ + Space を押し、Terminal と入力して Enter
Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」
まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です
入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です:
node -v一度入れれば、Node.js を使うすべてのツールで使えます
VS Code の AI チャットを Agent モードで開く
試してみる
Stet を使って、私に何ができるか教えて、1 つやってみせて✓ VS Code が Stet を使っていると言うか、回答に Stet のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に VS Code のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
開発者向け:ターミナルのコマンドと JSON 設定
パソコンにインストール
Claude Code
claude mcp add --scope user stet -- npx -y stet-cli mcpClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"stet": {
"command": "npx",
"args": [
"-y",
"stet-cli",
"mcp"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"stet": {
"command": "npx",
"args": [
"-y",
"stet-cli",
"mcp"
]
}
}
}VS Code (mcp.json)
{
"servers": {
"stet": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"stet-cli",
"mcp"
]
}
}
}この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。
ひと目でわかる
- 週あたりのダウンロードi
- 1,541/週
- 接続方法
- パソコンで動く
- 最新バージョンi
- 0.6.5
- レジストリ公開日i
- 2026年11月15日
- コードの最終更新i
- 2026年11月19日
- 作者
- shamazkhan
- パッケージ
npm: stet-cli- ウェブサイト
- getstet.dev
- レジストリでの状態
- 有効
使えるアプリ
このサーバーのつなぎ方と、各アプリの公式ドキュメントに基づきます。2026年11月10日に確認。
パソコン上で動かせるアプリ
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
できること
パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。
基本チェックi
誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月19日にチェック
- ✓ 合格
作者とリポジトリが一致
レジストリ名は、リポジトリを所有するGitHubアカウント shamazkhan で確認済みです
- ✓ 合格
今もメンテナンスされている
コードの最終更新:今日
- ✓ 合格
ライセンスがある
MITを使用
- – 対象外
エンドポイントが応答する
これはパソコンで動くため、インターネット上のエンドポイントはありません
- – 対象外
OAuthでサインイン
パソコンで動き、代わりにローカルの設定を使います
- … 未チェック
ツールの説明に隠れた指示がない
パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです
公開済みの脆弱性(OSV.dev)
まだ確認していません
作者の方へ:再確認の依頼・情報の誤りの報告
作者向け:README にバッジを付ける
作者の方は、このコードを README に貼れます。バッジはこのページにリンクします。
[](https://mcp.popnx.com/en/servers/shamazkhan-stet)話し合い
質問、コツの共有、使えないことの報告ができます。「役に立った」の多い順です。
ユーザーレビュー
まだレビューはありません
開発者ツールのほかのサーバーとの比較i
- このカテゴリのほかの6116件のうち0%よりスターが多い
- このカテゴリのほかの6116件のうち90%より最近レジストリに公開
- 基本チェックの結果が、このカテゴリのほかの6116件のうち99%と同じかそれ以上
レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。
よくある質問
Stetは安全ですか?
当てはまる基本チェック3項目のうち3項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。
どんなキーやコードが必要ですか?
レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。
パソコンで動きますか、それともクラウドですか?
あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。
今もメンテナンスされていますか?
GitHubリポジトリの最終更新は今日、最新バージョン(0.6.5)がレジストリに届いたのは4 日前です。
どのアプリで使えますか?
Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにNode.jsも必要です。
代わりに使えるものは?
同じカテゴリには:GitDiagram, Appllama, Cloudflare MCP, Omnara, Repowise
似た働きのほかの候補
同じカテゴリでほかの作者のもの。コマンドは確認済み。公式を先に、次にスター順。
カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i
GitDiagram
Architecture diagrams, explanations and Mermaid source for public GitHub repositories.
Appllama
Study screens, flows and paywalls from top-earning iOS apps, then build from what wins.
Omnara
Deploy durable AI agents with Omnara, an open-source managed-agent platform.
Repowise
Codebase intelligence for AI coding agents: graph, git history, docs, decisions, code health.
| これ Stet | GitDiagram | Appllama | Cloudflare MCP | Omnara | Repowise | |
|---|---|---|---|---|---|---|
| 動く場所 | パソコンにインストールが必要 | クラウドで動き、インストール不要 | クラウドで動き、インストール不要 | クラウドで動き、インストール不要 | クラウドで動き、インストール不要 | クラウドでもパソコンにインストールでも使える |
| キーが必要 | いいえ | いいえ | いいえ | いいえ | いいえ | いいえ |
| Claude で + から追加 | いいえ | いいえ | いいえ | はい | いいえ | いいえ |
| 基本チェック | 3/3 | 4/4 | 4/4 | 4/4 | 4/4 | 5/5 |
| ライセンス | MIT | MIT | MIT | Apache-2.0 | Apache-2.0 | AGPL-3.0 |
| 料金 | 登録情報に費用の記載なし | 登録情報に費用の記載なし | 登録情報に費用の記載なし | 登録情報に費用の記載なし | 登録情報に費用の記載なし | 登録情報に費用の記載なし |
作者のREADME
READMEを開く
作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。
Stet: guardrails for AI coding agents
Stop AI coding agents from breaking what already works. · Website and docs: getstet.dev · Guides
Stet is a free, open-source CLI and MCP server for teams using Claude Code, Cursor, Codex, GitHub Copilot, Windsurf, Gemini CLI, ChatGPT or Claude. You set the scope of each AI task, lock the behaviours that must keep working, and Stet blocks any change that goes outside the task or breaks a lock. It works the same with every tool, and the agent can read the rules but can't rewrite them.
npx stet-cli init # in any git repo; Node 18+
Use it when your AI agent "tidies" files outside the task, breaks a feature you thought was safe, quietly edits a failing test, ignores your AGENTS.md / CLAUDE.md / Cursor rules, or forgets the project between chats.
- Charter → `AGENTS.md`. Write your product context and do's and don'ts once in
.stet/charter.md. Stet keepsAGENTS.md(read by Codex, Cursor, Copilot and others) andCLAUDE.mdin sync. - Locked behaviours. Lock what already works, each with a command that proves it.
stet checkruns them all. If one fails, the AI fixes its change, not the test. - Snapshot locks. Lock the *output* of a command (an export file, a list of API routes, mapped integration data). If it changes,
stet checkfails with a diff;stet lock approveaccepts an intended change and logs why. No test file needed. - Scope guard. Agree the task and the files it may touch.
stet guardflags every file changed outside scope or in protected paths, even if the agent already committed it. - Git-synced context.
stet contextbuilds a context pack from the live repo (charter, scope, locks, decisions, commits, uncommitted changes, file tree and the files you choose). Paste it into any chat instead of uploading yoursrcfolder. - Decision log.
stet deciderecords "we chose X because Y", so the next session doesn't reopen it. - Linear tickets.
stet scope set LIN-142 --allow "…"pulls the ticket's title and description from Linear into the context pack, so your AI gets the ticket and the code in one paste. - Ticket-aware PRs. Put the ticket ID in the scope (
LIN-142 Add CSV export) andstet prwrites the commit message and PR description from the real diff, scope, check results and decisions. The git hook adds the ticket ID to every commit. - Repo study.
stet study "checkout"maps how a part of the code works: key files, the files they depend on, entry points (routes), an import-flow diagram, the tests that cover it and what protects it. It writesdocs/flows/checkout.md, keeps your own notes on refresh, and tells you when the code has changed since. - Handoff pack.
stet handoffwrites an onboarding document for a new developer or CTO, built from the repo. - MCP server.
stet mcpexposes all of this as tools to Claude Code, Cursor and any MCP client.
No account. No telemetry. Your code never leaves your machine. Zero dependencies. Node 18+. Network calls are limited to two: once a day, when you run Stet in a terminal, it asks npm for the latest version number so it can offer an update (no code or repo information is sent; off in CI, or with STET_NO_UPDATE_CHECK=1). And if you set LINEAR_API_KEY, stet ticket fetches the Linear ticket you name (only the ticket ID is sent).
Install
npm install -g stet-cli # or run any command with: npx stet-cli <command>
cd your-project stet init
stet init detects your stack and test command, then creates:
.stet/
charter.md what this is, stack, always / never rules ← edit this config.json name, protected paths, ignore globs locks.json locked behaviours scope.json current task scope decisions.md decision log AGENTS.md generated working agreement (your own text outside the stet block is kept) CLAUDE.md imports AGENTS.md for Claude Code
Commit .stet/, AGENTS.md and CLAUDE.md. Every agent and teammate then works from the same rules.
The loop
# once: lock what already works
stet lock add "Login works" --cmd "node --test test/auth.test.js" --protect "src/auth/**"
before each AI task (the ticket ID is optional)
stet scope set "LIN-142 Add CSV export" --allow "src/export/**,test/export*" stet context --files "src/export/**" # copied to clipboard; paste into your chat
after the AI says it's done
stet guard # anything outside scope or in protected paths? stet check # do all locked behaviours still pass?
ship it
stet pr # commit message + PR description (PR copied to clipboard) git commit -F .stet/.cache/commit.txt # "LIN-142: Add CSV export" + file list
Example output:
$ stet guard
Guarding 4 changed files (changes since 12b672b) · task: Add CSV export ✗ migrations/002_export.sql out of scope protected ✓ src/export/csv.js ✗ src/auth/session.js out of scope affects L2 ✓ test/export.test.js
✗ 2 files outside scope or protected. Revert, or widen the scope on purpose. ! Changes touch locked behaviour L2. Run: stet check --only L2
$ stet check Checking 2 locked behaviours ✗ L2 Login works (0.1s) │ not ok 1 - session expires after 30 minutes │ expected: 1800 │ actual: 0
✗ 1 locked behaviour broken: L2. Fix the change, not the check.
Snapshot locks
Many regressions are behaviour changes nobody wrote a test for: an export's column order, a renamed route, a mapping that shifted. Snapshot locks catch them with a tiny script that prints the behaviour:
stet lock add "Export format is stable" --snapshot "node scripts/export-sample.js" --protect "src/exports/**"
stet lock add "API routes unchanged" --snapshot "node scripts/print-routes.js" stet lock add "Report totals" --snapshot "python scripts/report.py" --mask "\d{4}-\d\d-\d\dT[\d:.]+Z"
Stet saves the output to .stet/snapshots/ as the approved version (commit it). From then on:
$ stet check
✗ L3 Export format is stable (0.2s, snapshot) │ output differs from the approved snapshot (- approved, + now): │ @@ line 1 @@ │ - id,name,email │ + id,email,name │ intended? approve it: stet lock approve L3 --why " "
- Intended change?
stet lock approve L3 --why "PRO-91: email column first"saves the new output and logs a decision. - Volatile output (timestamps, generated IDs)? Add
--mask " "; matches become. - Tampering:
stet guardflags any snapshot file edited by hand instead of throughstet lock approve, and AGENTS.md tells agents never to approve snapshots themselves. - Keep snapshot scripts deterministic: fixed sample data, sorted output, no network.
Commands
| Command | What it does | ||
|---|---|---|---|
stet init [--name X] [--mcp] | Set up .stet/, AGENTS.md and CLAUDE.md. --mcp also writes .mcp.json. Safe to re-run. | ||
stet sync | Regenerate the Stet block in AGENTS.md (other commands do this automatically). | ||
stet scope set " " --allow " " [--ticket LIN-142] | Agree the task and the files it may touch. Records the current commit as the base. A ticket ID at the start of the task is picked up automatically. | ||
stet scope set … --strict | Refuse to start a scope while there are uncommitted files. Without it, earlier uncommitted work is *carried*: guard ignores it unless it changes again. | ||
stet scope carry / --all | Mark files guard flagged as leftovers from before the scope. | ||
stet scope done [--commit] [--force] | Run guard and check, commit only the task's files (with the stet pr message) and close the scope. | ||
| `stet scope [show\ | clear\ | ticket]` | Show or clear the scope, or print just the ticket ID. |
stet guard [--staged] [--base ref] [--warn] | Check changes since the scope base (committed, staged, unstaged and untracked). Exits 1 on violations unless --warn. | ||
stet lock add " " --cmd " " [--protect " "] | Lock a behaviour. --protect tells guard which files affect it. A command that is already locked is refused (--force to add anyway). | ||
stet lock rename L1 " " | Rename a lock, e.g. the test-suite lock stet init creates. | ||
stet lock add " " --snapshot " " [--mask " "] | Lock a command's output as an approved snapshot in .stet/snapshots/. | ||
stet lock approve L3 --why " " | Accept a changed snapshot on purpose; logged as a decision. | ||
| `stet lock [list\ | rm L2]` | List locks with their last result, or remove one. | |
stet check [--only L1,L2] | Run locked behaviours. Exits 1 if any fail and shows the failing lines. | ||
| `stet context [--files " "] [--changed] [--diff] [--copy\ | --stdout\ | --out f]` | Build the context pack. By default it writes .stet/context.md and copies it to the clipboard. |
stet decide " " [--why " "] | Add to the decision log. | ||
stet decisions [--all] | List decisions. | ||
stet ticket [LIN-142] [--stdout] [--cached] | Fetch a Linear ticket (needs LINEAR_API_KEY). It is included in stet context and linked in stet pr. With no ID, shows the current scope's ticket. | ||
stet pr [--base main] [--check] [--stdout] | Write .stet/.cache/commit.txt and .stet/.cache/pr.md from the diff since the scope was set: ticket, changed files, scope result, stet check results and decisions logged during the task. --check runs the locks first. | ||
stet study " " [--out file] [--max 12] | Map a flow: key and supporting files, routes, Mermaid diagram, tests, protection gaps. Writes docs/flows/ .md. | ||
stet study | List studied flows and which are out of date. | ||
stet context --flow | Context pack with the flow doc and all its files. | ||
stet handoff [--out HANDOFF.md] [--stdout] | Generate the onboarding pack. | ||
stet hook install [--check] | Add git hooks: pre-commit blocks commits that stage out-of-scope or protected files (--check also runs stet check); prepare-commit-msg adds the ticket ID to commit messages. | ||
stet update [--yes] | Check for a newer release and install it (asks first unless --yes). | ||
stet badge [--add] | Print the "guarded by stet" README badge, or add it to your README. | ||
stet status | One-screen summary. | ||
stet mcp / stet mcp install | Run the MCP server over stdio, or write .mcp.json. |
Add --json to any command for machine-readable output.
Repo study
Took over a codebase, or about to change a part you don't know well?
stet study "checkout"
Writes docs/flows/checkout.md from the code itself:
- Entry points: routes that lead into it (Express, Fastify, FastAPI, Flask, NestJS, Django
path()) - Flow: a Mermaid diagram of which file uses which (GitHub renders it)
- Key files and the supporting files they depend on, with their main functions
- Tests that cover it, and what protects it (locks, protected paths), with suggested
stet lockcommands for the gaps - Recent changes and related decisions
Then get the explanation from your AI:
stet context --flow checkout # the flow doc + all its files, copied to your clipboard
The doc includes a ready prompt. Paste the answer into its How it works section: Stet keeps that section and your Notes when you refresh the doc. stet study on its own lists your flows and flags the ones whose code changed since they were written; stet status