feat(narayana): show the Sanjay Rath version beside the legacy one (T4, BUG-1218)

Display only; scoring and timing conclusions keep the legacy algorithm.
narayana_legacy_label attaches a Rath view (seed, deciding level, direction,
24 MDs, running MD/AD) under modules.narayana_dasha.rath for the consultation
modules, full reading Step 4.13 and the CLI. Reference report: one summary
line under the legacy line plus Rath MD / running-MD AD tables (English terms
added). Evidence card: narayana_rath (label, seed sign, level, running MD) on
timing / annual cards only — other cards sit at 11,979 of 12,000 characters.
Goldens re-captured from the real engine.

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-03 21:09:40 +08:00
co-authored by Claude Opus 5.5
parent 3264831a23
commit bf8d704708
13 changed files with 387 additions and 16 deletions
+19 -2
View File
@@ -56,8 +56,9 @@ def cmd_narayana_dasha(args, chart_data):
current_age=current_age,
birth_year=birth_year,
)
from narayana_legacy_label import label_legacy_narayana # BUG-1215
label_legacy_narayana(result)
from narayana_legacy_label import label_legacy_narayana # BUG-1215; Rath view BUG-1218
label_legacy_narayana(result, lagna_sign_idx=asc_idx, planet_lons=planet_lons,
current_age=current_age, birth_year=birth_year)
# 格式化输出
lines = [
@@ -98,4 +99,20 @@ def cmd_narayana_dasha(args, chart_data):
for line in result.get('interpretation', []):
lines.append(f" {line}")
rath = result.get('rath') or {}
if rath:
lines.append("")
lines.append(f"── {rath.get('algorithm_label')} ──")
if rath.get('seed_sign'):
lines.append(f" 起运宫: {rath['seed_sign']}(第 {rath.get('strength_level_decided')} 级:{rath.get('strength_level_text')});{rath.get('direction_text')}")
if rath.get('method_note'):
lines.append(f" {rath['method_note']}")
for p in rath.get('mahadasha', [])[:12]:
lines.append(f" {p['sign']:>12s} ({p['lord']:>7s}): {p['years']:2d}年 [{p['start_age']:5.1f}→{p['end_age']:5.1f}]")
rmd = (rath.get('current_dasha') or {}).get('md')
if rmd:
lines.append(f" 当前大运: {rmd['sign']}({rmd['lord']}){rmd['years']}年")
else:
lines.append(f" 起运宫未定({rath.get('reason') or rath.get('status')})")
return "\n".join(lines)