li-index

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

素材库索引维护

Material Library Index Maintenance

读书笔记库 / 核心概念库 / 爆款脚本库 / 04-方法论沉淀,以及未来新建的任何库。
两种模式:
  • 增量维护模式(默认):用户告知"加了一个文件",针对单个文件追加索引条目
  • 体检模式:用户说"索引体检",全库扫描 ↔ INDEX 比对,批量补齐漏录、清理失效条目

Reading Notes Library / Core Concepts Library / Viral Script Library / 04-Methodology Precipitation, and any newly created libraries in the future.
Two modes:
  • Incremental Maintenance Mode (default): When the user informs "added a file", append index entries for a single file
  • Health Check Mode: When the user says "index health check", scan the entire library ↔ INDEX for comparison, batch fill in missing entries, and clean up invalid entries

模式判断

Mode Judgment

用户触发词 → 判断模式:
- "加了 X" / "把这个放进索引" / "更新索引" → 增量维护模式
- "索引体检" / "检查索引" / "索引同步" / "补齐索引" → 体检模式

User trigger words → Determine mode:
- "Added X" / "Put this into the index" / "Update the index" → Incremental Maintenance Mode
- "Index health check" / "Check the index" / "Sync the index" / "Fill in missing index entries" → Health Check Mode

增量维护模式

Incremental Maintenance Mode

通用流程

General Process

第一步:确认目标库和新文件路径

Step 1: Confirm Target Library and New File Path

根据用户描述判断是哪个库,用 Glob 在
内容素材库/
下定位文件。如果路径完整,直接进入下一步。

Determine which library it is based on the user's description, and locate the file under
Content Material Library/
using Glob. If the path is complete, proceed to the next step directly.

第二步:完整读取新文件原文

Step 2: Fully Read the Original Text of the New File

用 Read 工具读取该文件全部内容,不要只读片段。
这是核心步骤:索引条目的适用场景和关键词必须来自原文。凭文件名/标题推断几乎必然不准——AI 以后用索引检索时会匹配不到,或匹配到了内容对不上。
读完后提取:
  • 核心主题:一句话概括这份内容讲什么
  • 适用场景:什么类型的选题/内容会用到它(具体到场景,如"讲拖延" "讲产品故事化")
  • 关键词:5-8 个,优先选反直觉、有具体操作、有独特视角的概念
关键词质量判断:
✅ 好的关键词❌ 差的关键词
止痛药vs维生素(有对比判断)创业方法(过于笼统)
多巴胺是期待感非快乐(颠覆常识)心理学知识(太宽泛)
如果-那就计划(有具体操作)目标设定技巧(无特色)

Use the Read tool to read the entire content of the file; do not read only fragments.
This is the core step: The applicable scenarios and keywords of index entries must come from the original text. Inferring based on file names/titles is almost always inaccurate—when AI retrieves using the index later, it will either fail to match or the content will not align.
After reading, extract:
  • Core Topic: A one-sentence summary of what this content is about
  • Applicable Scenarios: What types of topics/content will use it (specific to scenarios, e.g., "talking about procrastination" "talking about product storytelling")
  • Keywords: 5-8 terms, prioritizing counterintuitive concepts, those with specific operations, or unique perspectives
Keyword Quality Judgment:
✅ Good Keywords❌ Poor Keywords
Painkillers vs. Vitamins (with comparative judgment)Entrepreneurship Methods (too vague)
Dopamine is anticipation, not pleasure (subverts common sense)Psychological Knowledge (too broad)
If-Then Plan (with specific operations)Goal Setting Skills (no unique features)

第三步:读取目标库的索引文件,理解格式

Step 3: Read the Index File of the Target Library and Understand the Format

Read 对应库的索引文件,观察:
  • 表格列结构是什么?
  • 分区是按主题、还是按工作流阶段、还是按内容类型?
  • 文件路径的写法?有无特殊字符?
  • 是否有决策规则区?
新条目严格遵循现有格式,不要改变列结构或路径写法。

Read the index file of the corresponding library, observe:
  • What is the table column structure?
  • Is the partitioning by topic, workflow stage, or content type?
  • How is the file path written? Are there special characters?
  • Is there a decision rule section?
New entries must strictly follow the existing format; do not change the column structure or path writing style.

第四步:写入索引

Step 4: Write to the Index

在对应分区末尾追加新条目,然后判断是否需要更新决策规则:
  • 新内容覆盖了规则未涵盖的选题类型 → 新增规则
  • 新内容是某方向的有效补充 → 追加「或看『文件名』」
  • 与现有条目高度重叠 → 跳过

Append the new entry at the end of the corresponding partition, then determine whether to update the decision rules:
  • The new content covers topic types not included in the rules → Add a new rule
  • The new content is a valid supplement in a certain direction → Append "or see 'file name'"
  • Highly overlapping with existing entries → Skip

各库特殊说明

Special Instructions for Each Library

读书笔记库

Reading Notes Library

内容素材库/读书笔记库/INDEX.md
  • 分区逻辑:按主题分区(个人成长/心理/沟通/创业/哲学/技术/创作)
  • 特殊要求:书籍类文件通常很长,必须读完全文,不能只看前几段;书的核心观点往往在中后段
  • 路径注意:书名中可能含多个空格(如
    《黑客与画家》  保罗·格雷厄姆.md
    有双空格),路径必须与实际文件名一致

Content Material Library/Reading Notes Library/INDEX.md
  • Partition Logic: Partitioned by topic (Personal Growth/Psychology/Communication/Entrepreneurship/Philosophy/Technology/Creation)
  • Special Requirements: Book files are usually very long; you must read the entire text, not just the first few paragraphs; the core viewpoints of books are often in the middle to later sections
  • Path Notes: Book titles may contain multiple spaces (e.g.,
    《Hackers & Painters》  Paul Graham.md
    has double spaces), the path must match the actual file name exactly

核心概念库

Core Concepts Library

内容素材库/核心概念库/INDEX.md
  • 分区逻辑:按工作流阶段分区(选题阶段/脚本写作阶段/标题封面阶段),每个文件代表一套方法论或模板
  • 关键词方向:侧重方法框架名称(如"爆款公式""认知劫持"),而非书中的具体观点
  • 决策规则:规则要关联到具体创作步骤(深化选题时读哪个,生成脚本时读哪个)

Content Material Library/Core Concepts Library/INDEX.md
  • Partition Logic: Partitioned by workflow stage (Topic Selection Stage/Script Writing Stage/Title & Cover Stage), each file represents a set of methodologies or templates
  • Keyword Direction: Focus on method framework names (e.g., "Viral Formula" "Cognitive Hijacking"), rather than specific viewpoints in books
  • Decision Rules: Rules should be linked to specific creation steps (which one to read when deepening topics, which one to read when generating scripts)

爆款脚本库

Viral Script Library

内容素材库/爆款脚本库/爆款索引.md
  • 触发时机不同:这个索引只在内容发布后数据达到爆款标准时更新,不是添加新文件时更新
    • 平衡型爆款:点赞和收藏都 2000+
    • 收藏型爆款:收藏比 > 1.5
    • 涨粉型爆款:涨粉率 > 2%
  • 格式完全不同:每条是结构化条目,包含数据/类型/文件路径/可复用结构/金句,没有表格,也没有决策规则
  • 写入格式(参考现有条目):
    markdown
    #### [内容标题]
    - **数据**:点赞X、收藏X(收藏比X)、涨粉X(涨粉率X%)
    - **类型**:[内容类型,如方法论型/工具教程型/经历型]
    - **路径**`[文件路径]`
    - **可复用结构**  - 开场:[开场方式]
      - 主体:[主体结构]
      - 结尾:[结尾方式]
    - **金句**:"[最具代表性的一句话]"

Content Material Library/Viral Script Library/Viral Index.md
  • Different Trigger Timing: This index is only updated when post-publishing data meets viral standards, not when new files are added
    • Balanced Viral: Both likes and saves ≥ 2000+
    • Save-Focused Viral: Save ratio > 1.5
    • Follower-Growth Viral: Follower growth rate > 2%
  • Completely Different Format: Each entry is a structured item containing data/type/file path/reusable structure/golden sentence; there is no table or decision rules
  • Writing Format (refer to existing entries):
    markdown
    #### [Content Title]
    - **Data**: X likes, X saves (save ratio X), X new followers (follower growth rate X%)
    - **Type**: [Content type, e.g., Methodology/Tool Tutorial/Experience]
    - **Path**: `[File path]`
    - **Reusable Structure**:
      - Opening: [Opening method]
      - Main Body: [Main body structure]
      - Ending: [Ending method]
    - **Golden Sentence**: "[Most representative sentence]"

从零建立新库的 INDEX.md

Creating a New Library's INDEX.md from Scratch

如果目标库还没有索引文件,流程扩展为:
  1. Glob 找出该库下所有文件
  2. 逐一完整 Read 每个文件(不能跳过,可批量并行读取)
  3. 参考
    内容素材库/核心概念库/INDEX.md
    的格式新建文件,开头加 AI 使用规则
  4. 建好后,更新 li-topic/SKILL.md、li-writer/SKILL.md、CLAUDE.md,让 AI 创作流程中知道新索引的存在

If the target library does not have an index file yet, extend the process as follows:
  1. Use Glob to find all files under the library
  2. Read each file completely one by one (cannot skip; batch parallel reading is allowed)
  3. Refer to the format of
    Content Material Library/Core Concepts Library/INDEX.md
    to create a new file, and add AI usage rules at the beginning
  4. After creation, update li-topic/SKILL.md, li-writer/SKILL.md, and CLAUDE.md so that the AI creation process is aware of the new index

体检模式

Health Check Mode

触发词:「索引体检」「检查索引」「索引同步」「补齐索引」「index 体检」
Trigger words: "index health check", "check the index", "sync the index", "fill in missing index entries", "index 体检"

受体检的库(库注册表)

Libraries to Be Checked (Library Registry)

库根目录INDEX 文件扫描方式
内容素材库/读书笔记库/
INDEX.md
文件存在性:Glob 库下
*.md
(排除 INDEX.md)↔ INDEX 中已记录路径
内容素材库/核心概念库/
INDEX.md
文件存在性:Glob 库下
*.md
(排除 INDEX.md)↔ INDEX 中已记录路径
04-方法论沉淀/
INDEX.md
文件存在性:递归 Glob 所有
*.md
(排除 INDEX.md)↔ INDEX 中已记录路径
05-选题研究/
INDEX.md
文件存在性:分别校验「爆款话题分析报告」和「对标博主」两块,对标博主累计 ≥ 5 条才算需要单独列博主行
内容素材库/爆款脚本库/
爆款索引.md
数据阈值:交叉
03-数据统计/数据统计表.md
中达到爆款标准的行 ↔ 爆款索引中已记录的标题。漏录 = 数据达标但索引未收录;失效 = 索引中文件路径已不存在
Library Root DirectoryINDEX FileScanning Method
Content Material Library/Reading Notes Library/
INDEX.md
File Existence: Glob
*.md
under the library (exclude INDEX.md) ↔ Recorded paths in INDEX
Content Material Library/Core Concepts Library/
INDEX.md
File Existence: Glob
*.md
under the library (exclude INDEX.md) ↔ Recorded paths in INDEX
04-Methodology Precipitation/
INDEX.md
File Existence: Recursively Glob all
*.md
(exclude INDEX.md) ↔ Recorded paths in INDEX
05-Topic Research/
INDEX.md
File Existence: Verify the two sections "Viral Topic Analysis Report" and "Benchmark Bloggers" separately; benchmark bloggers need ≥ 5 entries to require a separate row
Content Material Library/Viral Script Library/
Viral Index.md
Data Threshold: Cross-reference rows that meet viral standards in
03-Data Statistics/Data Statistics Table.md
↔ Titles recorded in the Viral Index. Missing entries = Data meets standards but not indexed; Invalid entries = File paths in the index no longer exist

体检流程

Health Check Process

Step 1:扫描全库
对每个库并行执行:
  • Glob 列出库下实际文件
  • Read 对应 INDEX.md,从表格行/链接中提取已记录的相对路径
  • 计算两个集合:
    • 漏录
      = 实际存在 - INDEX 已记录
    • 失效
      = INDEX 已记录 - 实际存在
Step 2:输出体检报告
先把 diff 给用户看,不要直接动手
📋 索引体检报告

📚 读书笔记库
  漏录(X 个):
    - [文件路径]
  失效(X 个):
    - [INDEX 中存在但文件已不在的条目]

📚 核心概念库
  ...

📚 04-方法论沉淀
  ...

总计:漏录 X 条,失效 X 条
Step 3:等用户确认
「上面是 diff。要全部补齐吗?还是挑几个?失效条目是删除还是先标记?」
得到指令再进 Step 4。不要默认全自动
Step 4:补齐漏录
对用户确认要补的每个文件,按【增量维护模式】流程处理:完整 Read 原文 → 提取主题/场景/关键词 → 追加到对应库 INDEX 的正确分区。
可并行 Read 所有原文,但写入 INDEX 必须串行(避免编辑冲突)。
爆款脚本库的特殊处理
  • 漏录条目通常来自
    02-已发布内容/
    而非素材库本身
  • 写入
    爆款索引.md
    时使用现有的结构化格式(数据/类型/路径/可复用结构/金句),不要套用通用 INDEX 表格格式
  • 原文路径要写已发布内容的真实路径,不是脚本库内的路径
Step 5:处理失效条目
  • 用户选"删除" → 从 INDEX 表格/链接中删掉对应行
  • 用户选"标记" → 在条目尾追加
    ⚠️ 文件已不存在,待确认
Step 6:输出体检完成报告
✅ 体检完成
  补齐:X 条 → [列出新增条目]
  清理:X 条
  保留待人工处理:X 条
Step 1: Scan Entire Library
Execute in parallel for each library:
  • Use Glob to list actual files under the library
  • Read the corresponding INDEX.md, extract recorded relative paths from table rows/links
  • Calculate two sets:
    • Missing
      = Actual existing files - Recorded in INDEX
    • Invalid
      = Recorded in INDEX - Actual existing files
Step 2: Output Health Check Report
Show the diff to the user first, do not take action directly:
📋 Index Health Check Report

📚 Reading Notes Library
  Missing (X entries):
    - [File path]
  Invalid (X entries):
    - [Entries existing in INDEX but files no longer exist]

📚 Core Concepts Library
  ...

📚 04-Methodology Precipitation
  ...

Total: X missing entries, X invalid entries
Step 3: Wait for User Confirmation
"Above is the diff. Do you want to fill in all of them? Or select a few? Should invalid entries be deleted or marked first?"
Proceed to Step 4 only after receiving instructions. Do not default to fully automatic processing.
Step 4: Fill in Missing Entries
For each file confirmed by the user to be filled, process it according to the Incremental Maintenance Mode process: fully Read the original text → Extract topic/scenario/keywords → Append to the correct partition of the corresponding library's INDEX.
You can Read all original texts in parallel, but writing to INDEX must be done serially (to avoid editing conflicts).
Special Handling for Viral Script Library:
  • Missing entries usually come from
    02-Published Content/
    rather than the material library itself
  • When writing to
    Viral Index.md
    , use the existing structured format (data/type/path/reusable structure/golden sentence); do not apply the general INDEX table format
  • The original text path should be the real path of the published content, not the path within the script library
Step 5: Handle Invalid Entries
  • If user selects "Delete" → Remove the corresponding row from the INDEX table/links
  • If user selects "Mark" → Append
    ⚠️ File no longer exists, pending confirmation
    at the end of the entry
Step 6: Output Health Check Completion Report
✅ Health Check Completed
  Filled in: X entries → [List new entries]
  Cleaned up: X entries
  Retained for manual processing: X entries

体检模式注意事项

Health Check Mode Notes

  1. 路径写法要和 INDEX 一致:有的 INDEX 用
    相对路径.md
    ,有的用
    [名](路径)
    ,要识别现有格式
  2. 同名异路径不算漏录:例如 INDEX 写
    《X》.md
    实际文件是
    《X》  作者.md
    (含双空格),算路径错误而非漏录,应先 Ask 用户
  3. 不读爆款脚本库:上面已说明
  4. 大库优先并行 Read:方法论沉淀可能有十几个文件,全部并行读完再开始写
  1. Path writing must match INDEX: Some INDEX use
    relative-path.md
    , some use
    [name](path)
    ; you must identify the existing format
  2. Same name different path is not considered missing: For example, INDEX writes
    《X》.md
    but the actual file is
    《X》  Author.md
    (with double spaces), this is a path error rather than missing; you should Ask the user first
  3. Do not read the Viral Script Library: Explained above
  4. Prioritize parallel Read for large libraries: Methodology Precipitation may have dozens of files; read all in parallel before starting to write