math-skill 3.3.1 → 3.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en-US.md +112 -111
- package/README.md +108 -107
- package/bin/math-skill.cjs +276 -0
- package/package.json +8 -1
- package/references/inspiration.en.md +2 -6
- package/references/inspiration.md +3 -7
- package/references/skill-index.en.md +3 -3
- package/references/skill-index.md +3 -3
- package/skills/math-research-activator/original-texts.en.md +2 -2
- package/skills/math-research-activator/original-texts.md +2 -2
package/README.en-US.md
CHANGED
|
@@ -1,60 +1,111 @@
|
|
|
1
|
-
<
|
|
2
|
-
<a href="README.md">中文</a> | <a href="README.en-US.md">English</a>
|
|
3
|
-
</p>
|
|
1
|
+
<div align="center">
|
|
4
2
|
|
|
5
|
-
# 📐 Math Skill
|
|
3
|
+
# 📐 Math Skill
|
|
4
|
+
|
|
5
|
+
### A Mathematical Research Operating System for AI and Cryptography Innovation
|
|
6
|
+
|
|
7
|
+
<a href="README.md">中文</a> | <a href="README.en-US.md">English</a>
|
|
6
8
|
|
|
7
9
|
[](LICENSE)
|
|
8
10
|
[](https://www.npmjs.com/package/math-skill)
|
|
9
11
|
[](https://www.npmjs.com/package/math-skill)
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
> Math Skill does not store mathematics. It activates, routes, and translates mathematics for AI and cryptography research.
|
|
16
|
+
|
|
17
|
+
A math reasoning skill for **Claude Code / Codex / Cursor and more** — automatically activates the right mathematical lenses, knowledge anchors, and design prototypes for AI architecture design, math-to-AI transfer, and cryptographic proof review, delivering conditional, falsifiable conclusions with counterexamples.
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
If this skill inspires you, please consider leaving a Star⭐. Your support keeps the project evolving.
|
|
14
20
|
|
|
15
21
|
---
|
|
16
22
|
|
|
17
|
-
##
|
|
23
|
+
## How is this different from just asking the AI?
|
|
18
24
|
|
|
19
|
-
|
|
25
|
+
### [AI] Case 1: Analysis — "KAN's mathematical foundations and risks"
|
|
20
26
|
|
|
21
|
-
|
|
27
|
+
**User**: "KAN uses learnable B-splines instead of ReLU, claiming better accuracy and interpretability than MLPs. I want to analyze its mathematical foundations and potential risks."
|
|
22
28
|
|
|
23
|
-
|
|
29
|
+
**Without Skill**:
|
|
30
|
+
> KAN is based on the Kolmogorov-Arnold representation theorem, using B-splines as learnable activation functions on edges. Advantages include parameter efficiency and interpretable activations. Risks are mainly that spline computation is slower than ReLU and fine grids may overfit. Suggest running ablation experiments on specific tasks.
|
|
31
|
+
|
|
32
|
+
**With Skill** (activated: Perturbation + Spectral lenses → `low-rank-approximation` anchor):
|
|
33
|
+
|
|
34
|
+
> **Conclusion**: The KA theorem guarantees **existence** of a representation, not **learnability**. Two overlooked mathematical quantities determine KAN's actual performance: the effective rank of the spline basis and the Fisher curvature of the parameter space.
|
|
35
|
+
>
|
|
36
|
+
> - **Existence ≠ Learnability**: The KA theorem guarantees ∑φ_q(∑ψ_{q,p}(x_p)) can represent any continuous function, but—like the universal approximation theorem for MLPs—it does not guarantee that gradient descent finds the representation
|
|
37
|
+
> - **Spline basis effective rank**: B-spline basis functions' support overlap causes effective rank to lag far behind parameter growth; if grids refine but bases remain highly correlated, actual expressive capacity stalls—monitor singular value decay curves, not just parameter counts
|
|
38
|
+
> - **Fisher curvature**: Spline's second-order differentiability makes the Hessian more regular, but the Fisher information matrix's condition number may be far larger than in ReLU networks; natural gradient has theoretical advantages but higher estimation cost
|
|
39
|
+
> - **Falsifiable experiment**: Compare KAN vs. same-parameter-budget MLP on spline basis effective rank decay; if rank growth stalls while parameters keep growing, the "interpretability" advantage is offset by redundancy
|
|
24
40
|
|
|
25
|
-
|
|
41
|
+
### [Crypto] Case 2: Verification — "Is this PRF watermarking reduction tight?"
|
|
26
42
|
|
|
27
|
-
|
|
43
|
+
**User**: "I use a PRF to watermark model weights. The reduction proof says 'removing watermark ≥ breaking PRF'. Is this reduction tight?"
|
|
44
|
+
|
|
45
|
+
**Without Skill**:
|
|
46
|
+
> If removing the watermark is equivalent to distinguishing PRF output from truly random, then the reduction is tight when the PRF security assumption holds. Suggest choosing an AES-based PRF for stronger assumptions.
|
|
47
|
+
|
|
48
|
+
**With Skill** (activated: `reduction-proof-template` + `prf-prg-owf` anchors):
|
|
49
|
+
|
|
50
|
+
> **Conclusion**: The reduction direction is correct, but tightness depends on query count Q and simulation quality—cannot claim "tight" just from "PRF assumption holds."
|
|
51
|
+
>
|
|
52
|
+
> - **Reduction loss**: Adv^scheme ≤ Q · Adv^PRF + δ, where Q is the adversary's query count. If Q grows linearly with model parameters, concrete security degrades significantly—must report Q's magnitude, not just write "polynomial loss"
|
|
53
|
+
> - **Simulation quality**: The reduction must construct simulator B to answer adversary oracle queries; if B's simulation distribution has non-negligible statistical distance from the real game, the entire reduction fails
|
|
54
|
+
> - **Assumption hierarchy**: AES-as-PRF is a widely adopted empirical assumption, not a theorem unconditionally proven from the spec—standard model, ROM, and concrete security are three levels that must not be conflated
|
|
55
|
+
> - **Multi-user degradation**: After deployment, multiple users query independently; birthday bound and hybrid steps amplify advantage loss
|
|
56
|
+
> - **Falsifiable check**: Write out B's complete simulation (parameter generation, query answering, challenge embedding, abort handling), plug in concrete parameters to estimate Q and δ
|
|
28
57
|
|
|
29
58
|
---
|
|
30
59
|
|
|
31
|
-
|
|
60
|
+
## Quick Start
|
|
32
61
|
|
|
33
|
-
|
|
62
|
+
### Installation
|
|
34
63
|
|
|
35
|
-
|
|
64
|
+
**npx** (recommended):
|
|
36
65
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
66
|
+
```bash
|
|
67
|
+
npx -y math-skill@latest install --all
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Or give the project URL to your AI and let it install itself**:
|
|
41
71
|
|
|
42
72
|
```
|
|
43
|
-
|
|
44
|
-
↓
|
|
45
|
-
Thinking Lenses: What perspective fits this problem?
|
|
46
|
-
↓
|
|
47
|
-
Activation Anchors: Which math structures to activate? Enter Knowledge Gap Protocol if insufficient
|
|
48
|
-
↓
|
|
49
|
-
Design Translation: How do these tools become model structures / losses / operators?
|
|
50
|
-
↓
|
|
51
|
-
Critic: Mathematically sound? Engineering-feasible?
|
|
73
|
+
Please help me install math-skill: https://github.com/the-thinker0/math-skill, and show me how to use it
|
|
52
74
|
```
|
|
53
75
|
|
|
76
|
+
> Also supports: `install --codex` / `--claude` (individual), `update --all` (upgrade), `doctor --all` (check for duplicates)
|
|
77
|
+
> The installer automatically excludes the nested `skills/` directory, ensuring only one entry per platform.
|
|
78
|
+
|
|
79
|
+
### Usage
|
|
80
|
+
|
|
81
|
+
**Auto-trigger**: The system auto-diagnoses user intent and routes to the appropriate layer:
|
|
82
|
+
|
|
83
|
+
| Scenario | Signal | Path |
|
|
84
|
+
|----------|--------|------|
|
|
85
|
+
| Analysis | "Is this design sound?" | Lenses → compact review |
|
|
86
|
+
| Design | "Design a new attention" | Lenses → anchors → design translation → compact review |
|
|
87
|
+
| Knowledge query | "How does tangent space relate to gradient optimization?" | Activate anchor |
|
|
88
|
+
| Verification | "Is this reduction tight enough?" | Anchors → conditions/boundaries |
|
|
89
|
+
| Pure engineering | debug, refactoring, tuning | **Not triggered** |
|
|
90
|
+
|
|
91
|
+
**Manual trigger**:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
/ask <your question> # Smart diagnosis: auto-detect scenario and route
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Language
|
|
98
|
+
|
|
99
|
+
Auto-detects Chinese/English: Chinese messages get Chinese output, English messages get English output. Technical terms, code, and formulas do not determine language.
|
|
100
|
+
|
|
54
101
|
---
|
|
55
102
|
|
|
56
103
|
## Three-Layer Orthogonal Architecture
|
|
57
104
|
|
|
105
|
+
```
|
|
106
|
+
Problem → Lenses (what perspective?) → Anchors (which math structures?) → Design Translation (what module?) → Review (does it hold?)
|
|
107
|
+
```
|
|
108
|
+
|
|
58
109
|
| Layer | Role | Directory | Files |
|
|
59
110
|
|-------|------|-----------|-------|
|
|
60
111
|
| **Thinking Lenses** | Diagnose problem structure, recommend math perspectives | `lenses/*.md` | 15 |
|
|
@@ -125,47 +176,13 @@ AI research and cryptography **share** mathematical foundations (probability/inf
|
|
|
125
176
|
|
|
126
177
|
---
|
|
127
178
|
|
|
128
|
-
##
|
|
129
|
-
|
|
130
|
-
### Installation
|
|
131
|
-
|
|
132
|
-
```
|
|
133
|
-
Please help me install math-skill: https://github.com/the-thinker0/math-skill, and show me how to use it
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
Manual Codex install (install the whole repository as one self-contained skill; do not copy only the nested entry):
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
git clone https://github.com/the-thinker0/math-skill.git ~/.codex/skills/math-research-activator
|
|
140
|
-
```
|
|
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
|
-
|
|
144
|
-
### Usage
|
|
145
|
-
|
|
146
|
-
**Auto-trigger**: The system auto-diagnoses user intent and routes to the appropriate layer:
|
|
147
|
-
|
|
148
|
-
| Scenario | Signal | Path |
|
|
149
|
-
|----------|--------|------|
|
|
150
|
-
| Problem Analysis | "Is this design sound?" | Lenses → Critic |
|
|
151
|
-
| Mechanism Design | "Design a new attention" | Lenses → Anchors / Temporary Card → Design → Critic |
|
|
152
|
-
| Knowledge Query | "What is tangent space and how does it relate to gradient optimization?" | Anchors; Knowledge Gap Protocol if insufficient |
|
|
153
|
-
| Verification | "Does this formula hold?" | Anchors / Temporary Card → Critic |
|
|
154
|
-
| Pure Engineering | debug, refactoring, tuning | **Not triggered** |
|
|
155
|
-
|
|
156
|
-
**Manual trigger**:
|
|
157
|
-
|
|
158
|
-
```
|
|
159
|
-
/ask <your question> # Smart diagnosis: auto-detect scenario and route
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### Language Switching
|
|
179
|
+
## Inspiration
|
|
163
180
|
|
|
164
|
-
|
|
181
|
+
The Lie group–Lie algebra machinery invented to solve differential equations ultimately became the universal language for describing symmetry and robot state estimation—the value of mathematical tools far exceeds their original intent. This is the prototype of "cross-domain activation." See [`references/inspiration.en.md`](references/inspiration.en.md).
|
|
165
182
|
|
|
166
183
|
---
|
|
167
184
|
|
|
168
|
-
##
|
|
185
|
+
## Routing Example
|
|
169
186
|
|
|
170
187
|
**User**: "Design a new KV Cache compression method that preserves long-range dependencies without just doing top-k"
|
|
171
188
|
|
|
@@ -256,14 +273,19 @@ math-skill/
|
|
|
256
273
|
| 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
274
|
| 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` |
|
|
258
275
|
|
|
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.
|
|
260
|
-
|
|
261
276
|
Distillation files ship with the npm package. For full-fidelity lookups, place PDFs in the `math_book/` folder.
|
|
262
277
|
|
|
263
278
|
---
|
|
264
279
|
|
|
265
280
|
## Changelog
|
|
266
281
|
|
|
282
|
+
### v3.3.2 — Productization & npx Installer
|
|
283
|
+
|
|
284
|
+
- **npx CLI installer**: Added `bin/math-skill.cjs` supporting `npx -y math-skill@latest install/update/doctor/uninstall`; atomic version replacement, excludes nested `skills/` to prevent double entries, `doctor` checks for duplicates
|
|
285
|
+
- **README product-first restructure**: Centered title + subtitle; demos and Quick Start on first screen (was buried at L128); Star plea moved to top; npm upgraded to npx; platforms tagged with "and more" (not framework-limited)
|
|
286
|
+
- **Case updates**: KAN analysis (AI) + PRF watermark reduction verification (Crypto) replace old FFT/orthogonality-loss cases; "without Skill" answers made realistic; case headers tagged `[AI]`/`[Crypto]`
|
|
287
|
+
- **Changelog compression**: v3.3.0–v3.1.1 compressed from 7-13 points to 5 each (~62% reduction); restored Sophus Lie inspiration section and 4-step flow diagram
|
|
288
|
+
|
|
267
289
|
### v3.3.1 — Documentation-Discipline Patch
|
|
268
290
|
|
|
269
291
|
- **README directory tree completed**: added `algebraic-geometry/`, `cryptography/`, `musings.md`, `skill-index.md`; card total aligned to 37
|
|
@@ -274,56 +296,35 @@ Distillation files ship with the npm package. For full-fidelity lookups, place P
|
|
|
274
296
|
|
|
275
297
|
### v3.3.0 — Routing Convergence, Bilingual Completion & Technical Corrections
|
|
276
298
|
|
|
277
|
-
- **Canonical entry
|
|
278
|
-
- **
|
|
279
|
-
- **
|
|
280
|
-
- **
|
|
281
|
-
- **
|
|
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.
|
|
299
|
+
- **Canonical entry & progressive loading**: Root `SKILL.md`/`SKILL.en.md` become self-contained normative entries; five scenarios (A/B/C/D/E) get minimal load paths (default 1-2 lenses, 1-3 anchors, 0-2 prototypes); concept queries and pure-crypto tasks no longer load full critic/books/GPU checklist by default
|
|
300
|
+
- **Domain Router rewrite**: Switched from keyword voting to "target object + requested guarantee" domain judgment; isolated terms like `hashing`/`attack`/`security` no longer trigger crypto false positives; pure-AI, pure-crypto, shared-math, and AI×crypto paths explicitly isolated
|
|
301
|
+
- **Crypto decontamination & math corrections**: Four crypto anchors reorganized around security definitions/attack games/reduction loss, no forced AI translations or GPU gates; corrected projection pseudoinverse conditions, KL directionality, low-rank gradient claims, orthogonality-loss formula; all guarantees/equivalence/optimality claims now state conditions
|
|
302
|
+
- **Bilingual & GPU review convergence**: Crypto books completed in Chinese-English pairs; GPU review switched to relevance-driven (assess only decision-relevant dimensions, mark others N/A); ordinary tasks use compact checks, 19-dim critic reserved for paper-grade review
|
|
303
|
+
- **Index, eval & validation sync**: Updated skill-index/overview/agentic-workflow and A/B/C/D/E eval scenarios; Bash/PowerShell validation covers frontmatter, 37 anchor pairs, cross-references, Domain Router isolation
|
|
289
304
|
|
|
290
305
|
### v3.2.1 — Design Philosophy Refinement & Reliability Enhancement
|
|
291
306
|
|
|
292
|
-
- **Design philosophy
|
|
293
|
-
- **
|
|
294
|
-
- **
|
|
295
|
-
- **
|
|
296
|
-
- **
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
**
|
|
303
|
-
|
|
304
|
-
- **
|
|
305
|
-
- `references/books/applied-cryptography.md` (Boneh & Shoup): attack games / reduction proofs / constructions / protocols
|
|
306
|
-
- `references/books/foundations-of-cryptography.md` (Goldreich): computational indistinguishability / OWF-PRG-PRF equivalence chain / simulation paradigm / meta-theorems
|
|
307
|
-
- `references/books/introduction-to-modern-cryptography.md` (Katz & Lindell): formal definitions / CPA-CCA-AE / construction paradigms / implementation pitfalls
|
|
308
|
-
- **Domain Router** (core innovation): after intent diagnosis and before lens invocation, judges problem domain (AI/Crypto/pure-math/intersection), loads domain-specific content, shared math not redundantly loaded, avoids cross-domain pollution and token waste
|
|
309
|
-
- **SKILL.md / SKILL.en.md**: new Domain Router section + routing rules + decision flow diagram; main workflow integrates domain tags and domain-specific routing (AI uses design-patterns + GPU gate; crypto uses reduction templates + assumption/pitfall checks)
|
|
310
|
-
- **math-critic upgraded to 19 dimensions**: new dim 19 "Cryptographic Security Review" (security definitions / reduction tightness / assumption dependency / composition pitfalls / anti-patterns / cross-domain transfer validity / Domain Router consistency)
|
|
311
|
-
- **skill-index / overview**: added Domain Router overview table and crypto book activation-family tags; overview gained Domain Router loading note
|
|
312
|
-
- **Token optimization**: crypto books compressed from 2084 to 404 lines (~80% reduction); Domain Router trims output by domain, avoiding full-load; output format emphasizes "after domain judgment, only expand the domain-specific subsection". Quantified estimate: pure AI problems skip the 3 crypto books entirely (saving ~400 lines/call), pure crypto problems skip all 22 AI design-patterns (saving ~2200-3300 lines/call); the crypto books' own compression saves another ~872 lines/call
|
|
313
|
-
- **File cleanup**: removed duplicate `SKILL.md/SKILL.en.md/original-texts.md/original-texts.en.md` mistakenly placed in repo root by the contributor (canonical versions live in `skills/math-research-activator/`); fixed SKILL relative paths in `agents/math-critic.{en,}.md` and `knowledge-base/overview.en.md`
|
|
314
|
-
- **AI/Cryptography isolation guarantee**: Domain Router rule 4 explicitly states "pure AI problems do not load crypto books; pure crypto problems do not load AI design patterns," preventing conceptual confusion at the loading layer
|
|
307
|
+
- **Design philosophy clarified**: Skill declared as a thinking activator, not an encyclopedia; `knowledge-base/` returns to mathematical structures (not fixed AI architectures); `design-patterns/` positioned as translation-paradigm demos, not template library
|
|
308
|
+
- **Crypto & algebraic-geometry anchors backfilled**: Added `knowledge-base/cryptography/` (4 cards) and `knowledge-base/algebraic-geometry/` (2 cards), giving Domain Router substantive crypto anchors
|
|
309
|
+
- **Testing & validation expanded**: Added scenario A/D eval, cross-domain routing, Knowledge Gap Protocol, Domain Router isolation tests; validate.sh checks card six-section structure and GPU eight-dimension coverage
|
|
310
|
+
- **Critic 19-dim layering**: Core/contextual/mandatory/meta four-tier labeling, reducing agent cognitive burden
|
|
311
|
+
- **inspiration.md split**: Technical inspiration retained; philosophical content moved to `musings.md`
|
|
312
|
+
|
|
313
|
+
### v3.2.0 — Cryptography Direction + Domain Router
|
|
314
|
+
|
|
315
|
+
- **3 crypto books added**: Boneh & Shoup, Goldreich, Katz & Lindell distillations (bilingual pairs), compressed to ~125-155 lines/book activation-index format
|
|
316
|
+
- **Domain Router routing layer**: After intent diagnosis, before lens invocation, judges problem domain (AI/crypto/pure-math/intersection), loads domain-specific content, shared math not redundantly loaded
|
|
317
|
+
- **math-critic upgraded to 19 dims**: New crypto security review dimension (security definitions/reduction tightness/assumption dependency/composition pitfalls/anti-patterns/cross-domain transfer)
|
|
318
|
+
- **Token optimization**: Crypto books compressed from 2084 to 404 lines (~80%); pure-AI problems skip crypto books (saving ~400 lines/call), pure-crypto problems skip AI design-patterns (saving ~2200 lines/call)
|
|
319
|
+
- **AI & cryptography isolation**: Domain Router explicitly states "pure-AI problems do not load crypto books; pure-crypto problems do not load AI design patterns"
|
|
315
320
|
|
|
316
321
|
### v3.1.1 — Terminology Consistency Cleanup
|
|
317
322
|
|
|
318
|
-
- **skill-index
|
|
319
|
-
- **
|
|
320
|
-
- **
|
|
321
|
-
- **README
|
|
322
|
-
- **
|
|
323
|
-
- **README activation anchors table**: column header changed from "Cards" to "Anchors"
|
|
324
|
-
- **SKILL.md / SKILL.en.md**: three-layer architecture table and intent diagnosis table updated from "Math Knowledge" to "Activation Anchors"
|
|
325
|
-
- **English README book links**: distillation files changed from `.md` to `.en.md`
|
|
326
|
-
- **validate keywords**: checks updated from "Math Knowledge" to "Activation Anchors"
|
|
323
|
+
- **"Activation anchors" caliber unified**: skill-index, README, SKILL.md "math knowledge/knowledge cards" uniformly changed to "activation anchors"
|
|
324
|
+
- **README corrections**: Workflow example step 3 from "knowledge query" to "activation anchors"; `leverage-score-selection` label corrected
|
|
325
|
+
- **SKILL.md architecture table update**: Three-layer architecture table and intent diagnosis table terminology aligned
|
|
326
|
+
- **English README book links**: Distillation files changed from `.md` to `.en.md`
|
|
327
|
+
- **validate keywords**: Changed from "math knowledge" to "activation anchors"
|
|
327
328
|
|
|
328
329
|
### v3.1.0 — Activation Anchors & Knowledge Gap Protocol
|
|
329
330
|
|
package/README.md
CHANGED
|
@@ -1,60 +1,111 @@
|
|
|
1
|
-
<
|
|
2
|
-
<a href="README.md">中文</a> | <a href="README.en-US.md">English</a>
|
|
3
|
-
</p>
|
|
1
|
+
<div align="center">
|
|
4
2
|
|
|
5
|
-
# 📐 Math Skill
|
|
3
|
+
# 📐 Math Skill
|
|
4
|
+
|
|
5
|
+
### 面向 AI 与密码学创新的数学研究操作系统
|
|
6
|
+
|
|
7
|
+
<a href="README.md">中文</a> | <a href="README.en-US.md">English</a>
|
|
6
8
|
|
|
7
9
|
[](LICENSE)
|
|
8
10
|
[](https://www.npmjs.com/package/math-skill)
|
|
9
11
|
[](https://www.npmjs.com/package/math-skill)
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
> Math Skill 不存储数学,它激活数学、路由数学,并把数学翻译成 AI 与密码学研究设计。
|
|
16
|
+
|
|
17
|
+
面向 **Claude Code / Codex / Cursor 等** 的数学推理技能——在 AI 架构设计、数学结构迁移和密码学证明审查中,自动激活正确的数学透镜、知识锚点和设计原型,给出带条件、带反例、可证伪的结论。
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
如果这个 skill 对你有启发,欢迎点亮一颗 Star⭐。你的支持是项目持续打磨的动力。
|
|
14
20
|
|
|
15
21
|
---
|
|
16
22
|
|
|
17
|
-
##
|
|
23
|
+
## 它和直接问 AI 有什么区别?
|
|
18
24
|
|
|
19
|
-
|
|
25
|
+
### 【AI】案例 1:分析——"KAN 的数学基础和风险"
|
|
20
26
|
|
|
21
|
-
|
|
27
|
+
**用户**:"KAN 用可学习 B-spline 替代 ReLU,声称比 MLP 更准确且可解释。我想分析它的数学基础和潜在风险。"
|
|
28
|
+
|
|
29
|
+
**不调用 Skill**:
|
|
30
|
+
> KAN 基于 Kolmogorov-Arnold 表示定理,用 B-spline 作为可学习激活函数放在边上。优点是参数效率高、激活函数可解释。风险主要是 spline 计算比 ReLU 慢、grid 过细可能过拟合。建议在具体任务上做消融实验。
|
|
31
|
+
|
|
32
|
+
**调用 Skill 后**(激活:扰动 + 谱分解透镜 → `low-rank-approximation` 锚点):
|
|
33
|
+
|
|
34
|
+
> **结论**:KA 定理保证表达能力的**存在性**,不保证**可学习性**。决定 KAN 实际性能的两个被忽视的数学量是 spline 基的有效秩和参数空间的 Fisher 曲率。
|
|
35
|
+
>
|
|
36
|
+
> - **存在性 ≠ 可学习性**:KA 定理保证 ∑φ_q(∑ψ_{q,p}(x_p)) 可表示任意连续函数,但与 MLP 的万能逼近定理一样,不保证梯度下降能找到该表示
|
|
37
|
+
> - **Spline 基有效秩**:B-spline 基函数的支撑重叠导致 effective rank 远低于参数增长;若 grid 细化但基函数高度相关,实际表达能力增长停滞——需监控奇异值衰减曲线而非只看参数量
|
|
38
|
+
> - **Fisher 曲率**:spline 的二阶可导使 Hessian 更规则,但 Fisher 信息矩阵的 condition number 可能远大于 ReLU 网络;natural gradient 有理论优势但估计成本更高
|
|
39
|
+
> - **可证伪实验**:比较 KAN 与同参数预算 MLP 的 spline 基有效秩衰减;若 rank 增长停滞而参数持续增长,则"可解释"优势被冗余抵消
|
|
22
40
|
|
|
23
|
-
|
|
41
|
+
### 【密码学】案例 2:验证——"PRF 水印归约的紧度"
|
|
24
42
|
|
|
25
|
-
|
|
43
|
+
**用户**:"我用 PRF 给模型权重加水印,归约证明说'去水印 ≥ 破 PRF'。这个归约 tight 吗?"
|
|
26
44
|
|
|
27
|
-
|
|
45
|
+
**不调用 Skill**:
|
|
46
|
+
> 如果去水印的难度等价于区分 PRF 输出和真随机,那么在水印方案依赖的 PRF 安全假设成立时,归约是紧的。建议选择 AES-based PRF 以确保假设强度。
|
|
47
|
+
|
|
48
|
+
**调用 Skill 后**(激活:`reduction-proof-template` + `prf-prg-owf` 锚点):
|
|
49
|
+
|
|
50
|
+
> **结论**:归约方向正确,但紧度取决于查询数 Q 和模拟质量,不能仅凭"假设 PRF 安全"就声称紧归约。
|
|
51
|
+
>
|
|
52
|
+
> - **归约损失**:Adv^scheme ≤ Q · Adv^PRF + δ,其中 Q 是敌手查询数。若 Q 随模型参数量线性增长,具体安全参数显著退化——必须报告 Q 的量级,不能只写"多项式损失"
|
|
53
|
+
> - **模拟质量**:归约须构造模拟器 B 回答敌手 oracle 查询;若 B 的模拟分布与真实游戏统计距离不可忽略,整个归约失效
|
|
54
|
+
> - **假设层级**:AES 当 PRF 是广泛采用的经验假设,不是从规范无条件证明的定理——标准模型、ROM、具体安全三个层级不能混用
|
|
55
|
+
> - **多用户退化**:模型部署后多用户独立查询,birthday bound 和 hybrid 步数放大优势损失
|
|
56
|
+
> - **可证伪检查**:写出 B 的完整模拟(参数生成、查询回答、挑战嵌入、abort 处理),代入具体参数估计 Q 和 δ
|
|
28
57
|
|
|
29
58
|
---
|
|
30
59
|
|
|
31
|
-
|
|
60
|
+
## 快速开始
|
|
61
|
+
|
|
62
|
+
### 安装
|
|
32
63
|
|
|
33
|
-
|
|
64
|
+
**npx**(推荐):
|
|
34
65
|
|
|
35
|
-
|
|
66
|
+
```bash
|
|
67
|
+
npx -y math-skill@latest install --all
|
|
68
|
+
```
|
|
36
69
|
|
|
37
|
-
|
|
38
|
-
2. **应该激活哪些数学结构?** → 激活锚点 / 临时知识卡
|
|
39
|
-
3. **怎么把数学变成模型设计?** → 设计翻译原型
|
|
40
|
-
4. **这个设计是否数学上靠谱、工程上可行?** → 批判器
|
|
70
|
+
**或把项目地址丢给 AI,让它自行安装**:
|
|
41
71
|
|
|
42
72
|
```
|
|
43
|
-
|
|
44
|
-
↓
|
|
45
|
-
思想透镜:这个问题该用什么视角看?
|
|
46
|
-
↓
|
|
47
|
-
激活锚点:应该激活哪些数学结构?不足时进入知识缺口协议
|
|
48
|
-
↓
|
|
49
|
-
设计翻译:这些工具怎么变成模型结构 / loss / 算子?
|
|
50
|
-
↓
|
|
51
|
-
批判器:数学上站得住、工程上跑得动吗?
|
|
73
|
+
请帮我安装 math-skill:https://github.com/the-thinker0/math-skill,并教我如何使用
|
|
52
74
|
```
|
|
53
75
|
|
|
76
|
+
> 也支持:`install --codex` / `--claude`(单独)、`update --all`(更新)、`doctor --all`(检查重复入口)
|
|
77
|
+
> 安装器自动排除内层 `skills/` 目录,保证每个平台只有一个入口。
|
|
78
|
+
|
|
79
|
+
### 使用
|
|
80
|
+
|
|
81
|
+
**自动触发**:系统自动诊断用户意图,路由到合适的层:
|
|
82
|
+
|
|
83
|
+
| 场景 | 诊断信号 | 调用路径 |
|
|
84
|
+
|------|---------|---------|
|
|
85
|
+
| 问题分析 | "这个设计合理吗?" | 透镜 → 紧凑审查 |
|
|
86
|
+
| 机制设计 | "设计新 attention" | 透镜 → 锚点 → 设计翻译 → 紧凑审查 |
|
|
87
|
+
| 知识查询 | "切空间和梯度优化有什么关系?" | 激活锚点 |
|
|
88
|
+
| 验证审查 | "这个归约的 tightness 够吗?" | 锚点 → 条件/边界 |
|
|
89
|
+
| 纯工程 | debug、重构、调参 | **不触发** |
|
|
90
|
+
|
|
91
|
+
**手动触发**:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
/ask <你的问题> # 智能诊断:自动判断场景并路由
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 语言
|
|
98
|
+
|
|
99
|
+
自动检测中英文:中文消息返回中文输出,英文消息返回英文输出。技术词、代码、公式不决定语言。
|
|
100
|
+
|
|
54
101
|
---
|
|
55
102
|
|
|
56
103
|
## 三层正交架构
|
|
57
104
|
|
|
105
|
+
```
|
|
106
|
+
问题 → 透镜(用什么视角看?)→ 锚点(激活哪些数学结构?)→ 设计翻译(变成什么模块?)→ 审查(站得住吗?)
|
|
107
|
+
```
|
|
108
|
+
|
|
58
109
|
| 层 | 职责 | 目录 | 文件数 |
|
|
59
110
|
|----|------|------|--------|
|
|
60
111
|
| **思想透镜** | 诊断问题结构,推荐数学视角 | `lenses/*.md` | 15 |
|
|
@@ -125,47 +176,13 @@ AI 研究与密码学**共享**数学根基(概率/信息/代数/矩阵/谱/
|
|
|
125
176
|
|
|
126
177
|
---
|
|
127
178
|
|
|
128
|
-
##
|
|
179
|
+
## 灵感
|
|
129
180
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
```
|
|
133
|
-
请帮我安装 math-skill:https://github.com/the-thinker0/math-skill,并教我如何使用
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
Codex 手动安装(把整个仓库作为一个自足 skill,而不是只复制内层目录):
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
git clone https://github.com/the-thinker0/math-skill.git ~/.codex/skills/math-research-activator
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
根 `SKILL.md` 是 Codex 权威入口;`skills/math-research-activator/SKILL.md` 只是 Claude/plugin 风格兼容入口并转发到根文件。不要单独复制内层目录,否则它引用的知识库与设计模式不完整。
|
|
143
|
-
|
|
144
|
-
### 使用
|
|
145
|
-
|
|
146
|
-
**自动触发**:系统自动诊断用户意图,路由到合适的层:
|
|
147
|
-
|
|
148
|
-
| 场景 | 诊断信号 | 调用路径 |
|
|
149
|
-
|------|---------|---------|
|
|
150
|
-
| 问题分析 | "这个设计合理吗?" | 透镜 → critic |
|
|
151
|
-
| 机制设计 | "设计新 attention" | 透镜 → 激活锚点/临时知识卡 → 设计翻译 → critic |
|
|
152
|
-
| 知识查询 | "切空间和梯度优化有什么关系?" | 激活锚点;不足则 Knowledge Gap Protocol |
|
|
153
|
-
| 验证审查 | "这个公式成立吗?" | 激活锚点/临时知识卡 → critic |
|
|
154
|
-
| 纯工程 | debug、重构、调参 | **不调用** |
|
|
155
|
-
|
|
156
|
-
**手动触发**:
|
|
157
|
-
|
|
158
|
-
```
|
|
159
|
-
/ask <你的问题> # 智能诊断:自动判断场景并路由
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### 语言切换
|
|
163
|
-
|
|
164
|
-
自动检测用户语言:中文消息返回中文输出,英文消息返回英文输出。
|
|
181
|
+
为解微分方程发明的李群-李代数,最终成为描述对称性和机器人状态估计的通用语言——数学工具的价值远超初衷,这正是「跨领域激活」的原型。详见 [`references/inspiration.md`](references/inspiration.md)。
|
|
165
182
|
|
|
166
183
|
---
|
|
167
184
|
|
|
168
|
-
##
|
|
185
|
+
## 路由范例
|
|
169
186
|
|
|
170
187
|
**用户**:"设计新的 KV Cache 压缩方法,保留长期依赖,不想只做 top-k"
|
|
171
188
|
|
|
@@ -256,14 +273,19 @@ math-skill/
|
|
|
256
273
|
| 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
274
|
| 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` |
|
|
258
275
|
|
|
259
|
-
> 三份密码学蒸馏稿均已中英配对;按用户主语言选择 `.md` 或 `.en.md`,且仍只在锚点不足或需要书稿深度时加载。
|
|
260
|
-
|
|
261
276
|
蒸馏文件已随 npm 包发布。如需全保真原文,将 PDF 放入 `math_book/` 文件夹即可。
|
|
262
277
|
|
|
263
278
|
---
|
|
264
279
|
|
|
265
280
|
## 变更日志
|
|
266
281
|
|
|
282
|
+
### v3.3.2 — 产品化与 npx 安装器
|
|
283
|
+
|
|
284
|
+
- **npx CLI 安装器**:新增 `bin/math-skill.cjs`,支持 `npx -y math-skill@latest install/update/doctor/uninstall`;原子替换旧版、排除内层 `skills/` 防双入口、`doctor` 检查重复入口
|
|
285
|
+
- **README 产品化重构**:标题居中 + 副标题;首屏放案例和 Quick Start(原埋在 L128);Star 求赞移至开头;npm 安装升级为 npx 首选;平台加"等"不限制框架
|
|
286
|
+
- **案例更新**:KAN 分析(AI)+ PRF 水印归约验证(密码学)替换旧 FFT/正交损失案例;"不调用 Skill"回答改为真实合理输出;案例标题加 `【AI】`/`【密码学】` 域标签
|
|
287
|
+
- **changelog 浓缩**:v3.3.0–v3.1.1 各版本从 7-13 点压缩至 5 点(~62% 篇幅缩减);恢复 Sophus Lie 灵感小节和四步流程图
|
|
288
|
+
|
|
267
289
|
### v3.3.1 — 文档纪律修复版
|
|
268
290
|
|
|
269
291
|
- **README 目录树补全**:补入 `algebraic-geometry/`、`cryptography/`、`musings.md`、`skill-index.md`,卡片总数标注对齐 37
|
|
@@ -274,56 +296,35 @@ math-skill/
|
|
|
274
296
|
|
|
275
297
|
### v3.3.0 — 路由收敛、双语补全与专业性校正
|
|
276
298
|
|
|
277
|
-
-
|
|
278
|
-
-
|
|
279
|
-
-
|
|
280
|
-
-
|
|
281
|
-
-
|
|
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 缓存。
|
|
299
|
+
- **权威入口与渐进加载**:根 `SKILL.md`/`SKILL.en.md` 成为自足规范入口;五类场景设最小加载路径(默认 1-2 透镜、1-3 锚点、0-2 模式),概念查询与纯密码任务不再默认加载完整 critic/书稿/GPU 清单
|
|
300
|
+
- **Domain Router 重写**:从关键词投票改为按"目标对象 + 所求保证"判域;`hashing`/`attack`/`security` 等孤立词不再误触发密码学;纯 AI、纯密码、共用数学和 AI×密码交叉路径明确隔离
|
|
301
|
+
- **密码学去污染与数学校正**:四张密码学锚点改用安全定义/攻击游戏/归约损失组织,不再强塞 AI 翻译或 GPU 验收;修正投影伪逆条件、KL 方向、低秩梯度表述、正交损失公式等过度类比;所有保证/等价/最优表述强调成立条件
|
|
302
|
+
- **双语与 GPU 审查收敛**:密码学书稿完整中英配对;GPU 审查改为相关性驱动(只评决策相关维度,无关项标 N/A);普通任务用紧凑检查,19 维 critic 仅论文级审查加载
|
|
303
|
+
- **索引、eval 与验证同步**:更新 skill-index/overview/agentic-workflow 和 A/B/C/D/E eval 场景;Bash/PowerShell 验证覆盖 frontmatter、37 锚点配对、交叉引用、Domain Router 隔离等
|
|
289
304
|
|
|
290
305
|
### v3.2.1 — 设计哲学修正与可靠性增强
|
|
291
306
|
|
|
292
|
-
-
|
|
293
|
-
-
|
|
294
|
-
-
|
|
295
|
-
-
|
|
296
|
-
- **
|
|
297
|
-
- **critic 19 维分层**:核心维度 / 情境维度 / 强制维度 / 元维度分层标注,减少 Agent 的认知负担
|
|
298
|
-
- **inspiration.md 拆分**:技术灵感部分(屠龙刀故事)保留;哲学内容(人生最优化等)移至 `musings.md`,避免与 skill 严谨技术风格冲突
|
|
307
|
+
- **设计哲学明确化**:声明 skill 是思考的 activator 而非百科;`knowledge-base/` 回归数学结构本身(不固化 AI 架构),`design-patterns/` 定位为翻译范式示范而非模板库
|
|
308
|
+
- **密码学与代数几何锚点补齐**:新增 `knowledge-base/cryptography/`(4 卡)与 `knowledge-base/algebraic-geometry/`(2 卡),使 Domain Router 密码学层有实质锚点
|
|
309
|
+
- **测试与验证扩展**:新增场景 A/D eval、交叉域路由、Knowledge Gap Protocol、Domain Router 隔离测试;validate.sh 增加知识卡六段结构与 GPU 八维覆盖检查
|
|
310
|
+
- **critic 19 维分层**:核心/情境/强制/元四层标注,减少 Agent 认知负担
|
|
311
|
+
- **inspiration.md 拆分**:技术灵感保留,哲学内容移至 `musings.md`
|
|
299
312
|
|
|
300
313
|
### v3.2.0 — 密码学方向接入 + Domain Router
|
|
301
314
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
- `references/books/introduction-to-modern-cryptography.md`(Katz & Lindell):形式化定义/CPA-CCA-AE/构造范式/实现陷阱
|
|
308
|
-
- **Domain Router 路由层**(核心创新):在意图诊断后、透镜调用前判定问题 domain(AI/密码/纯数学/交叉),按 domain 加载专属内容,共用数学不重复加载,避免跨域污染与 token 浪费
|
|
309
|
-
- **SKILL.md / SKILL.en.md**:新增 Domain Router 小节 + 路由规则 + 判定流程图;主流程整合 domain 标注与 domain-specific 路由(AI 走 design-patterns + GPU 门,密码走归约模板 + 假设/陷阱检查)
|
|
310
|
-
- **math-critic 升级为 19 维**:新增第 19 维「密码学安全审视」(安全定义/归约紧度/假设依赖/合成陷阱/反模式/跨域迁移合理性/Domain Router 一致性)
|
|
311
|
-
- **skill-index / overview**:补 Domain Router 总览表与密码学书稿激活家族标注;overview 增 Domain Router 加载提示
|
|
312
|
-
- **Token 优化**:密码学书稿从 2084 行精简到 404 行(压缩 ~80%);Domain Router 按 domain 裁剪输出,避免全量加载;输出格式强调"domain 判定后只展开该 domain 专属小节"。量化估算:纯 AI 问题完全不加载 3 本密码学书稿(省约 400 行/次),纯密码学问题完全不加载 22 个 AI design-patterns(省约 2200-3300 行/次);密码学书稿本身的精简再省约 872 行/次
|
|
313
|
-
- **文件清理**:删除朋友误放在根目录的重复 `SKILL.md/SKILL.en.md/original-texts.md/original-texts.en.md`(权威版本在 `skills/math-research-activator/`);修正 `agents/math-critic.{en,}.md` 与 `knowledge-base/overview.en.md` 中的 SKILL 相对路径
|
|
314
|
-
- **AI 与密码学隔离保证**:Domain Router 规则 4 明确"纯 AI 问题不加载密码学书稿;纯密码学问题不加载 AI 设计模式",从加载层防止概念混淆
|
|
315
|
+
- **新增 3 本密码学书稿**:Boneh & Shoup、Goldreich、Katz & Lindell 蒸馏稿(中英成对),精简为 ~125-155 行/本的激活索引格式
|
|
316
|
+
- **Domain Router 路由层**:意图诊断后、透镜前判定问题 domain(AI/密码/纯数学/交叉),按 domain 加载专属内容,共用数学不重复加载,避免跨域污染
|
|
317
|
+
- **math-critic 升级 19 维**:新增密码学安全审视维度(安全定义/归约紧度/假设依赖/合成陷阱/反模式/跨域迁移)
|
|
318
|
+
- **Token 优化**:密码学书稿从 2084 行精简到 404 行(~80%);纯 AI 问题不加载密码书稿(省 ~400 行/次),纯密码不加载 AI 设计模式(省 ~2200 行/次)
|
|
319
|
+
- **AI 与密码学隔离**:Domain Router 明确"纯 AI 不加载密码学书稿;纯密码不加载 AI 设计模式"
|
|
315
320
|
|
|
316
321
|
### v3.1.1 — 术语闭环清洁
|
|
317
322
|
|
|
318
|
-
- **skill-index
|
|
319
|
-
- **
|
|
320
|
-
- **
|
|
321
|
-
- **README 工作流范例**:第三步从"知识查询"改为"激活锚点",`leverage-score-selection` 标签从"矩阵分析"改为"压缩设计模式"
|
|
322
|
-
- **README 目录结构**:`knowledge-base/` 注释从"数学知识库"改为"激活锚点"
|
|
323
|
-
- **README 激活锚点表头**:列名从"知识卡片"改为"锚点"
|
|
324
|
-
- **SKILL.md / SKILL.en.md**:三层架构表和意图诊断表从"数学知识/Math Knowledge"改为"激活锚点/Activation Anchors"
|
|
323
|
+
- **"激活锚点"口径统一**:skill-index、README、SKILL.md 中"数学知识/知识卡片"统一改为"激活锚点"
|
|
324
|
+
- **README 纠正**:工作流范例第三步从"知识查询"改为"激活锚点";`leverage-score-selection` 标签修正
|
|
325
|
+
- **SKILL.md 架构表更新**:三层架构表和意图诊断表术语对齐
|
|
325
326
|
- **英文 README 书目链接**:蒸馏文件从 `.md` 改为 `.en.md`
|
|
326
|
-
- **validate
|
|
327
|
+
- **validate 关键词**:从"数学知识"改为"激活锚点"
|
|
327
328
|
|
|
328
329
|
### v3.1.0 — 激活锚点与知识缺口协议
|
|
329
330
|
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const fs = require('node:fs');
|
|
5
|
+
const fsp = fs.promises;
|
|
6
|
+
const os = require('node:os');
|
|
7
|
+
const path = require('node:path');
|
|
8
|
+
|
|
9
|
+
const PACKAGE_ROOT = path.resolve(__dirname, '..');
|
|
10
|
+
const PACKAGE_JSON = require(path.join(PACKAGE_ROOT, 'package.json'));
|
|
11
|
+
|
|
12
|
+
const SKILL_NAME = 'math-research-activator';
|
|
13
|
+
const INSTALL_MARKER = '.math-skill-install.json';
|
|
14
|
+
|
|
15
|
+
const INSTALL_ENTRIES = [
|
|
16
|
+
'SKILL.md',
|
|
17
|
+
'SKILL.en.md',
|
|
18
|
+
'LICENSE',
|
|
19
|
+
'commands',
|
|
20
|
+
'lenses',
|
|
21
|
+
'design-patterns',
|
|
22
|
+
'agents',
|
|
23
|
+
'knowledge-base',
|
|
24
|
+
'references',
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
const HOME = os.homedir();
|
|
28
|
+
|
|
29
|
+
const PLATFORMS = {
|
|
30
|
+
codex: {
|
|
31
|
+
baseDir: path.join(HOME, '.codex'),
|
|
32
|
+
skillsDir: path.join(HOME, '.codex', 'skills'),
|
|
33
|
+
},
|
|
34
|
+
claude: {
|
|
35
|
+
baseDir: path.join(HOME, '.claude'),
|
|
36
|
+
skillsDir: path.join(HOME, '.claude', 'skills'),
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
function printUsage() {
|
|
41
|
+
console.log(`
|
|
42
|
+
Math Skill ${PACKAGE_JSON.version}
|
|
43
|
+
|
|
44
|
+
Usage:
|
|
45
|
+
math-skill install [--codex|--claude|--all]
|
|
46
|
+
math-skill update [--codex|--claude|--all]
|
|
47
|
+
math-skill doctor [--codex|--claude|--all]
|
|
48
|
+
math-skill uninstall [--codex|--claude|--all]
|
|
49
|
+
|
|
50
|
+
Recommended install:
|
|
51
|
+
npx -y math-skill@latest install --all
|
|
52
|
+
|
|
53
|
+
Recommended update:
|
|
54
|
+
npx -y math-skill@latest update --all
|
|
55
|
+
`);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function exists(filePath) {
|
|
59
|
+
try {
|
|
60
|
+
await fsp.access(filePath);
|
|
61
|
+
return true;
|
|
62
|
+
} catch {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
async function readSkillName(skillFile) {
|
|
68
|
+
try {
|
|
69
|
+
const content = await fsp.readFile(skillFile, 'utf8');
|
|
70
|
+
const frontmatter = content.match(/^---\s*\r?\n([\s\S]*?)\r?\n---/);
|
|
71
|
+
if (!frontmatter) return null;
|
|
72
|
+
const nameMatch = frontmatter[1].match(/^name:\s*['"]?([^'"\r\n]+)['"]?\s*$/m);
|
|
73
|
+
return nameMatch ? nameMatch[1].trim() : null;
|
|
74
|
+
} catch {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
async function selectPlatforms(args) {
|
|
80
|
+
if (args.includes('--all')) return ['codex', 'claude'];
|
|
81
|
+
const selected = [];
|
|
82
|
+
if (args.includes('--codex')) selected.push('codex');
|
|
83
|
+
if (args.includes('--claude')) selected.push('claude');
|
|
84
|
+
if (selected.length > 0) return selected;
|
|
85
|
+
const detected = [];
|
|
86
|
+
for (const [name, config] of Object.entries(PLATFORMS)) {
|
|
87
|
+
if (await exists(config.baseDir)) detected.push(name);
|
|
88
|
+
}
|
|
89
|
+
if (detected.length > 0) return detected;
|
|
90
|
+
throw new Error('No Codex or Claude Code detected. Use --codex, --claude, or --all.');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
async function copyRuntime(tempDir) {
|
|
94
|
+
await fsp.mkdir(tempDir, { recursive: true });
|
|
95
|
+
for (const entry of INSTALL_ENTRIES) {
|
|
96
|
+
const source = path.join(PACKAGE_ROOT, entry);
|
|
97
|
+
if (!(await exists(source))) continue;
|
|
98
|
+
await fsp.cp(source, path.join(tempDir, entry), {
|
|
99
|
+
recursive: true, force: true, errorOnExist: false,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
const marker = {
|
|
103
|
+
package: PACKAGE_JSON.name,
|
|
104
|
+
version: PACKAGE_JSON.version,
|
|
105
|
+
skillName: SKILL_NAME,
|
|
106
|
+
installedAt: new Date().toISOString(),
|
|
107
|
+
};
|
|
108
|
+
await fsp.writeFile(path.join(tempDir, INSTALL_MARKER), JSON.stringify(marker, null, 2) + '\n', 'utf8');
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
async function findSkillFiles(rootDir, maxDepth = 5) {
|
|
112
|
+
const results = [];
|
|
113
|
+
async function walk(currentDir, depth) {
|
|
114
|
+
if (depth > maxDepth || !(await exists(currentDir))) return;
|
|
115
|
+
const entries = await fsp.readdir(currentDir, { withFileTypes: true });
|
|
116
|
+
for (const entry of entries) {
|
|
117
|
+
const fullPath = path.join(currentDir, entry.name);
|
|
118
|
+
if (entry.isDirectory()) {
|
|
119
|
+
await walk(fullPath, depth + 1);
|
|
120
|
+
} else if (entry.isFile() && entry.name === 'SKILL.md') {
|
|
121
|
+
results.push(fullPath);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
await walk(rootDir, 0);
|
|
126
|
+
return results;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
async function validateInstall(installDir) {
|
|
130
|
+
const rootSkill = path.join(installDir, 'SKILL.md');
|
|
131
|
+
if (!(await exists(rootSkill))) throw new Error('Missing root SKILL.md in install content.');
|
|
132
|
+
const skillName = await readSkillName(rootSkill);
|
|
133
|
+
if (skillName !== SKILL_NAME) throw new Error(`SKILL.md name should be ${SKILL_NAME}, got ${skillName || 'unreadable'}.`);
|
|
134
|
+
const skillFiles = await findSkillFiles(installDir);
|
|
135
|
+
if (skillFiles.length !== 1) throw new Error(`Found ${skillFiles.length} SKILL.md files; must have exactly one entry.`);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
async function ensureStateDirs() {
|
|
139
|
+
const stateRoot = path.join(HOME, '.math-skill');
|
|
140
|
+
const tempRoot = path.join(stateRoot, 'tmp');
|
|
141
|
+
const backupRoot = path.join(stateRoot, 'backups');
|
|
142
|
+
await fsp.mkdir(tempRoot, { recursive: true });
|
|
143
|
+
await fsp.mkdir(backupRoot, { recursive: true });
|
|
144
|
+
return { tempRoot, backupRoot };
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
async function movePath(source, destination) {
|
|
148
|
+
await fsp.mkdir(path.dirname(destination), { recursive: true });
|
|
149
|
+
try {
|
|
150
|
+
await fsp.rename(source, destination);
|
|
151
|
+
} catch (error) {
|
|
152
|
+
if (error.code !== 'EXDEV') throw error;
|
|
153
|
+
await fsp.cp(source, destination, { recursive: true, force: true });
|
|
154
|
+
await fsp.rm(source, { recursive: true, force: true });
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
async function moveLegacyDuplicates(platform, canonicalTarget, backupRoot) {
|
|
159
|
+
const skillsDir = PLATFORMS[platform].skillsDir;
|
|
160
|
+
if (!(await exists(skillsDir))) return [];
|
|
161
|
+
const moved = [];
|
|
162
|
+
const children = await fsp.readdir(skillsDir, { withFileTypes: true });
|
|
163
|
+
for (const child of children) {
|
|
164
|
+
if (!child.isDirectory()) continue;
|
|
165
|
+
const candidate = path.join(skillsDir, child.name);
|
|
166
|
+
if (path.resolve(candidate) === path.resolve(canonicalTarget)) continue;
|
|
167
|
+
const candidateSkillName = await readSkillName(path.join(candidate, 'SKILL.md'));
|
|
168
|
+
if (candidateSkillName !== SKILL_NAME) continue;
|
|
169
|
+
const destination = path.join(backupRoot, `${platform}-duplicate-${child.name}-${Date.now()}`);
|
|
170
|
+
await movePath(candidate, destination);
|
|
171
|
+
moved.push({ source: candidate, backup: destination });
|
|
172
|
+
}
|
|
173
|
+
return moved;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
async function installPlatform(platform) {
|
|
177
|
+
const skillsDir = PLATFORMS[platform].skillsDir;
|
|
178
|
+
const target = path.join(skillsDir, SKILL_NAME);
|
|
179
|
+
const { tempRoot, backupRoot } = await ensureStateDirs();
|
|
180
|
+
const runId = `${Date.now()}-${process.pid}`;
|
|
181
|
+
const tempDir = path.join(tempRoot, `${platform}-${runId}`);
|
|
182
|
+
const oldVersionBackup = path.join(backupRoot, `${platform}-${runId}`);
|
|
183
|
+
await fsp.mkdir(skillsDir, { recursive: true });
|
|
184
|
+
await copyRuntime(tempDir);
|
|
185
|
+
await validateInstall(tempDir);
|
|
186
|
+
const movedDuplicates = await moveLegacyDuplicates(platform, target, backupRoot);
|
|
187
|
+
const hadOldVersion = await exists(target);
|
|
188
|
+
try {
|
|
189
|
+
if (hadOldVersion) await movePath(target, oldVersionBackup);
|
|
190
|
+
await movePath(tempDir, target);
|
|
191
|
+
await validateInstall(target);
|
|
192
|
+
if (hadOldVersion) await fsp.rm(oldVersionBackup, { recursive: true, force: true });
|
|
193
|
+
} catch (error) {
|
|
194
|
+
await fsp.rm(target, { recursive: true, force: true });
|
|
195
|
+
if (hadOldVersion && (await exists(oldVersionBackup))) await movePath(oldVersionBackup, target);
|
|
196
|
+
await fsp.rm(tempDir, { recursive: true, force: true });
|
|
197
|
+
throw error;
|
|
198
|
+
}
|
|
199
|
+
console.log(`\u2713 ${platform}: Math Skill ${PACKAGE_JSON.version} installed`);
|
|
200
|
+
console.log(` ${target}`);
|
|
201
|
+
for (const duplicate of movedDuplicates) {
|
|
202
|
+
console.log(` Removed duplicate: ${duplicate.source}`);
|
|
203
|
+
console.log(` Backup: ${duplicate.backup}`);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
async function doctorPlatform(platform) {
|
|
208
|
+
const skillsDir = PLATFORMS[platform].skillsDir;
|
|
209
|
+
const skillFiles = await findSkillFiles(skillsDir, 5);
|
|
210
|
+
const matches = [];
|
|
211
|
+
for (const skillFile of skillFiles) {
|
|
212
|
+
const skillName = await readSkillName(skillFile);
|
|
213
|
+
if (skillName === SKILL_NAME) matches.push(skillFile);
|
|
214
|
+
}
|
|
215
|
+
if (matches.length === 0) {
|
|
216
|
+
console.log(`- ${platform}: Math Skill not installed`);
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
if (matches.length > 1) {
|
|
220
|
+
console.log(`! ${platform}: ${matches.length} duplicate entries detected`);
|
|
221
|
+
for (const skillFile of matches) console.log(` ${skillFile}`);
|
|
222
|
+
process.exitCode = 2;
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
const markerFile = path.join(path.dirname(matches[0]), INSTALL_MARKER);
|
|
226
|
+
let version = 'unknown';
|
|
227
|
+
if (await exists(markerFile)) {
|
|
228
|
+
try {
|
|
229
|
+
const marker = JSON.parse(await fsp.readFile(markerFile, 'utf8'));
|
|
230
|
+
version = marker.version || version;
|
|
231
|
+
} catch {}
|
|
232
|
+
}
|
|
233
|
+
console.log(`\u2713 ${platform}: single entry detected, version ${version}`);
|
|
234
|
+
console.log(` ${matches[0]}`);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
async function uninstallPlatform(platform) {
|
|
238
|
+
const skillsDir = PLATFORMS[platform].skillsDir;
|
|
239
|
+
if (!(await exists(skillsDir))) {
|
|
240
|
+
console.log(`- ${platform}: not installed`);
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
const children = await fsp.readdir(skillsDir, { withFileTypes: true });
|
|
244
|
+
let removed = 0;
|
|
245
|
+
for (const child of children) {
|
|
246
|
+
if (!child.isDirectory()) continue;
|
|
247
|
+
const candidate = path.join(skillsDir, child.name);
|
|
248
|
+
const skillName = await readSkillName(path.join(candidate, 'SKILL.md'));
|
|
249
|
+
if (skillName !== SKILL_NAME) continue;
|
|
250
|
+
await fsp.rm(candidate, { recursive: true, force: true });
|
|
251
|
+
console.log(`\u2713 Removed: ${candidate}`);
|
|
252
|
+
removed += 1;
|
|
253
|
+
}
|
|
254
|
+
if (removed === 0) console.log(`- ${platform}: no Math Skill entry found`);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
async function main() {
|
|
258
|
+
const [, , command = 'help', ...args] = process.argv;
|
|
259
|
+
if (command === 'help' || command === '--help' || command === '-h') {
|
|
260
|
+
printUsage();
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
const allowedCommands = ['install', 'update', 'doctor', 'uninstall'];
|
|
264
|
+
if (!allowedCommands.includes(command)) throw new Error(`Unknown command: ${command}`);
|
|
265
|
+
const platforms = await selectPlatforms(args);
|
|
266
|
+
for (const platform of platforms) {
|
|
267
|
+
if (command === 'install' || command === 'update') await installPlatform(platform);
|
|
268
|
+
else if (command === 'doctor') await doctorPlatform(platform);
|
|
269
|
+
else if (command === 'uninstall') await uninstallPlatform(platform);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
main().catch((error) => {
|
|
274
|
+
console.error(`\u2717 ${error.message}`);
|
|
275
|
+
process.exitCode = 1;
|
|
276
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "math-skill",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2",
|
|
4
4
|
"description": "面向 AI 架构创新与密码学研究的数学研究路由器:三层正交架构(15 透镜 / 37 锚点 / 22 设计原型)+ Domain Router + Knowledge Gap Protocol。Math research router for AI and cryptography: three-layer architecture with progressive loading and domain isolation.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"math",
|
|
@@ -35,7 +35,14 @@
|
|
|
35
35
|
"bugs": {
|
|
36
36
|
"url": "https://github.com/the-thinker0/math-skill/issues"
|
|
37
37
|
},
|
|
38
|
+
"bin": {
|
|
39
|
+
"math-skill": "bin/math-skill.cjs"
|
|
40
|
+
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=18"
|
|
43
|
+
},
|
|
38
44
|
"files": [
|
|
45
|
+
"bin/",
|
|
39
46
|
"README.md",
|
|
40
47
|
"README.en-US.md",
|
|
41
48
|
"SKILL.md",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Inspiration
|
|
2
2
|
|
|
3
|
-
> Mathematics is more than a computational tool — it is a way of thinking. This file records the technical inspiration of math-skill — the cross-domain activation value of mathematical tools far exceeding their original intent. For philosophical and life reflections
|
|
3
|
+
> Mathematics is more than a computational tool — it is a way of thinking. This file records the technical inspiration of math-skill — the cross-domain activation value of mathematical tools far exceeding their original intent. For philosophical and life reflections, see `musings.en.md`.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -28,10 +28,6 @@ The inspiration for this project stems precisely from this insight:
|
|
|
28
28
|
|
|
29
29
|
**The value of mathematical tools far exceeds their original intent** — Sophus Lie's dragon-slaying blade story teaches us that a tool invented for solving differential equations ultimately became the universal language for describing symmetry. This is the core idea behind math-skill's "thinking lenses" and "activation anchors": every mathematical concept carries transferable value far beyond its original application domain. The skill's job is to guide the activation of such cross-domain transfer, not to fixate on specific application scenarios.
|
|
30
30
|
|
|
31
|
-
>
|
|
31
|
+
> Accordingly: knowledge-base/ anchors describe mathematical structures themselves (manifolds, spectra, sheaf cohomology, etc.), not specific AI architectures; design-patterns/ is translation-prototype demonstration, not a template library. This is exactly what the "dragon-slaying blade" story reflects in the skill's positioning — **the true value of a tool lies in cross-domain activation, not in being fixated on a single application**.
|
|
32
32
|
|
|
33
33
|
> The philosophical and life reflection part ("Life as an Optimization Problem," etc.) has been moved to `musings.en.md`, separated from the skill's rigorous technical core.
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
> **The "Life as an Optimization Problem" section below has been moved to `musings.en.md`.** For philosophical reflections, see `musings.en.md`.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# 灵感来源 / Inspiration
|
|
4
4
|
|
|
5
|
-
> 数学不只是一种计算工具,更是一种思想方法。本文件记录 math-skill
|
|
5
|
+
> 数学不只是一种计算工具,更是一种思想方法。本文件记录 math-skill 的技术灵感来源——数学工具远超初衷的跨领域激活价值。哲学与人生感悟部分见 `musings.md`。
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -30,10 +30,6 @@ Sophus Lie 是一个想打造一把**屠龙刀**(解通微分方程)的铁
|
|
|
30
30
|
|
|
31
31
|
**数学工具的价值远超初衷** —— Sophus Lie 的屠龙刀故事告诉我们,一个为解微分方程而发明的工具,最终成为描述对称性的通用语言。这正是 math-skill "思想透镜"与"激活锚点"的核心理念:每个数学思想方法都有远超其原始应用场景的迁移价值,skill 的工作是引导激活这种跨域迁移,而不是固化具体应用场景。
|
|
32
32
|
|
|
33
|
-
>
|
|
33
|
+
> 据此理念:knowledge-base/ 锚点描述数学结构本身(流形、谱、层上同调等),不固化具体 AI 架构;design-patterns/ 是翻译范式示范,不是模板库。这正是"屠龙刀"故事在 skill 定位上的体现——**工具的真正价值在跨域激活,而非固化为某一种应用**。
|
|
34
34
|
|
|
35
|
-
> 哲学与人生感悟部分("人生就是一场最优化"等)已移至 `musings.md`,与 skill 的严谨技术核心分离。
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
> **以下"人生就是一场最优化"部分已移至 `musings.md`**。如需查阅哲学感悟,请见 `musings.md`。
|
|
35
|
+
> 哲学与人生感悟部分("人生就是一场最优化"等)已移至 `musings.md`,与 skill 的严谨技术核心分离。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> This is the on-demand catalog for `../SKILL.md`. The main entry keeps only selection rules; do not load this index by default for a clear request.
|
|
4
4
|
|
|
5
|
-
## Domain Router Overview
|
|
5
|
+
## Domain Router Overview
|
|
6
6
|
|
|
7
7
|
> Full definition: see the Domain Router section in `../SKILL.md`. Only a summary table appears here:
|
|
8
8
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
> Core rules: domain judgment precedes lens invocation; shared math loads on demand by problem structure (not by domain tag); no pollution across non-cross domains; gap-protocol temporary cards are domain-tagged.
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Design Philosophy
|
|
19
19
|
|
|
20
20
|
> Full definition: see the objective, Domain Router, and progressive-loading sections in `../SKILL.md`. Key points:
|
|
21
21
|
>
|
|
@@ -109,7 +109,7 @@ The reference layer covers 10 books, all paired in Chinese and English. The thre
|
|
|
109
109
|
|
|
110
110
|
> **Domain Router note**: These three books belong to the **Cryptography Layer** and are loaded only when Domain Router determines the problem is cryptography or AI×crypto intersection. Pure AI problems do not load them. Shared math anchors (probability/information/algebra) are loaded on demand without redundancy.
|
|
111
111
|
>
|
|
112
|
-
> **
|
|
112
|
+
> **Backfill note**: the knowledge-base/cryptography/ anchor directory (with prf-prg-owf, reduction-proof-template, attack-game-framework, cca-cpa-ae-hierarchy cards) and knowledge-base/algebraic-geometry/ directory (with sheaf-cohomology, grassmannian-plucker cards) give the cryptography and algebraic-geometry layers structured anchors for light consultation, not just books.
|
|
113
113
|
|
|
114
114
|
## Workflow Example
|
|
115
115
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> 本文件是 `../SKILL.md` 的按需目录。主入口只保留选择规则;不要为清晰问题默认加载本索引。
|
|
4
4
|
|
|
5
|
-
## Domain Router
|
|
5
|
+
## Domain Router 总览
|
|
6
6
|
|
|
7
7
|
> 完整定义见 `../SKILL.md` 的 Domain Router 小节。此处仅列摘要表:
|
|
8
8
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
> 核心规则:domain 判定先于透镜调用;共用数学按问题结构(非 domain 标签)按需加载;不跨域时不污染;缺口协议临时卡标注 domain。
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## 设计哲学
|
|
19
19
|
|
|
20
20
|
> 完整定义见 `../SKILL.md` 的目标、Domain Router 与渐进加载小节。要点:
|
|
21
21
|
>
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
|
|
110
110
|
> **Domain Router 提示**:这三本书属**密码学层**,仅当 Domain Router 判定问题属密码学或 AI×密码交叉时加载。纯 AI 问题不加载。共用数学锚点(概率/信息/代数)按需加载,不重复。
|
|
111
111
|
>
|
|
112
|
-
>
|
|
112
|
+
> **补齐说明**:knowledge-base/cryptography/ 锚点目录(含 prf-prg-owf、reduction-proof-template、attack-game-framework、cca-cpa-ae-hierarchy 四张卡)与 knowledge-base/algebraic-geometry/ 目录(含 sheaf-cohomology、grassmannian-plucker 两张卡)使密码学层与代数几何层不再仅有书稿,有结构化锚点可供轻度查阅。
|
|
113
113
|
|
|
114
114
|
## 工作流范例
|
|
115
115
|
|
|
@@ -99,8 +99,8 @@ Our activator integrates all of the above intellectual traditions:
|
|
|
99
99
|
|
|
100
100
|
| Intellectual Source | Manifestation in the Math Research OS |
|
|
101
101
|
|---------|-------------------|
|
|
102
|
-
| Pólya's Heuristics |
|
|
103
|
-
| Newell & Simon's Problem Space |
|
|
102
|
+
| Pólya's Heuristics | 5 scenario branches in intent diagnosis — each scenario corresponds to a class of problem-solving strategies |
|
|
103
|
+
| Newell & Simon's Problem Space | Domain Router's domain judgment — by target object and requested guarantee, not keywords |
|
|
104
104
|
| Schoenfeld's Strategic Selection | The core principle that "choosing the right tool matters more than brute-force analysis" |
|
|
105
105
|
| Wicked Problems Theory | Multi-tool combination recommendations — wicked problems require cross-domain tool combinations |
|
|
106
106
|
| Kahneman's Dual System | "Inapplicable scenarios" — simple problems do not need tools; avoid over-analysis |
|
|
@@ -99,8 +99,8 @@ Imre Lakatos 在《证明与反驳》(Proofs and Refutations, 1976) 中展示了
|
|
|
99
99
|
|
|
100
100
|
| 思想来源 | 在数学研究操作系统中的体现 |
|
|
101
101
|
|---------|-------------------|
|
|
102
|
-
| Pólya 启发法 |
|
|
103
|
-
| Newell & Simon 问题空间 |
|
|
102
|
+
| Pólya 启发法 | 意图诊断中的 5 场景分支——每个场景对应一类解题策略 |
|
|
103
|
+
| Newell & Simon 问题空间 | Domain Router 的领域判定——按目标对象与所求保证判域,而非关键词 |
|
|
104
104
|
| Schoenfeld 策略选择 | "选对工具比用力分析更重要"的核心原则 |
|
|
105
105
|
| 棘问题理论 | 多工具组合推荐——棘问题需要跨领域工具组合 |
|
|
106
106
|
| Kahneman 双系统 | "不适用场景"——简单问题不需要工具,避免过度分析 |
|