Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/项目文档/03-规划/01-现状评估.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
- Rust 后端已形成明确的状态与规则中心
- `NoName` 的 runtime、trace、guardrail、memory、reviewed apply 已经具备可验证闭环
- 前端调试入口已具备,便于持续验证
- 记忆检索排序解释性已完成第一轮增强,结果可说明 `relevance / recency / importance / role_boost` 的排序依据
- Structured Notes 生命周期已完成第一轮收口,`active / resolved / archived` 的合法流转集中到可复用规则
- 角色上下文差异度已完成第一轮增强,`source_stats` 与 `visible_constraints` 能显示角色级上下文偏好
- 检索与 notes 已完成第一轮串联,active notes 可作为检索上下文桥帮助召回相关记忆,archived notes 不参与扩展召回
- 调试台信息结构已完成第一轮优化,trace 面板提供前置快读条,复制摘要提供 `Trace Breakdown`

## 3. 当前主要风险

Expand All @@ -38,6 +43,10 @@

本地若保留 `.review/` 工作树,会让 Vitest 把非当前仓库测试也一起执行,影响结果可信度。

### 3.5 记忆检索与 notes 串联仍未完成

检索排序解释性、notes 生命周期和 notes/retrieval 串联第一轮已经具备,但 structured notes 与 compaction、context builder 的贯通仍不完整。后续需要继续验证 note-aware retrieval 是否应接入更多上下文构建路径,避免新能力只停留在 manager 层报告。

## 4. 当前最合理的发展策略

先收口,再扩张。
Expand Down
32 changes: 32 additions & 0 deletions docs/项目文档/03-规划/02-后续路线图.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,45 @@
- 角色差异化权重
- 与 narrative notes 联动

当前状态:

- 排序可解释性第一轮已完成
- 检索结果可附带 `NoNameRetrievedMemoryReport`,用于解释每条结果的匹配分、角色加权、时间新近度和重要性
- 角色差异化权重已在解释结果中显式暴露
- 与 narrative notes 的深度联动尚未开始,后续归入 B4

### 任务 6:增强 structured notes 生命周期

- 重点:
- active / resolved / archived 的推进规则
- 章节收束时的 note 归档
- 与 compaction、retrieval、context builder 贯通

当前状态:

- notes 生命周期第一轮已完成
- `active / resolved / archived` 的合法流转已集中为可复用规则
- `NoNameMemoryManager` 已保证 note 状态变化后同步 retrieval store
- 章节收束时 resolved 自动归档的既有行为已保留
- 与 retrieval 的第一轮串联已完成:active notes 可作为检索上下文桥,archived notes 不参与扩展召回
- 与 compaction、context builder 的更深层串联尚未完成,后续继续推进

### 任务 6.5:优化角色上下文差异度

当前状态:

- 第一轮已完成
- role context 已通过 source priority stats 和 primary context bias 说明强化 `Director / WorldCurator / NpcIntent` 的差异
- 当前改动不影响 runtime 主流程,仍属于低耦合 context builder 层增强

### 任务 6.6:优化调试台可读性

当前状态:

- 第一轮已完成
- trace 面板已提供 `Trace 快读` 条,调试台复制摘要已提供 `Trace Breakdown`
- 当前改动不增加后端协议字段,仅重组现有 trace 信息

## P3:中期探索

### 任务 7:推进下一层安全输出接口
Expand Down
46 changes: 46 additions & 0 deletions docs/项目文档/03-规划/03-协作任务清单.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@
- 提升排序质量与解释性
- 不改主链 apply 编排

当前状态:

- 第一轮已完成
- 检索层已能返回排序解释报告,明确展示 `relevance -> recency -> importance` 的排序依据
- store 层已提供 explainable retrieval 代理方法
- 当前仍保持低耦合边界,未修改 `noname_runtime.rs`、`context_builder` 或 apply 主链

### 协作任务 2:Structured Notes 生命周期增强

- 目录范围:
Expand All @@ -55,6 +62,14 @@
- 完成 active / resolved / archived 的清晰流转
- 与 compaction/retrieval 接口对齐

当前状态:

- 第一轮已完成
- notes 状态流转已集中到可复用 lifecycle action,避免调用方直接散写状态
- `archived` 已被定义为终态,不允许 reopen,降低历史 notes 被误激活的风险
- manager 层已在 lifecycle action 后同步 narrative memory store,保证后续 retrieval/context builder 能读到一致状态
- 与 compaction/retrieval 的深度串联仍留到 B4

### 协作任务 3:角色上下文质量优化

- 目录范围:
Expand All @@ -64,6 +79,13 @@
- 提高不同角色的上下文差异度
- 不改 runtime 主流程

当前状态:

- 第一轮已完成
- role context 的 `source_stats` 已显式加入角色优先级标记,便于调试和测试区分不同角色的上下文偏好
- `visible_constraints` 已补充 primary context bias 文案
- 未修改 runtime 主流程,也未增加新的 role 运行模式

### 协作任务 4:调试与可视化增强

- 目录范围:
Expand All @@ -74,6 +96,30 @@
- 提升 trace 可读性
- 增强 review / apply 生命周期展示

当前状态:

- 第一轮已完成
- trace 面板已新增前置快读条,便于快速核对 proposal / review / human review / apply / guardrail 概览
- 调试台复制摘要已补充 `Trace Breakdown`
- 未新增后端协议字段,仍只消费现有 trace 数据

### 协作任务 5:检索与 notes 串联增强

- 目录范围:
- `src-tauri/src/noname_memory_manager.rs`
- `src-tauri/src/noname_note_store.rs`
- `src-tauri/src/noname_memory_retrieval.rs`
- 目标:
- 让 active structured notes 能作为检索上下文桥接,提升相关记忆召回
- 保持 archived notes 不参与召回扩展

当前状态:

- 第一轮已完成
- manager 层已提供 note-aware retrieval 报告,包含召回结果、note contexts 与 explanations
- 已有测试证明 active notes 会扩大相关 episodic 召回,archived notes 不会扩大召回
- 当前没有修改前端、protocol 或 runtime 主链

## 5. 当前不再适用的旧任务分法

旧版 `A1/A2/A3/B2/B3` 等卡片里有多项已不再是“未开始”。
Expand Down
60 changes: 60 additions & 0 deletions docs/项目文档/03-规划/04-未来两周开发排期.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,19 @@
- 最小验证:
- `cargo test noname_memory_retrieval -- --nocapture`

当前状态:

- 第一轮已完成
- 新增 `retrieve_memories_with_explanations`,在保留原 `retrieve_memories` 兼容行为的前提下返回 `NoNameRetrievedMemoryReport`
- 排序解释已包含 `section / item_id / rank / raw_match / role_boost / relevance / recency / importance / reasons`
- `NoNameMemoryStore` 已提供 `retrieve_with_explanations` 代理入口
- 已补充针对 relevance、recency、importance、role boost、过滤项解释剔除、store 代理的测试
- 已验证:
- `cargo test noname_memory_retrieval -- --nocapture`
- `cargo test noname_memory_store -- --nocapture`
- `cargo clippy -- -D warnings`
- `git diff --check`

### 任务 B2:Structured Notes 生命周期收口

- 目标:
Expand All @@ -147,6 +160,20 @@
- 最小验证:
- `cargo test noname_ -- --nocapture`

当前状态:

- 第一轮已完成
- `NoNameNarrativeStatus` 已提供状态 key、终态判断和合法流转判断
- `NoNameNoteStore` 已新增 `NoNameNoteLifecycleAction` 与 `apply_lifecycle_action`,统一处理 `resolve / archive / reopen`
- 当前规则为:`active -> resolved / archived`,`resolved -> active / archived`,`archived` 为终态不可回滚
- `NoNameMemoryManager` 已提供 lifecycle action 代理,并在状态变化后同步 retrieval store
- 已补充 active/resolved/archived 流转、archived 拒绝 reopen、manager 同步 retrieval store 的测试
- 已验证:
- `cargo test noname_note_store -- --nocapture`
- `cargo test noname_memory_manager -- --nocapture`
- `cargo clippy -- -D warnings`
- `git diff --check`

### 任务 B3:角色上下文差异度优化

- 目标:
Expand All @@ -163,6 +190,17 @@
- 最小验证:
- `cargo test noname_ -- --nocapture`

当前状态:

- 第一轮已完成
- `Director / WorldCurator / NpcIntent / CombatNarrator / System` 的 role context 已追加 role-specific source priority stats
- `visible_constraints` 已补充每个角色的 primary context bias,便于调试时判断该角色优先消费哪些上下文
- 未修改 `noname_runtime.rs`,未新增 role 运行模式
- 已补充 source stats 差异化测试,覆盖 `Director / WorldCurator / NpcIntent`
- 已验证:
- `cargo test noname_context -- --nocapture`
- `cargo test noname_ -- --nocapture`

## 5. 第 2 周排期

## 5.1 主开发线
Expand Down Expand Up @@ -219,6 +257,18 @@
- 最小验证:
- `cargo test noname_ -- --nocapture`

当前状态:

- 第一轮已完成
- `NoNameMemoryManager` 已新增 note-aware retrieval 入口,可用匹配查询意图的 active structured notes 扩展检索上下文
- active note 会提取 `related_entities / title / summary` 作为补充查询桥,帮助召回相关 episodic / semantic / working memory
- archived notes 不参与扩展召回,避免历史 notes 被误激活
- note-aware retrieval 会返回 `note_contexts` 与 explanations,便于调试 notes 如何影响召回
- 未修改前端、protocol 或 runtime 主链
- 已补充测试证明 active notes 会影响召回,archived notes 不会影响召回
- 已验证:
- `cargo test noname_memory_manager -- --nocapture`

### 任务 B5:调试台信息结构优化

- 目标:
Expand All @@ -236,6 +286,16 @@
- 最小验证:
- `npm run test -- --run src/components/__tests__/AgentTracePanel.test.ts src/components/__tests__/NoNameDebugConsole.test.ts`

当前状态:

- 第一轮已完成
- `AgentTracePanel` 已新增 `Trace 快读` 条,前置展示提案数、复核数、人工复核进度、执行数和护栏状态
- `NoNameDebugConsole` 的复制摘要已补充 `Trace Breakdown`,便于 PR/调试交接时快速核对 proposal/review/apply 概览
- 未新增后端协议字段,未改后端命令
- 已补充组件测试覆盖快读条与复制摘要 breakdown
- 已验证:
- `npm run test -- --run src/components/__tests__/AgentTracePanel.test.ts src/components/__tests__/NoNameDebugConsole.test.ts`

## 6. 交接模板

每个任务提交或交接时,必须包含以下内容:
Expand Down
Loading
Loading