speckit-review-types

Analyzes type designs for invariants and encapsulation quality in code reviews, refactoring, and API design tasks.

9|4|Updated May 13, 2025
One-click install
npx skills add https://github.com/opsmill/infrahub-mcp --skill speckit-review-types
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: speckit-review-types
Source: https://github.com/opsmill/infrahub-mcp/tree/main/.agents/skills/speckit-review-types
Command: npx skills add https://github.com/opsmill/infrahub-mcp --skill speckit-review-types

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams examine type designs to ensure robust invariants and proper encapsulation, preventing subtle bugs.

Core Features & Use Cases

  • Identify explicit and implicit invariants within a type design and assess their strength.
  • Evaluate encapsulation boundaries and mutability risks.
  • Provide concrete improvement recommendations and justification.
  • Suitable for code reviews, refactoring, and API design decisions.

Quick Start

Analyze a target type by applying the invariants and encapsulation checklist to produce actionable feedback.

Frequently Asked Questions about speckit-review-types

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

FAQPage Schema
How do I identify invariants in type design during a code review?

To identify invariants in type design during a code review, analyze explicit and implicit type guarantees to assess their strength and evaluate encapsulation boundaries to prevent mutability risks and subtle bugs.

What is the best way to enforce encapsulation and prevent mutability risks in API design?

The best way to enforce encapsulation in API design is to evaluate mutability risks and boundaries, providing concrete improvement recommendations that enforce compile-time guarantees and document invariants clearly to prevent subtle bugs.

How does static analysis help evaluate type design invariants for refactoring?

Static analysis helps evaluate type design invariants for refactoring by identifying explicit and implicit guarantees within the architecture, assessing their strength, and producing actionable feedback to ensure robust encapsulation boundaries.

Can I use this approach to improve compile-time guarantees in my architecture?

Yes, you can improve compile-time guarantees in your architecture by applying a targeted invariants and encapsulation checklist to your type designs, enforcing constraints directly in the code structure and documenting them clearly.

When should I assess encapsulation boundaries and mutability risks in my codebase?

You should assess encapsulation boundaries and mutability risks during code reviews, API design decisions, and refactoring tasks to ensure type designs maintain robust invariants and prevent subtle bugs from escalating.