Skip to content

Commit fe9eeba

Browse files
committed
feat(agent-workspace): add evidence inspection pane
1 parent 03df728 commit fe9eeba

10 files changed

Lines changed: 488 additions & 150 deletions

File tree

docs/diataxis/en/explanation/development-progress-dashboard.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ The key result is that the current code has moved further than the old plan word
1313
- workflow artifacts now include durable `flashcard_batch` and `knowledge_run` records,
1414
- reply rendering now has a typed structured-answer path,
1515
- workflow-artifact review follow-up is part of the runtime surface,
16-
- graph focus can render original markdown with matched-span highlighting.
16+
- graph focus can render original markdown with matched-span highlighting,
17+
- a dedicated evidence pane now carries grounding inspection plus durable `knowledge_run` and `flashcard_batch` inspection.
1718

1819
At the same time, the product surface is still behind the intended final behavior:
1920

@@ -26,27 +27,29 @@ Code-vs-plan reconciliation for this slice:
2627
| Requirement | Current implementation evidence | Progress call |
2728
|---|---|---|
2829
| Structured grounded conversation with backward compatibility | `src/learning/types.ts`, `src/learning/conversationComposer.ts`, `src/learning/KnowledgeLearningPlatform.ts`, `src/frontend/agent_workspace.js`, and `src/frontend/workspace_panes.js` now support `answer`, `assistantBlocks`, `knowledgeRun`, grouped `knowledgePoints`, citations, and legacy `assistantMessage`; the primary assistant area now limits visible blocks to user-facing reply content. | Implemented current slice |
29-
| Durable learning/review artifacts | `src/workflows/WorkflowArtifactStore.ts`, `src/learning/KnowledgeLearningPlatform.ts`, and `src/routes/knowledge.ts` now support durable `flashcard_batch` / `knowledge_run` artifacts plus `/api/knowledge/workflow-artifacts` and `/api/knowledge/workflow-artifacts/review-follow-up`. | Implemented baseline |
30+
| Durable learning/review artifacts | `src/workflows/WorkflowArtifactStore.ts`, `src/learning/KnowledgeLearningPlatform.ts`, and `src/routes/knowledge.ts` now support durable `flashcard_batch` / `knowledge_run` artifacts plus `/api/knowledge/workflow-artifacts` and `/api/knowledge/workflow-artifacts/review-follow-up`; `workspace_panes.js` now routes their inspection into a dedicated evidence pane. | Implemented current slice |
3031
| File-first scoped knowledge hits | `workspace_panes.js` renders grouped knowledge hits by source file and routes file selection into graph focus instead of inline preview/action expansion. | Implemented current slice |
3132
| Right-pane evidence reading | Graph focus reuses the shared markdown runtime and highlights matched spans in rendered source markdown. | Implemented baseline |
3233
| Answer area contraction to a single targeted answer | `agent_workspace.js` now keeps the full conversation result in runtime state while only rendering user-facing answer blocks (`structured_answer`, `main_markdown`, `html_artifact`) in the main chat surface. | Implemented current slice |
33-
| Hide developer-heavy evidence from the primary hit list | `workspace_panes.js` no longer renders inline knowledge previews or visible typed capability buttons in the left-side hit list; those flows now depend on explicit follow-up paths. | Implemented current slice |
34+
| Hide developer-heavy evidence from the primary hit list | `workspace_panes.js` no longer renders inline knowledge previews or visible typed capability buttons in the left-side hit list; those flows now route into graph focus or the dedicated evidence pane. | Implemented current slice |
35+
| Durable evidence/claim inspector | `workspace_panes.js` now exposes a dedicated evidence pane for grounding metadata, `knowledge_run`, `knowledge_run_history`, `knowledge_run_compare`, and `flashcard_batch`; `agent_workspace.js` wires the API status strip into grounding inspection. | Implemented current slice |
3436
| DAG-native answer planning | The system already has `KnowledgeAtom`, `RelationEdge`, `TemporalEdge`, path queries, mastery-path logic, and `KnowledgeQueryItem.relationPath`, but conversation synthesis still does not have a dedicated graph-conditioned context-assembly layer. | Not complete |
3537

3638
Immediate next direction from this point:
3739

38-
1. Add a dedicated durable evidence/claim inspector for `knowledge_run`, `flashcard_batch`, and grounding metadata instead of leaving those flows behind explicit capability execution and runtime getters.
39-
2. Insert a graph-conditioned context-assembly layer between retrieval and answer synthesis so the current DAG becomes a first-class answer-planning substrate.
40-
3. Preserve the new primary answer / right-pane-first interaction contract while expanding secondary inspection surfaces.
41-
4. Continue ownership reduction across `src/server.ts`, `KnowledgeLearningPlatform.ts`, `agent_workspace.js`, and `workspace_panes.js`.
40+
1. Insert a graph-conditioned context-assembly layer between retrieval and answer synthesis so the current DAG becomes a first-class answer-planning substrate.
41+
2. Preserve the new primary answer / right-pane-first interaction contract while growing the evidence pane toward a broader durable evidence ledger.
42+
3. Continue ownership reduction across `src/server.ts`, `KnowledgeLearningPlatform.ts`, `agent_workspace.js`, and `workspace_panes.js`.
4243

4344
Verification for the current code-backed alignment:
4445

4546
- `npm.cmd exec -- tsc --noEmit`
4647
- `node --check src/frontend/agent_workspace.js`
4748
- `node --check src/frontend/workspace_panes.js`
4849
- `npm.cmd exec -- jest src/learning/conversationComposer.test.ts src/learning/KnowledgeLearningPlatform.test.ts src/learning/KnowledgeLearningPlatform.persistence.test.ts src/learning/KnowledgeLearningPlatform.program-f.test.ts src/agent_workspace.frontend.test.ts src/knowledge.api.contract.test.ts src/routes/registry.contract.test.ts src/pathbridge.handshake.contract.test.ts src/server.port.fallback.contract.test.ts src/workflows/WorkflowArtifactStore.test.ts --runInBand --no-cache`
50+
- `npm.cmd exec -- jest src/agent_workspace.frontend.test.ts src/agent_workspace.locale.contract.test.ts src/agent_workspace.contract.parity.test.ts src/agent_workspace.runtime.behavior.test.ts --runInBand --no-cache`
4951
- `npm.cmd run test:agent-workspace:contracts`
52+
- `npm.cmd run build`
5053

5154
## 2026-06-06 Knowledge Workspace Scope Switcher and Evidence-Focused Hit UI
5255

docs/diataxis/zh/explanation/development-progress-dashboard.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
- workflow artifact 已包含 durable 的 `flashcard_batch``knowledge_run`
1616
- reply rendering 已具备 typed structured-answer 路径;
1717
- workflow-artifact review follow-up 已进入运行时表面;
18-
- graph focus 已能渲染原始 markdown 并高亮 matched span。
18+
- graph focus 已能渲染原始 markdown 并高亮 matched span;
19+
- 独立 evidence pane 现已承接 grounding inspection 以及 durable `knowledge_run` / `flashcard_batch` 检查。
1920

2021
但当前产品面仍未完全达到目标行为:
2122

@@ -28,27 +29,29 @@
2829
| 要求 | 当前实现证据 | 进度判断 |
2930
|---|---|---|
3031
| 结构化 grounded conversation 且保持向前兼容 | `src/learning/types.ts``src/learning/conversationComposer.ts``src/learning/KnowledgeLearningPlatform.ts``src/frontend/agent_workspace.js``src/frontend/workspace_panes.js` 现已支持 `answer``assistantBlocks``knowledgeRun`、按文档聚合的 `knowledgePoints`、citations 与 legacy `assistantMessage`,且主回答区现已只渲染用户面的回答块。 | 当前切片已实现 |
31-
| durable learning/review artifact | `src/workflows/WorkflowArtifactStore.ts``src/learning/KnowledgeLearningPlatform.ts``src/routes/knowledge.ts` 现已支持 durable `flashcard_batch` / `knowledge_run`,以及 `/api/knowledge/workflow-artifacts``/api/knowledge/workflow-artifacts/review-follow-up`| 已实现基线 |
32+
| durable learning/review artifact | `src/workflows/WorkflowArtifactStore.ts``src/learning/KnowledgeLearningPlatform.ts``src/routes/knowledge.ts` 现已支持 durable `flashcard_batch` / `knowledge_run`,以及 `/api/knowledge/workflow-artifacts``/api/knowledge/workflow-artifacts/review-follow-up``workspace_panes.js` 现已把它们的检查路由到专门的 evidence pane| 当前切片已实现 |
3233
| file-first scoped knowledge hit | `workspace_panes.js` 已按 source file 渲染 grouped knowledge hit,并把文件入口直接路由到 graph focus,而不是继续走 inline preview / action 扩展。 | 当前切片已实现 |
3334
| 右侧证据阅读面 | graph focus 已复用共享 markdown runtime,并在原始 markdown 中高亮 matched span。 | 已实现基线 |
3435
| 主回答区收缩为单一 targeted answer | `agent_workspace.js` 现在会保留完整 conversation result 到 runtime state,但主聊天面仅渲染用户面的回答块(`structured_answer``main_markdown``html_artifact`)。 | 当前切片已实现 |
35-
| 主命中列表不暴露开发者导向 evidence / action | `workspace_panes.js` 已不再在左侧命中列表中渲染 inline preview 或可见 typed capability button;这些流程转入显式 follow-up path。 | 当前切片已实现 |
36+
| 主命中列表不暴露开发者导向 evidence / action | `workspace_panes.js` 已不再在左侧命中列表中渲染 inline preview 或可见 typed capability button;这些流程现在会路由到 graph focus 或专门的 evidence pane。 | 当前切片已实现 |
37+
| durable evidence / claim inspector | `workspace_panes.js` 现已提供专门的 evidence pane,用于承接 grounding metadata、`knowledge_run``knowledge_run_history``knowledge_run_compare``flashcard_batch``agent_workspace.js` 也已把 API 状态条接成 grounding inspection 入口。 | 当前切片已实现 |
3638
| DAG-native answer planning | 系统已具备 `KnowledgeAtom``RelationEdge``TemporalEdge`、path query、mastery-path 逻辑与 `KnowledgeQueryItem.relationPath`,但 conversation synthesis 仍缺 dedicated graph-conditioned context-assembly layer。 | 尚未完成 |
3739

3840
从这里出发的即时推进方向:
3941

40-
1.`knowledge_run``flashcard_batch` 与 grounding metadata 建设专门的 durable evidence / claim inspector,而不是继续把这类能力留在显式 capability 执行与 runtime getter 后面。
41-
2. 在 retrieval 与 answer synthesis 之间补一个 graph-conditioned context-assembly layer,让当前 DAG 真正进入 answer planning。
42-
3. 在扩展次级 inspection surface 的同时,保持新的主回答区与 right-pane-first 主交互契约稳定。
43-
4. 继续缩减 `src/server.ts``KnowledgeLearningPlatform.ts``agent_workspace.js``workspace_panes.js` 的所有权压力。
42+
1. 在 retrieval 与 answer synthesis 之间补一个 graph-conditioned context-assembly layer,让当前 DAG 真正进入 answer planning。
43+
2. 在保持新的主回答区与 right-pane-first 主交互契约稳定的前提下,把 evidence pane 继续扩展成更广义的 durable evidence ledger。
44+
3. 继续缩减 `src/server.ts``KnowledgeLearningPlatform.ts``agent_workspace.js``workspace_panes.js` 的所有权压力。
4445

4546
当前代码对齐切片的本地验证:
4647

4748
- `npm.cmd exec -- tsc --noEmit`
4849
- `node --check src/frontend/agent_workspace.js`
4950
- `node --check src/frontend/workspace_panes.js`
5051
- `npm.cmd exec -- jest src/learning/conversationComposer.test.ts src/learning/KnowledgeLearningPlatform.test.ts src/learning/KnowledgeLearningPlatform.persistence.test.ts src/learning/KnowledgeLearningPlatform.program-f.test.ts src/agent_workspace.frontend.test.ts src/knowledge.api.contract.test.ts src/routes/registry.contract.test.ts src/pathbridge.handshake.contract.test.ts src/server.port.fallback.contract.test.ts src/workflows/WorkflowArtifactStore.test.ts --runInBand --no-cache`
52+
- `npm.cmd exec -- jest src/agent_workspace.frontend.test.ts src/agent_workspace.locale.contract.test.ts src/agent_workspace.contract.parity.test.ts src/agent_workspace.runtime.behavior.test.ts --runInBand --no-cache`
5153
- `npm.cmd run test:agent-workspace:contracts`
54+
- `npm.cmd run build`
5255

5356
## 2026-06-06 知识工作区 scope 切换器与证据聚焦命中 UI
5457

0 commit comments

Comments
 (0)