Metadata-Version: 2.4
Name: yieldskill
Version: 0.1.33
Summary: Build portable, resumable skill workflows in Python.
Author: OperatorStack
Maintainer: Boateng Opoku-Yeboah
License-Expression: MIT
Project-URL: Homepage, https://yield.operatorstack.systems/
Project-URL: Documentation, https://yield.operatorstack.systems/docs/
Project-URL: Repository, https://github.com/operatorstack/yield
Project-URL: Issues, https://github.com/operatorstack/yield/issues
Keywords: coding agents,skills,workflows
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# yieldskill — Yield skill workflow SDK for Python

The Python implementation of the yield.v1 SDK execution contract (see
`ir/README.md`). The import name is `yieldskill` because `yield` is a
Python keyword.

Create a virtual environment before installation:

```bash
# macOS and Linux
python3 -m venv .venv
source .venv/bin/activate
python -m pip install yieldskill
```

```powershell
# Windows PowerShell
py -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install yieldskill
```

[Public PyPI releases](https://pypi.org/project/yieldskill/) use trusted
publishing. Every wheel contains the matching Yield runtime for its platform.

The launcher preserves the selected Python environment for `RunCommand`, even
when an adapter starts that interpreter without activating the environment.

```python
from yieldskill import define_skill

def program(ctx):
    answer = ctx.ask_user("confirm-start", "Ready to start?")
    if answer != "yes":
        ctx.refused("user declined to start")
    tests = ctx.run_command("run-tests", "true", timeout_seconds=60)
    ctx.require(tests.exit_code == 0, "the test command passes", tests)
    return {"status": "ok"}

define_skill(program)
```

Declare the runner in the skill's `skill.json`:

```json
{ "run": ["python3", "main.py"] }
```

Programs must be deterministic between yields — same journal, same
operations, every execution. Clocks, RNGs, and filesystem reads are side
effects: cross them through a yielded operation or leave them out.
