fix(P0): sync SKILL.md version to v6.0.24 + fix MCP strict_workflow nonexistent subcommand

- SKILL.md: version 6.0.21 -> 6.0.24, header v6.0.23 -> v6.0.24-mcp-server
- mcp_server.py: strict_workflow was calling 'jyotish_engine.py strict-workflow'
  which does not exist as an argparse subcommand. Rewrote to:
  1. Keyword-based route detection (career/relationship/finance/timing/general)
  2. Call existing 'full-reading' subcommand (guaranteed to exist)
  3. Inject 'routing' metadata into response for client-side filtering
- py_compile + audit_capabilities --mode validate: all pass
- warnings=0, problems=0
This commit is contained in:
732642856
2026-06-04 15:25:02 +08:00
parent fc26dbcd09
commit 0881bb0964
2 changed files with 39 additions and 26 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
---
name: jyotish-vedic-astrology
version: 6.0.21
version: 6.0.24
description: 印度占星(Jyotish)专业解盘与推运系统。核心能力:PDF星盘输入→严谨解盘→精确推运应期输出。触发词:印度占星、吠陀占星、Jyotish、解盘、推运、星盘分析、Dasha、Transit、Nakshatra、Yoga、出生时间矫正、PDF星盘、读取PDF、分析PDF星盘、现代解读、误判纠错、Varga分盘、综合分析、过境分析、合盘、婚姻匹配、年运盘、Prashna、Argala、Jaimini、Shadbala、Ashtakavarga、HTML报告、深度解盘。
---
@@ -10,7 +10,7 @@ description: 印度占星(Jyotish)专业解盘与推运系统。核心能力
> **严格路由**`references/strict-workflow-router.md`(⭐涉及事业/婚恋/财务/应期/技法验证时必须优先读取)
> **覆盖矩阵**`references/technique-capability-matrix.md`(⭐判断技法 covered/partial/missing 时必须参考)
> **机器注册表**`references/technique_registry.json` + `scripts/audit_capabilities.py`(⭐用于自动审计与CI门禁)
> **版本**v6.0.23-full-reading-regression | **详细变更**`CHANGELOG.md`
> **版本**v6.0.24-mcp-server | **详细变更**`CHANGELOG.md`
---
+37 -24
View File
@@ -531,6 +531,7 @@ def strict_workflow(
tz: float,
age: int,
transit_date: str,
node_mode: str = "mean",
) -> Dict[str, Any]:
"""
Strict workflow router: routes question to the correct analysis path.
@@ -552,34 +553,46 @@ def strict_workflow(
tz: Timezone offset from UTC
age: Current age
transit_date: Transit date for prediction (YYYY-MM-DD)
node_mode: 'mean' or 'true'
Returns:
JSON with routed analysis and confidence level
"""
engine = os.path.join(SCRIPT_DIR, "scripts", "jyotish_engine.py")
prompt = (
f"Question: {question}\n"
f"Birth: {year}-{month:02d}-{day:02d} {hour:02d}:{minute:02d} "
f"lat={lat} lon={lon} tz={tz}\n"
f"Age: {age}, Transit: {transit_date}\n"
f"Please route this question to the correct strict workflow "
f"and run the appropriate techniques only."
)
cmd = [sys.executable, engine, "strict-workflow",
"--prompt", prompt,
"--year", str(year), "--month", str(month), "--day", str(day),
"--hour", str(hour), "--minute", str(minute),
"--lat", str(lat), "--lon", str(lon), "--tz", str(tz),
"--age", str(age), "--transit-date", transit_date]
result = subprocess.run(
cmd, capture_output=True, text=True, timeout=120, cwd=SCRIPT_DIR
)
if result.returncode != 0:
return {"error": True, "stderr": result.stderr}
try:
return json.loads(result.stdout)
except json.JSONDecodeError:
return {"raw_output": result.stdout}
q = question.lower()
if any(k in q for k in ("career", "job", "work", "promotion", "business", "profession", "事业", "工作", "升职", "生意")):
route = "career"
focus_techniques = ["D10", "Dasha", "Shadbala", "Transit", "Narayana Dasha"]
elif any(k in q for k in ("marriage", "relationship", "love", "spouse", "partner", "divorce", "婚恋", "婚姻", "感情", "配偶", "恋爱")):
route = "relationship"
focus_techniques = ["D9", "UL Upapada", "Dasha", "Nakshatra", "Vivah Saham"]
elif any(k in q for k in ("money", "wealth", "finance", "investment", "property", "income", "财务", "财富", "投资", "房产", "收入")):
route = "finance"
focus_techniques = ["D2", "D11", "Dasha", "Shadbala", "Ashtakavarga"]
elif any(k in q for k in ("when", "timing", "event", "prediction", "future", "应期", "预测", "何时", "将来")):
route = "timing"
focus_techniques = ["Dasha", "Transit", "Double Transit", "Gochara"]
else:
route = "general"
focus_techniques = ["D1", "D9", "Dasha", "Yoga", "Shadbala", "Ashtakavarga"]
result = _run_engine("full-reading", {
"year": year, "month": month, "day": day,
"hour": hour, "minute": minute,
"lat": lat, "lon": lon, "tz": tz,
"age": age, "transit_date": transit_date,
"node_mode": node_mode,
})
if isinstance(result, dict) and "error" not in result:
result["routing"] = {
"question_type": route,
"focus_techniques": focus_techniques,
"note": (
f"Routed to '{route}' path. Focus on the listed techniques "
f"for higher-confidence answers. Full reading included for context."
),
}
return result
# ============================================================================