Repository navigation
SIDEREAL_NAKSHATRA_UTILITY_BACKEND_STANDARD
Version: 0.2 Date: 2026-06-14 Status: implemented backend standard for P-GAP-05 REST admission Scope: mechanical ayanamsa, tropical/sidereal longitude conversion, and Nakshatra position lookup primitives
This standard governs the root/facade sidereal utility surfaces that are public through Python and candidates for P-GAP-05 REST admission:
moira.sidereal.Ayanamsamoira.sidereal.UserDefinedAyanamsamoira.sidereal.AyanamsaComputationTruthmoira.sidereal.SiderealConversionTruthmoira.sidereal.NakshatraComputationTruthmoira.sidereal.NakshatraPositionWithTruthmoira.sidereal.BulkNakshatraWithTruthmoira.sidereal.ayanamsamoira.sidereal.ayanamsa_with_truthmoira.sidereal.tropical_to_siderealmoira.sidereal.tropical_to_sidereal_with_truthmoira.sidereal.sidereal_to_tropicalmoira.sidereal.sidereal_to_tropical_with_truthmoira.sidereal.list_ayanamsa_systemsmoira.sidereal.nakshatra_ofmoira.sidereal.nakshatra_of_with_truthmoira.sidereal.all_nakshatras_atmoira.sidereal.all_nakshatras_at_with_truth
This standard does not govern Panchanga, Muhurta, Dasha, Varga, Shadbala, Jaimini, Ashtakavarga, Vedic dignities, Manazil, or chart-backed sidereal house derivation. Those are separate doctrine or chart-adapter surfaces.
P-GAP-05 has four mechanical governing objects.
Owned by:
moira.sidereal.Ayanamsamoira.sidereal.list_ayanamsa_systems
Meaning:
- ordered registry of built-in named ayanamsa systems
- J2000 reference values for the built-in table
- discovery surface only; it does not compute a date-specific ayanamsa value
Admitted fields:
systemreference_value_j2000_degis_star_anchoreddefault_modesupported_modes
Owned by:
moira.sidereal.ayanamsamoira.sidereal.ayanamsa_with_truthmoira.sidereal.AyanamsaComputationTruth
Meaning:
- date-specific ayanamsa value in degrees for a finite
jd_ut - accepts named built-in systems only for REST Stage 1
- accepts explicit mode:
trueormean -
ayanamsa_with_truthand RESTcomputation_truthdisclose UT1/TT epochs,$\Delta T$ seconds, polynomial vs. live-star-anchor effective path, precession/drift/nutation components, and explicit fallback disclosure
Admitted fields:
jd_utayanamsa_systemmodeayanamsa_degvalue_rangecomputation_truth
Owned by:
moira.sidereal.tropical_to_siderealmoira.sidereal.tropical_to_sidereal_with_truthmoira.sidereal.sidereal_to_tropicalmoira.sidereal.sidereal_to_tropical_with_truthmoira.sidereal.SiderealConversionTruth
Meaning:
- mechanical conversion between tropical and sidereal ecliptic longitude
- no chart construction
- no body identity
- no house derivation
- no Panchanga judgement
-
tropical_to_sidereal_with_truth,sidereal_to_tropical_with_truth, and RESTcomputation_truthpreserve raw/normalized input longitude, unwrapped and wrapped output longitude, and nestedAyanamsaComputationTruth
Admitted fields:
jd_utayanamsa_systemmodedirectioninput_longitude_degoutput_longitude_degayanamsa_deglongitude_rangecomputation_truth
Owned by:
moira.sidereal.NakshatraPositionmoira.sidereal.NakshatraComputationTruthmoira.sidereal.NakshatraPositionWithTruthmoira.sidereal.BulkNakshatraWithTruthmoira.sidereal.nakshatra_ofmoira.sidereal.nakshatra_of_with_truthmoira.sidereal.all_nakshatras_atmoira.sidereal.all_nakshatras_at_with_truth
Meaning:
- Nakshatra, lord, pada, degrees-in, and sidereal longitude for one tropical ecliptic longitude or a caller-supplied map of named tropical longitudes
- result is mechanical mansion placement only
- no Panchanga tithi/vara/yoga/karana computation
- no Muhurta interpretation
- no Dasha balance computation
-
nakshatra_of_with_truth,all_nakshatras_at_with_truth, and RESTcomputation_truthdisclose the sharedAyanamsaComputationTruth, equal13°20′/3°20′partition constants, raw index/pada before boundary clamping, and clamping flags
Admitted fields:
-
namefor bulk entries tropical_longitude_degjd_utayanamsa_systemnakshatranakshatra_indexnakshatra_numbernakshatra_lordpadadegrees_indegrees_remainingsidereal_longitude_degcomputation_truth
P-GAP-05 admits bounded synchronous utility routes under two explicit prefixes:
/v1/sidereal/*/v1/nakshatra/*
Stage 1 routes are limited to:
GET /v1/sidereal/ayanamsa-systemsPOST /v1/sidereal/ayanamsaPOST /v1/sidereal/convertPOST /v1/nakshatra/positionPOST /v1/nakshatra/bulk
The split is intentional:
-
/v1/sidereal/*is zodiac-offset and longitude-conversion utility truth. -
/v1/nakshatra/*is lunar mansion placement truth. - Neither prefix is a replacement for
/v1/panchanga/*.
Stage 1 REST admission must use named built-in ayanamsa systems only.
Admitted systems:
- every name returned by
Ayanamsa.ALL
Admitted modes:
truemean
Transport must reject:
- unknown ayanamsa names
- empty ayanamsa names
- invalid modes
- user-defined ayanamsa payloads
Reason:
UserDefinedAyanamsa is a valid Python engine surface, but REST admission
would need source/provenance fields for caller-supplied reference values and
drift terms. That is a separate packet, not a Stage 1 utility route.
All date-specific Stage 1 requests use jd_ut, matching the public sidereal
functions.
Transport must validate:
- all JD values are finite
- all longitude inputs are finite
- longitude outputs are normalized to
[0, 360) - bulk Nakshatra maps are non-empty
- bulk Nakshatra maps are bounded by a public maximum count
Recommended Stage 1 bounds:
- maximum Nakshatra bulk entries:
64
Longitudes may be supplied outside [0, 360), because the engine conversion
functions normalize by modulo. Responses must preserve both the caller input
and normalized output truth.
The REST surface must preserve the engine's current 27-Nakshatra taxonomy:
- 27 equal mansions
- span:
360 / 27degrees - 4 padas per Nakshatra
- pada span:
(360 / 27) / 4degrees - 0-based
nakshatra_index - 1-based
nakshatra_number - 1-based
pada - Vimshottari lord sequence as represented by
moira.sidereal.NAKSHATRA_LORDS
The route must not add alternate Nakshatra traditions, Abhijit Nakshatra, Manazil, mansion interpretations, or Dasha balance semantics.
Every response must state:
-
source_module:moira.sidereal engine_entrypoint-
time_scale:UT_JD ayanamsa_systemayanamsa_modeproduct_kindstage_sequence
Ayanamsa registry provenance must state:
-
registry_owner:moira.sidereal.Ayanamsa -
reference_epoch:J2000 -
user_defined_ayanamsa:not_admitted
Ayanamsa value and conversion provenance must state:
-
jd_policy:caller_supplied_UT_JD -
mode_policy:true_or_mean_only -
star_anchor_policy:engine_owned_for_true_star_anchored_systems
Nakshatra provenance must state:
-
taxonomy:twenty_seven_equal_nakshatras -
span_deg:360 / 27 -
pada_span_deg:(360 / 27) / 4 -
interpretation:not_returned -
panchanga_judgement:not_returned
P-GAP-05 does not admit:
- Panchanga result/profile routes
- Muhurta classification or scoring
- Dasha balance or sequence computation
- chart-backed Moon derivation
- chart-backed sidereal house derivation
- Varga projection
- Manazil or alternate lunar mansion traditions
- Abhijit Nakshatra
- user-defined ayanamsa REST payloads
- mutable global sidereal mode
- interpretation text or recommendation language
- async sweeps or dense ephemeris tables
- kernel path mutation
Before REST admission, tests must cover:
- ayanamsa system registry route matches
list_ayanamsa_systems - ayanamsa value route parity with
ayanamsa - tropical-to-sidereal route parity with
tropical_to_sidereal - sidereal-to-tropical route parity with
sidereal_to_tropical - conversion round-trip invariant within floating tolerance
- Nakshatra position route parity with
nakshatra_of - Nakshatra bulk route parity with
all_nakshatras_at - Nakshatra boundary assignment around exact mansion boundaries
- invalid ayanamsa system rejection
- invalid mode rejection
- non-finite JD rejection
- non-finite longitude rejection
- empty bulk map rejection
- oversized bulk map rejection
- extra field rejection
- route registry audit confirming admitted route set
No new sidereal astronomical oracle validation is required for REST admission. The route tests prove transport truth over existing engine functions. Existing sidereal reference validation remains the authority for the engine substrate.
P-GAP-05 is admitted through:
GET /v1/sidereal/ayanamsa-systemsPOST /v1/sidereal/ayanamsaPOST /v1/sidereal/convertPOST /v1/nakshatra/positionPOST /v1/nakshatra/bulk
Reason:
- the engine surfaces already exist
- the public utility scope is mechanical and bounded
- the route family closes a real facade/root-to-REST gap
- doctrine-heavy Panchanga, Muhurta, Dasha, and mansion interpretation remain outside this admission
- focused server tests cover adapter truth, conversion round trip, Nakshatra boundary behavior, validation rejection, provenance, and route method boundaries