Patch Infrastructure (Patch Mode)
Use the apply_forma MCP tool in patch mode for urgent targeted changes.
How Patch Works
Patch only applies the changes explicitly specified in the forma file. Other resources are untouched. Use this for:
- •Incident response (scaling up during traffic spikes)
- •Urgent security fixes
- •Quick configuration changes
- •Any situation where a full reconcile is inappropriate
Workflow
- •Help the user identify the resource(s) to modify
- •Create or locate a minimal forma file with only the targeted change
- •Always simulate first: call
apply_formawithmode: patch,simulate: true - •Show exactly what will change
- •Ask for explicit confirmation
- •If confirmed: call
apply_formawithmode: patch,simulate: false - •Monitor with
get_command_status - •Report results
Post-Patch Reminder
After a successful patch, always remind the user:
This patch will appear as drift until you reconcile your IaC code. When the incident is resolved, consider running
/formae-driftto incorporate this change into your codebase.
Important
- •NEVER use
pkl evalto evaluate forma files — ALWAYS useformae eval --output-consumer machine. Forma files use formae-specific extensions that only the formae CLI can resolve, and--output-consumer machineensures parseable output instead of human-formatted text. - •NEVER skip the simulation step
- •NEVER apply without user confirmation
- •Patches are for urgency. For planned changes, use
/formae-apply