Files
Jyotisha/skills/jyotish-birth-time-rectification/references/evidence-model.md
T
Jesse_ChenandCursor 8010245981
Independent Staging Quality Gate / validate (push) Failing after 6m42s
Independent Staging Quality Gate / publish (push) Has been skipped
feat(product): present consult and rectification in local skill form
Default ayanamsa to Raman with true_pushya support, attach governed Raman packets, restore Path C questionnaires and eight-method verification copy, and keep unique-minute confirmation blocked.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 21:42:47 +08:00

123 lines
5.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Evidence ModelV9
证据是生时校正的唯一事实账本。本文件定义证据如何进入、校验、修订与关闭。服务器是证据账本的唯一写入者;Agent 只能提出 proposal。
## 1. 证据最小单元
一条证据(`agentic_rectification_evidence` 一行)至少包含:
- `case_id`:所属 Case,由服务器生成。
- `source_turn_id`:用户消息所在轮次;`source_message_id` 可选。
- `user_quote`:用户原话的规范化子串。
- `subject`:主体(`self` 或亲属关系;家庭事件必须显式 `related_person`)。
- `event_kind`:语义种类(见 §2),不再只保留粗领域。
- `domain`:评分/路由领域。
- `occurred_from` / `occurred_to`:真实日期边界,可空。
- `date_precision``year | month | quarter | day | range | unknown`
- `summary`:服务器从已验证引用中生成的安全摘要。
- `status``draft | pending_confirmation | confirmed | superseded | rejected`
- `supersedes_evidence_id`:修订链指针。
## 2. 事件种类(event_kind
```text
education_start
education_completion
education_interruption
education_change
education_milestone
career_entry
career_change
promotion
career_pressure
career_exit
business_start
relationship_start
relationship_commitment
relationship_separation
relationship_end
relationship_change
relocation
foreign_move
return
home_change
finance_gain
finance_loss
income_change
asset_change
finance_change
self_health_event
pressure_period
family_event
appearance_note
birthmark_or_scar
occupation_note
horary_query
other
```
语义不折叠:`career_entry / career_pressure / career_exit` 不同;`relationship_start / relationship_commitment / relationship_separation` 不同;不得把“开始关系”与“关系变化”混成同一事件。`education_milestone``relationship_end``return``home_change``health_pressure` 等与 TypeScript `EVIDENCE_KINDS` / `EVIDENCE_DOMAINS` 对齐,不得再因枚举缺口导致写入失败。
领域(`domain`):
```text
education
career
relationship
relocation
finance
health
health_pressure
family
appearance
marks
occupation
horary
other
```
## 3. 日期精度
- 用户只给年份 → `date_precision = 'year'``occurred_from = YYYY-01-01`(边界),不得诱导编造月份。
- 用户给年月 → `month`;给季度 → `quarter`;给年月日 → `day`;给区间 → `range`
- 相对表达(“刚毕业那年”)必须由服务器结合权威当前时间解析,Agent 不得自行假设年份。
- 跨午夜、未知时间不伪造具体分钟;`unknown` 精度允许保留。
- 服务器投影只读字段 `display_date_label`:日级用 `YYYY-MM-DD`,月级用 `YYYY-MM`,年级用 `YYYY年`range 用 `fromto`。复述必须用该标签;禁止把日级格式化成“年份已确定为 YYYY”。用户确认“是/对”不得改 `date_precision`。更粗的修订若 quote 并没有更粗的日期表达,服务器拒绝 `precision_downgrade`
## 4. 原文引用(quote grounding
- `user_quote` 必须能在对应 `source_turn.user_message` 中找到规范化匹配(去空白、去标点后子串命中)。
- 服务器确认路径必须校验:引用来自本轮用户消息、kind 属于枚举、日期与原文一致。
- 模型不得凭空补充月份、日期、原因、主动/被动、人物关系。
## 5. 修订链(append-only
- 事实变化 = 新增 superseding row,旧行标记 `superseded`,永不覆盖/删除。
- 合法修订:日期更正、日期补全(如“2016 年 + 9 月”合并为 `2016-09`)、事件重分类(同身份)。
- 非法修订:跨事件覆盖既有 ID(如把“大学入学”改成“搬家”);服务器拒绝并降级为新的 pending proposal。
- 证据 ID 只能由服务器生成;模型不得提供或覆盖。
## 6. 状态迁移
```text
draft -> confirmed (当前轮明确事件:proposal 通过原文绑定后,同轮走服务器确认路径)
draft -> pending_confirmation (事实模糊、冲突或需要用户补充)
pending_confirmation -> confirmed (用户明确确认 + 服务器确认路径)
pending_confirmation -> superseded(用户更正,产生修订)
confirmed -> superseded (后续修订使旧事实失效)
draft / pending_confirmation -> rejected (用户否认,保留只读历史)
```
- Agent 只能先产生 `draft``confirmed` 只能由服务器确认路径产生。服务器确认路径不等于必须额外等待一轮用户回复。
- 终态 Caseconfirmed/closed/abandoned/superseded)禁止新增或修订证据。
- 同一请求重放不得重复写证据(幂等键 = case + source_turn + quote + kind + summary)。
## 7. 评分输入边界
- 只有 `confirmed` 证据进入评分账本;`draft``pending_confirmation` 都不参与评分。
- `family_event` 进入评分(D12 + D7 + D3 + 六亲宫位)。`other` 只作背景,不推进评分覆盖计数。
- `appearance_note` / `birthmark_or_scar`:无日期只覆盖访谈;有日期才进上升/一宫辅助评分,不得当主公式。
- `occupation_note`:与带日期事业事件独立。无日期只覆盖访谈;有日期按 D10 + 本命 10 宫辅助评分,允许事业类型表作校时方法。
- `horary_query` 只作背景观察,不推进评分覆盖计数,也不计入 4 事件 / 3 领域。
- 证据变化才触发重算;相同证据指纹复用缓存,不重复评分。