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/wip-orphan-recovery)<a href="https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/wip-orphan-recovery"><img src="https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/wip-orphan-recovery/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/wip-orphan-recovery"><img src="https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/wip-orphan-recovery.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.02377 |
| Opus 5 | $0.00000 | $0.01189 |
| Sonnet 5 | $0.00000 | $0.00475 |
| Haiku 4.5 | $0.00000 | $0.00238 |
Grade A, and why
wip-orphan-recovery 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 4d 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.
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 — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.
WIP Orphan Recovery
Reference 檔。被 Stop hook(
stop-wip-guard.sh)warn message 與handoff-drift-scan.tsTrigger 5(orphan-uncommitted-wip)指向。預防層見 [[worktree-default]] §5、claim 機制見 [[session-claims]]、升級出口見 [[handoff]] / [[session-tasks]]。
什麼是 orphan WIP
worktree 有未 commit 的 user 改動,且原工作已確認結束、沒有其他活躍 owner 接手時,才是可評估接手的 orphan WIP。git status --porcelain 非空且過濾投影後仍有檔,加上 claim 不存在或過期,只是偵測候選;它沒有證明 session 已死。
| Ownership 證據 | 分類與下一步 |
|---|---|
| 有活躍 owner | other-live:協調持有者,不進接手 SOP |
| 原工作已確認結束,沒有其他 owner,且本次接手在授權範圍內 | orphan:進下方 SOP 判完成度與收尾 |
| 只有過期/缺席 claim、startup event、舊 task 自報或查不到 presence | unknown:只讀 Git/task/ownership 證據並記錄待確認事項;保留 WIP,不 commit、restore、discard 或自行接管 |
Native startup event 與 project-context 之類的 context handler 不承載 owner 已結束的證据。NEVER 先把 unknown 命名為 orphan,再以測試全綠補成接管授權;品質驗證與所有權是兩個 gate。
核心問題:commit 是唯一的完成度標記,但 orphan WIP 定義就是「還沒 commit」。session 一死,這批改動成黑箱——新 session 無從得知「做到哪、做完沒、為什麼這樣改、是不是半成品被打斷」。只能靠下方 SOP 逐一考古推斷。
兩個偵測入口
| 層 | 機制 | 時機 |
|---|---|---|
| 提醒(Layer 0) | Stop hook stop-wip-guard.sh |
session 結束前 working tree 有 user WIP → warn(不阻擋),提醒有未 commit 改動。多 session 並行共用 working tree 是常態,dirty file 可能屬於別的 active session,不應 block |
| 事後(Layer 2) | handoff-drift-scan.ts Trigger 5 orphan-uncommitted-wip |
session-start drift scan 偵測「worktree dirty + claim 無效/過期」→ 列出待判 ownership 的候選;訊號名稱不等於 orphan 裁決。有 active claim 的 dirty worktree 不報(不擾動 live session) |
兩層共用 wip-dirty.ts 的 userDirtyPaths()(single-source projection filter,與 wt-helper merge-back 同源,避免重刻 LOCKED_PROJECTION_RE 漂移)。
表中的自動觸發描述適用於已安裝、啟用並觀測到具名 handler 執行的產品入口;現有 Claude Stop/SessionStart 接線不代表 Codex/Cursor 已有相同接線。沒有該證據的入口,在收尾時從目標 repo 執行 node scripts/wip-dirty.ts,接手時執行 node scripts/handoff-drift-scan.ts --json 並讀取結果;clade 自身的兩支路徑為 vendor/scripts/。前者 exit 1 表示有 user WIP,後者為 informational、exit 0 不代表沒有 finding。helper 缺席或執行失敗時保留「未驗證」狀態,再以本節接手 SOP 的 Git 與 claim 即時證據判斷。
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.
- 4d ago Changed · +13 lines add36414ad05
- 8d ago First seen · 69 lines · 0 tokens per session scan A bce6c024ad30
wip-orphan-recovery 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 2,377 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-09-03.
Other cursor rules, from other repositories
develop-feature
When the user asks to implement a new feature end-to-end requiring planning, branch creation, implementation, testing, and PR. Use for work that goes beyond a simple fix or ad-hoc task.
new-project-standard
wellmanifest/new-project fail-closed ticket contract for every Cursor session.
speckit_speckit.git.commit
Proxy for the speckit.git.commit workflow.
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.