Status: Partial (v8.8.0 — RFC + quickstart + .cursor/ wiring + hook adapter; full exec automation TBD)
Created: 2026-05-19
Issue: #291 / #82
Cursor is widely used as an IDE-integrated coding agent. PlanGate already documents Cursor as
「計画中」 in the Provider table, but unlike OpenCode and Gemini CLI there was no RFC, no
.cursor/ package, and no hook bridge.
Adding Cursor support would:
plangate validate) without switching IDEs.agents/skills/) already shared with Codex CLI| PlanGate role | Claude Code | Codex CLI | Cursor (this RFC) |
|---|---|---|---|
| Planner / conductor | .claude/commands, workflow-conductor agent |
./scripts/ai-dev-workflow |
Agent + ai-dev-plan skill (.agents/skills/) |
| Implementer | implementer agent, /ai-dev-workflow exec |
implementer.toml, plangate exec |
Cursor Agent (manual or future API); PLANGATE_IMPL_AGENT=cursor logs intent |
| External reviewer | Codex / Gemini via plangate review |
same | same (CLI, outside Cursor) |
| Gate enforcement | .claude/settings.json hooks |
harness + hooks on Codex path | .cursor/hooks.json → scripts/hooks/cursor-adapter.sh |
# Active PlanGate task for hook context (required for EH-1 / EH-2 in strict workflows)
export PLANGATE_HOOK_TASK=TASK-0042
# Optional: block on violation instead of warn-only (matches PLANGATE_HOOK_STRICT=1)
export PLANGATE_HOOK_STRICT=1
# Implementation agent dispatch (exec phase)
export PLANGATE_IMPL_AGENT=cursor
bin/plangate exec TASK-0042 --mode standard
.cursor/
hooks.json # preToolUse → PlanGate EH-1 / EH-2 adapters
hooks/
plangate-eh1-plan.sh
plangate-eh2-c3.sh
rules/
plangate.mdc # Agent rules: read AGENTS.md, skills, working context
docs/cursor/
quickstart.md # Level 1–3 setup for Cursor users
scripts/hooks/
cursor-adapter.sh # Claude hook JSON ↔ Cursor hook JSON translator
Skills remain canonical under .agents/skills/. Cursor discovers workflow skills via
symlinks under .cursor/skills/ (see docs/cursor/quickstart.md).
docs/cursor/quickstart.md.cursor/rules/plangate.mdc + hooks.json + EH-1/EH-2 adaptersscripts/hooks/cursor-adapter.sh — translate continue / stopReason → permission / messagesplangate exec accepts PLANGATE_IMPL_AGENT=cursor (manual handoff message)preToolUse adaptersplangate doctor — report .cursor/hooks.json wiring (parity with .claude/settings.json)plangate doctor --fix merge for Cursor hooksexec (if stable contract exists)docs/cursor/agent-mapping.mdClaude Code hooks emit:
{"continue": false, "stopReason": "..."}
Cursor preToolUse expects:
{"permission": "deny", "user_message": "...", "agent_message": "..."}
cursor-adapter.sh invokes existing scripts/hooks/check-*.sh unchanged, parses stdout,
and emits Cursor-compatible JSON. Existing hook unit tests (tests/hooks/run-tests.sh) remain
valid; add tests/hooks/cursor-adapter-test.sh for translation-only cases.
PLANGATE_HOOK_TASK from the only open docs/working/TASK-*
directory, or always require explicit env (current: explicit, false-positive safe)?PLANGATE_HOOK_STRICT=1 for IDE users?Write / StrReplace; Tab inline edits may need
afterTabFileEdit separately.plangate exec?