Vedic Engine — High-Level Design
Status: Proposed reference design · Updated: 2026-10-24 · Delivery form: reusable module
Implementation tasks: Vedic development plan, with HLD references,
dependencies and acceptance criteria per task.
The Vedic package specifications split the logical engine into independent
libraries under packages/vedic/src/*, with public exports, source paths and direct requirements.
The Vedic engine consumes shared chart facts (Vedic astrology, Jyotish, uses the sidereal zodiac) and applies a named Vedic profile and versioned rulebook. It returns calculated results and the rules behind them for chart screens, timelines, matching and calendar features. It is a sibling of the Western engine.
This is the proposed split discussed after the original consolidated Composer design. The
components are implemented as workspace libraries under packages/vedic/src/* (no deployed endpoint);
reviewed tables and missing upstream astronomy remain gated as described below. Existing
guides under chart-composer/ remain detailed references; their old placement does not mean the
same rules should also run in the shared Composer.
Boundary and ownership
Product callers provide an absolute instant, observer where needed, requested layers, a profile, and any date window or chart pair. The host resolves civil timezones before calling the engine. The engine asks shared Chart Composer for the chart facts it needs. Composer assembles Binder positions, houses, angles, signs, nakshatras (the 27 lunar mansions), motion and shared aspect geometry into an immutable chart snapshot. Neither the engine nor Composer selects Swiss or NASA directly.
The Vedic engine owns chart judgment, varga (divisional chart) mappings, dasha (planetary period) arithmetic, strength tables, Vedic drishti rules, yoga/dosha detection, panchang conventions, matching scores and election rules. Binder owns numerical astronomy and shared base semantics. Angular aspects supplied by Binder are distinct from Vedic drishti rule relationships owned here. Interpretation wording and remedies belong to product content; birth records and saved results belong to application storage.
Component map
| Component | Responsibility | Existing design reference |
|---|---|---|
| Engine coordinator | Resolve a profile, validate requested layers, obtain facts, sequence dependencies and assemble one response | Proposed assembly boundary |
| Profiles and rulebooks | Pin ayanamsa (sidereal offset from the tropical zodiac), houses, node convention, varga schemes, dasha year length, sunrise definition and rule tables | Convention register |
| Chart judgments | Dignity, combustion, planetary war, yogas, doshas and named exceptions | Chart core is a starting point; its neutral chart assembly stays with Composer |
| Varga calculations | Divisional charts and their frames under explicit schemes | Varga engine |
| Dasha calculations | Vimshottari periods and nested UTC intervals; other systems require their own versioned definitions | Dasha engine |
| Strength calculations | Named strength systems and ashtakavarga tables; expose calculated factors rather than one unexplained score | Strength specification (V-06); Shadbala totals stay gated |
| Panchang | Sunrise-anchored limbs, boundary intervals and skipped/repeated tithis (lunar days) | Panchang engine |
| Vedic transits | Gochara (transits counted from the natal Moon), Sade Sati and reference-chart evaluations | Transit engine |
| Matching | Ashtakoota, dosha checks and rule-defined cancellations for a chart pair | Matching engine |
| Muhurta | Purpose-specific muhurta (election) filters over panchang, chart and time-window facts | First pack yatra@1 (V-13); uses the same panchang and chart judgments |
| Evidence and result assembly | Retain contributing chart/probe references, rule matches, unsupported layers and version identities | Proposed response boundary |
These are logical responsibilities within the Vedic domain. The package specifications give independent calculations their own workspace libraries and retain a small engine coordinator. The diagram’s family dependencies do not imply a deployment per box or execution of every family for each request. Muhurta consumes panchang and chart judgments; transit scoring can consume natal strength results. Detailed sequencing belongs in the individual operation designs.
Proposed interface
| Operation | Inputs | Result |
|---|---|---|
capabilities |
Profile and requested layer selection | Supported layers, required upstream facts and rulebook identities |
chart |
Chart context, profile and layers | Vedic chart judgments, selected vargas, strengths and dasha periods |
panchang |
Local date/day window, resolved timezone context, observer and profile | Sunrise-to-sunrise limbs with boundary instants |
transits |
Immutable reference chart, search window and transit policy | Evaluated transit facts and solved intervals where supported |
matching |
Two compatible chart snapshots and a matching policy | Per-rule scores, doshas and cancellation evidence |
muhurta |
Purpose, location, bounded window and election pack | Accepted windows and the factors that accepted or excluded them |
These names describe a module contract, not HTTP routes. Language and hosting remain open. Single-chart rules are pure functions of supplied facts and versions; the coordinator can perform asynchronous Composer reads when a request needs additional instants.
Shared Composer contract
The proposed chart snapshot contains the resolved instant, observer context, zodiac/ayanamsa, house convention, ordered body geometry, angles, shared facts and Binder provenance. Its identity must include those conventions and the contributing versions. Vedic-specific judgments are added by this engine and do not mutate the snapshot.
For calendar and window work, Composer also needs a bounded astronomy-probe port backed by Binder. The Vedic engine owns the definition of a tithi or muhurta boundary and its search policy; each astronomical evaluation comes through Composer. It must not interpolate provider positions or derive sunrise from an improvised horizon model.
Capability gates and failures
- Natal, varga and Vimshottari work can start from the existing position and house contracts.
- Panchang and sunrise-based muhurta require an explicit rise/set contract and horizon definition. That support is proposed in the existing Binder integration design and must be verified before enabling them.
- Strength and advanced techniques need an input audit; unsupported astronomical quantities must be declared rather than inferred from absent fields.
- One resolved rulebook and profile apply to a response. A changed calculation rule gets a new identity.
- Upstream failures keep their error codes. Do not switch providers or silently change ayanamsa, houses, node convention or sunrise policy to complete a result.
- Partial output is opt-in and must list missing layers; a missing required factor blocks its dependent layer.
- Missing upstream astronomy (rise/set, declination, mean longitude) is declared as a port in
@astrology/vedicand connected by the upstream binder. Until a host supplies the port, capabilities report the gate and its owning task; supplying it enables the dependent layers with no calculator change.
Responses retain profile, rulebook, engine and Composer versions, contributing Binder evidence, rule identifiers and input snapshot references. The host owns persistence and cache policy; cache identity must include all calculation conventions. Interpretation consumes this evidence later.
Assembly and delivery
First agree the smaller shared Composer contract, then extract chart judgments, varga and dasha responsibilities from the consolidated design into one Vedic engine. Reuse their existing rules and fixtures; do not maintain a second implementation under Composer. Add strengths, panchang, transits, matching and muhurta only after their definitions and upstream capability gates are met.
Verification should cover convention boundaries, deterministic replay of saved inputs, preserved provenance, layer dependency failures and reviewed reference fixtures. These are acceptance requirements for future implementation, not tests executed by this documentation change.