Open
Conversation
Owner
|
@bobobobo This is amazing. Thanks for adding this PR! I will review and get this merged in! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary: Add Cursor agent support
Overview
Adds Cursor CLI as a fourth agent backend for Chief. Users can run PRD loops with Cursor's
agentCLI in addition to Claude Code, Codex, and OpenCode.What's included
Agent integration
internal/agent/cursor.go— NewCursorProviderimplementingloop.Provider:agent -p --output-format stream-json --force --workspace <dir> --trustwith prompt on stdinCleanOutputhandles both single JSON and NDJSON (finds lastresult/success)cursor.loginternal/agent/resolve.go— Added"cursor"case toResolve(); resolution order unchanged (flag →CHIEF_AGENT→ config → default). Error message updated to list all four providers.Output parsing
internal/loop/cursor_parser.go— Parser for Cursor CLIstream-jsonNDJSON:system/init→ iteration start,assistant→ assistant text / story status /<chief-complete/>,tool_call→ tool start/resultConfiguration & CLI
internal/config/config.go—AgentConfigcomment updated to include Cursor.cmd/chief/main.go—--agentacceptscursor; help and error strings updated to mention all four agents.Tests
internal/agent/cursor_test.go— Tests forCursorProvider(commands,CleanOutput,ParseLine).internal/agent/resolve_test.go— Tests for resolvingcursor(and path/config).internal/loop/cursor_parser_test.go— Tests for Cursor NDJSON parsing (events and tool calls).Documentation
agent.cliPath,agent login,chief --agent cursor/ config).agent --versionin verify step.agent.providerand flags table includecursor; Cursor auth and headless/trust/force usage noted.cursor.log.How to use
chief --agent cursororCHIEF_AGENT=cursororagent.provider: cursorin.chief/config.yamlagent.cliPath(orCHIEF_AGENT_PATH) ifagentisn't on PATH--trustand--forceso Chief can drive it without interactive prompts.Testing