Skip to main content

Language-agnostic correctness checker for scientific numerical code

Project description

AgentBible

Language-agnostic correctness checker for scientific numerical code.

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:

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:

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:

bible validate results.npy --check normalized_l1

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

bible validate --lang rust results.json

Generate a Markdown provenance summary:

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentbible-1.0.1.tar.gz (152.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentbible-1.0.1-py3-none-any.whl (145.8 kB view details)

Uploaded Python 3

File details

Details for the file agentbible-1.0.1.tar.gz.

File metadata

  • Download URL: agentbible-1.0.1.tar.gz
  • Upload date:
  • Size: 152.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentbible-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7a25937dc8198aa920ad8f6289f2ea5fdf4fc9875366a14fd60751885f1e12c5
MD5 35d957293b01668f9b5d01cf7472e04b
BLAKE2b-256 b4cb5c5a3491936b6725386731604c8edb2215b91614809d9ae1e7ccd6d6aab3

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentbible-1.0.1.tar.gz:

Publisher: publish-python.yml on rylanmalarchick/research-code-principles

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentbible-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: agentbible-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 145.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentbible-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 26e6afda7a4fe3394ad285997729a6e15103307d3528b48c98d1a391a14caa55
MD5 c0dad595a05d9d5b6118a48cbd9d702f
BLAKE2b-256 eff0b1a7e6d9bdb43a06ad95ca7542f1130297595a15a150ad1a1118b118d92e

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentbible-1.0.1-py3-none-any.whl:

Publisher: publish-python.yml on rylanmalarchick/research-code-principles

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page