OpenGauss treats all Lean work as project-scoped. Before launching any managed workflow —Documentation Index
Fetch the complete documentation index at: https://mintlify.com/math-inc/OpenGauss/llms.txt
Use this file to discover all available pages before exploring further.
/prove, /formalize, /autoprove, and so on — you register a Gauss project once and then let Gauss keep spawning backend child agents inside that project root. The project model is stored in a small .gauss/project.yaml manifest that lives alongside your Lean source tree.
How Gauss discovers the active project
When you launchgauss, it walks upward from your current working directory looking for a .gauss/ folder. The first directory it finds that contains a valid project.yaml becomes the active project for that session. You can override this automatic discovery by pinning a project with /project use or by clearing the override with /project clear.
lakefile.lean or lakefile.toml. These two roots can differ when your Gauss manifest sits above the Lean root (for example in a monorepo), but the Lean root must always be inside the Gauss project root.
Three ways to start a project
1. Register an existing Lean repo
If you already have a working Lean 4 repository, navigate into it and register it as a Gauss project:lakefile.lean or lakefile.toml automatically and write .gauss/project.yaml.
2. Scaffold from a template
To start a brand-new project from a blueprint template, use/project create. Gauss clones the template source, then registers the result as a Gauss project in one step:
/project create often, save a default template source so you don’t have to pass --template-source every time — see Setting a default template source below.
3. Register an existing blueprint repo
If you have a Lean blueprint repository (one that already contains blueprint infrastructure files), use/project convert instead of /project init. The convert path records the detected blueprint markers in the manifest.
Switching between projects
Once projects are registered you can switch the active project at any time from inside a runninggauss session.
| Command | Effect |
|---|---|
/project use <path> | Pin the current session to the project at <path> |
/project clear | Remove the session override and fall back to auto-discovery |
/project use accepts either the project root directory or the path to its .gauss/ directory or manifest file.
Setting a default template source
When you use/project create regularly, avoid typing --template-source every time by setting a default once:
- config.yaml
- Environment variable
Edit
~/.gauss/config.yaml and add:Blueprint projects
A blueprint project is a Lean project that ships extra infrastructure for rendering a mathematical blueprint — typically an HTML proof-outline website alongside the formal Lean development. OpenGauss detects blueprint projects by checking for known marker files under the project root:| Marker file | Meaning |
|---|---|
lean-toolchain | Lean toolchain pin |
lakefile.lean / lakefile.toml | Lean project root |
templates/blueprint.yml | Blueprint template config |
.github/workflows/gauss.yml | Gauss CI workflow |
/project convert finds any of these markers, it records them in the blueprint.markers list inside project.yaml. You can check project.is_blueprint (or inspect the manifest) to confirm the project was recognized as a blueprint.
The project manifest
Every registered Gauss project has a.gauss/project.yaml file. Here is an annotated example:
| Field | Description |
|---|---|
schema_version | Always 1 for the current manifest format |
name | Human-readable project label (defaults to directory name) |
kind | Always lean4 — the only supported project kind |
lean_root | Path to the Lean project root, relative to the Gauss project root |
created_at | ISO-8601 UTC timestamp of registration |
source.mode | How the project was registered: init, create, or convert |
source.template_source | Template URL when mode is create |
blueprint.markers | Blueprint marker files found at registration time |
Start from scratch: full walkthrough
Follow these steps to go from nothing to a running Gauss workflow on a new project.(Optional) Set a default template source
Add
gauss.project.template_source to ~/.gauss/config.yaml or export
GAUSS_BLUEPRINT_TEMPLATE_SOURCE so you don’t need to repeat it.Create the project
Launch Gauss clones the template, detects
gauss and scaffold a new project from your template:lakefile.lean or lakefile.toml, and
writes .gauss/project.yaml.Confirm the active project
Gauss will confirm the newly created project is now active. You can verify
by running
/project with no arguments to see the current project summary.Full /project command synopsis
gauss doctor reports whether the current working directory resolves to an active Gauss project, alongside backend, auth, and toolchain health checks.