boardx / boardx/workspacex

fix(agent-run): canvas 指引里那句「仍然优先用 mermaid」在对冲 #2106 的「默认不画」+ 一条已失效的注释

Open
#2,113 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
1h 7m
Merged PRs (30d)
969

Description

## 来源

#2106(Closes #2099)把 `VISUALIZATION_GUIDANCE` 从「鼓励出图」翻成「默认不画」。
该 PR 的 §6 报告了 `apps/api/src/application/agent-run/canvas-template-guidance.ts` 里
两处**被任务边界排除、未动**的问题,人类要求另开 issue 处理。本 issue 就是那条线。

## 问题 1:一条注释在 #2106 之后变成假的(零行为改动)

`canvas-template-guidance.ts:104-107` —— 「空模板列表返回 `null`」的理由逐字写着:

> `VISUALIZATION_GUIDANCE` 已经**无条件覆盖**了纯 mermaid 场景

#2106 之后 mermaid 指引已经是**条件的、默认关**的。这条注释是典型的
「静态痕迹 ≠ 动态事实」(AGENTS.md 点名的那条):它写得越具体越像权威。

**返回 `null` 这个决定本身仍然成立**(issue #1493 §3 的二选一,注入一句
「本组织未配置画布模板」只占 token 不改行为)—— 要改的是**理由**,不是行为。

## 问题 2:注入正文里有一句在对着 #2106 干

`canvas-template-guidance.ts:127-131` 注入给模型的正文含:

> 只在内容真的适合按「协作模板的固定分区」组织时才用;**单纯讲清楚一个流程或结构,仍然优先用 mermaid 图表。**

- 这是一句**鼓励出图**的话,与 #2106 的「默认不画 / 拿不准就不画」直接对冲;
- 触发条件只是「本组织有任意一个已发布画布模板」—— 满足即**每轮**注入;
- 而且它前半句「只在内容真的适合…时才用」正是 #2106 §1 表格③点名**失效**的
那类不可证伪判据(「模型永远能说服自己满足」);
- 开头「除了 mermaid 图表(flowchart / 时序图 / **思维导图**等标准图表…)」还在
**点名图型**,正是 #2106 机制②要消除的启发稀释源。

⚠ **这一格没有被 #2106 的对照证据覆盖**:那轮对照跑的是**无 canvas 指引**的路径
(通用助手、未挂 skill,与人类 devapp 复现一致)。「新 mermaid 指引 + canvas 指引」
这个组合**未验证**。

## 口径

1. 问题 1:改注释,零行为改动。
2. 问题 2:重写那段措辞,让它**只承担格式区分**职责(canvas 围栏 = 工作坊协作模板,
mermaid = 标准图表),「到底要不要画」交回上面「可视化」那节统一判定;具体措辞
由人类在候选方案里裁决。
3. 用与 #2106 **同一套真实模型 A/B 打法**验证,但这次**带 canvas 指引**:
`buildSystemPrompt(instructions, [], buildCanvasTemplateGuidance(templates))`。

## 验收

1. 真实 dashscope 模型(**非 loopback** —— loopback 判不了「该不该画」这种判断题),
两臂:baseline(现措辞)vs 重写后措辞,**都带 canvas 指引**。
2. 两类问句各多次采样:① 纯问答(「最好的教育是怎么样的」等);② 真·有向结构的问句
(反向:改后**仍然**该出图)。
3. 报计数 + **原始模型输出**贴在 PR 里。
4. 声明实测 SHA(含 #2106 分支头的 SHA —— 本验证依赖它的新常量)。

## 依赖

本 issue 的注释修正(问题 1)在 #2106 合入之后才成立,PR 需排在 #2106 之后合。

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with apps/api/src/application/agent-run/canvas-template-guidance.ts, especially lines 104-107 and 127-131, and compare the current guidance with #2106. Run the stated real-model A/B evaluation through buildSystemPrompt(instructions, [], buildCanvasTemplateGuidance(templates)) using both question categories. Done means the comment is accurate, the wording only distinguishes canvas templates from mermaid, and the PR includes counts, raw outputs, and the tested SHA.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.