speckit-review-types

Assesses type designs and recommends improvements for better encapsulation and stronger invariants.

1|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/payangar-dev/texlab --skill speckit-review-types-payangar-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: speckit-review-types
Source: https://github.com/payangar-dev/texlab/tree/main/.agents/skills/speckit-review-types
Command: npx skills add https://github.com/payangar-dev/texlab --skill speckit-review-types-payangar-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you evaluate and improve software type designs so their invariants are explicit, well-encapsulated, enforced consistently, and actually useful for preventing real bugs.

Core Features & Use Cases

  • Invariant Identification: Surfaces implicit and explicit constraints, state relationships, and domain rules that should be encoded in the type.
  • Encapsulation & Expression Review: Rates and justifies how well the public interface hides internals and communicates guarantees through the type structure.
  • Enforcement & Improvement Guidance: Assesses where invariants are checked (construction and mutation boundaries) and recommends pragmatic changes to make illegal states unrepresentable.

Quick Start

Ask the AI to review a specific type (or set of related types) and assess its invariants, encapsulation quality, invariant expression, usefulness, enforcement points, plus concrete recommended improvements.

Frequently Asked Questions about speckit-review-types

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

FAQPage Schema
How do I review type invariants and encapsulation in domain modeling?

To review type invariants, identify implicit constraints and domain rules encoded in types, rate how well the public interface hides internals, and assess enforcement boundaries to produce actionable guidance for preventing illegal states.

What is the best way to make illegal states unrepresentable in type-heavy architecture?

The best way to make illegal states unrepresentable is strengthening encoded invariants and enforcing constraints at construction and mutation boundaries. This ensures valid state transitions and improves static modeling correctness within your architecture.

How do I assess if my type design effectively prevents real bugs?

Assess type design by evaluating invariant usefulness for bug prevention, checking consistent enforcement at mutation boundaries, and reviewing how well the type structure communicates guarantees through its public interface expression.

How does static modeling improve type correctness and state transitions?

Static modeling improves type correctness by encoding domain rules and constraints between fields directly into the type structure, ensuring valid state transitions and preventing bugs through strong invariant enforcement and proper encapsulation.

Can I review a set of related types together for invariant enforcement?

Yes, you can review a specific type or a set of related types together. The review assesses invariants, encapsulation quality, expression, usefulness, and enforcement points across the group to provide structured ratings and concrete recommended improvements.

When should I not rely on type design for preventing domain modeling bugs?

Type design enforcement has limitations when constraints require complex runtime validation or external state verification. If invariants depend on dynamic data or cross-system consistency, static modeling alone cannot fully guarantee correctness without additional runtime checks.