Skip to content

Architecture Audit 2026-05 (Historical)

Faraid Engine — Architecture & Efficiency Audit

Section titled “Faraid Engine — Architecture & Efficiency Audit”

Date: 2026-05-06 Scope: packages/core, packages/api, packages/server, packages/web Status of math: correct (after findings/13) and now formally generalised by findings/16. Status of code: mathematically faithful, structurally fragmented.


0. What changed in findings/ and what it means for the code

Section titled “0. What changed in findings/ and what it means for the code”
New / updated findingMathematical contentCode-level consequence
findings/16 — unified (S, w, A) schemaAll 12 extension variants are one operator parameterised by scenario set, weight function, and aggregation rule.Implemented@faraid/extensions with scenarioExtension(F, S, w, A) primitive and 12 instances.
findings/11 §4.2 — Chain Forest (Gharqā)Multi-root chain with TILD/ṬARIF cycle-breaking.Implementedgharqa-hanbali.ts in @faraid/extensions.
findings/10 D16/D17/D18New config toggles: hamlScenarioSet, khunthaAggregation, gharqaMutualInheritance.Implemented — in MadhhabConfig (core) and MadhhabConfigSchema (domain).
TierItemStatus
T0-1Create @faraid/domain✅ Done — commit 35a0ec8
T0-2Delete response-schemas.ts✅ Done — commit 66382ef
T0-3Strip .passthrough()✅ Done — commit 35a0ec8
T0-5Lift α₂ to shared helper alpha2.ts✅ Done — commit c4963f4
T1-1@faraid/extensions + scenarioExtension✅ Done — commit 221fb86
T1-2Missing extensions (Ḥaml, Khunthā, Gharqā)✅ Done — commit 221fb86
T1-3BaseSolver in @faraid/api✅ Done — commit c4963f4
T2-1Demote /scenario route✅ Done — commit 4c9ffd9
T2-2Delete dead code (apiResolve, corpus-utils)✅ Done — commit c4963f4
T3Cache residual in phase4✅ Done — commit 4c9ffd9
T3eslint-plugin-boundaries✅ Done — commit c4963f4

For the full original audit text, see docs/audit-2026-05.md in the git repository.