TEHAS

pi-tehas

Tehas turns a GitHub issue into a reviewed pull request without a person driving an agent session. GitHub issues are the only control plane: you label an issue, tehas works on it, and the result comes back as a pull request and comments on that issue. A human merges. Tehas never deploys and never touches production.

All inference runs on self-hosted models, on an OpenAI-compatible endpoint the operator names. This site is the operating manual of one instance.

One instance, one product

An instance is one host serving one product repository. What differs between instances is in an instance directory: two small files, instance.env and models.json. The scripts are the same everywhere.

The examples on this site come from the instance that works on tehas itself:

Thing Value in the example
Host tehas-tehas, Unix user boss (ssh boss@tehas-tehas)
Product janit/tehas-private, default branch main
Product checkout ~/tehas/repos/tehas-private
Platform checkout ~/tehas/platform, pulled with a read-only deploy key
Settings instances/tehas-tehas/ in the platform checkout
Dashboard http://tehas-tehas:8080
Control issue 5

How an issue flows

you: write an issue with acceptance criteria
you: apply the label tehas:ready            <- the authorization to spend compute
dispatcher: picks it, labels it tehas:running
pi-rukas /work cycle, in a sandbox on the host:
    explore -> plan -> worktrees -> develop -> verify gates
    -> adversarial loop -> commit + PR -> six-pass review
dispatcher: labels it tehas:awaiting-merge, comments the PR link,
            posts token usage on the PR
you: review, click through, merge

If the cycle cannot finish, the issue gets needs-human-attention and a comment saying where it stopped.

What runs where

Where Role
The host Tehas: dispatcher, sandboxed agents, the gates, this site. One Unix user, everything under ~/tehas.
Model endpoint All model inference. The host needs no GPU; it reaches the endpoint over a private network.
GitHub The queue, the state (labels) and the results (pull requests and comments).

Levels

Level What it adds State
1. Issue to pull request Queue, cycles, gates, dashboard, live console Generic. Settings only
2. Database clones A private copy of a database per cycle or preview One product's. Off unless TEHAS_CLONES=1
3. Staging stacks and previews The product running per pull request behind fake domains One product's. Off unless TEHAS_PREVIEWS=1

Levels 2 and 3 are in this repository as one product's code, not as a shared interface. The example instance runs level 1 only. See A new project.

Start here