01 · The weekly walk
Every YAML file, every Monday morning.
The naming review runs once a week. For each configured repository
it lists every YAML file. Then it parses what is actually inside each file.
It reads the kind, the name and the namespace of each document.
In apps/shop/orders-api/ it finds three files. Their
names say nothing about their content.
02 · Why names matter here
Names are how related files find each other.
The convention is <kind>_<identifier>[-qualifier].yaml,
for example deployment_orders-api.yaml. It is not just
tidiness. The repository scanner groups files that share an
identifier, so it analyses a Deployment and its autoscaler in the
same context. A fix can then change both.
autoscale.yaml shares nothing with app.yaml,
so the scanner looks at them apart.
03 · Suggest the names
An AI model proposes, as a structured list.
The AI model (LLM) sees the parsed summary of every file in the directory.
It returns a list of from → to pairs. Each pair has a
confidence. The assistant drops low-confidence suggestions.
It also flags files in a flat root that belong in a
subdirectory. It flags resources of one application that have
inconsistent names. The assistant applies none of these flags yet. Every rename suggestion
must pass rule-based checks (checks in code, with no AI model).
04 · Grounded in the file, not its neighbours
Every part of the new name must come from the file itself.
The file itself must explain each token of a proposed name. A token can be a word from its current name,
a Kubernetes kind, or a word
from a metadata.name inside it. The assistant rejects a token borrowed from a
neighbouring file.
The kind prefix must also match the file's actual kind. A CloudNativePG
Cluster is not a statefulset_, however
familiar that word is.
05 · What is left alone
Some renames are not worth making, or not safe to make.
- The assistant never squeezes a file that holds several resources into a single-kind name.
- When two files would get the same new name, the assistant drops both renames. A human picks.
- The assistant finds vendored bundles (upstream install manifests) by their content and skips them.
- The assistant leaves directories without a
kustomization.yaml alone. Flux (the tool that applies git to the cluster) reads every file there anyway, so a rename is pure churn.
- A skip annotation on the file opts it out for good.
06 · One directory, one MR
Renames land together, or the directory gets worse.
Merging renames one file at a time leaves a directory half in the
old style and half in the new. So the assistant groups suggestions in the same directory
that make the same kind of change into a single
proposal. The directory is uniform the moment the MR merges.
07 · Rewrite every reference
A rename that breaks kustomize build is not a rename.
The assistant rewrites every kustomization.yaml that names the old file
in the same diff. Afterwards it parses the result again
across every reference field that kustomize knows (resources, patches,
generators and more). This proves that the old name is gone.
Sometimes a reference has a shape that the rewriter cannot edit safely, such as
a flow-style list or a generator's files: entry. Then the assistant
holds the proposal as NEEDS_REVIEW with high risk. It names the
exact reference that you must rewire by hand.
08 · The proposal
Three renames, one kustomization patch, zero content changes.
The MR moves files and edits references. It does nothing else. After you merge it,
Flux applies exactly the same objects as before. The full MR is
below.