跳轉到

Cursor

Cursor CLI agent 跑在 ait 管理的隔離 Git worktree 內,每次 agent 執行都記成可審核的 attempt。

為什麼用 ait 包 Cursor agent

  • Cursor 編輯被限制在 attempt worktree 內。
  • 每次執行產生 attempt log:prompt、變更檔案、退出狀態、commits。
  • Promote 是顯式的 — root checkout 不會被靜默修改。

設定

ait init                   # 偵測 PATH 上的 `cursor`,自動裝 wrapper
ait adapter doctor cursor  # 可選的 sanity check

ait initcursor$PATH 上時自動裝 repo-local 的 cursor wrapper。Cursor 目前 CLI 端沒有可靠的 hook 系統,所以 ait 改用 --output-format stream-json 從 stdout 後處理 event stream。

在 ait 下跑 Cursor

ait run --adapter cursor --intent "遷移到新 SDK" -- cursor

或設定完後直接呼叫包裝過的 cursor 指令。

審核與 promote

ait attempt list
ait attempt show <attempt-id>
ait attempt promote <attempt-id> --to main

相關