lamina-invariants
SolidProduct invariants �� rules that must always hold, impossible states prevented, errors defined out of existence. Use when defining what can never happen in the product.
AI & Automation 114 stars
3 forks Updated today Apache-2.0
Install
Quality Score: 82/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Invariants
Rules the product must never violate. Design so illegal states are unrepresentable — not merely error-handled after the fact.
## Verify
Each `invariants[]` id gets a probe in `/lamina-verify` — attempt violation on live product; UI must prevent or recover per linked `scenarios[]`.
**Invariants vs dependencies:** Invariants are predicates that must hold in valid states. Dependencies are reachability edges — what must exist before a workflow can succeed. Do not collapse them; use [Dependencies](../lamina-dependencies/SKILL.md) for cross-feature setup.
## Decision frameworks
- **Invariant**: A predicate that must hold for every valid system state (one hall ticket per student per exam; venue capacity not exceeded; cancelled tickets cannot be downloaded).
- When to use: Any entity with uniqueness, capacity, lifecycle, or permission constraints.
- How: Write in user language in the transactional graph `domain`; link scenarios to violation attempts.
- **Define errors out of existence**: Redesign flows so invalid actions are unavailable, not allowed-then-rejected (disable download when unpaid; hide regenerate when exam completed).
- When to use: High-frequency violations that produce support load.
- How: Match UI affordances to legal states only.
- **Illegal transitions**: State machine edges that must never occur (confirmed → draft without admin audit; issued → unissued without void record).
- When to use: Lifecycle entities (orders, tickets, bookings)...
Details
- Author
- aryaniyaps
- Repository
- aryaniyaps/lamina
- Created
- 2 months ago
- Last Updated
- today
- Language
- TypeScript
- License
- Apache-2.0
Similar Skills
Semantically similar based on skill content — not just same category
Web & Frontend Listed
lamina-evolutionary-rules
Evolving product rules safely — reversible decisions, invariant checks as features change, deferring commitment. Use when the domain will grow or requirements are uncertain.
114 Updated today
aryaniyaps AI & Automation Listed
security-invariants
Use at :architect — generates the fail-closed, defense-in-depth AGENTS.md invariants contract from the architecture's access-control model, scaled honestly to the project
0 Updated 1 weeks ago
rogerjeasy API & Backend Listed
go-domain-invariant
Domain invariants. Use when business acceptance, rejection, transitions, replay meaning, or effect order changes what states and moves are legal.
7 Updated 3 days ago
Dankosik