UB Mode is an open-source AI coding agent skill developed by Robert C. Martin to enforce disciplined software engineering practices. It organizes development into two stages: first making code work, then improving its design and quality. The skill encourages test-driven development, clear domain modeling, and solving problems from first principles. It instructs agents to fix root causes rather than applying superficial patches. Companion tools measure cyclomatic complexity, test coverage, structural duplication, and mutation testing effectiveness. Developers can use these checks to identify fragile code and insufficient tests. The workflow also emphasizes small verifiable changes, context management, refactoring, and orderly Git commits. UB Mode integrates with compatible coding assistants through a reusable skill file.
Features
- Test-Driven Development and Incremental Implementation
- Root Cause Analysis and First-Principles Design
- Cyclomatic Complexity and CRAP Score Enforcement
- Structural Code Duplication Detection
- Mutation Testing and Behavioral Test Verification
- Agent Workflow Discipline and Incremental Git Commits