Generate patch
generate_patchConvert concrete file edits into a guaranteed-valid unified diff for apply_patch. Omit edits to receive a generation brief with file context and edit format.
Instructions
Turn concrete edits into a guaranteed-valid unified diff that apply_patch can consume. If edits is omitted, returns a generation brief (relevant file contents + the exact edit format to use) so you can produce the edits. Does not write to disk. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan | No | Optional plan text for context. | |
| edits | No | Concrete edits to turn into a unified diff. Omit to get a generation brief instead. | |
| risks | No | Known risks of this patch. | |
| confidence | No | Your confidence in these edits. | |
| projectPath | Yes | Absolute path to the project root. | |
| relevantFiles | No | Files to include as context when no edits are supplied yet. | |
| taskDescription | Yes | What the patch should accomplish. |