name: sigit-code
description: Engineering reference for siGit Code, the public Rust CLI / ACP coding agent (getsigit/sigit), and how it connects to the smbCloud ecosystem (accounts, siGit Code Cloud). Use when working on the sigit codebase, its inference backends, account commands, or coordinating a change across sigit / sigit-si / onde-cloud. The repo is public; see AGENTS.md for what must not go in it.
siGit Code
siGit Code is the coding agent: a Rust CLI (sigit, repo getsigit/sigit) that
runs over ACP in editors like Zed and as an interactive terminal TUI. The repo is
public, keep secrets, provider names, and strategy out of it (see
AGENTS.md).
It is the engine for the whole family: the hosted chat (siGit Code Cloud)
runs the same agent against cloud inference, and the autonomous siGit Code Cloud
Agent (planning) runs it headless in a sandbox to open pull requests. sigit.si
is Git hosting; code.sigit.si is the home of siGit Code. Full product map:
docs/product/product-overview.md.
Codebase map (sigit/src)
main.rs: entry point. Routes to the account subcommands (login/logout/whoami), the interactive TUI (when stdin is a tty), or the ACP server (when stdin is piped). Holds the system prompt.chat.rs: the terminal TUI and the agent's tool-call loop.backend.rs: theInferenceBackendtrait with two implementations:LocalBackend(on-device via theondecrate'sChatEngine) andOpenAiBackend(any OpenAI-compatible HTTP endpoint). Uses neutralToolSpec/ToolCall/ToolResult/TurnResulttypes so the loop does not depend on a specific backend.provider.rs: backend selection and quality tiers. Precedence: an explicit override (OPENAI_BASE_URL+OPENAI_API_KEY, or~/.config/sigit/providers.toml), then siGit Code Cloud when logged in, then on-device.account.rs: account core against the account API, surfaced as the/login,/logout,/whoamislash commands (both TUI and ACP).credentials.rs: the local session-token store.tools.rs: tool implementations and their JSON schemas.models.rs,setup.rs: local model picker and HuggingFace cache setup.
Inference backends
The agent loop talks to Arc<dyn InferenceBackend> and never to a concrete
engine. LocalBackend runs fully on-device. OpenAiBackend handles the cloud
tier and any bring-your-own endpoint. is_remote() lets the UI label the active
backend correctly.
For the hosted product (auth, tiers, and the onde-cloud API), see the
sigit-code-cloud skill. For the on-device ChatEngine API itself, see the
ai-assisted-coding skill in the public sigit repo. For the protocol, see its
agent-client-protocol skill.
Account and cloud integration
siGit Code authenticates through sigit.si and uses the returned session token
for siGit Code Cloud requests. Keep the account command request/response shapes
in sync with the desktop client (sigit-app) and the smbcloud-auth skill;
those shapes are a shared contract.
Building and testing
cargo build, cargo test, cargo clippy. Interactive (TUI) mode is Unix-only
because it redirects file descriptors to keep logs out of the display.
Public-repo discipline
Anything written into sigit is world-readable. Keep comments technical, humanize
prose (no AI-writing tells), and never name an upstream provider or expose
secrets or strategy. The reasoning that belongs with a change usually goes in a
private skill here, not in a public code comment. See AGENTS.md.
Cross-references
sigit-code-cloud(this repo): the hosted chat product (siGit Code Cloud).sigit-code-cloud-agent(this repo): the autonomous task -> PR product (planning).smbcloud-auth(this repo): the auth service.ai-assisted-coding(sigit repo): theondeChatEngineAPI.agent-client-protocol(sigit repo): ACP.branding(sigit repo): the case-sensitive names.