python-state-failure

Detects three failure patterns where live state or transport clients escape the consistency model in Python.

Updated Jul 15, 2026
One-click install
npx skills add https://github.com/kyzobuild/kyzo-python --skill python-state-failure-kyzobuild
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: python-state-failure
Source: https://github.com/kyzobuild/kyzo-python/tree/main/cursor/skills/python-state-failure
Command: npx skills add https://github.com/kyzobuild/kyzo-python --skill python-state-failure-kyzobuild

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Python codebases using Pydantic models often misplace live state and transport clients, letting them leak into frozen value objects or sit unwired. This Skill catches three specific anti-patterns so state stays on the one node allowed to hold it: the consistency model. ## Core Features & Use Cases - Frozen live edge detection: Flags frozen=True on the consistency model, which must stay unfrozen with arbitrary_types_allowed=True to hold live clients and evolve state. - Dead handle detection: Identifies client fields on the consistency model that no verb ever touches, meaning capability is wired to nothing. - Arbitrary type off the edge detection: Catches arbitrary_types_allowed=True on any model other than the consistency model, where foreign objects or live clients do not belong. - Use Case: While reviewing a MarketSession model holding a CoinbaseClient, you notice no verb emits through the client. This Skill explains that either a verb must be modeled to use it or the field is unwired structure to remove. ## Quick Start Review my Pydantic consistency model and client fields for the frozen live edge, dead handle, and arbitrary type failure patterns.

Frequently Asked Questions about python-state-failure

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

FAQPage Schema
How do I structure live state in a Pydantic model?▼

Keep one unfrozen BaseModel per context as the consistency model, with arbitrary_types_allowed=True and clients as fields. Evolve state by re-pointing a field to a newly constructed proven fact rather than mutating in place.

Why should the consistency model not be frozen in Pydantic?▼

Freezing the consistency model contradicts its role as the one node holding live clients and accumulating mutable state. A frozen model holding no client is a concept model, a different construct wearing the same name.

When is arbitrary_types_allowed allowed in Pydantic models?▼

It is legal only on the consistency model, the one node where live clients converge. Using it elsewhere lets unmodeled foreign objects sit inside values; foreign data shapes belong in a foreign model named for the foreign thing.

What happens if a client field has no verb using it?▼

A client field no verb touches is a dead handle: capability wired to nothing. Either a verb must be modeled that emits through the client, or the field is unwired structure that belongs nowhere and should be removed.

Where should live SDK clients live in a Python domain model?▼

Live clients belong only on the consistency model, never inside frozen value objects. Foreign system data entering a value should be lifted whole into a foreign model named for the external thing.