deerflow2/.planning/phases/02-thread-and-skills-logic-.../02-CONTEXT.md

86 lines
2.7 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.

# Phase 02: Thread and Skills Logic Reconciliation - Context
**Gathered:** 2026-04-07
**Status:** Ready for planning
<domain>
## Phase Boundary
本阶段只处理线程路由/复用与 skills bootstrap 合同的逻辑对齐与去重,目标是“新逻辑单路径”。
不扩展新产品能力,不做视觉重构。
</domain>
<decisions>
## Implementation Decisions
### 路由与参数语义
- **D-01:** `thread_id/isnew/xclaw_used` 全量与新逻辑对齐;若新逻辑无对应语义,删除旧参数和旧分支。
### Skills Bootstrap 合同
- **D-02:** `content_id/content_ids` 方向全量与新逻辑对齐;旧合同只保留必要兼容层,最终以新逻辑主合同为准。
### 重复与死逻辑处置
- **D-03:** 直接删除旧逻辑,只保留新逻辑单路径,不保留双实现并行。
### Claude's Discretion
- 可自行决定最小兼容层的落点adapter 放在 API 层还是 core 层),前提是不引入第二套主路径。
</decisions>
<canonical_refs>
## Canonical References
**Downstream agents MUST read these before planning or implementing.**
### 里程碑与需求
- `.planning/ROADMAP.md` — Phase 2 目标与边界MERGE-02, LOGIC-03, LOGIC-04
- `.planning/REQUIREMENTS.md` — 本阶段验收要求
- `.planning/PROJECT.md` — 项目核心原则(旧视觉 + 新逻辑)
### 上一阶段审计输入
- `.planning/phases/01-conflict-inventory-and-decision-matrix/conflict-inventory.csv` — 冲突热点与风险分级
- `.planning/phases/01-conflict-inventory-and-decision-matrix/titan-decision-matrix.md` — keep/replace/hybrid 决策输入
- `.planning/phases/01-conflict-inventory-and-decision-matrix/audit-evidence.md` — 证据链来源
### 关键实现入口
- `frontend/src/app/workspace/chats/[thread_id]/page.tsx` — 路由入口
- `frontend/src/core/threads/hooks.ts` — 线程主逻辑
- `frontend/src/core/skills/api.ts` — skills 合同入口
</canonical_refs>
<code_context>
## Existing Code Insights
### Reusable Assets
- `core/threads/hooks.ts` 已是线程逻辑主入口,适合收敛单路径。
- `core/skills/api.ts` 可作为合同归一的单入口。
### Established Patterns
- 路由层负责参数接入,`core/*` 负责业务逻辑;应避免 page/component 再实现一套逻辑。
### Integration Points
- 聊天页参数解析 -> `core/threads/hooks.ts`
- skills bootstrap 请求 -> `core/skills/api.ts`
</code_context>
<specifics>
## Specific Ideas
- 用户明确要求“与新逻辑对齐;新逻辑没有就删除”,不接受旧逻辑兜底长期保留。
</specifics>
<deferred>
## Deferred Ideas
None — discussion stayed within phase scope.
</deferred>
---
*Phase: 02-thread-and-skills-logic-reconciliation*
*Context gathered: 2026-04-07*