check-invariants

Verify Go codebase adherence to documented architectural invariants.

4|1|Updated Dec 7, 2025
One-click install
npx skills add https://github.com/cacack/my-family --skill check-invariants
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: check-invariants
Source: https://github.com/cacack/my-family/tree/main/.claude/skills/check-invariants
Command: npx skills add https://github.com/cacack/my-family --skill check-invariants

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Architectural drift between documented invariants and actual code leads to brittle systems; this skill spot-checks and flags mismatches to maintain architectural integrity.

Core Features & Use Cases

  • Invariant coverage: Verifies key invariants across modules (EventStore interfaces, domain entities, projections) to prevent regression.
  • Traceability: Maps invariants to code locations and tests for easy remediation.
  • Use Case: When planning refactors, run checks to ensure invariants remain satisfied.

Quick Start

Run the invariant check against the repository to verify architectural constraints are upheld.

Frequently Asked Questions about check-invariants

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

FAQPage Schema
How do I verify architectural invariants against a Go codebase?

To verify architectural invariants in Go, statically analyze interfaces and types across EventStore, domain entities, and projections to check for adherence to documented constraints. This process flags mismatches and maps them to code locations for remediation.

What is architectural drift and how do I prevent it during refactoring?

Architectural drift occurs when documented invariants and actual code misalign, leading to brittle systems. Prevent it by running static invariant checks during refactors and code reviews to spot-check for mismatches and maintain architectural integrity.

Can I check architectural invariants in CI for Go projects?

Yes, you can run invariant checks in CI to verify architectural constraints are upheld. The checker performs static analysis of Go interfaces and types, reporting gaps as actionable findings to prevent regression across modules.

How do I trace documented invariants to specific code and tests?

Trace invariants to code locations and tests by mapping documented constraints against the actual codebase structure. This traceability highlights exactly where EventStore, domain entities, or projections fail to adhere, providing easy remediation paths.

What's the best way to validate ARCHITECTURAL-INVARIANTS.md compliance?

Validate compliance by running an invariant check against the repository to ensure alignment with ARCHITECTURAL-INVARIANTS.md. It statically analyzes Go types to verify key invariants across modules and reports gaps as actionable findings.