math-skill 2.0.1 → 3.0.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.en-US.md +167 -175
- package/README.md +167 -175
- package/agents/math-critic.en.md +235 -0
- package/agents/math-critic.md +10 -8
- package/commands/ask.md +3 -12
- package/design-patterns/attention/equivariant-attention.en.md +72 -0
- package/design-patterns/attention/equivariant-attention.md +72 -0
- package/design-patterns/attention/geometry-aware-attention.en.md +73 -0
- package/design-patterns/attention/geometry-aware-attention.md +72 -0
- package/design-patterns/attention/information-bottleneck-attention.en.md +72 -0
- package/design-patterns/attention/information-bottleneck-attention.md +72 -0
- package/design-patterns/attention/projection-attention.en.md +68 -0
- package/design-patterns/attention/projection-attention.md +68 -0
- package/design-patterns/attention/spectral-attention.en.md +71 -0
- package/design-patterns/attention/spectral-attention.md +71 -0
- package/design-patterns/compression/leverage-score-selection.en.md +71 -0
- package/design-patterns/compression/leverage-score-selection.md +71 -0
- package/design-patterns/compression/low-rank-kv-cache.en.md +60 -0
- package/design-patterns/compression/low-rank-kv-cache.md +60 -0
- package/design-patterns/compression/spectral-token-pruning.en.md +61 -0
- package/design-patterns/compression/spectral-token-pruning.md +61 -0
- package/design-patterns/compression/topology-preserving-compression.en.md +64 -0
- package/design-patterns/compression/topology-preserving-compression.md +64 -0
- package/design-patterns/loss/constraint-penalty.en.md +67 -0
- package/design-patterns/loss/constraint-penalty.md +78 -0
- package/design-patterns/loss/contrastive-loss.en.md +59 -0
- package/design-patterns/loss/contrastive-loss.md +68 -0
- package/design-patterns/loss/information-bottleneck-loss.en.md +69 -0
- package/design-patterns/loss/information-bottleneck-loss.md +74 -0
- package/design-patterns/loss/orthogonality-loss.en.md +56 -0
- package/design-patterns/loss/orthogonality-loss.md +60 -0
- package/design-patterns/loss/variational-loss.en.md +61 -0
- package/design-patterns/loss/variational-loss.md +71 -0
- package/design-patterns/representation/equivariant-split.en.md +87 -0
- package/design-patterns/representation/equivariant-split.md +89 -0
- package/design-patterns/representation/manifold-representation.en.md +85 -0
- package/design-patterns/representation/manifold-representation.md +87 -0
- package/design-patterns/representation/shared-private-decomposition.en.md +84 -0
- package/design-patterns/representation/shared-private-decomposition.md +86 -0
- package/design-patterns/representation/subspace-alignment.en.md +90 -0
- package/design-patterns/representation/subspace-alignment.md +92 -0
- package/design-patterns/routing/graph-routing.en.md +79 -0
- package/design-patterns/routing/graph-routing.md +81 -0
- package/design-patterns/routing/moe-routing.en.md +85 -0
- package/design-patterns/routing/moe-routing.md +87 -0
- package/design-patterns/routing/optimal-transport-routing.en.md +68 -0
- package/design-patterns/routing/optimal-transport-routing.md +72 -0
- package/design-patterns/routing/spectral-clustering-routing.en.md +88 -0
- package/design-patterns/routing/spectral-clustering-routing.md +90 -0
- package/knowledge-base/differential-geometry/connection.en.md +51 -0
- package/knowledge-base/differential-geometry/connection.md +51 -0
- package/knowledge-base/differential-geometry/curvature.en.md +49 -0
- package/knowledge-base/differential-geometry/curvature.md +49 -0
- package/knowledge-base/differential-geometry/geodesic.en.md +51 -0
- package/knowledge-base/differential-geometry/geodesic.md +51 -0
- package/knowledge-base/differential-geometry/manifold.en.md +47 -0
- package/knowledge-base/differential-geometry/manifold.md +47 -0
- package/knowledge-base/differential-geometry/metric-tensor.en.md +50 -0
- package/knowledge-base/differential-geometry/metric-tensor.md +50 -0
- package/knowledge-base/differential-geometry/tangent-space.en.md +48 -0
- package/knowledge-base/differential-geometry/tangent-space.md +48 -0
- package/knowledge-base/information-geometry/fisher-metric.en.md +56 -0
- package/knowledge-base/information-geometry/fisher-metric.md +56 -0
- package/knowledge-base/information-geometry/natural-gradient.en.md +54 -0
- package/knowledge-base/information-geometry/natural-gradient.md +54 -0
- package/knowledge-base/lie-theory/equivariance.en.md +54 -0
- package/knowledge-base/lie-theory/equivariance.md +54 -0
- package/knowledge-base/lie-theory/group-action.en.md +51 -0
- package/knowledge-base/lie-theory/group-action.md +51 -0
- package/knowledge-base/lie-theory/lie-algebra.en.md +51 -0
- package/knowledge-base/lie-theory/lie-algebra.md +51 -0
- package/knowledge-base/lie-theory/lie-group.en.md +51 -0
- package/knowledge-base/lie-theory/lie-group.md +51 -0
- package/knowledge-base/lie-theory/representation.en.md +52 -0
- package/knowledge-base/lie-theory/representation.md +52 -0
- package/knowledge-base/matrix-analysis/low-rank-approximation.en.md +49 -0
- package/knowledge-base/matrix-analysis/low-rank-approximation.md +49 -0
- package/knowledge-base/matrix-analysis/matrix-perturbation.en.md +49 -0
- package/knowledge-base/matrix-analysis/matrix-perturbation.md +49 -0
- package/knowledge-base/matrix-analysis/positive-semidefinite.en.md +50 -0
- package/knowledge-base/matrix-analysis/positive-semidefinite.md +50 -0
- package/knowledge-base/matrix-analysis/projection.en.md +47 -0
- package/knowledge-base/matrix-analysis/projection.md +47 -0
- package/knowledge-base/matrix-analysis/spectral-decomposition.en.md +48 -0
- package/knowledge-base/matrix-analysis/spectral-decomposition.md +48 -0
- package/knowledge-base/optimization/constrained-optimization.en.md +53 -0
- package/knowledge-base/optimization/constrained-optimization.md +53 -0
- package/knowledge-base/optimization/convex-optimization.en.md +50 -0
- package/knowledge-base/optimization/convex-optimization.md +50 -0
- package/knowledge-base/optimization/lagrangian-duality.en.md +50 -0
- package/knowledge-base/optimization/lagrangian-duality.md +50 -0
- package/knowledge-base/optimization/proximal-method.en.md +52 -0
- package/knowledge-base/optimization/proximal-method.md +52 -0
- package/knowledge-base/optimization/riemannian-optimization.en.md +51 -0
- package/knowledge-base/optimization/riemannian-optimization.md +51 -0
- package/knowledge-base/overview.en.md +39 -0
- package/knowledge-base/overview.md +29 -218
- package/knowledge-base/probability/concentration-inequality.en.md +45 -0
- package/knowledge-base/probability/concentration-inequality.md +45 -0
- package/knowledge-base/probability/entropy.en.md +47 -0
- package/knowledge-base/probability/entropy.md +47 -0
- package/knowledge-base/probability/fisher-information.en.md +48 -0
- package/knowledge-base/probability/fisher-information.md +48 -0
- package/knowledge-base/probability/information-bottleneck.en.md +49 -0
- package/knowledge-base/probability/information-bottleneck.md +49 -0
- package/knowledge-base/probability/kl-divergence.en.md +51 -0
- package/knowledge-base/probability/kl-divergence.md +51 -0
- package/knowledge-base/topology/euler-characteristic.en.md +54 -0
- package/knowledge-base/topology/euler-characteristic.md +54 -0
- package/knowledge-base/topology/fundamental-group.en.md +52 -0
- package/knowledge-base/topology/fundamental-group.md +52 -0
- package/knowledge-base/topology/persistent-homology.en.md +54 -0
- package/knowledge-base/topology/persistent-homology.md +54 -0
- package/lenses/algorithmic.en.md +49 -0
- package/lenses/algorithmic.md +49 -0
- package/lenses/axiomatization.en.md +48 -0
- package/lenses/axiomatization.md +48 -0
- package/lenses/categorical.en.md +48 -0
- package/lenses/categorical.md +48 -0
- package/lenses/causal.en.md +49 -0
- package/lenses/causal.md +49 -0
- package/lenses/duality.en.md +47 -0
- package/lenses/duality.md +47 -0
- package/lenses/game.en.md +50 -0
- package/lenses/game.md +50 -0
- package/lenses/geometric.en.md +53 -0
- package/lenses/geometric.md +53 -0
- package/lenses/local-to-global.en.md +52 -0
- package/lenses/local-to-global.md +52 -0
- package/lenses/perturbation.en.md +51 -0
- package/lenses/perturbation.md +51 -0
- package/lenses/probabilistic.en.md +48 -0
- package/lenses/probabilistic.md +48 -0
- package/lenses/projection.en.md +50 -0
- package/lenses/projection.md +50 -0
- package/lenses/spectral.en.md +52 -0
- package/lenses/spectral.md +52 -0
- package/lenses/symmetry.en.md +49 -0
- package/lenses/symmetry.md +49 -0
- package/lenses/topological.en.md +48 -0
- package/lenses/topological.md +48 -0
- package/lenses/variational.en.md +48 -0
- package/lenses/variational.md +48 -0
- package/package.json +11 -3
- package/references/agentic-workflow.en.md +53 -0
- package/references/agentic-workflow.md +2 -0
- package/references/books/abstract-algebra.md +9 -5
- package/references/books/algebraic-geometry-rising-sea.md +9 -5
- package/references/books/differential-geometry.md +7 -3
- package/references/books/matrix-analysis.md +8 -4
- package/references/books/micro-lie-theory.md +7 -3
- package/references/books/optimization-ml.md +5 -1
- package/references/books/smooth-manifolds.md +7 -3
- package/references/gpu-friendly-math.en.md +65 -0
- package/references/gpu-friendly-math.md +4 -2
- package/references/inspiration.en.md +113 -0
- package/references/inspiration.md +4 -2
- package/skills/math-research-activator/SKILL.en.md +187 -0
- package/skills/math-research-activator/SKILL.md +162 -108
- package/skills/math-research-activator/original-texts.en.md +105 -0
- package/skills/math-research-activator/original-texts.md +11 -11
- package/commands/abstraction.md +0 -13
- package/commands/algorithmic-thinking.md +0 -13
- package/commands/axiomatization.md +0 -13
- package/commands/causal-inference.md +0 -13
- package/commands/discrete-combinatorial.md +0 -13
- package/commands/game-theory.md +0 -13
- package/commands/induction-analogy.md +0 -13
- package/commands/information-theory.md +0 -13
- package/commands/logic-deduction.md +0 -13
- package/commands/modeling.md +0 -13
- package/commands/optimization.md +0 -13
- package/commands/probability-statistics.md +0 -13
- package/commands/symmetry-invariance.md +0 -13
- package/commands/topological-thinking.md +0 -13
- package/commands/transformation.md +0 -13
- package/skills/abstraction/SKILL.md +0 -119
- package/skills/abstraction/original-texts.md +0 -175
- package/skills/algorithmic-thinking/SKILL.md +0 -136
- package/skills/algorithmic-thinking/original-texts.md +0 -256
- package/skills/axiomatization/SKILL.md +0 -149
- package/skills/axiomatization/original-texts.md +0 -160
- package/skills/causal-inference/SKILL.md +0 -149
- package/skills/causal-inference/original-texts.md +0 -167
- package/skills/discrete-combinatorial/SKILL.md +0 -129
- package/skills/discrete-combinatorial/original-texts.md +0 -185
- package/skills/game-theory/SKILL.md +0 -121
- package/skills/game-theory/original-texts.md +0 -131
- package/skills/induction-analogy/SKILL.md +0 -150
- package/skills/induction-analogy/original-texts.md +0 -154
- package/skills/information-theory/SKILL.md +0 -138
- package/skills/information-theory/original-texts.md +0 -127
- package/skills/logic-deduction/SKILL.md +0 -133
- package/skills/logic-deduction/original-texts.md +0 -173
- package/skills/modeling/SKILL.md +0 -137
- package/skills/modeling/original-texts.md +0 -165
- package/skills/optimization/SKILL.md +0 -133
- package/skills/optimization/original-texts.md +0 -168
- package/skills/probability-statistics/SKILL.md +0 -149
- package/skills/probability-statistics/original-texts.md +0 -193
- package/skills/symmetry-invariance/SKILL.md +0 -137
- package/skills/symmetry-invariance/original-texts.md +0 -221
- package/skills/topological-thinking/SKILL.md +0 -126
- package/skills/topological-thinking/original-texts.md +0 -164
- package/skills/transformation/SKILL.md +0 -122
- package/skills/transformation/original-texts.md +0 -216
package/README.md
CHANGED
|
@@ -2,58 +2,105 @@
|
|
|
2
2
|
<a href="README.md">中文</a> | <a href="README.en-US.md">English</a>
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
# ⚔️ Math Skill —
|
|
5
|
+
# ⚔️ Math Skill — 面向 AI 架构创新的数学研究操作系统
|
|
6
6
|
|
|
7
|
-
>
|
|
7
|
+
> **思想系统不负责给定理,知识系统不负责乱启发,设计层不负责装深刻。**
|
|
8
8
|
|
|
9
9
|
[](LICENSE)
|
|
10
10
|
[](https://www.npmjs.com/package/math-skill)
|
|
11
|
+
[](https://www.npmjs.com/package/math-skill)
|
|
11
12
|
|
|
12
13
|
---
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
> **如果这个项目对你有所启发,请不吝点亮一颗 Star⭐。** 每一个 Star 都是对数学之美的共鸣,也是支撑这个项目继续前行的力量。欢迎每一位热爱数学、在数学海洋中遨游的同行者。
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
---
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
## 灵感来源
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
2. **GPU 可行(friendly to GPU)**——过 `references/gpu-friendly-math.md` 八维门。
|
|
21
|
+
Sophus Lie 打造"屠龙刀"的故事告诉我们:为解微分方程发明的李群-李代数,最终成为描述对称性、机器人状态估计的通用语言——数学工具的价值远超初衷,这正是「跨领域激活」的原型。详见 [`references/inspiration.md`](references/inspiration.md)。
|
|
22
22
|
|
|
23
|
-
>
|
|
23
|
+
> 数学最迷人的地方:为特定问题发明的工具,在完全不同的领域展现出远超初衷的价值。
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## 核心理念
|
|
28
|
+
|
|
29
|
+
当你面对一个 AI 研究问题时,这个系统帮你回答四个问题:
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
1. **该用什么数学思想看?** → 思想透镜
|
|
32
|
+
2. **需要查什么具体数学知识?** → 知识库
|
|
33
|
+
3. **怎么把数学变成模型设计?** → 设计翻译层
|
|
34
|
+
4. **这个设计是否数学上靠谱、工程上可行?** → 批判器
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
问题
|
|
38
|
+
↓
|
|
39
|
+
思想透镜:这个问题该用什么视角看?
|
|
40
|
+
↓
|
|
41
|
+
数学知识:这个视角需要哪些具体数学工具?
|
|
42
|
+
↓
|
|
43
|
+
设计翻译:这些工具怎么变成模型结构 / loss / 算子?
|
|
44
|
+
↓
|
|
45
|
+
批判器:数学上站得住、工程上跑得动吗?
|
|
46
|
+
```
|
|
34
47
|
|
|
35
48
|
---
|
|
36
49
|
|
|
37
|
-
##
|
|
38
|
-
|
|
39
|
-
|
|
|
40
|
-
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
|
53
|
-
|
|
54
|
-
|
|
|
55
|
-
|
|
|
56
|
-
|
|
|
50
|
+
## 三层正交架构
|
|
51
|
+
|
|
52
|
+
| 层 | 职责 | 目录 | 文件数 |
|
|
53
|
+
|----|------|------|--------|
|
|
54
|
+
| **思想透镜** | 诊断问题结构,推荐数学视角 | `lenses/*.md` | 15 |
|
|
55
|
+
| **数学知识** | 提供具体数学工具(定义/定理/公式) | `knowledge-base/*/*.md` | 31 |
|
|
56
|
+
| **设计翻译** | 把数学变成 AI 模块/loss/算子 | `design-patterns/*/*.md` | 22 |
|
|
57
|
+
|
|
58
|
+
辅助层:
|
|
59
|
+
- `references/books/*.md`:7 本书蒸馏稿,需要深入时的完整上下文
|
|
60
|
+
- `references/gpu-friendly-math.md`:GPU 八维验收门
|
|
61
|
+
- `agents/math-critic.md`:数学-工程双重批判器
|
|
62
|
+
|
|
63
|
+
### 15 个思想透镜
|
|
64
|
+
|
|
65
|
+
| 透镜 | 文件 | 核心视角 |
|
|
66
|
+
|------|------|---------|
|
|
67
|
+
| 公理化 | `lenses/axiomatization.md` | 审查假设的相容性/独立性/完备性 |
|
|
68
|
+
| 对偶 | `lenses/duality.md` | 转换到对偶空间暴露约束与不变量 |
|
|
69
|
+
| 对称性 | `lenses/symmetry.md` | 变换下的不变量与守恒律 |
|
|
70
|
+
| 谱分解 | `lenses/spectral.md` | 特征值/奇异值揭示主导结构 |
|
|
71
|
+
| 几何 | `lenses/geometric.md` | 度量/曲率/流形上的空间结构 |
|
|
72
|
+
| 投影与分解 | `lenses/projection.md` | 正交分解、子空间分离、冲突消除 |
|
|
73
|
+
| 变分 | `lenses/variational.md` | 约束下极值、能量最小化 |
|
|
74
|
+
| 局部到整体 | `lenses/local-to-global.md` | 局部性质拼接为全局、层上同调障碍 |
|
|
75
|
+
| 拓扑 | `lenses/topological.md` | 连续变形不变量、连通性、空洞 |
|
|
76
|
+
| 范畴化 | `lenses/categorical.md` | 泛性质、函子、自然变换 |
|
|
77
|
+
| 扰动 | `lenses/perturbation.md` | 小扰动的传播、稳定性、鲁棒性 |
|
|
78
|
+
| 因果 | `lenses/causal.md` | 相关≠因果、干预、反事实 |
|
|
79
|
+
| 博弈 | `lenses/game.md` | 多方策略互动、均衡、机制设计 |
|
|
80
|
+
| 概率统计 | `lenses/probabilistic.md` | 量化不确定性、贝叶斯更新 |
|
|
81
|
+
| 算法 | `lenses/algorithmic.md` | 复杂度、可行性、并行性 |
|
|
82
|
+
|
|
83
|
+
### 知识库(按数学领域)
|
|
84
|
+
|
|
85
|
+
| 领域 | 知识卡片 |
|
|
86
|
+
|------|---------|
|
|
87
|
+
| 矩阵分析 | projection, spectral-decomposition, low-rank-approximation, positive-semidefinite, matrix-perturbation |
|
|
88
|
+
| 最优化 | lagrangian-duality, convex-optimization, constrained-optimization, riemannian-optimization, proximal-method |
|
|
89
|
+
| 微分几何 | manifold, tangent-space, metric-tensor, geodesic, curvature, connection |
|
|
90
|
+
| 李理论 | group-action, lie-group, lie-algebra, representation, equivariance |
|
|
91
|
+
| 拓扑 | persistent-homology, euler-characteristic, fundamental-group |
|
|
92
|
+
| 概率与信息 | concentration-inequality, entropy, kl-divergence, information-bottleneck, fisher-information |
|
|
93
|
+
| 信息几何 | natural-gradient, fisher-metric |
|
|
94
|
+
|
|
95
|
+
### 设计模式库(按 AI 组件)
|
|
96
|
+
|
|
97
|
+
| 组件 | 设计模式 |
|
|
98
|
+
|------|---------|
|
|
99
|
+
| 注意力 | projection-attention, spectral-attention, equivariant-attention, geometry-aware-attention, information-bottleneck-attention |
|
|
100
|
+
| 损失函数 | orthogonality-loss, contrastive-loss, variational-loss, information-bottleneck-loss, constraint-penalty |
|
|
101
|
+
| 路由 | optimal-transport-routing, graph-routing, moe-routing, spectral-clustering-routing |
|
|
102
|
+
| 表示 | shared-private-decomposition, manifold-representation, equivariant-split, subspace-alignment |
|
|
103
|
+
| 压缩 | low-rank-kv-cache, spectral-token-pruning, topology-preserving-compression, leverage-score-selection |
|
|
57
104
|
|
|
58
105
|
---
|
|
59
106
|
|
|
@@ -61,199 +108,144 @@
|
|
|
61
108
|
|
|
62
109
|
### 安装
|
|
63
110
|
|
|
64
|
-
直接粘贴下面这段给 Claude Code 或其他终端型 AI 助手即可:
|
|
65
|
-
|
|
66
111
|
```
|
|
67
112
|
请帮我安装 math-skill:https://github.com/the-thinker0/math-skill,并教我如何使用
|
|
68
113
|
```
|
|
69
114
|
|
|
70
|
-
|
|
115
|
+
手动安装:
|
|
71
116
|
|
|
72
117
|
```bash
|
|
73
118
|
git clone https://github.com/the-thinker0/math-skill.git
|
|
74
119
|
```
|
|
75
120
|
|
|
76
|
-
Claude Code / Codex 类平台:按平台的 skills / commands 目录规则复制或软链 `skills/`、`commands/`,并把 `references/` 保持在同一仓库层级。不要只复制单个 `SKILL.md`,否则 `../../references/*` 无法解析。
|
|
77
|
-
|
|
78
|
-
Cursor / 其他 Markdown 规则平台:把 `commands/*.md` 作为手动入口,把 `skills/*/SKILL.md` 作为规则/技能正文,并保留 `references/`。如果平台没有自动 skill 触发机制,就用 `/ask` 或对应命令手动触发。
|
|
79
|
-
|
|
80
|
-
也可先检查 npm 包内容:
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
npm pack math-skill --dry-run
|
|
84
|
-
```
|
|
85
|
-
|
|
86
121
|
### 使用
|
|
87
122
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
### 正常聊天时会自动调用吗?
|
|
91
|
-
|
|
92
|
-
会,但取决于安装平台是否支持 **skill metadata 自动路由**。在 Claude Code / Codex 这类支持 skills 的环境里,安装后你不需要每次输入 `/ask`。但 v2.0.1 起触发条件已收紧:必须**环境信号和任务信号同时命中**才会自动加载,普通代码审查、debug、重构等工程任务不会触发。
|
|
93
|
-
|
|
94
|
-
例如你可以直接这样问:
|
|
95
|
-
|
|
96
|
-
```
|
|
97
|
-
我想设计一个更省 KV-Cache 的长上下文 attention,有没有现代数学视角?
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
或:
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
这个 Triton kernel 的访存和融合方式能不能从算法结构上优化?
|
|
104
|
-
```
|
|
123
|
+
**自动触发**:系统自动诊断用户意图,路由到合适的层:
|
|
105
124
|
|
|
106
|
-
|
|
125
|
+
| 场景 | 诊断信号 | 调用路径 |
|
|
126
|
+
|------|---------|---------|
|
|
127
|
+
| 问题分析 | "这个设计合理吗?" | 透镜 → critic |
|
|
128
|
+
| 机制设计 | "设计新 attention" | 透镜 → 知识 → 设计 → critic |
|
|
129
|
+
| 知识查询 | "切空间和梯度优化有什么关系?" | 知识 |
|
|
130
|
+
| 验证审查 | "这个公式成立吗?" | 知识 → critic |
|
|
131
|
+
| 纯工程 | debug、重构、调参 | **不调用** |
|
|
107
132
|
|
|
108
|
-
|
|
133
|
+
**手动触发**:
|
|
109
134
|
|
|
110
135
|
```
|
|
111
|
-
/ask <你的问题>
|
|
112
|
-
/axiomatization <你的问题> # 公理化思想
|
|
113
|
-
/abstraction <你的问题> # 抽象化思想
|
|
114
|
-
/logic-deduction <你的问题> # 逻辑演绎
|
|
115
|
-
/modeling <你的问题> # 建模思想
|
|
116
|
-
/optimization <你的问题> # 优化思想
|
|
117
|
-
/probability-statistics <你的问题> # 概率与统计
|
|
118
|
-
/transformation <你的问题> # 变换思想
|
|
119
|
-
/symmetry-invariance <你的问题> # 对称与不变性
|
|
120
|
-
/induction-analogy <你的问题> # 归纳与类比
|
|
121
|
-
/algorithmic-thinking <你的问题> # 算法与计算思想
|
|
122
|
-
/information-theory <你的问题> # 信息论思想
|
|
123
|
-
/game-theory <你的问题> # 博弈论思想
|
|
124
|
-
/causal-inference <你的问题> # 因果推断思想
|
|
125
|
-
/topological-thinking <你的问题> # 拓扑思想
|
|
126
|
-
/discrete-combinatorial <你的问题> # 离散与组合思想
|
|
136
|
+
/ask <你的问题> # 智能诊断:自动判断场景并路由
|
|
127
137
|
```
|
|
128
138
|
|
|
129
139
|
### 语言切换
|
|
130
140
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
/optimization Is K-FAC feasible on H100 with this batch size? in English
|
|
135
|
-
```
|
|
141
|
+
自动检测用户语言:中文消息返回中文输出,英文消息返回英文输出。
|
|
136
142
|
|
|
137
143
|
---
|
|
138
144
|
|
|
139
|
-
##
|
|
145
|
+
## 工作流范例
|
|
140
146
|
|
|
141
|
-
|
|
147
|
+
**用户**:"设计新的 KV Cache 压缩方法,保留长期依赖,不想只做 top-k"
|
|
142
148
|
|
|
143
|
-
工作区有 kernel 或注意力核心代码**且任务涉及设计/分析/迁移**时,激活器才会介入:给出问题诊断、可迁移的现代数学结构候选、武器路由、八维 GPU 筛选。纯工程任务(debug、代码审查、调参)不会触发。范例见 `skills/math-research-activator/SKILL.md` 的 **Tropical Sheaf Attention**:它是候选探索模板,不是预设成立的 benchmark 结论;必须经复杂度、显存、低精度稳定性和 kernel 可融合性验证后才能采用。
|
|
144
|
-
|
|
145
|
-
### 手动触发(研究场景)
|
|
146
|
-
|
|
147
|
-
**审查算法的理论假设**:
|
|
148
|
-
```
|
|
149
|
-
/axiomatization 这个注意力变体声称保持排列不变,但它的位置编码引入了隐含的全序假设,是否自洽?
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
**检查证明 / 不变量**:
|
|
153
|
-
```
|
|
154
|
-
/logic-deduction 这个收敛性证明从第 5 行到第 6 行的推导是否有跳跃?循环不变量成立吗?
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
**优化器 / 二阶法可行性**:
|
|
158
|
-
```
|
|
159
|
-
/optimization 想用 K-FAC 替换 Adam,但显存吃紧,这个二阶法在 GPU 上可行吗?有可改造的低秩近似吗?
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
**变换换表示**:
|
|
163
|
-
```
|
|
164
|
-
/transformation 这个自定义卷积算子能否等价改写成 GEMM 吃满 Tensor Core?逆变换数值稳定吗?
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
**等变 / 对称**:
|
|
168
149
|
```
|
|
169
|
-
|
|
150
|
+
第一步 诊断:场景 B(机制设计)
|
|
151
|
+
问题类型:序列记忆压缩 + 信息保留 + 长程结构
|
|
152
|
+
核心张力:压缩 token 数量 vs 不破坏长期依赖
|
|
153
|
+
|
|
154
|
+
第二步 透镜选择:
|
|
155
|
+
1. 谱分解(保留主导子空间)
|
|
156
|
+
2. 信息论(保留最大互信息状态)
|
|
157
|
+
3. 拓扑(保留序列结构关键连接点)
|
|
158
|
+
|
|
159
|
+
第三步 知识查询:
|
|
160
|
+
→ low-rank-approximation(矩阵分析)
|
|
161
|
+
→ leverage-score-selection(矩阵分析)
|
|
162
|
+
→ information-bottleneck(概率与信息)
|
|
163
|
+
|
|
164
|
+
第四步 设计翻译:
|
|
165
|
+
候选 A:Spectral KV Compression(低秩 + leverage score)
|
|
166
|
+
候选 B:Information-Preserving Cache(query sensitivity)
|
|
167
|
+
候选 C:Topology-Preserving Cache(图桥接节点保留)
|
|
168
|
+
|
|
169
|
+
第五步 Critic 审查:
|
|
170
|
+
A 最 GPU 友好,B 需估计未来 query 有不确定性,C 图构建成本过高
|
|
171
|
+
建议:优先 A,B 作轻量 gate
|
|
170
172
|
```
|
|
171
173
|
|
|
172
174
|
---
|
|
173
175
|
|
|
174
|
-
## 三层渐进式披露
|
|
175
|
-
|
|
176
|
-
| 层 | 内容 | 加载时机 |
|
|
177
|
-
|----|------|---------|
|
|
178
|
-
| 常驻触发层 | `skills/math-research-activator/SKILL.md` + 各武器简短 `description` | 自动 / 手动触发即载 |
|
|
179
|
-
| 方法论层 | `references/agentic-workflow.md`(Human-in-the-Agent-Loop)、`references/gpu-friendly-math.md`(八维门) | 激活器按需引用 |
|
|
180
|
-
| 书籍激活层 | `references/books/*.md` × 7(现代数学结构蒸馏稿) | 按问题类型按需加载 |
|
|
181
|
-
|
|
182
|
-
**深挖回查**:蒸馏稿自足可用;需原文全保真且本机有 `math_book/<PDF>` 时,让 Agent 自动 `pdftotext` + grep + Read 命中页(不依赖预埋锚点)。PDF 绝不打包进 npm / git(版权 + 110MB)。
|
|
183
|
-
|
|
184
|
-
---
|
|
185
|
-
|
|
186
176
|
## 目录结构
|
|
187
177
|
|
|
188
178
|
```
|
|
189
179
|
math-skill/
|
|
190
|
-
├──
|
|
191
|
-
|
|
192
|
-
├──
|
|
193
|
-
├──
|
|
194
|
-
│ ├──
|
|
195
|
-
│
|
|
196
|
-
├──
|
|
197
|
-
│ ├──
|
|
198
|
-
│ ├──
|
|
199
|
-
│ ├──
|
|
200
|
-
│ └──
|
|
201
|
-
├──
|
|
202
|
-
├──
|
|
203
|
-
├──
|
|
204
|
-
├──
|
|
180
|
+
├── skills/
|
|
181
|
+
│ └── math-research-activator/ # 总控:意图诊断 + 路由
|
|
182
|
+
├── lenses/ # 15 个思想透镜(推理方法论)
|
|
183
|
+
├── knowledge-base/ # 数学知识库(按领域组织)
|
|
184
|
+
│ ├── matrix-analysis/ # 矩阵分析(5 卡片)
|
|
185
|
+
│ ├── optimization/ # 最优化(5 卡片)
|
|
186
|
+
│ ├── differential-geometry/ # 微分几何(6 卡片)
|
|
187
|
+
│ ├── lie-theory/ # 李理论(5 卡片)
|
|
188
|
+
│ ├── topology/ # 拓扑(3 卡片)
|
|
189
|
+
│ ├── probability/ # 概率与信息(5 卡片)
|
|
190
|
+
│ └── information-geometry/ # 信息几何(2 卡片)
|
|
191
|
+
├── design-patterns/ # 设计翻译层(按 AI 组件组织)
|
|
192
|
+
│ ├── attention/ # 注意力机制(5 模式)
|
|
193
|
+
│ ├── loss/ # 损失函数(5 模式)
|
|
194
|
+
│ ├── routing/ # 路由(4 模式)
|
|
195
|
+
│ ├── representation/ # 表示(4 模式)
|
|
196
|
+
│ └── compression/ # 压缩(4 模式)
|
|
197
|
+
├── references/ # 参考层
|
|
198
|
+
│ ├── books/ # 7 本书蒸馏稿
|
|
199
|
+
│ ├── gpu-friendly-math.md # GPU 八维验收门
|
|
200
|
+
│ ├── agentic-workflow.md # 协作方式
|
|
201
|
+
│ └── inspiration.md # 灵感来源
|
|
202
|
+
├── agents/math-critic.md # 数学-工程双重批判器
|
|
203
|
+
├── commands/ask.md # /ask 手动入口
|
|
204
|
+
├── math_book/ # 本地 PDF(不发布)
|
|
205
205
|
└── README.md / LICENSE
|
|
206
206
|
```
|
|
207
207
|
|
|
208
208
|
---
|
|
209
209
|
|
|
210
|
-
##
|
|
211
|
-
|
|
212
|
-
每个 `skills/*/SKILL.md`(v2 单一研究 / 算法路径):
|
|
210
|
+
## 推荐书目
|
|
213
211
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
212
|
+
| # | 书名 | 作者 | 出版社 / 版次 | 年份 | ISBN | 蒸馏文件 |
|
|
213
|
+
|---|------|------|-------------|------|------|---------|
|
|
214
|
+
| 1 | *Contemporary Abstract Algebra* | Joseph A. Gallian | Brooks/Cole, Cengage, 8th ed. | 2013 | 978-1-133-59971-5 | `abstract-algebra.md` |
|
|
215
|
+
| 2 | *The Rising Sea: Foundations of Algebraic Geometry* | Ravi Vakil | Princeton University Press | 2025 | 978-0-691-26866-8 | `algebraic-geometry-rising-sea.md` |
|
|
216
|
+
| 3 | *Manifolds and Differential Geometry* | Jeffrey M. Lee | AMS, Graduate Studies in Math Vol. 107 | 2009 | 978-0-8218-4815-9 | `differential-geometry.md` |
|
|
217
|
+
| 4 | *Matrix Analysis* | Roger A. Horn, Charles R. Johnson | Cambridge University Press, 2nd ed. | 2013 | 978-0-521-83940-2 | `matrix-analysis.md` |
|
|
218
|
+
| 5 | *A micro Lie theory for state estimation in robotics* | Joan Solà et al. | arXiv:1812.01537v9 | 2021 | — | `micro-lie-theory.md` |
|
|
219
|
+
| 6 | *An Introduction to Optimization, With Applications to ML* | Chong, Lu, Żak | John Wiley & Sons, 5th ed. | 2024 | 978-1-119-87763-9 | `optimization-ml.md` |
|
|
220
|
+
| 7 | *Introduction to Smooth Manifolds* | John M. Lee | Springer, GTM 218, 2nd ed. | 2013 | 978-1-4419-9981-8 | `smooth-manifolds.md` |
|
|
221
221
|
|
|
222
|
-
|
|
222
|
+
蒸馏文件已随 npm 包发布。如需全保真原文,将 PDF 放入 `math_book/` 文件夹即可。
|
|
223
223
|
|
|
224
224
|
---
|
|
225
225
|
|
|
226
|
-
##
|
|
227
|
-
|
|
228
|
-
`knowledge-base/overview.md` 提供数学知识地图:三大支柱(代数 / 几何 / 分析)、主要分支、知识层次(地基→代数→综合→前沿)、思维武器与数学分支映射。
|
|
226
|
+
## 变更日志
|
|
229
227
|
|
|
230
|
-
|
|
228
|
+
### v3.0.0 — 数学研究操作系统
|
|
231
229
|
|
|
232
|
-
|
|
230
|
+
**架构重构**:从"思想武器库"升级为"数学参谋部"——三层正交架构:
|
|
233
231
|
|
|
234
|
-
|
|
232
|
+
- **思想透镜**(15 个):从 v2 的"思想武器"瘦身而来,只保留推理方法论,不再混入具体数学知识
|
|
233
|
+
- **知识库**(31 张卡片):按数学领域组织的具体工具卡片,含定义/公式/AI 设计翻译/GPU 可行性
|
|
234
|
+
- **设计翻译层**(新增):数学→AI 模块的桥梁,按 AI 组件(attention/loss/routing/representation/compression)组织
|
|
235
|
+
- **Activator 重写**:从环境信号匹配改为意图诊断(5 场景:分析/设计/查询/验证/工程)
|
|
236
|
+
- **知识激活协议**:知识卡片固定输出格式(最小定义→公式→适用问题→AI 翻译→工程可行性→风险)
|
|
235
237
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
## 变更日志
|
|
238
|
+
### v2.1.0 — 完整双语支持
|
|
239
|
+
- 全面双语(37 个 .en.md 文件)、自动语言路由、命令一致、token 保障
|
|
239
240
|
|
|
240
241
|
### v2.0.1
|
|
241
|
-
-
|
|
242
|
-
- **新增排除门(Gate 0)**:代码审查、debug、参数传递链核查、重构、调参、loss 实现修改等纯工程任务明确列入排除列表,优先级最高。
|
|
243
|
-
- **环境信号收窄**:仅有 `model.py`、`trainer.py`、`config.json` 等常规 ML 工程文件不再构成环境信号;需要架构核心代码(attention/transformer/MoE、CUDA/Triton kernel)或研究笔记。
|
|
244
|
-
- **description 字段更新**:显式标注"不触发于"场景列表,减少 AI 平台的 skill metadata 误匹配。
|
|
242
|
+
- 收紧自动触发条件、新增排除门、环境信号收窄
|
|
245
243
|
|
|
246
244
|
### v2.0.0
|
|
247
|
-
-
|
|
245
|
+
- 16 思想武器、现代数学激活层、GPU 八维横切
|
|
248
246
|
|
|
249
247
|
### v1.0.0
|
|
250
|
-
-
|
|
251
|
-
- 十五个 `skills/*/SKILL.md`(含核心原则、不适用场景、方法流程、常见错误、操作规程)+ 对应 `original-texts.md`(数学出处与经典文献)。
|
|
252
|
-
- 十五个手动触发的 slash 命令入口(`commands/*.md`)。
|
|
253
|
-
- `knowledge-base/overview.md`(三大支柱 / 主要分支 / 知识层次 / 武器映射)。
|
|
254
|
-
- `agents/math-critic.md` 审视 Agent。
|
|
255
|
-
- 校验脚本 `tests/{validate.sh, validate.ps1}`。
|
|
256
|
-
- 发布至 npm(`math-skill`),MIT 协议。
|
|
248
|
+
- 初始发布:十五思想武器 + 科研与生活双路径
|
|
257
249
|
|
|
258
250
|
---
|
|
259
251
|
|
|
@@ -265,7 +257,7 @@ MIT License. 详见 `LICENSE`。
|
|
|
265
257
|
|
|
266
258
|
## 贡献
|
|
267
259
|
|
|
268
|
-
欢迎提交 Issue 和 Pull Request
|
|
260
|
+
欢迎提交 Issue 和 Pull Request!
|
|
269
261
|
|
|
270
262
|
---
|
|
271
263
|
|