worktree-default.commit-ceremony

worktree-default.commit-ceremony is a cursor rule for Cursor from YuDefine/nuxt-supabase-starter. It costs 0 tokens per session (3,554 once invoked), scanned A, original, MIT.

A Git workflow rule for committing changes inside a worktree, merging them back into the main branch, and then completing the final commit ceremony.

In plain words
What is it for?
It helps structure one commit per phase, enforce commit checks, selectively stage files, merge completed work, and avoid unsafe Git shortcuts.
Why use it?
It keeps the main branch deployable while preserving clear boundaries between phases and parallel pieces of work.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions subagents; names the AskUserQuestion tool; mentions Codex.

Install

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.

agentmods
npx agentmods add rules/yudefine/nuxt-supabase-starter/worktree-default.commit-ceremony
Clone the repo
git clone --depth 1 https://github.com/YuDefine/nuxt-supabase-starter

Made for: Cursor.

Wrote 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.

agentmods badge for worktree-default.commit-ceremony

README.md
[![agentmods](https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/worktree-default.commit-ceremony.svg)](https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/worktree-default.commit-ceremony)
Your own site
<a href="https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/worktree-default.commit-ceremony"><img src="https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/worktree-default.commit-ceremony.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 3,554 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.03554
Opus 5 $0.00000 $0.01777
Sonnet 5 $0.00000 $0.00711
Haiku 4.5 $0.00000 $0.00355

Measured today against content hash 95c086515374, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

worktree-default.commit-ceremony 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.

template/.cursor/rules/worktree-default.commit-ceremony.mdc · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Path-scoped detail of [[worktree-default]] §5 / §5.5 / §6。核心 always-load 規約在母檔 worktree-default.md。

§5 Commit 階段:subagent commit → archive 吸收 → user /commit

v3 atomic landing model(取代 v2 「/wt 返回時 squash」):

/wt 返回時保留已 commit 的 worktree/branch。OPSX archive 在實作樹驗證並封存目前 revision;主持者提交 bookkeeping 後,序列合回 main 並立即限定路徑 commit。驗收、歸檔、落地與部署各自有證據。

為什麼從 v2 改 v3

v3 atomic landing 解這些:main 永遠 deployable;多 session 平行不污染 main(每條 worktree 各自保留到 archive);一個 ceremony land 全部;人工檢查 Gate 與 archive gate 對齊為同一道進 main 關卡。

Mechanic

Codex 派工規約(細則見 [[agent-routing.pi-watch-protocol]] § Commit Authorization):codex 可在 worktree 內 commit,但 MUST 遵守:一 phase 一 commit、message 強制 🧹 chore: wt <change>-phase-<N> — <short>、不繞 hook(禁止 --no-verify)、selective stage(禁止 git add -A)、commit 前自跑 drift + scope check、仍禁止 git push / 中途 git stash / --amend / /commit / /spectra-commit。主線收到完工通知後 MUST 驗 commit 邊界對齊 phase + format、double-check drift / scope(發現 → git -C <wt> reset --soft main 重派)、跑 typecheck / test。

本段「Subagent 在 worktree commit」對 Claude subagent 與 codex 都適用(規約相同);差別只在 subject 後綴:Claude subagent 用 🧹 chore: wt <slug> — <free-form>,codex 強制 phase 格式以利主線對齊。

  1. Subagent 在 worktree 內 commit/wt prompt template 強制):git add -- <scoped file> selective stage(禁止 git add -A) + git commit -m "🧹 chore: wt <slug> — <short>",可多 commit,pre-commit / commit-msg hook 必跑。NEVERgit push / /commit / /spectra-commit
  2. /wt 返回時 squash, cleanup。worktree + branch 保留,主線只報告 status。
  3. OPSX 驗證與歸檔:在實作 worktree 依 /opsxreferences/execution.md 回讀目前 revision、證據與人工 gate,再執行 archive;未過的 gate 保持阻擋。
  4. 提交封存結果:在該 worktree 限定路徑 commit 實作與 bookkeeping,檢查 clean、scope 及內容。archive 不自動 merge-back。
  5. 主持者序列落地:先同步 main、檢查並行 WIP 與 merge-back dry-run;放行後只合一棵樹,立刻依 /commit 在 main 限定路徑 commit,驗每個檔的內容與 scope,再處理下一棵樹。既有授權不足時保留 worktree 與可審查結果,等待具體 gate。

Read the full file on GitHub · 110 lines

Changes

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.

  1. today Changed 95c086515374
  2. 2d ago First seen · 110 lines · 0 tokens per session scan A 6842b6bb5f0d

Subscribe to this mod's changes

worktree-default.commit-ceremony 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 3,554 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.