# Stoic > Stoic is a small, free, open-source spec language for AI coding agents. The compiler reads your spec back in English, a lock freezes the tests, and verify holds every change to them. To set a repository up with Stoic, start at [Start with an agent](https://stoic-lang.org/docs/start-with-an-agent.md): one prompt that installs Stoic (macOS and Linux: `curl -LsSf https://stoic-lang.org/install.sh | sh`; Windows, in PowerShell: `powershell -c "irm https://stoic-lang.org/install.ps1 | iex"`; Homebrew: `brew install stoic-lang/tap/stoic`; Cargo: `cargo install stoic-lang`; until the first release is published, `cargo install --git https://github.com/stoic-lang/stoic stoic-lang`), runs `stoic init` and `stoic gate --install all git`, writes the spec first, has the user confirm the compiler's reading of it, then locks it and runs the loop until `stoic verify --strict` passes. Stoic is a compiler and toolchain (one Rust binary, `stoic`, from the crate `stoic-lang`, for macOS, Linux and Windows). The loop: write a .stoic spec; `stoic FILE` reads it back in English; `stoic lock` freezes the tests it defines into stoic.lock; `stoic brief` prints the exact instructions for an implementing agent; the tests report results (`pass ID = observed value`) and `stoic verify results.txt --strict` checks them against the lock. If you are an agent working in a project that uses Stoic: run `stoic brief ` (with `--as ` when a stoic.segments file sits beside the lock), follow it exactly, never edit .stoic files or stoic.lock, record `dispute ID: why` for a test that looks wrong, and finish with the verify command the brief gives. When verify fails, its last line (`next: …`) names the one next step; if it says Stop, report the DRIFT and VALUE lines and wait rather than relock. If you own a segment, `stoic review results.txt --as ` lists what waits for you (changes, disputes, WRONG tests) and settles it with `--approve`, `--reject` or `--accept-observed ID`. Spec first: when a hook or `stoic gate PATH` refuses a write of implementation code (exit 2), do what its `next:` line says. One of three must hold: the ticket's spec change is locked (if you own the spec, make it: edit, `stoic check`, relock; if you implement a brief, report that it's missing); a locked test fails in results.txt (run the tests), so the code is being brought to the spec; or the ticket changes no behaviour, declared with `stoic gate --refactor "WHY"`. Specs, tests and docs may always be written. An `UNSPECIFIED` line from `stoic verify --coverage` is changed code no locked test runs: specify it in the spec (after review) or remove it. `stoic guide --skill` prints an Agent Skill that teaches this loop; `stoic gate --install skill` installs it. Every page below is available as Markdown at the linked URL. ## Docs - [The loop](https://stoic-lang.org/docs/index.md): Install Stoic, write a spec, hear it read back, lock it, hand it to an agent and verify the result. Four minutes, five verbs. - [Start with an agent](https://stoic-lang.org/docs/start-with-an-agent.md): One prompt to paste into any coding agent. It installs Stoic, wires the gate into the agent's tools, writes the spec first, and runs the loop until verify passes. - [The glyphs](https://stoic-lang.org/docs/glyphs.md): Stoic has no keywords. It has seventeen glyphs, each with one job. Here is every one, with an example the compiler reads back. - [Everywhere](https://stoic-lang.org/docs/everywhere.md): The same pieces describe interfaces, databases, infrastructure, pipelines, modules and stacks. One language for everything an agent touches. - [Tests](https://stoic-lang.org/docs/tests.md): Examples, test elements, checked values and givens. How Stoic turns a spec into tests that report what they saw, and why every rule needs a witness. - [Lock and verify](https://stoic-lang.org/docs/lock-and-verify.md): stoic lock freezes the tests and the spec; stoic verify holds every change to them, and with --coverage every changed line of code. Every verdict it can give, and how to gate CI with it. - [Agents](https://stoic-lang.org/docs/agents.md): Briefs, roles, the gate that keeps the spec first, the agent skill, reporters, disputes, owner review and several agents on one codebase. How Stoic turns an AI coding agent's judgement into a contract the toolchain checks. - [Writing a spec](https://stoic-lang.org/docs/writing.md): The short guide to writing a good Stoic spec quickly: the loop, the shape that works for code modules, how many tests to write, and how to change a spec later. - [Reference](https://stoic-lang.org/docs/reference.md): The whole Stoic language and toolchain in one page: every command, the syntax, the grammar, tests, locking, results and verifying. ## About - [Prose doesn't bind](https://stoic-lang.org/why.md): Why Stoic exists. Agents read our intentions as prose, and prose can't refuse anything. An argument for specifications that the toolchain, not the model, holds. - [Supporting Stoic](https://stoic-lang.org/support.md): Stoic is free and open source, and it will stay that way. A short note on the work behind it, what support would make possible, and how to help today. ## Optional - [Everything in one file](https://stoic-lang.org/llms-full.txt): every docs page above, concatenated. - [Source](https://github.com/stoic-lang/stoic): the compiler, the language server and editor integrations.