Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/YuDefine/nuxt-supabase-starternpx agentmods add rules/yudefine/nuxt-supabase-starter/agent-routing.pi-watch-protocolWrote 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/agent-routing.pi-watch-protocol)<a href="https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/agent-routing.pi-watch-protocol"><img src="https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/agent-routing.pi-watch-protocol/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/agent-routing.pi-watch-protocol"><img src="https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/agent-routing.pi-watch-protocol.svg" alt="Reviewed on agentmods" width="80" 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.21854 |
| Opus 5 | $0.00000 | $0.10927 |
| Sonnet 5 | $0.00000 | $0.04371 |
| Haiku 4.5 | $0.00000 | $0.02185 |
Grade B, and why
agent-routing.pi-watch-protocol scanned grade B 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 today.
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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
cat .claude/.hub-state.json | grep syncedAt # 若新近時間戳 → 自動 hook 型 dirty How it starts
The opening of the file, as written. The whole thing — 745 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Routing — Pi / screenshot-review Dispatch & Watch Protocol
Reference 檔。核心 routing 規則見
agent-routing.md。本檔聚焦實際派 Pi / screenshot-review agent 出去時的標準流程模板、watch protocol、Plan-first / Git baseline declaration 硬指令與 bounded phase 執行契約。
Pi 派工的標準流程(所有 routing 共用)
派任何 Pi 席位出去工作一律走 vendor/scripts/pi-dispatch.ts——gemini(provider google-gemini-cli)、astra / sol / luna(provider openai-codex;terra 可解析但 2026-08-11 起 NEVER 派)、luna-cursor / grok-cursor(provider cursor)、grok-xai(provider xai)每一格都走這個入口,沒有例外。
要指 openai-codex 那組席位時寫 codex-pool,那個區分只在配額鏈與計價成立;派工管道一律稱 pi。
已 route 給 Pi 的工作,NEVER 以直接執行 codex exec、codex review 代替 dispatcher,也不走任何 codex:rescue / codex:setup / codex:codex-rescue plugin 路線。
持有 dispatch 的主線自己派、自己等通知、自己讀 dispatcher JSON 回報,禁止叫使用者切 CLI、禁止「Stop here」純文字 handoff。
模板:
- 用 Write 把指示寫到
/tmp/pi-<topic>-<slug>-prompt.md(prompt 太長不要 inline) - Bash tool(background process launcher (enabled)):
<model-slug> 選檔:先查 [[agent-routing.routing-table]] 的具名列。一般非 UI 實作用 luna medium,複雜實作與修復升級用 sol high;已列明 Gemini/Grok 的工作沿用該列。Astra 只承接 planning/decision/review,未知工作先分類,不用 Astra 當預設。本節的 Pi 派工不改走 cx 或 AI Agent+GPT;Codex 主線 → 任一 GPT 可用原生 agent 的獨立分支見 [[agent-routing]] § Session transport boundary。
node ~/offline/clade/vendor/scripts/pi-dispatch.ts \
--brief /tmp/pi-<topic>-<slug>-prompt.md \
--cwd <cwd> \
--label <topic>-<slug> \
--model <astra|sol|gemini|luna|luna-cursor|grok-xai|grok-cursor> --effort <low|medium|high|xhigh|max> \
--route <routing-table|claude-delegate-sub|fallback-chain|manual> \
--tier-basis <table-row|five-conjunct|adjudication|delegate-sub|quota-fallback|manual> \
[--table-row <routing-row>] [--retry-of <prior-label>] [--chain-origin <astra|sol|luna|grok-xai>] [--task-role <planning|decision|review>]
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.
- today Changed · -106 lines 74ca5a3e3e37
- yesterday Changed · +60 lines b929f72ba210
- 3d ago Changed · -20 lines b9f4b690690d
- 4d ago Changed · +2 lines aceea426001b
- 5d ago Changed · +27 lines 49af89de9511
- 9d ago First seen · 782 lines · 0 tokens per session scan B b08bb55be5f5
agent-routing.pi-watch-protocol is a cursor rule published in the GitHub repository YuDefine/nuxt-supabase-starter (45 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 21,854 tokens. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
check
Analyze staged git changes with archguardian before committing.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-assertions-over-defensive-checks
Prefer assertions over defensive checks when data is guaranteed to be valid.