Mīzān

Academic Methodology

How jurisprudential rules become deterministic, explainable software — and where the limits are.

Versioned rules
Every calculation records its domain methodology version (`hanafi-zakah-v1.0.0` for Zakah or `sunni-majority-all-heirs-v2.0.0` for inheritance) and engine version. A future rule change creates a new version instead of rewriting history.
Exact fractions
Inheritance shares use BigInt rational numbers. Currency rounding happens only when an amount is presented or saved.
Conservative scope
Only high-confidence rules are encoded. Ambiguous combinations return a verification message instead of a possibly incorrect distribution.
Verification statuses
Every evidence item and rule exposes one of these states.
VERIFIED_BY_SCHOLAR

Reviewed and confirmed by a qualified scholar for this methodology version.

REFERENCE_REQUIRED

The rule is implemented, but the exact bibliographic reference still needs verification.

NEEDS_REVIEW

The application records a position, but a scholar must confirm its application to modern cases.

UNVERIFIED

No reliable position is encoded; the scenario is refused by the engine.

Calculation pipeline
Separation of presentation, jurisprudence, calculation and persistence.

1 · Presentation layer

React forms collect inputs. The UI never calculates a jurisprudential decision on its own.

2 · Validation layer

Zod schemas validate every request on the server before the engine is called.

3 · Fiqh rule registry

Versioned rule objects carry a rule ID, principle, evidence and verification status.

4 · Calculation engine

Pure deterministic functions produce shares, classifications and structured explanation steps.

5 · Persistence layer

Prisma stores the input snapshot and the methodology version used, so old results never change silently.

Unsupported scenarios

When a case is not backed by a verified rule, the engine returns the following message rather than a potentially incorrect distribution:

Calculation requires scholarly verification. This case is not currently supported by the verified rules engine.

Current deliberate limitations include the grandfather-with-siblings combination, distant kindred, uncles and nephews, and modern assets without a verified Zakah policy. These are documented TODOs for scholarly review, not silent omissions.