Metadata-Version: 2.4
Name: sarj-standards
Version: 2.0.1
Summary: One deterministic quality gate for Sarj Python, TypeScript, SQL, IaC, and repository policy.
Project-URL: Homepage, https://github.com/sarj-ai/standards
Project-URL: Repository, https://github.com/sarj-ai/standards
Project-URL: Issues, https://github.com/sarj-ai/standards/issues
Author: sarj-ai
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.14
Requires-Dist: basedpyright==1.39.9
Requires-Dist: lefthook==2.1.10
Requires-Dist: packaging==26.2
Requires-Dist: pathspec==1.1.1
Requires-Dist: pre-commit==4.6.1
Requires-Dist: pyyaml==6.0.3
Requires-Dist: ruff==0.16.0
Requires-Dist: sarj-iac-lint==0.7.0
Requires-Dist: sarj-python-lint==0.57.0
Requires-Dist: sarj-sql-lint==0.9.0
Requires-Dist: sqlfluff==4.2.2
Description-Content-Type: text/markdown

# sarj-standards

The Python package and command-line entry point for Sarj Standards. It detects
repository structure, installs the supported toolchain, generates shared
configuration, runs checks and fixes, and diagnoses drift.

## Use

```bash
uv tool install sarj-standards
sarj-standards setup
sarj-standards doctor
sarj-standards check --trust-repository-code
```

Use `sarj-standards fix` for supported safe fixes and formatting. Use
`sarj-standards update` to update the complete Standards toolchain as one
reviewable change. Every command is repository-root aware and `setup` and
`update` are idempotent.

The generated `.sarj-standards.toml` is the repository's concise policy:
applicable rules are on by default, while exceptional paths or rules are
excluded explicitly. Do not edit generated tool configuration.

Use one denylist command instead of editing generated analyzer configs:

```bash
sarj-standards exclude add path 'generated/**'
sarj-standards exclude add rule 'eslint:@typescript-eslint/no-explicit-any'
sarj-standards exclude list
sarj-standards exclude remove path 'generated/**'
```

Paths are repository-relative globs and rules use an exact `engine:rule`
selector. The operations are atomic and idempotent. Repository-wide path
patterns are rejected so an exclusion cannot silently turn Standards off.

## Tool ownership

Standards orchestrates these native analyzers:

- Ruff for Python lint and formatting.
- BasedPyright for Python types.
- ESLint for JavaScript and TypeScript semantics.
- Sarj analyzers for Python, SQL, IaC, and text policy.

Existing formatters, generators, tests, and custom gates remain repository
owned unless setup can prove that Standards owns an equivalent integration.

## CI

Run `sarj-standards check --trust-repository-code` as the quality gate. The
trust flag explicitly permits the repository's executable ESLint configuration;
generated hooks and CI use it automatically. Keep the package version pinned by
the repository lock file, and run `sarj-standards doctor` when diagnosing a
failed upgrade or unexpected drift. Machine-readable diagnostics are available
through the formats shown by `sarj-standards check --help`.

## Maintainers

Business logic lives under `sarj_standards.libs`; the CLI is a presentation
adapter. Repository maintenance commands live under `sarj-standards maintain`.
Generated documentation must be synchronized with:

```bash
sarj-standards maintain docs sync
sarj-standards maintain docs check
```

The repository's contribution guide defines verification and release
requirements.
