Add comprehensive English README + competitive analysis
README.md changes: - Complete rewrite as professional English project documentation - Add competitive comparison table (vs PyJHora / VedAstro / Maitreya) - Include honest accuracy self-assessment (7.3/10 traditional algo, etc.) - Quick start with 5-minute full-reading example - Technique coverage table (44 techniques with status) - Development rules and contributing guidelines - Truth over coverage philosophy New file: - references/competitive-analysis-2026-06-05.md - PyJHora advantages (50+ Dashas, benchmark harness) - VedAstro advantages (MCP Server, Docker, 200+ endpoints) - Our differentiation (strict workflow, audit table, degradation) - 3-phase optimization roadmap with concrete tasks
This commit is contained in:
@@ -1,369 +1,402 @@
|
||||
# 🪐 Jyotish Vedic Astrology Engine
|
||||
# Jyotish Vedic Astrology — AI-Native Full-Reading System
|
||||
|
||||
**印度占星(Jyotish)专业解盘与推运系统 v6.0.11**
|
||||
> **What makes this different:** This is not a calculator. It is an AI-native Jyotish analysis system that combines calculation engines, interpretive workflows, confidence auditing, and graceful degradation — organized into a reproducible full-reading pipeline.
|
||||
|
||||
基于 Swiss Ephemeris 天文计算库的完整吠陀占星引擎,覆盖从排盘计算到精确推运应期预测的全链路能力。可作为 [WorkBuddy](https://www.codebuddy.cn/) Skill 安装,也可以作为独立 Python CLI 工具使用。
|
||||
[](LICENSE)
|
||||
[](https://www.python.org/)
|
||||
[](references/technique_registry.json)
|
||||
[](references/technique_registry.json)
|
||||
[](references/technique_registry.json)
|
||||
|
||||
## ✨ 核心特性
|
||||
---
|
||||
|
||||
- **🧮 统一计算引擎**:22 个 CLI 子命令,一条命令完成全链路分析
|
||||
- **🔮 全自动综合解盘**:`full-reading` 一键串联 13 个计算模块
|
||||
- **📐 BPHS 十六分盘**:D2-D60 全部 16 种分盘精确计算
|
||||
- **👁️ 精确相位系统**:度数级 Drishti 相位分析(tight/moderate/loose)
|
||||
- **📿 Jaimini 系统**:Chara Karaka 7/8 + Karakamsha(AK);Chara Dasha timing 当前为 partial
|
||||
- **🌟 高级 Nakshatra**:Tara Bala + Sub-Lord KP 系统 + Nakshatra三计数体系
|
||||
- **🚪 Argala 门闩系统**:行星干预 + Virodha 反干预
|
||||
- **🎂 Tajika 年运盘**:Muntha + YearLord + Mudda Dasha + Tri-Pataka三旗
|
||||
- **💑 合盘分析**:Ashta Koota 36 分制 + Mangal Dosha + Papasamya
|
||||
- **💪 Shadbala 六重力量**:内部一致的六力参考(外部绝对值校准前为 partial;2026-06-04 第九轮不变量 1200/1200 通过)
|
||||
- **🎯 Ashtakavarga 八分法**:BPHS 完整表(SAV=337)
|
||||
- **✅ R1-R10 数学验证** + **P1-P12 行星审计管线**
|
||||
- **🔒 MEVG 强制外部验证**:v4.2.0 新增,所有解读结论必须外部验证(禁止仅凭AI训练记忆)
|
||||
- **📊 Transit Actionable Output**:v4.1.0 新增,明确时间段+行动类型+置信度
|
||||
- **🔮 Prashna 问事占星**:BCP自然周期+Arudha Lagna+Trisphuta+Gulika+Chor Graha
|
||||
- **⏰ 多Dasha系统**:Vimshottari + Chara + Narayana + Yogini + Moola + Ashtottari等8种
|
||||
## Table of Contents
|
||||
|
||||
## 📋 系统要求
|
||||
- [What Is This](#what-is-this)
|
||||
- [Quick Start](#quick-start)
|
||||
- [Core Workflow](#core-workflow)
|
||||
- [Technique Coverage](#technique-coverage)
|
||||
- [Why This Exists (Competitive Context)](#why-this-exists)
|
||||
- [Honest Assessment](#honest-assessment)
|
||||
- [Project Status](#project-status)
|
||||
- [Development](#development)
|
||||
- [Contributing](#contributing)
|
||||
- [License](#license)
|
||||
|
||||
- **Python**: 3.11+
|
||||
- **核心依赖**: `pyswisseph`(Swiss Ephemeris 天文计算库)
|
||||
- **可选依赖**: `requests`(名人数据查询)、`pandas`(批量数据处理)
|
||||
---
|
||||
|
||||
## 🚀 快速安装
|
||||
## What Is This
|
||||
|
||||
### 1. 克隆仓库
|
||||
This is a **Vedic (Jyotish) astrology analysis system** designed for deep, auditable full-chart readings. It is NOT a simple ephemeris calculator — it is a multi-stage interpretive pipeline that:
|
||||
|
||||
1. **Computes** divisional charts (D1/D9/D10/...) via Swiss Ephemeris
|
||||
2. **Runs** 44+ techniques (Dashas, Yogas, Shadbala, Ashtakavarga, Transits...)
|
||||
3. **Routes** the analysis through strict workflow paths depending on question type (career / relationship / wealth / timing)
|
||||
4. **Audits** every technique used — declaring what was called, what was partial, what was missing, and how that affects confidence
|
||||
5. **Degrades gracefully** — partial techniques are labeled, not silently over-promising
|
||||
|
||||
### Key Differentiators (vs. PyJHora / VedAstro / Maitreya)
|
||||
|
||||
| Feature | This Project | PyJHora | VedAstro | Maitreya |
|
||||
|---------|-------------|----------|----------|----------|
|
||||
| Full-reading pipeline (one command) | ✅ | ❌ | ❌ | ❌ |
|
||||
| Strict workflow router (per-question-type) | ✅ | ❌ | ❌ | ❌ |
|
||||
| Technique Audit Table (confidence labeling) | ✅ | ❌ | ❌ | ❌ |
|
||||
| Capability degradation (partial ≠ covered) | ✅ | ❌ | ❌ | ❌ |
|
||||
| MEVG external verification gates | ✅ | ❌ | ❌ | ❌ |
|
||||
| 44+ techniques integrated | ✅ | ✅ (50+) | ✅ (200+) | ✅ |
|
||||
| Traditional algorithm benchmarked | 🔶 partial | ✅ | ✅ | ✅ |
|
||||
| Docker / MCP Server | 🔶 planned | ❌ | ✅ | ❌ |
|
||||
| English docs / PyPI package | 🔶 in progress | ✅ | ✅ | ✅ |
|
||||
|
||||
---
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Python 3.11+
|
||||
- Swiss Ephemeris (`pyswisseph` or `ephem`)
|
||||
- Optional: `pypdf`, `pdfplumber` (for PDF chart input)
|
||||
|
||||
### Install
|
||||
|
||||
```bash
|
||||
# HTTPS(推荐,无需配置 SSH key)
|
||||
# Clone the repository
|
||||
git clone https://github.com/732642856/yinduzhanxing.git
|
||||
cd yinduzhanxing
|
||||
|
||||
# 或 SSH
|
||||
git clone git@github.com:732642856/yinduzhanxing.git
|
||||
cd yinduzhanxing
|
||||
```
|
||||
|
||||
### 2. 安装 Python 依赖
|
||||
|
||||
```bash
|
||||
# Install Python dependencies
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Verify installation
|
||||
python3 scripts/audit_capabilities.py --mode validate
|
||||
# Expected: valid=true, problem_count=0
|
||||
```
|
||||
|
||||
### 3. 验证安装
|
||||
### Minimal Full Reading (5 minutes)
|
||||
|
||||
```bash
|
||||
python3 scripts/jyotish_engine.py chart --year 1990 --month 1 --day 1 --hour 12 --minute 0 --lat 39.9 --lon 116.4 --tz 8
|
||||
```
|
||||
|
||||
如果输出包含行星位置 JSON,说明安装成功。
|
||||
|
||||
## 🎯 使用方法
|
||||
|
||||
### 三种输入路径
|
||||
|
||||
| 路径 | 适用场景 | 操作 |
|
||||
|------|---------|------|
|
||||
| **路径 A** | 有精确出生信息(日期+时间+地点) | 直接调用 `full-reading` |
|
||||
| **路径 B** | 有 PDF/文字星盘报告 | 提取数据后分析(无需重新排盘) |
|
||||
| **路径 C** | 出生时间不明确 | 互动式矫正 → 确认后走路径 A |
|
||||
|
||||
### 路径 A:精准出生信息(推荐)
|
||||
|
||||
```bash
|
||||
# 一键全链路计算(13 模块自动串行)
|
||||
python3 scripts/jyotish_engine.py full-reading \
|
||||
--year 1990 --month 1 --day 1 --hour 12 --minute 0 \
|
||||
--lat 39.9 --lon 116.4 --tz 8
|
||||
|
||||
# 输出包含:
|
||||
# chart + dasha + yoga + varga_full + aspects + jaimini +
|
||||
# nakshatra_adv + argala + tajika + shadbala + ashtakavarga +
|
||||
# validation + audit
|
||||
--year 1990 --month 6 --day 15 \
|
||||
--hour 10 --minute 30 \
|
||||
--lat 28.6139 --lon 77.2090 --tz 5.5 \
|
||||
--age 36 \
|
||||
--transit-date 2026-06-04
|
||||
```
|
||||
|
||||
### 单模块调用
|
||||
**Output:** ~45 computed modules, zero errors, complete structured reading with technique audit table.
|
||||
|
||||
### Sample Output (abbreviated)
|
||||
|
||||
```
|
||||
═══ FULL READING ═══
|
||||
Birth Data: 1990-06-15 10:30 (+5.5) 28.61°N 77.21°E
|
||||
Lagna: Gemini Sun: Taurus Moon: Leo
|
||||
|
||||
── Static Analysis ──
|
||||
[✓] D1 Rashi Chart
|
||||
[✓] D9 Navamsa
|
||||
[✓] D10 Dasamsa
|
||||
[✓] Vimshottari Dasha (120 years)
|
||||
[✓] Ashtakavarga (8-point system)
|
||||
[✓] Shadbala (partial — internal invariants pass, external calibration pending)
|
||||
[✓] Yogas & Doshas
|
||||
[✓] Argala (planetary interventions)
|
||||
[✓] Nakshatra Advanced (Chandra Bala / Tara Bala)
|
||||
|
||||
── Dynamic Timing ──
|
||||
[✓] Vimshottari Dasha breakdown
|
||||
[✓] Dasha Sandhi detection
|
||||
[✓] Transit (true positions)
|
||||
[✓] Double Transit analysis
|
||||
[✓] Narayana Dasha
|
||||
[✓] Solar Return / Varshaphala (partial)
|
||||
[✓] Nakshatra Dasha (Ashtottari)
|
||||
|
||||
── Technique Audit Table ──
|
||||
✓ Vimshottari Dasha covered high confidence
|
||||
✓ Ashtakavarga covered high confidence
|
||||
🔶 Shadbala partial internal consistent, external calibration pending
|
||||
🔶 Chara Dasha partial simplified (24% match with PyJHora KN Rao)
|
||||
❌ KP Sub-Lord missing not yet implemented
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Core Workflow
|
||||
|
||||
### Three Input Paths
|
||||
|
||||
| Path | Input | Behavior |
|
||||
|------|-------|----------|
|
||||
| **A: Precise birth data** | Date + time + coordinates | Full `full-reading` engine |
|
||||
| **B: PDF / text chart** | Scanned chart or description | Extract → Quality Gate → route to A |
|
||||
| **C: Uncertain birth time** | "Don't know my birth time" | Interactive birth time rectification |
|
||||
|
||||
### Eight-Stage Pipeline
|
||||
|
||||
```
|
||||
Stage -1: Question-type routing (career / relationship / wealth / timing)
|
||||
Stage 0: Input routing (A / B / C)
|
||||
Stage 1: (B only) PDF extraction + Quality Gate
|
||||
Stage 2: Intent recognition → target house routing
|
||||
Stage 3: Static analysis (10 steps)
|
||||
Stage 4: Dynamic timing (7 steps)
|
||||
Stage 5: Timing output (5-layer verification)
|
||||
Stage 6: Remedial measures (optional)
|
||||
Stage 7: Modern language packaging
|
||||
Stage 8: Technique Audit Table (mandatory)
|
||||
```
|
||||
|
||||
**Strict Workflow Router** (`references/strict-workflow-router.md`):
|
||||
- Career questions → `career-timing-strict`
|
||||
- Relationship questions → `relationship-timing-strict`
|
||||
- Wealth questions → `wealth-timing-strict`
|
||||
- Event timing → `event-timing-strict`
|
||||
- Historical verification → `event-verification-strict`
|
||||
|
||||
The AI does NOT require the user to name techniques (e.g., "Chara Dasha"). It auto-selects based on question type.
|
||||
|
||||
---
|
||||
|
||||
## Technique Coverage
|
||||
|
||||
Current count: **44 techniques** (26 covered, 18 partial, 0 missing)
|
||||
|
||||
| Technique | Status | Notes |
|
||||
|-----------|--------|-------|
|
||||
| D1 Rashi Chart | ✅ covered | Swiss Eph base |
|
||||
| D9 Navamsa | ✅ covered | |
|
||||
| D10 Dasamsa | ✅ covered | |
|
||||
| Vimshottari Dasha | ✅ covered | |
|
||||
| Dasha Sandhi | ✅ covered | |
|
||||
| Ashtakavarga | ✅ covered | BPHS/PVR calibrated |
|
||||
| Argala | ✅ covered | |
|
||||
| Vargottama | ✅ covered | |
|
||||
| Pushkara | ✅ covered | |
|
||||
| A10 / Karma Pada | ✅ covered | |
|
||||
| UL / Upapada | ✅ covered | |
|
||||
| Transit (true positions) | ✅ covered | |
|
||||
| Double Transit | ✅ covered | |
|
||||
| Nakshatra Advanced | 🔶 partial | Engineering usable, needs more external benchmarking |
|
||||
| Narayana Dasha | 🔶 partial | Usable, needs traditional benchmark |
|
||||
| Solar Return / Varshaphala | 🔶 partial | Usable, some degradation logic present |
|
||||
| **Shadbala** | 🔶 partial | **1200/1200 internal invariants pass; external absolute calibration NOT yet done** |
|
||||
| **Chara Dasha** | 🔶 partial | **~24% match with PyJHora KN Rao method; do NOT use for high-confidence timing** |
|
||||
| KP Sub-Lord | 🔶 partial | Simplified 9-equal division; not full KP |
|
||||
| Bhava Chalit | 🔶 partial | Whole-sign adapter present; not full cusp-based reassignment |
|
||||
| Sudarshana Chakra | 🔶 partial | D1×D9×D10 triangle verification; not traditional full implementation |
|
||||
| Tajika Yogas | 🔶 partial | Simplified rules |
|
||||
| Raj Yoga | 🔶 partial | Classic combinations covered; not all variants |
|
||||
| Dhana Yoga | 🔶 partial | |
|
||||
| Pancha Mahapurusha | 🔶 partial | |
|
||||
| Neecha Bhanga | 🔶 partial | |
|
||||
| Sade Sati | 🔶 partial | Simplified model |
|
||||
| Tithi Lord | 🔶 partial | |
|
||||
| Pancha Pakshi | 🔶 partial | |
|
||||
| Rashi Tulya Navamsa | 🔶 partial | |
|
||||
| Trimshamsa D30 | 🔶 partial | |
|
||||
| Marriage Counting | 🔶 partial | Bhrigu Pada approximation |
|
||||
| Prashna Integration | 🔶 partial | Not fully integrated into full-reading |
|
||||
| Bhrigu Pada Dasha | 🔶 partial | Generic approximation |
|
||||
| Muhurta | 🔶 partial | Panchanga elements present |
|
||||
|
||||
**Legend:**
|
||||
- ✅ `covered` — implemented and benchmarked against authoritative sources
|
||||
- 🔶 `partial` — implemented but NOT fully benchmarked; suitable for auxiliary reference only
|
||||
- ❌ `missing` — not yet implemented
|
||||
|
||||
---
|
||||
|
||||
## Why This Exists (Competitive Context)
|
||||
|
||||
### The Landscape
|
||||
|
||||
| Project | Type | Strength | Weakness |
|
||||
|---------|------|----------|-----------|
|
||||
| **PyJHora** | Calculation library | Strongest traditional algorithm coverage (50+ Dashas, 284 Yogas) | No interpretive pipeline; user must interpret results themselves |
|
||||
| **VedAstro** | API / Web platform | 200+ endpoints, Docker, MCP Server, MIT license | Interpretive audit & confidence labeling weaker |
|
||||
| **Maitreya** | Desktop software | Mature cross-platform GUI | Jyotish depth not as deep as specialized projects |
|
||||
| **jyotisha** | Panchanga / calendar | Excellent Panchanga accuracy | Not a full reading system |
|
||||
| **This project** | AI-native analysis system | Full pipeline + audit + degradation | Pure calculation accuracy still being benchmarked |
|
||||
|
||||
### Our Position
|
||||
|
||||
> **PyJHora is the calculator. VedAstro is the API platform. Maitreya is the desktop software. This project is the "AI-native Jyotish research analyst."**
|
||||
|
||||
We are NOT trying to out-calculate PyJHora (it has years of lead). Our value is in:
|
||||
1. Organizing calculations into a **reproducible interpretive workflow**
|
||||
2. **Auditing** every technique used and declaring confidence
|
||||
3. **Degrading gracefully** — partial techniques are labeled, not silently over-promising
|
||||
4. Being **AI-native** — designed for integration with LLM-based analysis
|
||||
|
||||
---
|
||||
|
||||
## Honest Assessment
|
||||
|
||||
We believe in transparency about limitations. This is NOT a "99% accurate" system, and anyone claiming that about Jyotish is over-selling.
|
||||
|
||||
### Current Accuracy Estimates (self-evaluated)
|
||||
|
||||
| Dimension | Score | Notes |
|
||||
|-----------|-------|-------|
|
||||
| Astronomical foundation (Swiss Eph) | 8.5/10 | Depends on ayanamsa, node mode, house system |
|
||||
| Traditional algorithm accuracy | 7.3/10 | Chara Dasha & Shadbala need external calibration |
|
||||
| Technique coverage breadth | 8.6/10 | 44 techniques, broad but not deepest |
|
||||
| Reading detail depth | 9.6/10 | Possibly best among open-source projects |
|
||||
| Prediction workflow rigor | 8.8/10 | Strict routing + audit table |
|
||||
| Verification system | 8.2/10 | Has registry, benchmark, degradation; some verification still internal |
|
||||
| Engineering maturity | 6.8/10 | Functional, but not productized (no Docker / PyPI / CI yet) |
|
||||
| Open-source influence | 5.5/10 | Currently more of a "private high-density toolkit" |
|
||||
|
||||
### What "Partial" Means (Important)
|
||||
|
||||
When a technique is labeled `partial`:
|
||||
- It CAN produce output
|
||||
- The output has NOT been benchmarked against PyJHora / JHora / canonical texts
|
||||
- It should be used as **auxiliary reference only**
|
||||
- It must NOT be the sole basis for high-confidence predictions
|
||||
|
||||
Examples:
|
||||
- `Shadbala` (partial): Internal invariants pass (1200/1200). External absolute values NOT calibrated. Use for relative strength ranking only.
|
||||
- `Chara Dasha` (partial): ~24% match with PyJHora KN Rao method. Do NOT use for precise timing.
|
||||
|
||||
---
|
||||
|
||||
## Project Status
|
||||
|
||||
**Current version:** `v6.0.23-full-reading-regression`
|
||||
|
||||
### Recently Completed
|
||||
|
||||
- `v6.0.11` — Shadbala internal invariant validation (1200/1200 pass); downgraded to `partial`
|
||||
- `v6.0.18` — Solar Return / Varshaphala + Muntha
|
||||
- `v6.0.20` — Narayana Dasha / Rishi Dasha
|
||||
- `v6.0.21` — Muhurta (Panchanga-based electional astrology)
|
||||
- `v6.0.22` — Nakshatra Advanced (Chandra Bala / Tara Bala)
|
||||
- `v6.0.23` — Full-reading regression fix (45 modules, 0 errors)
|
||||
|
||||
### Actively Working On (P0)
|
||||
|
||||
1. **Chara Dasha rewrite** — align with PyJHora KN Rao method (target: ≥95% match)
|
||||
2. **Shadbala external calibration** — align with JHora / PyJHora / BV Raman
|
||||
3. **KP Sub-Lord full implementation** — unequal Vimshottari subdivisions
|
||||
4. **Bhava Chalit complete** — cusp-based planet reassignment
|
||||
5. **Sudarshana Chakra traditional** — Sun/Moon/Lagna reference points
|
||||
|
||||
### Next (P1)
|
||||
|
||||
- Benchmark harness (PyJHora output comparison)
|
||||
- English documentation completion
|
||||
- Docker image
|
||||
- MCP Server endpoint
|
||||
- GitHub Actions CI
|
||||
|
||||
---
|
||||
|
||||
## Development
|
||||
|
||||
### Running the Test Suite
|
||||
|
||||
```bash
|
||||
# 基础星盘计算
|
||||
python3 scripts/jyotish_engine.py chart \
|
||||
--year 1990 --month 1 --day 1 --hour 12 --minute 0 \
|
||||
--lat 39.9 --lon 116.4 --tz 8 --validate
|
||||
# Syntax check all scripts
|
||||
python3 -m py_compile scripts/*.py
|
||||
|
||||
# Vimshottari 大运时间线
|
||||
python3 scripts/jyotish_engine.py dasha \
|
||||
--moon-lon 326.5 --birthdate 1990-01-01 --today 2026-04-25
|
||||
# Capability audit (must pass with 0 problems, 0 warnings)
|
||||
python3 scripts/audit_capabilities.py --mode validate
|
||||
|
||||
# Yoga 格局识别
|
||||
python3 scripts/jyotish_engine.py yoga \
|
||||
--ascendant Leo --planets 'Sun:Aries:9,Moon:Aquarius:7,...'
|
||||
|
||||
# 十六分盘计算
|
||||
python3 scripts/jyotish_engine.py varga-full \
|
||||
--year 1990 --month 1 --day 1 --hour 12 --minute 0 \
|
||||
--lat 39.9 --lon 116.4 --tz 8 --divisions D9,D60
|
||||
|
||||
# 精确相位分析
|
||||
python3 scripts/jyotish_engine.py aspects \
|
||||
--year 1990 --month 1 --day 1 --hour 12 --minute 0 \
|
||||
--lat 39.9 --lon 116.4 --tz 8
|
||||
|
||||
# Jaimini 系统(Chara Karaka + Karakamsha;Chara Dasha timing 当前 partial)
|
||||
python3 scripts/jyotish_engine.py jaimini \
|
||||
--year 1990 --month 1 --day 1 --hour 12 --minute 0 \
|
||||
--lat 39.9 --lon 116.4 --tz 8 --mode all
|
||||
|
||||
# 高级 Nakshatra(Tara Bala + Sub-Lord)
|
||||
python3 scripts/jyotish_engine.py nakshatra-adv \
|
||||
--year 1990 --month 1 --day 1 --hour 12 --minute 0 \
|
||||
--lat 39.9 --lon 116.4 --tz 8 --mode all
|
||||
|
||||
# Argala 门闩分析
|
||||
python3 scripts/jyotish_engine.py argala \
|
||||
--year 1990 --month 1 --day 1 --hour 12 --minute 0 \
|
||||
--lat 39.9 --lon 116.4 --tz 8
|
||||
|
||||
# Tajika 年运盘
|
||||
python3 scripts/jyotish_engine.py tajika \
|
||||
--year 1990 --month 1 --day 1 --hour 12 --minute 0 \
|
||||
--lat 39.9 --lon 116.4 --tz 8 --age 33
|
||||
|
||||
# Shadbala 六重力量
|
||||
python3 scripts/jyotish_engine.py shadbala \
|
||||
--year 1990 --month 1 --day 1 --hour 12 --minute 0 \
|
||||
--lat 39.9 --lon 116.4 --tz 8
|
||||
|
||||
# Ashtakavarga 八分法
|
||||
python3 scripts/jyotish_engine.py ashtakavarga \
|
||||
--year 1990 --month 1 --day 1 --hour 12 --minute 0 \
|
||||
--lat 39.9 --lon 116.4 --tz 8
|
||||
|
||||
# 合盘分析(Ashta Koota 36 分制)
|
||||
python3 scripts/jyotish_engine.py synastry \
|
||||
--moon1 310.89 --moon2 45.5 --mars1 90.43 --mars2 120.3
|
||||
|
||||
# 事件预测
|
||||
python3 scripts/jyotish_engine.py predict \
|
||||
--chart '<JSON>' --event-type marriage
|
||||
|
||||
# 名人案例查询
|
||||
python3 scripts/jyotish_engine.py celebrity --name Einstein
|
||||
|
||||
# R1-R10 数学验证
|
||||
python3 scripts/jyotish_engine.py validate \
|
||||
--year 1990 --month 1 --day 1 --hour 12 --minute 0 \
|
||||
--lat 39.9 --lon 116.4 --tz 8
|
||||
|
||||
# P1-P12 行星审计
|
||||
python3 scripts/jyotish_engine.py audit \
|
||||
--year 1990 --month 1 --day 1 --hour 12 --minute 0 \
|
||||
--lat 39.9 --lon 116.4 --tz 8
|
||||
|
||||
# 行星过境查询
|
||||
python3 scripts/jyotish_engine.py transit --year 2026 --month 7
|
||||
|
||||
# MD → HTML 报告生成(羊皮纸主题)
|
||||
python3 scripts/jyotish_engine.py report ./report_folder \
|
||||
--name "名字" --lagna "Leo" --lang cn
|
||||
```
|
||||
|
||||
### 全部 22 个子命令速查
|
||||
|
||||
| 子命令 | 功能 | 核心参数 |
|
||||
|--------|------|----------|
|
||||
| **`full-reading`** | ⭐ 全自动综合解盘(13 模块) | `--year/month/day/hour/minute/lat/lon/tz` |
|
||||
| `chart` | 完整星盘计算 | `--year/month/day/hour/minute/lat/lon/tz` |
|
||||
| `dasha` | Vimshottari 大运时间线 | `--moon-lon --birthdate --today` |
|
||||
| `yoga` | Yoga 格局识别 | `--ascendant --planets` |
|
||||
| `predict` | 三层验证法事件预测 | `--chart --event-type` |
|
||||
| `varga` | 分盘计算(D9/D10) | `--year/month/day/hour/minute/lat/lon/tz` |
|
||||
| `varga-full` | BPHS 十六分盘(D2-D60) | `--divisions D9,D60` |
|
||||
| `aspects` | 度数精确相位(Drishti) | 出生信息 |
|
||||
| `jaimini` | Jaimini Karaka/Karakamsha;Chara Dasha timing partial | `--mode all` |
|
||||
| `nakshatra-adv` | 高级 Nakshatra 分析 | `--mode all` |
|
||||
| `argala` | Argala 门闩系统 | 出生信息 |
|
||||
| `tajika` | Tajika 年运盘 | `--age 33` |
|
||||
| `synastry` | 合盘分析 | `--moon1/2 --mars1/2` |
|
||||
| `shadbala` | 六重力量计算(内部一致;外部绝对值校准前 partial) | 出生信息 |
|
||||
| `ashtakavarga` | 八分法(SAV=337) | 出生信息 |
|
||||
| `validate` | R1-R10 数学验证 | 出生信息 |
|
||||
| `audit` | P1-P12 行星审计 | 出生信息 |
|
||||
| `celebrity` | 名人案例查询 | `--name` |
|
||||
| `db-stats` | 数据库统计 | 无 |
|
||||
| `transit` | 行星过境查询 | `--year --month` |
|
||||
| `memory` | Hermes 记忆系统 | `--action store/search` |
|
||||
| `report` | MD→HTML 报告 | 文件夹路径 |
|
||||
|
||||
## 📁 目录结构
|
||||
|
||||
```
|
||||
yinduzhanxing/
|
||||
├── README.md # 本文件
|
||||
├── CHANGELOG.md # 版本更新日志
|
||||
├── SKILL.md # WorkBuddy Skill 配置文件
|
||||
├── requirements.txt # Python 依赖
|
||||
├── .gitignore # Git 忽略规则
|
||||
│
|
||||
├── scripts/ # 计算引擎(19 个 Python 文件)
|
||||
│ ├── jyotish_engine.py # ⭐ 统一 CLI 入口(22 子命令)
|
||||
│ ├── varga.py # BPHS 十六分盘
|
||||
│ ├── aspects.py # 精确相位系统
|
||||
│ ├── jaimini.py # Jaimini 系统
|
||||
│ ├── nakshatra_advanced.py # 高级 Nakshatra
|
||||
│ ├── argala.py # Argala 门闩
|
||||
│ ├── tajika.py # Tajika 年运盘
|
||||
│ ├── synastry.py # 合盘分析
|
||||
│ ├── shadbala.py # Shadbala 六重力量
|
||||
│ ├── ashtakavarga.py # Ashtakavarga 八分法
|
||||
│ ├── event_prediction_model.py # 事件预测规则引擎
|
||||
│ ├── validate.py # R1-R10 数学验证
|
||||
│ ├── dasha_calculator.py # Dasha 计算
|
||||
│ ├── dasha_calculator_enhanced.py # 增强版 Dasha
|
||||
│ ├── dasha_analyzer.py # Dasha 分析器
|
||||
│ ├── hermes_bridge.py # Hermes 桥接层
|
||||
│ ├── hermes_memory_core.py # Hermes 记忆核心
|
||||
│ ├── report_builder.py # MD→HTML 报告生成
|
||||
│ └── example.py # 示例脚本
|
||||
│
|
||||
├── references/ # 知识库(74 个 Markdown 文件)
|
||||
│ ├── ai-reading-workflow-prompt.md # ⭐ AI 解盘工作流 v3.0
|
||||
│ ├── pdf-chart-reading-guide.md # PDF 星盘读取指南
|
||||
│ ├── birth-time-rectification-advanced.md # 出生时间矫正
|
||||
│ ├── jaimini-complete-system.md # Jaimini 完整体系
|
||||
│ ├── kp-astrology-complete-system.md # KP 占星体系
|
||||
│ ├── ... (详见 SKILL.md 参考资料)
|
||||
│
|
||||
└── assets/ # 模板文件
|
||||
├── birth_time_rectification_template.md # 矫正信息收集模板
|
||||
├── chart_analysis_template.md # 星盘分析模板
|
||||
├── event_timing_template.md # 事件时机模板
|
||||
└── timing-prediction-template.md # 推运应期模板
|
||||
```
|
||||
|
||||
## 🔧 作为 WorkBuddy Skill 使用
|
||||
|
||||
本项目是一个标准的 WorkBuddy Skill,安装后在 WorkBuddy 对话中用自然语言即可触发,无需手动输入 CLI 命令。
|
||||
|
||||
### 方法 1:手动安装(推荐)
|
||||
|
||||
```bash
|
||||
# HTTPS(推荐,无需配置 SSH key)
|
||||
git clone https://github.com/732642856/yinduzhanxing.git \
|
||||
~/.workbuddy/skills/jyotish-vedic-astrology
|
||||
|
||||
# 或 SSH
|
||||
git clone git@github.com:732642856/yinduzhanxing.git \
|
||||
~/.workbuddy/skills/jyotish-vedic-astrology
|
||||
```
|
||||
|
||||
安装后,在 WorkBuddy 对话中提到任何印度占星相关关键词(如"印度占星"、"Jyotish"、"解盘"、"推运"等),Skill 即自动激活。
|
||||
|
||||
### 方法 2:下载 ZIP(无需 git)
|
||||
|
||||
如果电脑没有 git,可以直接下载:
|
||||
|
||||
1. 打开 https://github.com/732642856/yinduzhanxing
|
||||
2. 点击绿色 **Code** 按钮 → **Download ZIP**
|
||||
3. 解压到 `~/.workbuddy/skills/jyotish-vedic-astrology/` 目录
|
||||
4. 确保目录下有 `SKILL.md` 文件
|
||||
|
||||
### 方法 3:Skill 市场一键安装
|
||||
|
||||
> **状态**:待上架。欢迎 WorkBuddy 团队审核后收录到官方市场(`codebuddy-plugins-official`)。
|
||||
>
|
||||
> 上架后,用户可在 WorkBuddy 技能市场搜索 `jyotish-vedic-astrology` 一键安装。
|
||||
|
||||
**WorkBuddy 团队上架参考**:
|
||||
|
||||
| 项目 | 说明 |
|
||||
|------|------|
|
||||
| Skill 名称 | `jyotish-vedic-astrology` |
|
||||
| 仓库 | https://github.com/732642856/yinduzhanxing |
|
||||
| 入口文件 | `SKILL.md`(根目录) |
|
||||
| 计算引擎 | `scripts/jyotish_engine.py`(Python 3.11+,依赖 `pyswisseph`) |
|
||||
| 知识库 | `references/`(100+ Markdown 文件) |
|
||||
| 系统要求 | macOS / Linux / Windows,Python 3.11+,`pip install -r requirements.txt` |
|
||||
| 自动安装依赖 | 引擎首次运行时检测 `pyswisseph`,缺失则提示安装 |
|
||||
| 语言 | 中文为主,技术术语英文 |
|
||||
| 授权 | 学习与研究用途 |
|
||||
|
||||
### Skill 触发词
|
||||
|
||||
以下关键词可触发 Skill:
|
||||
- 印度占星、吠陀占星、Jyotish、印占
|
||||
- 解盘、推运、星盘分析、排盘、计算星盘
|
||||
- Dasha、Transit、Nakshatra、Yoga
|
||||
- 出生时间矫正、生时矫正
|
||||
- Shadbala、Ashtakavarga、Drishti、Jaimini
|
||||
- 合盘、婚姻匹配、年运盘
|
||||
- 以及更多(详见 SKILL.md)
|
||||
|
||||
## 🧪 验证与测试
|
||||
|
||||
```bash
|
||||
# 运行 full-reading smoke test(虚构示例数据)
|
||||
# Full-reading regression test (use FICTIONAL data only)
|
||||
python3 scripts/jyotish_engine.py full-reading \
|
||||
--year 1990 --month 1 --day 1 --hour 12 --minute 0 \
|
||||
--lat 39.9 --lon 116.4 --tz 8
|
||||
|
||||
# 预期输出:12 modules computed, 0 errors
|
||||
--year 1990 --month 6 --day 15 \
|
||||
--hour 10 --minute 30 \
|
||||
--lat 39.9042 --lon 116.4074 --tz 8 \
|
||||
--age 36 \
|
||||
--transit-date 2026-06-04
|
||||
```
|
||||
|
||||
## 📊 数据源
|
||||
### Important Rules
|
||||
|
||||
引擎自动读取以下外部数据(如存在):
|
||||
1. **NEVER** put real user birth data into skill files, tests, CHANGELOG, or public repos
|
||||
2. Use only: (a) public AA-rated celebrity data, (b) explicitly fictional smoke tests, (c) current-session data (never persisted)
|
||||
3. Always run `git status --short --branch` before starting work
|
||||
4. Always run `py_compile` + `audit_capabilities.py` + full-reading regression after modifications
|
||||
5. Do NOT upgrade `partial` to `covered` without external benchmark evidence
|
||||
6. Do NOT refactor arbitrarily; make minimal verifiable changes
|
||||
|
||||
| 数据源 | 路径 | 说明 |
|
||||
|--------|------|------|
|
||||
| 验证数据库 | `~/WorkBuddy/Claw/vedic_astrology_validation.db` | 15,840 条案例 |
|
||||
| 名人 CSV | `~/WorkBuddy/Claw/vedastro_data/PersonList-15k.csv` | 15,807 条 AA 级数据 |
|
||||
| 过境配置 | `~/WorkBuddy/Claw/月运过境配置-2026-2028.json` | 36 个月行星位置 |
|
||||
|
||||
> 💡 数据源为可选依赖,不影响基础星盘计算功能。
|
||||
|
||||
## 🛠️ 技术架构
|
||||
### Directory Structure
|
||||
|
||||
```
|
||||
输入层:出生信息 / PDF星盘 / 互动矫正
|
||||
↓
|
||||
路由层:自动识别三条路径(A/B/C)
|
||||
↓
|
||||
计算层:Swiss Ephemeris + Lahiri Ayanamsa 恒星黄道
|
||||
├── chart(星盘计算)
|
||||
├── dasha(大运时间线)
|
||||
├── yoga(格局识别)
|
||||
├── varga-full(十六分盘)
|
||||
├── aspects(精确相位)
|
||||
├── jaimini(Jaimini 系统)
|
||||
├── nakshatra-adv(高级 Nakshatra)
|
||||
├── argala(门闩分析)
|
||||
├── tajika(年运盘)
|
||||
├── shadbala(六重力量)
|
||||
├── ashtakavarga(八分法)
|
||||
├── validate(数学验证)
|
||||
└── audit(行星审计)
|
||||
↓
|
||||
输出层:JSON 数据 → AI 解读 → HTML 报告
|
||||
jyotish-vedic-astrology/
|
||||
├── SKILL.md # Core entry point (Chinese)
|
||||
├── README.md # This file (English)
|
||||
├── CHANGELOG.md # Version history
|
||||
├── requirements.txt # Python dependencies
|
||||
├── references/
|
||||
│ ├── technique_registry.json # Machine-readable technique registry
|
||||
│ ├── strict-workflow-router.md # Question-type routing rules
|
||||
│ ├── quick-reference-guide.md # Quick reference
|
||||
│ └── ... # Knowledge reference docs
|
||||
├── scripts/
|
||||
│ ├── jyotish_engine.py # Main engine entry point
|
||||
│ ├── audit_capabilities.py # Capability audit tool
|
||||
│ ├── shadbala.py # Shadbala implementation
|
||||
│ ├── dasha_calculator.py # Dasha calculations
|
||||
│ └── ... # 30+ technique scripts
|
||||
└── tests/ # Test cases
|
||||
```
|
||||
|
||||
## 📜 版本历史
|
||||
---
|
||||
|
||||
详见 [CHANGELOG.md](./CHANGELOG.md)。
|
||||
## Contributing
|
||||
|
||||
- **v6.0.0** (2026-05-05):反教条主义实战经验整合 + 全球占星师误区总结 + 中文技法论文洞察
|
||||
- **v5.0.0** (2026-05-04):27 子命令 + full-reading 19 模块 + 深度数据审计(修复5个P0级Bug)
|
||||
- **v4.2.0** (2026-04-28):MEVG 强制外部验证 + Transit Actionable Output
|
||||
- **v3.7.1** (2026-04-25):`full-reading` 全自动综合解盘 + 三条入口路径路由
|
||||
- **v3.7.0** (2026-04-25):7 大新模块(分盘/相位/Jaimini/Nakshatra/Argala/Tajika/合盘)
|
||||
- **v3.6.0** (2026-04-24):报告生成器 + R2b 校验 + P3/P8/冲突仲裁
|
||||
- **v3.5.0** (2026-04-24):BPHS 完整表校准 + R1-R10 验证 + P1-P12 审计
|
||||
We welcome contributions, especially:
|
||||
|
||||
## 📄 许可证
|
||||
1. **Benchmark data** — PyJHora / JHora output comparisons for specific techniques
|
||||
2. **Traditional text verification** — checking technique implementations against BPHS, PVN Rao, BV Raman
|
||||
3. **Documentation** — English docs, tutorials, example outputs
|
||||
4. **Engineering** — Docker, CI, MCP Server, API layer
|
||||
5. **Test cases** — fictional birth data with expected outputs
|
||||
|
||||
本项目仅供学习与研究使用。
|
||||
### How to Contribute
|
||||
|
||||
## 🙏 致谢
|
||||
1. Fork the repository
|
||||
2. Create a feature branch (`git checkout -b fix/chara-dasha-benchmark`)
|
||||
3. Make your changes (follow the development rules above)
|
||||
4. Run the full test suite
|
||||
5. Commit with a clear message
|
||||
6. Push and create a Pull Request
|
||||
|
||||
- [Swiss Ephemeris](https://www.astro.com/swisseph/) — 天文计算核心
|
||||
- KN Rao 学派框架 — 方法论参考
|
||||
- CNWU16/vedic-astro-skills — 报告生成器灵感
|
||||
- BPHS(Brihat Parashara Hora Shastra)— 经典理论来源
|
||||
### Philosophy
|
||||
|
||||
We prioritize **truth over coverage**. It is better to have 10 well-benchmarked techniques than 50 poorly-implemented ones. If you contribute a technique, please include:
|
||||
- The source text / authority it is based on
|
||||
- Benchmark comparison data (if available)
|
||||
- Honest assessment of limitations
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
MIT License — see [LICENSE](LICENSE) for details.
|
||||
|
||||
---
|
||||
|
||||
## Acknowledgments
|
||||
|
||||
- **Swiss Ephemeris** — astronomical calculation foundation
|
||||
- **PyJHora** (`naturalstupid/PyJHora`) — benchmark reference for traditional algorithms
|
||||
- **VedAstro** (`VedAstro/VedAstro`) — engineering and productization reference
|
||||
- **BPHS (Brihat Parashara Hora Shastra)** — canonical text
|
||||
- **PVN Rao / KN Rao** — traditional Jyotish teaching lineage
|
||||
|
||||
---
|
||||
|
||||
## Contact & Support
|
||||
|
||||
- **Issues:** [GitHub Issues](https://github.com/732642856/yinduzhanxing/issues)
|
||||
- **Discussions:** [GitHub Discussions](https://github.com/732642856/yinduzhanxing/discussions)
|
||||
|
||||
---
|
||||
|
||||
> **Final note:** This system is a research tool. It should NOT be used for making life-altering decisions without consulting qualified human astrologers. The techniques implemented here are complex and context-dependent; software output always benefits from human judgment.
|
||||
|
||||
@@ -0,0 +1,296 @@
|
||||
# 竞争对手分析与优化路线图
|
||||
# Competitive Analysis & Optimization Roadmap
|
||||
|
||||
日期:2026-06-05
|
||||
当前版本:v6.0.23-registry-cleaned
|
||||
|
||||
---
|
||||
|
||||
## 一、PyJHora 核心优势(计算准确性标杆)
|
||||
|
||||
### 已验证的优势
|
||||
1. **50+ Dasha 类型覆盖**
|
||||
- 22 种行星 Dasha(Vimshottari/Ashtottari/Yogini 等)
|
||||
- 22 种星座 Dasha(Chara/Narayana/Sudasa 等)
|
||||
- 3 种年度 Dasha(Patyayini/Varsha Vimshottari 等)
|
||||
- **对比**:当前 skill 约 10-12 种 Dasha,覆盖广度明显不足
|
||||
|
||||
2. **多基线测试机制(可借鉴)**
|
||||
- `record/compare/none` 三种测试模式
|
||||
- LAHIRI 和 TRUE_PUSHYA 双 Ayanamsa 基线
|
||||
- 6800+ 测试用例
|
||||
- **可借鉴**:建立 `benchmark/baselines/` 目录,固化 JSON 基线
|
||||
|
||||
3. **Shadbala 外部校准(我们正在做)**
|
||||
- 已对齐 BV Raman 和 VP Jain 书例
|
||||
- `get_planet_mean_longitude()` 用于 Chesta Bala
|
||||
- `planet_aspect_relationship_table()` 用于 Drik Bala
|
||||
- **对比**:我们的 Shadbala 仍是 partial,需要外部校准
|
||||
|
||||
4. **配置统一管理**
|
||||
- `const.py` + `config.py` 统一管理所有常量
|
||||
- **可借鉴**:当前 skill 的 Ayanamsa/node mode/house system 散落在代码里
|
||||
|
||||
---
|
||||
|
||||
## 二、VedAstro 核心优势(工程化标杆)
|
||||
|
||||
### 已验证的优势
|
||||
1. **MCP Server 支持**
|
||||
- 端点:`https://mcp.vedastro.org/api/mcp`
|
||||
- 兼容 Claude/Cursor/VS Code
|
||||
- **机会**:我们的 skill 是 AI Native 的,但还没有标准 MCP 接口
|
||||
|
||||
2. **Docker 一键部署**
|
||||
- 镜像:`vedastro/api`
|
||||
- **机会**:我们的 skill 目前需要手动安装依赖
|
||||
|
||||
3. **200+ API 端点**
|
||||
- REST API + Python 包 + .NET 库
|
||||
- **对比**:我们只有 CLI,没有 API 层
|
||||
|
||||
4. **架构分层清晰**
|
||||
- 核心计算库 / API 服务 / 前端 / 测试项目 完全解耦
|
||||
- **对比**:我们目前是 monolithic scripts
|
||||
|
||||
5. **文档体系完整**
|
||||
- API 文档、MCP 接入指南、贡献指南、ADR(架构决策记录)
|
||||
- **对比**:我们缺英文 README 和 API 文档
|
||||
|
||||
---
|
||||
|
||||
## 三、我们的差异化优势(要保持)
|
||||
|
||||
1. **Strict Workflow Router**(事业/婚恋/财务分路由)→ VedAstro 没有
|
||||
2. **Technique Audit Table**(每步声明置信度)→ PyJHora 没有
|
||||
3. **MEVG 外部验证门控** → 两个对手都没有
|
||||
4. **能力降级机制**(partial 不硬吹)→ 两个对手都没有
|
||||
5. **Full-reading 全链路解盘** → 两个对手都没有(只有零散计算)
|
||||
|
||||
---
|
||||
|
||||
## 四、优化路线图(基于竞争对手分析)
|
||||
|
||||
### Phase 0A:计算准确性追赶 PyJHora(P0)
|
||||
|
||||
#### 0A.1 建立 Benchmark 基线系统
|
||||
**借鉴 PyJHora 的多基线测试机制**
|
||||
|
||||
目标目录结构:
|
||||
```
|
||||
benchmark/
|
||||
baselines/
|
||||
lahiri/
|
||||
shadbala/
|
||||
bv_raman_example_1.json
|
||||
...
|
||||
dasha/
|
||||
vimshottari_sample_1.json
|
||||
...
|
||||
true_pushya/
|
||||
...
|
||||
scripts/
|
||||
run_benchmark.py
|
||||
compare_baselines.py
|
||||
results/
|
||||
2026-06-05_run_1.json
|
||||
```
|
||||
|
||||
#### 0A.2 Shadbala 外部校准(继续)
|
||||
- 对齐 BV Raman 书例(PyJHora 已验证的用例)
|
||||
- 对齐 PyJHora 输出
|
||||
- 目标:从 partial → covered
|
||||
|
||||
#### 0A.3 Chara Dasha 重写
|
||||
- 对标 PyJHora 的 Chara Dasha 实现
|
||||
- 建立 30 个测试案例
|
||||
- 目标匹配率 ≥ 95%
|
||||
|
||||
#### 0A.4 扩展 Dasha 覆盖
|
||||
- 当前:~12 种
|
||||
- 目标:~25 种(覆盖 PyJHora 的 50% 核心 Dasha)
|
||||
- 优先:Yogini、Shodasottari、Dwadasottari
|
||||
|
||||
---
|
||||
|
||||
### Phase 0B:工程成熟度追赶 VedAstro(P1)
|
||||
|
||||
#### 0B.1 MCP Server 接口
|
||||
**这是最高杠杆点** —— 我们的 skill 是 AI Native 的,加上 MCP 后可以被 Claude/Cursor 直接调用
|
||||
|
||||
目标:
|
||||
```python
|
||||
# mcp_server.py
|
||||
@tool
|
||||
def calculate_chart(year, month, day, hour, minute, lat, lon, tz):
|
||||
...
|
||||
|
||||
@tool
|
||||
def run_dasha(birth_data, dasha_type="vimshottari"):
|
||||
...
|
||||
|
||||
@tool
|
||||
def full_reading(birth_data, transit_date):
|
||||
...
|
||||
```
|
||||
|
||||
#### 0B.2 Docker 一键部署
|
||||
```dockerfile
|
||||
FROM python:3.11-slim
|
||||
RUN pip install pyswisseph
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
RUN pip install -r requirements.txt
|
||||
CMD ["python", "mcp_server.py"]
|
||||
```
|
||||
|
||||
#### 0B.3 英文 README + API 文档
|
||||
- 安装命令
|
||||
- 5 分钟快速上手
|
||||
- Full-reading 示例输出
|
||||
- Benchmark 结果
|
||||
|
||||
#### 0B.4 配置统一管理
|
||||
- 提取硬编码的 Ayanamsa/node mode/house system
|
||||
- 创建 `config.py` 或 `constants.py`
|
||||
|
||||
---
|
||||
|
||||
### Phase 0C:差异化优势巩固(P1)
|
||||
|
||||
#### 0C.1 Strict Workflow Router 文档化
|
||||
- 把当前的 strict workflow 规则整理成 MD 文档
|
||||
- 让用户知道"为什么事业问题要走 career_timing_strict 而不是 full_reading_strict"
|
||||
|
||||
#### 0C.2 Technique Audit Table 可视化
|
||||
- 当前是文本输出
|
||||
- 目标:生成 HTML 审计报告,彩色标注 covered/partial/missing
|
||||
|
||||
#### 0C.3 MEVG 门控扩展
|
||||
- 当前:部分解释层有 MEVG 标注
|
||||
- 目标:所有 high-stakes prediction 都必须有 MEVG 来源标注
|
||||
|
||||
---
|
||||
|
||||
## 五、立即可执行的最小下一步(明天就能开始)
|
||||
|
||||
### 选项 A:建立 Benchmark 基线系统(计算准确性)
|
||||
**耗时**:2-3 天
|
||||
**价值**:为后续所有算法优化提供量化依据
|
||||
**输出**:
|
||||
1. `benchmark/baselines/` 目录结构
|
||||
2. 3-5 个 Shadbala 基线 JSON(对齐 BV Raman)
|
||||
3. `benchmark/scripts/run_benchmark.py` 雏形
|
||||
|
||||
### 选项 B:MCP Server 接口(工程成熟度)
|
||||
**耗时**:3-5 天
|
||||
**价值**:让 skill 可以被 Claude/Cursor 直接调用,大幅提升可用性
|
||||
**输出**:
|
||||
1. `mcp_server.py`(基础工具:calculate_chart、run_dasha、full_reading)
|
||||
2. `README.md` 更新 MCP 使用说明
|
||||
3. 测试:用 Claude Desktop 调用 MCP 工具
|
||||
|
||||
### 选项 C:英文 README + 快速上手文档(开源影响力)
|
||||
**耗时**:1-2 天
|
||||
**价值**:降低使用门槛,吸引社区贡献
|
||||
**输出**:
|
||||
1. `README_EN.md`(英文版 README)
|
||||
2. `docs/quickstart.md`(5 分钟快速上手)
|
||||
3. `docs/api_reference.md`(API 参考)
|
||||
|
||||
---
|
||||
|
||||
## 六、推荐执行顺序
|
||||
|
||||
**我的建议**:先选项 C(英文文档),再选项 B(MCP Server),最后选项 A(Benchmark 基线)
|
||||
|
||||
理由:
|
||||
1. 英文文档最快出成果,且是后续所有工作的基础
|
||||
2. MCP Server 是差异化优势(PyJHora/VedAstro 有 API,但我们是 AI Native + MCP,更贴合 AI 工作流)
|
||||
3. Benchmark 基线是最花时间的,需要静下心来对着书例一个个对齐
|
||||
|
||||
---
|
||||
|
||||
## 七、具体任务拆解(基于选项 B:MCP Server)
|
||||
|
||||
### Task 1:学习 MCP 协议
|
||||
- 阅读 Anthropic MCP 文档
|
||||
- 研究 VedAstro 的 MCP Server 实现(`https://mcp.vedastro.org/api/mcp`)
|
||||
- 确定:用 `mcp` Python SDK 还是自己实现
|
||||
|
||||
### Task 2:设计工具接口
|
||||
```python
|
||||
tools = [
|
||||
{
|
||||
"name": "calculate_chart",
|
||||
"description": "Calculate Vedic birth chart",
|
||||
"parameters": {
|
||||
"year": "Birth year",
|
||||
"month": "Birth month",
|
||||
...
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "run_dasha",
|
||||
"description": "Calculate Dasha periods",
|
||||
...
|
||||
},
|
||||
{
|
||||
"name": "full_reading",
|
||||
"description": "Generate full Jyotish reading",
|
||||
...
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### Task 3:实现 MCP Server
|
||||
- 用 `mcp` Python SDK
|
||||
- 包装现有 `jyotish_engine.py` 的功能
|
||||
- 支持 stdio 传输(Claude Desktop)和 HTTP 传输(远程调用)
|
||||
|
||||
### Task 4:测试与文档
|
||||
- 用 Claude Desktop 测试 MCP 工具调用
|
||||
- 写 `docs/mcp_usage.md`
|
||||
- 更新 `README.md` 添加 MCP 使用说明
|
||||
|
||||
---
|
||||
|
||||
## 八、资源预估
|
||||
|
||||
| 任务 | 耗时 | 难度 | 价值 |
|
||||
|------|------|------|------|
|
||||
| 英文 README | 1-2 天 | 低 | 高(降低使用门槛) |
|
||||
| MCP Server | 3-5 天 | 中 | 很高(AI Native 差异化) |
|
||||
| Benchmark 基线 | 5-7 天 | 高 | 高(计算准确性基础) |
|
||||
| Docker 部署 | 2-3 天 | 低 | 中(工程成熟度) |
|
||||
| 配置统一管理 | 1-2 天 | 低 | 中(代码质量) |
|
||||
|
||||
---
|
||||
|
||||
## 九、结论
|
||||
|
||||
**PyJHora 的优势**(我们要追赶):
|
||||
- Dasha 覆盖广度(50+ 种)
|
||||
- 多基线测试机制
|
||||
- Shadbala 外部校准
|
||||
|
||||
**VedAstro 的优势**(我们要借鉴):
|
||||
- MCP Server(我们要做得更好,因为我们是 AI Native)
|
||||
- Docker 部署
|
||||
- 完整文档体系
|
||||
|
||||
**我们的优势**(要保持并扩大):
|
||||
- Strict Workflow Router
|
||||
- Technique Audit Table
|
||||
- MEVG 外部验证门控
|
||||
- 能力降级机制
|
||||
- Full-reading 全链路解盘
|
||||
|
||||
**下一步推荐**:
|
||||
1. 先写英文 README(最快出成果)
|
||||
2. 再做 MCP Server(差异化优势,且 PyJHora/VedAstro 的 MCP 是通用 API,我们的是 AI Native 解盘工作流)
|
||||
3. 最后做 Benchmark 基线(最需要静心,但价值极高)
|
||||
|
||||
---
|
||||
|
||||
**附件**:已创建 `references/competitive-analysis-2026-06-05.md`(本文档)
|
||||
Reference in New Issue
Block a user