ub-mode README

The project's README from github.com/unclebob/ub-mode. As one markdown file: README.md.

ub-mode

ub-mode is an agent skill that enforces disciplined software engineering principles when writing or changing code. It is loosely based on portions of @poteto's rules (poteto-mode / pstack), reduced and paired with deterministic quality-gate tools:

  1. First Make it Work — Laziness Protocol, Foundational Thinking, TDD, Redesign From First Principles, Attack the Premise, Subtract Before You Add, Outcome-Oriented Execution, Build the Lever, and Architecture (Model the Domain, Boundary Discipline, Type System Discipline, Make Operations Idempotent, Separate Before Serializing Shared State).
  2. Then Make it Right — Fix Root Causes, Sequence Work into Verifiable Units, Test Behavior (Not Implementation), Crapper (CRAP < 10), Dryer (duplication < 0.8), Mutator (cover the uncovered, kill the survivors, delete dead code), and Refactoring.
  3. Practice — Keep a Log, Guard the Context Window, Worktree Cleanup, and Commit and Push in small ordered commits.

Companion Tool Repositories

ub-mode relies on deterministic quality-gate tools to enforce structure, complexity, duplication, and test thoroughness:

Installation

Copy SKILL.md into your agent's skills directory as ub-mode/SKILL.md (for example ~/.grok/skills/ub-mode/SKILL.md, ~/.claude/skills/ub-mode/SKILL.md, or ~/.cursor/skills/ub-mode/SKILL.md), then invoke /ub-mode.

ub-mode (unclebob/ub-mode)

best-practices
Searching Database…

What is this?ub-mode is an agent skill that enforces disciplined software engineering principles (like TDD, first-principles redesign, and architecture discipline) whenever an AI coding agent writes or changes code.
Is this a standalone app or a file I drop into my coding agent?It's a single SKILL.md file you place in your agent's skills folder, not a program you run on its own. It's loosely based on parts of @poteto's rules (poteto-mode / pstack) but reduced and paired with deterministic quality-gate tools.
Which coding agents can use it?The install paths show support for Grok, Claude (Claude Code), and Cursor, since the skill drops into each of their skills directories.
Do I need other tools to get the full quality-gate experience?For the 'Make it Right' phase to actually measure mutation coverage and CRAP scores, you need the companion repos unclebob/mutator for mutation testing and unclebob/uml-viewer to visualize coverage, CRAP, and mutation scores — ub-mode alone just enforces the rules via the agent.
What does the 'First Make it Work' phase cover?It includes the Laziness Protocol, Foundational Thinking, TDD, Redesign From First Principles, Attacking the Premise, Subtracting Before Adding, Outcome-Oriented Execution, Building the Lever, and architecture practices like domain modeling, boundary discipline, type system discipline, idempotent operations, and separating shared state before serializing it.
What does the 'Then Make it Right' phase cover?It focuses on fixing root causes, sequencing work into verifiable units, testing behavior instead of implementation, and driving the CRAP metric (0.8 similarity threshold) down until problematic code is eliminated.
Why is ub-mode based on poteto-mode?The author reduced and adapted portions of @poteto's existing rule set (poteto-mode / pstack) into a leaner version, then paired it with deterministic quality-gate tools rather than relying on the agent's judgment alone.
What is the CRAP score the skill tries to eliminate?CRAP (Change Risk Anti-Patterns) measures code complexity combined with lack of test coverage; ub-mode's quality-gate pairing targets code where this score, at a 0.8 similarity threshold, indicates risky, under-tested code.
Creator
unclebob
Size
<0.1 MB
Stars
9K
Updated
CommitNov 02
Age
1mo
Commits · 90 Days