visual-plan
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePurpose
用途
Render a plan as a visual MDX page instead of a wall of text, using the CLI. The component
vocabulary is general: although the examples below are code-flavored, it fits any structured plan
(a product launch, a research agenda, an incident response), not just software changes. Use the
components that fit the plan and skip the ones that do not.
vplanAbove all, show, don't tell: a reader should grasp the plan by scanning its diagrams, phases,
and tables, with prose only connecting the visuals, not carrying the plan itself. The
Show, don't tell section below is the heart of this skill.
If thecommand is not found, install it globally first:vplan(published on npm). Re-run the failed command afterward.npm i -g vplan@latest
通过 CLI将计划渲染为可视化MDX页面,而非大段文字。组件词汇具有通用性:尽管以下示例偏向代码场景,但它适用于任何结构化计划(如产品发布、研究议程、事件响应),不仅限于软件变更。选择符合计划需求的组件,跳过不需要的组件。
vplan最重要的是展示而非描述:读者应通过浏览图表、阶段和表格就能理解计划,文字仅用于衔接可视化内容,而非承载计划本身。下文的“展示而非描述”部分是此技能的核心。
如果未找到命令,请先全局安装:vplan(发布在npm上)。之后重新运行失败的命令。npm i -g vplan@latest
Workflow
工作流程
-
Write the plan to afile, starting with a single
.mdxheading (it becomes the plan title; no frontmatter). Then use the components below; you never write# Titlestatements, they are always in scope.import -
Validate before showing the user:. Fix every reported
vplan check <file>.mdxissue (it names valid enum values and flags unknown components).file:line:colalso runs a quality lint that flags weak renders (the enforced Gotchas below); its warnings failcheck, so fix them too.check -
Present the plan with. An interactive review is the default way to deliver a plan, not a special mode reserved for sign-off. It opens the plan with a feedback layer where the user comments on whole sections or on selected text, answers any
vplan <file>.mdxdirectly (each question becomes an inline answer field; a question with nested option bullets becomes clickable choices, and the picked option's text (or the typed "Other" text) is the answer, printed back as<Questions>), then clicks Approve / Deny / Iterate. It blocks until they submit, prints the decision, comments, and answers to stdout, and exits: approve 0, deny 1, iterate 2, timeout 3 (Answer to "<question>":, default 15m; closing the tab counts as deny). It is a long-running foreground server, so run it in the background. (The explicit--timeoutflag still works but is redundant now that review is the default.) A comment may carry a severity tag: treat a--reviewcomment as blocking (it must be addressed before the plan can be approved) and a[must-fix]or untagged comment as non-blocking input. Then act on the printed feedback:[suggestion]- Approve -> proceed with the plan as written.
- Iterate -> revise the plan addressing each comment, then simply re-run ; the review tab updates the same plan in place and the round number increments automatically (pass
vplan <file>.mdxonly to override it). Repeat until Approve or Deny. Edit the same-i Nfile in place and re-render:.mdxsnapshots each plan it presents (keyed by the file path), so the next render automatically marks what changed since the last view with a subtle git-gutter accent and a "N changed" summary, letting the user re-review only the delta. Passvplanto diff against an explicit file instead of the snapshot, or--diff <baseline.mdx>to suppress diffing (e.g. a clean first look).--no-diff - Deny -> stop and reconsider; do not proceed.
Review is the right default for every non-trivial plan. Targeted comments and in-placeanswers drive sharper revisions than back-and-forth chat, and the loop ends in an explicit Approve so you know it is settled. Reach for a static render (step 4) only when the user just wants to look, not shape or decide.<Questions> -
A static page, a live-reloading preview, or a PDF/JPG export are the non-review outputs, for when the user only wants to look or wants a shareable file rather than review one. When you need one, load; it holds the commands and flags for these (kept out of here so review stays the default path). Authoring the plan (everything below) is identical whichever output you choose.
references/static-exports.md
Run anytime for the exact prop signatures.
vplan components-
将计划写入文件,开头以单个
.mdx作为标题(它会成为计划的标题;无需前置元数据)。然后使用以下组件;无需编写# 标题语句,它们始终处于可用状态。import -
展示给用户前先验证:。修复所有报告的
vplan check <file>.mdx问题(会列出有效的枚举值并标记未知组件)。file:line:col还会运行质量检查,标记效果不佳的渲染(即下文强制要求避免的问题);其警告会导致check失败,因此也需要修复。check -
使用展示计划。交互式评审是交付计划的默认方式,并非仅用于签署的特殊模式。它会打开带有反馈层的计划页面,用户可以对整个章节或选定文本发表评论,直接回答
vplan <file>.mdx中的每个问题(每个问题会变成内联回答字段;带有嵌套选项项目符号的问题会变成可点击选项,选中选项的文本(或输入的“其他”文本)即为答案,会以<Questions>的形式输出),然后点击“批准/拒绝/迭代”。它会阻塞直到用户提交,将决策、评论和答案输出到标准输出后退出:批准返回0,拒绝返回1,迭代返回2,超时返回3(可通过Answer to "<question>":设置,默认15分钟;关闭标签页视为拒绝)。它是一个长期运行的前台服务器,因此建议在后台运行。(显式的--timeout标志仍然有效,但现在评审已是默认模式,所以该标志多余。)评论可能带有严重性标签:将--review评论视为阻塞项(必须在计划批准前解决),[must-fix]或无标签评论视为非阻塞输入。然后根据输出的反馈采取行动:[suggestion]- 批准 -> 按原计划执行。
- 迭代 -> 修改计划以解决每条评论,然后只需重新运行;评审标签页会原地更新计划,迭代次数会自动递增(仅在需要覆盖时传递
vplan <file>.mdx)。重复此过程直到获得批准或拒绝。原地编辑同一个-i N文件并重新渲染:.mdx会为展示的每个计划创建快照(按文件路径标识),因此下次渲染会自动标记自上次查看以来的变更,带有细微的git-gutter高亮和“N处变更”摘要,让用户仅需重新评审变更部分。传递vplan可与指定文件对比差异,而非与快照对比;或传递--diff <baseline.mdx>禁用差异对比(例如首次查看时)。--no-diff - 拒绝 -> 停止并重新考虑;不要继续执行。
**对于所有非琐碎计划,评审都是正确的默认选择。**针对性评论和的内联回答比来回沟通更能推动精准修订,且循环会以明确的批准结束,让你知道计划已确定。仅当用户只想查看而非调整或决策时,才使用静态渲染(步骤4)。<Questions> -
静态页面、实时重载预览或PDF/JPG导出是非评审输出,适用于用户仅需查看或需要可共享文件而非评审的场景。当需要这些输出时,加载;其中包含相关命令和标志(此处未列出,以便评审保持为默认流程)。无论选择哪种输出,计划的编写(以下所有内容)方式都是相同的。
references/static-exports.md
随时运行查看确切的属性签名。
vplan componentsComponents
组件
The data components (, , , , , , )
take their data as markdown children, not props: write a normal markdown list (or, for
and a multi-series , a markdown table) between the tags. Only the scalar settings
(, , ) are attributes. This is fewer tokens and avoids the
brace errors that break a render.
FileTreeChartStatCompareMatrixQuestionsChecklistMatrixCharttitletypestatus{[{ ... }]}-
: one step in a numbered vertical timeline; wraps markdown (ordered lists, prose, nested components). The steps auto-number in order. One per major step of the plan.
<Phase title="..." status="planned|active|done"> -
fenced block, for diagrams: architecture (
```mermaid),flowchart, dependency graphs,sequenceDiagram,stateDiagram-v2,classDiagram, anderDiagram. Reach for this first for anything structural. (gantt and pie are not supported; usexychart-betafor quantitative data.<Chart>now validates each diagram, so an unsupported type fails check with acheckinstead of rendering an error box.)file:line:col -
fenced block, a display formula written in LaTeX, typeset as math (complexity bounds, probabilities, linear algebra). Example:
```maththen```math.T(n) = O(n \log n) -
: highlight a risk, decision, tip, or note; wraps markdown. (
<Callout type="note|tip|risk|decision|warn">is blue,noteis green,tipis purple,decisionis red,riskis yellow.)warn -
: file-change map. One bullet per file,
<FileTree>, where- <change> <path>ischange. A move needs both ends,add|modify|delete|move(the file renders at its destination with the origin shown). A path ending in- move <from> -> <to>marks a whole directory (e.g./). A colored file-type icon is added automatically from the path's extension. Append- delete src/legacy/to any line for a short inline comment on that change (what it does or why); keep it to a phrase, since it shares the row with the file name.-- <note>mdx<FileTree> - add src/gateway/rate-limiter.ts -- sliding-window check against Redis - modify src/gateway/middleware.ts -- mount the limiter behind the flag - delete src/gateway/legacy/ </FileTree> -
: estimates/metrics. Single series: one bullet per point,
<Chart type="bar|line|area|scatter|radar|gauge|funnel|treemap|pie" title="...">(a number). Multi-series (- <label>: <value>/bar/line/area): a table whose header isradar(cells after the first name the series and become the legend; the first column is the category axis). Specifics:category | series1 | series2is a table with exactly two value columns read as x and y (scatter);| point | x | y |/pie/gauge/funnelare always single-series, list form only (a table is rejected), withtreemapon a 0-100 scale andgaugedescending. Addfunnelto a multi-seriesstacked/bar(area) to stack rather than group.<Chart type="bar" stacked>mdx<Chart type="bar" title="Effort (days)"> - Limiter: 2 - Dashboards: 1 </Chart> <Chart type="line" title="Latency by stage (ms)"> | Stage | p50 | p95 | |-------|-----|-----| | Auth | 12 | 30 | | DB | 40 | 120 | </Chart> -
: weigh approaches side by side as pros/cons cards. Each option is a
<Compare>heading (append## Nameto mark the recommended one) followed by as many(pick)/- pro:bullets as you need.- con:mdx<Compare> ## Redis sliding window (pick) - pro: accurate - pro: shared across nodes - con: network hop ## In-memory token bucket - pro: fast - con: per-node only </Compare> -
: a comparison grid (options across the columns, criteria down the rows) for scoring several choices against several dimensions. Write a markdown table; the first column is the row labels, and you append
<Matrix>to one column header to highlight it. Use(pick)for pros/cons,<Compare>for a scorecard.<Matrix>mdx<Matrix> | Dimension | Postgres (pick) | ClickHouse | DynamoDB | |-----------|-----------------|------------|----------| | Writes | medium | high | high | | Querying | high | medium | low | </Matrix> -
: open questions you want the reader to resolve before building, one per bullet. Use this instead of burying uncertainties in prose. The title defaults to "Open questions"; override with
<Questions>. In atitle="..."session each question is directly answerable, so prefer a--reviewblock over prose when you want the reviewer to answer specific questions. Nest bullets under a question to offer multiple-choice options: in a review they become clickable choices (plus an "Other" free-text field), and the chosen option's text comes back as the answer. Offer options whenever you can enumerate the likely answers; they get you a crisp, actionable answer instead of prose. A question with no nested bullets stays free-text.<Questions>mdx<Questions> - Should the limiter fail open or fail closed if Redis is unreachable? - Fail open, availability first - Fail closed, safety first - Is a 15-minute access-token TTL acceptable? </Questions> -
: acceptance criteria / definition of done, as a markdown task list:
<Checklist title="Done when">for done,- [x]for todo.- [ ]mdx<Checklist title="Done when"> - [x] Returns 429 over the limit - [ ] Dashboards live </Checklist> -
: headline plan metrics as a grid of cards (files changed, estimated uptime, rollout). One card per bullet,
<Stat>, where intent is one of- <label>: <value> (<intent>) -- <caption>and bothnote|good|warn|riskand(intent)are optional. The value is free text (-- caption,5 min), not a number. Use this for static facts, not time series (use99.9%for those). Only add a<Chart>when the plan genuinely has standout numbers worth surfacing; most plans have none, and an invented or filler metric is worse than omitting the component entirely.<Stat>mdx<Stat> - Files changed: 12 - Est. uptime: 99.9% (good) - RPO: 5 min (risk) -- worst-case data loss </Stat> -
Fenced code blocks are syntax-highlighted (Expressive Code): write(or js, json, bash, python, go, rust, sql, yaml, etc.) to show a key snippet. Add a file name with
```tsto render a filename header on the block.```ts title="src/path/file.ts" -
Mark lines and text inside a code block with Expressive Code props in the fence meta string (no component needed). Three marker types:(neutral, the default),
mark(green, inserted),ins(red, removed). Each takes line numbers, ranges, quoted strings, or adel. Use this to call attention to the lines a plan changes./regex/- Lines/ranges (neutral): ,
```ts {2},```ts {2-4}```ts {1, 3, 5-6} - Typed lines: (combine freely in one block)
```ts ins={3-4} del={2} mark={6} - Inline text: , a rename as
```ts "TokenBucket"```ts del="oldName" ins="newName" - Regex (and capture group): ,
```ts /\bTODO\b/(marks the group)```ts ins=/const (\w+) =/
- Lines/ranges (neutral):
数据组件(、、、、、、)将数据作为Markdown子元素而非属性传入:在标签之间编写普通Markdown列表(对于和多系列,则编写Markdown表格)。只有标量设置(、、)是属性。这样可以减少令牌数量,并避免导致渲染失败的括号错误。
FileTreeChartStatCompareMatrixQuestionsChecklistMatrixCharttitletypestatus{[{ ... }]}-
:编号垂直时间线中的一个步骤;可包裹Markdown(有序列表、文字、嵌套组件)。步骤会按顺序自动编号。每个计划的主要步骤对应一个
<Phase title="..." status="planned|active|done">。<Phase> -
代码块,用于绘制图表:架构图(
```mermaid)、flowchart、依赖图、sequenceDiagram、stateDiagram-v2、classDiagram和erDiagram。任何结构化内容都优先使用此组件。(不支持gantt和pie图;定量数据请使用xychart-beta。<Chart>现在会验证每个图表,因此不支持的类型会在check时以check的形式报错,而非渲染错误框。)file:line:col -
代码块,使用LaTeX编写的显示公式,会渲染为数学格式(复杂度边界、概率、线性代数)。示例:
```math后接```math。T(n) = O(n \log n) -
:突出显示风险、决策、提示或说明;可包裹Markdown。(
<Callout type="note|tip|risk|decision|warn">为蓝色,note为绿色,tip为紫色,decision为红色,risk为黄色。)warn -
:文件变更映射。每个项目符号对应一个文件,格式为
<FileTree>,其中- <change> <path>为change。移动操作需要两端路径:add|modify|delete|move(文件会渲染在目标路径,并显示来源)。路径以- move <from> -> <to>结尾表示整个目录(例如/)。系统会根据路径的扩展名自动添加彩色文件类型图标。可在任何行后追加- delete src/legacy/,为该变更添加简短的内联注释(说明变更内容或原因);注释需简洁,因为它与文件名共享同一行。-- <note>mdx<FileTree> - add src/gateway/rate-limiter.ts -- sliding-window check against Redis - modify src/gateway/middleware.ts -- mount the limiter behind the flag - delete src/gateway/legacy/ </FileTree> -
:估算/指标数据。单系列:每个项目符号对应一个数据点,格式为
<Chart type="bar|line|area|scatter|radar|gauge|funnel|treemap|pie" title="...">(数字)。多系列(- <label>: <value>/bar/line/area):表格表头为radar(第一列之后的单元格为系列名称,会成为图例;第一列为分类轴)。细节说明:category | series1 | series2是包含恰好两个值列的表格,分别作为x和y轴(格式为scatter);| point | x | y |/pie/gauge/funnel始终为单系列,仅支持列表形式(表格会被拒绝),treemap使用0-100的刻度,gauge按降序排列。可为多系列funnel/bar添加area属性(stacked),以堆叠而非分组显示。<Chart type="bar" stacked>mdx<Chart type="bar" title="Effort (days)"> - Limiter: 2 - Dashboards: 1 </Chart> <Chart type="line" title="Latency by stage (ms)"> | Stage | p50 | p95 | |-------|-----|-----| | Auth | 12 | 30 | | DB | 40 | 120 | </Chart> -
:将不同方案作为优缺点卡片并排展示。每个选项以
<Compare>标题开头(追加## 名称标记推荐方案),后跟任意数量的(pick)/- pro:项目符号。- con:mdx<Compare> ## Redis sliding window (pick) - pro: accurate - pro: shared across nodes - con: network hop ## In-memory token bucket - pro: fast - con: per-node only </Compare> -
:对比网格(列代表选项,行代表评估标准),用于针对多个维度对多个选项打分。编写Markdown表格;第一列为行标签,可在某列表头后追加
<Matrix>以高亮该列。优缺点对比使用(pick),评分卡使用<Compare>。<Matrix>mdx<Matrix> | Dimension | Postgres (pick) | ClickHouse | DynamoDB | |-----------|-----------------|------------|----------| | Writes | medium | high | high | | Querying | high | medium | low | </Matrix> -
:希望读者在开始执行前解决的开放式问题,每个项目符号对应一个问题。使用此组件替代将不确定性隐藏在文字中。标题默认为“开放式问题”;可通过
<Questions>覆盖。在title="..."会话中,每个问题都可直接回答,因此当你希望评审者回答特定问题时,优先使用--review块而非文字。在问题下嵌套项目符号可提供多选选项:在评审中它们会变成可点击选项(外加“其他”自由文本字段),选中选项的文本会作为答案返回。只要能枚举可能的答案,就提供选项;这样能获得清晰、可执行的答案,而非冗长的文字。无嵌套项目符号的问题为自由文本输入。<Questions>mdx<Questions> - Should the limiter fail open or fail closed if Redis is unreachable? - Fail open, availability first - Fail closed, safety first - Is a 15-minute access-token TTL acceptable? </Questions> -
:验收标准/完成定义,以Markdown任务列表形式呈现:
<Checklist title="Done when">表示已完成,- [x]表示待完成。- [ ]mdx<Checklist title="Done when"> - [x] Returns 429 over the limit - [ ] Dashboards live </Checklist> -
:计划的关键指标以卡片网格形式展示(变更文件数、预计正常运行时间、部署情况)。每个项目符号对应一张卡片,格式为
<Stat>,其中- <label>: <value> (<intent>) -- <caption>为intent之一,note|good|warn|risk和(intent)均为可选。值为自由文本(如-- caption、5 min),而非数字。此组件用于展示静态事实,而非时间序列(时间序列请使用99.9%)。仅当计划确实有值得突出的关键数字时才添加<Chart>;大多数计划不需要,虚构或填充的指标比省略该组件更糟糕。<Stat>mdx<Stat> - Files changed: 12 - Est. uptime: 99.9% (good) - RPO: 5 min (risk) -- worst-case data loss </Stat> -
代码块会进行语法高亮(使用Expressive Code):编写(或js、json、bash、python、go、rust、sql、yaml等)展示关键代码片段。可通过
```ts添加文件名,在代码块上渲染文件名标题。```ts title="src/path/file.ts" -
使用代码块元字符串中的Expressive Code属性标记代码块内的行和文本(无需组件)。三种标记类型:(中性,默认)、
mark(绿色,表示新增)、ins(红色,表示删除)。每种类型可接受行号、范围、引号字符串或del。使用此功能突出计划变更的行。/regex/- 行/范围(中性):、
```ts {2}、```ts {2-4}```ts {1, 3, 5-6} - 指定类型的行:(可在一个代码块中自由组合)
```ts ins={3-4} del={2} mark={6} - 内联文本:,重命名可写为
```ts "TokenBucket"```ts del="oldName" ins="newName" - 正则表达式(及捕获组):、
```ts /\bTODO\b/(标记捕获组)```ts ins=/const (\w+) =/
- 行/范围(中性):
Show, don't tell
展示而非描述
The whole point of a visual plan is to replace a wall of prose with something the reader grasps by
scanning. Default to a component over a sentence: if a fact has structure, show it; do not describe
it in paragraphs. Prose is the connective tissue between visuals, never the substance.
- Lead with the structure. Open with at most a one-paragraph context, then a architecture diagram, then the
```mermaidtimeline. The reader should understand the shape of the plan before reading a single full sentence.<Phase> - Prefer a diagram or a to describing structure in words. A flowchart of the data path beats a paragraph tracing it; a file-change map beats sentences listing the files.
<FileTree> - Move the meaning out of prose into the component that carries it. Risks and decisions go in
s, open questions in
<Callout>, tradeoffs in<Questions>/<Compare>, acceptance criteria in<Matrix>, not buried in paragraphs where they are easy to skim past.<Checklist> - Keep prose tight inside phases. A is a step, not an essay: a line or two of intent, then the visual. The visual is the point.
<Phase> - Right-size what you show. A large effort opens with a diagram and several phases; a
two-or-three-file change may need only a short and a
<FileTree>. Do not add a diagram or phase that carries no information: an empty 2-node flowchart shows nothing and is worse than one plain sentence. Show when there is structure to show; otherwise a tight sentence is fine (this applies to<Checklist>too, as its own entry notes).<Stat>
可视化计划的核心是用读者可快速浏览的内容替代大段文字。优先使用组件而非句子:如果事实具有结构化,就展示它;不要用段落描述。文字只是可视化内容之间的衔接,绝非核心。
- 以结构开头。最多先用一段文字介绍背景,然后是架构图,再是
```mermaid时间线。读者应在阅读完整句子前就理解计划的整体框架。<Phase> - 优先使用图表或而非文字描述结构。数据路径的流程图胜过一段文字描述;文件变更映射胜过列出文件的句子。
<FileTree> - 将核心信息从文字转移到对应的组件中。风险和决策放入,开放式问题放入
<Callout>,权衡对比放入<Questions>/<Compare>,验收标准放入<Matrix>,不要将它们隐藏在段落中,以免被读者忽略。<Checklist> - 内的文字要简洁。
<Phase>是一个步骤,而非一篇文章:一两句话说明意图,然后展示可视化内容。可视化内容才是重点。<Phase> - 合理选择展示内容。大型项目以图表和多个阶段开头;仅涉及两三个文件的变更可能只需简短的和
<FileTree>。不要添加无信息的图表或阶段:一个空的2节点流程图毫无意义,不如用一句话说明。有结构需要展示时才使用可视化;否则简洁的句子即可(<Checklist>组件也适用此原则,如前文所述)。<Stat>
Composing a plan
计划组合
- and
<Phase>wrap arbitrary markdown and components: a<Callout>,<FileTree>,<Chart>, a<Matrix>diagram, a code block, or a```mermaidtask list all nest inside them. Nest freely to group related content under a step or a highlight.- [ ] - Diagrams and charts each render a hover "expand" button that opens a zoomable, pannable fullscreen viewer, so a dense diagram stays legible even when shrunk inline (code blocks do not). You can lean on it for a necessarily-large diagram, but splitting into smaller diagrams still reads better when the inline view must stand on its own.
- 和
<Phase>可包裹任意Markdown和组件:<Callout>、<FileTree>、<Chart>、<Matrix>图表、代码块或```mermaid任务列表都可嵌套其中。自由嵌套以将相关内容分组到某个步骤或高亮部分下。- [ ] - 图表和图表都带有悬浮“展开”按钮,点击可打开可缩放、可平移的全屏查看器,因此即使内联显示的密集图表被缩小,仍能保持清晰(代码块无此功能)。对于必须较大的图表,可依赖此功能,但如果内联视图需要独立展示,将其拆分为多个较小的图表仍然更易阅读。
Rules
规则
- Never pass for a user-facing plan. The point is that the user sees it; the review session opens automatically. Reserve
--no-openfor an explicit headless/CI request.--no-open - No images or external assets. The page is a single self-contained file, so a markdown image
() or any external asset cannot be embedded, and
rejects markdown images. Use acheckdiagram for anything visual, or describe it in text.```mermaid
- 面向用户的计划切勿传递参数。核心是让用户看到计划;评审会话会自动打开。仅在明确的无头/CI请求时使用
--no-open。--no-open - 禁止使用图片或外部资源。页面是单个独立文件,因此Markdown图片()或任何外部资源无法嵌入,
会拒绝Markdown图片。任何可视化内容请使用check图表,或用文字描述。```mermaid
Gotchas
注意事项
Several of these (a wall-of-prose phase, a wide LR mermaid diagram, an over-long cell, a
commented move row, a wildly-scaled ) are now enforced by the quality lint
and will fail it, so they are hard rules, not just style advice.
MatrixFileTreeChartcheck- ,
<, and{are MDX syntax in prose. A bare}or<Thing>can break the render. Wrap literal angle brackets, braces, generics ({value}), or tag-like text in backticks or a code fence, where every character is safe and literal.List<T> - Raw inline HTML tags fail .
check,<kbd>,<sub>,<sup>and the like are read as unknown components and fail; use backticks or plain text instead. Plain markdown otherwise works alongside the components: GFM tables (outside<details>/<Matrix>), blockquotes, footnotes,<Chart>, autolinks,~~strikethrough~~task lists, and custom-start ordered lists all render.- [ ] - shows the shape of the data, not exact figures. There are no on-bar value labels, so any number the reader must know precisely belongs in prose too. Keep labels to a word or two (long bar/line x-axis labels get dropped or crowded), and never put series of wildly different magnitudes on one chart: a value near 50 beside one near 2,000,000 shares a single y-axis and flattens the small series to the zero line. Split into separate charts or normalize to the same unit.
<Chart> - cells do not wrap. A long sentence in one cell forces a horizontal scrollbar and pushes the other columns off-screen. Keep cells to a word or a short score; put rationale in prose or a
<Matrix>, not in a cell.<Callout> - Avoid on
-- comments<FileTree>rows. A move already shows its origin path (themoveannotation), which eats most of the row width, so a comment on the same row gets crowded out. Leave move rows uncommented and put any explanation in prose or a← <from>; reserve<Callout>for add/modify/delete rows, which have the space.-- comments - Wide mermaid diagrams shrink to illegibility. Prefer top-down () once a diagram has many nodes; a long left-to-right (
flowchart TD) chain shrinks to fit the page and becomes effectively unreadable inline. Split a large flow into a few smaller diagrams instead of one sprawling one.LR
其中一些问题(大段文字的、过宽的LR方向mermaid图表、过长的单元格、带有注释的移动行、比例失衡的)现在已被质量检查强制要求,会导致检查失败,因此这些是硬性规则,而非仅为风格建议。
<Phase>Matrix<FileTree>Chartcheck- 、
<和{是MDX的语法字符。裸写的}或<Thing>可能导致渲染失败。将字面量尖括号、大括号、泛型({value})或类似标签的文本包裹在反引号或代码块中,其中所有字符都是安全的字面量。List<T> - 原始内联HTML标签会导致失败。
check、<kbd>、<sub>、<sup>等会被视为未知组件并导致失败;请使用反引号或纯文本替代。除组件外,普通Markdown语法均可正常使用:GFM表格(<details>/<Matrix>之外)、块引用、脚注、<Chart>、自动链接、~~删除线~~任务列表和自定义起始编号的有序列表都可正常渲染。- [ ] - 展示数据的趋势,而非精确数值。图表上没有数据标签,因此读者必须精确了解的任何数值都应同时在文字中说明。标签保持一两个词即可(过长的条形/折线图x轴标签会被截断或拥挤),切勿将数量级差异极大的系列放在同一个图表中:数值接近50和接近2,000,000的数据共享同一y轴,会将小数值系列压缩到零线上。应拆分为单独的图表或归一化到同一单位。
<Chart> - 单元格不换行。单元格中的长句子会导致水平滚动条,将其他列推到屏幕外。单元格内容保持一个词或简短评分;理由放在文字或
<Matrix>中,不要放在单元格内。<Callout> - 避免在的
<FileTree>行上添加move注释。移动操作已显示来源路径(--注释),会占用大部分行宽,同一行的注释会被挤掉。移动行不要添加注释,如有说明需求放在文字或← <from>中;<Callout>注释仅用于add/modify/delete行,这些行有足够空间。-- - 过宽的mermaid图表会缩小到难以辨认。当图表有多个节点时,优先使用自上而下的方向();过长的左右方向(
flowchart TD)链会缩小以适应页面,导致内联显示时几乎无法阅读。将大型流程图拆分为几个较小的图表,而非一个庞大的图表。LR