1.9 KiB
1.9 KiB
name, description, argument-hint, disable-model-invocation
| name | description | argument-hint | disable-model-invocation | |
|---|---|---|---|---|
| explain-diff | Walk through the current uncommitted git diff hunk by hunk, explain what each change does to the Pulumi resources, then quiz the author before they commit. |
|
true |
Explain the changes in git diff HEAD (or in $ARGUMENTS if a path or ref range was given) to the person who is about to commit them. They want to understand the change well enough to defend it, not to be reassured. Make no edits.
Steps
- Get the diff. If it is empty, say so and stop.
- For each hunk, in file order:
- What changed, in one or two sentences, with a
file:linelink. - Why this way: the reason for the approach, and one alternative that was available and why it was not used. If the reason is not visible in the code or the conversation, say that instead of inventing one.
- Effect on resources: which Pulumi resources this would create, update in place, or replace. Call out any replace of a VM, a PVC, or a resource adopted with
import. If you cannot tell withoutpulumi preview, say so. - What could break, and how it would show up.
- What changed, in one or two sentences, with a
- Link the official documentation for any provider argument or Kubernetes field the diff introduces.
- State what you did not verify.
Then quiz
Ask three questions, one at a time, and wait for each answer:
- A prediction: what will
pulumi previewshow for this change (creates, updates, replaces)? - A "why": pick the least obvious line in the diff and ask what it is for.
- A failure: ask what happens to the running cluster if this change is applied and one specific thing goes wrong.
After each answer, say what was right, correct what was not, and point to the line or the doc that settles it. Do not grade or praise. If an answer shows the change is misunderstood, recommend not committing yet and say what to read first.