Prerequisites
- Python 3.12 or newer.
- A Python repository with a
src/-style package layout.
The PyPI distribution is named
stratalint; the command it installs is
strata. You install stratalint once and type strata from then on.1. Install
2. Configure
Strata reads astrata.toml from your repository, or a [tool.strata] table in
pyproject.toml. Create a strata.toml at the repository root:
| Key | Scope | What it gets |
|---|---|---|
roots | Product code | The full structural rule set: layers, roles, shape, naming, hygiene, annotations. Required. |
tests | Test suite | Test-convention rules and annotation rules. Defaults to ["tests"]. |
tooling | Dev tooling | The same structural rules as product roots, at one less nesting level. Optional. |
roots is the only required key and must not contain nested or overlapping paths.
Anything outside all three scopes is not scanned.
That is the whole minimal config. By default every Strata rule family is on, so you
do not select anything to get started. When you want to narrow what runs, use
select and ignore; see choosing rules for
how. Full schema in Configuration.
3. Check
Run Strata against the configured repository:0:
1.
The output points at the exact line, shows the source, and explains the fix:
message states the contract that was
violated, and the = help: line states the normal correction. The messages are
written to be read at the moment of violation, by a person or an agent, so the fix
is clear without opening the docs.
You can also check specific paths instead of the configured roots by passing them
as arguments:
4. Inspect a rule
Any code in the output can be looked up in full:strata rule for details.
5. Choose which rules run
Every family is on by default. To narrow that, useselect and ignore in your
config. They take family prefixes (SFL, SFS, …) and individual rule codes
(SFS120), the same way you would in a tool like ruff.
6. See the shape
Wherestrata check enforces structure, strata map renders it. Point
it at a function to get a deterministic downstream call tree:
strata map does not require Strata configuration or rule adoption, so you can use
it on any repository. Locations are repository-relative by default so editors like
VS Code can make them clickable. See strata map for depth, path, and
import-root options.
7. Generate agent guidance
If agents work in your repository, generate skill files from your active rules so their instructions stay in sync with what CI enforces:SKILL.md for each supported agent. See
strata skills.
Next steps
Architecture model
The scopes, roles, and default layout Strata enforces.
Configuration
Every configuration key, threshold, and contract.
Rule families
What each family (SFL, SFR, SFS, SFN, SFX, SFT, SFA) checks.
Philosophy
Why Strata is strict by default and how to deviate deliberately.

