Draft a Lampa unified diff
draft_patchGenerates suggested unified diffs for requested changes to existing files, returning them as text without writing the repository. Use it to review patch hunks before applying edits manually.
Instructions
Returns TODO unified diffs as text only — does not write the repository.
Best with plan_context pasted from plan_change; unlike plan_change, this invents concrete diff hunks; unlike scaffold_plugin, it patches existing files rather than emitting new-plugin boilerplate.
target_files, when given, fully overrides inference (the two are never combined) and is capped at the first 5 entries for diff generation even if more are passed (the 'Target files' summary section still lists up to 6); without it, up to 5 files are inferred from request alone, which is weaker than passing plan_context's target list explicitly.
Missing files get a 'File not found' note instead of aborting the whole call; the @@ hunks are suggested, not guaranteed to apply — always re-check against read_source before applying by hand.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes | The change to implement. | |
| plan_context | No | Optional paste of plan_change output. Recommended; the tool still runs without it. | |
| target_files | No | Repo-relative files to patch. If omitted, up to 5 files are inferred from request (weaker than plan_context). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| markdown | Yes | Human-readable markdown report. Always present, including empty-result cases. Does not write files. |