yuangs 2.30.0 → 2.32.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.
- package/README.md +246 -589
- package/dist/agent/llmAdapter.js +1 -1
- package/dist/agent/llmAdapter.js.map +1 -1
- package/dist/agent/selectModel.js +1 -1
- package/dist/agent/selectModel.js.map +1 -1
- package/dist/cli.js +15 -10
- package/dist/cli.js.map +1 -1
- package/dist/commands/handleAICommand.js +1 -1
- package/dist/commands/handleAICommand.js.map +1 -1
- package/dist/core/capabilitySystem.js +2 -2
- package/dist/core/capabilitySystem.js.map +1 -1
- package/dist/governance/GovernanceEngine.d.ts +20 -0
- package/dist/governance/GovernanceEngine.js +95 -0
- package/dist/governance/GovernanceEngine.js.map +1 -0
- package/dist/governance/GovernedAction.d.ts +107 -0
- package/dist/governance/GovernedAction.js +9 -0
- package/dist/governance/GovernedAction.js.map +1 -0
- package/dist/governance/actions/CodeChangeAction.d.ts +28 -0
- package/dist/governance/actions/CodeChangeAction.js +139 -0
- package/dist/governance/actions/CodeChangeAction.js.map +1 -0
- package/dist/governance/capability/token.d.ts +45 -0
- package/dist/governance/capability/token.js +103 -0
- package/dist/governance/capability/token.js.map +1 -0
- package/dist/governance/commands/diffEdit.d.ts +2 -0
- package/dist/governance/commands/diffEdit.js +176 -0
- package/dist/governance/commands/diffEdit.js.map +1 -0
- package/dist/governance/execution/sandbox.d.ts +12 -0
- package/dist/governance/execution/sandbox.js +76 -0
- package/dist/governance/execution/sandbox.js.map +1 -0
- package/dist/governance/fsm/stateMachine.d.ts +40 -0
- package/dist/governance/fsm/stateMachine.js +93 -0
- package/dist/governance/fsm/stateMachine.js.map +1 -0
- package/dist/governance/index.d.ts +9 -0
- package/dist/governance/index.js +26 -0
- package/dist/governance/index.js.map +1 -0
- package/dist/governance/review/diffParser.d.ts +12 -0
- package/dist/governance/review/diffParser.js +61 -0
- package/dist/governance/review/diffParser.js.map +1 -0
- package/dist/governance/review/render.d.ts +5 -0
- package/dist/governance/review/render.js +58 -0
- package/dist/governance/review/render.js.map +1 -0
- package/dist/governance/storage/store.d.ts +16 -0
- package/dist/governance/storage/store.js +110 -0
- package/dist/governance/storage/store.js.map +1 -0
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
# 🚀 yuangs CLI - An AI‑Augmented Shell
|
|
3
2
|
|
|
4
3
|
**以人类意图为中心的 AI‑Augmented Shell**
|
|
@@ -14,7 +13,6 @@
|
|
|
14
13
|
|
|
15
14
|
---
|
|
16
15
|
|
|
17
|
-
|
|
18
16
|
# yuangs
|
|
19
17
|
|
|
20
18
|
> **为终端而生的 AI 治理运行时**
|
|
@@ -24,7 +22,7 @@
|
|
|
24
22
|
|
|
25
23
|
它不是浏览器插件。
|
|
26
24
|
不是 GUI 助手。
|
|
27
|
-
|
|
25
|
+
也不是"披着 CLI 外衣的聊天机器人"。
|
|
28
26
|
|
|
29
27
|
它解决的是一个更难的问题:
|
|
30
28
|
|
|
@@ -36,7 +34,7 @@
|
|
|
36
34
|
|
|
37
35
|
### 🧩 做好一件事(Do one thing and do it well)
|
|
38
36
|
|
|
39
|
-
`yuangs`
|
|
37
|
+
`yuangs` 的定位不是"全能助手",而是一个**上下文治理器(Context Governor)**。
|
|
40
38
|
|
|
41
39
|
你始终清楚、并且显式地决定:
|
|
42
40
|
- 哪些文件进入 AI 上下文
|
|
@@ -55,22 +53,20 @@ ai "@src/**/*.ts #docs"
|
|
|
55
53
|
|
|
56
54
|
---
|
|
57
55
|
|
|
58
|
-
### 🛡️
|
|
59
|
-
|
|
60
|
-
很多终端 AI 工具追求“省事”,代价却是**不透明**:
|
|
56
|
+
### 🛡️ 开发者主权,而不是"方便至上"
|
|
61
57
|
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
58
|
+
很多终端 AI 工具追求"省事",代价却是**不透明**:
|
|
59
|
+
- 数据悄悄上传
|
|
60
|
+
- 上下文被隐式截断
|
|
61
|
+
- 执行逻辑不可审计
|
|
65
62
|
|
|
66
63
|
`yuangs` 选择了另一条路:
|
|
67
|
-
|
|
68
|
-
- ✅ **Swiss‑Cheese 采样预览**:发送前看到“每一块奶酪”
|
|
64
|
+
- ✅ **Swiss‑Cheese 采样预览**:发送前看到"每一块奶酪"
|
|
69
65
|
- ✅ **TokenPolicy**:先估算、再确认
|
|
70
66
|
- ✅ **Human‑in‑the‑loop**:切模型、发请求、跑执行,永远需要你点头
|
|
71
67
|
|
|
72
|
-
你的终端,
|
|
73
|
-
你的数据,
|
|
68
|
+
你的终端,
|
|
69
|
+
你的数据,
|
|
74
70
|
你的决定。
|
|
75
71
|
|
|
76
72
|
这才是极客眼中的**真自由**。
|
|
@@ -79,7 +75,7 @@ ai "@src/**/*.ts #docs"
|
|
|
79
75
|
|
|
80
76
|
### 🧠 可编程的 Agent 基础设施,而不是 Prompt Wrapper
|
|
81
77
|
|
|
82
|
-
`yuangs` 发布到 npm
|
|
78
|
+
`yuangs` 发布到 npm 的不是一个"命令",
|
|
83
79
|
而是一套**可组合的 Agent 运行时**。
|
|
84
80
|
|
|
85
81
|
核心抽象包括:
|
|
@@ -88,14 +84,14 @@ ai "@src/**/*.ts #docs"
|
|
|
88
84
|
- 能力感知的执行策略
|
|
89
85
|
- 可回放、可审计的执行记录
|
|
90
86
|
|
|
91
|
-
你拿到的不是黑盒,
|
|
87
|
+
你拿到的不是黑盒,
|
|
92
88
|
而是一盒**带说明书的乐高**。
|
|
93
89
|
|
|
94
90
|
你可以用它构建:
|
|
95
|
-
- 仓库结构分析器
|
|
96
|
-
- 日志 → AI 的自动采集管道
|
|
97
|
-
- 可控的重构 Agent
|
|
98
|
-
- 可审计的自动化流程
|
|
91
|
+
- 仓库结构分析器
|
|
92
|
+
- 日志 → AI 的自动采集管道
|
|
93
|
+
- 可控的重构 Agent
|
|
94
|
+
- 可审计的自动化流程
|
|
99
95
|
|
|
100
96
|
---
|
|
101
97
|
|
|
@@ -113,26 +109,29 @@ ai "@src/**/*.ts #docs"
|
|
|
113
109
|
✅ **可回放、可审计**
|
|
114
110
|
每一次 AI 行为都能复盘、复现、调试。
|
|
115
111
|
|
|
112
|
+
✅ **可解释、可治理**
|
|
113
|
+
通过 `explain` 和 `replay` 命令,理解系统决策过程。
|
|
114
|
+
|
|
116
115
|
---
|
|
117
116
|
|
|
118
117
|
## 适合谁?
|
|
119
118
|
|
|
120
|
-
- 终端原教旨主义者
|
|
121
|
-
- Linux / Unix 哲学信徒
|
|
122
|
-
- 被不透明 AI 工具伤过的工程师
|
|
123
|
-
- 追求**确定性高于便利性**的人
|
|
119
|
+
- 终端原教旨主义者
|
|
120
|
+
- Linux / Unix 哲学信徒
|
|
121
|
+
- 被不透明 AI 工具伤过的工程师
|
|
122
|
+
- 追求**确定性高于便利性**的人
|
|
124
123
|
|
|
125
124
|
如果你认同这句话:
|
|
126
125
|
|
|
127
|
-
>
|
|
126
|
+
> **"AI 很强大,所以它必须被治理。"**
|
|
128
127
|
|
|
129
128
|
那 `yuangs` 就是为你写的。
|
|
130
129
|
|
|
131
130
|
---
|
|
132
131
|
|
|
132
|
+
## 📜 语法说明
|
|
133
133
|
|
|
134
|
-
|
|
135
|
-
yuangs 通过一套**显式的符号语法**,清晰界定“副作用”的来源,
|
|
134
|
+
yuangs 通过一套**显式的符号语法**,清晰界定"副作用"的来源,
|
|
136
135
|
确保每一条命令 **可理解、可确认、可审计**。
|
|
137
136
|
|
|
138
137
|
| 语法 | 行为逻辑 | 决策来源 | 适用场景 |
|
|
@@ -158,18 +157,18 @@ yuangs ai
|
|
|
158
157
|
|
|
159
158
|
特性包括:
|
|
160
159
|
|
|
161
|
-
- **模式自动路由**
|
|
160
|
+
- **模式自动路由**
|
|
162
161
|
无需切换模式:
|
|
163
|
-
- 输入 `git status` → 直接执行
|
|
162
|
+
- 输入 `git status` → 直接执行
|
|
164
163
|
- 输入「解释这段代码」→ 进入对话
|
|
165
164
|
|
|
166
|
-
- **👻 Ghost Text(幽灵建议)**
|
|
167
|
-
根据历史记录与插件预测输入
|
|
165
|
+
- **👻 Ghost Text(幽灵建议)**
|
|
166
|
+
根据历史记录与插件预测输入
|
|
168
167
|
例如输入 `npm r`,灰色显示 `un dev`,按 `Tab` 采纳
|
|
169
168
|
|
|
170
169
|
- **⚡ 补全增强**
|
|
171
|
-
- **PATH 扫描**:自动补全 40+ 常用系统命令
|
|
172
|
-
- **精准行号**:支持 `@src/index.ts:10-50`
|
|
170
|
+
- **PATH 扫描**:自动补全 40+ 常用系统命令
|
|
171
|
+
- **精准行号**:支持 `@src/index.ts:10-50`
|
|
173
172
|
- **项目感知**:提升 `src/`、`packages/` 等目录权重
|
|
174
173
|
|
|
175
174
|
---
|
|
@@ -184,7 +183,6 @@ git diff | yuangs -w "Review 变更逻辑"
|
|
|
184
183
|
```
|
|
185
184
|
|
|
186
185
|
#### `-w` 智能读取
|
|
187
|
-
|
|
188
186
|
- 自动解析管道中的文件路径
|
|
189
187
|
- 只读取**被显式引用**的文件内容
|
|
190
188
|
- 不进行隐式文件系统扫描
|
|
@@ -193,7 +191,7 @@ git diff | yuangs -w "Review 变更逻辑"
|
|
|
193
191
|
|
|
194
192
|
### 3. 插件系统(Plugins)
|
|
195
193
|
|
|
196
|
-
在 `.shell/plugins/` 下放置自定义脚本,
|
|
194
|
+
在 `.shell/plugins/` 下放置自定义脚本,
|
|
197
195
|
扩展特定工具的补全与推理能力(如 `docker`、`kubectl`)。
|
|
198
196
|
|
|
199
197
|
示例:
|
|
@@ -210,466 +208,33 @@ module.exports = {
|
|
|
210
208
|
|
|
211
209
|
---
|
|
212
210
|
|
|
213
|
-
##
|
|
214
|
-
|
|
215
|
-
### 工程理性 vs. AI 狂热
|
|
216
|
-
|
|
217
|
-
yuangs 并不是一个试图“替你完成任务”的工具。
|
|
218
|
-
它诞生于一个更克制的问题:
|
|
219
|
-
|
|
220
|
-
> **在 AI 能力爆炸的时代,命令行该如何进化,而不背叛工程理性?**
|
|
221
|
-
|
|
222
|
-
---
|
|
223
|
-
|
|
224
|
-
### 为什么 yuangs 不是 Autonomous Agent?
|
|
225
|
-
|
|
226
|
-
Autonomous Agent 承诺:
|
|
227
|
-
给 AI 一个目标,让它自行规划、执行、修正。
|
|
228
|
-
|
|
229
|
-
但在真实工程环境中,这种模式存在根本缺陷:
|
|
230
|
-
|
|
231
|
-
> **执行权与责任归属是模糊的。**
|
|
232
|
-
|
|
233
|
-
因此,在 yuangs 中,我们**明确拒绝**让 AI 拥有:
|
|
234
|
-
|
|
235
|
-
- 自动执行系统命令的权力
|
|
236
|
-
- 隐式修改文件或运行环境的权力
|
|
237
|
-
- 在未确认的情况下产生任何副作用的权力
|
|
238
|
-
|
|
239
|
-
---
|
|
240
|
-
|
|
241
|
-
## 🔒 行为边界(Agent Boundaries)
|
|
242
|
-
|
|
243
|
-
yuangs 严格遵循以下边界,以确保长期工程可靠性:
|
|
244
|
-
|
|
245
|
-
- **非自治性(Human‑in‑the‑loop)**
|
|
246
|
-
AI 负责推理与建议,人类始终是最终决策者与执行者。
|
|
247
|
-
|
|
248
|
-
- **副作用隔离(Side‑effect Isolation)**
|
|
249
|
-
AI 不具备系统写权限。
|
|
250
|
-
所有建议必须转化为**用户可见的 Action**并经确认后执行。
|
|
251
|
-
|
|
252
|
-
- **显式上下文(Explicit Context)**
|
|
253
|
-
除显式输入外,yuangs 不会在后台扫描文件系统。
|
|
254
|
-
|
|
255
|
-
- **可回溯性(Auditable Records)**
|
|
256
|
-
所有 AI 建议、命令生成与执行结果均被记录,
|
|
257
|
-
确保完整决策链条可追溯、可审计。
|
|
258
|
-
|
|
259
|
-
---
|
|
260
|
-
|
|
261
|
-
## 💡 使用场景示例
|
|
262
|
-
|
|
263
|
-
### 场景 A:智能调试
|
|
264
|
-
|
|
265
|
-
```bash
|
|
266
|
-
@!build.sh
|
|
267
|
-
# 系统返回报错…
|
|
268
|
-
|
|
269
|
-
上面的错误是什么意思?
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
AI 将结合 **build.sh 内容 + 实际输出** 进行分析。
|
|
273
|
-
|
|
274
|
-
---
|
|
275
|
-
|
|
276
|
-
### 场景 B:命令生成
|
|
277
|
-
|
|
278
|
-
```bash
|
|
279
|
-
ai -e "查找当前目录下大于 100M 的文件"
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
AI 生成建议命令(如 `find . -type f -size +100M`),
|
|
283
|
-
**存入剪贴板,等待你确认执行。**
|
|
284
|
-
|
|
285
|
-
---
|
|
286
|
-
|
|
287
|
-
### 场景 C:项目审计
|
|
288
|
-
|
|
289
|
-
```bash
|
|
290
|
-
#src/
|
|
291
|
-
分析这些模块的功能
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
AI 在**显式授权**下读取目录内容并生成结构分析。
|
|
295
|
-
|
|
296
|
-
---
|
|
297
|
-
|
|
298
|
-
## 📦 安装与配置
|
|
299
|
-
|
|
300
|
-
```bash
|
|
301
|
-
npm install -g yuangs
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
常用配置:
|
|
305
|
-
|
|
306
|
-
```bash
|
|
307
|
-
yuangs config defaultModel Assistant
|
|
308
|
-
yuangs config accountType pro
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
---
|
|
312
|
-
|
|
313
|
-
## 🗓️ 近期更新(Changelog)
|
|
314
|
-
|
|
315
|
-
- **v2.11.0** (2026‑01‑18)
|
|
316
|
-
新增 40+ Shell 内置命令支持(cd, pwd, ls, git 等)
|
|
317
|
-
|
|
318
|
-
- **v2.10.0** (2026‑01‑18)
|
|
319
|
-
引入 Shell 交互内核、Ghost Text 与插件系统
|
|
320
|
-
|
|
321
|
-
- **v1.3.67** (2026‑01‑17)
|
|
322
|
-
新增 `@` 文件选择与 `#` 目录读取功能
|
|
323
|
-
|
|
324
|
-
---
|
|
325
|
-
|
|
326
|
-
## ⚖️ 维护者
|
|
327
|
-
|
|
328
|
-
**@yuanguangshan**
|
|
329
|
-
|
|
330
|
-
> **AI 提供思路,人类掌控执行。**
|
|
331
|
-
> 这不是妥协,而是对工程理性的尊重。
|
|
332
|
-
|
|
333
|
-
---
|
|
334
|
-
|
|
335
|
-
## 📚 更多信息
|
|
336
|
-
|
|
337
|
-
- **设计原理**: [docs/implementation_principles.md](docs/implementation_principles.md)
|
|
338
|
-
- **场景示例**: [docs/scenarios.md](docs/scenarios.md)
|
|
339
|
-
- **执行语义**: [docs/semantics.md](docs/semantics.md)
|
|
340
|
-
- **非目标**: [docs/non-goals.md](docs/non-goals.md)
|
|
341
|
-
- **威胁模型**: [docs/threat_model.md](docs/threat_model.md)
|
|
342
|
-
- **实现差距分析**: [docs/implementation_gap.md](docs/implementation_gap.md)
|
|
343
|
-
- **变更日志**: [docs/CHANGELOG.md](docs/CHANGELOG.md)
|
|
344
|
-
- **Shell 补全**: [docs/tab_completion_guide.md](docs/tab_completion_guide.md)
|
|
345
|
-
- **上下文优化**: [docs/context_optimization_analysis.md](docs/context_optimization_analysis.md)
|
|
346
|
-
- **代理管道**: [docs/AGENT_PIPELINE.md](docs/AGENT_PIPELINE.md)
|
|
347
|
-
- **上下文管理**: [docs/context_management.md](docs/context_management.md)
|
|
348
|
-
```
|
|
349
|
-
|
|
350
|
-
---
|
|
351
|
-
|
|
352
|
-
## 固化什么?
|
|
353
|
-
---
|
|
354
|
-
|
|
355
|
-
# 一、先明确:**这种“感觉”到底是什么?**
|
|
356
|
-
|
|
357
|
-
如果抽象到一句话,它不是“AI 很聪明”,而是:
|
|
358
|
-
|
|
359
|
-
> **AI 在该收手的时候会收手,在该判断的时候才判断。**
|
|
360
|
-
|
|
361
|
-
拆开就是三条**硬约束**:
|
|
362
|
-
|
|
363
|
-
1. **不编造不存在的设计意图**
|
|
364
|
-
2. **输入信号低 → 输出自然退化**
|
|
365
|
-
3. **判断权始终在人类这边**
|
|
366
|
-
|
|
367
|
-
这三条一旦被破坏,`yuangs` 就会变成另一个“吵闹的 Copilot”。
|
|
368
|
-
|
|
369
|
-
---
|
|
370
|
-
|
|
371
|
-
# 二、把感觉固化 = 把“边界”写死
|
|
372
|
-
|
|
373
|
-
不是写在代码里,而是写在**交互模型里**。
|
|
374
|
-
|
|
375
|
-
## ✅ 1️⃣ 固化原则一:**AI 永远只对“输入负责”**
|
|
376
|
-
|
|
377
|
-
你这个例子非常好:
|
|
378
|
-
|
|
379
|
-
```bash
|
|
380
|
-
git diff | yuangs ai "总结本次改动的设计意图"
|
|
381
|
-
```
|
|
382
|
-
|
|
383
|
-
AI 的隐含契约应当是:
|
|
384
|
-
|
|
385
|
-
> **“我只基于 diff 本身说话,不补历史、不补猜测。”**
|
|
386
|
-
|
|
387
|
-
✅ 正确
|
|
388
|
-
❌ “也许之前存在 XXX 架构问题”
|
|
389
|
-
|
|
390
|
-
**这条要成为不可违反的铁律。**
|
|
391
|
-
|
|
392
|
-
你可以把它写成一句内部原则(非常重要):
|
|
393
|
-
|
|
394
|
-
> **AI 不得在 diff 之外引入任何假设性上下文,除非用户明确要求。**
|
|
395
|
-
|
|
396
|
-
---
|
|
397
|
-
|
|
398
|
-
## ✅ 2️⃣ 固化原则二:**低信息 ≠ 强输出**
|
|
399
|
-
|
|
400
|
-
这是你这个例子里最“高级”的地方。
|
|
401
|
-
|
|
402
|
-
- 输入:只有一条注释
|
|
403
|
-
- 输出:朴素、干净、甚至有点“空”
|
|
404
|
-
|
|
405
|
-
**这不是缺点,这是成熟系统的标志。**
|
|
406
|
-
|
|
407
|
-
你要允许、甚至鼓励这种状态。
|
|
408
|
-
|
|
409
|
-
可以把它理解为:
|
|
410
|
-
|
|
411
|
-
> **AI 的输出强度应与输入信息密度成正比**
|
|
412
|
-
|
|
413
|
-
工程上可以表达为一句话:
|
|
414
|
-
|
|
415
|
-
> **宁可输出“没什么可说”,也不输出“看起来很深刻”。**
|
|
416
|
-
|
|
417
|
-
---
|
|
418
|
-
|
|
419
|
-
## ✅ 3️⃣ 固化原则三:**“判断”必须被显式请求**
|
|
420
|
-
|
|
421
|
-
这条极其重要。
|
|
422
|
-
|
|
423
|
-
对比这两种:
|
|
424
|
-
|
|
425
|
-
❌ 自动:
|
|
426
|
-
> “这个改动不太好,建议重构”
|
|
427
|
-
|
|
428
|
-
✅ 触发式:
|
|
429
|
-
```bash
|
|
430
|
-
"这个改动是否值得保留?"
|
|
431
|
-
"像 code review 一样评价"
|
|
432
|
-
```
|
|
433
|
-
|
|
434
|
-
**判断 = 权力**
|
|
435
|
-
而权力只能由用户授予。
|
|
436
|
-
|
|
437
|
-
你已经天然地做对了这一点,但你要**把它定成规则**:
|
|
438
|
-
|
|
439
|
-
> **没有 judgement prompt,AI 只做 description。**
|
|
440
|
-
|
|
441
|
-
---
|
|
442
|
-
|
|
443
|
-
# 三、真正该“固化”的不是 AI,而是 Prompt 模式
|
|
444
|
-
|
|
445
|
-
你现在其实已经有了三个**隐式模式**,只是还没被“命名”。
|
|
446
|
-
|
|
447
|
-
我帮你命名,它们一旦被命名,就能长期稳定存在。
|
|
448
|
-
|
|
449
|
-
---
|
|
450
|
-
|
|
451
|
-
## 🧱 模式 1:**Describe(描述态)**【默认】
|
|
452
|
-
|
|
453
|
-
```bash
|
|
454
|
-
git diff | yuangs ai "总结本次改动"
|
|
455
|
-
```
|
|
456
|
-
|
|
457
|
-
特征:
|
|
458
|
-
- 不评价
|
|
459
|
-
- 不推断
|
|
460
|
-
- 不给建议
|
|
461
|
-
- 只还原信息
|
|
462
|
-
|
|
463
|
-
👉 **这是默认态,必须最保守。**
|
|
464
|
-
|
|
465
|
-
---
|
|
466
|
-
|
|
467
|
-
## 🔍 模式 2:**Review(评审态)**
|
|
468
|
-
|
|
469
|
-
```bash
|
|
470
|
-
git diff | yuangs ai "像 code review 一样给反馈"
|
|
471
|
-
```
|
|
472
|
-
|
|
473
|
-
特征:
|
|
474
|
-
- 可以判断
|
|
475
|
-
- 可以提出风险
|
|
476
|
-
- 可以提建议
|
|
477
|
-
- 仍然基于 diff
|
|
478
|
-
|
|
479
|
-
👉 **这是工程协作态。**
|
|
480
|
-
|
|
481
|
-
---
|
|
482
|
-
|
|
483
|
-
## 🧠 模式 3:**Reason(推理态)**
|
|
484
|
-
|
|
485
|
-
```bash
|
|
486
|
-
git diff | yuangs ai "推测背后的设计考量"
|
|
487
|
-
```
|
|
488
|
-
|
|
489
|
-
特征:
|
|
490
|
-
- 允许假设
|
|
491
|
-
- 允许不确定性
|
|
492
|
-
- 必须显式标注「推测」
|
|
493
|
-
|
|
494
|
-
👉 **这是思考扩展态,不是事实陈述。**
|
|
495
|
-
|
|
496
|
-
---
|
|
497
|
-
|
|
498
|
-
📌 **关键不是实现,而是“默认只在模式 1”**
|
|
499
|
-
|
|
500
|
-
这是你和 90% AI 工具的根本分水岭。
|
|
501
|
-
|
|
502
|
-
---
|
|
503
|
-
|
|
504
|
-
# 四、一个非常重要但容易被忽略的点
|
|
505
|
-
|
|
506
|
-
> **不要为了“显得聪明”,去优化这种“克制感”。**
|
|
507
|
-
|
|
508
|
-
你现在拥有的是一个**可信系统的气质**:
|
|
509
|
-
|
|
510
|
-
- 不抢话
|
|
511
|
-
- 不强行帮忙
|
|
512
|
-
- 不输出废话
|
|
513
|
-
|
|
514
|
-
这在早期可能会被误解为“没那么惊艳”,
|
|
515
|
-
但在 **3 个月 / 6 个月 / 1 年** 后:
|
|
516
|
-
|
|
517
|
-
✅ 它会变成你最敢信任的工具
|
|
518
|
-
✅ 你会开始无意识地把关键判断交给它
|
|
519
|
-
|
|
520
|
-
---
|
|
521
|
-
|
|
522
|
-
### Why yuangs
|
|
523
|
-
|
|
524
|
-
> **A governed AI runtime for the terminal.**
|
|
525
|
-
> *No OOM. No surprises. Human in the loop — always.*
|
|
526
|
-
|
|
527
|
-
`yuangs` is a Unix‑style AI tool for developers who live in the terminal and **refuse black boxes**.
|
|
528
|
-
|
|
529
|
-
It does **not** try to replace your shell.
|
|
530
|
-
It does **not** hide decisions behind magic prompts.
|
|
531
|
-
Instead, it answers a harder question:
|
|
532
|
-
|
|
533
|
-
> **When uncontrollable AI meets a terminal built on control — how do we restore order?**
|
|
534
|
-
|
|
535
|
-
---
|
|
536
|
-
|
|
537
|
-
## Philosophy
|
|
538
|
-
|
|
539
|
-
### 🧩 Do one thing, and do it well
|
|
540
|
-
|
|
541
|
-
`yuangs` is not a browser plugin, not a GUI assistant, and not a “chatbot in disguise”.
|
|
542
|
-
|
|
543
|
-
It is a **context governor**.
|
|
544
|
-
|
|
545
|
-
You explicitly decide:
|
|
546
|
-
- what files enter the context
|
|
547
|
-
- how much token budget is allowed
|
|
548
|
-
- when sampling happens
|
|
549
|
-
- when execution is permitted
|
|
550
|
-
|
|
551
|
-
Files, directories, and AI logic are connected through **syntax**, not clicks.
|
|
552
|
-
|
|
553
|
-
```bash
|
|
554
|
-
ai "@src/**/*.ts #docs"
|
|
555
|
-
```
|
|
556
|
-
|
|
557
|
-
This is Unix philosophy applied to AI:
|
|
558
|
-
**syntax is power**.
|
|
559
|
-
|
|
560
|
-
---
|
|
561
|
-
|
|
562
|
-
### 🛡️ Developer sovereignty, by default
|
|
563
|
-
|
|
564
|
-
Most AI CLI tools optimize for convenience — at the cost of trust.
|
|
565
|
-
|
|
566
|
-
They:
|
|
567
|
-
- upload silently
|
|
568
|
-
- truncate context implicitly
|
|
569
|
-
- execute plans opaquely
|
|
570
|
-
|
|
571
|
-
`yuangs` does the opposite.
|
|
572
|
-
|
|
573
|
-
- **Swiss‑cheese sampling preview** — see *exactly* what will be sent
|
|
574
|
-
- **TokenPolicy** — estimate before resolve, always
|
|
575
|
-
- **Human‑in‑the‑loop decisions** — model switches, sampling, execution
|
|
576
|
-
|
|
577
|
-
Your terminal.
|
|
578
|
-
Your data.
|
|
579
|
-
Your choice.
|
|
580
|
-
|
|
581
|
-
---
|
|
582
|
-
|
|
583
|
-
### 🧠 A programmable Agent runtime — not a prompt wrapper
|
|
584
|
-
|
|
585
|
-
Publishing `yuangs` to npm doesn’t give you just a command.
|
|
586
|
-
It gives you **an agent runtime you can compose**.
|
|
587
|
-
|
|
588
|
-
Core primitives:
|
|
589
|
-
- `PendingContextItem`
|
|
590
|
-
- token estimation vs resolution
|
|
591
|
-
- capability‑aware execution
|
|
592
|
-
- replayable execution records
|
|
593
|
-
|
|
594
|
-
You don’t get a black box.
|
|
595
|
-
You get **LEGO with instructions**.
|
|
596
|
-
|
|
597
|
-
Build your own:
|
|
598
|
-
- repo analyzers
|
|
599
|
-
- log‑to‑AI pipelines
|
|
600
|
-
- controlled refactoring agents
|
|
601
|
-
- auditable automation
|
|
602
|
-
|
|
603
|
-
---
|
|
604
|
-
|
|
605
|
-
## What makes it different
|
|
606
|
-
|
|
607
|
-
✅ **No OOM, no surprise**
|
|
608
|
-
Large repos, massive logs — nothing is fully loaded or sent without confirmation.
|
|
609
|
-
|
|
610
|
-
✅ **Human in the loop, always**
|
|
611
|
-
AI never escalates privileges or cost silently.
|
|
612
|
-
|
|
613
|
-
✅ **Power of syntax**
|
|
614
|
-
`@file`, `#dir`, intent‑driven commands — faster than any drag‑and‑drop UI.
|
|
615
|
-
|
|
616
|
-
✅ **Replay & audit**
|
|
617
|
-
Every AI action is inspectable, reproducible, and debuggable.
|
|
618
|
-
|
|
619
|
-
---
|
|
620
|
-
|
|
621
|
-
## Who is this for?
|
|
622
|
-
|
|
623
|
-
- Terminal‑first developers
|
|
624
|
-
- Linux / Unix philosophy believers
|
|
625
|
-
- Engineers burned by opaque AI tools
|
|
626
|
-
- Anyone who wants **control before convenience**
|
|
627
|
-
|
|
628
|
-
If you believe:
|
|
629
|
-
> *“AI is powerful — and that’s exactly why it must be governed.”*
|
|
630
|
-
|
|
631
|
-
Then `yuangs` is for you.
|
|
632
|
-
|
|
633
|
-
---
|
|
634
|
-
|
|
635
|
-
## Status
|
|
636
|
-
|
|
637
|
-
`yuangs` is actively evolving.
|
|
638
|
-
The core governance model is stable; interfaces are still sharpening.
|
|
211
|
+
## 🔒 Phase 2: Explainability & Governance (v1)
|
|
639
212
|
|
|
640
|
-
|
|
213
|
+
### 🎯 概述
|
|
641
214
|
|
|
642
|
-
|
|
215
|
+
Phase 2 引入了**系统可观测性和控制能力**,但不改变核心行为:
|
|
216
|
+
- ✅ **Explainability**:人类可读的执行解释
|
|
217
|
+
- ✅ **Replay++**:Dry-run、explain 和 diff 能力
|
|
218
|
+
- ✅ **Skill Control**:启用/禁用技能以实现细粒度控制
|
|
643
219
|
|
|
644
220
|
---
|
|
645
221
|
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
## 🎯 Overview
|
|
649
|
-
|
|
650
|
-
Phase 2 introduces **system observability and control** without changing core behavior:
|
|
651
|
-
- ✅ Explainability: Human-readable execution explanations
|
|
652
|
-
- ✅ Replay++: Dry-run, explain, and diff capabilities
|
|
653
|
-
- ✅ Skill Control: Enable/disable skills for fine-grained control
|
|
654
|
-
|
|
655
|
-
---
|
|
656
|
-
|
|
657
|
-
## 📦 New Commands
|
|
222
|
+
## 📦 新命令
|
|
658
223
|
|
|
659
224
|
### `yuangs explain [id | last]`
|
|
660
225
|
|
|
661
|
-
|
|
226
|
+
**目的**:解释系统为什么做出某个决策
|
|
662
227
|
|
|
663
|
-
|
|
228
|
+
**用法**:
|
|
664
229
|
```bash
|
|
665
|
-
#
|
|
230
|
+
# 解释最近一次执行
|
|
666
231
|
yuangs explain last
|
|
667
232
|
|
|
668
|
-
#
|
|
233
|
+
# 解释指定 ID 的执行
|
|
669
234
|
yuangs explain exec_1768820380225_rgts34981
|
|
670
235
|
```
|
|
671
236
|
|
|
672
|
-
|
|
237
|
+
**输出格式(v1)**:
|
|
673
238
|
```
|
|
674
239
|
=== Execution Explanation ===
|
|
675
240
|
[1] Command
|
|
@@ -698,49 +263,49 @@ yuangs explain exec_1768820380225_rgts34981
|
|
|
698
263
|
=============================
|
|
699
264
|
```
|
|
700
265
|
|
|
701
|
-
|
|
702
|
-
- ✅
|
|
703
|
-
- ✅
|
|
704
|
-
- ✅
|
|
266
|
+
**关键特性**:
|
|
267
|
+
- ✅ 纯只读操作(无副作用)
|
|
268
|
+
- ✅ 稳定、可 snapshot 的输出
|
|
269
|
+
- ✅ 为未来的 diff/audit 工作流做好的准备
|
|
705
270
|
|
|
706
271
|
---
|
|
707
272
|
|
|
708
273
|
### `yuangs replay <id> [options]`
|
|
709
274
|
|
|
710
|
-
|
|
275
|
+
**目的**:使用控制标志重放执行
|
|
711
276
|
|
|
712
|
-
|
|
713
|
-
|
|
|
277
|
+
**选项**:
|
|
278
|
+
| 选项 | 描述 |
|
|
714
279
|
|--------|-------------|
|
|
715
|
-
| `-s, --strict` |
|
|
716
|
-
| `-c, --compatible` |
|
|
717
|
-
| `-r, --re-evaluate` |
|
|
718
|
-
| `-v, --verbose` |
|
|
719
|
-
| `--dry` | Dry run -
|
|
720
|
-
| `--explain` |
|
|
721
|
-
| `--diff` |
|
|
722
|
-
|
|
723
|
-
|
|
280
|
+
| `-s, --strict` | 严格重放(使用精确模型) |
|
|
281
|
+
| `-c, --compatible` | 兼容重放(允许 fallback) |
|
|
282
|
+
| `-r, --re-evaluate` | 使用当前配置重新评估 |
|
|
283
|
+
| `-v, --verbose` | 详细输出 |
|
|
284
|
+
| `--dry` | Dry run - 显示将要发生的内容但不执行 |
|
|
285
|
+
| `--explain` | 在重放前显示解释 |
|
|
286
|
+
| `--diff` | 显示原始配置与当前配置的差异 |
|
|
287
|
+
|
|
288
|
+
**用法示例**:
|
|
724
289
|
```bash
|
|
725
|
-
#
|
|
290
|
+
# 使用解释进行 dry run
|
|
726
291
|
yuangs replay exec_1768820380225_rgts34981 --dry --explain
|
|
727
292
|
|
|
728
|
-
#
|
|
293
|
+
# 仅显示 diff(不执行)
|
|
729
294
|
yuangs replay exec_1768820380225_rgts34981 --diff --dry
|
|
730
295
|
|
|
731
|
-
#
|
|
296
|
+
# 带差异的完整重放
|
|
732
297
|
yuangs replay exec_1768820380225_rgts34981 --diff
|
|
733
298
|
```
|
|
734
299
|
|
|
735
|
-
|
|
736
|
-
| explain | dry | strict |
|
|
300
|
+
**重放行为矩阵**:
|
|
301
|
+
| explain | dry | strict | 行为 |
|
|
737
302
|
|--------|-----|--------|----------|
|
|
738
|
-
| ✅ | ✅ | any |
|
|
739
|
-
| ✅ | ❌ | ✅ |
|
|
740
|
-
| ❌ | ✅ | ✅ |
|
|
741
|
-
| ❌ | ❌ | ✅ |
|
|
303
|
+
| ✅ | ✅ | any | 仅解释,不执行 |
|
|
304
|
+
| ✅ | ❌ | ✅ | 解释 → 重放 |
|
|
305
|
+
| ❌ | ✅ | ✅ | 打印严格信息 → 退出 |
|
|
306
|
+
| ❌ | ❌ | ✅ | 正常重放 |
|
|
742
307
|
|
|
743
|
-
|
|
308
|
+
**差异输出**:
|
|
744
309
|
```
|
|
745
310
|
=== Replay Diff ===
|
|
746
311
|
[Decision]
|
|
@@ -758,24 +323,24 @@ yuangs replay exec_1768820380225_rgts34981 --diff
|
|
|
758
323
|
|
|
759
324
|
### `yuangs skills <subcommand>`
|
|
760
325
|
|
|
761
|
-
|
|
326
|
+
**目的**:管理技能库
|
|
762
327
|
|
|
763
|
-
|
|
328
|
+
**子命令**:
|
|
764
329
|
```bash
|
|
765
|
-
#
|
|
330
|
+
# 列出所有技能及其分数
|
|
766
331
|
yuangs skills list
|
|
767
332
|
|
|
768
|
-
#
|
|
333
|
+
# 解释特定技能
|
|
769
334
|
yuangs skills explain <skill-name>
|
|
770
335
|
|
|
771
|
-
#
|
|
336
|
+
# 禁用技能
|
|
772
337
|
yuangs skills disable <skill-name>
|
|
773
338
|
|
|
774
|
-
#
|
|
339
|
+
# 启用技能
|
|
775
340
|
yuangs skills enable <skill-name>
|
|
776
341
|
```
|
|
777
342
|
|
|
778
|
-
|
|
343
|
+
**输出示例**(`skills list`):
|
|
779
344
|
```
|
|
780
345
|
📦 Skills (3)
|
|
781
346
|
|
|
@@ -795,142 +360,234 @@ yuangs skills enable <skill-name>
|
|
|
795
360
|
Last used: 7 days ago
|
|
796
361
|
```
|
|
797
362
|
|
|
798
|
-
|
|
799
|
-
- ✅
|
|
800
|
-
- ✅
|
|
801
|
-
- ✅
|
|
802
|
-
- ✅
|
|
363
|
+
**关键特性**:
|
|
364
|
+
- ✅ 技能可以被禁用而不删除
|
|
365
|
+
- ✅ 技能按相关性评分和排序
|
|
366
|
+
- ✅ 禁用的技能不影响新决策
|
|
367
|
+
- ✅ 所有技能在 `explain` 输出中仍然可见
|
|
803
368
|
|
|
804
369
|
---
|
|
805
370
|
|
|
806
|
-
## 🧭 Explain
|
|
371
|
+
## 🧭 Explain 输出规范 v1
|
|
807
372
|
|
|
808
|
-
|
|
809
|
-
- ✅
|
|
810
|
-
- ✅
|
|
811
|
-
- ✅
|
|
812
|
-
- ✅
|
|
373
|
+
explain 输出遵循严格格式,设计用于:
|
|
374
|
+
- ✅ 人类可读性
|
|
375
|
+
- ✅ 稳定性和 snapshot 兼容性
|
|
376
|
+
- ✅ 未来的 diff/audit 工作流
|
|
377
|
+
- ✅ 无实现耦合
|
|
813
378
|
|
|
814
|
-
|
|
815
|
-
1. `[1] Command` -
|
|
816
|
-
2. `[2] Decision` -
|
|
817
|
-
3. `[3] Model` -
|
|
818
|
-
4. `[4] Skills` -
|
|
819
|
-
5. `[5] Meta` -
|
|
379
|
+
**结构**(5 个部分,不可变顺序):
|
|
380
|
+
1. `[1] Command` - 用户输入层
|
|
381
|
+
2. `[2] Decision` - 决策核心
|
|
382
|
+
3. `[3] Model` - 执行环境
|
|
383
|
+
4. `[4] Skills` - 影响决策的技能
|
|
384
|
+
5. `[5] Meta` - 审计/重放元数据
|
|
820
385
|
|
|
821
|
-
|
|
822
|
-
- ⚠️
|
|
823
|
-
- ✅
|
|
824
|
-
- ✅
|
|
386
|
+
**重要提示**:
|
|
387
|
+
- ⚠️ 不要在升级规范版本时更改格式
|
|
388
|
+
- ✅ 输出是纯文本(snapshot 无颜色)
|
|
389
|
+
- ✅ 相同执行记录 = 100% 可重现输出
|
|
825
390
|
|
|
826
391
|
---
|
|
827
392
|
|
|
828
|
-
## 🔒
|
|
393
|
+
## 🔒 技能与启用状态
|
|
829
394
|
|
|
830
|
-
|
|
395
|
+
技能现在有一个 `enabled` 字段,控制它们在新决策中的参与:
|
|
831
396
|
|
|
832
|
-
|
|
833
|
-
- ✅
|
|
834
|
-
- ✅
|
|
835
|
-
- ❌
|
|
397
|
+
**默认行为**:
|
|
398
|
+
- ✅ 新技能:`enabled: true`
|
|
399
|
+
- ✅ 旧技能:`enabled: true`(如果字段缺失)
|
|
400
|
+
- ❌ 禁用的技能:不包含在 `getRelevantSkills()` 中
|
|
836
401
|
|
|
837
|
-
|
|
838
|
-
1.
|
|
839
|
-
2. **A/B
|
|
840
|
-
3.
|
|
841
|
-
4.
|
|
402
|
+
**使用场景**:
|
|
403
|
+
1. **治理**:临时禁用有风险的技能
|
|
404
|
+
2. **A/B 测试**:比较不同的技能配置
|
|
405
|
+
3. **回滚**:禁用新添加的技能而不删除
|
|
406
|
+
4. **审计**:在 explain 输出中查看禁用的技能
|
|
842
407
|
|
|
843
|
-
**CLI
|
|
408
|
+
**CLI 命令**:
|
|
844
409
|
```bash
|
|
845
|
-
#
|
|
410
|
+
# 禁用技能
|
|
846
411
|
yuangs skills disable risky-operation
|
|
847
412
|
|
|
848
|
-
#
|
|
413
|
+
# 列出以验证
|
|
849
414
|
yuangs skills list
|
|
850
415
|
|
|
851
|
-
#
|
|
416
|
+
# 如果需要,重新启用
|
|
852
417
|
yuangs skills enable risky-operation
|
|
853
418
|
```
|
|
854
419
|
|
|
855
420
|
---
|
|
856
421
|
|
|
857
|
-
## 🧪
|
|
422
|
+
## 🧪 测试与 Snapshots
|
|
858
423
|
|
|
859
|
-
###
|
|
424
|
+
### 创建 Explain Snapshots
|
|
860
425
|
|
|
861
426
|
```bash
|
|
862
|
-
#
|
|
427
|
+
# 创建最近一次执行的 snapshot
|
|
863
428
|
yuangs replay exec_1768820380225_rgts34981 --explain --dry > snapshot.txt
|
|
864
429
|
```
|
|
865
430
|
|
|
866
|
-
Snapshots
|
|
867
|
-
- ✅
|
|
868
|
-
- ✅
|
|
869
|
-
- ✅
|
|
870
|
-
- ✅
|
|
431
|
+
Snapshots 可用于:
|
|
432
|
+
- ✅ 回归测试
|
|
433
|
+
- ✅ 输出格式验证
|
|
434
|
+
- ✅ 文档示例
|
|
435
|
+
- ✅ 审计线索
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
## 💡 使用场景示例
|
|
440
|
+
|
|
441
|
+
### 场景 A:智能调试
|
|
442
|
+
|
|
443
|
+
```bash
|
|
444
|
+
@!build.sh
|
|
445
|
+
# 系统返回报错…
|
|
446
|
+
|
|
447
|
+
上面的错误是什么意思?
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
AI 将结合 **build.sh 内容 + 实际输出** 进行分析。
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
### 场景 B:命令生成
|
|
455
|
+
|
|
456
|
+
```bash
|
|
457
|
+
ai -e "查找当前目录下大于 100M 的文件"
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
AI 生成建议命令(如 `find . -type f -size +100M`),
|
|
461
|
+
**存入剪贴板,等待你确认执行。**
|
|
871
462
|
|
|
872
463
|
---
|
|
873
464
|
|
|
874
|
-
|
|
465
|
+
### 场景 C:项目审计
|
|
466
|
+
|
|
467
|
+
```bash
|
|
468
|
+
#src/
|
|
469
|
+
分析这些模块的功能
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
AI 在**显式授权**下读取目录内容并生成结构分析。
|
|
473
|
+
|
|
474
|
+
---
|
|
475
|
+
|
|
476
|
+
## 📝 实现说明
|
|
875
477
|
|
|
876
478
|
### Explain Output v1
|
|
877
479
|
|
|
878
|
-
|
|
480
|
+
**文件**:`src/core/explain.ts`
|
|
879
481
|
|
|
880
|
-
|
|
881
|
-
-
|
|
882
|
-
-
|
|
883
|
-
-
|
|
884
|
-
-
|
|
482
|
+
**关键设计**:
|
|
483
|
+
- 纯函数(无副作用)
|
|
484
|
+
- 无全局状态的外部依赖
|
|
485
|
+
- 使用现有的 `ExecutionRecord` 结构
|
|
486
|
+
- 稳定格式(版本化)
|
|
885
487
|
|
|
886
488
|
---
|
|
887
489
|
|
|
888
490
|
### Replay Diff
|
|
889
491
|
|
|
890
|
-
|
|
492
|
+
**文件**:`src/core/replayDiff.ts`
|
|
891
493
|
|
|
892
|
-
|
|
893
|
-
-
|
|
894
|
-
-
|
|
895
|
-
-
|
|
896
|
-
-
|
|
494
|
+
**关键设计**:
|
|
495
|
+
- 比较 Decision、Model 和 Skills 层
|
|
496
|
+
- 显示 added/removed/changed 技能
|
|
497
|
+
- 语义 diff(非 token 级别)
|
|
498
|
+
- 与 Explain v1 格式兼容
|
|
897
499
|
|
|
898
500
|
---
|
|
899
501
|
|
|
900
502
|
### Skills Control
|
|
901
503
|
|
|
902
|
-
|
|
504
|
+
**文件**:`src/agent/skills.ts`
|
|
903
505
|
|
|
904
|
-
|
|
905
|
-
-
|
|
906
|
-
-
|
|
907
|
-
- `getRelevantSkills()`
|
|
506
|
+
**关键变更**:
|
|
507
|
+
- 向 `Skill` 接口添加 `enabled: boolean` 字段
|
|
508
|
+
- 导出 `computeSkillScore()` 供 CLI 使用
|
|
509
|
+
- `getRelevantSkills()` 过滤禁用的技能
|
|
908
510
|
|
|
909
511
|
---
|
|
910
512
|
|
|
911
|
-
##
|
|
513
|
+
## 📦 安装与配置
|
|
912
514
|
|
|
913
|
-
|
|
515
|
+
```bash
|
|
516
|
+
npm install -g yuangs
|
|
517
|
+
```
|
|
914
518
|
|
|
915
|
-
|
|
519
|
+
常用配置:
|
|
520
|
+
|
|
521
|
+
```bash
|
|
522
|
+
yuangs config defaultModel Assistant
|
|
523
|
+
yuangs config accountType pro
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
---
|
|
527
|
+
|
|
528
|
+
## 🗓️ 近期更新(Changelog)
|
|
529
|
+
|
|
530
|
+
- **v2.29.0** (2026‑01‑20)
|
|
531
|
+
- 新增 Explainability 功能(`explain` 命令)
|
|
532
|
+
- 新增 Replay++ 支持(`--dry`, `--explain`, `--diff`)
|
|
533
|
+
- 新增 Skills 管理命令(`skills list/explain/disable/enable`)
|
|
534
|
+
- 引入 Explain Output Spec v1 规范
|
|
535
|
+
- 实现 Replay Diff 功能
|
|
536
|
+
- **v2.11.0** (2026‑01‑18)
|
|
537
|
+
- 新增 40+ Shell 内置命令支持(cd, pwd, ls, git 等)
|
|
538
|
+
- **v2.10.0** (2026‑01‑18)
|
|
539
|
+
- 引入 Shell 交互内核、Ghost Text 与插件系统
|
|
540
|
+
- **v1.3.67** (2026‑01‑17)
|
|
541
|
+
- 新增 `@` 文件选择与 `#` 目录读取功能
|
|
542
|
+
|
|
543
|
+
---
|
|
544
|
+
|
|
545
|
+
## ✅ Phase 2 完成清单
|
|
546
|
+
|
|
547
|
+
所有 Phase 2 目标已完成:
|
|
548
|
+
|
|
549
|
+
- [x] Explainability(ExecutionRecord 级别)
|
|
916
550
|
- [x] Replay dry / explain / strict
|
|
917
|
-
- [x] Skill scoring & enable
|
|
918
|
-
- [x] CLI
|
|
919
|
-
- [x] Replay diff
|
|
920
|
-
- [x] Skills enabled
|
|
921
|
-
- [x] Explain v1
|
|
922
|
-
- [x] Snapshot
|
|
551
|
+
- [x] Skill scoring & enable 标志
|
|
552
|
+
- [x] 所有三个功能的 CLI 集成
|
|
553
|
+
- [x] Replay diff 实现
|
|
554
|
+
- [x] Skills enabled 过滤
|
|
555
|
+
- [x] Explain v1 规范
|
|
556
|
+
- [x] Snapshot 测试能力
|
|
923
557
|
|
|
924
|
-
|
|
558
|
+
**下一阶段**:Phase 3 - 高级治理与项目级智能
|
|
925
559
|
|
|
560
|
+
---
|
|
926
561
|
|
|
927
|
-
|
|
928
|
-
The core governance model is stable; interfaces are still sharpening.
|
|
562
|
+
## 📚 更多信息
|
|
929
563
|
|
|
930
|
-
|
|
564
|
+
- **设计原理**: [docs/implementation_principles.md](docs/implementation_principles.md)
|
|
565
|
+
- **场景示例**: [docs/scenarios.md](docs/scenarios.md)
|
|
566
|
+
- **执行语义**: [docs/semantics.md](docs/semantics.md)
|
|
567
|
+
- **非目标**: [docs/non-goals.md](docs/non-goals.md)
|
|
568
|
+
- **威胁模型**: [docs/threat_model.md](docs/threat_model.md)
|
|
569
|
+
- **变更日志**: [docs/CHANGELOG.md](docs/CHANGELOG.md)
|
|
570
|
+
- **Shell 补全**: [docs/tab_completion_guide.md](docs/tab_completion_guide.md)
|
|
571
|
+
- **上下文优化**: [docs/context_optimization_analysis.md](docs/context_optimization_analysis.md)
|
|
572
|
+
- **代理管道**: [docs/AGENT_PIPELINE.md](docs/AGENT_PIPELINE.md)
|
|
573
|
+
- **上下文管理**: [docs/context_management.md](docs/context_management.md)
|
|
931
574
|
|
|
575
|
+
---
|
|
576
|
+
|
|
577
|
+
## ⚖️ 维护者
|
|
578
|
+
|
|
579
|
+
**@yuanguangshan**
|
|
580
|
+
|
|
581
|
+
> **AI 提供思路,人类掌控执行。**
|
|
582
|
+
> 这不是妥协,而是对工程理性的尊重。
|
|
583
|
+
|
|
584
|
+
---
|
|
932
585
|
|
|
933
|
-
|
|
586
|
+
## 状态
|
|
934
587
|
|
|
588
|
+
`yuangs` 正在积极演进中。
|
|
589
|
+
核心治理模型已稳定;接口仍在优化中。
|
|
935
590
|
|
|
591
|
+
欢迎贡献、想法和有原则的批评。
|
|
936
592
|
|
|
593
|
+
> **"AI 除非被明确要求,否则不应该比输入看起来更聪明。"**
|