Language python

From jordanhubbard/literate-ai · View interactive version

Language python is an AI agent skill from the GitHub repository jordanhubbard/literate-ai. Python source semantics. Use for Literate AI workflow tasks.

How to use this skill

Skill file

Python source semantics

Translate Python modules, public call signatures, exceptions, protocols, async behavior, and packaging conventions into evidence-backed base or Flavor proposals. Keep dynamic behavior uncertain unless separately observed.

Preserve every observable ordering and tie-break as a separate normative rule. For

Python str values compared or sorted with the default operators, state that ordering

is lexicographic by Unicode code point; do not shorten that to generic

"lexicographic" ordering. Inspect and name any key, comparison wrapper, reversal,

normalization, or locale operation that changes the domain or direction. Distinguish

the order of returned sequences from selection rules such as min or max, and cite

the exact expression plus any test evidence for each claim. If dynamic values prevent

the operand type or comparator from being established, retain the comparison domain as

a blocking uncertainty.

Recover script failure channels using Python runtime semantics as well as explicit

writes. When the admitted source does not replace sys.excepthook, redirect

sys.stderr, catch and print an exception itself, or invoke an opaque writer, an

uncaught exception is reported through the default exception hook to standard error.

If every explicit standard-output write is sequenced only after the potentially

failing call returns, state that those failures cannot emit a partial product or mix

diagnostic text with product data on standard output. Retain the channel as uncertain

when hooks, streams, native extensions, or dynamic monkey-patching can change it.

Recover missing-required-field behavior from unconditional mapping access, not only

from explicit validation branches or tests. When evidence establishes a built-in

dict, mapping[key] raises KeyError if that key is absent; if the access occurs

before result construction and no handler or default intercepts it, state explicitly

that the missing required field is rejected without returning a product result. Keep

the behavior uncertain for custom mappings or dynamic dispatch, and distinguish direct

subscription from .get, setdefault, __missing__, and caught KeyError paths.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.