feat(functional): adopt upstream BPHS ch.34 profile v2; fix Pancha Mahapurusha self-conjunction; yoga engine reads the same functional roles

Ported verbatim from the upstream skill repo (yinduzhanxing e9beae6b) with
product authorization 2026-10-02: scripts/functional_benefics.py,
scripts/pancha_mahapurusha.py, references/functional-role-profile.md; only
the two functional-role methods of scripts/yoga_engine.py (our file diverged).
v5 77-case rectification eval: 5 cells up (to +7.8pp), one cell -1.3pp (one
case); product accepted. Rectification memoization golden still to be
regenerated (scores change with the grouping).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4f2nya58RoRu4yEmJgRGE
This commit is contained in:
Jesse_Chen
2026-10-02 10:57:14 +08:00
co-authored by Claude Opus 5.5
parent f85794661b
commit 57782aea8a
5 changed files with 117 additions and 60 deletions
+32
View File
@@ -0,0 +1,32 @@
# Functional ownership profile v2
Profile: `bphs_ch34_general_with_sign_exceptions_v2`.
Source: BPHS chapter 34, general rules 2–17 and ascendant entries 19–44,
public translation at https://jyotishvidya.com/ch34.htm (inspected 2026-10-02).
This is a named implementation of a translation, not all-lineage agreement.
`owned_houses` is geometry. `lagna_lord` is identity. `yogakarakas` is the
strict distinct 4/7/10 plus 5/9 lordship definition. The first house remains
angular and trinal but cannot count twice. Broader textual yoga-producing
associations (including Scorpio Sun/Moon) are not restricted by that field.
Functional roles use general ownership rules with explicit sign entries
taking precedence. Lagna/trinal lords are generally supportive; 3/6/11 and
qualified eighth lordship challenging. Sole twelfth lordship is conditional,
not automatically malefic. Sun/Moon eighth lordship has the stated exception.
Unspecified angular or second-house-only cases remain neutral/mixed.
Explicit exceptions are recorded in `ROLE_OVERRIDES`: Aries Mars helpful in
association (mixed); Taurus Venus challenging, Sun supportive; Gemini Jupiter
challenging; Virgo Jupiter challenging; Libra Venus mixed, Mars challenging;
Scorpio Mars mixed and Sun yoga-supporting; Sagittarius Jupiter/Mercury mixed
(Mercury's association with Sun is separate); Capricorn Moon challenging;
Aquarius Mars challenging, Mercury mixed; Pisces Mercury challenging.
The remaining general fallbacks are identified in each planet's `role_basis`;
they are not presented as a verbatim complete classical table.
Natural benefic/malefic status, strength, maraka roles, conjunctions, aspects
and period activation are independent layers. Neutral does not mean harmless;
functional benefic does not guarantee a favorable event. No death or outcome
prediction is inferred from this classification. The Yoga engine's natural
predicates and active Yoga rule library are not replaced by ownership roles.