core/state-integrity

Enforces canonical Redux state ownership and eliminates duplicated actions, selectors, and sagas.

6|6|Updated Jun 29, 2026
One-click install
npx skills add https://github.com/intent-hq/cloudlands-fe --skill core-state-integrity-intent-hq
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: core/state-integrity
Source: https://github.com/intent-hq/cloudlands-fe/tree/main/.agents/skills/themis/core/state-integrity
Command: npx skills add https://github.com/intent-hq/cloudlands-fe --skill core-state-integrity-intent-hq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Redux codebases often accumulate duplicated entity storage, reducer-maintained derived values, and multiple owners for the same action types, selectors, or saga watchers, causing race conditions and inconsistent state. This Skill provides hard MUST/NEVER rules, a preflight search protocol, and an automated architecture gate to keep every domain fact in exactly one canonical place. ## Core Features & Use Cases - Canonical state modeling: Enforces Collection<T, K> entity storage with id references instead of duplicated entity objects across slices. - Derived data in selectors: Requires counts, filters, sorted lists, and selected entities to be computed in selectors rather than stored in reducers. - Ownership deduplication: Guarantees one canonical owner per action type, selector, saga watcher, and saga registration, verified with grep/rg search protocols. - Architecture gate workflow: Integrates npm run validate:architecture (or ESLint with the composed domain config) as a pre-handoff enforcement step with documented ignore-comment exceptions. - Use Case: Before adding a selectedTodo field to a todos slice, run the preflight searches, discover the canonical selector pattern, store only selectedTodoId, derive the object in a selector, and attach gate output to the handoff. ## Quick Start Ask the AI to review your Redux slice changes for duplicate state, actions, selectors, and sagas using the state integrity rules before handoff.

Frequently Asked Questions about core/state-integrity

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

FAQPage Schema
How do I avoid duplicate state in Redux slices?▼

Store each domain fact in exactly one canonical place using Collection<T, K> for entities with ids, and keep only id references when one slice points at records owned by another slice. Derive counts, filters, and selected entities in selectors instead of storing them in reducers.

How to enforce single ownership of Redux actions and selectors?▼

Assign one canonical owner file for each action type string, selector implementation, saga watcher, and saga registration. Before creating new ones, search with grep or ripgrep for existing owners and import or compose them instead of defining parallel implementations.

Should derived values like filtered lists be stored in Redux state?▼

No, derived values such as filteredItems, activeCount, hasUnread, or selectedItem should never be reducer-maintained fields. Compute them in selectors from canonical state so there is a single source of truth and no synchronization risk.

How do I run the Redux architecture validation gate?▼

Run npm run validate:architecture inside the repository before handoff when changes touch Redux state, actions, selectors, or sagas. In a consuming app, run ESLint with the composed domain root config imported from @augmentcode/themis/eslint-plugins.

When is it acceptable to disable architecture lint rules?▼

Only for reviewed false positives or intentional temporary exceptions, using rule-specific ignore comments with a documented reason, such as a compatibility alias during migration or a persisted API snapshot. Broad ignores or missing reasons should be rejected by verifiers.