Files
Jyotisha/scripts/financial_astrology_reading_modes.py
T
ClaudeandClaude Opus 5.5 6a57faacdb feat(consult): run the astrologer's upstream skill in full (BUG-1696, BUG-1697, BUG-1698)
- root SKILL.md is her upstream file (body byte-identical to the 5fb8379c mirror; description quoted so YAML parses and Mastra can load the skill)
- chat binds the whole SKILL.md plus references/product_runtime_contract.md (safety-only) instead of a ~477-character excerpt
- every turn carries her full strict-workflow-router (synced to upstream) and the domain's event-judgment file; product lists follow as an extra layer
- import her 10 sub-skills, family router, interpretation status contract, technique ontology and the 54 files her method names
- tests/test_upstream_skill_parity.py (in the quick gate) fails whenever her skill and ours drift
- 18 frontend guards that locked the excerpt design updated with 原值/新值/原因 notes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-07 14:02:26 +08:00

121 lines
3.4 KiB
Python

#!/usr/bin/env python3
"""Reading-mode routes for the repo's financial-astrology skill."""
from __future__ import annotations
from typing import Any
READING_ROUTES = {
"market_turning_points": {
"questions": [
"这段时间市场是不是接近拐点",
"未来几周波动会不会放大",
"现在更像上涨末端还是回撤初段",
],
"core_layers": [
"market_data",
"astro_features",
"benchmark_windows",
"negative_controls",
],
"output_focus": [
"window_bias",
"volatility_risk",
"confirmation_conditions",
],
},
"asset_tempo": {
"questions": [
"这个资产现在适合短线还是波段",
"现在适合进攻还是观望",
"股票、指数、加密哪类更强",
],
"core_layers": [
"asset_comparison",
"multi_asset_corpus",
"astro_features",
"benchmark",
],
"output_focus": [
"tempo",
"asset_strength_order",
"risk_mode",
],
},
"trader_fit": {
"questions": [
"我适不适合做交易/投资",
"我更适合趋势、套利还是长期配置",
"我的风险承受和亏损模式是什么",
],
"core_layers": [
"natal_wealth_axis",
"d2_d11",
"dasha_windows",
"market_behavior_questions",
],
"output_focus": [
"trading_fit",
"risk_style",
"suitable_vehicles",
],
},
"wealth_cycle": {
"questions": [
"未来几年财富扩张窗口在哪",
"哪几年更适合加仓或保守",
"房产、股市、创业哪类机会更强",
],
"core_layers": [
"d2_d11",
"vimshottari",
"narayana",
"transit_modifiers",
"strength_layers",
],
"output_focus": [
"cycle_windows",
"wealth_source_bias",
"defensive_years",
],
},
"event_window_check": {
"questions": [
"某资产现在是不是关键时间窗",
"这次暴涨暴跌是不是应期兑现",
"这轮行情是否接近结束",
],
"core_layers": [
"event_window",
"benchmark_windows",
"market_data",
"astro_features",
],
"output_focus": [
"event_window_status",
"trigger_conditions",
"invalidators",
],
},
}
def build_reading_mode_packet(*, route: str | None = None) -> dict[str, Any]:
normalized_route = str(route or "market_turning_points")
payload = READING_ROUTES.get(normalized_route)
if payload is None:
return {
"schema": "jyotish.financial_astrology_reading_mode.v1",
"status": "blocked",
"route": normalized_route,
"blocked_reason": "unknown_reading_route",
}
return {
"schema": "jyotish.financial_astrology_reading_mode.v1",
"status": "ready",
"route": normalized_route,
**payload,
"boundary": "Reading mode turns the research stack into user-facing judgment themes, but does not upgrade outputs into trading truth.",
}