Field note 2 of 5
Prompts suggest. Code enforces.
What Repo Explainer taught me about where AI rules belong.
Early versions of Repo Explainer kept making the same mistakes. The model reported its own reading limits as bugs in the code. It claimed projects had no tests when it simply hadn't seen them. It judged example code as if it were the real product.
I fixed the prompt, and it improved. Then it drifted back. A prompt is a request, and under enough pressure the model treats it like one.
So I moved the rules that mattered out of the prompt and into the server:
- The AI can pick which files to read, but the server keeps only paths that really exist.
- Anything that looks like a key or password is masked before code reaches the AI.
- Usage limits are checked before any AI call, not after.
None of those depend on the model choosing to cooperate.
That's the principle I build on now. The prompt shapes how the model writes. The code decides what it is allowed to see, say and spend. You can watch one request move through those checks, with the real code, in the Architecture section.