chore: add stack-review and explain-diff skills
This commit is contained in:
1 parent
812d1ba1c5
commit
9a884acc22
2 files changed
+68
No files matched your search
@@ -0,0 +1,39 @@
|
||||
---
|
||||
name: stack-review
|
||||
description: Read-only review of one Pulumi stack in this repo against Pulumi best practices. Reports ranked findings with doc links and makes no edits.
|
||||
argument-hint: <stack directory, e.g. 03-k8s-infra>
|
||||
disable-model-invocation: true
|
||||
---
|
||||
|
||||
Review the stack in `$ARGUMENTS`. If no stack was given, ask which one. Review one stack per run.
|
||||
|
||||
This is a review for someone who wants to understand their own code better, and who will decide what to change. Do not edit any file, and do not run anything against the cluster or the Pulumi backend.
|
||||
|
||||
## Steps
|
||||
|
||||
1. Read the stack's `CLAUDE.md`, `index.ts`, `package.json`, `tsconfig.json` and `Pulumi.yaml`, plus its workflow in `.gitea/workflows/`.
|
||||
2. Load the `pulumi:pulumi-best-practices` skill and check the code against it.
|
||||
3. Run `npm run typecheck` in the stack directory and include the result.
|
||||
4. Check each candidate finding against the code before reporting it. Drop anything you cannot point to a line for.
|
||||
|
||||
## What to look for
|
||||
|
||||
- Correctness: `Output<T>` misuse, missing `dependsOn` or `parent`, resources that would be replaced by a rename, secrets that lose their secret marking.
|
||||
- Changes that are dangerous to apply here: anything that forces a replace of a VM, a PVC, or a resource adopted with `import`.
|
||||
- Repetition that hides differences (near-identical blocks that differ in one argument).
|
||||
- Drift between the stack's `CLAUDE.md` and what the code does.
|
||||
- Dependency versions that lag the other stacks.
|
||||
|
||||
Skip style preferences and anything the compiler already enforces.
|
||||
|
||||
## Report format
|
||||
|
||||
Rank findings by consequence, most serious first, and stop at eight. For each:
|
||||
|
||||
- **What**: one sentence, with a `file:line` link.
|
||||
- **Why it matters here**: the concrete consequence in this homelab, not the general rule.
|
||||
- **Source**: a link to the official Pulumi, Kubernetes or provider documentation that supports it. If you have no source, say it is your own judgement.
|
||||
- **Confidence**: high, medium or low, and what would raise it.
|
||||
- **Size of fix**: one line, a small refactor, or a change that touches live resources.
|
||||
|
||||
End with the two findings you would start with and why. Do not offer to implement them.
|
||||
Reference in new issue
Block a user