Draft a Lampa unified diff
draft_patchGenerate unified diff hunks as text-only TODO patches for existing files, using a plan to target files. Reports missing files instead of aborting, allowing review before applying.
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); 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. |