
Justify
Audit AI-assisted diffs for additive bias and Iron Law compliance before you commit or open a PR.
Overview
Justify is an agent skill most often used in Ship review (also Build wrap-up) that audits diffs for additive bias and requires Iron Law justification before merge.
Install
npx skills add https://github.com/athola/claude-night-market --skill justifyWhat is this skill?
- Compares AI default behaviors (workarounds, shims, try/catch) against root-cause fixes
- Requires explicit justification for each change pattern before merge
- Designed for post-implementation and pre-commit audit workflows
- Pairs with proof-of-work and additive-bias-defense dependencies in the Night Market stack
- Iron Law framing: simplest fix that solves the problem is safest to merge
- Documented additive-bias comparison table with six AI-default vs correct-behavior rows
- Estimated ~2800 tokens per run in skill metadata
Adoption & trust: 1 installs on skills.sh; 304 GitHub stars; 3/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
What problem does it solve?
AI-assisted implementations tend to add workarounds and compatibility layers instead of removing the need for extra code.
Who is it for?
Builders who just finished an AI-assisted feature and want a deliberate audit before commit or PR creation.
Skip if: Greenfield brainstorming with no diff yet, or teams that only want stylistic review without change-justification rules.
When should I use this skill?
After completing implementation work, before committing or creating PRs, when reviewing your own changes for quality, or when scope-guard flags scope issues.
What do I get? / Deliverables
Each change is justified against additive-bias patterns so you merge the smallest correct fix and avoid shipping unnecessary layers.
- Per-change justification audit against additive-bias patterns
- Merge-ready assessment aligned with proof-of-work expectations
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
The skill is framed as pre-merge and pre-commit audit, so Ship review is the canonical shelf even though it runs right after Build work. Change justification and anti-additive-bias auditing are review activities, not implementation tasks.
Where it fits
After the agent finishes a bugfix, run Justify to ensure it removed the bad branch instead of adding a rescue wrapper.
Before opening a PR, audit the full diff for shim and test-expectation edits that mask implementation bugs.
Catch broad error swallowing added instead of validating inputs at the trust boundary.
When iterating on hotfixes, require justification so operational patches do not accumulate permanent workarounds.
How it compares
Complements checklist code review by targeting AI-specific additive bias, not general style or coverage alone.
Common Questions / FAQ
Who is justify for?
Solo and small-team developers using Claude Night Market-style workflows who merge AI-written code and need anti-additive-bias discipline.
When should I use justify?
After completing implementation, before committing or opening PRs, when reviewing your own changes, or when scope-guard flags scope creep—spanning late Build and Ship review.
Is justify safe to install?
It reviews your changes locally; confirm dependency skills and review the Security Audits panel on this Prism page before enabling in sensitive repos.
Workflow Chain
Requires first: imbue proof of work, leyline additive bias defense
SKILL.md
READMESKILL.md - Justify
> The simplest change that fixes the problem is the > safest change to merge. > Adding code is easy. Removing the need for code is > engineering. # Justify ## The Additive Bias Problem AI models are trained to be helpful, which creates a systematic bias toward *adding* code rather than *fixing* root causes: | AI Default Behavior | Correct Behavior | |---------------------|------------------| | Add a workaround | Fix the root cause | | Modify test expectations | Fix the implementation | | Create a new helper | Use an existing one | | Add error handling | Prevent the error | | Add a compatibility shim | Remove the old code | | Wrap in try/catch | Fix the exception source | This skill audits changes for these patterns and requires explicit justification for each. ## When to Use - After completing implementation work - Before committing or creating PRs - When reviewing your own changes for quality - When scope-guard flags RED/YELLOW zone ## Audit Protocol ### Step 1: Gather the Delta ```bash # Determine base branch base=$(git merge-base master HEAD 2>/dev/null \ || git merge-base main HEAD 2>/dev/null) # Get change statistics git diff "$base" --stat git diff "$base" --shortstat git diff "$base" --diff-filter=A --name-only # new files git diff "$base" --diff-filter=M --name-only # modified files git diff "$base" --diff-filter=D --name-only # deleted files ``` ### Step 2: Compute Additive Bias Score Score each dimension 0-3 (0 = clean, 3 = high bias): | Signal | Weight | How to Measure | |--------|--------|----------------| | Line ratio | 2x | `additions / max(deletions, 1)` | | New files | 2x | Count of `--diff-filter=A` | | Test logic changes | 3x | Test assertion/expectation diffs | | New abstractions | 1x | New classes, functions, modules | | Workaround patterns | 2x | Try/catch, if/else guards added | **Line Ratio Scoring:** | Ratio | Score | Interpretation | |-------|-------|----------------| | < 2:1 | 0 | Balanced change | | 2:1 to 5:1 | 1 | Mildly additive | | 5:1 to 10:1 | 2 | Additive bias likely | | > 10:1 | 3 | Strong additive bias | **Aggregate Score:** ``` bias_score = sum(signal_score * weight) / sum(weights) ``` | Aggregate | Zone | Action | |-----------|------|--------| | 0.0 - 0.5 | GREEN | Proceed | | 0.5 - 1.5 | YELLOW | Justify each signal | | 1.5 - 2.5 | RED | Rethink approach | | 2.5+ | STOP | Likely wrong approach | ### Step 3: Iron Law Compliance Check The Iron Law states: tests drive implementation, not the other way around. Check for violations: ```bash # Find test files that were modified git diff "$base" --name-only | rg "test_|_test\.|spec\." \ || git diff "$base" --name-only | grep -E "test_|_test\.|spec\." # For each modified test file, check what changed git diff "$base" -- <test_file> | rg "^[-+].*assert|^[-+].*expect|^[-+].*should" ``` **Violation patterns (test logic was tampered):** - Assertion values changed (expected output modified) - Test cases removed or commented out - `@skip` or `@pytest.mark.skip` added - Error expectations weakened (broad exception types) - Mock return values changed to match new behavior - Test renamed to no longer describe original behavior **Each violation requires explicit justification:** > "I changed this test assertion because the > *requirement* changed, not because my implementation > couldn't meet the original requirement." If the requirement didn't change, the test should