Skip to content

feat: add cursor agent support#52

Merged
MiniCodeMonkey merged 1 commit intomainfrom
add-cursor-support-rebased
Mar 20, 2026
Merged

feat: add cursor agent support#52
MiniCodeMonkey merged 1 commit intomainfrom
add-cursor-support-rebased

Conversation

@MiniCodeMonkey
Copy link
Copy Markdown
Owner

@MiniCodeMonkey MiniCodeMonkey commented Mar 20, 2026

Summary

Adds Cursor CLI as a fourth agent backend for Chief. Users can run PRD loops with Cursor's agent CLI in addition to Claude Code, Codex, and OpenCode.

Based on #48 by @bobobobo — rebased onto current main (post prd.json removal) with the following adjustments:

  • Removed ConvertCommand and FixJSONCommand (no longer in the Provider interface)
  • Replaced EventStoryStarted/extractStoryID/ralph-status with EventStoryDone/<chief-done/> to match current parser patterns
  • Extracted duplicate anonymous struct in CleanOutput to a named cursorResultLine type
  • All doc changes applied against current markdown-only content

What's included

Agent integration

  • internal/agent/cursor.goCursorProvider implementing loop.Provider with --output-format stream-json, --force, --trust flags
  • internal/agent/resolve.go — Added "cursor" case to Resolve()

Output parsing

  • internal/loop/cursor_parser.go — Parser for Cursor CLI stream-json NDJSON, mapping all Cursor tool types to Chief events

Configuration & CLI

  • cmd/chief/main.go--agent accepts cursor; help text updated
  • internal/config/config.goAgentConfig comment updated

Tests

  • internal/agent/cursor_test.go, internal/agent/resolve_test.go, internal/loop/cursor_parser_test.go

Documentation

  • Installation, quick start, configuration, troubleshooting, PRD format, and AgentSupport.vue all updated

How to use

chief --agent cursor
# or: CHIEF_AGENT=cursor
# or: agent.provider: cursor in .chief/config.yaml

Test plan

  • go build ./... succeeds
  • go test ./... — all 9 packages pass
  • Manual test with Cursor CLI installed

Co-authored-by: Bobo Häggström <444567+bobobobo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant