Skills

Lean Review

CocoLean diff-scoped over-engineering audit, scans uncommitted git diff and applies...

Install

npx skills add Snowflake-Labs/cocoplus --skill lean-review -g -a claude-code -y
Category
Git and review
Updated
1mo ago
License
MIT
Context cost
Lightabout 1,326 tokens
Runs scripts
No, instructions only

What it does

CocoLean diff-scoped over-engineering audit, scans uncommitted git diff and applies five classification tags (delete/stdlib/native/yagni/shrink) to identify unnecessary surface area before commit.

Objective

You are executing $lean review, a diff-scoped over-engineering audit. Scan the uncommitted git diff and apply five CocoLean classification tags to each introduced construct. The audit is scoped to the current diff only, not the entire codebase. Feedback must be actionable at the moment of highest receptivity: before the commit.

Before proceeding, verify that .cocoplus/ exists. If not, output: "CocoPlus is not initialized. Run $pod init first." Then stop.

Step 1, Run Deterministic Diff Scanner

invoke cocolean/lean-review-engine

The script reads git diff (unstaged and staged changes), applies AST-level pattern matching, and outputs a JSON finding list. Read the JSON output.

If no uncommitted changes exist, output: "No uncommitted changes found. $lean review operates on the current diff, stage or modify files first." Then stop.

Step 2, Classify Findings by Tag

Apply the five CocoLean classification tags in severity order:

Tier 1, Existence-level (surface first):

  • delete, Code with no callers, no tests, and no declared future use in spec.md or discuss.md. It should not exist yet. Severity: blocking if it touches a trust boundary; important otherwise.

  • yagni, Abstractions, configuration flags, extension points, or generalization layers added speculatively for requirements not in the current spec. "You Aren't Gonna Need It." Severity: nit if no security risk; important if it expands the attack surface or adds untested code paths.

Tier 2, Correctness-level (surface second):

  • stdlib, Logic that reimplements functionality already present in Snowflake built-in functions or standard SQL. Include the specific replacement construct in the finding. Severity: important.
Read the whole SKILL.md on GitHub

More in Git and review