> ## Documentation Index
> Fetch the complete documentation index at: https://docs.halal.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Methodology versioning

> How the screening methodology is versioned, and why it matters for reproducibility.

## Why versioning matters

Compliance decisions need to be reproducible. If a fund was screened on a given
date under a given set of rules, the same inputs must produce the same outputs
months or years later — for audit, for reporting, and for trust.

Every compliance-bearing response identifies the exact methodology used, both in
the resource and in `meta.methodology`:

```
aaoifi-ss21@2026.1
```

That reads as: **AAOIFI Shari'ah Standard No. 21, halal.sh implementation version
2026.1**.

## Version format

```
{methodology_id}@{year}.{revision}
```

* **methodology\_id** — the screening methodology (currently `aaoifi-ss21`)
* **year** — calendar year of the implementation
* **revision** — incremental revision within the year

The `id` and `version` are also returned as separate fields by the
[methodologies endpoints](/api-reference/methodology/get-methodology) and inside
every [Evidence Packet](/concepts/evidence-packets).

## What triggers a new version

| Change                    | Version bump | Example                                         |
| ------------------------- | ------------ | ----------------------------------------------- |
| Threshold change          | Year         | AAOIFI revises the debt threshold               |
| Calculation-method change | Revision     | Switch from spot to 12-month-average market cap |
| Screening-logic bug fix   | Revision     | Correcting a threshold comparison               |
| Extraction improvement    | None         | Better XBRL coverage for a field                |

Extraction improvements don't bump the version: the *screening logic* hasn't
changed, only the quality of the data fed into it. (Improved data can still
change a determination — the version tells you the rules were the same.)

## Inspecting the methodology

The methodology, its thresholds, and its screen definitions are available
directly:

```bash theme={null}
curl https://api.halal.sh/v1/methodologies/aaoifi-ss21 \
  -H "X-API-Key: hsh_sandbox_your_key"
```

```bash theme={null}
# List all supported methodologies
curl https://api.halal.sh/v1/methodologies \
  -H "X-API-Key: hsh_sandbox_your_key"
```

<Note>
  There is currently a single methodology (`aaoifi-ss21`), and every response
  uses its latest version. If we ever support multiple methodologies or pinned
  versions, it will be additive — your existing requests won't change.
</Note>

## Reproducibility

Given the same three inputs:

1. **Methodology version** — `meta.methodology` (e.g. `aaoifi-ss21@2026.1`)
2. **Filing set** — identified by `filing.hash`
3. **Market-data snapshot** — `as_of`

the API produces the **same determination, ratios, and pass/fail results**. The
AI-generated `explanation` prose may vary, but the quantitative outputs are
deterministic.
