math-skill 3.2.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/README.en-US.md +74 -39
  2. package/README.md +81 -46
  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 +3 -2
  8. package/commands/ask.md +3 -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 +8 -35
  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
  64. package/skills/math-research-activator/original-texts.en.md +6 -4
  65. package/skills/math-research-activator/original-texts.md +2 -0
package/README.en-US.md CHANGED
@@ -16,9 +16,7 @@
16
16
 
17
17
  ## 📢 Community Announcements
18
18
 
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
-
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.
19
+ > **v3.3.1 released**: documentation-discipline patch completed the README directory tree, corrected the workflow example, slimmed the changelog, and unified entry phrasing and counting caliber. v3.3.0 delivered routing convergence and technical corrections; this release fixes the documentation-consistency issues it left behind. See the changelog. Feedback and edge-case reports are welcome via GitHub Issues or Discussions.
22
20
 
23
21
  ---
24
22
 
@@ -60,23 +58,23 @@ Critic: Mathematically sound? Engineering-feasible?
60
58
  | Layer | Role | Directory | Files |
61
59
  |-------|------|-----------|-------|
62
60
  | **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 |
61
+ | **Activation Anchors** | 33 shared-math anchors + 4 cryptography anchors; trigger Knowledge Gap Protocol when insufficient | `knowledge-base/*/*.md` | 37 |
64
62
  | **Design Translation** | Bridge math to AI modules/losses/operators | `design-patterns/*/*.md` | 22 |
65
63
 
66
64
  Supporting layers:
67
65
  - `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)
66
+ - `references/gpu-friendly-math.en.md`: on-demand GPU checks with N/A for irrelevant dimensions
67
+ - `agents/math-critic.en.md`: 19-dimension deep critic loaded only for comprehensive or paper-grade review
70
68
 
71
- ### Domain Router (new in v3.2.0)
69
+ ### Domain Router
72
70
 
73
71
  AI research and cryptography **share** mathematical foundations (probability/information/algebra/matrix/spectrum/optimization) but each has **exclusive** specialty layers. After intent diagnosis and before lens invocation, Domain Router determines the problem's domain and decides which anchors/books/design patterns to load, avoiding cross-domain pollution and token waste.
74
72
 
75
73
  | Domain | Loaded Content | Signal Keywords |
76
74
  |--------|----------------|------------------|
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 |
75
+ | **Shared Mathematics** | 33 anchors across 8 domains plus relevant lenses | probability/information/algebra/geometry/matrix/spectral/optimization/topology/complexity |
76
+ | **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 |
77
+ | **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
78
  | **AI×Crypto** | dual-domain load + intersection annotation | "PRF for watermarking," "adversarial example reduction," "verifiable inference" |
81
79
 
82
80
  > 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 +110,8 @@ AI research and cryptography **share** mathematical foundations (probability/inf
112
110
  | Topology | persistent-homology, euler-characteristic, fundamental-group |
113
111
  | Probability & Information | concentration-inequality, entropy, kl-divergence, information-bottleneck, fisher-information |
114
112
  | Information Geometry | natural-gradient, fisher-metric |
113
+ | Algebraic Geometry | sheaf-cohomology, grassmannian-plucker |
114
+ | Cryptography (exclusive) | prf-prg-owf, reduction-proof-template, attack-game-framework, cca-cpa-ae-hierarchy |
115
115
 
116
116
  ### Design Patterns (by AI component)
117
117
 
@@ -133,12 +133,14 @@ AI research and cryptography **share** mathematical foundations (probability/inf
133
133
  Please help me install math-skill: https://github.com/the-thinker0/math-skill, and show me how to use it
134
134
  ```
135
135
 
136
- Manual install:
136
+ Manual Codex install (install the whole repository as one self-contained skill; do not copy only the nested entry):
137
137
 
138
138
  ```bash
139
- git clone https://github.com/the-thinker0/math-skill.git
139
+ git clone https://github.com/the-thinker0/math-skill.git ~/.codex/skills/math-research-activator
140
140
  ```
141
141
 
142
+ 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.
143
+
142
144
  ### Usage
143
145
 
144
146
  **Auto-trigger**: The system auto-diagnoses user intent and routes to the appropriate layer:
@@ -172,25 +174,24 @@ Step 1 Diagnosis: Scenario B (Mechanism Design)
172
174
  Problem type: sequence memory compression + information preservation + long-range structure
173
175
  Core tension: compress token count vs. preserve long-range dependencies
174
176
 
175
- Step 2 Lens Selection:
177
+ Step 2 Lens Selection (default ≤2):
176
178
  1. Spectral (preserve dominant subspace)
177
- 2. Information-theoretic (preserve max mutual information states)
178
- 3. Topological (preserve key connection points in sequence structure)
179
+ 2. Probabilistic/Information (preserve mutual-information-sensitive states)
180
+ (Add Topological only when the user stresses connectivity/bridge structure; not in default budget)
179
181
 
180
182
  Step 3 Activation Anchors:
181
183
  → low-rank-approximation (Matrix Analysis anchor)
182
- → leverage-score-selection (Design Pattern: compression)
183
184
  → information-bottleneck (Probability & Information anchor)
185
+ → leverage-score-selection or low-rank-kv-cache (0–2 compression design patterns)
184
186
  If existing anchors are insufficient, enter Knowledge Gap Protocol to generate a temporary knowledge card.
185
187
 
186
188
  Step 4 Design Translation:
187
- Candidate A: Spectral KV Compression (low-rank + leverage score)
188
- Candidate B: Information-Preserving Cache (query sensitivity)
189
- Candidate C: Topology-Preserving Cache (graph bridge node retention)
189
+ Primary: Spectral KV Compression (low-rank + leverage score)
190
+ Alternative (key difference only): Information-Preserving Cache (relies on future query estimation)
190
191
 
191
- Step 5 Critic Review:
192
- A is most GPU-friendly, B needs future query estimation (uncertainty), C graph construction too expensive
193
- Recommendation: prioritize A, use B as a lightweight gate
192
+ Step 5 Compact Review (ordinary tasks do not load the full critic):
193
+ Primary is most GPU-friendly; alternative needs future query estimation, higher uncertainty
194
+ Conclusion: prioritize primary; add a lightweight gate only if query-sensitive retention is needed
194
195
  ```
195
196
 
196
197
  ---
@@ -202,14 +203,16 @@ math-skill/
202
203
  ├── skills/
203
204
  │ └── math-research-activator/ # Orchestrator: intent diagnosis + routing
204
205
  ├── lenses/ # 15 thinking lenses (reasoning methodology)
205
- ├── knowledge-base/ # Activation anchors by math domain, not a closed encyclopedia
206
+ ├── knowledge-base/ # Activation anchors by math domain, not a closed encyclopedia (37 cards total)
206
207
  │ ├── matrix-analysis/ # Matrix analysis (5 cards)
207
208
  │ ├── optimization/ # Optimization (5 cards)
208
209
  │ ├── differential-geometry/ # Differential geometry (6 cards)
209
210
  │ ├── lie-theory/ # Lie theory (5 cards)
210
211
  │ ├── topology/ # Topology (3 cards)
211
212
  │ ├── probability/ # Probability & information (5 cards)
212
- └── information-geometry/ # Information geometry (2 cards)
213
+ ├── information-geometry/ # Information geometry (2 cards)
214
+ │ ├── algebraic-geometry/ # Algebraic geometry (2 cards)
215
+ │ └── cryptography/ # Cryptography (4 cards, domain-exclusive)
213
216
  ├── design-patterns/ # Design translation (by AI component)
214
217
  │ ├── attention/ # Attention mechanisms (5 patterns)
215
218
  │ ├── loss/ # Loss functions (5 patterns)
@@ -218,9 +221,11 @@ math-skill/
218
221
  │ └── compression/ # Compression (4 patterns)
219
222
  ├── references/ # Reference layer
220
223
  │ ├── books/ # 10 book distillations (7 AI + 3 crypto)
221
- │ ├── gpu-friendly-math.en.md # GPU 8-dimension gate
224
+ │ ├── gpu-friendly-math.en.md # GPU checklist (applicable dimensions only)
222
225
  │ ├── agentic-workflow.en.md # Collaboration style
223
- └── inspiration.en.md # Inspiration
226
+ ├── inspiration.en.md # Inspiration
227
+ │ ├── musings.en.md # Musings (philosophical reflections, not auto-loaded)
228
+ │ └── skill-index.en.md # Index (on-demand directory, not loaded by default)
224
229
  ├── agents/math-critic.en.md # Math-engineering dual critic (19 dims, with crypto security review)
225
230
  ├── commands/ask.en.md # /ask manual entry
226
231
  ├── math_book/ # Local PDFs (not published)
@@ -243,15 +248,15 @@ math-skill/
243
248
  | 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.en.md` |
244
249
  | 7 | *Introduction to Smooth Manifolds* | John M. Lee | Springer, GTM 218, 2nd ed. | 2013 | 978-1-4419-9981-8 | `smooth-manifolds.en.md` |
245
250
 
246
- ### Cryptography Direction (3 books, new in v3.2.0)
251
+ ### Cryptography Direction (3 books)
247
252
 
248
253
  | # | Title | Author(s) | Publisher / Edition | Year | ISBN | Distillation |
249
254
  |---|-------|-----------|-------------------|------|------|-------------|
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` |
255
+ | 8 | *A Graduate Course in Applied Cryptography* | Dan Boneh & Victor Shoup | v0.4 online | 2017 | — | `applied-cryptography.en.md` |
256
+ | 9 | *Foundations of Cryptography, Volume 1: Basic Tools* | Oded Goldreich | Cambridge University Press | 2001 | 978-0-521-79235-9 | `foundations-of-cryptography.en.md` |
257
+ | 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
258
 
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.
259
+ > 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
260
 
256
261
  Distillation files ship with the npm package. For full-fidelity lookups, place PDFs in the `math_book/` folder.
257
262
 
@@ -259,6 +264,39 @@ Distillation files ship with the npm package. For full-fidelity lookups, place P
259
264
 
260
265
  ## Changelog
261
266
 
267
+ ### v3.3.1 — Documentation-Discipline Patch
268
+
269
+ - **README directory tree completed**: added `algebraic-geometry/`, `cryptography/`, `musings.md`, `skill-index.md`; card total aligned to 37
270
+ - **README workflow example corrected**: lenses default ≤2, design patterns separated from anchors, Step 5 changed to compact review — consistent with `SKILL.md` budgets
271
+ - **Changelog slimmed**: v1/v2 compressed to one-line summaries; removed stale "37 .en.md" / "16 thinking weapons" numbers
272
+ - **Entry phrasing & counting caliber unified**: three entries use consistent "when to load .en" wording; repo-wide count standardized as 33 shared + 4 crypto = 37
273
+ - **Metadata & hygiene**: `package.json` description/keywords trimmed; `CLAUDE.md` dir tree and Node.js note fixed; `validate.sh` gained 20 documentation-discipline checks; `original-texts` gained purpose note and v2 terminology fix
274
+
275
+ ### v3.3.0 — Routing Convergence, Bilingual Completion & Technical Corrections
276
+
277
+ - **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.
278
+ - **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.
279
+ - **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.
280
+ - **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.
281
+ - **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.
282
+ - **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.
283
+ - **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.”
284
+ - **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.
285
+ - **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.
286
+ - **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.
287
+ - **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.
288
+ - **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.
289
+
290
+ ### v3.2.1 — Design Philosophy Refinement & Reliability Enhancement
291
+
292
+ - **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.
293
+ - **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).
294
+ - **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).
295
+ - **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).
296
+ - **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.
297
+ - **critic 19-dimension layering**: core / situational / mandatory / meta dimension layering annotations to reduce Agent cognitive load.
298
+ - **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.
299
+
262
300
  ### v3.2.0 — Cryptography Track + Domain Router
263
301
 
264
302
  **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).
@@ -310,22 +348,19 @@ Distillation files ship with the npm package. For full-fidelity lookups, place P
310
348
  **Architecture overhaul**: from "thinking weapon arsenal" to "math general staff" — three-layer orthogonal architecture:
311
349
 
312
350
  - **Thinking Lenses** (15): slimmed down from v2's "thinking weapons" — reasoning methodology only, no concrete math knowledge mixed in
313
- - **Knowledge Base** (31 cards): concrete math tools organized by domain, with definitions/formulas/AI design translation/GPU feasibility
351
+ - **Knowledge Base** (31 cards, expanded to 37 in v3.2): concrete math tools organized by domain, with definitions/formulas/AI design translation/GPU feasibility
314
352
  - **Design Translation Layer** (new): the bridge from math to AI modules, organized by AI component (attention/loss/routing/representation/compression)
315
353
  - **Activator rewrite**: from environment-signal matching to intent diagnosis (5 scenarios: analysis/design/query/verification/engineering)
316
354
  - **Knowledge activation protocol**: fixed output format for knowledge cards (minimal definition → formula → applicable problems → AI translation → engineering feasibility → risks)
317
355
 
318
356
  ### v2.1.0 — Full Bilingual Support
319
- - 37 .en.md files, auto language routing, same commands for both languages, no double token cost
320
-
321
- ### v2.0.1
322
- - Tightened auto-trigger conditions, added exclusion gate, narrowed environment signals
357
+ - Full bilingual support, auto language routing, same commands for both languages, no double token cost
323
358
 
324
- ### v2.0.0
325
- - 16 thinking weapons, modern math activation layer, GPU 8-D cross-cut
359
+ ### v2.0.0–v2.0.1
360
+ - 16 thinking weapons (v2 naming, replaced by 15 lenses in v3), modern math activation layer, GPU 8-D cross-cut; tightened auto-trigger conditions and exclusion gate
326
361
 
327
362
  ### v1.0.0
328
- - Initial release: fifteen thinking weapons + dual research/life paths
363
+ - Initial release: early "thinking-weapon arsenal + dual research/life paths" form (restructured into three-layer architecture in v3.0.0)
329
364
 
330
365
  ---
331
366
 
package/README.md CHANGED
@@ -16,9 +16,7 @@
16
16
 
17
17
  ## 📢 社区公告
18
18
 
19
- > **本 Skill 正在快速迭代中,欢迎各位使用者提出宝贵的使用感受和改进建议!** 你的反馈是我们持续进化的核心动力。欢迎通过 GitHub Issues 或 Discussions 与我们交流。
20
-
21
- > **v3.2.0 已上线**:密码学方向正式接入——3 本现代密码学经典(Boneh-Shoup / Goldreich / Katz-Lindell)精简蒸馏稿 + Domain Router 路由层,AI 与密码学共享数学根基、独有专业层,互不污染。详见变更日志。
19
+ > **v3.3.1 已发布**:文档纪律修复版——补全 README 目录树遗漏域、纠正工作流范例、瘦身 changelog、统一入口话术与计数口径。v3.3.0 完成路由收敛与专业性校正;本版修复其遗留的文档一致性问题。详见变更日志。欢迎通过 GitHub Issues 或 Discussions 反馈使用体验与边界场景。
22
20
 
23
21
  ---
24
22
 
@@ -60,23 +58,23 @@ Sophus Lie 打造"屠龙刀"的故事告诉我们:为解微分方程发明的
60
58
  | 层 | 职责 | 目录 | 文件数 |
61
59
  |----|------|------|--------|
62
60
  | **思想透镜** | 诊断问题结构,推荐数学视角 | `lenses/*.md` | 15 |
63
- | **激活锚点** | 激活高频数学结构,不足时触发知识缺口协议 | `knowledge-base/*/*.md` | 31 |
61
+ | **激活锚点** | 33 个共用数学锚点 + 4 个密码学锚点;不足时触发知识缺口协议 | `knowledge-base/*/*.md` | 37 |
64
62
  | **设计翻译** | 把数学变成 AI 模块/loss/算子 | `design-patterns/*/*.md` | 22 |
65
63
 
66
64
  辅助层:
67
65
  - `references/books/*.md`:10 本书蒸馏稿(7 本 AI 方向 + 3 本密码学方向),需要深入时的完整上下文
68
- - `references/gpu-friendly-math.md`:GPU 八维验收门
69
- - `agents/math-critic.md`:数学-工程双重批判器(19 维,含密码学安全审视)
66
+ - `references/gpu-friendly-math.md`:按需 GPU 检查;不适用维度标 N/A
67
+ - `agents/math-critic.md`:仅全面/论文级审查按需加载的 19 维深度批判器
70
68
 
71
- ### Domain Router(v3.2.0 新增)
69
+ ### Domain Router
72
70
 
73
71
  AI 研究与密码学**共享**数学根基(概率/信息/代数/矩阵/谱/优化),但**独有**各自专业层。Domain Router 在意图诊断后、调用透镜前,先判定问题归属,决定加载哪些锚点/书稿/设计模式,避免跨域污染与 token 浪费。
74
72
 
75
73
  | Domain | 加载内容 | 信号词 |
76
74
  |--------|---------|--------|
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/` 对应锚点 | 概率/信息/熵/群/环/域/矩阵/谱/优化/凸性/扰动/复杂度 |
75
+ | **共用数学** | 8 33 锚点 + 相关透镜 | 概率/信息/代数/几何/矩阵/谱/优化/拓扑/复杂度 |
76
+ | **AI 研究** | 共用数学按需 + 0–2 个相关设计原型;书稿只在深查时加载 | attention/loss/routing/representation/compression/MoE/transformer/KV-cache/LoRA/SSM/扩散/RL |
77
+ | **密码学** | 4 张密码锚点;不足时才查 3 本密码书稿;共用数学按需 | 加密/签名/MAC/PRF/PRG/PRP/OWF/CCA/CPA/AE/零知识/归约/DL/CDH/DDH/RSA/ECC/格密码 |
80
78
  | **AI×密码交叉** | 双 domain 加载 + 交叉点标注 | "PRF 做模型水印""对抗样本归约""可验证推理" |
81
79
 
82
80
  > 规则:domain 判定先于透镜调用;共用数学不重复加载;不跨域时不污染;缺口协议临时卡标注 domain。
@@ -112,6 +110,8 @@ AI 研究与密码学**共享**数学根基(概率/信息/代数/矩阵/谱/
112
110
  | 拓扑 | persistent-homology, euler-characteristic, fundamental-group |
113
111
  | 概率与信息 | concentration-inequality, entropy, kl-divergence, information-bottleneck, fisher-information |
114
112
  | 信息几何 | natural-gradient, fisher-metric |
113
+ | 代数几何 | sheaf-cohomology, grassmannian-plucker |
114
+ | 密码学(独有) | prf-prg-owf, reduction-proof-template, attack-game-framework, cca-cpa-ae-hierarchy |
115
115
 
116
116
  ### 设计模式库(按 AI 组件)
117
117
 
@@ -133,12 +133,14 @@ AI 研究与密码学**共享**数学根基(概率/信息/代数/矩阵/谱/
133
133
  请帮我安装 math-skill:https://github.com/the-thinker0/math-skill,并教我如何使用
134
134
  ```
135
135
 
136
- 手动安装:
136
+ Codex 手动安装(把整个仓库作为一个自足 skill,而不是只复制内层目录):
137
137
 
138
138
  ```bash
139
- git clone https://github.com/the-thinker0/math-skill.git
139
+ git clone https://github.com/the-thinker0/math-skill.git ~/.codex/skills/math-research-activator
140
140
  ```
141
141
 
142
+ 根 `SKILL.md` 是 Codex 权威入口;`skills/math-research-activator/SKILL.md` 只是 Claude/plugin 风格兼容入口并转发到根文件。不要单独复制内层目录,否则它引用的知识库与设计模式不完整。
143
+
142
144
  ### 使用
143
145
 
144
146
  **自动触发**:系统自动诊断用户意图,路由到合适的层:
@@ -172,25 +174,24 @@ git clone https://github.com/the-thinker0/math-skill.git
172
174
  问题类型:序列记忆压缩 + 信息保留 + 长程结构
173
175
  核心张力:压缩 token 数量 vs 不破坏长期依赖
174
176
 
175
- 第二步 透镜选择:
177
+ 第二步 透镜选择(默认 ≤2):
176
178
  1. 谱分解(保留主导子空间)
177
- 2. 信息论(保留最大互信息状态)
178
- 3. 拓扑(保留序列结构关键连接点)
179
+ 2. 概率/信息(保留互信息敏感状态)
180
+ (拓扑仅在用户强调连通/桥接结构时再加,不计入默认预算)
179
181
 
180
182
  第三步 激活锚点:
181
183
  → low-rank-approximation(矩阵分析锚点)
182
- → leverage-score-selection(压缩设计模式)
183
184
  → information-bottleneck(概率与信息锚点)
185
+ → leverage-score-selection 或 low-rank-kv-cache(0–2 个压缩设计模式)
184
186
  若现有锚点不足,进入 Knowledge Gap Protocol 生成临时知识卡。
185
187
 
186
188
  第四步 设计翻译:
187
- 候选 A:Spectral KV Compression(低秩 + leverage score)
188
- 候选 B:Information-Preserving Cachequery sensitivity)
189
- 候选 C:Topology-Preserving Cache(图桥接节点保留)
189
+ 主方案:Spectral KV Compression(低秩 + leverage score)
190
+ 备选仅写关键差异:Information-Preserving Cache(依赖未来 query 估计)
190
191
 
191
- 第五步 Critic 审查:
192
- A GPU 友好,B 需估计未来 query 有不确定性,C 图构建成本过高
193
- 建议:优先 A,B 作轻量 gate
192
+ 第五步 紧凑审查(普通任务不加载完整 critic):
193
+ 主方案最 GPU 友好;备选需估计未来 query,不确定性更高
194
+ 结论:优先主方案;需要 query 敏感保留时再加轻量 gate
194
195
  ```
195
196
 
196
197
  ---
@@ -202,14 +203,16 @@ math-skill/
202
203
  ├── skills/
203
204
  │ └── math-research-activator/ # 总控:意图诊断 + 路由
204
205
  ├── lenses/ # 15 个思想透镜(推理方法论)
205
- ├── knowledge-base/ # 激活锚点(按数学领域组织,非封闭百科)
206
+ ├── knowledge-base/ # 激活锚点(按数学领域组织,非封闭百科;共 37 卡)
206
207
  │ ├── matrix-analysis/ # 矩阵分析(5 卡片)
207
208
  │ ├── optimization/ # 最优化(5 卡片)
208
209
  │ ├── differential-geometry/ # 微分几何(6 卡片)
209
210
  │ ├── lie-theory/ # 李理论(5 卡片)
210
211
  │ ├── topology/ # 拓扑(3 卡片)
211
212
  │ ├── probability/ # 概率与信息(5 卡片)
212
- └── information-geometry/ # 信息几何(2 卡片)
213
+ ├── information-geometry/ # 信息几何(2 卡片)
214
+ │ ├── algebraic-geometry/ # 代数几何(2 卡片)
215
+ │ └── cryptography/ # 密码学(4 卡片,域独有)
213
216
  ├── design-patterns/ # 设计翻译层(按 AI 组件组织)
214
217
  │ ├── attention/ # 注意力机制(5 模式)
215
218
  │ ├── loss/ # 损失函数(5 模式)
@@ -218,9 +221,11 @@ math-skill/
218
221
  │ └── compression/ # 压缩(4 模式)
219
222
  ├── references/ # 参考层
220
223
  │ ├── books/ # 10 本书蒸馏稿(7 AI + 3 密码学)
221
- │ ├── gpu-friendly-math.md # GPU 八维验收门
224
+ │ ├── gpu-friendly-math.md # GPU 维度清单(仅评相关项)
222
225
  │ ├── agentic-workflow.md # 协作方式
223
- └── inspiration.md # 灵感来源
226
+ ├── inspiration.md # 灵感来源
227
+ │ ├── musings.md # 杂谈(哲学感悟,不自动加载)
228
+ │ └── skill-index.md # 索引(按需目录,不默认加载)
224
229
  ├── agents/math-critic.md # 数学-工程双重批判器(19 维,含密码学安全审视)
225
230
  ├── commands/ask.md # /ask 手动入口
226
231
  ├── math_book/ # 本地 PDF(不发布)
@@ -235,23 +240,23 @@ math-skill/
235
240
 
236
241
  | # | 书名 | 作者 | 出版社 / 版次 | 年份 | ISBN | 蒸馏文件 |
237
242
  |---|------|------|-------------|------|------|---------|
238
- | 1 | *Contemporary Abstract Algebra* | Joseph A. Gallian | Brooks/Cole, Cengage, 8th ed. | 2013 | 978-1-133-59971-5 | `abstract-algebra.md` |
239
- | 2 | *The Rising Sea: Foundations of Algebraic Geometry* | Ravi Vakil | Princeton University Press | 2025 | 978-0-691-26866-8 | `algebraic-geometry-rising-sea.md` |
240
- | 3 | *Manifolds and Differential Geometry* | Jeffrey M. Lee | AMS, Graduate Studies in Math Vol. 107 | 2009 | 978-0-8218-4815-9 | `differential-geometry.md` |
241
- | 4 | *Matrix Analysis* | Roger A. Horn, Charles R. Johnson | Cambridge University Press, 2nd ed. | 2013 | 978-0-521-83940-2 | `matrix-analysis.md` |
242
- | 5 | *A micro Lie theory for state estimation in robotics* | Joan Solà et al. | arXiv:1812.01537v9 | 2021 | — | `micro-lie-theory.md` |
243
- | 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` |
244
- | 7 | *Introduction to Smooth Manifolds* | John M. Lee | Springer, GTM 218, 2nd ed. | 2013 | 978-1-4419-9981-8 | `smooth-manifolds.md` |
243
+ | 1 | *Contemporary Abstract Algebra* | Joseph A. Gallian | Brooks/Cole, Cengage, 8th ed. | 2013 | 978-1-133-59971-5 | `abstract-algebra.md` / `.en.md` |
244
+ | 2 | *The Rising Sea: Foundations of Algebraic Geometry* | Ravi Vakil | Princeton University Press | 2025 | 978-0-691-26866-8 | `algebraic-geometry-rising-sea.md` / `.en.md` |
245
+ | 3 | *Manifolds and Differential Geometry* | Jeffrey M. Lee | AMS, Graduate Studies in Math Vol. 107 | 2009 | 978-0-8218-4815-9 | `differential-geometry.md` / `.en.md` |
246
+ | 4 | *Matrix Analysis* | Roger A. Horn, Charles R. Johnson | Cambridge University Press, 2nd ed. | 2013 | 978-0-521-83940-2 | `matrix-analysis.md` / `.en.md` |
247
+ | 5 | *A micro Lie theory for state estimation in robotics* | Joan Solà et al. | arXiv:1812.01537v9 | 2021 | — | `micro-lie-theory.md` / `.en.md` |
248
+ | 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` / `.en.md` |
249
+ | 7 | *Introduction to Smooth Manifolds* | John M. Lee | Springer, GTM 218, 2nd ed. | 2013 | 978-1-4419-9981-8 | `smooth-manifolds.md` / `.en.md` |
245
250
 
246
- ### 密码学方向(3 本,v3.2.0 新增)
251
+ ### 密码学方向(3 本)
247
252
 
248
253
  | # | 书名 | 作者 | 出版社 / 版次 | 年份 | ISBN | 蒸馏文件 |
249
254
  |---|------|------|-------------|------|------|---------|
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` |
255
+ | 8 | *A Graduate Course in Applied Cryptography* | Dan Boneh & Victor Shoup | v0.4 在线版 | 2017 | — | `applied-cryptography.md` / `.en.md` |
256
+ | 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` |
257
+ | 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
258
 
254
- > 密码学书稿正文为英文,沿用 `.md` 后缀(不分中英);Domain Router 判定为密码学或 AI×密码交叉时加载。
259
+ > 三份密码学蒸馏稿均已中英配对;按用户主语言选择 `.md` `.en.md`,且仍只在锚点不足或需要书稿深度时加载。
255
260
 
256
261
  蒸馏文件已随 npm 包发布。如需全保真原文,将 PDF 放入 `math_book/` 文件夹即可。
257
262
 
@@ -259,6 +264,39 @@ math-skill/
259
264
 
260
265
  ## 变更日志
261
266
 
267
+ ### v3.3.1 — 文档纪律修复版
268
+
269
+ - **README 目录树补全**:补入 `algebraic-geometry/`、`cryptography/`、`musings.md`、`skill-index.md`,卡片总数标注对齐 37
270
+ - **README 工作流范例纠正**:透镜默认 ≤2、设计模式与锚点分离、第五步改为紧凑审查,与 `SKILL.md` 预算一致
271
+ - **changelog 瘦身**:v1/v2 压缩为一行摘要,移除"37 个 .en.md""16 思想武器"等失真数字
272
+ - **入口话术与计数口径统一**:三处入口对"何时读 `.en` 版"措辞统一;全仓计数统一为 33 共用 + 4 密码 = 37
273
+ - **元数据与工程卫生**:`package.json` description/keywords 瘦身;`CLAUDE.md` 目录树与 Node.js 依赖表述修正;`validate.sh` 新增 20 条文档纪律结构性检查;`original-texts` 加用途标注并修正 v2 旧术语
274
+
275
+ ### v3.3.0 — 路由收敛、双语补全与专业性校正
276
+
277
+ - **权威入口与兼容结构**:新增根 `SKILL.md` / `SKILL.en.md` 作为完整、自足的规范入口;`skills/math-research-activator/SKILL*.md` 缩为薄转发层,继续兼容 Claude/plugin 目录布局,同时避免两份完整正文长期漂移。`commands/ask*`、critic、索引和 overview 的引用均改到根入口。
278
+ - **渐进加载与 token 最小化**:按 A 分析、B 设计、C 查询、D 验证、E 纯工程五类场景设置最小路径;默认限制为 1–2 个透镜、1–3 个锚点和 0–2 个设计原型。概念查询、纯密码任务和普通验证不再默认加载完整 critic、书稿、GPU 清单或目录索引,也不向用户复述内部加载过程。
279
+ - **Domain Router 重写**:从关键词投票改为按“目标对象 + 所求保证”判域;`hashing`、`attack`、`security` 等孤立词不再误触发密码学。纯 AI、纯密码、共用数学和 AI×密码交叉路径明确隔离;交叉四元组只在真正涉及原语/安全性质向 AI 对象迁移时输出。
280
+ - **密码学知识去污染**:四张密码学锚点改用安全定义、攻击游戏、归约损失、构造边界和实现注意事项组织,不再强塞 AI 设计翻译或 GPU 验收;明确标准模型定理、基于原语的归约与 AES 等具体算法经验假设的层级差异,并校正 PRF/PRG/OWF、Feistel、CPA/CCA/AE、KEM/DEM、nonce/IV、密钥分离与组合顺序等表述。
281
+ - **数学概念与工程断言校正**:修正一般投影的 Moore–Penrose 伪逆条件、attention/QKV 与线性投影的边界、KL 散度方向、低秩近似的梯度表述、正交损失的形状/归一化条件,以及抽象代数与几何书稿中的若干过度类比;所有保证、等价、稳定和最优性表述强调成立条件或降级为待验证假设。
282
+ - **密码学书稿完整双语化**:新增 `applied-cryptography.en.md`、`foundations-of-cryptography.en.md`、`introduction-to-modern-cryptography.en.md`。commands、agents、lenses、knowledge-base、design-patterns 与 references 现均保持中英文件配对;按用户主语言只加载一侧,避免双份上下文。
283
+ - **GPU 审查改为相关性驱动**:不再要求每个候选机械覆盖八个维度;先声明 shape、baseline 与部署约束,只评会影响决策的维度,无关项标 `N/A`。要求用 FLOPs、峰值中间张量/状态、字节量、通信量或低精度风险等可核查信号支持判断,并明确“可写成 GEMM”不等于实际更快。
284
+ - **critic 与输出质量收敛**:普通任务使用入口内的紧凑检查,只有论文级或显式全面审查才加载 19 维 critic;现代数学激活维度只在确有迁移声称时强制,密码学优先加载 `knowledge-base/cryptography/` 锚点再按需读书稿,不以 GPU 清单作安全门;探索性候选必须标注假设、边界和证伪方法。
285
+ - **审查后残余一致性修补(发布前)**:兼容入口 description 与根 `SKILL.md` 对齐(补回数学查询触发);索引工作流范例改回默认 ≤2 透镜;CLAUDE/eval 去除过时 Gate 术语并更正 books 双语事实;层上同调 $H^1$ 措辞收紧,避免与层公理混淆。
286
+ - **索引、路由样例与语言规则同步**:更新 `skill-index`、`knowledge-base/overview`、agentic workflow 和 A/B/C/D/E eval 场景,补充假阳性、交叉域、知识缺口与主语言判断边界;代码、路径、公式和英文技术词不参与主语言投票。
287
+ - **测试职责边界清理**:移除仅服务本次审计的六维输出评分和 token/cost 回归规范,保留与 skill 行为直接相关的路由、隔离、双语、引用与语义回归场景。
288
+ - **验证与发布完整性**:Bash/PowerShell 验证覆盖根入口 frontmatter、兼容转发、37 张锚点、中英配对、交叉引用、Domain Router 隔离、Knowledge Gap Protocol、GPU 量化信号和高风险语义回归;npm 包显式包含根 `SKILL*.md`,排除 PDF、`math_book/`、测试与本地 npm 缓存。
289
+
290
+ ### v3.2.1 — 设计哲学修正与可靠性增强
291
+
292
+ - **设计哲学明确化**:`SKILL.md` / `SKILL.en.md` 新增"设计哲学:activator 而非百科"小节,声明 skill 是思考的 activator 和数学锚点,`knowledge-base/` 回归数学结构本身(不固化具体 AI 架构),`design-patterns/` 定位为翻译范式示范而非模板库;新增"兼容性原则"小节,声明对未预置架构的研究问题通过透镜路由 + 锚点激活 + 临时知识卡完成引导
293
+ - **密码学锚点补齐**:新增 `knowledge-base/cryptography/` 目录,含 `prf-prg-owf`、`reduction-proof-template`、`attack-game-framework`、`cca-cpa-ae-hierarchy` 四张锚点卡(中英成对),使 Domain Router 的密码学层加载有实质锚点(修复 v3.2.0 理念不一致:此前声明加载密码学层但无结构化锚点)
294
+ - **代数几何锚点补齐**:新增 `knowledge-base/algebraic-geometry/` 目录,含 `sheaf-cohomology`、`grassmannian-plucker` 两张锚点卡(中英成对),覆盖 `design-patterns/` 已使用但无锚点的数学结构(层上同调、格拉斯曼流形)
295
+ - **测试覆盖扩展**:新增场景 A(问题分析)、场景 D(验证审查)、交叉域路由(AI×密码四元组标注)、Knowledge Gap Protocol、Domain Router 隔离(不污染保证)五类 eval 测试
296
+ - **validate.sh 结构化检查**:新增知识卡六段结构、设计模式 GPU 八维覆盖、Domain Router 隔离与 Knowledge Gap Protocol 关键字段检查
297
+ - **critic 19 维分层**:核心维度 / 情境维度 / 强制维度 / 元维度分层标注,减少 Agent 的认知负担
298
+ - **inspiration.md 拆分**:技术灵感部分(屠龙刀故事)保留;哲学内容(人生最优化等)移至 `musings.md`,避免与 skill 严谨技术风格冲突
299
+
262
300
  ### v3.2.0 — 密码学方向接入 + Domain Router
263
301
 
264
302
  **密码学方向正式落地**:参考层从 7 本扩到 10 本,新增 3 本现代密码学经典蒸馏稿,精简为与 AI 方向书稿一致的激活索引格式(约 125-155 行/本,保留核心思想与关键桥接事实)。
@@ -310,22 +348,19 @@ math-skill/
310
348
  **架构重构**:从"思想武器库"升级为"数学参谋部"——三层正交架构:
311
349
 
312
350
  - **思想透镜**(15 个):从 v2 的"思想武器"瘦身而来,只保留推理方法论,不再混入具体数学知识
313
- - **知识库**(31 张卡片):按数学领域组织的具体工具卡片,含定义/公式/AI 设计翻译/GPU 可行性
351
+ - **知识库**(31 张卡片,v3.2 起扩展至 37):按数学领域组织的具体工具卡片,含定义/公式/AI 设计翻译/GPU 可行性
314
352
  - **设计翻译层**(新增):数学→AI 模块的桥梁,按 AI 组件(attention/loss/routing/representation/compression)组织
315
353
  - **Activator 重写**:从环境信号匹配改为意图诊断(5 场景:分析/设计/查询/验证/工程)
316
354
  - **知识激活协议**:知识卡片固定输出格式(最小定义→公式→适用问题→AI 翻译→工程可行性→风险)
317
355
 
318
356
  ### v2.1.0 — 完整双语支持
319
- - 全面双语(37 个 .en.md 文件)、自动语言路由、命令一致、token 保障
320
-
321
- ### v2.0.1
322
- - 收紧自动触发条件、新增排除门、环境信号收窄
357
+ - 全面双语、自动语言路由、命令一致、token 保障
323
358
 
324
- ### v2.0.0
325
- - 16 思想武器、现代数学激活层、GPU 八维横切
359
+ ### v2.0.0–v2.0.1
360
+ - 16 思想武器(v2 旧名,v3 起改为 15 透镜)、现代数学激活层、GPU 八维横切;收紧自动触发条件与排除门
326
361
 
327
362
  ### v1.0.0
328
- - 初始发布:十五思想武器 + 科研与生活双路径
363
+ - 初始发布:早期"思想武器库 + 科研与生活双路径"形态(已在 v3.0.0 重构为三层架构)
329
364
 
330
365
  ---
331
366
 
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
+ This is the English compatibility entry, loaded only via explicit English command paths (e.g. `/ask` English routing). `SKILL.md` is the canonical Codex entry and can answer in either language. Answer in the user's primary language; technical terms, code, paths, and formulas do not determine language. Do not load both entries simultaneously.
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