concept-atlas-dense-explain 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,18 @@
1
- # AI prompt guide
2
-
1
+ # AI prompt guide
2
+
3
3
  Include this contract when asking an AI to generate or revise a dense explanation:
4
-
5
- ```text
6
- 先通读 content/compile-runtime.mdx(黄金样例),再产出;不要跳过、不要直接覆盖。
7
- 输出语义 MDX,不要输出 CSS、HTML 布局、坐标、SVG 或交互脚本。
8
- 先给一个 L0 根节点,再用 L1/L2/L3/L4 表达结构、机制、实现细节和边界。
9
- 父子层级使用 parent/Children;跨分支含义使用 Relation。
10
- Relation 的 type 只能是:prerequisite, causes, produces, uses, implements, contrasts, depends-on, exception-of, precedes;每条都要带 label。
11
- 每个关键节点优先提供:summary、Definition、Input/Output、Mechanism、一个 Example,以及 Evidence 或 Boundary。
12
- 只在确实有帮助时使用组件:Flow 表示顺序,Compare/Tradeoff 表示选择,Timeline 表示时间,Evidence 表示验证,Invariant 表示必须保持的条件,FailureMode 表示故障定位。
13
- 首屏只保留核心结论和 3–5 个关键事实;次要解释放进 Details。不要为了“看起来丰富”堆卡片。
14
- 规模对齐样例:1 个根、4–5 个 L1、总计约 15–25 个节点、8–15 条 Relation。
15
- 证据要具体:真实命令、指标或命名的产物,不要泛泛而谈。
4
+
5
+ ```text
6
+ 先通读 content/compile-runtime.mdx(黄金样例),再产出;不要跳过、不要直接覆盖。
7
+ 输出语义 MDX,不要输出 CSS、HTML 布局、坐标、SVG 或交互脚本。
8
+ 先给一个 L0 根节点,再用 L1/L2/L3/L4 表达结构、机制、实现细节和边界。
9
+ 父子层级使用 parent/Children;跨分支含义使用 Relation。
10
+ Relation 的 type 只能是:prerequisite, causes, produces, uses, implements, contrasts, depends-on, exception-of, precedes;每条都要带 label。
11
+ 每个关键节点优先提供:summary、Definition、Input/Output、Mechanism、一个 Example,以及 Evidence 或 Boundary。
12
+ 只在确实有帮助时使用组件:Flow 表示顺序,Compare/Tradeoff 表示选择,Timeline 表示时间,Evidence 表示验证,Invariant 表示必须保持的条件,FailureMode 表示故障定位。
13
+ 首屏只保留核心结论和 3–5 个关键事实;次要解释放进 Details。不要为了“看起来丰富”堆卡片。
14
+ 规模对齐样例:1 个根、4–5 个 L1、总计约 15–25 个节点、8–15 条 Relation。
15
+ 证据要具体:真实命令、指标或命名的产物,不要泛泛而谈。
16
16
  ```
17
17
 
18
18
  ## Template availability gate
@@ -25,66 +25,66 @@ Use this gate before the contract above:
25
25
  模板可访问后,复制完整模板,只修改 content/compile-runtime.mdx,最后运行 npm run validate 和 npm run build。
26
26
  交付物必须是模板构建出的 dist/index.html。
27
27
  ```
28
-
29
- ## What "good" looks like (from the exemplar)
30
-
31
- `assets/template/content/compile-runtime.mdx` is the reference standard. Extract these patterns:
32
-
33
- - **Scale**: 1 `L0` + 5 `L1` + ~20 nodes, descending to `L4`.
34
- - **Titles are claims, not nouns**: 「缺页风暴与抖动」, 「ABI 破坏:能链接,不等于能调用」.
35
- - **Every node opens with a one-sentence judgment** in `summary`, then 3–6 components.
36
- - **Concrete evidence**: `readelf -Ws`, `nm -C`, `objdump -dr app.o`, `.bss`, ASLR, build-id.
37
- - **Semantic relations carry the cross-branch meaning**: `produces`, `precedes`, `causes`, `depends-on`, `exception-of`, each labeled.
38
- - **Detail is layered**: first screen = core claim + 3–5 facts; deep detail lives in `Details`, `Tabs`, `Glossary`.
39
-
40
- ## Density targets
41
-
42
- | Metric | Target | Thin (failure) |
43
- | --- | --- | --- |
44
- | `L0` roots | 1 | 0 or many |
45
- | `L1` branches | 4–5 | 1–2 |
46
- | Nodes total | ~15–25 | < 8 |
47
- | Components per key node | 3–6 | 1 |
48
- | Cross-branch `Relation`s | 8–15 | 0–3 |
49
- | Nodes with concrete evidence | several | none |
50
- | Max depth | `L3`/`L4` | only `L0`/`L1` |
51
-
52
- ## Component selection
53
-
54
- | Information shape | Component |
55
- | --- | --- |
56
- | 顺序、阶段、因果链 | `Flow` / `RelationPath` |
57
- | 两到四个对象的同维度比较 | `Compare` |
58
- | 方案、收益、代价、适用条件 | `Tradeoff` / `DecisionMatrix` |
59
- | 时间先后 | `Timeline` |
60
- | 可执行命令和观察结果 | `Evidence` |
61
- | 必须保持的条件 | `Invariant` |
62
- | 症状到原因和修复 | `FailureMode` |
63
- | 次要细节或长解释 | `Details` |
64
-
65
- Avoid using more than one primary presentation component in a single node unless the information shapes are genuinely different. Prefer short prose around one useful visual structure over a stack of decorative blocks.
66
-
67
- ## Minimal generation skeleton
68
-
69
- ```mdx
70
- <ConceptNode id="mechanism" title="机制:输入如何在约束下变成输出" level="L2" parent="structure" summary="一句话结论">
71
- <Definition>它是什么,以及为什么重要。</Definition>
72
- <Mechanism>输入 → 转换 → 输出。</Mechanism>
73
- <Example title="一个具体案例">名称 + 数值 + 结果,而不是泛指。</Example>
74
- <Evidence command="tool --inspect target" observes="验证哪个不变量或产物。" />
75
- <Boundary>何时不成立,或哪些实现细节会改变结论。</Boundary>
76
- </ConceptNode>
77
- ```
78
-
79
- ## Anti-patterns
80
-
81
- - **Thin graph**: a handful of nodes with one paragraph each. Fix by adding `L2`/`L3`/`L4` depth.
82
- - **Noun titles / no judgment**: `"缓存"` instead of `"缓存一致性与内存序"`; `summary` missing or restating the title.
83
- - **Generic filler**: "性能会受到影响" instead of a named command, metric, or artifact.
84
- - **Card stacking**: five decorative blocks with no conclusion, evidence, or limitation.
85
- - **Invented types**: `Relation type="related"` — not in the whitelist, renders nothing.
86
- - **Prose instead of structure**: cross-branch links described in a paragraph instead of a labeled `Relation`.
87
-
88
- ## Before returning the result
89
-
90
- Verify the self-check list in `SKILL.md`. In short: 1 root, claim titles, one-line summaries, 3–6 components per key node, concrete evidence, whitelisted relations, layered detail, no layout in MDX, template builds.
28
+
29
+ ## What "good" looks like (from the exemplar)
30
+
31
+ `assets/template/content/compile-runtime.mdx` is the reference standard. Extract these patterns:
32
+
33
+ - **Scale**: 1 `L0` + 5 `L1` + ~20 nodes, descending to `L4`.
34
+ - **Titles are claims, not nouns**: 「缺页风暴与抖动」, 「ABI 破坏:能链接,不等于能调用」.
35
+ - **Every node opens with a one-sentence judgment** in `summary`, then 3–6 components.
36
+ - **Concrete evidence**: `readelf -Ws`, `nm -C`, `objdump -dr app.o`, `.bss`, ASLR, build-id.
37
+ - **Semantic relations carry the cross-branch meaning**: `produces`, `precedes`, `causes`, `depends-on`, `exception-of`, each labeled.
38
+ - **Detail is layered**: first screen = core claim + 3–5 facts; deep detail lives in `Details`, `Tabs`, `Glossary`.
39
+
40
+ ## Density targets
41
+
42
+ | Metric | Target | Thin (failure) |
43
+ | --- | --- | --- |
44
+ | `L0` roots | 1 | 0 or many |
45
+ | `L1` branches | 4–5 | 1–2 |
46
+ | Nodes total | ~15–25 | < 8 |
47
+ | Components per key node | 3–6 | 1 |
48
+ | Cross-branch `Relation`s | 8–15 | 0–3 |
49
+ | Nodes with concrete evidence | several | none |
50
+ | Max depth | `L3`/`L4` | only `L0`/`L1` |
51
+
52
+ ## Component selection
53
+
54
+ | Information shape | Component |
55
+ | --- | --- |
56
+ | 顺序、阶段、因果链 | `Flow` / `RelationPath` |
57
+ | 两到四个对象的同维度比较 | `Compare` |
58
+ | 方案、收益、代价、适用条件 | `Tradeoff` / `DecisionMatrix` |
59
+ | 时间先后 | `Timeline` |
60
+ | 可执行命令和观察结果 | `Evidence` |
61
+ | 必须保持的条件 | `Invariant` |
62
+ | 症状到原因和修复 | `FailureMode` |
63
+ | 次要细节或长解释 | `Details` |
64
+
65
+ Avoid using more than one primary presentation component in a single node unless the information shapes are genuinely different. Prefer short prose around one useful visual structure over a stack of decorative blocks.
66
+
67
+ ## Minimal generation skeleton
68
+
69
+ ```mdx
70
+ <ConceptNode id="mechanism" title="机制:输入如何在约束下变成输出" level="L2" parent="structure" summary="一句话结论">
71
+ <Definition>它是什么,以及为什么重要。</Definition>
72
+ <Mechanism>输入 → 转换 → 输出。</Mechanism>
73
+ <Example title="一个具体案例">名称 + 数值 + 结果,而不是泛指。</Example>
74
+ <Evidence command="tool --inspect target" observes="验证哪个不变量或产物。" />
75
+ <Boundary>何时不成立,或哪些实现细节会改变结论。</Boundary>
76
+ </ConceptNode>
77
+ ```
78
+
79
+ ## Anti-patterns
80
+
81
+ - **Thin graph**: a handful of nodes with one paragraph each. Fix by adding `L2`/`L3`/`L4` depth.
82
+ - **Noun titles / no judgment**: `"缓存"` instead of `"缓存一致性与内存序"`; `summary` missing or restating the title.
83
+ - **Generic filler**: "性能会受到影响" instead of a named command, metric, or artifact.
84
+ - **Card stacking**: five decorative blocks with no conclusion, evidence, or limitation.
85
+ - **Invented types**: `Relation type="related"` — not in the whitelist, renders nothing.
86
+ - **Prose instead of structure**: cross-branch links described in a paragraph instead of a labeled `Relation`.
87
+
88
+ ## Before returning the result
89
+
90
+ Verify the self-check list in `SKILL.md`. In short: 1 root, claim titles, one-line summaries, 3–6 components per key node, concrete evidence, whitelisted relations, layered detail, no layout in MDX, template builds.