Western engine tasks
Modules share the Western domain package. Read the module specifications and current package boundaries for source ownership and public APIs. Authority: Western HLD. See parallel assignment. The eight technique families have v1 implementations. Write scopes are repository-relative and include each module’s source, tests, owned tables/fixtures, README and public exports. Shared contracts and registries have separate owners; leaf agents do not edit their implementation.
Runtime entry points are WesternEngine.compose, chart and operation. All-family
coordinator fixtures use real
Composer/geometry/C-04 sessions with analytic astronomy. Each technique package also owns its
worked convention fixtures. Production hosts still supply profiles, convention sources and
admitted rule resources; synthetic coverage does not imply independent real-chart validation.
W-01 — Implement the profile catalog
HLD: boundary/ownership, component map.
Depends on: W-12, S-01. Write scope: packages/western/src/**.
Acceptance criteria:
- [x] Initial profile explicitly pins zodiac, supported house system, node convention, body set, aspect/orb policy and rulership scheme.
- [x] Position origin is pinned separately from the observer used for houses; comparable coordinate frames are part of the profile requirements.
- [x] A sidereal profile requires a supported named ayanamsa; “Western” never implicitly means a coordinate conversion.
- [x] Unknown variants and incompatible profile versions fail; selected rulebook/technique identities are explicit. W-13 admits bundle content and each technique owns its table validator.
- [x] Reviewed fixtures identify their convention/source and numerical tolerance; rule changes require a new identity and fixture review.
W-02 — Implement natal judgments
HLD: natal component, natal operation.
Depends on: W-01, C-01; consumes C-02/C-03 in integration.
Write scope: packages/western/src/**.
Acceptance criteria:
- [x] Element/modality distribution and house emphasis use an explicit counted body set and match reviewed natal fixtures.
- [x] Rulership/dignity outcomes follow the named rulebook; modern/traditional rulership is not blended implicitly.
- [x] Selected aspect-pattern definitions list required Composer contacts and have matching/nonmatching fixtures; no aspect geometry is recomputed here.
- [x] Missing houses or unknown motion affect only factors that need them and produce the documented unavailable/failure state.
- [x] Each factor returns rule IDs and contributing snapshot facts; input chart remains immutable.
W-03 — Implement transit contacts and windows
HLD: transit analysis, search gates.
Depends on: W-01, C-03; window mode additionally requires C-04.
Write scope: packages/western/src/**.
Specify requested moving/reference body pairs, orb policy, contact event definition and window limits before enabling the corresponding mode.
Acceptance criteria:
- [x] Point-in-time contacts retain distinct moving/reference chart/body identities and use Composer geometry.
- [x] Phase treats the natal reference as fixed, not moving at its historical birth-time speed; opposing-motion fixtures catch an incorrect relative-speed calculation.
- [x] Window results carry solved event/interval boundaries and probe evidence; a sampled contact is never described as a solved event.
- [x] Retrograde repeated contacts, angular wrap, exact window edges and no-event fixtures pass under named tolerances.
- [x] Missing speed does not invent applying/separating state; unsupported geometry or exhausted search yields an explicit outcome.
- [x] Point-in-time mode can ship independently; window capability remains absent until its solver/limit fixtures pass.
W-04 — Implement synastry
HLD: synastry component, shared cross-chart geometry.
Depends on: W-01, C-03. Write scope: packages/western/src/**.
Acceptance criteria:
- [x] Two admitted snapshots produce cross-chart contacts under the selected orb policy and directional house overlays.
- [x] Swapping A/B swaps overlay direction and chart/body identities; same-chart aspect annotations cannot substitute for cross-chart evaluation.
- [x] Missing target houses makes the overlay unavailable explicitly; available contacts are handled according to requested completeness policy.
- [x] Incompatible zodiac/coordinate conventions fail; legitimate differences in birth instant/observer do not.
- [x] Reviewed chart-pair fixtures verify contacts, overlays and rule evidence without mutating either reference.
- [x] Timeless synastry does not infer applying/separating from two birth-time speeds; phase is unknown unless the technique defines a common time parameter.
W-05 — Specify advanced technique conventions
HLD: technique families, gates/failures.
Depends on: W-01, C-01. Write scope: technique specifications/fixtures under docs/astrology/western-engine/; assign each technique separately.
Produce a separate specification for each technique elected for W-06–W-10. A completed specification enables only its own implementation task; it does not hold up unrelated techniques.
Specifications: index and shared rules, composite, progressions, returns, directions, harmonics.
Acceptance criteria:
- [x] Composite specification names the exact construction method and derived angle/house policy; midpoint and time/place methods are distinguished.
- [x] Progression specification defines age/date mapping, time units and progressed-angle convention (ascendant/midheaven handling) with independently worked examples.
- [x] Return specification defines target longitude, bounded event search, tolerances, multiple/no-event policy and birth/current/event location selection.
- [x] Direction specification defines the selected solar-arc convention and contact policy; primary directions remain a separate scope.
- [x] Harmonic specification defines factor constraints, coordinate transformation and angle/house treatment.
- [x] Each specification lists necessary Composer facts/ports, missing upstream inputs, expected examples and provenance for derived points. Undefined variants remain unsupported.
W-06 — Implement the selected composite method
HLD: composite operation, W-05 composite specification.
Depends on: W-01, W-05 composite definition; Composer capabilities required by that method.
Write scope: packages/western/src/**.
Acceptance criteria:
- [x] Two reference charts produce the independently worked expected chart for the named method.
- [x] Wraparound and any opposite-point ambiguity follow the specified rule; no silent method substitution occurs.
- [x] Derived points/angles identify method and source charts and are never labelled provider-observed positions.
- [x] Required unsupported house/angle inputs fail explicitly; the method/version appears in capabilities and results.
W-07 — Implement the selected progression method
HLD: progressions, W-05 progression specification.
Depends on: W-01, W-05 progression definition, C-02 and any required C-04 probes.
Write scope: packages/western/src/**.
Acceptance criteria:
- [x] Requested target date maps to the specified calculation instant/context and matches independent mapping fixtures, including convention boundaries.
- [x] Composer supplies astronomy at the mapped context; progressed-angle policy is explicit and separately verified.
- [x] Result retains reference date, target date, mapped contexts and technique identity so it can be replayed.
- [x] Missing or unsupported angle conventions fail without replacing them with ordinary natal angles.
W-08 — Implement return search and event chart
HLD: return operation, bounded search contract, W-05 return specification.
Depends on: W-01, W-05 return definition, C-02, C-04.
Write scope: packages/western/src/**.
Acceptance criteria:
- [x] Solved event satisfies declared angular/time tolerance; Composer supplies the corresponding event chart.
- [x] 0°/360° wrap and retrograde multiple-candidate fixtures identify actual returns rather than discontinuity crossings.
- [x] No event, ambiguous/multiple event and exhausted-search outcomes follow the specification and are distinguishable.
- [x] Required location policy is explicit and reflected in chart context; no birth/current/event location is assumed silently.
- [x] Search stays within its window/evaluation budget and retains target, residual, probes and Binder evidence.
W-09 — Implement solar-arc directions
HLD: directions, advanced gates, W-05 direction specification.
Depends on: W-01, W-05 direction definition, C-03 and any Composer reads required by the selected convention.
Write scope: packages/western/src/**.
Acceptance criteria:
- [x] Named solar-arc definition produces independently checked directed points and contacts at fixed target dates.
- [x] Directed coordinates retain reference chart, arc value, convention identity and derived-point origin.
- [x] Angle handling and contact orbs follow the selected policy; angular wrap fixtures pass.
- [x] Unsupported primary directions and unreviewed variants are rejected rather than aliased to solar arc.
W-10 — Implement harmonics
HLD: harmonics, W-05 harmonic specification.
Depends on: W-01, W-05 harmonic definition; C-03 if contact evaluation is included.
Write scope: packages/western/src/**.
Acceptance criteria:
- [x] Supported factors map reference points to expected normalized derived coordinates, including wraparound fixtures.
- [x] Unsupported factors and undefined angle/house treatments fail; inherited natal houses are not silently attached to transformed points.
- [x] Source snapshot, factor and technique/version identity are retained; derived coordinates are distinguishable from astronomy.
- [x] Repeated requests are deterministic and preserve the original reference chart.
W-11 — Wire coordinator, capabilities and evidence
HLD: proposed interface, capability gates.
Depends on: W-12, W-01, W-13, C-09 and W-02’s initial feature contract; add each later technique as delivered.
Write scope: packages/western/src/**.
Acceptance criteria:
- [x] Only selected techniques and prerequisites execute; natal requests do not trigger searches or relationship operations.
- [x] Features are explicitly registered and their hashes checked against the admitted bundle; a natal-only consumer does not import unregistered techniques or native providers.
- [x] Capabilities report exact supported methods/variants and required facts; W-05 design completion alone enables nothing.
- [x] Results carry profile, technique/rulebook, engine/Composer versions, chart/probe references and derived-point origins where relevant.
- [x] Upstream errors retain codes/causes; partial output requires opt-in and lists unavailable techniques and blocked dependents.
- [x] Build, type checks and tests pass against injected Composer fixtures; no provider adapter, ephemeris file or live HTTP is required for engine unit tests.
W-12 — Publish shared Western contracts
HLD: technique/evidence boundary, capabilities.
Depends on: C-01, S-01. Write scope: packages/western/src/**.
Implement the contract exports, keeping technique-specific schemas inside their owning technique package.
Acceptance criteria:
- [x] Common profile, technique identity, feature requirements and result envelopes cover HLD version/evidence fields.
- [x] Derived-point origin distinguishes transformations from observed astronomy and retains method/source identities.
- [x] Natal, harmonic and engine consumer examples compile without importing other implementations.
- [x] Contract dependencies are type-only; importing them starts no provider, registry or runtime calculation.
W-13 — Implement Western rulebook bundle admission
HLD: profiles and rulebooks, explicit technique versions.
Depends on: W-12, C-09. Write scope: packages/western/src/**.
Implement the registry exports over supplied per-technique resources.
Acceptance criteria:
- [x] Manifest/technique content hashes and unique IDs validate before serving an immutable handle.
- [x] Unknown/incompatible rulebooks or missing/tampered technique resources fail explicitly.
- [x] Typed lookup invokes its supplied validator; one selected bundle governs all requested techniques.
- [x] No import loads technique/engine/provider implementations; feature-owned tables stay in their own packages.