I’ve been building VK Auth (an idiomatic Go Identity & Access Management engine) for around a decade. Recently, I retrofitted the entire codebase onto our ibe-workflow-template (first introduced on this forum) — combining Jake’s ICM principles, Karpathy’s Claude rules, and Vigil Keep’s Intent-Based Engineering (IBE). It wasn’t smooth sailing out of the gate, and solving the biggest failure mode taught me a lesson worth sharing here. 🏊♂️ The Failure Mode: Swimming Halfway Across the River When migrating core architectures, the AI kept suffering from context confusion and mechanic fixation. The hardest problem was moving from single atomic writes on the authorization tree to a phased write mechanism that never violates invariants (yielding atomic writes in the best case and eventual consistency in the worst). Because this mechanism has irreducible complexity—the entire structure has to be in place before any of it works—the AI would get halfway through the refactor, lose its footing when intermediate checks failed, get disoriented, and swim right back to the shore it started from by reverting to the old architecture. 🛠️ The Fix: A 3-Way Resolution Mechanism (No Looping) To stop the agent from thrashing or reverting at the implementation layer, I enforced a strict three-step resolution ladder with zero looping: 1. Forward Drive: Intent → Decisions (ADRs) → Design / Specs → Implementation 2. Backward Validation: Implementation is validated directly against Intent. When something breaks, feedback walks backwards up the ladder to the first rung capable of answering it: - Can't solve it in Implementation? There is a gap in Design / Specs. - Can't solve it in Design / Specs? There is a gap in Decisions (e.g., missing trade-off priority between performance and consistency). - Can't solve it in Decisions? You have conflicting or non-resolvable Intents. 3. Forward Remediation: Once the gap is patched at the right rung, execution drives back down to Implementation and concludes. If it still fails, it stops and mandates human intervention—no endless agent loops burning context.