Luna TUI

A software factory for one person

Turn your tickets into the PR you'd have shipped.

A board in your terminal that runs a software factory. Agents work in sealed containers; you keep the final say.

  • Runs 100% local
  • You keep the final say
Ticketissue
Repoworktree
Factorypacks
a1f3c9e
PRready

How it works

From ticket to PR, you at every gate.

  1. 01

    Approve the plan

    Triage reads the repo and writes a brief, criteria and slices. Send it back with a reason, or answer its questions.

  2. 02

    Approve the tests

    Failing tests exist before any code, then they're locked. The implementer can add tests, never change these.

  3. 03

    Approve the ship

    Green CI on a draft PR, the evidence verdict and the retro's proposed rules. Then it's yours to merge.

One machine, every repo

Same machine. A new PR for every repo.

One board, one queue, up to four tasks at once. The repo decides the checks, the tests and the PR.

Stage runs across every repo

Same machine

  1. Ticket · web

    acme/storefront

    #43 Login error copy

    becomes the pull request

    fix(auth): clear login error copy

    PR · #128
    • Next.js
    • Playwright
    • e2e
  2. Ticket · api

    acme/billing-api

    #39 Totals ignore quantity

    becomes the pull request

    fix(cart): totals respect quantity

    PR · #211
    • Go
    • PostgreSQL
    • unit
  3. Ticket · cli

    acme/sync-cli

    #46 Retry on 429 in sync job

    becomes the pull request

    feat(sync): retry on 429 with backoff

    PR · #57
    • Node
    • Vitest
    • CLI

Fictional repos and tickets.

Your GitHub

Issues in. Pull requests out.

Label an issue ready-for-agent and it lands on the board. When the work is done, it comes back as a PR that closes it.

  • Issues become tickets

    The machine polls the repos you list. A labelled issue becomes a ticket in Intake, its checklist becomes the criteria.

  • A draft PR, early

    Deliver pushes the task branch and opens a draft PR as soon as the build is green, so CI starts while you look.

  • CI watched, not hoped

    A red run goes to the ci_watch pack: fixable loops back to Build, a flake re-runs once, infra escalates to you.

  • Closes #N

    The PR body keeps one shape: what changed, why, the criteria, and the issue it closes.

Your board

The board says where. The factory says what.

Columns follow task state, so a ticket is always where its work is. Open as many boards as you like; they all see one machine.

  • Columns follow state

    Eight columns from Intake to Done, driven by the machine. No dragging a card to pretend work moved.

  • One key per gate

    a does the obvious next step, r sends back with a reason, X aborts, f opens the stage's watch pane.

  • Watch any stage

    Each running stage gets a herdr tab that follows its container. Look over the agent's shoulder whenever you want.

  • Offline is a state

    Stop the machine and the board turns red with the reason, keeps running, and reconnects on its own.

Example

Every PR has evidence.

Hover or tap a line of the PR to see the runs behind it.

Summary

fix(cart): totals respect item quantity

acme/billing-api · #211

Draft → Ready

Cart totals summed each line's unit price once, ignoring quantity. Closes #39.

Show the evidence for this line

Checks: test, lint, typecheck, e2e, CI

Stage run

Test design · attempt 1

Mar 3, 2026

Every commit is on the task branch.

100%

Acceptance

Ship gate: #39

Met

  • Quantity counts
  • Discounts apply per line
  • Empty cart is $0.00
  • No float drift

Out of scope

  • Currency format
  • Tax

Fictional repo, ticket and PR.

Details

Built for you and the agent.

  • Sealed containers

    Read-only root filesystem, a tmpfs /tmp, no-new-privileges. The worktree is read-only unless the stage writes.

    read-only · tmpfs /tmp · no-new-privileges
  • Tools per stage

    Each pack carries its own allowlist. Triage can't write; the reviewer can't run your suite; nobody opens a PR from inside.

    triage: readbuild: editreview: readleast privilege
  • Locked tests

    Change or delete a test that existed when the stage started and the commit is undone, the stage fails, and the next attempt is told why.

    b72d0aatest(cart): lock quantity, discount and empty-cart totals

  • Outward actions ask

    Tracker writes, review posts, publishing: never done from inside a container. They come back to the board as requests.

    • Push task branch
    • Open draft PR
    • Post a review comment: asks you
  • One machine, many repos

    Up to four tasks drive a stage at once across every repo. The rest queue in Postgres and survive a restart.

    webapicli4 slots
  • Graded end to end

    pnpm golden drives a seeded bug through every gate. The nightly matrix grades suite, stages, evidence, cost and diff size.

    golden --matrix≥ 80% to pass

Test-first Build

Build writes the failing tests first.

Before any code, Build writes one failing test per approved scenario. A judge checks that each test fails for the right reason.

  • One test per scenario

    Each approved scenario gets one failing test. The test carries the scenario's id.

  • A judge reads each failure

    The judge checks that the test fails because the behaviour is missing. A test with a bug of its own does not pass.

  • Locked before code

    Luna commits the tests first. The implementer then builds until they pass and cannot change them.

  • Docs-only changes

    A change that touches only documentation gets no tests. Luna checks it by reading it.

Stacked cards and splits

Big tickets split into stacked cards.

Luna splits a big ticket into parts that build on each other. Each part is its own card with its own PR.

  • A split, not a pile

    A big ticket becomes an origin and its children. Each child builds on its parent, the part before it.

  • A child follows its parent

    Luna keeps each child rebased onto its parent. When the parent moves, Luna rebases again and pushes with a lease.

  • Conflicts ask you

    A rebase that stops on a conflict pushes nothing. The card comes back to you.

Engines and fallbacks

Pick the engine. Keep the fallback.

Claude runs on your subscription and Codex on your Codex login. Jev is an opt-in metered path.

  • Claude

    Claude runs on your subscription. Luna uses the login you already have.

  • Codex

    Codex runs on your Codex login. Small decisions such as risk and red checks can use it.

  • Jev

    Jev is an opt-in metered path. It stays off until you add a key.

  • A fallback for each decision

    A decision moves to its fallback engine when a login is busy or rate-limited.

The factory · inside every stage

The factory does the work. Luna runs the floor.

Each agent stage is a stage pack that runs in a sealed container on Claude or Codex. Its role, prompt, skills and guardrails live in the repo's factory/ folder. A fresh clone runs with nothing else to install. Luna moves the ticket; the pack writes the code.

  • Packs, not prompts

    Triage, code map, plan, test design, build, verify, e2e, CI watch, evidence and the retro each run a pack with a typed result; small checks (signals, risk, coverage, red, scope) are decision packs.

  • Built from the checkout, so it's repeatable

    The stage image is built from the checkout and tagged with a key over its inputs. Same inputs, same image, same behaviour.

  • Guardrails as code

    In-process hooks: no push, no PR or tracker writes, commits only on task branches, no writes outside the worktree and the output folder. Outward actions are queued for you to approve on the board.

~/acme/billing-api · luna
  1. > pnpm start
  2. ⏺ machine · 127.0.0.1:4317 · 2/4 slots
  3. ⎿ #39 implementing · pack implementing as implementer (attempt 1)
  4. ⎿ slice 1/2 committed a1f3c9e · locked tests 3/3 green
  5. ✓ verifying · suite 142/142 · lint · typecheck · review pack

Set it up in 4 commands

Clone, install, link the board, then one command builds the stage images and starts Postgres and the machine in Docker. No account, no server to babysit.

  1. git clone https://github.com/HigorAlves/luna-tui && cd luna-tui
  2. pnpm install
  3. pnpm board:build && herdr plugin link ./board
  4. MACHINE_GITHUB_POLL=you/repo pnpm start

What it runs

  • triage

    Reads the ticket, its signals and the repo; records what it is and picks plan, fast lane, reply or archive, or asks.

  • plan

    Plans the change and designs its tests, then checks coverage, fit and risk. One approval by default. A repo can ask for more on High risk, and a passed council can let the timer approve when one approver is enough.

  • test_design

    Writes the failing tests first. They're locked once you approve.

  • implementing

    Builds the change slice by slice, one commit each, on the task branch.

  • verifying

    Reviews the diff after your suite, lint and typecheck pass on the host.

  • e2e

    Drives the app in a browser for repos with a web surface; saves screenshots and video.

  • ci_watch

    Reads a red CI run and decides: fixable, flake, infra or needs-debug.

  • evidence

    Checks the QA manifest and puts the verdict and artifacts on the ship gate.

  • reviewing_memory

    After shipping, proposes rules for the repo's agent context. You keep or skip them.

Needs Docker, Node 24+, pnpm, Rust and a Claude token in ~/.config/hardness. A Codex login from `codex login` adds the Codex engines. Without a Claude token, stages that need Claude stay stubs.

Full setup guide

Sandbox and safety

Sandbox and safety on every stage.

Each stage runs in a container with a per-repository egress allow-list. Most agents reach only their engine. Planning stages also reach GitHub. Only the writable build, verify, e2e, recording and setup stages reach package registries and the hosts you add.

  • A container per stage

    Each stage runs in its own throwaway container with a read-only root filesystem.

  • An egress allow-list per repository

    Each repository adds hosts to the defaults: registries, GitHub and the engine hosts. Every other host has no route out, unless the owner sets MACHINE_EGRESS to off.

  • Secret checks

    Every change gets secret checks before it ships.

  • No AI credit

    Luna ships commits never credited to an AI. A hook rejects AI attribution in a commit.

Pricing

Free. Bring the subscriptions you already have.

Luna runs locally on the Claude and Codex subscriptions you already have. Metered API keys are optional.

  • Board only

    $0The whole pipeline, every gate, on stub stages.
    • Every state and gate
    • No credential needed
    • No stage images
    Run with stubs
  • Board + agents

    Recommended
    $0+ your ClaudeReal stage packs in sealed containers.
    • Triage, tests, build and verify
    • Draft PRs and CI watch
    • Your Claude and Codex logins
    • Cost tracked per stage
    Install
  • Agents + QA

    $0+ 2 GBBrowser QA for repos with a web surface.
    • Playwright with Chromium
    • Screenshots and video evidence
    • One extra runner image
    Build the QA image

Metered keys are optional. Your subscriptions bill as they do today, and the machine reports cost per stage at /metrics.

FAQ

Common questions

What people usually ask before pointing it at a repo.

Your next ticket deserves a PR with proof.

Install the board and watch the golden task ship in minutes.