Luxe

Development

Building, testing, and seeing what reaches the model.

# Build everything
cargo build --workspace --all-targets

# Run tests
cargo nextest run --workspace

# Check clippy
cargo clippy --workspace --all-targets -- -D warnings

# Format check
cargo fmt --all --check

# Supply-chain check
cargo deny check

# Build and run the whole suite *for Windows*, from Linux, in about twenty seconds
scripts/win-check.sh

That last one is worth knowing about. It cross-compiles with cargo-xwin, runs under wine, and puts nothing on PATH but MinGit — which is stricter than the GitHub runner, where Git’s usr/bin means sh, bash and grep are all quietly available and a whole class of failure never appears. Needs clang-cl, lld-link, wine, and cargo install cargo-xwin.

Seeing exactly what goes to the model

Prompt size is the main driver of cost and of how long you wait for the first token, and the expensive failure is invisible: providers cache by prefix, so one changed byte in the system prompt silently re-bills everything after it. LUXE_WIRE_LOG records the traffic; luxe wire measures it.

LUXE_WIRE_LOG=/tmp/wire.jsonl luxe --headless -p "what does src/main.rs do?"
luxe wire /tmp/wire.jsonl            # the audit
luxe wire /tmp/wire.jsonl --tools    # ...with a per-tool schema breakdown

The log is JSONL: one record per request (the exact body, with credential headers redacted) and one per response (text, tool calls, usage, stop reason, and an arrival timeline). It is local, append-only, and off unless the variable is set.

The report answers, in order: is anything wrong (prefix churn, fixed-overhead share), where do the characters go (system prompt per ## section, tool schemas, conversation — sized in characters and in tokens calibrated from the run’s own reported usage), does the cacheable prefix stay identical between turns (naming the first changed byte when it doesn’t), is anything sent twice, did text arrive incrementally, and did a credential leak.

# Wire audit

⚠ 97% of the last request is fixed overhead (tools + system), not conversation

call    req ch    prompt   cached   output  first ms total ms
1        66288     17123        0       51      3263     4092
2        66635     17196        0        6       240      291

## Cache prefix stability

  #1 → #2: stable

Running your own build

The commands above all build the debug profile. If you keep a luxe on your PATH pointing at target/release/luxe so you can use Luxe on real work, remember that nothing rebuilds release for you — a change can pass the whole gate and still be missing from the binary you launch:

scripts/install-dev.sh            # build release, point ~/.local/bin/luxe at it
scripts/install-dev.sh --gate     # ...only after fmt/clippy/tests pass