Metadata-Version: 2.4
Name: aegis-validator
Version: 0.1.0
Summary: A deterministic validator for AI-generated code.
Project-URL: homepage, https://aegis.andrastelabs.com
Project-URL: repository, https://github.com/andraste-labs/aegis
Project-URL: documentation, https://github.com/andraste-labs/aegis/tree/main/docs
Project-URL: issues, https://github.com/andraste-labs/aegis/issues
Project-URL: changelog, https://github.com/andraste-labs/aegis/blob/main/CHANGELOG.md
Author-email: Andraste Labs <github@andrastelabs.com>
License: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Keywords: ai,ast,code-generation,llm,static-analysis,validation
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.11
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.34; extra == 'anthropic'
Provides-Extra: dev
Requires-Dist: anthropic>=0.34; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Description-Content-Type: text/markdown

# Aegis

A deterministic validator for AI-generated code. Apache 2.0.

## What it does

`aegis check ./path` runs a 24-layer pipeline against a directory of
code and reports whether the validation passes. Layers cover AST
parsing, import resolution, cross-file consistency, package install,
type check, test execution, design-brief fidelity, and feature
coverage. 22 layers are deterministic (no model call); 1 is LLM-judge;
1 is hybrid (LLM verdict with a deterministic override).

## Install

Install from source (a published `pip install aegis-validator` package is
coming soon):

```
git clone https://github.com/andraste-labs/aegis.git
cd aegis
pip install -e .
```

The Anthropic SDK is an optional extra for the LLM-using layers:

```
pip install -e ".[anthropic]"
```

## Quick start

```
aegis check ./my-code                          # deterministic + LLM
aegis check ./my-code --no-llm                 # deterministic only
aegis check ./my-code --brief brief.json       # include design / feature layers
aegis check ./my-code --json report.json       # machine-readable report
aegis check ./my-code --exit-on-fail           # exit 1 on FAIL
```

The LLM-using layers (`design_fidelity`, `feature_coverage`) skip
unless an `ANTHROPIC_API_KEY` is set and a `brief.json` is supplied.

## Layers

See [`docs/LAYER_INDEX.md`](./docs/LAYER_INDEX.md) for the full list
of layers, their kinds (deterministic / hybrid / llm_judge), and the
file under `aegis/checks/` that implements each one.

## Benchmark

`aegis-bench/` contains a cohort of reproducible cases. Each case has
a `brief.json`, an `input/` directory, an `expected.json` describing
the validator output, and a short technical README.

```
python -m aegis_cli check aegis-bench/cohort/<case>/input \
    --brief aegis-bench/cohort/<case>/brief.json \
    --no-llm
```

See [`aegis-bench/METHODOLOGY.md`](./aegis-bench/METHODOLOGY.md) for
case structure and reproducibility rules.

## Contributing

See [CONTRIBUTING.md](./CONTRIBUTING.md).

## License

[Apache License 2.0](./LICENSE).

## Maintainer

Aegis is maintained by [Andraste Labs](https://andrastelabs.com).
Contact: [github@andrastelabs.com](mailto:github@andrastelabs.com).
