principle-laziness-protocol

Guides refactoring decisions toward deletion and minimal diffs over added abstractions.

3|2|Updated Aug 28, 2026
One-click install
npx skills add https://github.com/adjohn/pstack --skill principle-laziness-protocol-adjohn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: principle-laziness-protocol
Source: https://github.com/adjohn/pstack/tree/main/skills/principle-laziness-protocol
Command: npx skills add https://github.com/adjohn/pstack --skill principle-laziness-protocol-adjohn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI-generated code tends toward over-engineering: extra abstractions, deep call chains, and signals threaded through many layers. This Skill counteracts that tendency by applying a maintainer's bias toward the smallest change that solves the problem. ## Core Features & Use Cases - Deletion-first refactoring: Prioritizes removing code over adding new code when improving a codebase. - Flat call hierarchy enforcement: Flags designs where answering a question requires tracing through more than 3 files or layers. - Decision consolidation: Detects repeated choices scattered across the code and consolidates them behind a single source of truth. - Use Case: When asked to pass a new flag through types, schemas, and pipeline layers, the Skill prompts a stop-and-reconsider check for a more direct path before writing any code. ## Quick Start Ask the agent to refactor a module while applying the laziness protocol, preferring deletions and the smallest possible diff.

Frequently Asked Questions about principle-laziness-protocol

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I avoid over-engineering when refactoring code?

Prefer deletion over addition and make the smallest change that solves the problem. Keep call hierarchies flat, consolidate repeated decisions behind one source of truth, and question any task that threads a new signal through many layers.

How to reduce diff size in a code refactor?

Look for removals before additions and avoid elegant boilerplate that adds lines without solving the problem. Fewer changed lines reduce review burden and lower the risk of introducing regressions.

When should I flatten a deep call hierarchy?

Flatten when answering a question about behavior requires tracing through more than three files or layers. A rich interface hiding substantial work is acceptable, but long chains of thin pass-through calls should be collapsed.

When is adding an abstraction the wrong choice?

An abstraction is wrong when it only passes values through, duplicates a decision already made elsewhere, or leaks a representation across layers. Small leaks compound into permanent coordination costs, so remove them early.

Does this refactoring approach work with any programming language?

Yes, the principles are language-agnostic since they operate on design decisions rather than syntax. Deletion-first thinking, flat call hierarchies, and consolidated decisions apply to any codebase regardless of stack.