Architecture-As-Memory LogoARCHITECTURE-AS-MEMORY
v1.0.4

High-Velocity AI Anti-Patterns

When autonomous code-generation loops operate without a centralized cognition model, repositories rapidly decay into standard failure patterns. Here is how to diagnose them:

1. Helper Explosion (Flat File Proliferation)

Because AI agents search context windows for utility files and often fail to find them in deep hierarchies, they choose the path of least resistance: generating a fresh helper script in the immediate directory.

text
auth-service/
├── auth-helper-final.js
├── auth-helper-final-fixed.js
├── auth-token-utils.js
└── auth-token-utils-new.js

Under AAM, features must map to a single immutable boundary ID (FEAT-AUTHENTICATION), ensuring any utility generated is contextually anchored to the feature contract rather than flat directories.

2. Context Collapse

When a developer prompts an AI assistant with a broad instruction (*"Add email logging"*), the agent lacks an architectural map. It silently couples the ingestion pipeline directly to the SMTP transport layer, bypassing domain isolation.

The Result of Context CollapseA spaghetti boundary where a simple helper change triggers massive downstream test failures across unrelated systems because dependencies were tightly coupled behind the scenes.

3. Repo Map Overload

Providing LLMs with flat list trees of 400 source files leads to context dilution. The model spends tokens reading import paths and file names instead of high-level business logic relationships, resulting in slower, lower-quality code generations.