CSS Primer For the AI Era

A vocabulary for shaping interfaces with AI

User Tools

Site Tools


working_with_existing_code:how_to_keep_ai_grounded_in_reality

23. When AI Invents a Convention (How to Keep the System Grounded in Reality)

How we prevent AI from fabricating rules the system never agreed to —
and bring the work back to what is real

—Part of CSS Primer for the AI Era — Working with Existing Code

AI is trained on patterns.
It sees conventions everywhere
.

So when the code resembles something common…

AI may quietly assume:

  • a naming rule exists
  • a folder structure has meaning
  • a prefix implies a pattern
  • a suffix implies a behavior
  • a file location encodes logic
  • a comment signals a standard
  • a shape implies a framework rule
  • a pattern is part of the architecture

But sometimes that is incorrect:

  • the naming is arbitrary
  • the structure is historical
  • the pattern is accidental
  • the shape is incidental
  • the file is where it is because someone was tired
  • the prefix is a leftover from a migration
  • the convention is not a convention at all

Since AI does not know this,
it invents conventions that never existed.

A mental model:

AI assumes conventions.
We confirm reality.
Collaboration is the act of grounding
the work in what is true
.

This page teaches us how to prevent AI from fabricating rules
— and how to keep the system anchored in reality.


1. How We Recognize an Invented Convention

AI has invented a convention when it:

  • claims a naming pattern has meaning when it doesn’t
  • assumes a folder structure encodes behavior
  • infers routing rules that don’t exist
  • treats a comment as a standard
  • assumes a prefix implies a pattern
  • rewrites code to “match” a convention no one follows
  • reorganizes files to fit a rule that isn’t real
  • explains a system using rules the system does not use

A simple truth:

AI can hallucinate structure
— not just facts
.


2. The First Step: Ask “Is This a Real Convention?”

We begin by questioning the assumption:

“Is this naming rule actually part of the system?”
“Is this folder structure meaningful?”
“Is this prefix intentional or historical?”
“Is this pattern real or accidental?”
“Is this behavior defined anywhere?”

A simple principle:

Reality begins with
verification
.


3. The Second Step: Name the Actual Rules of the System

AI needs to know what is real.

So, we clarify:

“This system does not use naming conventions.”
“Folder structure is arbitrary here.”
“This prefix is historical — ignore it.”
“This file location has no special meaning.”
“This pattern is not part of the architecture.”

A simpler reminder:

AI stops inventing rules when
we reveal the real ones
.


4. The Third Step: Name What Is Not a Convention

This is just as important.

We specify:

“This is not a routing rule.”
“This is not a pattern.”
“This is not a standard.”
“This is not a naming requirement.”
“This is not part of the framework.”

A simple truth:

Removing false assumptions
is part of grounding
.


5. The Fourth Step: Ask AI to Restate the Real Rules

Before continuing to implement a change,
we ask AI to summarize.

Examples:

“What conventions does this system actually use?”
“What rules are real?”
“What rules are not real?”
“What assumptions should we avoid?”

If the restatement includes invented rules,
the grounding is incomplete.

A simple principle:

Alignment becomes visible
when AI can distinguish real from imagined
.


6. The Fifth Step: Provide the Missing Context AI Needs

AI invents conventions when context is missing.

So, we provide:

  • the real architecture
  • the real naming rules
  • the real routing rules
  • the real file structure
  • the real framework behavior
  • the real constraints
  • the real history

For example:

“This system predates modern conventions.”
“This folder structure is purely organizational.”
“This naming pattern is accidental.”
“This prefix is a leftover from a migration.”
“This file is here because of a legacy loader.”

A simple truth:

Conventions live in the system’s history,
not in AI’s assumptions
.


7. The Sixth Step: Ask AI to Re‑Solve the Task Using Only the Real Rules

Once grounded, we ask AI to try again:

“Rewrite this using only the actual conventions.”
“Ignore the patterns that are not real.”
“Follow the system’s real rules, not inferred ones.”
“Stay aligned with how this system actually works.”

A simple reminder:

Grounded work is accurate work.


8. The Seventh Step: Decline and Redirect When Needed

If AI continues to invent conventions,
we decline:

“This assumes a rule that does not exist.”
“This pattern is not part of the system.”
“This convention is imagined.”
“Let’s return to the real architecture.”

A three‑line principle:

Declining is part of grounding.
Grounding is part of accuracy.
Accuracy is how we keep the system real
.


9. The Eighth Step: Shrink the Window to Remove Misleading Patterns

AI invents conventions when it sees:

  • too many similar names
  • too many similar shapes
  • too many files in a row
  • too many patterns that look intentional
  • too much noise

To prevent it,
we shrink the window of exposure to AI.

So, we:

  • show only the relevant snippet
  • remove misleading examples
  • remove accidental patterns
  • remove unrelated files
  • remove anything that suggests a rule that isn’t real

A simple principle:

When AI invents a convention,
we shrink the window
to reveal what is true
.


10. Closing Note — Reality Is the Anchor of Every System

AI sees patterns everywhere.
It assumes rules that were never written.
It invents conventions that never existed.

We keep the system grounded by:

  • questioning assumptions
  • naming real rules
  • naming what is not a rule
  • asking AI to restate
  • providing missing context
  • asking AI to re‑solve
  • declining when needed
  • shrinking the window

A closing thought:

AI assumes conventions.
We confirm reality.
That is how the system stays true to itself
.



Tony de Araujo —New York | Lisbon


working_with_existing_code/how_to_keep_ai_grounded_in_reality.txt · Last modified: by editor