Reduced Principles Mode
Applies three ordered coding rules: make it work, make it right, then follow practice.
Install
npx skills add unclebob/ub-mode --skill ub-mode -g -a claude-code -y- Repository
- unclebob/ub-mode6.2k
- Category
- Engineering
- Updated
- 10d ago
- License
- See repository
- Context cost
- Lightabout 924 tokens
- Runs scripts
- No, instructions only
What it does
Follow the reduced principles when writing or changing code. Every change follows First Make it Work, then Then Make it Right, then Follow Practice. Use when the user runs /ub-mode or asks for the reduced principles.
ub-mode
Every time you are asked to make a change follow:
- First Make it Work.
- Then Make it Right.
- Follow Practice
First Make it Work
Laziness Protocol
- One decision lives in one place.
- Ship the smallest edit that solves the problem.
Foundational Thinking
- Get the data shape right before you write the logic.
- Do first whatever helps every later phase.
- If a concurrent writer would matter, do not share state.
TDD
- Write the failing test before you change the code.
- See it fail for the reason you expect.
- Make the smallest change that makes it pass.
- If an honest test is impractical, do not write a bad one.
Redesign From First Principles
- Do not bolt a new requirement onto the old design.
- Ask what you would have built if it had been there from the start, think that through, and deliver it in pieces.
Attack the Premise
- When two fixes that share one premise fail the same gate, write that premise in one sentence and count which actors hold the imbalance.
- Remove the assignment.
- Do not start another fix until you have done that.
Subtract Before You Add
- Take complexity out before you add anything.
Outcome-Oriented Execution
- Aim at the end state you can check.
- A break in the middle is allowed when you planned it and can undo it.
Build the Lever
- If the work is not obvious at a glance, build the tool that does it.
- Do one unit by hand, then make the tool match that unit.
Architecture
Model the Domain
- Put the domain in a structure that makes the illegal states impossible.
- Maintain a glossary of domain terms.
- If the code is already clear and local, leave it.
Boundary Discipline
- Check the data where it enters.
- Inside, trust it.
- Keep the business logic in a pure function.
Type System Discipline
- Make the illegal value impossible to write.
- Parse outside data once, where it comes in.
- Do not silence the compiler.
