Metadata-Version: 2.4
Name: agentbible
Version: 1.0.1
Summary: Language-agnostic correctness checker for scientific numerical code
Project-URL: Homepage, https://github.com/rylanmalarchick/research-code-principles
Project-URL: Documentation, https://github.com/rylanmalarchick/research-code-principles#readme
Project-URL: Repository, https://github.com/rylanmalarchick/research-code-principles.git
Project-URL: Issues, https://github.com/rylanmalarchick/research-code-principles/issues
Project-URL: Changelog, https://github.com/rylanmalarchick/research-code-principles/releases
Author-email: Rylan Malarchick <rylan1012@gmail.com>
Maintainer-email: Rylan Malarchick <rylan1012@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: developer-tools,numerical-validation,provenance,reproducibility,scientific-computing
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: click>=8.0
Requires-Dist: numpy>=1.20
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.0
Provides-Extra: all
Requires-Dist: chromadb>=0.4; extra == 'all'
Requires-Dist: h5py>=3.0; extra == 'all'
Requires-Dist: hypothesis>=6.0; extra == 'all'
Requires-Dist: mypy>=1.0; extra == 'all'
Requires-Dist: openai>=1.0; extra == 'all'
Requires-Dist: pre-commit>=3.0; extra == 'all'
Requires-Dist: pytest-cov>=4.0; extra == 'all'
Requires-Dist: pytest-xdist>=3.0; extra == 'all'
Requires-Dist: pytest>=7.0; extra == 'all'
Requires-Dist: ruff>=0.1; extra == 'all'
Requires-Dist: tiktoken>=0.5; extra == 'all'
Requires-Dist: types-pyyaml>=6.0; extra == 'all'
Provides-Extra: context
Requires-Dist: chromadb>=0.4; extra == 'context'
Requires-Dist: openai>=1.0; extra == 'context'
Requires-Dist: tiktoken>=0.5; extra == 'context'
Provides-Extra: dev
Requires-Dist: hypothesis>=6.0; extra == 'dev'
Requires-Dist: mypy>=1.0; extra == 'dev'
Requires-Dist: pre-commit>=3.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest-xdist>=3.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.1; extra == 'dev'
Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
Provides-Extra: hdf5
Requires-Dist: h5py>=3.0; extra == 'hdf5'
Provides-Extra: vector
Requires-Dist: chromadb>=0.4; extra == 'vector'
Requires-Dist: openai>=1.0; extra == 'vector'
Requires-Dist: tiktoken>=0.5; extra == 'vector'
Description-Content-Type: text/markdown

# AgentBible

Language-agnostic correctness checker for scientific numerical code.

[SPEC.md](SPEC.md) is the mathematical source of truth for every implementation in this repository.

## Install

| Language | Command |
| --- | --- |
| Python | `pip install agentbible` |
| Rust | `cargo add agentbible` |
| Julia | `julia -e 'using Pkg; Pkg.add("AgentBible")'` |
| C++ | `CPMAddPackage("gh:rylanmalarchick/research-code-principles@cpp-v0.1.0")` |

## Python Example

Without validation, a normalization bug can quietly propagate:

```python
import numpy as np


def probabilities(logits: np.ndarray) -> np.ndarray:
    return np.exp(logits)
```

With AgentBible, the same bug fails at the boundary where it matters:

```python
import numpy as np
from agentbible import validate_finite, validate_normalized_l1, validate_probabilities


@validate_finite
@validate_probabilities
@validate_normalized_l1()
def probabilities(logits: np.ndarray) -> np.ndarray:
    return np.exp(logits)
```

The invalid output raises immediately instead of silently contaminating later results.

## CLI

Validate Python-produced data directly:

```bash
bible validate results.npy --check normalized_l1
```

Inspect a non-Python provenance record through the unified interface:

```bash
bible validate --lang rust results.json
```

Generate a Markdown provenance summary:

```bash
bible report results.json
```

## Repository Layout

- `agentbible/`: Python package, CLI, provenance, context retrieval
- `languages/rust/`: Rust workspace
- `languages/cpp/`: header-only C++ library
- `languages/julia/`: Julia package
- `schema/provenance_v1.json`: cross-language provenance schema
