ワンクリックで
code-review-simplicity
Simplicity code review lens for identifying unnecessary complexity, dead code, and maintainability issues.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Simplicity code review lens for identifying unnecessary complexity, dead code, and maintainability issues.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
pi-ensemble's bundled vipune memory doctrine — full reference for using the vipune CLI as a project-scoped semantic memory store. Encodes the 5-type memory taxonomy (fact, preference, procedure, guard, observation), the active/candidate status split as the long-term/short-term mechanism, freshness verification before acting on recalled memories, conflict handling via --supersedes, periodic consolidation reflexes, the hard prohibition on storing secrets, and pi-ensemble-specific framing (multi-agent shared DB, session autosave). Use this skill whenever starting a project task; before delegating work; before making architectural decisions; after task completion; when the user mentions "remember"/"recall"/"vipune"; when surprised by codebase reality vs recalled memory; or when encountering a known-feeling pitfall. Project-scoped, semantic-search-driven; designed to make every session smarter than the last without context bloat or memory rot.
REST and GraphQL API design with versioning, authentication, and OpenAPI documentation. Use when designing API endpoints, request/response formats, or API architecture. Do NOT use for implementation in specific languages.
Architecture code review lens for assessing design quality, coupling, cohesion, and structural integrity.
Error-handling and resilience code review lens for catching silent failures, unbounded I/O, swallowed exceptions, and partial-failure pitfalls.
Performance code review lens for identifying bottlenecks, inefficient algorithms, and resource waste.
Security-focused code review lens for identifying vulnerabilities, injection risks, auth flaws, and unsafe patterns.
| name | code-review-simplicity |
| description | Simplicity code review lens for identifying unnecessary complexity, dead code, and maintainability issues. |
Specialized agent for simplicity analysis during code review. Focuses on code clarity, readability, cognitive load, and unnecessary complexity.
When PM explicitly dispatches this lens:
Do NOT broaden into:
All findings must follow this structure:
## Must Fix
- [CRITICAL|HIGH] [path:line] Title
- Description: What is wrong and why it matters
- Suggestion: Specific fix with code example
- Metadata: cross_lens_candidate=true/false, tradeoff_required=true/false
## Observations
- [MEDIUM|LOW] [path:line] Title
- Description: Informational finding
- Metadata: cross_lens_candidate=true/false, tradeoff_required=true/false
## Summary
[One paragraph overall assessment]
When reporting findings, always include:
cross_lens_candidate: Indicates this finding might also be relevant to other lenses
true if this finding could trigger other lens checks (e.g., complex function might also be performance or architecture issue)false if this is purely a simplicity concerntradeoff_required: Indicates if fixing this requires accepting a tradeoff
true if the fix involves performance, flexibility, or conciseness tradeoffsfalse if the fix improves simplicity without downsidesReadability and Clarity
Cognitive Load
Unnecessary Complexity
Colliding or Redundant Bounds
Code Duplication
Documentation and Comments
Naming Conventions
Testing and Debugging
## Must Fix
- [HIGH] [src/utils/format.ts:45] Nested ternary operator unreadable
- Description: Four-level nested ternary requires tracing multiple paths to understand logic
- Suggestion: Extract to named function with early returns or switch statement
- Metadata: cross_lens_candidate=true, tradeoff_required=false
MANDATORY enumeration — part of the return format, not optional.
Before returning any verdict other than BLOCKED, you MUST include a section titled ## Bound-range enumeration in your review output. The section must contain, for each variable whose transformation was modified or whose bounds were changed in the diff, a table or list with these columns:
You must compute the outputs numerically, showing the intermediate steps (floor application, formula evaluation, cap application). Rough/approximate numbers are acceptable if the exact formula is complex, but the three outputs per category must be distinct enough to verify collapse or non-collapse.
If the ## Bound-range enumeration section is absent or incomplete, the review is invalid and verdict MUST be BLOCKED with reason "bound-range enumeration section missing or incomplete".
If any category's three outputs are identical, verdict MUST be ISSUES_FOUND or CRITICAL_ISSUES_FOUND — never APPROVED. Do not describe the collapse as "symmetric by design", "clearer intent", or "intentional cap"; identical outputs for distinct inputs = range collapse = dead-range logic, and the lens is required to flag it regardless of author intent.
For scoring/calculation diffs, this requirement applies to every variable whose transformation was touched. A review that enumerates one variable but skips others in the same diff is also incomplete — return BLOCKED.
For non-scoring diffs (pure readability changes, rename-only changes, comment-only changes), this section may be marked "N/A — no variable transformations in this diff" with one sentence justifying why no enumeration applies.
Cross-line interactions within a single file are in scope for this lens; line-by-line reasoning is insufficient when the diff touches shared constants or bounds. For any diff that modifies a constant, a lookup branch, or a bound-applying expression, trace the full control flow end-to-end for at least one input per distinct branch of any lookup or case statement that was added or modified.
This lens is part of the six-pass code review protocol. Findings are merged with other lenses via deterministic synthesis: