python-wiring-failure

Detects misplaced Python plumbing code outside route files and composition roots.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Python codebases accumulate free-floating functions and unclaimed helper classes that escape their licensed architectural homes, making behavior hard to trace and maintain. This Skill flags wiring anti-patterns before they are written. ## Core Features & Use Cases - Module-level function detection: Identifies top-level def statements outside route files and the composition root, redirecting the logic to derivations or verbs on models. - Unclaimed class detection: Flags classes and private helpers that no ontology row claims, requiring their behavior to be placed on a model first. - Use Case: While writing a normalize(x) helper function in a random module, the Skill fires and guides you to define it as a derivation on the value whose fields imply the normalized fact. ## Quick Start Review this Python module and tell me whether any functions or classes violate the wiring architecture rules.

Frequently Asked Questions about python-wiring-failure

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

FAQPage Schema
Where should module-level functions live in Python architecture?▼

Module-level functions are licensed only in route files and the composition root. A route handles transport ingress with one construction, one dispatch, and one reply; the composition root is the single main() wiring config, clients, bindings, and routes.

How do I fix a standalone helper function in Python?▼

A standalone function computing from a model's fields is a derivation escaped from its owner. Name the computed fact as a derivation on the value whose fields imply it, and the procedure is absorbed into the construction the derivation returns.

What is an unclaimed class in a Python codebase?▼

An unclaimed class is one in a file that no row of the ontology catalog claims as its home. Either place a row in the ontology that homes the class, or move its behavior onto a model as a derivation or verb.

When should a private helper class be avoided in Python?▼

A private helper carrying behavior signals a derivation or verb that has not found its model. Instead of writing the helper, place the behavior on the model whose state or fields the helper operates on.

What is the composition root pattern in Python?▼

The composition root is the single main() function that wires together config, clients, bindings, the consistency model, and routes. It is one of only two file kinds licensed to hold module-level functions.