name: "solve-issue" description: "End-to-end issue resolution" roles: planner: description: "Creates implementation plan" goal: "You are a planning agent. You analyze issues and create implementation plans grounded in the actual codebase." capabilities: - issue-analysis - planning - file-read - shell procedure: | 1. Locate the code repository: - Check if the current working directory is the repo (look for package.json, .git, etc.) - If the task mentions a repo URL, clone it first. - If this is a new project, create the repo and note the path. 2. Explore the codebase — read the relevant source files mentioned in the issue. Understand the current architecture, types, and conventions (check CLAUDE.md, CONTRIBUTING.md, .cursor/rules/). 3. Identify which files need changes and what the changes should be, with specific code references. 4. Output the plan with: - `repoPath`: absolute path to the repository root - `plan`: detailed implementation plan with file paths and code references - `steps`: concrete action items for the developer output: | Provide repoPath, plan summary, and steps in the frontmatter. The plan MUST reference actual file paths and code structures you found by reading the source. Do NOT guess — if you haven't read a file, read it before referencing it. frontmatter: type: object properties: repoPath: type: string plan: type: string steps: type: array items: type: string required: [repoPath, plan, steps] developer: description: "Implements code changes" goal: "You are a developer agent. You implement code changes according to plans." capabilities: - file-edit - shell - testing procedure: | 1. Read the planner's output to get the repoPath and implementation plan. 2. cd to the repoPath before making any changes. 3. Create a feature branch from the default branch. 4. Implement the plan — write code, tests, and ensure existing tests pass. 5. Commit your changes with a descriptive message referencing the issue. output: "List all files changed and provide a summary of the implementation." frontmatter: type: object properties: filesChanged: type: array items: type: string summary: type: string required: [filesChanged, summary] reviewer: description: "Reviews code changes" goal: "You are a code reviewer. You review implementations for correctness and quality." capabilities: - code-review - static-analysis procedure: "Review the implementation against the plan. Check for bugs, edge cases, and style." output: "Approve or reject with detailed comments explaining your decision." frontmatter: type: object properties: approved: type: boolean comments: type: string required: [approved, comments] conditions: notApproved: description: "Reviewer rejected the implementation" expression: "$last('reviewer').approved = false" graph: $START: - role: "planner" condition: null prompt: "Analyze the issue described in the task and produce a detailed implementation plan." planner: - role: "developer" condition: null prompt: "Implement the plan from the planner. Write code, tests, and ensure existing tests pass." developer: - role: "reviewer" condition: null prompt: "Review the developer's implementation against the plan for correctness and quality." reviewer: - role: "developer" condition: "notApproved" prompt: "The reviewer rejected your implementation. Read their feedback and fix the issues." - role: "$END" condition: null prompt: "The review passed. Complete the workflow."