Evaluate code for unnecessary complexity, over-engineering, and opportunities for simplification.
Analyzes code for unnecessary complexity and proposes simpler alternatives following YAGNI and KISS principles.
/plugin marketplace add KreativReason/merged-end-to-end-ai-dpp---e2e-cli/plugin install kreativreason-e2e-pipeline@kreativreason-marketplaceEvaluate code for unnecessary complexity, over-engineering, and opportunities for simplification.
| Principle | Description |
|---|---|
| YAGNI | You Aren't Gonna Need It |
| KISS | Keep It Simple, Stupid |
| Minimal | Solve current problem only |
| Readable | Code as documentation |
| Deletable | Easy to remove when obsolete |
| Parameter | Required | Description |
|---|---|---|
target | Yes | PR number, file paths, or branch name |
- [ ] Abstractions with single implementation
- [ ] Factories creating one type
- [ ] Generic code used once
- [ ] Future-proofing for hypothetical cases
- [ ] Configuration for things that won't change
- [ ] Frameworks where functions suffice
- [ ] Deep nesting (>3 levels)
- [ ] Long functions (>50 lines)
- [ ] Many parameters (>4)
- [ ] Comments explaining complex logic
- [ ] Helper functions called once
- [ ] Unnecessary inheritance
{
"artifact_type": "simplicity_review",
"status": "simple|complex|over_engineered",
"data": {
"target": "PR #123",
"reviewed_at": "ISO-8601",
"complexity_score": 7,
"summary": {
"over_engineered": 2,
"unnecessary": 1,
"could_simplify": 3,
"appropriately_simple": 15
},
"findings": [
{
"id": "SIMP-001",
"type": "over_engineered",
"title": "AbstractFactory for Single Product Type",
"file": "src/factories/user_factory.py",
"lines": "1-45",
"current_code": "class AbstractUserFactory(ABC):\n @abstractmethod\n def create_user(self)...",
"description": "Full factory pattern for creating users, but only one user type exists",
"simpler_alternative": "def create_user(data: dict) -> User:\n return User(**data)",
"lines_saved": 38,
"justification_check": "Are multiple user types planned? If not, delete the factory."
},
{
"id": "SIMP-002",
"type": "could_simplify",
"title": "Nested Conditionals",
"file": "src/services/validator.py",
"lines": "23-45",
"current_code": "if a:\n if b:\n if c:\n return True",
"simpler_alternative": "if a and b and c:\n return True",
"readability_improvement": "high"
}
],
"questions_for_author": [
"Line 15: This config option is never used - can we remove it?",
"Line 78: UserService has 12 methods - should this be split?",
"Line 120: Why abstract class instead of simple function?"
],
"praise": [
"Clean separation in auth module",
"Good use of early returns in validation"
]
}
}
BEFORE: Abstract class + interface + factory + 1 implementation
AFTER: Single function
BEFORE: if/if/if/return
AFTER: Early returns or guard clauses
BEFORE: Configurable everything
AFTER: Hardcode what won't change, refactor when needed
BEFORE: Commented code, unused imports, TODO functions
AFTER: Gone (git remembers)
| Score | Interpretation |
|---|---|
| 1-3 | Minimal and clean |
| 4-6 | Appropriate complexity |
| 7-8 | Review for simplification |
| 9-10 | Likely over-engineered |
Before approving, ask:
Simplicity findings create discussion todos:
todos/SIMP-001-discussion-simplify-user-factory.md
You are an elite AI agent architect specializing in crafting high-performance agent configurations. Your expertise lies in translating user requirements into precisely-tuned agent specifications that maximize effectiveness and reliability.