Files
leleka/AGENTS.md
T
Pavlo RatushnyiandClaude Sonnet 5.5 b3274c1130
Linux / keyless-cuda-gate (push) Skipped
Rust port / port-typecheck (push) Failing after 8s
Desktop foundation / core (ubuntu-latest) (push) Failing after 11s
Rust port / port-oracles (push) Failing after 11s
Rust port / port-linux-tests (push) Failing after 14s
Rust port / port-fast (push) Failing after 9s
Linux / verify (push) Failing after 17s
Linux / keyless-cuda (push) Skipped
Linux / static-cuda-package (push) Skipped
Linux / hosted-cuda-package (push) Skipped
Linux / linux-static-cli (push) Skipped
Linux / linux-cli-container (push) Skipped
Linux / release-cli (push) Skipped
Merge claude/port-gpu-bringup (CUDA runtime port, upstream sync) into main
Brings the Rust/CUDA port of the Strata mode17 serve path together with the
CPU/iGPU/NPU gpt-oss runtime that main gained meanwhile.

Control plane: the Qwen tokenizer is the implementation behind the Qwen35
variant of codec::TextCodec (qwen(), encode_prompt() widen the trait; QwenCodec
derefs to the tokenizer), so control-token marks, images, chat template, the
runtime backend and vision keep their behavior, while the gpt-oss/Harmony path
and the worker pool keep main's. Config carries the union of fields; extra_workers
is rejected together with runtime, lazy_load, idle_unload_s and vision; the
gpt-oss family refuses top_k/min_p/penalties (its GEN line has no such keys).
leleka-kar-codec takes f16_bits_to_f32 from leleka-quant-core (identical code).
Workspace members and default-members are the union of both sides.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 08:32:33 +01:00

3.8 KiB

Repository instructions

Read PROJECT_CHARTER.md before changing architecture, performance policy, or scope. The charter is the source of truth for goals and milestones.

Priorities

  1. Preserve protocol correctness and successful task completion.
  2. Preserve model quality and tool-call integrity.
  3. Improve end-to-end agent throughput, then decode/prefill throughput.

Change rules

  • Keep production serving independent of Python. Python is allowed for offline conversion, calibration, experiments, and evaluations.
  • Keep model weights, request captures, credentials, logs, and generated artifacts out of Git. Use external volumes or ignored local paths. Sanitize any fixture committed to the repository.
  • Do not enable lossy optimizations by default until their separate quality gate passes. Mark experimental modes explicitly.
  • For non-lossy changes, compare greedy output or tensor values against the defined baseline and record numerical tolerances.
  • Do not label a change as a performance improvement without paired A/B measurements on the same workload and a quality result. Record hardware, software, model digest, configuration, cache state, token counts, and distributions as required by the charter.
  • Do not conflate a synthetic kernel gain with an end-to-end agent workload gain. Report both when relevant.
  • Keep the Strata upstream commit and local changes traceable. Do not overwrite or silently replace the upstream provenance record.

Repository state

The Strata source is present under engine/strata/ at the commit recorded in docs/upstream.md and is not modified. engine/strata is the reference (the "Original"); the product is the Rust/CUDA port of its Original mode17 serve path:

  • crates/leleka-runtime (engine: prefill, MTP speculative decode, expert tiers, KV streaming, cross-session prefix cache), crates/cuda-driver (CUDA Driver API, sealed PTX, NVML sampler), crates/leleka-memory (memory governor, pressure gate, telemetry), desktop-core and crates/runtime-client (the gRPC contract between the engine process and the gateway), control-plane (HTTP/Responses gateway), crates/deploy (the leleka binary: up/run/status/verify, memory profiles, resource presets).
  • Measured on an RTX 5090 server with real Codex CLI sessions (docs/e2e-run.md, docs/ledger.md, docs/quality-gate.md, docs/prefix-cache.md, docs/deploy.md, docs/roofline.md); the RTX 3080 laptop is a secondary, experimental target (docs/laptop-profile.md).
  • The port is complete for the 5090 serve path; open work is listed in docs/port-remaining.md and the ledger.
  • The CPU/iGPU/NPU runtime for gpt-oss (crates/cpu-*, gptoss*, harmony, igpu*, npu-*, gguf, kar-codec; docs/cpu-runtime.md) is served through the same control plane: codec::TextCodec selects the family (Qwen3.5 or gpt-oss/Harmony) and engine.extra_workers runs a worker pool (docs/worker-pool.md). The pool, lazy_load/idle_unload_s, vision and the runtime block are separate modes; the config rejects combining them (docs/api-contract.md).

Worktrees

  • Create worktrees inside the main repository's git directory, never as sibling folders of ~/work: scripts/dev/worktree.sh new <name> [<branch>] makes .git/wt/<name>. The files are ordinary; only the location is hidden from the file listing.
  • Clean up when a branch has been merged: scripts/dev/worktree.sh clean lists the clean, merged worktrees and --yes removes them. Uncommitted changes block the removal; commit them to the branch first. Do this at the end of every task that created a worktree and before starting a new batch, so no more than a handful exist at a time.
  • Build output (target/, dist/) lives in the worktree and goes with it; a removed worktree never deletes its branch.

Read engine/strata/AGENTS.md before modifying imported engine code.