concept-atlas-dense-explain 0.1.0

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.
@@ -0,0 +1,21 @@
1
+ import { defineConfig } from 'vite';
2
+ import react from '@vitejs/plugin-react';
3
+ import mdx from '@mdx-js/rollup';
4
+ import { viteSingleFile } from 'vite-plugin-singlefile';
5
+
6
+ export default defineConfig({
7
+ plugins: [
8
+ {
9
+ enforce: 'pre',
10
+ ...mdx({
11
+ providerImportSource: null,
12
+ }),
13
+ },
14
+ react(),
15
+ viteSingleFile(),
16
+ ],
17
+ build: {
18
+ outDir: 'dist',
19
+ emptyOutDir: true,
20
+ },
21
+ });
@@ -0,0 +1,27 @@
1
+ # Component contract
2
+
3
+ ## Structure
4
+
5
+ ```mdx
6
+ <ExplainPage id="topic" title="..." summary="...">
7
+ <ConceptGraph root="root">
8
+ <ConceptNode id="root" title="..." level="L0" summary="...">
9
+ <Definition>...</Definition>
10
+ <Input>...</Input><Output>...</Output>
11
+ <Children><ConceptRef id="child" /></Children>
12
+ </ConceptNode>
13
+ <ConceptNode id="child" title="..." level="L1" parent="root">...</ConceptNode>
14
+ <Relation from="child" to="other" type="depends-on" label="依赖" />
15
+ </ConceptGraph>
16
+ </ExplainPage>
17
+ ```
18
+
19
+ Supported semantic content includes `Overview`, `Definition`, `Mechanism`, `Implementation`, `Example`, `Counterexample`, `Boundary`, `Prerequisite`, `Input`, `Output`, and `Glossary`.
20
+
21
+ High-value verification components: `LearningObjectives`, `KeyQuestion`, `Evidence(command, observes)`, `Invariant(title)`, `FailureMode(symptom, cause, evidence, remedy)`, and `Tradeoff(options)`.
22
+
23
+ Presentation components: `Stack`, `Grid`, `Split`, `Tabs`, `Flow`, `Compare`, `DecisionMatrix`, `Timeline`, `Callout`, `Details`, `RelationMap`, `RelationPath`, `Insight`, and `NoteGrid`.
24
+
25
+ ## Request priorities
26
+
27
+ The portable template covers the core `req.md` contract, node exploration, graph view, semantic relations, search, level/relation filters, URL node state, browsing history, keyboard shortcuts, Mermaid zoom, and responsive rendering. Evidence-oriented components and compact tradeoffs cover the highest-value `request.md` enhancements without adding permanent side panels.
@@ -0,0 +1,38 @@
1
+ # AI prompt guide
2
+
3
+ Include this contract when asking an AI to generate or revise a dense explanation:
4
+
5
+ ```text
6
+ 输出语义 MDX,不要输出 CSS、HTML 布局、坐标、SVG 或交互脚本。
7
+ 先给一个 L0 根节点,再用 L1/L2/L3/L4 表达结构、机制、实现细节和边界。
8
+ 父子层级使用 parent/Children;跨分支含义使用 Relation。
9
+ 每个关键节点优先提供:summary、Definition、Input/Output、Mechanism、一个 Example,以及 Evidence 或 Boundary。
10
+ 只在确实有帮助时使用组件:Flow 表示顺序,Compare/Tradeoff 表示选择,Timeline 表示时间,Evidence 表示验证,Invariant 表示必须保持的条件,FailureMode 表示故障定位。
11
+ 首屏只保留核心结论和 3–5 个关键事实;次要解释放进 Details。不要为了“看起来丰富”堆卡片。
12
+ ```
13
+
14
+ ## Component selection
15
+
16
+ | Information shape | Component |
17
+ | --- | --- |
18
+ | 顺序、阶段、因果链 | `Flow` / `RelationPath` |
19
+ | 两到四个对象的同维度比较 | `Compare` |
20
+ | 方案、收益、代价、适用条件 | `Tradeoff` / `DecisionMatrix` |
21
+ | 时间先后 | `Timeline` |
22
+ | 可执行命令和观察结果 | `Evidence` |
23
+ | 必须保持的条件 | `Invariant` |
24
+ | 症状到原因和修复 | `FailureMode` |
25
+ | 次要细节或长解释 | `Details` |
26
+
27
+ 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.
28
+
29
+ ## Minimal generation skeleton
30
+
31
+ ```mdx
32
+ <ConceptNode id="mechanism" title="机制" level="L2" parent="structure" summary="一句话结论">
33
+ <Definition>它是什么,以及为什么重要。</Definition>
34
+ <Mechanism>输入 → 转换 → 输出。</Mechanism>
35
+ <Evidence command="tool --inspect target" observes="验证哪个不变量或产物。" />
36
+ <Boundary>何时不成立,或哪些实现细节会改变结论。</Boundary>
37
+ </ConceptNode>
38
+ ```