How we evaluate AI’s ideas with clarity, structure,
and architectural intent
—Part of CSS Primer for the AI Era — Working with Existing Code
AI is generous with refactoring suggestions.
Sometimes it offers small improvements.
Sometimes it proposes sweeping changes.
Sometimes it invents patterns that look modern
but do not belong in our system.
Our task is not to accept everything or reject everything.
Our task is to discern —
to understand 'which suggestions strengthen the system'
and which ones quietly weaken it.
A simple mental model:
AI proposes.
We decide.
Architecture is the space between the two.
This page teaches us how to evaluate AI’s refactoring suggestions with calm judgment and structural awareness.
AI does not know:
So, when AI suggests a refactor,
it is not responding to the system —
it is responding to the snippet.
A quiet truth:
AI optimizes locally.
We must think globally.
A 'refactor' is worth considering when it:
If a suggestion makes the structure clearer,
it is usually safe.
If it makes the structure clever, novel, or unfamiliar,
we pause.
A simple principle:
Clarity is the measure.
Not novelty.
We choose what strengthens the system.
AI often invents names:
card_sectionheader_title-textcontent-wrappermain-container
These names may be reasonable,
but they may not match our vocabulary.
We accept a 'refactor' only if:
If not, we adjust the names or decline the refactor.
A simple reminder:
Naming is architecture.
AI does not know our language
unless we teach it.
AI sometimes proposes structural changes that alter:
So, we check whether the refactor:
If the behavior changes unintentionally,
we decline.
A simple truth:
A refactor that changes behavior
is not a refactor —
it is a redesign.
We look for signs of risk:
If a refactor increases fragility,
we decline.
A simple rule:
If the risk is unclear,
the answer is no.
AI sometimes refactors
simply because it can.
So, we ask:
If the answer is “no,”
we decline.
A quiet reminder:
Refactoring is not decoration.
It is purpose.
When we accept a refactor, we:
For example:
“We accepted the structural simplification. We kept the original naming. Please continue using this pattern.”
This teaches AI what “good” looks like.
A simple principle:
Every accepted refactor
becomes part of the system’s future.
When we decline a refactor, we explain why:
“This changes the component’s behavior.”
“This naming does not match our vocabulary.”
“This adds unnecessary nesting.”
“This introduces risk without solving a problem.”
“This pattern does not exist in our system.”
This prevents AI from repeating the same suggestion later.
A simple truth:
Declining a refactor
is part of teaching the system.
AI can propose endlessly.
We choose intentionally.
— We accept what strengthens the system.
— We decline what weakens it.
— We refine what needs clarity.
— We narrate what needs understanding.
A quiet closing thought:
AI offers possibilities.
We shape them into architecture.
That is the heart of collaboration.
Tony de Araujo —New York | Lisbon