Metadata-Version: 2.4
Name: leanlab
Version: 0.2.3
Summary: A self-improving lab for AI agents — evolve ML experiments against a frozen metric, or ship coding tasks through a spec → gate → review → merge loop with locked acceptance tests.
Project-URL: Homepage, https://github.com/bacharSalleh/leanlab
Project-URL: Repository, https://github.com/bacharSalleh/leanlab
Project-URL: Issues, https://github.com/bacharSalleh/leanlab/issues
Project-URL: Changelog, https://github.com/bacharSalleh/leanlab/blob/main/CHANGELOG.md
Author-email: Bashar <welcomebachar@gmail.com>
License: MIT License
        
        Copyright (c) 2026 Bashar
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: agents,claude,cli,coding-agent,evaluation,experiment,lab,llm,self-improving
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.11
Requires-Dist: questionary>=2
Requires-Dist: rich>=13
Description-Content-Type: text/markdown

# leanlab

[![PyPI](https://img.shields.io/pypi/v/leanlab.svg)](https://pypi.org/project/leanlab/)
[![CI](https://github.com/bacharSalleh/leanlab/actions/workflows/ci.yml/badge.svg)](https://github.com/bacharSalleh/leanlab/actions/workflows/ci.yml)
[![Python](https://img.shields.io/pypi/pyversions/leanlab.svg)](https://pypi.org/project/leanlab/)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

**Self-improving labs for AI agents.** Point leanlab at a task and a team of
Claude agents iterates toward a goal — evolving ML / optimization experiments
against a frozen metric, or shipping coding tasks through a
spec → gate → review → merge loop with locked acceptance tests.

## Install

```bash
pipx install leanlab        # or:  pip install leanlab   ·   uvx leanlab
```

📦 On PyPI: **[pypi.org/project/leanlab](https://pypi.org/project/leanlab/)**

Requires **Python 3.11+** and the **`claude` CLI** (the agents run on Claude Code).

## Quick start

leanlab runs **inside your own project** — each lab lives in a `.leanlab/<name>/`
folder; the engine stays in the installed tool.

**Metric lab** — evolve a number (ML, optimization, anything that prints a score):

```bash
cd ~/my-project
leanlab init iris          # describe the task; Claude drafts the lab + scorer
leanlab check iris         # verify it's wired correctly (free)
leanlab lock iris          # freeze the scorer
leanlab run iris --n 5     # the agents evolve experiments (uses Claude)
leanlab serve iris         # watch the live dashboard
```

**Coding lab** — ship a coding task with locked acceptance tests:

```bash
cd ~/my-repo                              # a git repository
leanlab spec "add a /health endpoint"    # spec-writer drafts + locks the tests
leanlab build add-health                 # engineer → gate → reviewer → merge
leanlab board                            # live board: tasks, timeline, playbook
```

## Let Claude Code drive it

```bash
cd ~/my-project && leanlab init --for-agent   # installs a Claude Code skill
```

Then just ask Claude Code — *"use leanlab to add a /health endpoint"* — and it
specs, builds, and merges through the honest test gate for you.

## Docs

- **[docs/USAGE.md](docs/USAGE.md)** — every command, in order, with examples.
- **[docs/OVERVIEW.md](docs/OVERVIEW.md)** — how it works: the loop, the two lab
  types, the coding-lab flow, and the project structure.
- **[CONTRIBUTING.md](CONTRIBUTING.md)** — local development (uv, tests, the React board).

MIT licensed — see [LICENSE](LICENSE).
