Designing AI Coding Rules And Learning Loops