@clawos-dev/clawd 0.2.134 → 0.2.135-beta.280.568890f
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/dist/cli.cjs +1173 -414
- package/dist/persona-defaults/persona-developer/CLAUDE.md +0 -13
- package/package.json +1 -1
|
@@ -70,19 +70,6 @@ done
|
|
|
70
70
|
- **显式优于隐式**(数据流和依赖清晰可见)
|
|
71
71
|
- **测试驱动**(先写测试)
|
|
72
72
|
|
|
73
|
-
## 模块边界:deep-leaf 优先
|
|
74
|
-
|
|
75
|
-
划模块边界时按这两条判据,理想是"既 deep 又 leaf"的节点:
|
|
76
|
-
|
|
77
|
-
- **deep**(接口窄、内部厚):调用方不需要知道实现细节就能正确用。改实现 → 调用方无感
|
|
78
|
-
- **leaf**(爆炸半径小):没有其他模块依赖它的内部状态。它出 bug / 被重写不会污染上游
|
|
79
|
-
|
|
80
|
-
**反面**:浅模块(接口比实现还复杂,把简单逻辑拆碎成 N 个文件)、伪主干(本可叶子的功能因偷懒共享状态而长成主干)。
|
|
81
|
-
|
|
82
|
-
**AI 协作处方**:叶子节点可以放手让 AI vibe;主干 / 跨模块改动必须人工 review 接口设计。
|
|
83
|
-
|
|
84
|
-
参考 Ousterhout *A Philosophy of Software Design* 的 deep module 概念。
|
|
85
|
-
|
|
86
73
|
## 跨模块设计
|
|
87
74
|
|
|
88
75
|
**推迟逻辑分叉**:同一条数据/事件链路跨多个模块时,分叉尽量在最末端消费方。中间层默认复用上游 schema 透传,下游按需 narrow。
|
package/package.json
CHANGED