Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/YuDefine/nuxt-supabase-starterWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/verify-gate-chain)<a href="https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/verify-gate-chain"><img src="https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/verify-gate-chain.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.02009 |
| Opus 5 | $0.00000 | $0.01005 |
| Sonnet 5 | $0.00000 | $0.00402 |
| Haiku 4.5 | $0.00000 | $0.00201 |
Grade A, and why
verify-gate-chain scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
| L3 — 整合 | smoke / health | `curl -sf http://localhost:<port>/api/health` | change 全部 phase 完成後 | How it starts
The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Verify Gate Chain(自主迴圈驗證標準)
核心命題:agent 自主完成長任務的瓶頸不是行動能力,是不知道什麼時候算完成。本規約定義「gate chain」——一組依序執行的驗證指令,結果是機器可判定的 PASS / FAIL——讓 agent 能自行判斷「做完了嗎」並決定重試或停止,不用問人。
Gate chain 定義
Gate chain 是一組有序、確定性、機器可判定的驗證指令。每條指令的 exit code 是唯一判定依據:exit 0 = PASS,non-zero = FAIL。
每個 consumer MUST 在 .cursor/rules/local/verify-commands.mdc 定義自己的 gate chain。 clade 定義標準(本規約),consumer 定義內容(各自的 test runner、port、health endpoint)。
Gate chain 層級
| 層級 | 指令類型 | 範例 | 何時跑 |
|---|---|---|---|
| L0 — 格式 | lint + fmt | vp check |
每次 Edit/Write 後(PostToolUse hook 已覆蓋) |
| L1 — 型別 | typecheck | pnpm typecheck |
每個 phase 完成後 |
| L2 — 單元 | test suite | pnpm test --run |
每個 phase 完成後 |
| L3 — 整合 | smoke / health | curl -sf http://localhost:<port>/api/health |
change 全部 phase 完成後 |
PASS = L0–L2 全 exit 0。 L3 為 SHOULD(dev server 未起時 skip,不算 FAIL)。
Consumer verify-commands.md 範本
Consumer 端 .cursor/rules/local/verify-commands.mdc MUST 至少定義 L0–L2:
# Verify Commands
## Gate Chain
- L0: `vp check`
- L1: `pnpm typecheck`
- L2: `pnpm test --run`
- L3: `curl -sf http://localhost:3040/api/health` (optional, skip if dev server not running)
clade 不散播此檔——各 consumer 自管。vendor/snippets/verify-gate-chain/ 提供 scaffold 模板。
Iterate-until-green 迴圈語義
agent 執行修改後跑 gate chain,FAIL 時解析 error output → 修正 → 重跑 gate chain,直到全 PASS 或達到 max_iterations。
MUST 宣告迴圈參數
每個自主迴圈(spectra-apply phase 實作、bug fix、lint fix、dep update)開始前 MUST 確認以下兩個參數:
| 參數 | 預設值 | 說明 |
|---|---|---|
max_iterations |
5 | 跑 gate chain → fix → re-run 的最大輪數 |
escalation_action |
HANDOFF |
超過上限時的行為:HANDOFF(寫 HANDOFF.md 交接)/ ASK(問 user)/ STOP(靜默停止並報告)/ ROLLBACK:<artifact>(退回上游 artifact 修 spec——只在判定 specification error 時用,見 § Error 解析規則) |
禁止無上限迴圈。 沒有宣告 max_iterations 的自主 iterate 視同違規。
迴圈流程
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 129 lines · 0 tokens per session scan A 816aefdf9844
verify-gate-chain is a cursor rule published in the GitHub repository YuDefine/nuxt-supabase-starter (45 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,009 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other cursor rules, from other repositories
testing
Agent engineering standards — Testing (TR-TEST-001, TR-TEST-002, TR-TEST-004, TR-TEST-005, TR-TEST-006, TR-TEST-007).
vitest-config
Shared @repo/vitest-config factories - dual entries, Turbo package caching, Node vs Workers knobs.
every-error-regression-test
Mandatory regression test for every discovered defect or failure (non-negotiable).
android_unit_testing_bdd
Unit testing best practices with BDD style.
auto-test
Guidelines for automated testing.
testing-patterns
Testing patterns and best practices for Bun test.