clearai-dsh 0.1.7 → 0.2.1
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.
- package/CHANGELOG.md +59 -0
- package/README.md +89 -74
- package/README.zh-CN.md +86 -71
- package/lib/client.js +944 -69
- package/lib/domain-language.js +758 -0
- package/lib/fold.js +894 -12
- package/lib/host.js +112 -2
- package/package.json +14 -3
- package/presets/clearai/agent.cordis.yml +10 -3
- package/presets/clearai/plugins/clearai-kernel.js +550 -12
- package/presets/clearai/plugins/prompts.js +47 -0
- package/presets/clearai/preset.yml +3 -3
- package/presets/clearai/skills/clearai-loop/SKILL.md +16 -13
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,65 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are recorded here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
+
## [0.2.1] — 2026-09-18
|
|
6
|
+
|
|
7
|
+
**知识任务是循环的原生行为,不是另一个模式。** 本体、实体、认识论早就在,但普通研究的最短路径仍然是「检索 → 总结 → 写报告」——要建本体得用户先想起来说一句。这一版修的是**接线缺口**:把知识任务的判据做成结构的(目标还开着 + 带着登记过的假设),系统自己进知识模式;并把图从手写 SVG 换成 React Flow,给了它一个真正的全屏工作区。
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **知识模式(分诊)**:判据是**结构的**——目标还开着,而且它带着登记过的命题。立约(`SetGoal`)本身就是模型已经做出的承诺;普通问答从不立约,于是从不进这一档(**零成本契约**)。词面启发式猜错了没人能复核,结构判据可以。
|
|
12
|
+
- **知识预检**:把「已知」自动送到模型面前——只读、有界、**词面命中不猜语义**;每条读数说得出它来自哪条事实。
|
|
13
|
+
- **缺口读数**:从已有事实算出还缺什么形态,每条指得出一个能补的动作。真跑的反直觉结论:改变行为的其实是**缺口的可见性**,不是门——所以两者都留(可见性让它想做,门不让它绕过)。
|
|
14
|
+
- **知识门**:结案之前、派评估者之前拦住**没有形态的核心结论**——纯散文不许升格。
|
|
15
|
+
- **知识 Inspector**:点节点或边 → 定义 / 关系 / 断言 / 证据链 / 登记与修订史;「按此筛选」是详情里的**显式动作**,不猜你点它的意思。新增宿主只读路由 `/api/clearai/inspector` 与行为测试。
|
|
16
|
+
- **图谱工作区**:图带可展开成全屏工作区,布局是力导向(知识图谱的原生形状);渲染交给 React Flow(`@xyflow/react` 12,vendor 行随构建走,与 `dist/` 同一条纪律)。
|
|
17
|
+
- **哲学 P6**:「本体生长是循环的原生行为,不是另一个模式」——写进[循环哲学](docs/loop-philosophy.zh-CN.md)与[认识论循环](docs/epistemic-loop.zh-CN.md)(中英)。
|
|
18
|
+
- **素材工具** `tools/panel-shots.mjs`:折一场真会话 → 挂**真组件** → 真 Chrome 截图(与 `tools/graph-shots.mjs` 同一条口径)——面板截图从此可复现,不用人去界面里手点。
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- **图 DTO 统一**:图带与工作区共用同一份投影,判据只有一处(`fold` → `view()` → `graphProjection()`);「同一份账本 ⇒ 同一张图」是投影的性质。
|
|
23
|
+
- **预设描述**收敛成一句中英并排:「利用认识论循环构建可信本体。Build a trustworthy ontology through the epistemic loop.」——名册只有这两行元数据,宿主不会替我们本地化,所以只能自己写死。
|
|
24
|
+
- **README 的「安装」改为「安装与使用」**:写明怎么在模式选择器里切到 `ClearAI`(默认标准模式不挂认识论循环),并把本体图 / 图带 / Inspector 的真机截图放进去。
|
|
25
|
+
- 营销物料换掉全部陈旧面板截图:知乎稿与 docx、小红书 9 张卡片改用真机会话的投影(统计同步为 15 套件 1618 条断言 · 29 个意图工具 · 6808 行内核 · 50 种事件分支)。
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- **命题身份在修订时被重新签发**:同一句话在 id 空间里躺着两份读数(一份「已支持」、一份「未触及」),真会话的卡实测 4 条主张显示成 6~8 行。现在主张原文不变就复用原 id,换了主张才发新 id;并补上 `hypothesis/superseded` 一直缺席的生产者。
|
|
30
|
+
- **节点拖不动**(两次):受控 `nodes` 没接 `onNodesChange`;拖动键写成了对象,`[object Object]` 查不到。
|
|
31
|
+
- **React Flow 是 forwardRef 对象,不是函数**——守卫把合法组件判成「没装上」;并改为同作用域注入,不再依赖运行时模块行。
|
|
32
|
+
- **图带收不到 sessionId**;时间戳不再显示 1970。
|
|
33
|
+
- **工作区读面有主人**:子会话结构上写不进词汇 / 事实货架。
|
|
34
|
+
- 力导向布局的四个真机缺陷(评估者独立复核后逐条修掉)。
|
|
35
|
+
|
|
36
|
+
## [0.2.0] — 2026-09-17
|
|
37
|
+
|
|
38
|
+
**研究的产品形态是本体。** 认识论循环是本体的生产工艺,事实是它的内容单位——真值方向不变(世界 → 证据 → 事实 → 长成本体),所以**本体不裁决任何事,它只收留被裁决过的东西**。别的知识图谱靠抽取与断言堆边;这里的每一条边都要通过循环挣得。
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- **领域本体(语言层)**:六个账本事件(`ontology/term_added / predicate_added / *_revised / *_deprecated`)折成 `state.lexicon`;概念与谓词带依据接纳、版本化修订、黏性废止(**没有删除**);语义变化必须换 id。判据只有一份(`ui/lib/domain-language.js` 纯函数),模型工具、人门动词与折法同源。
|
|
43
|
+
- **七个具名动词**:`RegisterTerm / RegisterPredicate / ReviseTerm / RevisePredicate / DeprecateTerm / DeprecatePredicate / QueryKnowledge`(意图工具 22 → 29 件)。
|
|
44
|
+
- **类型化断言**:假设可带 `assertions`(主词–谓词–宾语;值形态 statement/quantity/formula/code/reference + 关系宾语 instance);**提供即严校**(引用存在、形态合域、同一事实自洽,一律落账之前拒),不提供放行(旧事实显示「未结构化」,不回溯改写);升格时断言随事实定型,事实按 id 关联假设(修掉按文本匹配)。
|
|
45
|
+
- **冲突只暴露,不裁决**:同一单值谓词、同一主体、不同客体 ⇒ 派生一对冲突;卡片与货架各说一遍;不进闸门、不动任何一侧;处置走既有的人门。
|
|
46
|
+
- **本体格(中栏)**:图带(本体图|实体图、缩放平移、全景、点节点=按概念过滤)、断言芯片就地展开词条卡、冲突行+内联标记、过滤 N/M 行、折叠的词汇维护区(含登记抽屉与废止入口——经人门通道,判据与模型工具同一份);零成本契约:没有词条时这一格与从前逐像素相同。
|
|
47
|
+
- **词汇货架** `clear/ontology/domain.md`(概念/谓词/Mermaid 图/引用统计/废止缘由/冲突),幂等渲染,`clear/ontology/` 进系统拒写清单。
|
|
48
|
+
- **提示词** `clearai/domain-language`(hard;24 段定义 / 23 段在场)。
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
|
|
52
|
+
- **定位**:「认识论工作台」→「基于认识论的本体研究平台」;口号「从证据,到改进」→「从证据,到本体」;中栏「事实」格更名「本体」格,事实货架更名**本体货架**(视图 id `clearai-facts` 与账本词汇不动——只有用户可见名词收敛)。
|
|
53
|
+
- 术语收敛:**本体图**(原词汇图)/ **实体图**(原知识图,「知识图谱」是业界词,指整体)。
|
|
54
|
+
- 事实货架 INDEX.md 头改「本体内容(已确立条目…)」。
|
|
55
|
+
- **README 整体重塑**:口号「你的研究,长成一个本体」;叙事从「认识论循环工作台」转向
|
|
56
|
+
「本体发现与探索平台」——先讲你得到什么(本体),再讲凭什么可信(循环,折叠在 details 里);
|
|
57
|
+
面板截图换为本体格为主角(待截);安装与案例后移。定位/术语表/CHANGELOG 同步。
|
|
58
|
+
|
|
59
|
+
### Fixed
|
|
60
|
+
|
|
61
|
+
- e2e 的会话目录 slug 不认中文路径(宿主把 亨通 编码为 ~4EA8~901A):真项目(中文工作区名)此前必被误报成一排 ✗。
|
|
62
|
+
- `--installed` 一次性形态:ClosePlan 之后交出回合即结束 ⇒ CloseGoal 必须同回合连续调用(已写进 e2e 记账)。
|
|
63
|
+
|
|
5
64
|
## [0.1.7] — 2026-09-16
|
|
6
65
|
|
|
7
66
|
**同一件事实只有一个来源。** 一轮"按真值表逐条核对 → 按症状打补丁 → 发现自己在打补丁 →
|
package/README.md
CHANGED
|
@@ -7,136 +7,151 @@
|
|
|
7
7
|
|
|
8
8
|
<p align="center"><b>English</b> · <a href="README.zh-CN.md">中文</a></p>
|
|
9
9
|
|
|
10
|
-
**
|
|
10
|
+
**Your research, grown into an ontology.**
|
|
11
11
|
|
|
12
|
-
ClearAI is
|
|
12
|
+
ClearAI is an **ontology discovery and exploration platform**, built on two core concepts:
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
- **Domain ontology** (what you get) — your project's own vocabulary, the knowledge entries established through the loop, and their graphs. At the end of a research session you hold a continuously growing knowledge structure, retrievable next round by concept.
|
|
15
|
+
- **Epistemic loop** (how you get it) — a disciplined seven-stage path: frame, hypothesize, plan, observe, verify, evaluate, record. Every edge is tested by evidence and independent evaluation.
|
|
16
|
+
|
|
17
|
+
> Other knowledge graphs pile up edges by extraction and assertion; here every edge has to be earned through the loop.
|
|
15
18
|
|
|
16
19
|
<picture>
|
|
17
|
-
<source media="(prefers-color-scheme: dark)" srcset="docs/diagrams/
|
|
18
|
-
<img src="docs/diagrams/
|
|
20
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/diagrams/ontology-hero-dark.png">
|
|
21
|
+
<img src="docs/diagrams/ontology-hero.png" alt="The epistemic loop (left) growing a domain ontology (right)" width="1200">
|
|
19
22
|
</picture>
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
*Left: the Epistemic Loop — seven stages. Its emerald fact dot is also the first node of the domain ontology on the right. Right: the ontology graph — dark is a concept, light is a value form, emerald an instance; the instance carries two contradictory assertions — **the two readings are tinted amber**, marking that they do not agree. The system reports the conflict; retracting or keeping is a human decision.*
|
|
22
25
|
|
|
23
26
|
---
|
|
24
27
|
|
|
25
|
-
##
|
|
28
|
+
## What you get: a domain ontology
|
|
26
29
|
|
|
27
|
-
|
|
30
|
+
A **domain ontology** that grows as you research:
|
|
28
31
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
- **Vocabulary** — the language your project speaks: concepts, predicates, value forms, units. Conventions themselves carry no truth value; sentences written with them do.
|
|
33
|
+
- **Established entries** — knowledge that passed the loop: each with its boundary, support level, and evidence chain. Each entry states its boundary explicitly, so it can be cited safely.
|
|
34
|
+
- **Ontology graph and entity graph** — what your domain looks like (structure), and what you have actually verified (the state of play).
|
|
35
|
+
- **Conflict readings** — contradictory conclusions surface automatically; the system reports them, and retracting or keeping is your decision.
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
## How you get it: the Epistemic Loop
|
|
34
38
|
|
|
35
|
-
|
|
39
|
+
Most agent loops track one thing: whether the task is done. The Epistemic Loop also tracks **what makes a conclusion trustworthy**:
|
|
36
40
|
|
|
37
|
-
|
|
41
|
+
| | Task loop | Epistemic loop |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| Driving question | What next? | What do we know, and on what grounds? |
|
|
44
|
+
| Completion | The model declares it | The system computes it from delivered evidence |
|
|
45
|
+
| Verdict | Whoever did it, says so | Separated — above a level, the doer cannot judge themselves |
|
|
46
|
+
| Failure | Deleted, retried, forgotten | Kept: a refuted hypothesis is a result, not noise |
|
|
47
|
+
| What accumulates | A chat transcript | **An ontology**: every edge earned through the loop |
|
|
38
48
|
|
|
39
|
-
|
|
49
|
+
<picture>
|
|
50
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/diagrams/epistemic-loop-hero-dark.png">
|
|
51
|
+
<img src="docs/diagrams/epistemic-loop-hero.png" alt="The Epistemic Loop" width="1000">
|
|
52
|
+
</picture>
|
|
40
53
|
|
|
41
|
-
|
|
42
|
-
npm test # 14 suites — the list lives in test/run.sh
|
|
43
|
-
node tools/build-package.mjs # assemble dist/ from source
|
|
44
|
-
node tools/verify-package.mjs # rebuild and compare byte-for-byte
|
|
45
|
-
node tools/verify-clean-install.mjs # install into an empty DSH_HOME through the real CLI
|
|
46
|
-
node docs/diagrams/build.mjs # regenerate the loop diagram (needs google-chrome)
|
|
47
|
-
```
|
|
54
|
+
*Inside the ring is the instrument's read-out: the L0–L4 axis, the **pre-registered** threshold as a dashed line, and five observations with error bars — the supported one filled, the inconclusive drawn as a dashed circle, the refuted left in place with a slash through it (nothing is deleted). The emerald dot at the opening is the one reading that crossed the threshold and settled as a fact.*
|
|
48
55
|
|
|
49
|
-
|
|
56
|
+
At runtime, the seven stages compress into four beats — plan, execute, observe, reflect. State is derived from the session record with no second store; the tools the model holds contain no field in which it could declare a step complete.
|
|
57
|
+
|
|
58
|
+
ClearAI does **not** claim recursive self-improvement. It provides the epistemic substrate a self-improving system would need. See [Positioning](docs/positioning.md) and the [OpenRSI survey](docs/research-openrsi.md).
|
|
50
59
|
|
|
51
|
-
|
|
60
|
+
---
|
|
52
61
|
|
|
53
|
-
|
|
62
|
+
## Install and use
|
|
54
63
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
| Completion | The model declares it | The system computes it from delivered evidence |
|
|
59
|
-
| Judgment | Whoever did the work | Separated — above a level, the doer cannot judge its own result |
|
|
60
|
-
| Failure | Deleted, retried, forgotten | Kept: a refuted hypothesis is a result, not noise |
|
|
64
|
+
```bash
|
|
65
|
+
npx clearai-dsh install
|
|
66
|
+
```
|
|
61
67
|
|
|
62
|
-
|
|
68
|
+
Restart `dsh web` afterwards (`npx @deepseek-ai/dsh web`), then **create a session and switch to the `ClearAI` mode in the picker at the top**:
|
|
63
69
|
|
|
64
|
-
|
|
70
|
+
1. Open `dsh web` and click "New session";
|
|
71
|
+
2. Click the current mode name at the top (default: **Standard mode**) to open the preset list;
|
|
72
|
+
3. Pick **ClearAI** — its card reads "利用认识论循环构建可信本体。Build a trustworthy ontology through the epistemic loop.";
|
|
73
|
+
4. Just ask your question. Ordinary Q&A runs as usual; once you set a goal and register hypotheses, the system enters knowledge mode by itself: known facts come to you, gaps stay visible, and conclusions earn their place.
|
|
65
74
|
|
|
66
|
-
|
|
75
|
+
<picture>
|
|
76
|
+
<img src="docs/shots/zh/jepa-ontology.png" alt="The knowledge graph in ClearAI mode" width="820">
|
|
77
|
+
</picture>
|
|
67
78
|
|
|
68
|
-
The
|
|
79
|
+
*The ontology graph in ClearAI mode — this real session grew 21 concepts and 9 predicates; the same ledger always yields the same picture. (UI shown is Chinese.)*
|
|
69
80
|
|
|
70
|
-
|
|
71
|
-
|---|---|---|---|
|
|
72
|
-
| Frame | Bounds the question, assumptions, scope, and outcome | The inquiry starts with an explicit frame | Scope and assumptions |
|
|
73
|
-
| Hypothesize | Records candidate explanations or routes | Propositions remain distinct from admitted facts | Hypotheses |
|
|
74
|
-
| Plan | Defines executable, evidence-bearing steps and criteria | Completion is advanced only through governed paths | Inspectable plan |
|
|
75
|
-
| Observe | Runs permitted work and records what happened | Admission checks eligibility, never truth | Observations and artifacts |
|
|
76
|
-
| Verify | Tests observations against the stated criteria | Verification remains tied to the proposition and its limits | Checks and evidence |
|
|
77
|
-
| Evaluate | Assesses support, uncertainty, and conflicts | Higher-level work can require independent evaluation | Evaluation and basis |
|
|
78
|
-
| Record and act | Preserves the result and chooses the next bounded action | History is retained; unresolved claims stay qualified | Facts, limits, and next step |
|
|
81
|
+
If pnpm is not on PATH: `npm install -g pnpm` (do not `corepack enable` — it installs a version forwarder that may download a pnpm it cannot launch).
|
|
79
82
|
|
|
80
|
-
|
|
83
|
+
From the repository:
|
|
81
84
|
|
|
82
|
-
|
|
85
|
+
```bash
|
|
86
|
+
npm test # 15 suites
|
|
87
|
+
node tools/build-package.mjs # assemble dist/ from source
|
|
88
|
+
node tools/verify-package.mjs # rebuild on the spot, byte-compare
|
|
89
|
+
node docs/diagrams/build-hero.mjs # redraw the product hero (needs google-chrome)
|
|
90
|
+
```
|
|
83
91
|
|
|
84
|
-
|
|
92
|
+
`dist/` is generated and never committed. See [DSH integration](docs/dsh-integration.md).
|
|
85
93
|
|
|
86
|
-
|
|
94
|
+
---
|
|
87
95
|
|
|
88
|
-
|
|
96
|
+
## What it looks like
|
|
89
97
|
|
|
90
|
-
|
|
98
|
+
The middle column has two switchable views: **Deliverables** and **Ontology**. The right sidebar: **Worldlines** and **External Brain**.
|
|
91
99
|
|
|
92
|
-
|
|
100
|
+
**Ontology** — this view is your knowledge home. At the top, a **graph band**: the ontology graph (what your domain looks like) and the entity graph (what you have actually verified) toggle with one click; clicking a node or edge opens the **knowledge inspector** (definition / relations / assertions / evidence chain / history), and "filter by this" is an explicit action inside the detail view. Below that, the **ontology shelf**: established entries, each with assertion chips (click to see what the term means), boundary, and support level; contradictions surface automatically. The vocabulary maintenance block sits collapsed at the bottom — it auto-expands when a language exists before any sentence does.
|
|
93
101
|
|
|
94
|
-
|
|
102
|
+
<picture>
|
|
103
|
+
<img src="docs/shots/zh/jepa-band.png" alt="The graph band: ontology graph and entity graph" width="820">
|
|
104
|
+
</picture>
|
|
95
105
|
|
|
96
|
-
|
|
106
|
+
*The band — the ontology graph and the entity graph share one deterministic projection, so the same ledger always yields the same picture (captured from a real session: 21 concepts, 9 predicates).*
|
|
97
107
|
|
|
98
|
-
|
|
108
|
+
<picture>
|
|
109
|
+
<img src="docs/shots/zh/jepa-inspector.png" alt="Knowledge inspector: definition, relations, assertions, evidence chain" width="820">
|
|
110
|
+
</picture>
|
|
99
111
|
|
|
100
|
-
|
|
112
|
+
*Open any node or edge: definition, relations, assertions, evidence chain, registration and revision history, all in one place. (UI shown is Chinese.)*
|
|
101
113
|
|
|
102
|
-
|
|
114
|
+
**Worldlines** — when two routes genuinely disagree, they run as separate branches with their own readings; the losing one stays on record, and adoption is a human press.
|
|
103
115
|
|
|
104
|
-
|
|
116
|
+
**Deliverables** — the middle column keeps "what the plan declared" and "what actually exists on disk" apart.
|
|
105
117
|
|
|
106
|
-
|
|
118
|
+
**External Brain** — skills and memory as DSH-native entries in one merged catalogue.
|
|
107
119
|
|
|
108
|
-
|
|
120
|
+
---
|
|
109
121
|
|
|
110
|
-
|
|
122
|
+
## Cases
|
|
111
123
|
|
|
112
|
-
- [
|
|
113
|
-
- [
|
|
114
|
-
- [
|
|
124
|
+
- [Physical-world process experiment](docs/cases/physical-experiment.md) — sensor thermal drift: the full chain from raising terms to a conflict surfacing
|
|
125
|
+
- [AI for Science](docs/cases/ai4sci.md) — convergence order of WENO reconstructions, and what "we could not resolve it" honestly means
|
|
126
|
+
- [Mathematics](docs/cases/mathematics.md) — keeping finite numerical evidence strictly separate from proof
|
|
115
127
|
|
|
116
|
-
|
|
128
|
+
---
|
|
117
129
|
|
|
118
130
|
## Documentation
|
|
119
131
|
|
|
120
|
-
- [Positioning](docs/positioning.md)
|
|
121
|
-
- [
|
|
122
|
-
- [
|
|
123
|
-
- [
|
|
124
|
-
- [
|
|
132
|
+
- [Positioning](docs/positioning.md) · [Domain ontology design](docs/domain-ontology.md)
|
|
133
|
+
- [Epistemic loop](docs/epistemic-loop.md) · [Verification ontology](docs/verification-loop.md) · [Loop philosophy](docs/loop-philosophy.md)
|
|
134
|
+
- [Design principles](docs/design-principles.md) · [Soul map](docs/soul-map.md) · [Glossary](docs/glossary.md)
|
|
135
|
+
- [Knowledge-native loop ledger](docs/optimization/knowledge-native-loop.zh-CN.md) (this round: triage / preflight / knowledge gate / graph / inspector; zh-CN)
|
|
136
|
+
- [Development plan](docs/optimization/domain-ontology-plan.md) (with real-run evidence from the Hengtong project)
|
|
125
137
|
- [Known gaps](docs/known-gaps.md) · [Authority map](docs/authority-map.md) · [Release verification](docs/release-verification.md)
|
|
126
|
-
|
|
138
|
+
|
|
139
|
+
## Where it sits in DSH
|
|
140
|
+
|
|
141
|
+
ClearAI adds the epistemic layer on DSH's **composition plane** — one host package, one agent preset, one client module, with **zero changes to the DSH engine**. Working style is unrestricted, but nothing outside the governed path can write to the authoritative ledger (pinned by tests).
|
|
127
142
|
|
|
128
143
|
## Work attribution
|
|
129
144
|
|
|
130
|
-
This project
|
|
145
|
+
This project's work attribution unit is [Jidian Qiyuan](https://jidianqiyuan.com/).
|
|
131
146
|
|
|
132
|
-
## Star
|
|
147
|
+
## Star History
|
|
133
148
|
|
|
134
149
|
[](https://star-history.com/#Clearailhc/clearai-dsh&Date)
|
|
135
150
|
|
|
136
151
|
## License
|
|
137
152
|
|
|
138
|
-
Apache-2.0
|
|
153
|
+
Apache-2.0, see [LICENSE](LICENSE).
|
|
139
154
|
|
|
140
155
|
## Status
|
|
141
156
|
|
|
142
|
-
|
|
157
|
+
A local-first ontology discovery and exploration platform delivered as a DSH plugin. What is not yet implemented, and what has not been verified in a real browser, is written in [Known gaps](docs/known-gaps.md).
|
package/README.zh-CN.md
CHANGED
|
@@ -7,48 +7,34 @@
|
|
|
7
7
|
|
|
8
8
|
<p align="center"><a href="README.md">English</a> · <b>中文</b></p>
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
**你的研究,长成一个本体。**
|
|
11
11
|
|
|
12
|
-
ClearAI
|
|
12
|
+
ClearAI 是一个**本体发现与探索平台**,核心由两个概念支撑:
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
- **领域本体**(你得到什么)——项目自己的词汇、经循环确立的知识条目、以及它们的图。研究结束时你拿到一个持续生长的知识结构,下一轮按概念检索。
|
|
15
|
+
- **认识论循环**(你怎么得到它)——七个阶段的纪律化路径:界定、假设、规划、观测、验证、评估、记录。每条边都要经过证据与独立评估的检验。
|
|
16
|
+
|
|
17
|
+
> 别的知识图谱靠抽取与断言堆边;这里的每一条边都要通过循环挣得。
|
|
15
18
|
|
|
16
19
|
<picture>
|
|
17
|
-
<source media="(prefers-color-scheme: dark)" srcset="docs/diagrams/
|
|
18
|
-
<img src="docs/diagrams/
|
|
20
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/diagrams/ontology-hero-dark.zh-CN.png">
|
|
21
|
+
<img src="docs/diagrams/ontology-hero.zh-CN.png" alt="认识论循环(左)长出领域本体(右)" width="1200">
|
|
19
22
|
</picture>
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
*左:认识论循环——七阶段。绿点是它落定的事实,也是右侧领域本体的第一个节点。右:本体图——深墨是概念,浅墨是值形态,emerald 是实例;实例上挂着两条互相矛盾的断言——**那两个取值染成 amber**,就是「这两条读数对不上」。系统只报出冲突,撤回或维持由人决定。*
|
|
22
25
|
|
|
23
26
|
---
|
|
24
27
|
|
|
25
|
-
##
|
|
26
|
-
|
|
27
|
-
一条命令,除了 Node 什么都不需要:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
npx clearai-dsh install
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
它会自己找到 DSH CLI(PATH 上有就用,没有就走 npx),把插件装进你的 `web` profile,再把组合读回来核一眼 —— 不用凭一句「成功」相信它。底下就是宿主自己的安装动作,所以两者等价:`dsh plugin --profile web add clearai-dsh`。
|
|
28
|
+
## 你得到什么:领域本体
|
|
34
29
|
|
|
35
|
-
|
|
30
|
+
一个**领域本体**,它在你研究的过程中生长:
|
|
36
31
|
|
|
37
|
-
|
|
32
|
+
- **词汇**——你的项目用什么语言说话:概念、谓词、值形态、单位。约定本身没有对错,有对错的是用这些词写下的句子。
|
|
33
|
+
- **已确立条目**——通过了循环的知识:每条带边界、支持等级、证据链。每条都写明适用边界,否则无法安全引用。
|
|
34
|
+
- **本体图与实体图**——你的领域长什么样(结构),你已经验证出了什么(战况)。
|
|
35
|
+
- **冲突读数**——两条互相矛盾的结论自动亮出来;系统只报出冲突,撤回或维持由你决定。
|
|
38
36
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
npm test # 14 份套件 —— 清单在 test/run.sh
|
|
43
|
-
node tools/build-package.mjs # 由源装配 dist/
|
|
44
|
-
node tools/verify-package.mjs # 现场重建并逐字节比对
|
|
45
|
-
node tools/verify-clean-install.mjs # 空 DSH_HOME + 真 CLI 装一遍(16 条断言)
|
|
46
|
-
node docs/diagrams/build.mjs # 重画循环主图(需 google-chrome)
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
`dist/` 是生成物,不进版本库。见 [DSH 集成](docs/dsh-integration.zh-CN.md)。
|
|
50
|
-
|
|
51
|
-
## 为什么它不只是又一个 agent loop
|
|
37
|
+
## 你怎么得到它:认识论循环
|
|
52
38
|
|
|
53
39
|
多数 agent loop 只跟踪一件事:任务做完没有。认识论循环还跟踪**一个结论凭什么被信任**:
|
|
54
40
|
|
|
@@ -58,72 +44,101 @@ node docs/diagrams/build.mjs # 重画循环主图(需 google-chrome)
|
|
|
58
44
|
| 完成 | 模型宣布完成 | 系统按交付的证据算出来 |
|
|
59
45
|
| 裁决 | 谁做的谁说了算 | 分离——超过一定等级,做的人不能判自己 |
|
|
60
46
|
| 失败 | 删掉、重来、忘掉 | 留下:被推翻的命题是结果,不是噪声 |
|
|
47
|
+
| 沉淀 | 一段聊天记录 | **一个本体**:本体中的每个关系都有来源和验证记录 |
|
|
61
48
|
|
|
62
|
-
|
|
49
|
+
<picture>
|
|
50
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/diagrams/epistemic-loop-hero-dark.zh-CN.png">
|
|
51
|
+
<img src="docs/diagrams/epistemic-loop-hero.zh-CN.png" alt="认识论循环" width="1000">
|
|
52
|
+
</picture>
|
|
63
53
|
|
|
64
|
-
|
|
54
|
+
*环内是这台仪器的读数面:横轴是 L0–L4 七个等级,那条虚线是**事先登记进判据**的阈值;五个观测各带误差棒——被支持的填实、无法判定的画虚圈、被推翻的留在原位打一道斜杠(什么都不删)。开口处那颗 emerald 是唯一越过判据、落定成事实的读数。*
|
|
65
55
|
|
|
66
|
-
|
|
56
|
+
运行时,七个阶段压缩为四拍——计划、执行、观察、反思。状态从会话记录派生,没有第二份存储;模型的工具里没有可以宣告某一步完成的字段。
|
|
67
57
|
|
|
68
|
-
|
|
58
|
+
ClearAI **不**声称递归自我改进。它提供的是自我改进系统所需要的认识论底座。详见[定位](docs/positioning.zh-CN.md)与[OpenRSI 调研](docs/research-openrsi.md)。
|
|
69
59
|
|
|
70
|
-
|
|
71
|
-
|---|---|---|---|
|
|
72
|
-
| 界定 | 明确问题、假设、范围与目标 | 调查从显式边界开始 | 范围与假设 |
|
|
73
|
-
| 提出假设 | 记录候选解释或路线 | 命题与已采纳事实分开 | 假设 |
|
|
74
|
-
| 规划 | 定义可执行、可提供证据的步骤和判据 | 只能通过受治理路径推进完成 | 可检查的计划 |
|
|
75
|
-
| 观测 | 执行允许的工作并记录发生了什么 | 准入只判断是否可接收,不判断真假 | 观测与产物 |
|
|
76
|
-
| 验证 | 用已登记的判据检验观测 | 验证始终绑定命题及其边界 | 检查与证据 |
|
|
77
|
-
| 评估 | 判断支持、不确定性与冲突 | 高等级工作可要求独立评估 | 评估与依据 |
|
|
78
|
-
| 记录并行动 | 保存结果,选择下一项有边界的行动 | 保留历史;未解决命题保持限定 | 事实、边界与下一步 |
|
|
60
|
+
---
|
|
79
61
|
|
|
80
|
-
|
|
62
|
+
## 安装与使用
|
|
81
63
|
|
|
82
|
-
|
|
64
|
+
```bash
|
|
65
|
+
npx clearai-dsh install
|
|
66
|
+
```
|
|
83
67
|
|
|
84
|
-
|
|
68
|
+
装完重启 `dsh web`(`npx @deepseek-ai/dsh web`),然后**新建会话,在顶部的模式选择器里切换到 `ClearAI`**:
|
|
85
69
|
|
|
86
|
-
|
|
70
|
+
1. 打开 `dsh web`,点「新建会话」;
|
|
71
|
+
2. 点顶部当前的模式名(默认是「标准模式」),展开预设列表;
|
|
72
|
+
3. 选 **ClearAI**——卡片描述就一句:「利用认识论循环构建可信本体。Build a trustworthy ontology through the epistemic loop.」;
|
|
73
|
+
4. 像平常一样提问。普通问答照常走;一旦你立了目标并登记假设,系统自动进入知识模式:预检把已知送上来,缺口如实读出来,结论过证据才准入。
|
|
87
74
|
|
|
88
|
-
|
|
75
|
+
<picture>
|
|
76
|
+
<img src="docs/shots/zh/jepa-ontology.png" alt="ClearAI 模式下的知识图谱" width="820">
|
|
77
|
+
</picture>
|
|
89
78
|
|
|
90
|
-
|
|
79
|
+
*ClearAI 模式下的本体图——这场真实会话长出 21 个概念、9 条谓词;同一份账本永远得到同一张图。*
|
|
91
80
|
|
|
92
|
-
|
|
81
|
+
如果 PATH 上没有 pnpm:`npm install -g pnpm`(别用 `corepack enable`——它装的是版本转发器,可能下载一个自己启动不了的 pnpm)。
|
|
93
82
|
|
|
94
|
-
|
|
83
|
+
从仓库开发:
|
|
95
84
|
|
|
96
|
-
|
|
85
|
+
```bash
|
|
86
|
+
npm test # 15 份套件
|
|
87
|
+
node tools/build-package.mjs # 由源装配 dist/
|
|
88
|
+
node tools/verify-package.mjs # 现场重建并逐字节比对
|
|
89
|
+
node docs/diagrams/build-hero.mjs # 重画产品主图(需 google-chrome)
|
|
90
|
+
```
|
|
97
91
|
|
|
98
|
-
|
|
92
|
+
`dist/` 是生成物,不进版本库。见 [DSH 集成](docs/dsh-integration.zh-CN.md)。
|
|
99
93
|
|
|
100
|
-
|
|
94
|
+
---
|
|
101
95
|
|
|
102
|
-
##
|
|
96
|
+
## 它长什么样
|
|
103
97
|
|
|
104
|
-
|
|
98
|
+
中栏两格可切:**产物**与**本体**。右栏:**世界树**与**外脑**。
|
|
105
99
|
|
|
106
|
-
|
|
100
|
+
**本体**——这一格是你的知识主场。顶部是**图带**:本体图(你的领域长什么样)与实体图(已经验证出了什么)一键切换;点节点或边打开**知识 Inspector**(定义 / 关系 / 断言 / 证据链 / 历史),「按此过滤」是详情里的显式动作。下面是**本体货架**:已确立的条目,每条带断言芯片(点开看这个词什么意思)、边界与等级;互相矛盾的自动亮出来。词汇维护区收在最底下——语言先于句子时它自动展开。
|
|
107
101
|
|
|
108
|
-
|
|
102
|
+
<picture>
|
|
103
|
+
<img src="docs/shots/zh/jepa-band.png" alt="本体图带:本体图与实体图切换" width="820">
|
|
104
|
+
</picture>
|
|
109
105
|
|
|
110
|
-
|
|
106
|
+
*图带——本体图与实体图共用同一份确定性投影,同一份账本永远得到同一张图;素材来自一场真实会话(21 概念 · 9 谓词)。*
|
|
107
|
+
|
|
108
|
+
<picture>
|
|
109
|
+
<img src="docs/shots/zh/jepa-inspector.png" alt="知识 Inspector:定义、关系、断言、证据链" width="820">
|
|
110
|
+
</picture>
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
- [数学探索](docs/cases/mathematics.zh-CN.md) —— 把有限数值证据与形式证明严格分开;
|
|
114
|
-
- [物理世界工艺实验](docs/cases/physical-experiment.zh-CN.md) —— 执行离开计算机之后,循环如何保持可追溯。
|
|
112
|
+
*点开任一节点或边:定义、关系、断言、证据链、登记与修订史,一处读完。*
|
|
115
113
|
|
|
116
|
-
|
|
114
|
+
**世界树**——两条路线真的分歧时,各自独立跑、各自带读数;落选的那条留在记录里,采纳是人按的那一下。
|
|
115
|
+
|
|
116
|
+
**产物**——中栏把「计划声明交付的」与「盘上真有的」分开摆,不许混为一谈。
|
|
117
|
+
|
|
118
|
+
**外脑**——技能与记忆以 DSH 原生条目的形式出现在同一张合并目录里。
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 案例
|
|
123
|
+
|
|
124
|
+
- [物理世界工艺实验](docs/cases/physical-experiment.zh-CN.md)——传感器热漂移:从立词到冲突现形的完整链路
|
|
125
|
+
- [AI for Science](docs/cases/ai4sci.zh-CN.md)——WENO 重构的收敛阶,以及「分辨不出来」意味着什么
|
|
126
|
+
- [数学探索](docs/cases/mathematics.zh-CN.md)——把有限数值证据与形式证明严格分开
|
|
127
|
+
|
|
128
|
+
---
|
|
117
129
|
|
|
118
130
|
## 文档
|
|
119
131
|
|
|
120
|
-
- [定位](docs/positioning.zh-CN.md)
|
|
121
|
-
- [
|
|
122
|
-
- [
|
|
123
|
-
- [
|
|
124
|
-
- [
|
|
132
|
+
- [定位](docs/positioning.zh-CN.md) · [领域本体设计](docs/domain-ontology.zh-CN.md)
|
|
133
|
+
- [认识论循环](docs/epistemic-loop.zh-CN.md) · [验证本体](docs/verification-loop.zh-CN.md) · [循环哲学](docs/loop-philosophy.zh-CN.md)
|
|
134
|
+
- [设计原则](docs/design-principles.zh-CN.md) · [灵魂映射](docs/soul-map.zh-CN.md) · [术语表](docs/glossary.zh-CN.md)
|
|
135
|
+
- [知识原生循环执行账本](docs/optimization/knowledge-native-loop.zh-CN.md)(本轮:分诊 / 预检 / 知识门 / 图 / Inspector)
|
|
136
|
+
- [开发计划](docs/optimization/domain-ontology-plan.zh-CN.md)(含亨通真跑读数)
|
|
125
137
|
- [已知缺口](docs/known-gaps.zh-CN.md) · [权威归属](docs/authority-map.zh-CN.md) · [发布验收](docs/release-verification.zh-CN.md)
|
|
126
|
-
|
|
138
|
+
|
|
139
|
+
## 它落在 DSH 的哪一层
|
|
140
|
+
|
|
141
|
+
ClearAI 把认识论层加在 DSH 的**组合面**上——一个宿主包、一个 agent 预设、一个客户端模块,**DSH 引擎一行都没改**。工作方式不设限,但它们写不进权威账本(权威边界由测试钉死)。
|
|
127
142
|
|
|
128
143
|
## 工作署名
|
|
129
144
|
|
|
@@ -135,8 +150,8 @@ ClearAI 把认识论层加在 DSH 的**组合面**上——一个宿主包、一
|
|
|
135
150
|
|
|
136
151
|
## 许可证
|
|
137
152
|
|
|
138
|
-
Apache-2.0
|
|
153
|
+
Apache-2.0,见 [LICENSE](LICENSE)。
|
|
139
154
|
|
|
140
155
|
## 状态
|
|
141
156
|
|
|
142
|
-
|
|
157
|
+
一个通过 DSH 交付的本地优先本体发现与探索平台。哪些还没实现、哪些还没在真浏览器里验过,都写在[已知缺口](docs/known-gaps.zh-CN.md)里。
|