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/agent-routing.pi-input-intercept)<a href="https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/agent-routing.pi-input-intercept"><img src="https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/agent-routing.pi-input-intercept.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.01537 |
| Opus 5 | $0.00000 | $0.00768 |
| Sonnet 5 | $0.00000 | $0.00307 |
| Haiku 4.5 | $0.00000 | $0.00154 |
Grade A, and why
agent-routing.pi-input-intercept scanned grade A with 0 findings 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Routing — Codex Input Intercept Protocol
核心命題
Pi machine dispatch 使用ephemeral --no-session JSON mode,沒有Codex CLI exec resume語意。Codex模型需要釐清時,prompt要求它在final response輸出## Question;主線收割dispatcher結果後先判斷能否代答,再把「原brief+已確認答案」組成一份新brief重新dispatch。
持有該 dispatch 的主線是攔截層:答案可由既有證據直接推導就代答;需要產品、業務、架構或風險拍板才升級給user。重派是新的Pi session,routing metadata與--retry-of仍完整落ledger。
Prompt附加段(每一個寫code派工 MUST加)
## Asking Questions(MUST)
遇到以下情況,直接在final response提出問題,不要猜測或做假設:
- 需求或spec有歧義,無法從context判斷正確做法
- 需要在兩個以上合理方案之間選擇,且沒有明確偏好訊號
- 缺少必要資訊(API契約、database schema、業務規則)
- brief預期行為與現有code矛盾
提問格式:final response最後輸出`## Question`,每個問題一行。提出問題的這一輪不要做不可逆動作,也不要自行選一案硬做。
問題偵測(每一次terminal收割 MUST執行)
dispatcher stdout是單一JSON。依序讀:
result:成功且可解析的business payload。error+lastMessagePath:exit 3但Pi已有assistant final text時,讀該檔判斷是否為問題;NEVER只看exit 3就當機械故障。- final text命中任一條件即視為問題:
- 含
## Questionsection。 - 以問號結尾,且該輪沒有成功結果或檔案變更證據。
- 含
沒有問題才按exit code正常分流。安全網control turn只檢查task狀態,NEVER提前讀output tail;terminal notification到達並claim task後才做本節判讀。
能否代答
可代答
答案可直接引用以下任一來源,且不存在合理第二解:
- 原brief已提供但model漏讀的資訊。
rules/core/或consumer.cursor/rules/的明確規約。- 現有code、config、schema的可驗事實。
- 上游官方文件的明確定義。
必須升級
- 產品或業務行為選擇。
- 架構方向或真實trade-off。
- 資安、合規、費用或資料風險決策。
- 主線自己也不確定的技術判斷。
- brief與現有code矛盾,且無法證明哪邊是SoT。
灰色地帶升級。代答門檻是答案可附一條可重讀的證據來源,不是「主線覺得大概如此」。
重派契約
- 建立
/tmp/pi-<topic>-<slug>-qa-log.md,記錄question、answer、source與auto/escalated。 - 產生新的brief:完整保留原brief,在末尾追加
## Confirmed Answers,逐題列question、answer與source。 - 用原model/effort/cwd/route/tier-basis重跑dispatcher,label使用新值並帶
--retry-of <prior-label>。 - 新dispatch啟動新的Watch Protocol cycle;回來後重新做問題偵測。
- 同一工作連續重派3次仍在問,第4次強制升級user;這代表brief或前置資訊仍不完整。
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 · +2 lines 63d59ee6126f
- yesterday Changed 5948e5e279f6
- 4d ago Changed b7db06887d9d
- 8d ago First seen · 121 lines · 0 tokens per session scan A 0bd7fc86122a
agent-routing.pi-input-intercept 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 1,537 tokens. A static security scan graded it A with 0 findings. 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
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-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.