Internal module guide. This module is now part of
@astrology/vedic; use the public package README for application setup.
rulebooks module
Rulebook registry, bundle integrity and version admission. Public imports use the package root. See the package specification and task plan (V-17).
Run pnpm --filter @astrology/vedic build, check, and test after building dependencies (pnpm build:vedic builds all).
Admission
createVedicRulebookRegistry([{ manifest, families }]) verifies every bundle before serving any:
manifest shape, exactly the declared families at the declared versions, and each payload’s canonical
SHA-256 (hashRuleFamily, from @astrology/chart-composer) against the manifest. Missing,
duplicate, undeclared or tampered families fail with RULEBOOK_INTEGRITY.
resolveVedicRulebook is an exact lookup (UNKNOWN_RULEBOOK otherwise). assertRulebookCompatible
requires the profile to name the rulebook and the manifest to list the profile.
getVedicRuleFamily(handle, familyId, validate) passes the payload through the owning feature’s
validator and returns AdmittedRules<T> with the family hash, which create*Feature binds so the
engine can reject a binding from another rulebook. The registry imports no feature or engine.