Astrology24 MIN READ23 / 31

Astro Composer — Research and Convention Register

Status: Research appendix to the high-level design · Updated: 2026-10-24

This register records the rules the composer must pin, where implementations disagree, what the binder can supply, and how the result is validated. It lets a reviewer challenge a rule before it becomes a fixture.

Verdict. The composer is viable for natal charts, vargas and Vimshottari. Panchang and muhurta need rise/set first; transit scans need a timeseries read. Twenty convention rows must be pinned before the first fixture, and the register — not the tests — keeps two screens agreeing about the same birth data.

Six figures carry the parts that prose handles badly:

How to read this

If you want to… Read The question it answers
Challenge a rule before it ships §3, §4 What is the quantity, and which convention pins it?
Implement one layer §2, §3, §5 What does the binder already give me?
Review the binder contract §5, §8 Which gap blocks which layer, and what settles it?
Check the evidence §6, §7, §9 What is prior art, how is it validated, what was read?

Sections: 1 method · 2 baseline · 3 domain ledger · 4 convention register · 5 binder fit · 6 prior art · 7 validation · 8 experiments · 9 sources. Each §3 topic states what we need, the options, the chosen convention, why and the source.

1. Question and method

The question was narrow: can a chart composition layer sit on top of Astro Binder without reopening the astronomy contract, and what exactly would it own?

The method followed from it:

  1. Read the binder design and its component designs to fix the semantic boundary.
  2. Using published definitions, list every quantity a chart, panchang, dasha, transit, compatibility or muhurta response needs.
  3. Assign each quantity to astronomy (binder), base semantics (binder) or composition (composer).
  4. Find the seams where the binder contract cannot answer a composition question.
  5. Compare with prior art to separate real ambiguities from settled convention.
  6. Turn the ambiguities into a pinned register, then into a validation plan.

Encyclopaedias gave orientation only. Numeric rules are attributed to their traditional texts and need a fixture; a web page does not settle them.

2. What the baseline already provides

The composer reads one binder snapshot per chart; three inputs are still missing.

Who owns which answer Astro Binder answers positions, houses and base semantics and is deployed. Astro Composer answers chart core, varga and dasha, and transit, matching and muhurta, and is proposed. One read set crosses the seam per composition. Three capabilities are missing on the binder side: rise-set, a timeseries read and cusp-based house placement. Who owns which answer The binder answers astronomy and base semantics; the composer answers chart meaning. Three questions still have no endpoint. Astro Binder · deployed positions longitude · speed · sign nakshatra · pada · retrograde houses cusps · ascendant · midheaven six systems, refused above the circle semantics which house holds a body aspects with orbs — not on the wire Astro Composer · proposed chart core frame · occupancy · dignity combustion · planetary war varga · dasha sixteen charts from D1 Vimshottari at three levels transit · matching · muhurta gochara · ashtakoota · windows compose over chart facts positions + houses request longitude · sign · pada + meta one read set per composition Three seams · the composer cannot close them alone rise/set · gap 1 no endpoint, so no vara and no correct day tithi blocks panchang · muhurta timeseries · gap 2 one instant per call, so a scan becomes sequential latency blocks transit scans · muhurta cusp placement · gap 3 cusps are returned, the body's house number is not blocks KP · Placidus houses Read left to right. The composer asks for instants and values; it never asks a provider and never interpolates an ephemeris. Anything the binder answers twice — sign, pada, cusp occupancy — is a base semantic, and duplicating it here is a defect. dependency binder fact seam · missing capability Reference design · not deployed behaviour.

Rise/set, a timeseries read and cusp-based house placement are not on the wire yet. Reference design, not current repository behaviour.

Composer output Needs from the binder Already available?
Body longitude and speed positions Yes
Sign, degree in sign positions Yes
Nakshatra, pada positions Yes
Retrograde state positions Yes
House cusps, ascendant, midheaven houses Yes
Which house holds a body cusps + placement; sign ids for whole sign Cusps yes, cusp placement not exposed (gap 3)
Aspect geometry positions + orb profile Semantics owns it, response does not expose it
Sunrise and sunset rise/set No (gap 1)
Many instants at once batch or timeseries No (gap 2)
Declination ecliptic latitude + obliquity No

The first seven rows are reads; the rest are calls the composer must make. The last four explain why the HLD proposes small binder extensions, not a larger composer.

3. Domain ledger

Each quantity is what the rulebook will encode: an index, a fraction or a table lookup over a binder longitude. None is astronomy.

Layer Answers The trap that breaks it
Chart frame §3.1 which house holds a body mixing whole-sign and cusp frames in one chart
Nakshatra and pada §3.2 which segment of the zodiac a body sits in recomputing what the binder already returned
Dignity and combustion §3.3 how strong a body is treating a variant table as a constant
Divisional charts §3.4 sixteen derived charts chaining one varga into another
Vimshottari §3.5 when a period runs year length and a rounded Moon longitude
Panchang §3.6 the five limbs of a day taking the tithi at local midnight
Transits §3.7 what is active now implicit ashtakavarga reductions
Ashtakoota §3.8 how two charts match a score without its doshas
KP §3.9 star, sub and sub-sub lord an unpinned sub division count
Muhurta §3.10 when to act one algorithm for every purpose

3.1 Chart frame

What we need. Houses for a chosen reference: usually the ascendant (lagna), sometimes the Moon (gochara, Sade Sati) or the Sun (some vargas). The binder gives the angle; the composer picks the frame, places bodies and orders the chart.

One sky, two house frames Lagna at 17 degrees Leo on a three-sign window. Under whole sign the Sun at 5 degrees Leo is house 1, the Moon at 27 degrees Leo is house 1 and Mars at 3 degrees Virgo is house 2. Under equal cusps started at the lagna degree the Sun is house 12 while the Moon and Mars are house 1. The signs are identical in both rows; only the house boundaries differ. One sky, two house frames Lagna 17° Leo. The signs do not move; only where house 1 starts changes. 1 · the sign strip · three signs around the lagna cancer 0° 15° leo 0° 15° virgo 0° 15° sun 5° S moon 27° M mars 3° A lagna 17° Leo 2 · whole sign · house = sign distance from the lagna sign house 12 cancer S M A house 1 leo S M A house 2 virgo S M A 3 · cusp based · house = the cusp interval that contains the body equal cusps, 30° each, from the lagna degree house 11 house 12 S house 1 M A house 2 17° Cancer 17° Leo 17° Virgo window opens mid-house 11 4 · same body, two answers sun · 5° Leo whole sign: house 1 cusp: house 12 moon · 27° Leo whole sign: house 1 cusp: house 1 mars · 3° Virgo whole sign: house 2 cusp: house 1 The lagna sign is Leo, yet under cusps the Sun is house 12 and Mars — in Virgo — is house 1. A cusp chart drawn as twelve whole signs is not a different style; it is the wrong chart.

At lagna 17° Leo, the Sun at 5° Leo is house 1 by whole sign and house 12 by cusps; Mars at 3° Virgo is house 2 and house 1. Equal cusps keep the figure legible; unequal systems move boundaries further.

Options.

  • Whole sign. House 1 is the lagna’s sign, house 2 the next: ((bodySign − lagnaSign) mod 12) + 1. The Vedic default.
  • Cusp based. The cusp interval containing the longitude, walked forward and wrapped at 360°. Placidus, Koch, equal and Sripati produce it; KP uses it.

Chosen. The profile declares one system; a chart never mixes them. Whole-sign occupancy is composer arithmetic on two sign ids. Cusp occupancy is interval arithmetic owned by binder semantics, so a cusp profile cannot name a house until placement is exposed.

Why. Cusps can put a body in a different house from its sign — Sun in Leo house 12, Mars in Virgo house 1 — so a whole-sign drawing is wrong. At high latitude a body can be in house 2 while in the lagna’s sign. The composer never infers the system from the drawing.

Source. §9, Swiss Ephemeris programming interface (house systems, house position); C3.

3.2 Nakshatra and pada

What we need. The nakshatra and pada holding a body: 27 nakshatras of 13°20′ (13.3333°), each in four padas of 3°20′ (3.3333°):

nakshatra = floor(siderealLongitude / 13.3333…)
pada      = floor((siderealLongitude mod 13.3333…) / 3.3333…) + 1

Options. Recompute both, or use the binder’s values.

Chosen. Use the binder’s values; the composer never recomputes them.

Why. Recomputing invites boundary disagreement. Padas feed the Vimshottari balance and the KP sub-lord division, both starting from the same 13°20′ segment.

One ruler, three readings The zodiac divided into 27 nakshatras of 13 degrees 20 minutes with the 12 signs below, showing the grids do not align. One nakshatra magnified into four padas of 3 degrees 20 minutes, with the Moon at 8 degrees 20 minutes in pada 3. The same fractional position makes the first Vimshottari mahadasha partly elapsed: 4.4 of Ketu's 7 years spent, 2.6 remaining, followed by the nine-lord 120-year cycle. One ruler, three readings 27 nakshatras of 13°20′ divide the zodiac, each into four padas. The same segment is a nakshatra, a Vimshottari clock and a KP sub-lord. 1 · the zodiac · 27 nakshatras over 12 signs Ashwini Bharani Krittika Revati aries taurus gemini cancer leo virgo libra scorpio sagittarius capricorn aquarius pisces A sign holds 2¼ nakshatras, so the two grids never line up: Ashwini starts at 0° Aries, Bharani at 13°20′ Aries, Krittika straddles Aries and Taurus. 2 · one nakshatra magnified · 13°20′ = 4 padas of 3°20′ pada 1 0°00′ – 3°20′ pada 2 3°20′ – 6°40′ pada 3 6°40′ – 10°00′ pada 4 10°00′ – 13°20′ moon 8°20′ · pada 3 pada = floor((longitude mod 13°20′) / 3°20′) + 1 → floor(8.333 / 3.333) + 1 = 3 In arcminutes: 13°20′ = 800′, each pada = 200′, so the division is exact in integers before any rounding. 3 · the same segment is a Vimshottari clock first mahadasha · ketu · 7 years elapsed 0.62 × 7 = 4.4 y balance 2.6 y spent before birth · 4.4 years balance from birth · 2.6 years birth the full cycle · 120 years, nine lords, always this order ketu 7 y venus 20 y sun 6 y moon 10 y mars 7 y rahu 18 y jupiter 16 y saturn 19 y mercury 17 y birth sits 63% inside ketu, so the first period is already part-spent Vimshottari periods tile the timeline with no gap and no overlap; the birth instant only decides where the first period is cut.

One ruler, three readings: 27 nakshatras against 12 signs, one nakshatra in four padas, and the same fraction as the Vimshottari balance. A Moon at 8°20′ is 62.5% through Ashwini, so 62.5% of Ketu’s seven years is spent at birth: 4.4 elapsed, 2.6 remaining.

Source. §9, Astrology semantics (the base layer the composer consumes); §3.5; §3.9.

3.3 Dignity and combustion

What we need. Dignity, combustion and planetary war. They need sign ownership, exaltation degrees, moolatrikona ranges and distance from the Sun.

Options. One table in code, or versioned rulebook data.

Chosen. Every threshold lives in the rulebook, and the response names it.

  • Dignity is a table: own sign, exalted, debilitated, moolatrikona, friend, neutral, enemy. Ownership follows classical lordships; exaltation and debilitation are single degrees; moolatrikona is a range inside the own sign.
  • Combustion is a distance threshold from the Sun. It differs per planet and, in some schools, between direct and retrograde motion.
  • Planetary war applies to two non-luminous planets within one degree; the common rule takes the lower longitude as victor.

Why. Each is a table with variant editions, so a constant would freeze one school’s choice.

Source. C12 (dignity), C13 (combustion orbs).

3.4 Divisional charts

What we need. Sixteen Shodasavarga charts. Each divides a sign into equal parts (except D30) and maps each part to a sign.

Options.

  • Chain one varga into another, or map every varga from D1.
  • Parashara, Raman or KP starting rules for D10, D16, D20, D40 and D45, and different treatments of D30.

Chosen. Every varga is computed from the D1 longitude, never from another varga. Starting rules are a rulebook table per varga.

Varga Parts Common starting rule
D1 rasi 1 The sign itself
D2 hora 2 Halves map only to Cancer and Leo, reversed in even signs
D3 drekkana 3 First part same sign, then the 5th and 9th from it
D4 chaturthamsha 4 Same sign, then the 4th, 7th and 10th
D7 saptamsha 7 Odd signs start from the sign, even signs from the 7th
D9 navamsha 9 Movable same sign, fixed the 9th, dual the 5th
D10 dashamsha 10 Odd signs from the sign, even signs from the 9th
D12 dwadashamsha 12 From the sign itself
D16 shodashamsha 16 Movable Aries, fixed Leo, dual Sagittarius
D20 vimshamsha 20 Movable Aries, fixed Sagittarius, dual Leo
D24 chaturvimshamsha 24 Odd signs Leo, even signs Cancer
D27 saptavimshamsha 27 Fire Aries, earth Cancer, air Libra, water Capricorn
D30 trimshamsha 30 Unequal parts: 5, 5, 8, 7, 5 degrees, reversed in even signs
D40 khavedamsha 40 Odd signs Aries, even signs Libra
D45 akshavedamsha 45 Movable Aries, fixed Leo, dual Sagittarius
D60 shashtiamsha 60 Counted from the sign itself

One longitude, sixteen charts D1 is the only source for the sixteen Shodasavarga charts; chaining one varga into another is forbidden. Three worked mappings for Aries: D9 in nine parts of 3 degrees 20 minutes starting from the sign itself, with part one vargottama; D10 in ten parts of 3 degrees; D30 in five unequal parts of 5, 5, 8, 7 and 5 degrees mapped to Aries, Aquarius, Sagittarius, Gemini and Libra. One longitude, sixteen charts Every varga divides the same 30° of D1 into parts and maps each part to a sign. None reads another varga. 1 · one source, sixteen mappings D1 rasi one sidereal longitude 0°–30° inside one sign varga table · a rulebook entry per varga D1 rasi D2 hora D3 drekkana D4 chaturthamsha D7 saptamsha D9 navamsha D10 dashamsha D12 dwadashamsha D16 shodashamsha D20 vimshamsha D24 chaturvimshamsha D27 saptavimshamsha D30 trimshamsha D40 khavedamsha D45 akshavedamsha D60 shashtiamsha D1 → D9 → D27 not a path: chained divisions compound rounding Sixteen charts for nine bodies is arithmetic, not I/O — which is why the whole table can live in one rulebook entry. 2 · worked on Aries · odd and movable fixed and dual signs start elsewhere D9 navamsha 9 parts of 3°20′ aries 1° taurus 1° gemini 1° cancer 1° leo 1° virgo 1° libra 1° scorpio 1° sagittarius 1° part 1 keeps the sign, so this chart is vargottama — the status falls out of the mapping D10 dashamsha 10 parts of 3° aries 1° taurus 1° gemini 1° cancer 1° leo 1° virgo 1° libra 1° scorpio 1° sagittarius 1° capricorn 1° odd sign starts from the sign itself; an even sign starts from the 9th D30 trimshamsha five unequal parts aries 5° aquarius 5° sagittarius 8° gemini 7° libra 5° the only unequal division, and the order reverses in even signs The starting rule, not the arithmetic, is what varies between editions: that is why each varga is a table, never a code branch.

All sixteen charts are pure mappings from one D1 longitude. Worked on Aries: D9 in nine parts of 3°20′ (part 1 keeps the sign, so it is vargottama), D10 in ten parts of 3°, and D30’s unequal 5/5/8/7/5 division.

Why. Vargas map one longitude, so they are pure and cheap: sixteen charts for nine bodies is arithmetic, not I/O. Starting rules vary by edition and software, so they are a rulebook entry, not a code branch. A D9 returning the D1 sign is vargottama; it falls out of the mapping for movable signs and must not be special-cased.

Source. §9, Brihat Parashara Hora Shastra (varga definitions; editions differ, so E3 needs a named edition) and the Varga entry; C9, C10, C11.

3.5 Vimshottari dasha

What we need. Dated periods at two, three or four levels. The sequence is fixed and sums to 120 years:

Lord Ketu Venus Sun Moon Mars Rahu Jupiter Saturn Mercury
Years 7 20 6 10 7 18 16 19 17

Nakshatra lords follow the same order from Ketu at Ashwini. At birth the Moon sits inside one nakshatra, so the first mahadasha is partly spent:

elapsed   = (moonLongitude mod 13.3333…) / 13.3333…
firstLord = nakshatraLord(moonNakshatra)
balance   = (1 − elapsed) × years(firstLord) × yearLength

The first period ends at birth + balance and nominally starts at birth − elapsed × years × yearLength. Antardashas begin with the mahadasha lord and follow the sequence, each lasting years(subLord) / 120 × duration(mahadasha); pratyantardashas subdivide the same way. Periods tile the timeline with no gaps or overlaps, a cheap and strong invariant. The §3.2 figure’s third band shows Ketu’s spent and remaining parts.

Options. Year lengths of 365.25, 360 or 365.2425 days; rounded or full-precision Moon longitude.

Chosen. Year length is a profile field, default 365.25. The balance uses the binder’s full-precision longitude.

Why. Over 120 years the year-length difference reaches months. At 0.55 arcsec per second of time, one arcsecond moves a dasha boundary about two seconds, so reproducibility needs full precision.

Source. §9, Dasha entry; §3.2; C4, C5.

3.6 Panchang

What we need. Five limbs for a local day, plus the instant each ends. All reduce to the Sun–Moon elongation e = (moon − sun) mod 360 and the sidereal Moon longitude:

Limb Definition Index
Tithi 12° of elongation floor(e / 12) + 1, 1–30
Vara Weekday, sunrise to sunrise Derived from the sunrise instant
Nakshatra 13°20′ of sidereal Moon floor(moon / 13.3333…)
Yoga 13°20′ of (sun + moon) mod 360 floor((sun + moon) / 13.3333…)
Karana 6° of elongation, half a tithi floor(e / 6) + 1, 1–60

Five limbs, two rulers and a sunrise Left: a wheel of the Sun-Moon elongation divided into 30 tithi sectors of 12 degrees and 60 karana ticks of 6 degrees, with the Moon 80 degrees ahead of the Sun giving tithi 7 and karana 14. Right top: the same 13 degrees 20 minutes window used twice, once on the Moon for the nakshatra and once on the Sun plus Moon sum for the yoga. Right bottom: a sunrise-to-sunrise timeline showing a kshaya tithi that is never current at a sunrise and an adhika tithi that is current at two. Five limbs, two rulers and a sunrise Tithi and karana measure the Sun–Moon elongation; nakshatra and yoga measure a 13°20′ segment; vara measures the sunrise-to-sunrise day. 1 · elongation · tithi and karana sun · 0° moon · e = 80° e = 80° tithi 7 karana 14 30 tithi sectors of 12° 60 karana ticks of 6° Angles on this wheel are elongation, not absolute longitude. tithi = floor(e / 12) + 1 = 7 karana = floor(e / 6) + 1 = 14 The sector under the moon is the limb that is running. 2 · nakshatra and yoga · one modulus, two inputs moon · sidereal longitude 8°20′ → nakshatra 0, pada 3 0′ 200′ 400′ 600′ 800′ sun + moon · mod 360 296°40′ → yoga 22 The Moon alone decides the nakshatra; the Sun+Moon sum decides the yoga. 3 · vara and the tithi that runs at sunrise sunrise sunrise sunrise tithi n tithi n+1 kshaya tithi n+2 adhika tithi n+3 never at a sunrise at two sunrises day 1 tithi n day 2 tithi n+2 day 3 tithi n+2 again The day's tithi is the one running at sunrise, so kshaya never appears and adhika appears twice. Panchang is the one layer with a hard dependency on binder rise/set: without sunrise there is no vara and no correct day tithi. A panchang that takes the tithi at local midnight disagrees with every published almanac on some days.

Elongation decides tithi and karana; a 13°20′ segment decides nakshatra and yoga; sunrise decides vara. The lower band shows a tithi that is never current at sunrise (kshaya) and one that is current at two consecutive sunrises (adhika).

Options. Take the tithi at local midnight or at sunrise. Set the day boundary at sunrise, midnight or noon. Report kshaya and adhika tithis, collapse them, or error.

Chosen. Hindu sunrise defines the day; the day’s tithi is the one running at sunrise. Kshaya and adhika are reported explicitly. Karana cycles through seven movable and four fixed names, sixty per lunar month. The engine returns crossing instants, not just indices, because users need “tithi ends at 14:32”.

Why. A midnight tithi disagrees with published almanacs on some days. Tithi is not a clock unit: a varying elongation rate makes it last roughly 20 to 27 hours. It can be kshaya (starts after one sunrise, ends before the next, so the day list skips it) or adhika/vriddhi (present at two consecutive sunrises, so it repeats); the response must represent this, not deduplicate it. Panchang alone hard-depends on binder rise/set, for definitional reasons: without sunrise there is no vara and no correct day tithi.

Source. §9, Panchangam and Tithi entries; C6, C7, C8.

3.7 Transits, Sade Sati and ashtakavarga

What we need. What is active now: gochara, Sade Sati and ashtakavarga scores.

Options.

  • Gochara house readings per planet, with or without vedha (obstruction) points that cancel a good transit.
  • Sade Sati from the Moon sign, or from the 45° of zodiac before the Moon.
  • Ashtakavarga reductions: none, trikona or ekadhipatya shodhana.

Chosen.

  • Gochara compares a transiting body’s sign to the natal Moon sign. Classical readings give favourable and unfavourable houses per planet; vedha is an optional first-slice table.
  • Sade Sati follows the profile’s definition. The Moon-sign reading is Saturn through the 12th, 1st and 2nd signs from the natal Moon, roughly 7½ years at ~2½ years per sign; the 45° reading starts months earlier.
  • Ashtakavarga assigns benefic points (bindus) to signs from eight contributors — seven planets and the lagna — using fixed house-offset tables. Each planet’s twelve-sign pattern is its Bhinna Ashtakavarga (BAV); the seven BAVs sum to the Sarvashtakavarga (SAV), 337 bindus in the standard scheme.
  • Reductions change scores, so they are a rulebook feature flag, never an implicit default.

Why. A score without its basis is not comparable, and reductions silently change scores. The 337 total catches table typos: one mistyped contribution breaks it.

Source. §9, Sade Sati entry; C15, C16, C17. Composition is I/O-bound here: a year of daily transits is 365 instants, each a binder read.

3.8 Ashtakoota matching

What we need. A compatibility score for two charts: eight kootas, 36 points.

Koota Max Basis
Varna 1 Moon-sign class
Vashya 2 Sign group and attraction
Tara 3 Count of nakshatras between the two Moons
Yoni 4 Animal symbol of the nakshatra
Graha Maitri 5 Sign-lord friendship
Gana 6 Deva, manushya, rakshasa class
Bhakoot 7 Sign distance between the Moons
Nadi 8 Nadi class of the nakshatra

Options. Return the score alone, or with per-koota verdicts. Apply no cancellations, or the Nadi and Bhakoot exceptions several schools define.

Chosen. Return both the score and the per-koota verdict; cancellations are explicit rulebook entries.

Why. The traditional threshold is 18 of 36, but the kootas are not additive in meaning. Nadi and Bhakoot doshas have cancellation rules, and a score without the dosha list misleads.

Source. §9, Astrological compatibility entry; C18.

3.9 Krishnamurti Paddhati

What we need. The KP lord hierarchy — star, sub and sub-sub lord — plus significators.

Options. Keep the Lahiri whole-sign profile, or use KP: the KP ayanamsa (krishnamurti in the binder), Placidus cusps and a finer hierarchy.

Chosen.

  • Star lord is the nakshatra lord.
  • Sub lord divides the 13°20′ nakshatra into nine parts proportional to the Vimshottari years, starting from the star lord; Ashwini’s first sub is Ketu’s, and the sequence follows the dasha order.
  • Sub-sub lord repeats the division inside a sub. KP readings use the hierarchy to decide “will this happen”.
  • Significators come from cusp sub-lords and house occupancy: a composition over cusps and planets, not a new astronomical input.

Why. The mechanism is clear; the bookkeeping is not. Sources quote the sub division total inconsistently — 243 by nine-way division, other counts elsewhere — so the count and the treatment of sign-crossing subs need a primary KP source.

Source. E4; C19.

3.10 Muhurta

What we need. An auspicious window: a muhurta is 48 minutes (thirty per day). Practical selection is a filter over a date range.

Options. One universal algorithm, or versioned rulebooks per purpose.

Chosen. Versioned muhurta packs. A pack filters on acceptable tithi, nakshatra, yoga and vara for the purpose, a suitable lagna, and exclusion of inauspicious day divisions such as Rahu kala, Yamaganda and Gulika, plus panchaka periods. Abhijit muhurta, around local noon, is a common inclusion.

Why. The rules are purpose-specific and numerous: a wedding pack and a travel pack are different rulebooks over the same panchang facts. Packs keep the engine honest and the disagreement auditable.

Source. C20; each pack carries its own table.

4. Convention register

Each row is a place where two competent implementations can differ. The rulebook pins one choice per row, and the response names it.

# Convention Options seen Decision
C1 Ayanamsa Lahiri, Raman, KP, Fagan–Bradley Profile field; binder applies it
C2 Node type Mean, true Profile field; affects nakshatra boundaries
C3 House frame Whole sign, equal, Placidus, Sripati, Koch, Campanus Profile field; never mixed
C4 Dasha year 365.25, 360, 365.2425 days Profile field, default 365.25
C5 Dasha depth 2, 3, 4 levels Request field with a cap
C6 Sunrise definition Hindu (disc centre, no refraction), astronomical Profile field; panchang uses Hindu
C7 Day boundary Sunrise, midnight, noon Panchang uses sunrise
C8 Kshaya/adhika tithi Report, collapse, error Report explicitly
C9 Varga schemes Parashara, Raman, KP variants for D10/D16/D20/D40/D45 Rulebook table per varga
C10 D30 divisions 5/5/8/7/5, reversed in even signs Rulebook table
C11 Varga recursion From D1 only Fixed by design
C12 Dignity table Classical lordships, moolatrikona ranges Rulebook table
C13 Combustion orbs Per planet, retrograde variants Rulebook table
C14 Aspect set Vedic drishti, Western orbs, KP Profile field
C15 Sade Sati basis Moon sign, 45° before Moon Profile field
C16 Vedha Included, excluded Optional table
C17 Ashtakavarga reductions None, trikona, ekadhipatya Rulebook feature flag
C18 Koota cancellations None, Nadi/Bhakoot exceptions Rulebook table
C19 KP sub division count 243 by nine-way division; other counts quoted Primary source required
C20 Muhurta exclusions Rahu kala, Yamaganda, Gulika, panchaka Per-pack table

The register is the review artefact: a pull request that changes an engine number without touching a row here is a defect, even if the tests pass.

5. Binder fit analysis

The binder answers most reads. Three gaps decide the delivery order.

5.1 Capability matrix

Needed capability Binder today Fit
Positions for one instant POST /v1/positions Direct
Houses and angles POST /v1/houses Direct
Signs, nakshatras, padas In positions Direct
Motion state In positions Direct
Aspects In semantics, not on the wire Seam
House placement In semantics, not on the wire Seam
Sunrise/sunset Out of scope for the first slice Gap
Many instants One instant per call Gap
Declination Not in contract Optional gap
Provenance meta block Direct

5.2 What the gaps cost

A panchang day needs sunrise and four or five elongation boundaries: tithi end, nakshatra end, yoga end, karana end, next sunrise. Bisection over a 24-hour window takes about 17 evaluations of both bodies per boundary:

17 iterations × 2 bodies = 34 calls per boundary
5 boundaries            ≈ 170 calls per panchang day

With includeSpeed and a Newton step, convergence takes three to five evaluations, or roughly 20–50 calls. A timeseries endpoint returning a grid plus speeds does the day in two or three calls. A 30-day muhurta scan and a year of transits scale the same way, into thousands.

What a panchang day costs Binder calls for one panchang day: about 170 by bisection, 20 to 50 with speeds and a Newton step, and 2 to 3 with a timeseries endpoint. The high-level design target is at most 50 calls, so bisection misses it by more than three times while timeseries beats it by an order of magnitude. What a panchang day costs Five boundary solves plus sunrise and sunset, priced in binder calls — the arithmetic behind the batching request. 0 50 100 150 binder calls per panchang day (two bodies, five boundaries, rise and set) Bisection 17 evaluations × 2 bodies × 5 boundaries ≈ 170 calls Newton speeds + 3–5 evaluations 20–50 calls Timeseries one grid call covers the whole day 2–3 calls HLD target · ≤ 50 calls a 30-day muhurta scan: 170 × 30 ≈ 5,100 calls by bisection, 90 with timeseries a year of daily transits: 365 calls at one instant each, or one timeseries call Without batching the only way to cut the cost is to interpolate an ephemeris inside the composer — the boundary the design exists to hold.

Five boundary solves priced in binder calls. Bisection misses the ≤ 50-call budget by more than three times; a timeseries read beats it by an order of magnitude.

So batching is a phase 3 gate, not an optimisation. Without it, panchang is expensive and scans are impractical; avoiding the cost would mean interpolating an ephemeris inside the composer — the boundary the design exists to hold.

5.3 Proposed additions

Addition Shape Used by Phase
POST /v1/rise-set Bodies, observer, events, horizon set to hindu or astronomical Panchang, muhurta, upagraha Composer phase 2
POST /v1/timeseries Bodies, start, end, step, includeSpeed Transits, muhurta Composer phase 3
houses block on positions { "system": "whole_sign" }; per-body house Chart core, KP Composer phase 0/1
aspects block Bodies plus named orb profile Yogas, matching, western Composer phase 3
Declination declination per body, or obliquity in meta Western parallels Optional

The rise/set definition is not an implementation detail. Swiss Ephemeris separates astronomical sunrise (upper limb, refracted) from the Hindu definition (disc centre at the horizon, no refraction, geocentric, solar latitude ignored), and exposes the latter as a dedicated flag. Panchang uses the Hindu day, so the endpoint must carry the definition in the request and echo it in provenance; otherwise a boundary is off by minutes and nobody notices.

5.4 Alternatives considered

Option Why it was rejected
Composer calls Swiss Ephemeris directly Duplicates provider routing and the licence decision; two sources of “where”
Fold composition into the binder Contradicts the binder’s stated out-of-scope list and grows a service whose value is a narrow contract
Composer as a library inside each product service Loses central versioning and provenance; every service would pin a different rulebook
Composer computes its own positions for panchang only The narrow exception would be the first duplicate, and would drift at boundaries
Persist charts in the composer Makes a stateless calculator into an owner of personal data with no product reason

The chosen shape — a stateless composition service that reads the binder — is the only one where the astronomy contract stays closed and the conventions have a single home.

6. Prior art

  • PyJHora ports Vedic Astrology: An Integrated Approach and Jagannatha Hora in Python, with roughly 6,800 tests and a Lahiri default. It shows a large but tractable feature surface, and that almost every test assumes a fixed ayanamsa — the implicit default this design refuses. AGPL-3.0: behavioural reference only, with no code or table copied without legal review.
  • Jagannatha Hora is what most users compare against, so fixtures should reproduce its conventions; differences should trace to a register row, not a bug.
  • Commercial astrology APIs expose one endpoint per feature with a plan-based quota, supporting the HLD’s small endpoint set: callers expect a feature endpoint, not a general expression language.
  • Swiss Ephemeris is not prior art for composition. It supplies houses and rise/set primitives, says nothing about vargas, dashas or panchang, and defines rise/set and polar-circle behaviour precisely enough for the binder to own once.

7. Validation plan

Validation asks three things: is the arithmetic right, is the convention intended, and is the service reproducible. Sections 7.1–7.2 cover arithmetic, 7.3–7.6 convention and boundaries, 7.7–7.8 reproducibility and cost, 7.9 negative paths.

7.1 Formula tests. Pure unit tests per engine: tithi index across a lunation, pada boundaries, Vimshottari balance at a nakshatra start and end, D9 vargottama for a movable sign, D30 unequal divisions in odd and even signs.

7.2 Invariants. Cheap properties that catch table typos:

  • SAV totals 337 bindus for every chart.
  • Vimshottari periods tile 120 years continuously, in order, with no gap or overlap at any level.
  • Every body belongs to exactly one house in both frame conventions.
  • Tithi index is in 1–30, pada in 1–4, nakshatra in 0–26.
  • A varga mapping is total: every one of the 30° of a sign maps to exactly one sign.
  • Sub-period boundaries nest inside their parent period.

7.3 Boundary tests. Longitudes exactly on 30°, 13°20′, 3°20′ and tithi multiples; a body on a cusp; a retrograde station; birth on a dasha boundary. Half-open intervals must match binder semantics so a sign never differs between services.

7.4 Golden fixtures. Charts from a few birth data points across cities, epochs, both hemispheres and one polar case, rendered under each profile and stored as JSON with the four version identifiers. A fixture diff is a review gate. Include a Lahiri whole-sign chart, a KP chart with Placidus cusps, and a DST-ambiguous birth time resolved by the caller.

7.5 Almanac comparison. Compare panchang tithi, nakshatra, yoga, karana and sunrise with a published almanac for 30 consecutive days in two cities: sunrise within a minute, indices exact, kshaya and adhika days in the same places.

7.6 Cross-service consistency. For the same instant and body, chart sign and nakshatra must equal the binder’s, and panchang sunrise must equal the rise/set response. Divergence is a boundary violation, not rounding.

7.7 Determinism. The same request in two JVM instances with different locale and timezone settings must produce byte-identical output. Any clock, hash-order or locale dependency fails.

7.8 Performance. Load tests against a binder stub at the section 14 targets, plus one real-binder test to measure boundary-solve cost and how urgent batching is.

7.9 Negative tests. Unknown profile, unknown rulebook, unsupported layer, polar Placidus, ephemeris range edge, missing observer for houses, and allowPartial.

8. Experiments before implementation

# Experiment Question it settles
E1 Time a boundary solve against the real binder, bisection versus Newton Whether panchang can ship before timeseries
E2 Compare three reference implementations on 100 random charts Which layers need fixtures rather than trust
E3 Implement the varga table and diff all sixteen against one reference Which starting rules are actually in use
E4 Read a primary KP source for sub and sub-sub boundaries Convention C19
E5 Render a Placidus chart above the polar circle through the binder How the composer reports the refusal
E6 Measure a full 16-varga, three-level dasha response Whether the 64 KB target holds

E1 and E2 are the gates: E1 decides the phase 2 dependency, E2 decides how much of the fixture set can be automated rather than hand-checked.

9. Sources

Accessed 2026-10-24. Encyclopaedic sources gave orientation; numeric rules are attributed to the traditional texts and must be confirmed against a primary edition during E3/E4.