math-skill 3.2.0 → 3.3.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.
Files changed (63) hide show
  1. package/README.en-US.md +45 -14
  2. package/README.md +45 -14
  3. package/SKILL.en.md +122 -0
  4. package/SKILL.md +122 -0
  5. package/agents/math-critic.en.md +32 -18
  6. package/agents/math-critic.md +33 -18
  7. package/commands/ask.en.md +2 -2
  8. package/commands/ask.md +2 -2
  9. package/design-patterns/compression/low-rank-kv-cache.en.md +1 -0
  10. package/design-patterns/loss/orthogonality-loss.en.md +7 -7
  11. package/design-patterns/loss/orthogonality-loss.md +7 -7
  12. package/knowledge-base/algebraic-geometry/grassmannian-plucker.en.md +71 -0
  13. package/knowledge-base/algebraic-geometry/grassmannian-plucker.md +71 -0
  14. package/knowledge-base/algebraic-geometry/index.en.md +47 -0
  15. package/knowledge-base/algebraic-geometry/index.md +47 -0
  16. package/knowledge-base/algebraic-geometry/sheaf-cohomology.en.md +72 -0
  17. package/knowledge-base/algebraic-geometry/sheaf-cohomology.md +72 -0
  18. package/knowledge-base/cryptography/attack-game-framework.en.md +56 -0
  19. package/knowledge-base/cryptography/attack-game-framework.md +56 -0
  20. package/knowledge-base/cryptography/cca-cpa-ae-hierarchy.en.md +57 -0
  21. package/knowledge-base/cryptography/cca-cpa-ae-hierarchy.md +57 -0
  22. package/knowledge-base/cryptography/index.en.md +54 -0
  23. package/knowledge-base/cryptography/index.md +54 -0
  24. package/knowledge-base/cryptography/prf-prg-owf.en.md +62 -0
  25. package/knowledge-base/cryptography/prf-prg-owf.md +62 -0
  26. package/knowledge-base/cryptography/reduction-proof-template.en.md +60 -0
  27. package/knowledge-base/cryptography/reduction-proof-template.md +60 -0
  28. package/knowledge-base/matrix-analysis/low-rank-approximation.en.md +2 -2
  29. package/knowledge-base/matrix-analysis/low-rank-approximation.md +2 -2
  30. package/knowledge-base/matrix-analysis/projection.en.md +11 -12
  31. package/knowledge-base/matrix-analysis/projection.md +11 -12
  32. package/knowledge-base/overview.en.md +8 -4
  33. package/knowledge-base/overview.md +8 -4
  34. package/knowledge-base/probability/kl-divergence.en.md +6 -6
  35. package/knowledge-base/probability/kl-divergence.md +6 -6
  36. package/package.json +4 -2
  37. package/references/agentic-workflow.en.md +2 -2
  38. package/references/agentic-workflow.md +2 -2
  39. package/references/books/abstract-algebra.en.md +18 -29
  40. package/references/books/abstract-algebra.md +18 -29
  41. package/references/books/algebraic-geometry-rising-sea.en.md +1 -1
  42. package/references/books/algebraic-geometry-rising-sea.md +2 -2
  43. package/references/books/applied-cryptography.en.md +112 -0
  44. package/references/books/applied-cryptography.md +18 -19
  45. package/references/books/differential-geometry.md +1 -1
  46. package/references/books/foundations-of-cryptography.en.md +112 -0
  47. package/references/books/foundations-of-cryptography.md +20 -20
  48. package/references/books/introduction-to-modern-cryptography.en.md +130 -0
  49. package/references/books/introduction-to-modern-cryptography.md +21 -21
  50. package/references/books/micro-lie-theory.en.md +1 -1
  51. package/references/books/micro-lie-theory.md +1 -1
  52. package/references/books/smooth-manifolds.en.md +1 -1
  53. package/references/books/smooth-manifolds.md +1 -1
  54. package/references/gpu-friendly-math.en.md +8 -8
  55. package/references/gpu-friendly-math.md +8 -8
  56. package/references/inspiration.en.md +8 -84
  57. package/references/inspiration.md +8 -84
  58. package/references/musings.en.md +87 -0
  59. package/references/musings.md +87 -0
  60. package/references/skill-index.en.md +32 -22
  61. package/references/skill-index.md +29 -19
  62. package/skills/math-research-activator/SKILL.en.md +4 -193
  63. package/skills/math-research-activator/SKILL.md +4 -214
package/README.en-US.md CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
  > **This skill is under rapid iteration — your feedback and suggestions are warmly welcome!** Your input is the core driver of our continuous evolution. Feel free to reach out via GitHub Issues or Discussions.
20
20
 
21
- > **v3.2.0 is live**: The cryptography track is officially integrated 3 distilled classics of modern cryptography (Boneh-Shoup / Goldreich / Katz-Lindell) plus a Domain Router layer. AI and cryptography share mathematical foundations but each has exclusive specialty layers, with no cross-domain pollution. See the changelog for details.
21
+ > **v3.3.0**: canonical entry structure, minimum-context routing, AI/cryptography isolation, mathematical and cryptographic corrections, relevance-driven GPU review, and complete bilingual pairing. Root `SKILL.md` is authoritative, and all three cryptography distillations now have dedicated English versions. See the changelog.
22
22
 
23
23
  ---
24
24
 
@@ -53,6 +53,8 @@ Design Translation: How do these tools become model structures / losses / operat
53
53
  Critic: Mathematically sound? Engineering-feasible?
54
54
  ```
55
55
 
56
+ > **v3.2.1 Design Philosophy Refinement**: This skill is a mathematical-thinking activator and anchor, not a knowledge encyclopedia. `knowledge-base/` anchors describe mathematical structures (manifolds, spectra, sheaf cohomology, pseudorandom function families, etc.), not specific AI architectures (diffusion, SSM, etc.); `design-patterns/` is a paradigmatic demonstration of "math→AI module" translation, not a copy-paste template library. This ensures the skill retains guiding capacity for any research direction (diffusion, SSM, MoE, alignment, etc.) and does not become outdated as concrete architectures evolve.
57
+
56
58
  ---
57
59
 
58
60
  ## Three-Layer Orthogonal Architecture
@@ -60,13 +62,13 @@ Critic: Mathematically sound? Engineering-feasible?
60
62
  | Layer | Role | Directory | Files |
61
63
  |-------|------|-----------|-------|
62
64
  | **Thinking Lenses** | Diagnose problem structure, recommend math perspectives | `lenses/*.md` | 15 |
63
- | **Activation Anchors** | Activate high-frequency math structures; trigger Knowledge Gap Protocol when insufficient | `knowledge-base/*/*.md` | 31 |
65
+ | **Activation Anchors** | 33 shared-math anchors + 4 cryptography anchors; trigger Knowledge Gap Protocol when insufficient | `knowledge-base/*/*.md` | 37 |
64
66
  | **Design Translation** | Bridge math to AI modules/losses/operators | `design-patterns/*/*.md` | 22 |
65
67
 
66
68
  Supporting layers:
67
69
  - `references/books/*.md`: 10 book distillations (7 AI-direction + 3 cryptography-direction) for deep context
68
- - `references/gpu-friendly-math.en.md`: GPU 8-dimension acceptance gate
69
- - `agents/math-critic.en.md`: Math-engineering dual critic (19 dimensions, including cryptographic security review)
70
+ - `references/gpu-friendly-math.en.md`: on-demand GPU checks with N/A for irrelevant dimensions
71
+ - `agents/math-critic.en.md`: 19-dimension deep critic loaded only for comprehensive or paper-grade review
70
72
 
71
73
  ### Domain Router (new in v3.2.0)
72
74
 
@@ -74,9 +76,9 @@ AI research and cryptography **share** mathematical foundations (probability/inf
74
76
 
75
77
  | Domain | Loaded Content | Signal Keywords |
76
78
  |--------|----------------|------------------|
77
- | **AI Research** | `knowledge-base/` (7 domains, 31 anchors) + `design-patterns/` (5 types, 22 patterns) + 7 AI books | attention/loss/routing/representation/compression/MoE/transformer/KV-cache/LoRA/SSM/diffusion/RL |
78
- | **Cryptography** | 3 crypto books + shared math anchors (on demand) | encryption/signature/MAC/PRF/PRG/PRP/OWF/CCA/CPA/AE/ZK/reduction/DL/CDH/DDH/RSA/ECC/lattice |
79
- | **Pure Math** | `lenses/` + corresponding `knowledge-base/` anchors | probability/information/entropy/group/ring/field/matrix/spectrum/optimization/convexity/perturbation/complexity |
79
+ | **Shared Mathematics** | 33 anchors across 8 domains plus relevant lenses | probability/information/algebra/geometry/matrix/spectral/optimization/topology/complexity |
80
+ | **AI Research** | Shared math on demand + 0–2 relevant design prototypes; books only for deep checks | attention/loss/routing/representation/compression/MoE/transformer/KV-cache/LoRA/SSM/diffusion/RL |
81
+ | **Cryptography** | 4 crypto anchors; then 3 crypto books only if needed; shared math on demand | encryption/signature/MAC/PRF/PRG/PRP/OWF/CCA/CPA/AE/ZK/reduction/DL/CDH/DDH/RSA/ECC/lattice |
80
82
  | **AI×Crypto** | dual-domain load + intersection annotation | "PRF for watermarking," "adversarial example reduction," "verifiable inference" |
81
83
 
82
84
  > Rules: domain judgment precedes lens invocation; shared math is not redundantly loaded; no pollution across non-cross domains; gap-protocol temporary cards are domain-tagged.
@@ -112,6 +114,8 @@ AI research and cryptography **share** mathematical foundations (probability/inf
112
114
  | Topology | persistent-homology, euler-characteristic, fundamental-group |
113
115
  | Probability & Information | concentration-inequality, entropy, kl-divergence, information-bottleneck, fisher-information |
114
116
  | Information Geometry | natural-gradient, fisher-metric |
117
+ | Algebraic Geometry | sheaf-cohomology, grassmannian-plucker |
118
+ | Cryptography (exclusive) | prf-prg-owf, reduction-proof-template, attack-game-framework, cca-cpa-ae-hierarchy |
115
119
 
116
120
  ### Design Patterns (by AI component)
117
121
 
@@ -133,12 +137,14 @@ AI research and cryptography **share** mathematical foundations (probability/inf
133
137
  Please help me install math-skill: https://github.com/the-thinker0/math-skill, and show me how to use it
134
138
  ```
135
139
 
136
- Manual install:
140
+ Manual Codex install (install the whole repository as one self-contained skill; do not copy only the nested entry):
137
141
 
138
142
  ```bash
139
- git clone https://github.com/the-thinker0/math-skill.git
143
+ git clone https://github.com/the-thinker0/math-skill.git ~/.codex/skills/math-research-activator
140
144
  ```
141
145
 
146
+ Root `SKILL.md` is the canonical Codex entry. `skills/math-research-activator/SKILL.md` is only a Claude/plugin-style compatibility entry that forwards to the root. Copying the nested directory alone omits its anchors and design patterns.
147
+
142
148
  ### Usage
143
149
 
144
150
  **Auto-trigger**: The system auto-diagnoses user intent and routes to the appropriate layer:
@@ -218,7 +224,7 @@ math-skill/
218
224
  │ └── compression/ # Compression (4 patterns)
219
225
  ├── references/ # Reference layer
220
226
  │ ├── books/ # 10 book distillations (7 AI + 3 crypto)
221
- │ ├── gpu-friendly-math.en.md # GPU 8-dimension gate
227
+ │ ├── gpu-friendly-math.en.md # GPU checklist (applicable dimensions only)
222
228
  │ ├── agentic-workflow.en.md # Collaboration style
223
229
  │ └── inspiration.en.md # Inspiration
224
230
  ├── agents/math-critic.en.md # Math-engineering dual critic (19 dims, with crypto security review)
@@ -247,11 +253,11 @@ math-skill/
247
253
 
248
254
  | # | Title | Author(s) | Publisher / Edition | Year | ISBN | Distillation |
249
255
  |---|-------|-----------|-------------------|------|------|-------------|
250
- | 8 | *A Graduate Course in Applied Cryptography* | Dan Boneh & Victor Shoup | v0.4 online | 2017 | — | `applied-cryptography.md` |
251
- | 9 | *Foundations of Cryptography, Volume 1: Basic Tools* | Oded Goldreich | Cambridge University Press | 2001 | 978-0-521-79235-9 | `foundations-of-cryptography.md` |
252
- | 10 | *Introduction to Modern Cryptography* | Jonathan Katz & Yehuda Lindell | CRC Press, 2nd ed. | 2015 | 978-1-4665-7026-1 | `introduction-to-modern-cryptography.md` |
256
+ | 8 | *A Graduate Course in Applied Cryptography* | Dan Boneh & Victor Shoup | v0.4 online | 2017 | — | `applied-cryptography.en.md` |
257
+ | 9 | *Foundations of Cryptography, Volume 1: Basic Tools* | Oded Goldreich | Cambridge University Press | 2001 | 978-0-521-79235-9 | `foundations-of-cryptography.en.md` |
258
+ | 10 | *Introduction to Modern Cryptography* | Jonathan Katz & Yehuda Lindell | CRC Press, 2nd ed. | 2015 | 978-1-4665-7026-1 | `introduction-to-modern-cryptography.en.md` |
253
259
 
254
- > Crypto book contents are already in English, so they use the `.md` suffix (no CN/EN split). They are loaded when Domain Router determines the problem is cryptography or AI×crypto intersection.
260
+ > All three cryptography distillations now have Chinese and English pairs. Select `.md` or `.en.md` by the user's primary language, and load them only when anchors are insufficient or book-level depth is needed.
255
261
 
256
262
  Distillation files ship with the npm package. For full-fidelity lookups, place PDFs in the `math_book/` folder.
257
263
 
@@ -259,6 +265,31 @@ Distillation files ship with the npm package. For full-fidelity lookups, place P
259
265
 
260
266
  ## Changelog
261
267
 
268
+ ### v3.3.0 — Routing Convergence, Bilingual Completion & Technical Corrections
269
+
270
+ - **Canonical entry and compatibility structure**: root `SKILL.md` / `SKILL.en.md` are now complete, self-contained normative entries. `skills/math-research-activator/SKILL*.md` are thin forwarders that preserve Claude/plugin layouts without allowing two full instruction copies to drift. `commands/ask*`, the critic, indexes, and overview now reference the root entries.
271
+ - **Progressive loading and minimum token use**: Scenarios A analysis, B design, C knowledge, D verification, and E engineering receive explicit minimal paths, normally capped at 1–2 lenses, 1–3 anchors, and 0–2 prototypes. Concept questions, pure-crypto tasks, and ordinary verification no longer load the full critic, books, GPU checklist, or directory index by default, and internal loading traces are not repeated to users.
272
+ - **Domain Router rewrite**: routing now uses target object + requested guarantee instead of keyword voting. Isolated terms such as `hashing`, `attack`, and `security` no longer cause crypto false positives. Shared math, pure AI, pure crypto, and AI×crypto paths are isolated; the cross-domain four-tuple appears only for genuine transfers between a cryptographic primitive/security property and an AI object.
273
+ - **Cryptography decontamination**: the four crypto anchors are organized around security definitions, attack games, reduction loss, construction boundaries, and implementation considerations rather than forced AI translations or GPU gates. They distinguish standard-model theorems, primitive-based reductions, and empirical assumptions about concrete algorithms such as AES, and correct wording around PRF/PRG/OWF, Feistel, CPA/CCA/AE, KEM/DEM, nonces/IVs, key separation, and composition order.
274
+ - **Mathematical and engineering corrections**: corrected the Moore–Penrose conditions for general projections, the boundary between attention/QKV and linear projection, KL directionality, low-rank-gradient claims, orthogonality-loss shape/normalization assumptions, and overextended analogies in algebra and geometry notes. Claims of guarantees, equivalence, stability, or optimality now state their conditions or are downgraded to testable hypotheses.
275
+ - **Complete bilingual cryptography references**: added `applied-cryptography.en.md`, `foundations-of-cryptography.en.md`, and `introduction-to-modern-cryptography.en.md`. Commands, agents, lenses, knowledge-base, design-patterns, and references now all maintain Chinese/English pairs; only the user's primary-language side is loaded.
276
+ - **Relevance-driven GPU review**: candidates no longer mechanically fill all eight dimensions. Reviews first state shape, baseline, and deployment constraints, assess only decision-relevant dimensions, and mark others `N/A`. Judgments require checkable FLOPs, peak intermediate/state memory, byte or communication counts, or low-precision risks; “expressible as GEMM” is explicitly not equivalent to “faster.”
277
+ - **Critic and output-quality convergence**: ordinary tasks use the compact checks in the root entry, while the 19-dimension critic is reserved for paper-grade or explicitly comprehensive review. The modern-math dimension is mandatory only when a transfer claim exists; crypto prefers `knowledge-base/cryptography/` anchors before books and never uses the GPU checklist as a security gate; exploratory candidates must state assumptions, boundaries, and falsification methods.
278
+ - **Pre-release consistency fixes**: compatibility-entry descriptions re-synced with root `SKILL.md` (including math-query triggers); index workflow examples restored to the default ≤2-lens budget; CLAUDE/eval Gate terminology removed and the bilingual books fact corrected; sheaf-cohomology $H^1$ wording tightened so it is not confused with the sheaf axiom.
279
+ - **Synchronized indexes, routing examples, and language rules**: updated `skill-index`, `knowledge-base/overview`, the agentic workflow, and A/B/C/D/E eval scenarios with false-positive, intersection, knowledge-gap, and primary-language boundaries. Code, paths, formulas, and English technical terms do not vote on response language.
280
+ - **Evaluation-scope cleanup**: removed the six-dimension output score and token/cost regression specification created only for this audit, while retaining routing, isolation, bilingual, reference-integrity, and semantic-regression scenarios that directly test skill behavior.
281
+ - **Validation and package integrity**: Bash/PowerShell validation covers root frontmatter, compatibility forwarders, 37 anchors, bilingual pairing, cross-references, Domain Router isolation, the Knowledge Gap Protocol, GPU quantitative signals, and high-risk semantic regressions. The npm package explicitly includes root `SKILL*.md` and excludes PDFs, `math_book/`, tests, and the local npm cache.
282
+
283
+ ### v3.2.1 — Design Philosophy Refinement & Reliability Enhancement
284
+
285
+ - **Design philosophy made explicit**: `SKILL.md` / `SKILL.en.md` add a "Design Philosophy: Activator, Not Encyclopedia" section, declaring the skill is a thinking activator and mathematical anchor; `knowledge-base/` returns to mathematical structures themselves (not concrete AI architectures); `design-patterns/` is positioned as translation-prototype demonstration rather than a template library. A new "Compatibility Principle" section declares that research problems with architectures the skill did not pre-specify are handled through the lens-routing + anchor-activation + temporary-knowledge-card pipeline.
286
+ - **Cryptography anchors backfilled**: new `knowledge-base/cryptography/` directory, with `prf-prg-owf`, `reduction-proof-template`, `attack-game-framework`, `cca-cpa-ae-hierarchy` anchor cards (CN/EN paired), giving Domain Router's cryptography layer substantive anchors (fixes v3.2.0 inconsistency: it declared loading a cryptography layer but had no structured anchors).
287
+ - **Algebraic geometry anchors backfilled**: new `knowledge-base/algebraic-geometry/` directory, with `sheaf-cohomology`, `grassmannian-plucker` anchor cards (CN/EN paired), covering mathematical structures already used by `design-patterns/` but lacking anchors (sheaf cohomology, Grassmannian).
288
+ - **Test coverage expanded**: new eval tests for Scenario A (analysis), Scenario D (verification), cross-domain routing (AI×crypto 4-tuple annotation), Knowledge Gap Protocol, and Domain Router isolation (no-pollution guarantee).
289
+ - **validate.sh structural checks**: added checks for the six required knowledge-card sections, eight GPU dimensions in design patterns, Domain Router isolation, and Knowledge Gap Protocol fields.
290
+ - **critic 19-dimension layering**: core / situational / mandatory / meta dimension layering annotations to reduce Agent cognitive load.
291
+ - **inspiration.md split**: technical-inspiration part (the dragon-slaying blade story) retained; philosophical content (life-as-optimization, etc.) moved to `musings.md` to avoid clashing with the skill's rigorous technical style.
292
+
262
293
  ### v3.2.0 — Cryptography Track + Domain Router
263
294
 
264
295
  **Cryptography track officially landed**: reference layer expanded from 7 to 10 books, with 3 modern cryptography classics distilled into the same activation-index format as AI-direction books (~125-155 lines each, preserving core ideas and key bridging facts).
package/README.md CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
  > **本 Skill 正在快速迭代中,欢迎各位使用者提出宝贵的使用感受和改进建议!** 你的反馈是我们持续进化的核心动力。欢迎通过 GitHub Issues 或 Discussions 与我们交流。
20
20
 
21
- > **v3.2.0 已上线**:密码学方向正式接入——3 本现代密码学经典(Boneh-Shoup / Goldreich / Katz-Lindell)精简蒸馏稿 + Domain Router 路由层,AI 与密码学共享数学根基、独有专业层,互不污染。详见变更日志。
21
+ > **v3.3.0**:完成入口结构、最小上下文路由、AI/密码学领域隔离、数学与密码学准确性、GPU 审查和全量中英配对升级。根 `SKILL.md` 是权威入口,三份密码学书稿已提供独立英文版。详见变更日志。
22
22
 
23
23
  ---
24
24
 
@@ -53,6 +53,8 @@ Sophus Lie 打造"屠龙刀"的故事告诉我们:为解微分方程发明的
53
53
  批判器:数学上站得住、工程上跑得动吗?
54
54
  ```
55
55
 
56
+ > **v3.2.1 设计哲学修正**:本 skill 是数学思考的 activator 与锚点,不是知识百科。`knowledge-base/` 的锚点描述数学结构(流形、谱、层上同调、伪随机函数族等),而非具体 AI 架构(diffusion、SSM 等);`design-patterns/` 是"数学→AI 模块"的翻译范式示范,不是可复制的模板库。这保证了 skill 对任意研究方向(扩散、SSM、MoE、对齐等)都有引导能力,而不会随具体架构过时。
57
+
56
58
  ---
57
59
 
58
60
  ## 三层正交架构
@@ -60,13 +62,13 @@ Sophus Lie 打造"屠龙刀"的故事告诉我们:为解微分方程发明的
60
62
  | 层 | 职责 | 目录 | 文件数 |
61
63
  |----|------|------|--------|
62
64
  | **思想透镜** | 诊断问题结构,推荐数学视角 | `lenses/*.md` | 15 |
63
- | **激活锚点** | 激活高频数学结构,不足时触发知识缺口协议 | `knowledge-base/*/*.md` | 31 |
65
+ | **激活锚点** | 33 个共用数学锚点 + 4 个密码学锚点;不足时触发知识缺口协议 | `knowledge-base/*/*.md` | 37 |
64
66
  | **设计翻译** | 把数学变成 AI 模块/loss/算子 | `design-patterns/*/*.md` | 22 |
65
67
 
66
68
  辅助层:
67
69
  - `references/books/*.md`:10 本书蒸馏稿(7 本 AI 方向 + 3 本密码学方向),需要深入时的完整上下文
68
- - `references/gpu-friendly-math.md`:GPU 八维验收门
69
- - `agents/math-critic.md`:数学-工程双重批判器(19 维,含密码学安全审视)
70
+ - `references/gpu-friendly-math.md`:按需 GPU 检查;不适用维度标 N/A
71
+ - `agents/math-critic.md`:仅全面/论文级审查按需加载的 19 维深度批判器
70
72
 
71
73
  ### Domain Router(v3.2.0 新增)
72
74
 
@@ -74,9 +76,9 @@ AI 研究与密码学**共享**数学根基(概率/信息/代数/矩阵/谱/
74
76
 
75
77
  | Domain | 加载内容 | 信号词 |
76
78
  |--------|---------|--------|
77
- | **AI 研究** | `knowledge-base/`(7 领域 31 锚点)+ `design-patterns/`(5 22 模式)+ AI 方向 7 本书 | attention/loss/routing/representation/compression/MoE/transformer/KV-cache/LoRA/SSM/扩散/RL |
78
- | **密码学** | 3 本密码学书稿 + 共用数学锚点(按需) | 加密/签名/MAC/PRF/PRG/PRP/OWF/CCA/CPA/AE/零知识/归约/DL/CDH/DDH/RSA/ECC/格密码 |
79
- | **纯数学** | `lenses/` + `knowledge-base/` 对应锚点 | 概率/信息/熵/群/环/域/矩阵/谱/优化/凸性/扰动/复杂度 |
79
+ | **共用数学** | 8 33 锚点 + 相关透镜 | 概率/信息/代数/几何/矩阵/谱/优化/拓扑/复杂度 |
80
+ | **AI 研究** | 共用数学按需 + 0–2 个相关设计原型;书稿只在深查时加载 | attention/loss/routing/representation/compression/MoE/transformer/KV-cache/LoRA/SSM/扩散/RL |
81
+ | **密码学** | 4 张密码锚点;不足时才查 3 本密码书稿;共用数学按需 | 加密/签名/MAC/PRF/PRG/PRP/OWF/CCA/CPA/AE/零知识/归约/DL/CDH/DDH/RSA/ECC/格密码 |
80
82
  | **AI×密码交叉** | 双 domain 加载 + 交叉点标注 | "PRF 做模型水印""对抗样本归约""可验证推理" |
81
83
 
82
84
  > 规则:domain 判定先于透镜调用;共用数学不重复加载;不跨域时不污染;缺口协议临时卡标注 domain。
@@ -112,6 +114,8 @@ AI 研究与密码学**共享**数学根基(概率/信息/代数/矩阵/谱/
112
114
  | 拓扑 | persistent-homology, euler-characteristic, fundamental-group |
113
115
  | 概率与信息 | concentration-inequality, entropy, kl-divergence, information-bottleneck, fisher-information |
114
116
  | 信息几何 | natural-gradient, fisher-metric |
117
+ | 代数几何 | sheaf-cohomology, grassmannian-plucker |
118
+ | 密码学(独有) | prf-prg-owf, reduction-proof-template, attack-game-framework, cca-cpa-ae-hierarchy |
115
119
 
116
120
  ### 设计模式库(按 AI 组件)
117
121
 
@@ -133,12 +137,14 @@ AI 研究与密码学**共享**数学根基(概率/信息/代数/矩阵/谱/
133
137
  请帮我安装 math-skill:https://github.com/the-thinker0/math-skill,并教我如何使用
134
138
  ```
135
139
 
136
- 手动安装:
140
+ Codex 手动安装(把整个仓库作为一个自足 skill,而不是只复制内层目录):
137
141
 
138
142
  ```bash
139
- git clone https://github.com/the-thinker0/math-skill.git
143
+ git clone https://github.com/the-thinker0/math-skill.git ~/.codex/skills/math-research-activator
140
144
  ```
141
145
 
146
+ 根 `SKILL.md` 是 Codex 权威入口;`skills/math-research-activator/SKILL.md` 只是 Claude/plugin 风格兼容入口并转发到根文件。不要单独复制内层目录,否则它引用的知识库与设计模式不完整。
147
+
142
148
  ### 使用
143
149
 
144
150
  **自动触发**:系统自动诊断用户意图,路由到合适的层:
@@ -218,7 +224,7 @@ math-skill/
218
224
  │ └── compression/ # 压缩(4 模式)
219
225
  ├── references/ # 参考层
220
226
  │ ├── books/ # 10 本书蒸馏稿(7 AI + 3 密码学)
221
- │ ├── gpu-friendly-math.md # GPU 八维验收门
227
+ │ ├── gpu-friendly-math.md # GPU 维度清单(仅评相关项)
222
228
  │ ├── agentic-workflow.md # 协作方式
223
229
  │ └── inspiration.md # 灵感来源
224
230
  ├── agents/math-critic.md # 数学-工程双重批判器(19 维,含密码学安全审视)
@@ -247,11 +253,11 @@ math-skill/
247
253
 
248
254
  | # | 书名 | 作者 | 出版社 / 版次 | 年份 | ISBN | 蒸馏文件 |
249
255
  |---|------|------|-------------|------|------|---------|
250
- | 8 | *A Graduate Course in Applied Cryptography* | Dan Boneh & Victor Shoup | v0.4 在线版 | 2017 | — | `applied-cryptography.md` |
251
- | 9 | *Foundations of Cryptography, Volume 1: Basic Tools* | Oded Goldreich | Cambridge University Press | 2001 | 978-0-521-79235-9 | `foundations-of-cryptography.md` |
252
- | 10 | *Introduction to Modern Cryptography* | Jonathan Katz & Yehuda Lindell | CRC Press, 2nd ed. | 2015 | 978-1-4665-7026-1 | `introduction-to-modern-cryptography.md` |
256
+ | 8 | *A Graduate Course in Applied Cryptography* | Dan Boneh & Victor Shoup | v0.4 在线版 | 2017 | — | `applied-cryptography.md` / `.en.md` |
257
+ | 9 | *Foundations of Cryptography, Volume 1: Basic Tools* | Oded Goldreich | Cambridge University Press | 2001 | 978-0-521-79235-9 | `foundations-of-cryptography.md` / `.en.md` |
258
+ | 10 | *Introduction to Modern Cryptography* | Jonathan Katz & Yehuda Lindell | CRC Press, 2nd ed. | 2015 | 978-1-4665-7026-1 | `introduction-to-modern-cryptography.md` / `.en.md` |
253
259
 
254
- > 密码学书稿正文为英文,沿用 `.md` 后缀(不分中英);Domain Router 判定为密码学或 AI×密码交叉时加载。
260
+ > 三份密码学蒸馏稿均已中英配对;按用户主语言选择 `.md` `.en.md`,且仍只在锚点不足或需要书稿深度时加载。
255
261
 
256
262
  蒸馏文件已随 npm 包发布。如需全保真原文,将 PDF 放入 `math_book/` 文件夹即可。
257
263
 
@@ -259,6 +265,31 @@ math-skill/
259
265
 
260
266
  ## 变更日志
261
267
 
268
+ ### v3.3.0 — 路由收敛、双语补全与专业性校正
269
+
270
+ - **权威入口与兼容结构**:新增根 `SKILL.md` / `SKILL.en.md` 作为完整、自足的规范入口;`skills/math-research-activator/SKILL*.md` 缩为薄转发层,继续兼容 Claude/plugin 目录布局,同时避免两份完整正文长期漂移。`commands/ask*`、critic、索引和 overview 的引用均改到根入口。
271
+ - **渐进加载与 token 最小化**:按 A 分析、B 设计、C 查询、D 验证、E 纯工程五类场景设置最小路径;默认限制为 1–2 个透镜、1–3 个锚点和 0–2 个设计原型。概念查询、纯密码任务和普通验证不再默认加载完整 critic、书稿、GPU 清单或目录索引,也不向用户复述内部加载过程。
272
+ - **Domain Router 重写**:从关键词投票改为按“目标对象 + 所求保证”判域;`hashing`、`attack`、`security` 等孤立词不再误触发密码学。纯 AI、纯密码、共用数学和 AI×密码交叉路径明确隔离;交叉四元组只在真正涉及原语/安全性质向 AI 对象迁移时输出。
273
+ - **密码学知识去污染**:四张密码学锚点改用安全定义、攻击游戏、归约损失、构造边界和实现注意事项组织,不再强塞 AI 设计翻译或 GPU 验收;明确标准模型定理、基于原语的归约与 AES 等具体算法经验假设的层级差异,并校正 PRF/PRG/OWF、Feistel、CPA/CCA/AE、KEM/DEM、nonce/IV、密钥分离与组合顺序等表述。
274
+ - **数学概念与工程断言校正**:修正一般投影的 Moore–Penrose 伪逆条件、attention/QKV 与线性投影的边界、KL 散度方向、低秩近似的梯度表述、正交损失的形状/归一化条件,以及抽象代数与几何书稿中的若干过度类比;所有保证、等价、稳定和最优性表述强调成立条件或降级为待验证假设。
275
+ - **密码学书稿完整双语化**:新增 `applied-cryptography.en.md`、`foundations-of-cryptography.en.md`、`introduction-to-modern-cryptography.en.md`。commands、agents、lenses、knowledge-base、design-patterns 与 references 现均保持中英文件配对;按用户主语言只加载一侧,避免双份上下文。
276
+ - **GPU 审查改为相关性驱动**:不再要求每个候选机械覆盖八个维度;先声明 shape、baseline 与部署约束,只评会影响决策的维度,无关项标 `N/A`。要求用 FLOPs、峰值中间张量/状态、字节量、通信量或低精度风险等可核查信号支持判断,并明确“可写成 GEMM”不等于实际更快。
277
+ - **critic 与输出质量收敛**:普通任务使用入口内的紧凑检查,只有论文级或显式全面审查才加载 19 维 critic;现代数学激活维度只在确有迁移声称时强制,密码学优先加载 `knowledge-base/cryptography/` 锚点再按需读书稿,不以 GPU 清单作安全门;探索性候选必须标注假设、边界和证伪方法。
278
+ - **审查后残余一致性修补(发布前)**:兼容入口 description 与根 `SKILL.md` 对齐(补回数学查询触发);索引工作流范例改回默认 ≤2 透镜;CLAUDE/eval 去除过时 Gate 术语并更正 books 双语事实;层上同调 $H^1$ 措辞收紧,避免与层公理混淆。
279
+ - **索引、路由样例与语言规则同步**:更新 `skill-index`、`knowledge-base/overview`、agentic workflow 和 A/B/C/D/E eval 场景,补充假阳性、交叉域、知识缺口与主语言判断边界;代码、路径、公式和英文技术词不参与主语言投票。
280
+ - **测试职责边界清理**:移除仅服务本次审计的六维输出评分和 token/cost 回归规范,保留与 skill 行为直接相关的路由、隔离、双语、引用与语义回归场景。
281
+ - **验证与发布完整性**:Bash/PowerShell 验证覆盖根入口 frontmatter、兼容转发、37 张锚点、中英配对、交叉引用、Domain Router 隔离、Knowledge Gap Protocol、GPU 量化信号和高风险语义回归;npm 包显式包含根 `SKILL*.md`,排除 PDF、`math_book/`、测试与本地 npm 缓存。
282
+
283
+ ### v3.2.1 — 设计哲学修正与可靠性增强
284
+
285
+ - **设计哲学明确化**:`SKILL.md` / `SKILL.en.md` 新增"设计哲学:activator 而非百科"小节,声明 skill 是思考的 activator 和数学锚点,`knowledge-base/` 回归数学结构本身(不固化具体 AI 架构),`design-patterns/` 定位为翻译范式示范而非模板库;新增"兼容性原则"小节,声明对未预置架构的研究问题通过透镜路由 + 锚点激活 + 临时知识卡完成引导
286
+ - **密码学锚点补齐**:新增 `knowledge-base/cryptography/` 目录,含 `prf-prg-owf`、`reduction-proof-template`、`attack-game-framework`、`cca-cpa-ae-hierarchy` 四张锚点卡(中英成对),使 Domain Router 的密码学层加载有实质锚点(修复 v3.2.0 理念不一致:此前声明加载密码学层但无结构化锚点)
287
+ - **代数几何锚点补齐**:新增 `knowledge-base/algebraic-geometry/` 目录,含 `sheaf-cohomology`、`grassmannian-plucker` 两张锚点卡(中英成对),覆盖 `design-patterns/` 已使用但无锚点的数学结构(层上同调、格拉斯曼流形)
288
+ - **测试覆盖扩展**:新增场景 A(问题分析)、场景 D(验证审查)、交叉域路由(AI×密码四元组标注)、Knowledge Gap Protocol、Domain Router 隔离(不污染保证)五类 eval 测试
289
+ - **validate.sh 结构化检查**:新增知识卡六段结构、设计模式 GPU 八维覆盖、Domain Router 隔离与 Knowledge Gap Protocol 关键字段检查
290
+ - **critic 19 维分层**:核心维度 / 情境维度 / 强制维度 / 元维度分层标注,减少 Agent 的认知负担
291
+ - **inspiration.md 拆分**:技术灵感部分(屠龙刀故事)保留;哲学内容(人生最优化等)移至 `musings.md`,避免与 skill 严谨技术风格冲突
292
+
262
293
  ### v3.2.0 — 密码学方向接入 + Domain Router
263
294
 
264
295
  **密码学方向正式落地**:参考层从 7 本扩到 10 本,新增 3 本现代密码学经典蒸馏稿,精简为与 AI 方向书稿一致的激活索引格式(约 125-155 行/本,保留核心思想与关键桥接事实)。
package/SKILL.en.md ADDED
@@ -0,0 +1,122 @@
1
+ ---
2
+ name: math-research-activator
3
+ description: |
4
+ Route AI architecture/operator design, theoretical analysis, math-to-AI transfer, and cryptographic definitions, constructions, reductions, or protocol reviews to the minimum necessary mathematical lenses, anchors, and design checks. Also use for mathematics questions tied to AI research. Do not use for implementation-only debugging, refactoring, tuning, or general code review.
5
+ 中文:为 AI 架构/算子设计、理论分析、数学迁移,以及密码学定义、构造、归约和协议审查,选择最少必要的数学透镜、锚点与检查;纯实现工程任务不触发。
6
+ ---
7
+
8
+ # Mathematical Research Router
9
+
10
+ Answer in the user's primary language. Technical terms, code, paths, and formulas do not determine language. `SKILL.md` is the canonical Codex entry. This English file exists only for explicit English command-entry compatibility; do not load both files.
11
+
12
+ ## Objective and hard constraints
13
+
14
+ Route each problem to the **smallest sufficient** mathematical context and produce a falsifiable, conditional conclusion.
15
+
16
+ - Distinguish theorems, modeling assumptions, empirical regularities, and exploratory conjectures. Never present the last two as guarantees.
17
+ - Keep mathematical anchors, AI design patterns, and cryptographic security semantics domain-separated.
18
+ - Never load a directory merely because it exists. Load book distillations only when cards are insufficient, theorem conditions need checking, or the user asks for sources.
19
+ - Converge to a conclusion; do not stop at a list of lenses, terms, or loaded files.
20
+
21
+ ## Activation
22
+
23
+ Classify by the requested **object and guarantee**, not by keyword voting.
24
+
25
+ 1. Classify import/shape/OOM fixes, refactoring, configuration changes, tuning, deployment, and general code-quality reviews as **E engineering** when no mathematical or security claim is at issue.
26
+ 2. Activate even when code is present if the user asks about mathematical correctness, complexity, convergence, numerical stability, or cryptographic security.
27
+ 3. A direct request to design, analyze, verify, or explain relevant mathematics is sufficient. Workspace files only disambiguate terse requests; they are not a mandatory gate.
28
+ 4. `/ask` or an explicit skill mention bypasses automatic-trigger selection, while implementation-only work still remains outside scope.
29
+
30
+ | Scenario | Goal | Minimal path |
31
+ |---|---|---|
32
+ | A Analysis | Assess a design, assumption, or argument | 1–2 lenses → conditions/counterexamples |
33
+ | B Design | Construct a mechanism, operator, loss, router, or protocol | 1–2 lenses → 1–3 anchors → 0–2 prototypes → review |
34
+ | C Knowledge | Understand mathematics tied to the research task | Usually one anchor |
35
+ | D Verification | Check a formula, guarantee, reduction, or complexity claim | 1–2 anchors → conditions/boundaries/counterexamples |
36
+ | E Engineering | Implementation and maintenance only | Do not load this system's resources |
37
+
38
+ ## Domain Router
39
+
40
+ Use the target object and required guarantee:
41
+
42
+ | Domain | Load | Exclude |
43
+ |---|---|---|
44
+ | Shared mathematics | `lenses/` plus the 8 non-cryptography domains and 33 anchors under `knowledge-base/` | Do not automatically load AI patterns or crypto books |
45
+ | AI research | Shared mathematics on demand plus 0–2 relevant prototypes from `design-patterns/` | Do not load crypto anchors/books |
46
+ | Cryptography | Relevant `knowledge-base/cryptography/` anchors; then the three crypto books only if needed; shared mathematics by structure | Do not load AI design patterns or apply the GPU gate |
47
+ | AI×crypto | Both a cryptographic primitive/formal property and an AI object/functional need are present, and the task asks to transfer or combine them | Load only material needed at the intersection |
48
+
49
+ Rules:
50
+
51
+ - Surface terms such as `hashing`, `attack`, or `security` are insufficient for crypto routing. Feature hashing is normally AI; adversarial examples enter crypto/cross-domain routing only when the task asks for a game, certificate, or reduction.
52
+ - For pure crypto, review security definitions, reduction tightness, assumptions, and implementation pitfalls. Treat GPU performance as ordinary engineering only when explicitly asked, never as a security acceptance gate.
53
+ - For cross-domain tasks, output one four-tuple: (1) primitive + security property; (2) AI object + functional need; (3) transfer direction; (4) whether the assumption remains achievable after transfer. Do not emit it elsewhere.
54
+
55
+ See `references/skill-index.en.md` for the full index and boundary examples. Do not load it by default merely to route a clear request.
56
+
57
+ ## Progressive loading and token budget
58
+
59
+ Use these defaults unless the user requests a comprehensive review, multiple candidates, or the available material is genuinely insufficient.
60
+
61
+ | Scenario | Default context | Default answer |
62
+ |---|---|---|
63
+ | A | 1–2 lenses; one anchor only if needed | Conclusion + 2–4 key issues + fixes |
64
+ | B | 1–2 lenses, 1–3 anchors, 0–2 patterns | One primary design; alternatives only by decisive differences |
65
+ | C | One anchor | Definition + formula/intuition + boundary |
66
+ | D | 1–2 anchors | Short conclusion + conditions + non-guarantees |
67
+
68
+ - Do not repeat cards or expose internal load paths unless debugging routing, handling a cross-domain task, or resolving ambiguity.
69
+ - Do not force simple questions into a full report template. Every heading must add decision-relevant information.
70
+ - Do not expand AI translation, the GPU scorecard, or long bibliographies for a concept-only query.
71
+ - If one anchor is sufficient, do not load the matching book. If the card plus reliable existing knowledge is sufficient, do not inspect PDFs.
72
+
73
+ ## Procedure
74
+
75
+ 1. **Classify scenario and domain:** extract the target, constraints, properties to preserve/suppress, and requested guarantee.
76
+ 2. **Select minimal material:** read only the most relevant files. Use `references/skill-index.en.md` only when filenames do not locate them.
77
+ 3. **Solve or design:** state objects, assumptions, and testable goals before AI/crypto translation.
78
+ 4. **Review:** always check assumptions, logic, and boundaries; add complexity/memory/numerics for implementations and security-game/reduction/assumption checks for crypto.
79
+ 5. **Lead with the conclusion:** answer whether it holds, what to choose, or what to do next before supporting detail.
80
+
81
+ ### AI design
82
+
83
+ - Treat design patterns as translation examples, not copy-ready models.
84
+ - Read `references/gpu-friendly-math.en.md` only for operator, training, or inference implementation questions.
85
+ - Report only applicable GPU dimensions that can change the decision. Quantify main FLOPs, peak intermediate/state memory, and low-precision risk. Mark irrelevant dimensions N/A instead of padding to eight items.
86
+
87
+ ### Cryptography
88
+
89
+ - Define adversarial capability, security game, and advantage before claiming security.
90
+ - Separate standard-model theorems, primitive-based reductions, and empirical assumptions about concrete algorithms such as AES.
91
+ - Report reduction loss and parameter compensation; check nonce/IV handling, key separation, composition order, and side channels.
92
+
93
+ ### Knowledge Gap Protocol
94
+
95
+ When no anchor covers the problem, do not force-fit one:
96
+
97
+ 1. identify the gap type; 2. fall back to 1–2 lenses; 3. name concrete concepts/theorem families; 4. write a minimal temporary card; 5. translate into a design only if needed; 6. recommend a permanent card only for recurring gaps.
98
+
99
+ Every temporary card must state its domain, source (agent inference/lens derivation/reference extrapolation/external verification needed), confidence, and unverified claims. See `references/skill-index.en.md` for detailed fields.
100
+
101
+ ## Output quality check
102
+
103
+ Before answering, verify:
104
+
105
+ - Does the conclusion answer the user's decision rather than display knowledge?
106
+ - Does every claim of “guaranteed,” “optimal,” “secure,” “stable,” or “equivalent” state sufficient conditions?
107
+ - Is there at least one boundary, counterexample, or falsification experiment?
108
+ - Did correlation, analogy, or empirical behavior become a theorem or causal claim by accident?
109
+ - Did irrelevant domain content leak into context or output?
110
+ - Can a section be deleted without losing decision information? If yes, delete it.
111
+
112
+ Load `agents/math-critic.en.md` only for paper-grade or explicitly comprehensive review. For ordinary A/B/D tasks, use the compact checks above instead of the full 19-dimension template.
113
+
114
+ ## Direct resources
115
+
116
+ - Lenses: `lenses/`
117
+ - Shared anchors: `knowledge-base/` except `knowledge-base/cryptography/`
118
+ - Crypto anchors: `knowledge-base/cryptography/`
119
+ - AI prototypes: `design-patterns/`
120
+ - GPU deep check: `references/gpu-friendly-math.en.md`
121
+ - Deep review: `agents/math-critic.en.md`
122
+ - Books: `references/books/` on demand only
package/SKILL.md ADDED
@@ -0,0 +1,122 @@
1
+ ---
2
+ name: math-research-activator
3
+ description: |
4
+ 数学研究路由器:为 AI 架构/算子设计、理论性质分析、数学结构迁移,以及密码学定义、构造、归约与协议审查,选择必要的数学透镜、知识锚点和设计检查。也用于与 AI 研究有关的数学查询。纯实现型 debug、重构、调参和一般代码审查不触发。
5
+ English: Route AI architecture/operator design, theoretical analysis, math-to-AI transfer, and cryptographic definitions, constructions, reductions, or protocol reviews to the minimum necessary mathematical lenses, anchors, and design checks. Do not use for implementation-only debugging, refactoring, tuning, or general code review.
6
+ ---
7
+
8
+ # 数学研究路由器
9
+
10
+ 本文件是 Codex 的权威入口。按用户主语言回答;技术词、代码、路径和公式不决定语言。不要为英文输入再次加载 `SKILL.en.md`;该文件只供显式英文命令入口兼容。
11
+
12
+ ## 目标与硬约束
13
+
14
+ 把问题路由到**最少但足够**的数学材料,并给出可证伪、带条件的结论。
15
+
16
+ - 区分定理、建模假设、经验规律和探索性猜想;不得把后两者写成保证。
17
+ - 数学锚点先讲数学结构;AI 设计模式和密码学安全语义分域加载。
18
+ - 不因目录中存在材料而整目录加载。书稿只用于卡片不足、需核对定理条件或用户要求出处时。
19
+ - 必须收敛到结论;不要只列视角、术语或加载清单。
20
+
21
+ ## 何时介入
22
+
23
+ 先看用户要求的**目标与保证**,不要按单个关键词投票。
24
+
25
+ 1. 若任务只要求修 import/shape/OOM、重构、改配置、调参、部署或一般代码质量审查,归为 **E 纯工程**,不介入。
26
+ 2. 若任务虽含代码,但要求验证数学正确性、复杂度、收敛性、数值稳定性或密码学安全性,仍应介入。
27
+ 3. 用户直接要求设计、分析、验证或解释相关数学时,任务信号本身足够;工作区文件只用于消歧,不是必需门槛。
28
+ 4. `/ask` 或显式点名本 skill 时,跳过自动触发判断,但仍排除与数学/安全语义无关的纯工程工作。
29
+
30
+ | 场景 | 用户目标 | 最小路径 |
31
+ |---|---|---|
32
+ | A 分析 | 判断设计、假设或论证是否合理 | 1–2 透镜 → 条件/反例审查 |
33
+ | B 设计 | 构造新机制、算子、loss、路由或协议 | 1–2 透镜 → 1–3 锚点 → 0–2 设计原型 → 审查 |
34
+ | C 查询 | 理解与研究问题相关的数学概念 | 通常 1 张锚点 |
35
+ | D 验证 | 判断公式、保证、归约或复杂度声称是否成立 | 1–2 锚点 → 条件/边界/反例 |
36
+ | E 工程 | 仅实现与维护 | 不加载本系统材料 |
37
+
38
+ ## Domain Router
39
+
40
+ 按目标对象和所需保证判域:
41
+
42
+ | 域 | 加载范围 | 禁止污染 |
43
+ |---|---|---|
44
+ | 共用数学 | `lenses/` + `knowledge-base/` 中除 `knowledge-base/cryptography/` 外的 8 域 33 锚点 | 不自动加载 AI 模式或密码书稿 |
45
+ | AI 研究 | 共用数学按需 + `design-patterns/` 中相关的 0–2 个原型 | 不加载密码学锚点/书稿 |
46
+ | 密码学 | `knowledge-base/cryptography/` 中相关锚点;不足时再查 3 本密码书稿;共用数学按结构按需 | 不加载 AI 设计模式,不以 GPU 清单作安全门 |
47
+ | AI×密码 | 同时满足“密码学原语/形式安全性质”和“AI 对象/功能需求”,且问题要求迁移或组合 | 只加载交叉点实际需要的两侧材料 |
48
+
49
+ 判定细则:
50
+
51
+ - `hashing`、`attack`、`security` 等表面词不足以判密码域。特征哈希通常是 AI;对抗样本只有在要求攻击游戏、证书或归约时才进入密码/交叉域。
52
+ - 纯密码问题使用安全定义、归约紧度、假设依赖和实现陷阱检查;GPU 只在用户明确问密码实现性能时作为普通工程分析,不作为安全验收门。
53
+ - 交叉问题输出一次四元组:①原语+安全性质;②AI 对象+功能需求;③迁移方向;④迁移后假设是否仍可满足。非交叉问题不要输出该模板。
54
+
55
+ 完整索引与语言边界例见 `references/skill-index.md`;不要为了路由而默认读取它。
56
+
57
+ ## 渐进加载与 token 预算
58
+
59
+ 默认遵循下列上限;只有用户要求全面审查、多个候选或原材料确实不足时才扩展。
60
+
61
+ | 场景 | 默认加载预算 | 默认回答预算 |
62
+ |---|---|---|
63
+ | A | 1–2 透镜;必要时 1 锚点 | 结论 + 2–4 个关键问题 + 修法 |
64
+ | B | 1–2 透镜、1–3 锚点、0–2 模式 | 1 个主方案;备选只写关键差异 |
65
+ | C | 1 锚点 | 定义 + 公式/直觉 + 适用边界 |
66
+ | D | 1–2 锚点 | 短结论 + 成立条件 + 不能保证什么 |
67
+
68
+ - 不复述卡片全文,不展示内部加载路径,除非用户在调试路由、问题跨域或存在歧义。
69
+ - 简单问题不套完整报告模板;每个标题必须承载新信息。
70
+ - 用户只问概念时,不主动展开 AI 翻译、GPU 评分或长参考书目。
71
+ - 若一个锚点已足够,不再加载同主题书稿。若卡片和自身可靠知识足够,不进入 PDF。
72
+
73
+ ## 执行流程
74
+
75
+ 1. **判场景与域**:提取目标、约束、需要保留/抑制的性质和所求保证。
76
+ 2. **选最小材料**:只读最相关文件;目录表见 `references/skill-index.md`,但仅在无法从文件名定位时读取索引。
77
+ 3. **求解或设计**:先写数学对象、假设和可检验目标,再做 AI/密码翻译。
78
+ 4. **审查**:至少检查假设、逻辑和边界;涉及算法实现再检查复杂度/显存/数值稳定,涉及密码再检查安全定义/归约/假设。
79
+ 5. **结论优先输出**:先回答“成立吗/选什么/下一步是什么”,再给必要依据。
80
+
81
+ ### AI 设计
82
+
83
+ - 设计原型是翻译示例,不是可直接复制的完整模型。
84
+ - 只有涉及算子、训练或推理实现时才读取 `references/gpu-friendly-math.md`。
85
+ - GPU 输出只报告适用且会改变决策的维度;至少量化主要 FLOPs、峰值中间张量/状态量和低精度风险。无关维度标 N/A,不为凑八项制造文字。
86
+
87
+ ### 密码学
88
+
89
+ - 先明确攻击者能力、安全游戏和优势,再谈“安全”。
90
+ - 把标准模型中的定理、基于原语的归约、具体算法(如 AES)的经验假设分开。
91
+ - 报告归约损失和参数补偿;检查 nonce/IV、密钥分离、组合顺序、侧信道等实现前提。
92
+
93
+ ### Knowledge Gap Protocol
94
+
95
+ 现有锚点不覆盖时,不得强行套卡:
96
+
97
+ 1. 指明缺口类型;2. 回退到 1–2 个透镜;3. 给出具体概念/定理族;4. 写最小临时卡;5. 需要时做设计翻译;6. 高频缺口才建议升级正式卡。
98
+
99
+ 临时卡必须标注 domain、来源(Agent 推断/透镜推导/参考外推/待外部验证)、置信度和未核验结论。详细字段见 `references/skill-index.md`。
100
+
101
+ ## 输出质量检查
102
+
103
+ 提交答案前确认:
104
+
105
+ - 结论是否回答了用户真正的问题,而非只展示数学知识?
106
+ - 每个“保证/最优/安全/稳定/等价”是否附有充分条件?
107
+ - 是否给出至少一个边界、反例或可证伪实验?
108
+ - 是否把相关性、类比或经验现象误写成因果/定理?
109
+ - 是否加载或输出了无关域内容?
110
+ - 是否能删去一节而不损失决策信息?能则删。
111
+
112
+ 用户要求论文级或全面审查时,再读取 `agents/math-critic.md`;普通 A/B/D 场景使用上述检查即可,避免默认加载完整 19 维模板。
113
+
114
+ ## 直接资源
115
+
116
+ - 透镜:`lenses/`
117
+ - 共用数学锚点:`knowledge-base/`(排除 `knowledge-base/cryptography/`)
118
+ - 密码学锚点:`knowledge-base/cryptography/`
119
+ - AI 设计原型:`design-patterns/`
120
+ - GPU 深查:`references/gpu-friendly-math.md`
121
+ - 深度审查:`agents/math-critic.md`
122
+ - 书稿:`references/books/`(仅按需)