concept-graph

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Concept Graph (prerequisites)

概念图(先修关系)

Goal: represent tutorial concepts as a prerequisite DAG so modules can be planned and ordered.
目标:将教程中的概念表示为先修关系有向无环图(DAG),以便对模块进行规划和排序。

Inputs

输入

  • output/TUTORIAL_SPEC.md
  • output/TUTORIAL_SPEC.md

Outputs

输出

  • outline/concept_graph.yml
  • outline/concept_graph.yml

Output schema (recommended)

推荐输出 schema

A minimal, readable YAML schema:
  • nodes
    : list of
    {id, title, summary}
  • edges
    : list of
    {from, to}
    meaning
    from
    is a prerequisite of
    to
Constraints:
  • Graph should be acyclic (DAG).
  • Prefer 10–30 nodes for a medium tutorial.
简洁易读的YAML schema:
  • nodes
    {id, title, summary}
    组成的列表
  • edges
    {from, to}
    组成的列表,其中
    from
    to
    的先修概念
约束条件:
  • 图必须是无环的(DAG)。
  • 中等篇幅教程建议设置10-30个节点。

Workflow

工作流程

  1. Read
    output/TUTORIAL_SPEC.md
    and extract the concept list implied by objectives + running example.
  2. Normalize each concept into a node with a stable
    id
    .
  3. Add prerequisite edges and verify the graph is acyclic.
  4. Write
    outline/concept_graph.yml
    .
  1. 读取
    output/TUTORIAL_SPEC.md
    ,从学习目标和示例中提取隐含的概念列表。
  2. 将每个概念标准化为带有稳定
    id
    的节点。
  3. 添加先修关系边,并验证图是无环的。
  4. 写入
    outline/concept_graph.yml
    文件。

Definition of Done

完成标准

  • outline/concept_graph.yml
    exists and is a DAG.
  • Nodes cover all learning objectives from
    output/TUTORIAL_SPEC.md
    .
  • Node titles are specific (not “misc”).
  • outline/concept_graph.yml
    已存在且为DAG结构。
  • 节点覆盖
    output/TUTORIAL_SPEC.md
    中的所有学习目标。
  • 节点标题具体明确(不可为“其他”)。

Troubleshooting

问题排查

Issue: the graph looks like a linear list

问题:图呈现为线性列表

Fix:
  • Add intermediate prerequisites explicitly (e.g., “data model” before “evaluation protocol”).
解决方法
  • 显式添加中间先修概念(例如,在“评估协议”前添加“数据模型”)。

Issue: cycles appear (A → B → A)

问题:出现循环(A → B → A)

Fix:
  • Split concepts or redefine edges so prerequisites flow in one direction.
解决方法
  • 拆分概念或重新定义边,使先修关系保持单向流动。