Rule list summaries show "... of ..." in place of numbers for 10 built-in rules

未关闭
#353 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 4 天内回复

@san360 已经在做这个了。

开始于 2026年11月1日。

  • #357 来自 @san360 —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
70/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
frontend

调研方向

Start in getRuleEditor in src/webview/panel-rpc.ts (around line 809-825), where each rule's description is built by replacing {{...}} placeholders with ... and cutting at 200 characters. The static # Description section is already parsed in src/core/rule-parser.ts (around line 332) and can serve as the fallback summary. Done when the 10 listed built-in rules show readable summaries without ... in place of numbers, and fired findings still show their real values.

由索引模型根据 Issue 内容生成。

描述

bug
Description

The Rules list and the rule detail show each rule's "When Triggered" template with every placeholder replaced by .... So a summary built around numbers reads "... of ..." or ".../...". References are to main e6cedb7.

Where:

  • getRuleEditor (src/webview/panel-rpc.ts:809) builds each rule's description as r.descriptionTemplate.replaceAll(/\{\{[^}]+\}\}/g, '...').substring(0, 200) (:825). It cuts at 200 characters, even mid-word.
  • The rule card shows it (src/webview/page-antipatterns.ts:926), and so does the rule detail's summary (:1071). The detail also shows the raw template (:1105).
  • Every rule also has a static # Description section, which the parser already reads (src/core/rule-parser.ts:332).

Affected built-in rules on main (10 of 45):

Rule Summary as shown
high-cancellation "... of ... requests cancelled (...). This wastes premium quota."
no-slash-commands "Only ... of ... requests use slash commands. …"
no-spec-driven-development "Only ... of ... sessions (...%) start with specs, plans, or structured requirements. …"
no-spec-structure "... of ... agentic sessions start with vague, unstructured prompts. …"
reasoning-effort-overuse "... of ... requests with a known reasoning level (...) ran at high or max effort. …"
yolo-mode "... of ... tool actions (...) were auto-approved. …"
broken-flow-state ".../... days (...) show fragmented flow -- …"
low-constraint-usage "Only ...% of prompts include constraints (.../...). …"
no-custom-instructions "Only ...% of requests use custom instructions (.../...). …"
tunnel-vision "... of all requests (.../...) are in "...". …"

#322 changes context-engineering-gaps' template from {{count}} of 5 to {{count}} of {{total}}, because the number of signals now depends on the harness. That makes it the 11th rule whose summary reads "... of ...". Fired findings aren't affected: they fill the template with real numbers.

All 45 built-in rules have a # Description with no placeholders. 14 of them are longer than 200 characters; the longest is 443.

Steps to Reproduce
  1. Open Anti-Patterns > Rules.
  2. Find High Cancellation, Yolo Mode or Tunnel Vision in the list.
  3. The card reads "... of ... requests cancelled (...)" (and similar). The rule detail shows the same text.
Expected Behavior
  • Static summaries read naturally, with no "..." in place of numbers: for example, the rule's # Description, cut at a sentence or word boundary.
  • A fired finding still shows its real numbers, for example "2 of 4".
Extension Version

0.1.0 (main e6cedb7)

VS Code Version

N/A: found by reading the code and confirmed with the built-in rule files; the dashboard canvas host and VS Code share the webview.

Operating System

Any

Related: #322 (adds context-engineering-gaps to the affected rules). Found in a combined-build smoke test of the open PRs.

主要语言
TypeScript
星标
4.4k
派生
604
平均合并
5 天 13 小时
30 天内合并 PR
19

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/AI-Engineering-Coach 的其他 Issue

查看 microsoft/AI-Engineering-Coach 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。