Metadata-Version: 2.4
Name: greenlit-ai
Version: 0.3.6
Summary: greenlit: coding agents hear about each other's plans before they edit, and ask a person only when your rules say to
License: Proprietary
Project-URL: Homepage, https://neelsck.github.io/greenlit/
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.24
Requires-Dist: httpx>=0.24
Requires-Dist: certifi
Provides-Extra: claude
Requires-Dist: anthropic; extra == "claude"
Provides-Extra: openai
Requires-Dist: openai; extra == "openai"
Provides-Extra: proxy
Requires-Dist: httpx; extra == "proxy"
Provides-Extra: prior
Requires-Dist: lightgbm>=4; extra == "prior"
Provides-Extra: all
Requires-Dist: anthropic; extra == "all"
Requires-Dist: openai; extra == "all"
Requires-Dist: httpx; extra == "all"
Requires-Dist: lightgbm>=4; extra == "all"
Requires-Dist: duckdb>=1.0; extra == "all"
Provides-Extra: report
Requires-Dist: duckdb>=1.0; extra == "report"
Requires-Dist: anthropic; extra == "report"
Requires-Dist: httpx; extra == "report"
Provides-Extra: team
Requires-Dist: httpx; extra == "team"
Provides-Extra: bugs
Requires-Dist: pytest>=7; extra == "bugs"
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: anthropic; extra == "dev"
Requires-Dist: openai; extra == "dev"
Requires-Dist: httpx; extra == "dev"
Requires-Dist: lightgbm>=4; extra == "dev"
Requires-Dist: pyarrow; extra == "dev"
Requires-Dist: duckdb>=1.0; extra == "dev"

# greenlit (`pip install greenlit-ai`, command `grlt`)

greenlit for teams running coding agents. When two agents are about to change the same thing in different ways,
greenlit tells both of them, at plan time, before either edits. It asks a person only when your repo's rules say to,
or when the agents still collide after being told.

## Quickstart

```bash
pip install greenlit-ai
cd your-repo
grlt up            # starts a team on the hosted hub, wires Claude Code in this checkout, prints an invite link
claude             # as usual
```

A teammate runs `grlt join '<invite link>'` in their own checkout (`grlt link` prints it again). On your own, a second
agent gets its own checkout and branch, already on the team:

```bash
grlt worktree ../your-repo-2 && cd ../your-repo-2 && claude
```

Every worktree of one repo is on the same team: `grlt up` in any of them joins it, no link needed.

**What your agent's changes are compared against.** `grlt up` works out the branch your work comes off (the repo's
default branch, or a long-lived one such as `dev` or `team/dev`, whichever this branch split off most recently) and
compares against the point where it split, so a teammate's work merged later never looks like yours. It prints what it
chose; `grlt base <branch>` changes it.

**goal.md (optional).** Without it, greenlit compares the agents' plans and changes. With it, agents also hold to its
decisions, and a commit that changes something on its **Don't change without asking** list after the agent was told is
held until someone approves, denies, or tells the agents to settle it, in the web app's **Needs you**. `grlt goal --init`
writes one to fill in; edits are sent to the team by themselves.

**Your repo stays clean.** greenlit writes only `.claude/settings.local.json` (Claude Code's per-checkout file) and, if
the repo doesn't commit one, `.mcp.json`, both kept out of `git status`. If the repo commits `.mcp.json`, greenlit leaves
it alone and adds its message tool to Claude Code's private settings for this checkout instead.

## Inside Claude Code

- Your agent gets greenlit's notes in its context, as facts about teammates' work.
- You see each note too: `greenlit told your agent: ...` appears in the session.
- The status line reads `greenlit · 2 agents · 1 note · nothing needs you`.

## The web app

The invite link is also the web app: **Needs you** (held commits, both sides, the rule from goal.md, approve / deny /
settle), **Map** (only the files in someone's plan, each agent's planned path, forecast crossings before any edit) and
**Threads** (one per clash: forecast, notes, holds, decision, outcome, a rating on each note).

## What leaves your laptop

The agent's plan text, file paths, changed lines and the functions around them, and the task text go to the hub.
Never your prompts, your code base or your API keys: model traffic goes from your machine to Anthropic through a local
proxy, and passes through untouched if the hub is down or slow.

## What the hub keeps, and why

- **What:** the items above, plus the notes greenlit sends, holds and decisions, and the 👍/👎 your team gives each note.
- **Where:** one log per team on the hosted hub's encrypted disk. Teams are kept apart by construction: every request is
  checked against the team's token, and the hub stores only the token's sha256. Traffic is HTTPS only.
- **Who else sees it:** the judge and the claims layer send plan and change text to Anthropic's API, under Anthropic's
  commercial terms. Nothing else is shared.
- **Why:** your team's ratings and outcomes tune greenlit for your team only: when your agents need to talk, and
  about what. Our shared model trains on public and synthetic data.
- **Opting in:** `grlt share on` lets the shared model learn from your team too, from redacted rows only: the kind
  of clash, call-graph structure, timing and ratings, with file and function names as hashes and no plan or code
  text. Off by default; `grlt share off` stops it, and `grlt share` shows the current choice.
- **Deleting it:** email the founders with your team id and we delete the team's log and backups.

## Commands

| | |
|---|---|
| `grlt up` | start a team for this repo, wire Claude Code here |
| `grlt join <link>` | join a team from your own checkout |
| `grlt worktree <dir>` | a second checkout and branch for a second agent, on the same team |
| `grlt link` | the invite link again |
| `grlt base [<branch>]` | show or set what this checkout's changes are compared against |
| `grlt demo` | watch the shop demo's catch in the web app (a replay; no agents, no cost) |
| `grlt demo --seed DIR` | make the shop repo with two checkouts, to run it with real Claude Code |
| `grlt goal --init` | write a goal.md to fill in (edits are sent to the team by themselves) |
| `grlt stats` | what greenlit did for this team |
| `grlt share [on\|off]` | opt the team in or out of training the shared model (redacted rows only) |
| `grlt down` | unwire this checkout: Claude Code's settings go back exactly as they were |
