Commit 6684884
refactor(docs): Option C IA 大重组 — learn/career/community/projects 四大区 (#307)
* refactor(docs): 语义化重组 — RAG 归 AI 基础模型,AI 项目归 AI 目录
背景:Scan 发现 3 处目录语义错配,这批修掉:
- CommunityShare/RAG/{rag,embedding,context-engineering-intro}
实际上是 AI 核心基础设施(检索增强、向量嵌入、上下文工程),
放社区分享目录既不好发现也语义错位 → ai/foundation-models/rag/
- all-projects/ai-town 是 AI 多智能体模拟项目,不应和通用项目混
→ ai/projects/
本 PR 也作为 sync-uuid 跨路径贡献者追踪机制的大规模验证。
Workflow 只在 main / feat/contributor 触发,feature 分支零风险
(DB 不动),merge 后在 main 自动跑一次 backfill 核对。
变更点:
1. git mv 4 份原文 + 4 份翻译(.en.mdx / .en.md)= 8 个文件
- rag.mdx (+.en) → ai/foundation-models/rag/
- embedding.mdx (+.en) → ai/foundation-models/rag/
- context_engineering_intro.md (+.en) → 同上(顺便 rename
下划线 → kebab-case 统一命名规范)
- ai-town.mdx (+.en) → ai/projects/
2. 所有 docId 原样保留(验证 grep "^docId:" 通过,8 份一致)
3. placeholder 标签 tag-one / ai-project 替换成真实内容标签:
- rag: rag-system / retrieval-augmented-generation / vector-search
- embedding: embedding-models / vector-representation / rag-system
- context-eng: context-engineering / prompt-engineering / llm-fundamentals
- ai-town: ai-agent-simulation / multi-agent-systems /
generative-agents / godot-engine
4. next.config.mjs 新增 async redirects(),所有老 URL 301 跳新
canonical,保护 SEO 权重 + 外链 + 用户收藏
验证预期(合 main 后 sync-uuid workflow 跑完):
- 涉及 4 个 docId 的老贡献者 contributions 保持不变
- longsizhuo 本次 rename commit 在每个 docId 上 +1
- generated/doc-contributors.json path 字段更新为新位置
剩余工作(独立 PR):
- 其余 78 份文档的 tag-one 占位符清理
- 文件名命名规范化批量(下划线 → kebab-case)
* fix(redirects): 从 permanent:true (308) 改成 statusCode: 301
此前 Next.js permanent:true 下发的是 308 Permanent Redirect,和 PR 描述
/ commit message 里写的 "301" 对不上。虽然 SEO 语义上 308 和 301 等价
(Google 都认永久跳转),但:
- 301 是最老最广为人知的"永久跳转"语义,老爬虫/老工具识别最稳
- Google Search Console 报告显式认 301
- 代码实际行为和文档口径对齐,避免后续阅读混淆
statusCode 与 permanent 互斥,优先级更高。这里显式用 statusCode:301
覆盖默认的 308 行为。
验证:node 直接 eval next.config.mjs 的 redirects() 返回 4 条全部带
statusCode:301,pnpm typecheck 通过。
* refactor(docs): phase 2 — CommunityShare 下 AI 内容进一步归并到 ai/
延续 PR 初版的语义化重组思路,继续把散落在 CommunityShare 下的纯 AI 内容
移到 ai/ 主目录对应主题下。新增 4 个 docId 的迁移:
- CommunityShare/Geek/leworldmodel (JEPA 世界模型论文摘要)
→ ai/foundation-models/world-models/leworldmodel
- CommunityShare/Amazing-AI-Tools/perplexity-comet (AI 浏览器介绍)
→ ai/misc-tools/perplexity-comet
- CommunityShare/Amazing-AI-Tools/prompt-repetition-improves-non-reasoning-llms
(arXiv prompt 技巧论文摘要) → ai/foundation-models/prompt-engineering/
- CommunityShare/Personal-Study-Notes/Reinforcement-Learning/ppo
→ ai/reinforcement-learning/ppo
新增 3 个 ai/ 下子目录:world-models / prompt-engineering / reinforcement-learning
顺手收拾的:
- ppo.md 原本是 tag-one 占位符 → [reinforcement-learning, ppo, policy-gradient, gae]
(和 PR #308 里对 ppo 的 tag 选择完全一致,merge 顺序无所谓)
- leworldmodel 原本 tag 是中文 "世界模型" → kebab-case 英文
[world-models, jepa, representation-learning, embodied-ai]
- 清理空目录 CommunityShare/Personal-Study-Notes/Reinforcement-Learning/
和 Personal-Study-Notes/
next.config.mjs 补 4 条 301,累计 8 条。statusCode:301 继续用显式 301
(和 PR / commit 口径一致)。
与 PR #308 (feat/docs-tag-cleanup) 的冲突风险:
本 PR 已经移走 ppo.md 并应用了和 PR #308 完全相同的 tag 更新。merge 顺序:
- 若本 PR 先合:PR #308 rebase 时会发现 ppo 老路径不存在,它对 ppo 的
tag 修改会变 "deleted by us / modified by them" 冲突,需要 drop
PR #308 中 ppo 那条 hunk(因为本 PR 已处理)
- 若 PR #308 先合:本 PR rebase 时 ppo 在老路径已有新 tags,git mv
自然工作,无冲突
推荐:**本 PR 先合**,然后 PR #308 rebase 时丢掉 ppo 相关改动。
docId 守恒(4 份原文 + 3 份翻译 = 7 个文件全部 grep 对齐):
- boo70qqm8nos8b0q9h7zjrki (leworldmodel)
- eej2awin6irhbdgcy8vvs3xb (perplexity-comet)
- l6eepr5ctjgrhdgupy3twr1t (prompt-repetition)
- zf8zk108oqbsg56xjyqb5txk (ppo)
Reviewer subagent LGTM,无阻塞问题。
* chore(docs): 清理 tag-one 占位符 → 真实内容标签(28 原文 + 26 翻译)
背景:站点早期模板带 "tag-one" 占位符作为 frontmatter.tags 默认值,
contributors 撰文时没覆盖,30 份文档仍带占位符。tags 字段影响 sidebar
显示、未来可能接入的 tag 筛选 UI、SEO 结构化数据。批量清理。
作用域:
- 28 份原文 + 26 份 .en/.zh 翻译 = 54 个文件
- 跳过 PR #307 已在处理的 4 份(rag, embedding, context-eng, ai-town),
由那个 PR 负责清理,合并顺序无关
- 纯文本改动,零 URL 变化,无需 301 redirects
内容标签分类覆盖:
- CommunityShare/Geek: image-hosting / self-hosting / cdn / git-workflow
- CommunityShare/Life: unsw / university-benefits / australia-study
- CommunityShare/Personal-Study-Notes: reinforcement-learning / ppo / gae
- ai/Introduction-of-Multi-agents-system: multi-agent-systems / agent-framework
- ai/MoE: mixture-of-experts / model-architecture
- ai/Multi-agents-system-on-Code-Translation: code-translation / llm-application
- ai/ai-math-basics: math-textbooks / learning-resources / book-recommendations
- ai/misc-tools: ml-experiment-tracking / swanlab
- ai/recommender-systems: 6 份王树森笔记统一 recommender-systems 前缀 +
各章节专属标签(feature-crossing / retrieval / cold-start / ranking 等)
- computer-science/cpp_backend: 8 份统一 cpp-backend 前缀 + 子主题
(threadpool / memory-pool / build-system / gcc / cmake / vcpkg)
- jobs: career / interview-preparation / internship / australia-job-market
流程:
1. Scan + 自己起草 tag 提案
2. 派 reviewer subagent 读每份文档前 50 行审标签(9 处被挑出修正全部采纳)
3. Python 脚本原子替换 frontmatter 里 " - tag-one" → 多行新 tags
4. grep 校验残留:仅剩 PR #307 的 4 个文件
docId 全部原样保留,sync-uuid 合并后不会误判为新文档。
* revert: ppo.md tag 改动挪到 PR #307 处理
背景:PR #307 (feat/docs-reorg-rag-projects) 的 phase 2 新增把
CommunityShare/Personal-Study-Notes/Reinforcement-Learning/ppo.md
移到 ai/reinforcement-learning/ppo.md 并同步更新 tags。
两个 PR 改同一个文件在同一行(tag-one → 真 tags)会 rebase 冲突。
本 PR 主动剔除对 ppo 的修改,由 PR #307 独占处理,merge 顺序无关。
其他 53 个文件(27 原文 + 26 翻译)的 tag 清理不受影响。
* refactor(docs): cpp_backend 目录树规范化 — 下划线 / 大驼峰 → kebab-case
背景:Involution Hell 文档站全站命名约定是 kebab-case,但 cpp_backend 整棵
子树残留早期混用风格:
- 下划线目录:cpp_backend / easy_compile
- 大驼峰目录:Handwritten_pool_components
- 下划线 + 大驼峰文件名:1_Handwritten_threadpool.md / 3_Make.md 等
批量规范化成 kebab-case,保留数字前缀以维持 sidebar 阅读顺序
(Fumadocs 按文件名字母序排 sidebar,去掉前缀会打乱 1→5 的教学顺序)。
变更:
- 3 个目录 rename
- 8 份原文 + 7 份 .en.md 翻译 = 17 个文件 git mv
- next.config.mjs 新增 async redirects(),8 条老 URL → 新 canonical 301 映射
使用 statusCode:301(不是 permanent:true 的 308),两者 SEO 等价,选 301
因识别最稳、和 PR 描述口径一致。Next.js 源码 allowedStatusCodes 里合法。
验证:
- git status 显示全部 R (rename),相似度 100%
- docId 守恒:grep "^docId:" 对照 8 个 docId 全部原样保留
- pnpm typecheck 通过
- node 实测 next.config.mjs 的 redirects() 返回 8 条全 statusCode:301
合并顺序:和 PR #307 / #308 独立,互不冲突(改动在完全不同的目录)。
流程:
1. 建分支 feat/docs-filename-kebab-case
2. mkdir 新目录 + git mv 17 个文件
3. rmdir 旧空目录
4. 加 301 redirects
5. reviewer subagent 审稿:误报 1(statusCode 实测 OK)+ 非阻塞 1
(generated/ JSON 由 sync-uuid CI 自动 regen,不应手动改)
6. 采纳 reviewer 关于注释措辞的建议,修掉 "HTTP/1.0" 这个不准的词
* refactor(docs): Option C IA 大重组 — 按读者意图分 learn/career/community/projects 四大区
Admin 反馈"目录结构要重新设计,很多内容过时"。经 owner 拍板选方案 C(按
读者意图分类),全站 docs 在本 PR 内一次到位,避免分多个 PR 把 contributors
的 review 路径切碎。
# 顶层结构(Before → After)
- ai/ → learn/ai/ (AI 学科知识)
- computer-science/ → learn/cs/ (CS 基础 + 系统)
- jobs/interview-prep/ → career/interview-prep/ (刷题 BQ OA VI)
- jobs/event-keynote/ → career/events/ (Coffee Chat / Mock Interview)
- CommunityShare/Leetcode/ → career/interview-prep/leetcode/ (50+ 题解归求职刷题)
- CommunityShare/Amazing-AI-Tools/perplexity-comet → community/tools/ (工具推荐)
- CommunityShare/Amazing-AI-Tools/prompt-repetition → community/papers/ (论文摘要)
- CommunityShare/Geek/leworldmodel → community/papers/ (JEPA paper)
- CommunityShare/Geek/*(其他) → community/dev-tips/ (开发技巧)
- CommunityShare/Language/ → community/language/
- CommunityShare/Life/ → community/life/
- CommunityShare/MentalHealth/ → community/mental-health/
- CommunityShare/Personal-Study-Notes/Reinforcement-Learning/ppo
→ learn/ai/reinforcement-learning/ppo
- all-projects/ + ai/projects/ → projects/(项目文档顶层化)
# 变更清单
1. 新增 4 个顶层区 index.mdx (learn / career / community 原有 / projects)
加上 SectionIndex 作为品类着陆页
2. 31 条 301 redirects(statusCode:301),覆盖所有老 URL
- 特殊文件级(RAG / leworldmodel / perplexity-comet / prompt-repetition /
ppo / swanlab / cpp_backend 老名字 / all-projects/ai-town 等)排前
- Wildcard 顶层区(/docs/ai/:path* / /docs/computer-science/:path* /
/docs/jobs/{interview-prep,event-keynote}/:path* / /docs/all-projects/:path* /
CommunityShare/{Leetcode,Language,Life,MentalHealth,Geek,Amazing-AI-Tools}/:path*)
排后做兜底
3. Hard-coded URL 修正:Hero.tsx / Footer.tsx / layout.tsx / source.ts /
SectionIndex.tsx / [...slug]/page.tsx 注释 / dev_docs/umami_tracking.md
4. data/event.json 三条 playback URL + coffee-chat.md 内链域名统一成
involutionhell.com + 路径指向新位置
5. SectionIndex root props 更新:
- community/index.mdx: root="community"
- career/interview-prep/leetcode/index.mdx: root="career/interview-prep/leetcode"
6. lib/source.ts pinyin transformer 前缀匹配更新
# docId 守恒
所有 289 个 .mdx/.md 文件的 docId 原样保留,sync-uuid workflow 合 main
后 backfill 按 docId 聚合,老贡献者 contributions 不变,longsizhuo 本轮
rename commit 在每个涉及的 docId 上 +1。
# reviewer subagent 审后修正
reviewer 审出 3 条 P0 死链 + 4 条 P1 index 缺失 + 3 条 P2 陈旧注释,全部
采纳并修完:
- P0 Footer /docs/career 404 → 新建 career/index.mdx
- P0 event.json playback 旧路径 → sed 批量替换
- P0 coffee-chat 内链 vercel.app + 旧路径 → 统一 involutionhell.com + 新路径
- P1 learn/ 和 projects/ 无 index → 新建 index.mdx
- P1 /docs/all-projects 裸路径无 redirect → 补 redirect 规则
- P2 SectionIndex / page.tsx / [...slug] / umami_tracking 注释旧术语 → sed 更新
# 后续工作
- Leetcode 50+ 题解文件名规范化(走 pinyin 路由,URL 规则特殊)
- frontmatter status 字段(active/deprecated/archived)机制接入
- archive/ 过期内容治理(本 PR 暂未创建目录,等 owner/admin 标记具体哪些过期)
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>1 parent dccce6b commit 6684884
420 files changed
Lines changed: 490 additions & 97 deletions
File tree
- app
- components
- docs
- docs
- [...slug]
- career
- events
- interview-prep
- leetcode
- community
- dev-tips
- CommonUsedMarkdown.assets
- Katex
- language
- life
- mental-health
- papers
- tools
- learn
- ai
- Introduction-of-Multi-agents-system
- MoE
- MOE-intro.assets
- Multi-agents-system-on-Code-Translation
- agents-todo
- cs294-194-196
- ai-math-basics
- calculus-optimization
- information-theory
- linear-algebra
- resources
- numerical-analysis
- probability-statistics
- resources
- compute-platforms
- foundation-models
- datasets
- deploy-infer
- evaluation
- finetune
- qkv-interview
- rag
- training
- generative-todo
- llm-basics
- courses
- cuda
- deep-learning
- d2l
- misc
- nlp
- embeddings
- qwen3-embedding
- pytorch
- index.assets
- transformer
- ai-by-hand
- methodology
- misc-tools
- model-datasets-platforms
- multimodal
- RQVAE
- index.assets
- VAE
- index.assets
- VQVAE
- index.assets
- courses
- llava
- index.assets
- mllm
- qwenvl
- video-mm-todo
- vit
- recommender-systems
- wangshusen_recommend_note
- images
- wangshusen_recommend_note_retrieval.assets
- reinforcement-learning
- cs
- cpp-backend
- easy-compile
- handwritten-pool-components
- data-structures
- array
- linked-list
- frontend
- frontend-learning
- projects
- data
- dev_docs
- lib
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| |||
Lines changed: 7 additions & 2 deletions
Lines changed: 7 additions & 2 deletions
0 commit comments