ecc-type-design-analyzer

Review type designs for encapsulation, invariant expression, usefulness, and enforcement.

Updated Apr 18, 2025
One-click install
npx skills add https://github.com/adriancodes/dotfiles --skill ecc-type-design-analyzer-adriancodes
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ecc-type-design-analyzer
Source: https://github.com/adriancodes/dotfiles/tree/main/dot_agents/skills/ecc-type-design-analyzer
Command: npx skills add https://github.com/adriancodes/dotfiles --skill ecc-type-design-analyzer-adriancodes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases often contain types that allow invalid states to be represented, leading to runtime bugs that could have been prevented at compile time. This Skill performs a static, read-only review of type designs to determine whether they make illegal states harder or impossible to represent. ## Core Features & Use Cases - Four-Dimension Evaluation: Assesses each type on encapsulation, invariant expression, invariant usefulness, and enforcement by the type system. - Evidence-Based Findings: Reports only actionable defects tied to a file, line, triggering condition, and observable impact, with concrete invalid-state examples instead of numeric scores. - Read-Only Review Boundary: Never edits files, executes code, or connects to databases; it checks callers and existing tests before reporting a gap. - Use Case: During a code review of a pull request introducing a new Order type, use this Skill to verify that states like "shipped but unpaid" are prevented at the type level rather than guarded only by runtime checks. ## Quick Start Ask the AI to review the type design of the types changed in this diff for encapsulation and invariant enforcement.

Frequently Asked Questions about ecc-type-design-analyzer

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

FAQPage Schema
How do I review whether a type design prevents invalid states?▼

Review the type against four dimensions: encapsulation, invariant expression, invariant usefulness, and enforcement. For each type, produce a concrete invalid-state example showing whether the type system prevents it or whether escape hatches allow it.

What does a type design analyzer check during code review?▼

It checks whether internal details are hidden, whether invariants can be violated from outside, whether types encode business rules, whether the invariants prevent real bugs, and whether the type system enforces them without easy escape hatches.

Does this review execute code or run tests?▼

No. The review is strictly static and read-only. It does not edit files, execute project code or tests, or connect to databases; it asks the caller for a diff or runtime evidence when tools cannot obtain it.

What output does a type design review produce?▼

For each type reviewed, it reports the type name and location, evidence across the four dimensions with a concrete invalid-state example, an overall assessment, and specific improvement suggestions tied to file and line.

When is a type design review not the right approach?▼

It is not suited for verifying runtime behavior, performance, or test coverage, since it performs no execution. It also avoids reporting unverified hypotheses and does not manufacture findings when a review area cannot be assessed.