Skip to content

Commit e56afc7

Browse files
committed
add all files
1 parent b660f8f commit e56afc7

40 files changed

Lines changed: 1937 additions & 345 deletions
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy Static Site to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- uses: pnpm/action-setup@v4
24+
with:
25+
version: 10
26+
27+
- uses: actions/setup-node@v4
28+
with:
29+
node-version: "20"
30+
31+
- name: Install dependencies
32+
working-directory: playground
33+
run: pnpm install
34+
35+
- name: Generate skills manifest
36+
working-directory: playground/apps/desktop
37+
run: node scripts/generate-skills-manifest.mjs
38+
39+
- name: Build static site
40+
working-directory: playground/apps/desktop
41+
run: pnpm build
42+
43+
- name: Upload artifact
44+
uses: actions/upload-pages-artifact@v3
45+
with:
46+
path: playground/apps/desktop/out
47+
48+
deploy:
49+
needs: build
50+
runs-on: ubuntu-latest
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"issue": 15,
3+
"repo": "variableway/innate-executable",
4+
"first_comment_id": 4367777053,
5+
"description": "1. \u4fee\u590d\u591a\u64cd\u4f5c\u7cfb\u7edf\u811a\u672c\u5207\u6362\u4e0d\u663e\u793a\u95ee\u9898\n2. \u6539\u5584 Markdown \u4e3b\u9898\u4e3a\u66f4\u6e29\u6696\u660e\u4eae\u7684\u98ce\u683c\n3. \u8bbe\u7f6e GitHub Actions \u90e8\u7f72\u9759\u6001\u7ad9\u70b9",
6+
"title": "Task 18: Fix PlatformTabs + Theme + GitHub Actions"
7+
}

playground/apps/desktop/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {
6+
"predev": "node scripts/generate-skills-manifest.mjs",
7+
"prebuild": "node scripts/generate-skills-manifest.mjs",
68
"dev": "next dev",
79
"build": "next build",
810
"start": "next start",
911
"lint": "eslint",
10-
"tauri": "tauri"
12+
"tauri": "tauri",
13+
"manifest": "node scripts/generate-skills-manifest.mjs"
1114
},
1215
"dependencies": {
1316
"@innate/ui": "workspace:*",

playground/apps/desktop/public/skills-manifest.json

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"generatedAt": "2026-05-04T01:39:08.447Z",
2+
"generatedAt": "2026-05-04T03:49:20.647Z",
33
"count": 14,
44
"skills": [
55
{
@@ -235,5 +235,90 @@
235235
"source": "builtin",
236236
"localPath": "/skills/install-nodejs.mdx"
237237
}
238+
],
239+
"courses": [
240+
{
241+
"id": "ai-assistant-basics",
242+
"title": "AI 助手入门系列",
243+
"description": "从零开始学习使用 AI 助手,掌握搜索总结、邮件管理、日程安排和自定义技能",
244+
"icon": "🤖",
245+
"color": "#6366f1",
246+
"skills": [
247+
{
248+
"slug": "openclaw-search-summarize",
249+
"order": 1
250+
},
251+
{
252+
"slug": "openclaw-email-calendar",
253+
"order": 2
254+
},
255+
{
256+
"slug": "openclaw-custom-skills",
257+
"order": 3
258+
},
259+
{
260+
"slug": "openclaw-5min-experience",
261+
"order": 4
262+
}
263+
]
264+
},
265+
{
266+
"id": "ai-fundamentals",
267+
"title": "AI 基础知识系列",
268+
"description": "系统学习 AI 的跨学科基础:数学、认知科学、控制论和因果推断",
269+
"icon": "🧠",
270+
"color": "#8b5cf6",
271+
"skills": [
272+
{
273+
"slug": "ai-cognitive-science",
274+
"order": 1
275+
},
276+
{
277+
"slug": "ai-math-basics-part1",
278+
"order": 2
279+
},
280+
{
281+
"slug": "ai-math-basics-part2",
282+
"order": 3
283+
},
284+
{
285+
"slug": "ai-interdisciplinary-journey",
286+
"order": 4
287+
},
288+
{
289+
"slug": "ai-cybernetics-complexity",
290+
"order": 5
291+
},
292+
{
293+
"slug": "ai-causal-inference",
294+
"order": 6
295+
}
296+
]
297+
},
298+
{
299+
"id": "dev-tools-setup",
300+
"title": "开发环境搭建系列",
301+
"description": "一站式安装和配置 AI 编程工具:Claude Code、Node.js、Git、Kimi CLI",
302+
"icon": "🛠️",
303+
"color": "#f59e0b",
304+
"skills": [
305+
{
306+
"slug": "install-claude-code-glm5-deepseek-v4",
307+
"order": 1
308+
},
309+
{
310+
"slug": "install-git",
311+
"order": 2
312+
},
313+
{
314+
"slug": "install-kimi-cli",
315+
"order": 3
316+
},
317+
{
318+
"slug": "install-nodejs",
319+
"order": 4
320+
}
321+
]
322+
}
238323
]
239324
}

playground/apps/desktop/public/skills/ai-causal-inference.mdx

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,31 @@ AI 拒绝了贷款申请
162162

163163
## 用代码体验因果关系
164164

165-
<RunnableCodeBlock code="python3 -c \"# 简单的因果 vs 相关演示\nimport random\nrandom.seed(42)\n\nn = 1000\ntemperature = [random.gauss(30, 5) for _ in range(n)] # 温度\nice_cream = [t * 2 + random.gauss(0, 5) for t in temperature] # 冰淇淋销量\nswimming = [t * 1.5 + random.gauss(0, 3) for t in temperature] # 游泳人数\n\n# 计算相关系数\ndef corr(x, y):\n n = len(x)\n mx, my = sum(x)/n, sum(y)/n\n cov = sum((a-mx)*(b-my) for a,b in zip(x,y)) / n\n sx = (sum((a-mx)**2 for a in x) / n) ** 0.5\n sy = (sum((b-my)**2 for b in y) / n) ** 0.5\n return cov / (sx * sy)\n\nprint('相关系数:')\nprint(f' 冰淇淋 vs 游泳: {corr(ice_cream, swimming):.3f} (高度相关!)')\nprint(f' 但这不是因果关系 共同原因是温度')\nprint(f' 温度 vs 冰淇淋: {corr(temperature, ice_cream):.3f}')\nprint(f' 温度 vs 游泳: {corr(temperature, swimming):.3f}')\"" language="python" />
165+
<RunnableCodeBlock code={`python3 -c "
166+
# 简单的因果 vs 相关演示
167+
import random
168+
random.seed(42)
169+
170+
n = 1000
171+
temperature = [random.gauss(30, 5) for _ in range(n)] # 温度
172+
ice_cream = [t * 2 + random.gauss(0, 5) for t in temperature] # 冰淇淋销量
173+
swimming = [t * 1.5 + random.gauss(0, 3) for t in temperature] # 游泳人数
174+
175+
# 计算相关系数
176+
def corr(x, y):
177+
n = len(x)
178+
mx, my = sum(x)/n, sum(y)/n
179+
cov = sum((a-mx)*(b-my) for a,b in zip(x,y)) / n
180+
sx = (sum((a-mx)**2 for a in x) / n) ** 0.5
181+
sy = (sum((b-my)**2 for b in y) / n) ** 0.5
182+
return cov / (sx * sy)
183+
184+
print('相关系数:')
185+
print(f' 冰淇淋 vs 游泳: {corr(ice_cream, swimming):.3f} (高度相关!)')
186+
print(f' 但这不是因果关系 — 共同原因是温度')
187+
print(f' 温度 vs 冰淇淋: {corr(temperature, ice_cream):.3f}')
188+
print(f' 温度 vs 游泳: {corr(temperature, swimming):.3f}')
189+
"`} language="python" />
166190

167191
---
168192

playground/apps/desktop/public/skills/ai-cognitive-science.mdx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,18 @@ tags: ["path2agi", "认知科学", "神经科学", "入门"]
143143

144144
一个最简单的人工神经元:
145145

146-
<RunnableCodeBlock code="python3 -c \"# 简单的人工神经元:加权求和 + 激活函数\ndef neuron(inputs, weights, threshold=0.5):\n total = sum(i * w for i, w in zip(inputs, weights))\n return 1 if total > threshold else 0\n\n# 模拟 AND 逻辑门(两个输入都为1才输出1)\nprint('AND 逻辑门(模拟):')\nfor a, b in [(0,0), (0,1), (1,0), (1,1)]:\n result = neuron([a, b], [0.5, 0.5], threshold=0.75)\n print(f' 输入: {a},{b} → 输出: {result}')\"" language="python" />
146+
<RunnableCodeBlock code={`python3 -c "
147+
# 简单的人工神经元:加权求和 + 激活函数
148+
def neuron(inputs, weights, threshold=0.5):
149+
total = sum(i * w for i, w in zip(inputs, weights))
150+
return 1 if total > threshold else 0
151+
152+
# 模拟 AND 逻辑门(两个输入都为1才输出1)
153+
print('AND 逻辑门(模拟):')
154+
for a, b in [(0,0), (0,1), (1,0), (1,1)]:
155+
result = neuron([a, b], [0.5, 0.5], threshold=0.75)
156+
print(f' 输入: {a},{b} → 输出: {result}')
157+
"`} language="python" />
147158

148159
---
149160

playground/apps/desktop/public/skills/ai-cybernetics-complexity.mdx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,28 @@ AI 处理的一切数据本质上都是**信号**:
168168

169169
## 用代码体验反馈系统
170170

171-
<RunnableCodeBlock code="python3 -c \"# 简单的反馈控制系统:温度调节器\nclass Thermostat:\n def __init__(self, target=25):\n self.target = target\n self.current = 15 # 初始温度\n self.history = []\n\n def step(self):\n error = self.target - self.current\n adjustment = error * 0.3 # 比例控制\n noise = (hash(str(self.current)) % 10 - 5) * 0.1 # 环境噪声\n self.current += adjustment + noise\n self.history.append(round(self.current, 2))\n\nthermo = Thermostat(target=25)\nprint('温度调节器反馈过程:')\nfor i in range(15):\n thermo.step()\n status = '✓ 到达目标' if abs(thermo.current - 25) < 0.5 else '...'\n print(f' 第{i+1}步: {thermo.current:.1f}°C {status}')\"" language="python" />
171+
<RunnableCodeBlock code={`python3 -c "
172+
# 简单的反馈控制系统:温度调节器
173+
class Thermostat:
174+
def __init__(self, target=25):
175+
self.target = target
176+
self.current = 15 # 初始温度
177+
self.history = []
178+
179+
def step(self):
180+
error = self.target - self.current
181+
adjustment = error * 0.3 # 比例控制
182+
noise = (hash(str(self.current)) % 10 - 5) * 0.1 # 环境噪声
183+
self.current += adjustment + noise
184+
self.history.append(round(self.current, 2))
185+
186+
thermo = Thermostat(target=25)
187+
print('温度调节器反馈过程:')
188+
for i in range(15):
189+
thermo.step()
190+
status = '✓ 到达目标' if abs(thermo.current - 25) < 0.5 else '...'
191+
print(f' 第{i+1}步: {thermo.current:.1f}°C {status}')
192+
"`} language="python" />
172193

173194
---
174195

playground/apps/desktop/public/skills/ai-interdisciplinary-journey.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ AI 的 29 个基础学科可以归纳为四大能力区:
156156

157157
用 Python 快速体验一下 AI 的"表示能力" — 把文字变成数字向量:
158158

159-
<RunnableCodeBlock code="python3 -c \"print('AI 的本质:把世界变成数字')\"" language="python" />
159+
<RunnableCodeBlock code={`python3 -c "print('AI 的本质:把世界变成数字')"`} language="python" />
160160

161161
如果你还没安装 Python,不用担心,后续教程会教你安装。
162162

playground/apps/desktop/public/skills/ai-math-basics-part1.mdx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ AI 就是这样工作的:每看到一个新的数据点,就更新它的判
5858

5959
让我们用 Python 模拟一个简单的概率计算:
6060

61-
<RunnableCodeBlock code="python3 -c \"import random; results = [random.choice(['正面','反面']) for _ in range(10)]; print('抛10次硬币:', results); print('正面次数:', results.count('正面'))\"" language="python" />
61+
<RunnableCodeBlock code={`python3 -c "import random; results = [random.choice(['正面','反面']) for _ in range(10)]; print('抛10次硬币:', results); print('正面次数:', results.count('正面'))"`} language="python" />
6262

6363
---
6464

@@ -119,7 +119,14 @@ AI 判断两张图片是否相似,本质上是判断两个向量是否"接近"
119119

120120
### 用代码体验向量
121121

122-
<RunnableCodeBlock code="python3 -c \"# 用列表模拟向量\nperson_a = [175, 70, 25] # 身高, 体重, 年龄\nperson_b = [180, 75, 30]\nprint('人物A:', person_a)\nprint('人物B:', person_b)\nprint('差异:', [b-a for a,b in zip(person_a, person_b)])\"" language="python" />
122+
<RunnableCodeBlock code={`python3 -c "
123+
# 用列表模拟向量
124+
person_a = [175, 70, 25] # 身高, 体重, 年龄
125+
person_b = [180, 75, 30]
126+
print('人物A:', person_a)
127+
print('人物B:', person_b)
128+
print('差异:', [b-a for a,b in zip(person_a, person_b)])
129+
"`} language="python" />
123130

124131
---
125132

playground/apps/desktop/public/skills/ai-math-basics-part2.mdx

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,18 @@ AI 学习的过程,本质上就是**蒙着眼睛下山**:
6363

6464
### 用代码体验梯度下降
6565

66-
<RunnableCodeBlock code="python3 -c \"# 简单的梯度下降演示\n# 找到函数 f(x) = x^2 的最小值(答案是 x=0)\nx = 5.0 # 起点\nlr = 0.1 # 学习率\nprint('梯度下降过程:')\nfor i in range(10):\n grad = 2 * x # f(x)=x^2 的导数是 2x\n x = x - lr * grad\n print(f' 第{i+1}步: x = {x:.4f}')\nprint(f'最终结果: x = {x:.4f} (理论最优解: x = 0)')\"" language="python" />
66+
<RunnableCodeBlock code={`python3 -c "
67+
# 简单的梯度下降演示
68+
# 找到函数 f(x) = x^2 的最小值(答案是 x=0)
69+
x = 5.0 # 起点
70+
lr = 0.1 # 学习率
71+
print('梯度下降过程:')
72+
for i in range(10):
73+
grad = 2 * x # f(x)=x^2 的导数是 2x
74+
x = x - lr * grad
75+
print(f' 第{i+1}步: x = {x:.4f}')
76+
print(f'最终结果: x = {x:.4f} (理论最优解: x = 0)')
77+
"`} language="python" />
6778

6879
---
6980

@@ -103,7 +114,20 @@ AI 学习的过程,本质上就是**蒙着眼睛下山**:
103114

104115
### 用代码体验信息熵
105116

106-
<RunnableCodeBlock code="python3 -c \"import math\n# 计算抛硬币的熵\ndef entropy(p):\n if p == 0 or p == 1:\n return 0\n return -p * math.log2(p) - (1-p) * math.log2(1-p)\n\nprint('不同概率下的信息熵:')\nfor p in [0.5, 0.7, 0.9, 0.99, 1.0]:\n print(f' 正面概率={p:.0%} 熵={entropy(p):.3f} bit')\nprint()\nprint('结论:越不确定,熵越高!')\"" language="python" />
117+
<RunnableCodeBlock code={`python3 -c "
118+
import math
119+
# 计算抛硬币的熵
120+
def entropy(p):
121+
if p == 0 or p == 1:
122+
return 0
123+
return -p * math.log2(p) - (1-p) * math.log2(1-p)
124+
125+
print('不同概率下的信息熵:')
126+
for p in [0.5, 0.7, 0.9, 0.99, 1.0]:
127+
print(f' 正面概率={p:.0%} → 熵={entropy(p):.3f} bit')
128+
print()
129+
print('结论:越不确定,熵越高!')
130+
"`} language="python" />
107131

108132
---
109133

0 commit comments

Comments
 (0)