math-skill 3.3.0 → 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.
@@ -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
+ });
@@ -8,8 +8,9 @@ description: |
8
8
 
9
9
  Determine primary language: judge by sentence frame, verbs, mood particles. AI/math/engineering terms (attention, loss, routing, etc.) do not count as language signals. Code, paths, formulas do not count. When CN/EN ratio is close, follow the previous turn's language; default to Chinese if no context. Explicit "in English/in Chinese" takes priority.
10
10
 
11
- - Chinese primary → load `../SKILL.md`
12
- - English primary → load `../SKILL.en.md`
11
+ - Chinese primary → load `../SKILL.md` (canonical entry, can answer in either language)
12
+ - English primary → load `../SKILL.en.md` (English compatibility entry)
13
+ - Do not load both simultaneously
13
14
 
14
15
  Current question:
15
16
  $ARGUMENTS
package/commands/ask.md CHANGED
@@ -9,8 +9,9 @@ description: |
9
9
 
10
10
  判定主语言:看句式、动词、语气词的主框架。AI/数学/工程术语(attention、loss、routing 等)不计入语言判定。代码、路径、公式不计入。中英比例接近时沿用上一轮语言,无上下文默认中文。显式"用英文/用中文"优先。
11
11
 
12
- - 中文主语言 → 读取 `../SKILL.md`
13
- - 英文主语言 → 读取 `../SKILL.en.md`
12
+ - 中文主语言 → 读取 `../SKILL.md`(权威入口,可中英作答)
13
+ - 英文主语言 → 读取 `../SKILL.en.md`(英文兼容入口)
14
+ - 两者不同时加载
14
15
 
15
16
  当前问题:
16
17
  $ARGUMENTS
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "math-skill",
3
- "version": "3.3.0",
4
- "description": "面向 AI 架构创新与密码学研究的数学研究路由器:15 个思想透镜、33 个共用数学锚点、4 个密码学锚点、22 AI 设计原型,以及渐进加载、Domain Router Knowledge Gap Protocol。Math research router for AI architecture and cryptography with progressive loading, domain isolation, and explicit token budgets.",
3
+ "version": "3.3.2",
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",
7
7
  "mathematics",
@@ -10,49 +10,20 @@
10
10
  "claude",
11
11
  "cursor",
12
12
  "ai",
13
- "axiomatization",
14
- "abstraction",
15
- "logic",
16
- "modeling",
17
13
  "optimization",
18
14
  "probability",
19
- "transformation",
20
15
  "symmetry",
21
- "induction",
22
- "algorithm",
16
+ "topology",
23
17
  "information-theory",
24
18
  "game-theory",
25
- "causal-inference",
26
- "topology",
27
- "combinatorics",
28
- "discrete-math",
29
- "math-research-activator",
30
- "ask",
31
- "tool-selection",
32
- "algebraic-geometry",
33
19
  "differential-geometry",
34
20
  "lie-theory",
35
- "manifolds",
36
- "category-theory",
37
21
  "matrix-analysis",
38
- "gpu",
39
- "tensor-core",
40
- "gpu-friendly",
41
- "agentic-workflow",
42
- "auto-trigger",
43
- "co-design",
44
- "research",
45
- "bilingual",
46
- "lenses",
47
- "knowledge-base",
48
- "design-patterns",
49
- "math-research-os",
50
22
  "cryptography",
51
23
  "crypto",
52
- "security",
53
- "reduction-proof",
54
- "attack-game",
55
- "domain-router"
24
+ "gpu-friendly",
25
+ "research",
26
+ "bilingual"
56
27
  ],
57
28
  "license": "MIT",
58
29
  "author": "the-thinker0",
@@ -64,7 +35,14 @@
64
35
  "bugs": {
65
36
  "url": "https://github.com/the-thinker0/math-skill/issues"
66
37
  },
38
+ "bin": {
39
+ "math-skill": "bin/math-skill.cjs"
40
+ },
41
+ "engines": {
42
+ "node": ">=18"
43
+ },
67
44
  "files": [
45
+ "bin/",
68
46
  "README.md",
69
47
  "README.en-US.md",
70
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 (split in v3.2.1), see `musings.en.md`.
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
- > After the v3.2.1 design philosophy refinement, this idea is made explicit: 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**.
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`.** This file no longer retains it. For philosophical reflections, see `musings.en.md`.
@@ -2,7 +2,7 @@
2
2
 
3
3
  # 灵感来源 / Inspiration
4
4
 
5
- > 数学不只是一种计算工具,更是一种思想方法。本文件记录 math-skill 的技术灵感来源——数学工具远超初衷的跨领域激活价值。哲学与人生感悟部分(v3.2.1 拆分)见 `musings.md`。
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
- > v3.2.1 设计哲学修正后,这一理念进一步明确:knowledge-base/ 锚点描述数学结构本身(流形、谱、层上同调等),不固化具体 AI 架构;design-patterns/ 是翻译范式示范,不是模板库。这正是"屠龙刀"故事在 skill 定位上的体现——**工具的真正价值在跨域激活,而非固化为某一种应用**。
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 (v3.2.0+; routing rules follow root `../SKILL.md`)
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
- ## v3.2.1 Design Philosophy Refinement
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
- > **v3.2.1 backfill**: new 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). The cryptography layer no longer has only books — it has structured anchors for light consultation.
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 总览(v3.2.0+;路由规则以根 `../SKILL.md` 为准)
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
- ## v3.2.1 设计哲学修正
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
- > **v3.2.1 补齐**:新增 knowledge-base/cryptography/ 锚点目录(含 prf-prg-owf、reduction-proof-template、attack-game-framework、cca-cpa-ae-hierarchy 四张卡)与 knowledge-base/algebraic-geometry/ 目录(含 sheaf-cohomology、grassmannian-plucker 两张卡)。密码学层不再仅有书稿,有结构化锚点可供轻度查阅。
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
 
@@ -7,4 +7,4 @@ description: |
7
7
 
8
8
  # Compatibility Entry
9
9
 
10
- This is the Claude/plugin-style compatibility entry. Read and follow `../../SKILL.en.md` completely; the root file is the single authoritative English body and all resource paths resolve from the repository root. Do not also load `SKILL.md`.
10
+ This is the Claude/plugin-style compatibility entry. Read and follow `../../SKILL.en.md` completely; the root file is the single authoritative body and all resource paths resolve from the repository root. Do not load both the Chinese and English entries simultaneously.
@@ -7,4 +7,4 @@ description: |
7
7
 
8
8
  # 兼容入口
9
9
 
10
- 这是 Claude/plugin 风格的兼容入口。完整读取并遵循 `../../SKILL.md`;该根文件是唯一权威正文,所有资源路径均相对仓库根解析。不要同时读取 `SKILL.en.md`。
10
+ 这是 Claude/plugin 风格的兼容入口。完整读取并遵循 `../../SKILL.md`;该根文件是唯一权威正文,所有资源路径均相对仓库根解析。英文经显式英文入口进入时读 `../../SKILL.en.md`,不要同时加载两个入口。
@@ -1,5 +1,7 @@
1
1
  # Intellectual Sources for the Math Research OS
2
2
 
3
+ > **Note**: This file is design-rationale background (Pólya/Newell-Simon/Schoenfeld intellectual sources), not a runtime resource — the Domain Router does not auto-load it. Consult it only to understand the skill's design motivation.
4
+
3
5
  ## The Tradition of Problem Classification and Tool Selection
4
6
 
5
7
  ### Pólya's Problem-Solving Heuristics
@@ -40,8 +42,8 @@ Core insight: **the nature of the problem space determines the choice of search
40
42
 
41
43
  Alan H. Schoenfeld, in *Mathematical Problem Solving* (1985), analyzed why students fail to solve problems even when they possess the necessary tools — the critical deficiency is not a lack of tools but a lack of **strategic decision-making ability**:
42
44
 
43
- - **Resources**: Knowledge, skills, tools — corresponding to our 15 intellectual weapons
44
- - **Heuristics**: How to use resources — corresponding to the methodological workflow for each intellectual weapon
45
+ - **Resources**: Knowledge, skills, tools — corresponding to our 15 thinking lenses
46
+ - **Heuristics**: How to use resources — corresponding to the methodological workflow for each thinking lens
45
47
  - **Control**: When to use which resource — corresponding to the function of the activator
46
48
  - **Belief Systems**: Beliefs about mathematics and about oneself — affecting whether the appropriate tool is selected
47
49
 
@@ -65,7 +67,7 @@ Characteristics of wicked problems:
65
67
  - Solutions are not right or wrong, only better or worse
66
68
  - Span multiple domains
67
69
 
68
- Core insight: **wicked problems require combinations of cross-domain intellectual weapons, whereas tame problems can be solved with a single tool**. The activator recommends multi-tool combinations when facing wicked problems and single-tool focus when facing tame problems.
70
+ Core insight: **wicked problems require combinations of cross-domain thinking lenses, whereas tame problems can be solved with a single tool**. The activator recommends multi-tool combinations when facing wicked problems and single-tool focus when facing tame problems.
69
71
 
70
72
  > "Wicked problems have no right or wrong answers, only better or worse ways of dealing with them." — Rittel & Webber
71
73
 
@@ -76,7 +78,7 @@ Daniel Kahneman, in *Thinking, Fast and Slow* (2011), proposed the dual-system t
76
78
  - **System 1**: Fast, intuitive, automatic — responsible for the majority of everyday decisions
77
79
  - **System 2**: Slow, rational, deliberate — required for decisions demanding careful thought
78
80
 
79
- Core insight: **not all problems require System 2-level rational analysis**. Many everyday decisions require only intuition (System 1), and forcibly deploying intellectual weapons constitutes over-analysis. The activator's "inapplicable scenarios" list is grounded in this insight — simple problems do not need tools; wicked problems do.
81
+ Core insight: **not all problems require System 2-level rational analysis**. Many everyday decisions require only intuition (System 1), and forcibly deploying thinking lenses constitutes over-analysis. The activator's "inapplicable scenarios" list is grounded in this insight — simple problems do not need tools; wicked problems do.
80
82
 
81
83
  > "Overthinking is the enemy of decision-making — some decisions are best left to intuition." — Kahneman
82
84
 
@@ -97,8 +99,8 @@ Our activator integrates all of the above intellectual traditions:
97
99
 
98
100
  | Intellectual Source | Manifestation in the Math Research OS |
99
101
  |---------|-------------------|
100
- | Pólya's Heuristics | 11 characteristic branches in the decision tree — each branch corresponds to a class of heuristic strategies |
101
- | Newell & Simon's Problem Space | Problem characteristic dimensionsinteractivity, uncertainty, constraint, structure, dynamism |
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 |
102
104
  | Schoenfeld's Strategic Selection | The core principle that "choosing the right tool matters more than brute-force analysis" |
103
105
  | Wicked Problems Theory | Multi-tool combination recommendations — wicked problems require cross-domain tool combinations |
104
106
  | Kahneman's Dual System | "Inapplicable scenarios" — simple problems do not need tools; avoid over-analysis |
@@ -1,5 +1,7 @@
1
1
  # 数学研究操作系统的思想来源 / Intellectual Sources for the Math Research OS
2
2
 
3
+ > **注意**:本文件是项目设计理念的背景资料(Pólya/Newell-Simon/Schoenfeld 等思想来源),不是运行时资源——Domain Router 不自动加载本文件。仅供了解 skill 的设计动机时参阅。
4
+
3
5
  ## 问题分类与工具选择的传统 / The Tradition of Problem Classification and Tool Selection
4
6
 
5
7
  ### Pólya 的问题求解启发法 / Pólya's Problem-Solving Heuristics
@@ -97,8 +99,8 @@ Imre Lakatos 在《证明与反驳》(Proofs and Refutations, 1976) 中展示了
97
99
 
98
100
  | 思想来源 | 在数学研究操作系统中的体现 |
99
101
  |---------|-------------------|
100
- | Pólya 启发法 | 决策树中的11个特征分支——每个分支对应一类启发策略 |
101
- | Newell & Simon 问题空间 | 问题特征维度刻画——互动性、不确定性、约束性、结构性、动态性 |
102
+ | Pólya 启发法 | 意图诊断中的 5 场景分支——每个场景对应一类解题策略 |
103
+ | Newell & Simon 问题空间 | Domain Router 的领域判定——按目标对象与所求保证判域,而非关键词 |
102
104
  | Schoenfeld 策略选择 | "选对工具比用力分析更重要"的核心原则 |
103
105
  | 棘问题理论 | 多工具组合推荐——棘问题需要跨领域工具组合 |
104
106
  | Kahneman 双系统 | "不适用场景"——简单问题不需要工具,避免过度分析 |