Material Library Index Maintenance
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
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
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
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 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
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
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
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]"
Creating a New Library's INDEX.md from Scratch
If the target library does not have an index file yet, extend the process as follows:
- Use Glob to find all files under the library
- Read each file completely one by one (cannot skip; batch parallel reading is allowed)
- 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
- 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
Trigger words: "index health check", "check the index", "sync the index", "fill in missing index entries", "index 体检"
Libraries to Be Checked (Library Registry)
| Library Root Directory | INDEX File | Scanning Method |
|---|
Content Material Library/Reading Notes Library/
| | File Existence: Glob under the library (exclude INDEX.md) ↔ Recorded paths in INDEX |
Content Material Library/Core Concepts Library/
| | File Existence: Glob under the library (exclude INDEX.md) ↔ Recorded paths in INDEX |
04-Methodology Precipitation/
| | File Existence: Recursively Glob all (exclude INDEX.md) ↔ Recorded paths in INDEX |
| | 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/
| | 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: 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:
- = Actual existing files - Recorded in INDEX
- = 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 rather than the material library itself
- When writing to , 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
- Path writing must match INDEX: Some INDEX use , some use ; you must identify the existing format
- Same name different path is not considered missing: For example, INDEX writes but the actual file is (with double spaces), this is a path error rather than missing; you should Ask the user first
- Do not read the Viral Script Library: Explained above
- Prioritize parallel Read for large libraries: Methodology Precipitation may have dozens of files; read all in parallel before starting to write