# graftpy

> Graftable Python: a catalog of small, self-contained functions that can be either
> pip-installed or copied file-by-file into any project. Every function is one file,
> stdlib-only (or one declared dependency), fully typed, and never imports a sibling —
> so a single file can be lifted with zero untangling. Designed to be readable and
> reusable by humans and AI coding agents alike.

## Discovery
- [catalog.json](catalog.json): machine-readable index — name, category, import path, signature, summary, tags, file path for every function.
- [INDEX.md](INDEX.md): the same catalog, human-readable and grouped by category.

## Using functions
- [README.md](README.md): the two ways to use graftpy (install, or graft a single file) and the "lift, not DRY" principle.
- CLI: `python -m graftpy list | search <q> | show <name>` — `show` prints a function's verbatim, self-contained source.

## Guarantees and standards
- [AGENTS.md](AGENTS.md): how an AI agent should find, use, and contribute functions.
- [CONTRIBUTING.md](CONTRIBUTING.md): the quality bar every function must pass (self-contained, typed, docstring + runnable example, one function per file).
- Enforcement: `tools/check_liftability.py` proves no function imports a sibling; `tools/run_doctests.py` verifies every example; `tools/gen_catalog.py --check` keeps the index in sync.
