AI does not learn your business. It rents your memory until the context window collapses.

I spent several weeks building schemas with AI on smaller projects. The pattern is consistent: describe a problem, the AI suggests a table, you iterate. Past the 20-minute mark, something breaks. Despite claims of 1.5M+ token windows, performance drops past roughly 100K tokens. The model forgets a constraint. It drops a primary key. It introduces a variable that contradicts the core logic from 40 minutes earlier. Google’s Gemini behaves the same way once you move from a front-loaded context into a long rolling chat.


The Mechanism of Failure

The problem is context rot.

In a complex ERP covering attendance, sites, guard rotations, and invoices, the foundation must be exact. One schema error breaks every downstream application that depends on it. Letting AI manage the evolution of that foundation while holding the entire conversation history in its context window is the wrong setup. The scope is too wide. The context degrades. The outputs stop matching the constraints you set at the start.

AI performs when its scope is tight and the context is validated. It fails when it has to remember everything at once.


The Sharding Defense (BMAD-METHOD)

I fixed this by switching to the BMAD-METHOD, a spec-first workflow built around sharding.

Instead of one long chat history that slowly degrades, I split the project into small, static documents. I built an initial PRD and a project brief using the BMAD structure and locked them both before writing a single line of application logic. Each new phase starts with a fresh session. The AI sees only the shard it needs for that phase. The context stays small. The outputs match the spec.

I did not adopt the full workflow at once. I constrained the surface area from day one, knowing the system would need corrections at every step.


Avoid Context Rot

Audit your current AI sessions. If a single project has been running for more than 20 minutes, stop.

Extract the full logic into a static markdown file using this prompt:

Provide a complete report of everything established in this conversation. The output must contain all assumptions, constraints, structures, and decisions so a new AI instance can continue without loss.

Start a fresh session. Feed only that file as context and proceed. No rolling memory. No narrative drift.