merge: synchronize remote main

This commit is contained in:
Jesse_Chen
2026-07-21 22:57:50 +08:00
130 changed files with 10441 additions and 553 deletions
@@ -27,7 +27,7 @@
| 优先级 | 开源对象(仓内真实文件) | 当前状态 | 接哪里 | 用来干什么 | 许可证风险 | 预计几小时落地 |
|---|---|---|---|---|---|---|
| P0 | `references/open_source_sources/panchanga_api/README.md` `references/open_source_sources/panchanga_api/MCP.md` `references/open_source_sources/panchanga_api/SKILL.md` | 半接 | `scripts/prashna.py` `scripts/remedies.py` `scripts/jyotish_api_server.py` `scripts/unified_consultation_orchestrator.py` `jyotish-app/main.js` | 把“时间问事 / Muhurta / Panchanga / Remedies”压到统一入口,复用你刚接好的 `prashna` `audited_remedies` 主链 | 低。镜像内 README 指向 MIT;当前仓内有 `LICENSE` | 4-8h |
| 已接/参考 | `references/open_source_sources/panchanga_api/README.md` `references/open_source_sources/panchanga_api/MCP.md` `references/open_source_sources/panchanga_api/SKILL.md` | 已接入主链;外部镜像仅参考 | `scripts/prashna.py` `scripts/remedies.py` `scripts/jyotish_api_server.py` `scripts/unified_consultation_orchestrator.py` `jyotish-app/main.js` | 现有主链已覆盖 Prashna / Muhurta / Panchanga / Remedies;只保留镜像的方法学参考 | 不可直接复用。镜像 `LICENSE` `All rights reserved`,不得复制实现 | 不新增接线;仅做外部数值证据与显示合同 |
| P0 | `scripts/vedastro_service_adapter.py` `scripts/vedastro_official_mcp_bridge.py` `scripts/diagnose_vedastro_mode.py` | 半接 | `scripts/jyotish_api_server.py` `mcp_server.py` `scripts/unified_consultation_orchestrator.py` | 让 official layer 真正默认参与,而不是只做桥接存在证明;同时把 runtime truth 里的 `official/full/partial/fallback` 说清楚 | 低。这里主要是官方 API/桥接,不是复制外部 GPL 代码 | 3-6h |
| P0 | `references/oracle/artifacts/pyjhora_*` `references/oracle/artifacts/pending_packets/*pyjhora*.json` `scripts/generate_pyjhora_oracle_artifact_manifest.py` | 已接(黑盒证据层) | `scripts/external_oracle_sanity_closure.py` `scripts/oracle_benchmark_inventory.py` `scripts/historical_event_backtest.py` `README.md` | 保留 PyJHora 作为黑盒对照、历史事件回测、数值 sanity,不碰源码复制 | 中高。AGPL 风险不在“调用输出”,而在“复制代码/常量/实现” | 1-3h 做下一轮批量证据清点;8-16h 做更完整事件包 |
| P1 | `references/open_source_sources/jyotishganit/README.md` `references/open_source_sources/jyotishganit/LICENSE` `references/open_source_sources/jyotishganit/jyotishganit/*` | 已接(部分) | `scripts/bhava_bala.py` `scripts/shadbala.py` `scripts/shadbala_advanced.py` `scripts/trimshamsa_d30.py` `scripts/constants/mit_imported_constants.py` `scripts/jyotish_engine.py` | 继续把 MIT 安全算法/常量吸收到本地精度层,尤其是 `Bhava Bala``Sputa Drishti`、部分 divisional / constants 对齐 | 低。MIT,且本仓已有显式标注“基于 jyotishganit” | 2-6h 做一轮定点补强;10-20h 做系统 sweep |
@@ -0,0 +1,29 @@
# Panchanga local ↔ jyotishganit comparison — TEMCQ-061
Date: 2026-07-21
This packet closes the first local comparison step for the Panchanga schema ticket without writing a new Panchanga algorithm.
## Result
- Local method: `scripts/muhurta.py::calc_panchanga`
- Case: Steve Jobs
- Compared fields: `vaara`, `tithi`, `nakshatra`, `yoga`, `karana`
- Result: 4 exact matches + 1 naming alias
- Truth upgrade: 0
## Field comparison
| Field | Local | jyotishganit | Status |
|---|---|---|---|
| vaara | Thursday | Thursday | within_tolerance |
| tithi | Shukla Tritiya | Shukla Tritiya | within_tolerance |
| nakshatra | Uttara Bhadrapada | Uttara Bhadrapada | within_tolerance |
| yoga | Shubha | Shubha | within_tolerance |
| karana | Garija | Gara | alias_match |
`Gara` and `Garija` are recorded as a naming alias, not a formula mismatch.
## Boundary
This is still `research_observation_only`. It does not upgrade Panchanga to global truth because VedAstro and PyJHora/JHora five-field normalized packets are not pinned for this same comparison, and sunrise-relative semantics still need multi-case closure.
@@ -0,0 +1,26 @@
# Panchanga TEMCQ-061 schema packet — 2026-07-21
## Result
- Status: `schema_mapping_required`
- Normalized fields ready: `0`
- Truth upgrades: `0`
## Observed jyotishganit raw
- Vaara: Thursday
- Tithi: Shukla Tritiya
- Nakshatra: Uttara Bhadrapada
- Yoga: Shubha
- Karana: Gara
## Blockers
- Local archived high-rigor raw lacks a normalized Panchanga field.
- PyJHora/JHora normalized Panchanga raw is not archived.
- VedAstro shared Panchanga endpoint/method is not pinned.
- Naming and calculation conventions must be fixed before field comparison.
## Boundary
This is schema mapping only. It does not prove Panchanga parity or production timing readiness.
@@ -0,0 +1,20 @@
# Three-engine BAV/SAV field closure packet — 2026-07-21
## Result
- Rows: `8`
- Local / PyJHora-JHora / jyotishganit agreement: `5/8`
- Multi-engine variants: `3/8`
- Truth upgrades: `0`
## Required evidence before upgrade
- Public worked BAV/SAV table
- Contributor set
- Lagna inclusion policy
- Shodhana state
- Rashi order / orientation
## Boundary
This packet reuses existing arbitration/probe output. It does not implement or copy a new Ashtakavarga algorithm and does not upgrade formula truth.
@@ -0,0 +1,26 @@
# Three-engine D2 field closure packet — 2026-07-21
## Result
- Rows: `7`
- Local / PyJHora-JHora / jyotishganit agreement: `7/7`
- VedAstro differing endpoint result: `7/7`
- Truth upgrades: `0`
## Interpretation
For the Steve Jobs public same-case D2 rows, local, PyJHora/JHora and
jyotishganit agree on seven planet signs. VedAstro differs on all seven rows.
This is therefore classified as:
`partial_consensus_vedastro_endpoint_blocked`
The remaining blocker is not local formula evidence. It is VedAstro hosted
endpoint/method semantics: same ayanamsa, node mode, varga and timezone contract
must be pinned before these rows can become global truth.
## Boundary
This packet supports local/PyJHora/jyotishganit D2 confidence only. It does not
upgrade global oracle truth or commercial production tuning.
@@ -0,0 +1,18 @@
# Three-engine D4/D9/D10 field closure packet — 2026-07-21
## Result
- Rows: `3`
- Local / PyJHora-JHora / jyotishganit agreement: `3/3`
- VedAstro differing endpoint result: `3/3`
- Truth upgrades: `0`
## Classification
D4, D9 and D10 each have one Moon.sign mismatch row. In all three rows, local, PyJHora/JHora and jyotishganit agree; VedAstro differs.
Status: `partial_consensus_vedastro_endpoint_blocked`
## Boundary
This packet supports partial same-case confidence for these three varga rows only. It does not upgrade global oracle truth or commercial production tuning.
@@ -0,0 +1,18 @@
# Three-engine field status batch — 2026-07-21
## Result
- Existing TEMCQ rows classified: `18`
- New Panchanga ticket placeholder: `TEMCQ-061`
- Truth upgrades: `0`
## Classification
- `10` D2/D4/D9/D10 rows are ready for endpoint/method semantics checks.
- `8` BAV/SAV rows are ready for public worked-example comparison.
- Panchanga has jyotishganit raw but no existing mismatch ticket, so it is queued separately.
## Boundary
This is a closure-status packet only. It does not mark any field as numeric
truth, formula parity, or production timing evidence.
@@ -0,0 +1,27 @@
# Three-engine jyotishganit bridge applied — 2026-07-21
## Status
- Claim status: `observation_only`
- Truth upgrades: `0`
- Source selected hash: `4709b8ade84efdea4d0a67c15f3e32cea516a5aa2e8abe3885578feda20cb3f4`
## Applied rows
- Existing TEMCQ tickets mapped: `18`
- No existing ticket: `1`
Mapped groups:
- D2/D4/D9/D10 sign rows → existing `endpoint_or_varga_semantics` tickets.
- BAV/SAV rows → existing `ashtakavarga_table_or_contributor_variant` tickets.
- Panchanga → no old mismatch ticket; create a separate closure row before comparison.
## Boundary
This packet only proves that jyotishganit selected raw can be routed into the
existing closure queue. It does not prove formula truth, timing readiness, or
commercial production tuning.
Shadbala remains an explicit gap because the current jyotishganit probe does not
expose `shadbala` or `strengths` in selected raw.
@@ -0,0 +1,311 @@
# AI Jyotish consultation workbench alignment
Date: 2026-07-21
Commercial repo: `/Users/wuyongnaren/Documents/Jyotisha-commercial`
Research truth source: `/Users/wuyongnaren/Documents/印度占星`
Current commercial branch observed: `codex/fix-chat-session-deletion`
## Product target
Upgrade the commercial Jyotish website from a form/report/chat surface into an AI astrology consultation workbench:
- guided topics when users do not know what to ask;
- strict workflow routing for career, marriage, wealth, timing, rectification and general readings;
- visible evidence chain, parameter freeze, confidence and claim boundary;
- follow-up prompts after every answer;
- privacy-safe commercial runtime without writing user birth data or private cases into public artifacts.
This is not a UI-only optimization. UI work is downstream of runtime identity, evidence gates and workflow routing.
## Current architecture observed
### Frontend
- Main page: `frontend/src/app/page.tsx`
- Global styles: `frontend/src/app/globals.css`
- Sidebar/session UI:
- `frontend/src/components/app-sidebar.tsx`
- `frontend/src/components/sidebar-session-row.tsx`
- Message rendering:
- `frontend/src/components/chat-message-row.tsx`
- `frontend/src/components/chat-message-content.tsx`
- Birth-time journey UI:
- `frontend/src/components/birth-time-intake.tsx`
- `frontend/src/components/birth-time-guide-turn.tsx`
- `frontend/src/components/birth-time-choice-question.tsx`
- `frontend/src/components/birth-time-candidate-result.tsx`
- `frontend/src/components/birth-time-evidence-draft-card.tsx`
### API routes
- Chat/consultation: `frontend/src/app/api/consult/route.ts`
- Health check: `frontend/src/app/api/health/route.ts`
- Daily star language: `frontend/src/app/api/daily-starlanguage/route.ts`
- Chart profiles: `frontend/src/app/api/chart-profiles/route.ts`
- Birth-time guide: `frontend/src/app/api/birth-time-guide/route.ts`
- Birth-time journey: `frontend/src/app/api/birth-time-journey/route.ts`
- Birth rectification: `frontend/src/app/api/birth-rectification/route.ts`
### Workflow and safety layer
- Workflow projection: `frontend/src/lib/consultation-workflow-request.ts`
- Entrypoint question resolver: `frontend/src/lib/consultation-entrypoint.ts`
- Safety guard: `frontend/src/lib/consult-safety.ts`
- Timing boundary guard: `frontend/src/lib/timing-output-guard.ts`
- Agent reply and streaming:
- `frontend/src/lib/agent-reply.ts`
- `frontend/src/lib/stream-text-response.ts`
### Existing tests already relevant
- `frontend/tests/consultation-workflow-contract.test.ts`
- `frontend/tests/consultation-workflow-request.test.ts`
- `frontend/tests/starter-questions.test.ts`
- `frontend/tests/chat-stream-layout.test.ts`
- `frontend/tests/birth-time-mobile-scroll-contract.test.ts`
- `frontend/tests/birth-time-journey-*.test.ts`
- `frontend/tests/timing-output-guard.test.ts`
- `frontend/tests/jyotish-api-reachability-contract.test.ts`
## Gap summary
| Layer | Current state | Gap |
|---|---|---|
| Truth source identity | `/api/health` reports web/env/model/Jyotish API status and git commit | Does not expose research truth source path, research commit, evidence packet count, oracle summary or claim gate status |
| Guided topics | Starter questions and private entrypoints exist | Topics are not yet generated from profile completeness + question intent + strict workflow evidence requirements |
| Strict workflow routing | `consultation-workflow-request.ts` maps broad themes | Timing currently maps to career; missing explicit route taxonomy for rectification, health, annual/monthly timing, Prashna, compatibility |
| Evidence display | Birth-time evidence components exist | No general consultation evidence panel/audit table for D1/D9/D10/Dasha/Narayana/Transit/Shadbala/AV/Jaimini/UL/DK/A10 |
| Parameter freeze | Some backend headers expose workflow status | UI does not consistently show Ayanamsa, node mode, timezone, coordinates, birth-time precision and calculation source |
| Claim boundary | Timing guard exists | Need runtime gate that prevents blocked/partial/oracle-missing claims from rendering as definitive predictions |
| Layout maturity | Chat shell exists | Composer can visually drift/overlay content; workbench should reserve bottom space and use stable scroll container |
| Privacy | Commercial repo has Supabase/business flow | Need explicit artifact filter and CI guard to prevent private birth data/events from entering public fixtures |
## P0 implementation plan
### P0-1 — Runtime identity and capability status
Goal: the site must show what capability source it is using.
Files:
- Add `frontend/src/lib/truth-source-runtime-identity.ts`
- Add or extend `frontend/src/app/api/health/route.ts`
- Add `frontend/tests/truth-source-runtime-identity.test.ts`
- Add `frontend/tests/health-deployment.test.ts` assertions
Contract:
```json
{
"truthSource": {
"path": "/Users/wuyongnaren/Documents/印度占星",
"commit": "...",
"skillVersion": "...",
"evidencePacketCount": 120,
"oracleSummary": {
"ready": [],
"partial": [],
"blocked": []
},
"claimGateStatus": "partial_or_blocked_present"
}
}
```
Rules:
- Do not read private user artifacts.
- Do not require the production container to mount the local research repo; if absent, report `not_mounted`, not `ok`.
- Do not claim synced when git/packet metadata cannot be read.
### P0-2 — Workbench shell layout fix
Goal: stop the composer from floating over forms/content and make the page feel like a stable consultation tool.
Files:
- `frontend/src/app/page.tsx`
- `frontend/src/app/globals.css`
- `frontend/tests/chat-stream-layout.test.ts`
- `frontend/tests/birth-time-mobile-scroll-contract.test.ts`
Contract:
- One scroll container for conversation/workbench content.
- Composer pinned inside the main column, not viewport-floating across sidebar.
- Content bottom padding equals composer height.
- Onboarding/profile forms cannot appear underneath the composer.
### P0-3 — Guided topic cards
Goal: when user lacks a question, show 3-5 useful consultation cards with evidence preview.
Files:
- Add `frontend/src/lib/guided-jyotish-topics.ts`
- Extend `frontend/src/lib/consultation-entrypoint.ts`
- Extend `frontend/src/app/page.tsx`
- Extend `frontend/tests/starter-questions.test.ts`
Initial topics:
- Career phase and next leverage point
- Relationship pattern and partnership timing boundary
- Wealth structure and risk point
- Current year/month broad timing window
- Birth-time confidence check
Each topic must carry:
- `theme`
- `visibleQuestion`
- `strictWorkflowRoute`
- `evidencePreview`
- `confidenceCap`
- `claimBoundary`
### P0-4 — Strict workflow route contract
Goal: every user question must route to an explicit Jyotish workflow before the agent speaks.
Files:
- Extend `frontend/src/lib/consultation-workflow-request.ts`
- Extend `frontend/src/app/api/consult/route.ts`
- Extend `frontend/tests/consultation-workflow-contract.test.ts`
- Extend `frontend/tests/consultation-workflow-request.test.ts`
Routes:
- `career`: D1, D10, 10th house/lord, A10, AmK, Vimshottari, Narayana, transit
- `marriage`: D1, D9, 7th house/lord, Venus/Jupiter, DK, UL, A7, Vimshottari, Narayana, transit
- `wealth`: D1, D2, D11, 2nd/11th/9th/5th, wealth yogas, AV, Dasha
- `timing`: Dasha + Narayana + transit + varga; day/month remains candidate unless holdout passes
- `rectification`: D1 boundary, D9/D10/D12/D60 sensitivity, event backtest, candidate not truth
- `prashna`: question time/place/timezone/ayanamsa/node mode; observation only until oracle packets close
- `general`: broad multi-domain reading with clear missing layers
### P0-5 — Claim gate display
Goal: users can still receive dates/windows, but the UI must not package exploratory candidates as verified prediction.
Files:
- `frontend/src/lib/timing-output-guard.ts`
- `frontend/src/components/chat-message-content.tsx`
- Add `frontend/src/components/claim-boundary-badge.tsx`
- Tests:
- `frontend/tests/timing-output-guard.test.ts`
- `frontend/tests/consultation-workflow-contract.test.ts`
Statuses:
- `verified_window`
- `candidate_day_window`
- `exploratory_unvalidated`
- `observation_only`
- `blocked_until_oracle`
- `blocked_until_human_labels`
## P1 implementation plan
### P1-1 — Evidence panel / Technique Audit Table
Files:
- Add `frontend/src/components/evidence-audit-panel.tsx`
- Extend `frontend/src/components/chat-message-content.tsx`
- Add `frontend/tests/evidence-audit-panel.test.ts`
Rows:
- D1
- D9 / D10 / D2 / D11 as applicable
- Vimshottari Dasha
- Narayana Dasha
- Transit / Gochara
- Shadbala
- Ashtakavarga
- Jaimini: DK, AmK, UL, A7, A10
- Functional Benefic/Malefic
- MEVG / Global Web Evidence
- Real Case Calibration
### P1-2 — Report export
Files:
- Add `frontend/src/lib/consultation-report-export.ts`
- Add export button in message/report view
- Add `frontend/tests/consultation-report-export.test.ts`
Export must include:
- frozen parameters;
- conclusion;
- evidence table;
- conflict points;
- claim boundary;
- follow-up questions.
### P1-3 — Privacy artifact filter
Files:
- Add `scripts/commercial_privacy_artifact_scan.py`
- Add `tests/test_commercial_privacy_artifact_scan.py`
- Wire into commercial CI.
Rules:
- Reject real user names, exact birth data, private location/event text in fixtures.
- Allow public-person examples only with source tag.
- Mark imported research oracle packets as non-user artifacts.
## P2 implementation plan
### P2-1 — Visual polish after P0/P1
Files:
- `frontend/src/app/page.tsx`
- `frontend/src/app/globals.css`
- `frontend/src/components/app-sidebar.tsx`
Direction:
- Keep original warm color palette.
- Use commercial site layout language, but make the homepage cards smaller, lower, and easier to click.
- Do not put birth-time rectification as an oversized floating block.
### P2-2 — Commercial sync discipline
Files:
- Add `docs/research_sync_contract.md`
- Add `frontend/tests/research-truth-source-contract.test.ts`
Rules:
- Commercial repo consumes mature research contracts.
- Commercial repo does not copy private WorkBuddy fragments.
- WorkBuddy backups remain `historical_fragment_only`.
## First landing sequence
1. Implement P0-1 runtime identity endpoint and test.
2. Implement P0-2 layout contract to fix composer drift.
3. Implement P0-3 guided topics as deterministic cards.
4. Implement P0-4 strict workflow route taxonomy.
5. Implement P0-5 claim boundary badge.
6. Run focused frontend tests.
7. Only then start P1 evidence panel.
## Current blocker / caution
`/private/tmp/jyotisha-optimize` from the pasted request does not exist on this machine. The active commercial candidate is `/Users/wuyongnaren/Documents/Jyotisha-commercial`.
The commercial worktree currently has untracked `hip_main.dat` and `hip_main.dat.download`. They look like local ephemeris/runtime assets and should not be committed unless explicitly reviewed.