关系网tension/affinity双轴驱动+文档对齐 #126
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
#103 第四批清单:31 条实现类落差 + 9 条待拍板(条目 12、13、31)
What to build
ADR-0008 拍板的关系四轴(
familiarity/trust/affinity/tension)里,affinity(≈旧 warmth,注入排序键)与tension(近期冲突,自然衰减防记仇)驱动函数在生产里零调用点——两轴恒 0.0,"warmth 加权排序"退化成插入顺序,"紧张"恒渲染 0.00,"自然衰减防记仇"整条兑现路径一次都走不到。familiarity/trust两轴已驱动。两条改同一个
_EXTRACT_MEMORIES_TOOLschema 与同一条run_delta_compression_cycle路径,必须同片,不能分两片各改一次同一个 prompt。Acceptance criteria
一、affinity(改动面比原估计小得多——信号已在库里)
_EXTRACT_MEMORIES_TOOL的speaker_polarity(issue #94 已加入的逐发言人互动极性)就是 affinity 需要的"本批互动的亲和倾向"信号,不需要新增 LLM schema 字段relationship.py::record_affinity_interaction(...)驱动函数(仿record_trust_disclosure形状,内部调既有apply_affinity_delta),在delta.py::_apply_interaction_polarity已有的for sender_id, polarity in result.speaker_polarity.items()循环里(或紧邻处)接入config.py加 affinity 的 delta 系数与 bound 两个旋钮原文(docs/adr/0008-relationship-network.md「更新(2026-07-06,情感模型选型 grill 联动)」节 affinity 条):
二、tension(本组唯一真需要新 LLM schema 字段的)
_EXTRACT_MEMORIES_TOOL新增一个独立的冲突信号字段(逐发言人),语义须与既有interaction_polarity/speaker_polarity明确区分——不得复用极性信号驱动 tension,原文已预先排除这条捷径relationship.py::record_tension_conflict(...)驱动函数(仿record_trust_disclosure的"读现值→算新值→写回"形状),写回时一并置tension_updated_at(decayed_axes首行if tension_updated_at is None: return意味着不写这个字段自然衰减永远走不到)run_delta_compression_cycle里接入(与record_trust_disclosure同一处循环附近),保持"不碰前台回复路径"config.py加 tension gain/cap 两个旋钮(half-life 已有_relationship_tension_half_life_seconds)RelationshipAxesModel已有tension/tension_updated_at两列原文(docs/adr/0008「更新(2026-07-06…)」节 tension 条——为什么不能复用极性信号):
record_trust_disclosure的两个生产调用点实际都在delta.py::run_delta_compression_cycle,不在runtime_loop.py三、文档面(无独立改动面,作为验收清单)
Blocked by
None — can start immediately