Loom Maintain
Vault governance: validate → migrate → connect → evolve → index.
Read First
references/schemas.md
<vault-root>/.loom/config.yaml if it exists (vault configuration)
Validate
Run read-only vault health check.
python3 scripts/scan_vault.py <vault-root>
python3 scripts/validate_vault.py <vault-root>
Output: validation report with blocking errors and migration warnings.
Rules:
- Never write files.
- Separate blocking errors from legacy-compatibility warnings.
- Treat legacy warnings as migration candidates, not failures.
Migrate
Scan and migrate a legacy Markdown vault into the Loom schema.
Migration workflow
- Scan vault to inventory: directory presence, note counts by year/status, missing frontmatter, status values, link-only topics, broken links, index existence.
- Propose staged plan:
- Initialize indexes without modifying notes.
- Add missing frontmatter to high-confidence files.
- Normalize status values only if requested.
- Convert selected link-only Topic Notes into synthesis notes.
- Validate links and index consistency.
- Apply only when user explicitly requests writes.
python3 scripts/scan_vault.py <vault-root>
python3 scripts/validate_vault.py <vault-root>
python3 scripts/build_indexes.py <vault-root>
Migration rules
- Default is read-only. Generate report before changing anything.
- Preserve all content and unknown frontmatter.
- Prefer additive changes.
- Do not move assets unless requested.
- Before writing, summarize: files to create, files to update, fields to add, files left unchanged.
Topic Note
Convert trusted research into durable Topic Notes.
Input priority
- Synthesis Pack (from deep-read).
reviewed Daily Notes.
- Final or Published Article.
Topic creation flow
Structural decomposition:
- Identify the irreducible generators of the topic.
- Map how they combine to produce observed phenomena.
- Draw ASCII structural diagram.
Depth layers:
- Layer: surface facts → mechanisms → principles → axioms.
- Mark where knowledge is solid vs. uncertain.
Output
- Synthesis Topic Note in
02_Topic_Notes/<Category>/.
- Category directories use Pascal_Case.
- Filename:
YYYY-MM-DD_Title-With-Words.md.
- When updating, increment minor version (1.0.0 → 1.1.0).
- Schema details in
references/schemas.md (Topic Note section).
Topic rules
- Use calm knowledge-base voice. Not article rhetoric or platform tone.
- Focus on structure, mechanisms, applicability, boundaries, related work, reusable insights.
- Do not default to unreviewed Draft input. If user insists, mark source confidence explicitly.
- Preserve link-only Topic Notes unless user requests synthesis.
- After creating or updating a Topic Note, rebuild indexes (see Index Rebuild).
Connect
Discover and compile structured connections between Topic Notes.
Connection flow
Incremental mode (default when new Topics exist):
- Compare only new/updated Topic Notes against existing Topics.
- Skip pairs already present in CONNECTION_INDEX.
- Full scan only when explicitly requested or when no CONNECTION_INDEX exists.
Multi-perspective contrast:
- Bring different topic perspectives into dialogue.
- Identify where topics support, contradict, or extend each other.
- Moderator synthesis of cross-topic relationships.
Shared generator mapping:
- Find generators that appear across multiple topics.
- Map which phenomena they explain in each context.
Output
- New or updated
00_Index/CONNECTION_INDEX.md entries.
Connection rules
- Valid types:
迁移, 混搭, 反转.
- Every insight must be concrete and actionable.
- Do not duplicate existing topic pairs in either direction.
- Newest connections first.
- Connect discovers structural links between finalized Topic Notes. It is not a re-analysis of sources — analytical synthesis of raw Source Briefs belongs in deep-read's Synthesis Pack, not here.
Evolve
Generate evolution summaries from existing indexes.
Input
00_Index/TIMELINE_INDEX.md
00_Index/TOPIC_INDEX.md
00_Index/CONNECTION_INDEX.md
- Full Topic Notes only when needed for depth.
Output
- Monthly:
03_Content_Output/Longform/Evolution_YYYY-MM.md
- Quarterly:
03_Content_Output/Longform/Evolution_YYYY-QN.md
- Annual:
03_Content_Output/Longform/Evolution_YYYY.md
Evolution structure
- 本期新增主题 — new topics with category, core idea, why it matters.
- 本期关键发现 — 3-8 cross-topic findings prioritized over single-topic facts.
- 知识演进趋势 — growth areas, theme changes, exits/archives, overall direction.
- 跨领域连接发现 — from CONNECTION_INDEX filtered by period; cumulative statistics.
- 附录数据 — quantitative metrics.
Token efficiency
- Monthly: read TIMELINE_INDEX (target month) + TOPIC_INDEX + Topic Notes listed as new/updated.
- Quarterly: read 3 monthly TIMELINE sections; prefer existing monthly summaries.
- Annual: read quarterly summaries; only read full Topic Notes for most impactful topics.
- Filter CONNECTION_INDEX by period. Do NOT re-run connection analysis.
Evolution rules
- Do not re-run connection discovery. Use existing CONNECTION_INDEX entries.
- For quarterly/annual, prefer existing lower-period summaries when available.
Index Rebuild
Rebuild deterministic vault indexes.
# Dry run
python3 scripts/build_indexes.py <vault-root>
# Write
python3 scripts/build_indexes.py <vault-root> --write
Rules:
- Match topics by exact title, preserve existing row order.
- Do not generate new knowledge insights during indexing.
- Prefer dry-run before writing.
1---2name: loom-maintain3description: Validate, migrate, discover connections, generate evolution summaries, create Topic Notes, and rebuild indexes for a Loom vault. Use when the user asks to check vault health, migrate a legacy vault, find cross-topic connections, generate evolution reports, create or update Topic Notes, or rebuild indexes.4---56# Loom Maintain78Vault governance: validate → migrate → connect → evolve → index.910## Read First1112- `references/schemas.md`13- `<vault-root>/.loom/config.yaml` if it exists (vault configuration)1415## Validate1617Run read-only vault health check.1819```bash20python3 scripts/scan_vault.py <vault-root>21python3 scripts/validate_vault.py <vault-root>22```2324Output: validation report with blocking errors and migration warnings.2526Rules:27- Never write files.28- Separate blocking errors from legacy-compatibility warnings.29- Treat legacy warnings as migration candidates, not failures.3031## Migrate3233Scan and migrate a legacy Markdown vault into the Loom schema.3435### Migration workflow36371. Scan vault to inventory: directory presence, note counts by year/status, missing frontmatter, status values, link-only topics, broken links, index existence.382. Propose staged plan:39 - Initialize indexes without modifying notes.40 - Add missing frontmatter to high-confidence files.41 - Normalize status values only if requested.42 - Convert selected link-only Topic Notes into synthesis notes.43 - Validate links and index consistency.443. Apply only when user explicitly requests writes.4546```bash47python3 scripts/scan_vault.py <vault-root>48python3 scripts/validate_vault.py <vault-root>49python3 scripts/build_indexes.py <vault-root>50```5152### Migration rules5354- Default is read-only. Generate report before changing anything.55- Preserve all content and unknown frontmatter.56- Prefer additive changes.57- Do not move assets unless requested.58- Before writing, summarize: files to create, files to update, fields to add, files left unchanged.5960## Topic Note6162Convert trusted research into durable Topic Notes.6364### Input priority65661. Synthesis Pack (from deep-read).672. `reviewed` Daily Notes.683. Final or Published Article.6970### Topic creation flow7172**Structural decomposition:**73- Identify the irreducible generators of the topic.74- Map how they combine to produce observed phenomena.75- Draw ASCII structural diagram.7677**Depth layers:**78- Layer: surface facts → mechanisms → principles → axioms.79- Mark where knowledge is solid vs. uncertain.8081### Output8283- Synthesis Topic Note in `02_Topic_Notes/<Category>/`.84- Category directories use Pascal_Case.85- Filename: `YYYY-MM-DD_Title-With-Words.md`.86- When updating, increment minor version (1.0.0 → 1.1.0).87- Schema details in `references/schemas.md` (Topic Note section).8889### Topic rules9091- Use calm knowledge-base voice. Not article rhetoric or platform tone.92- Focus on structure, mechanisms, applicability, boundaries, related work, reusable insights.93- Do not default to unreviewed Draft input. If user insists, mark source confidence explicitly.94- Preserve link-only Topic Notes unless user requests synthesis.95- After creating or updating a Topic Note, rebuild indexes (see Index Rebuild).9697## Connect9899Discover and compile structured connections between Topic Notes.100101### Connection flow102103**Incremental mode (default when new Topics exist):**104- Compare only new/updated Topic Notes against existing Topics.105- Skip pairs already present in CONNECTION_INDEX.106- Full scan only when explicitly requested or when no CONNECTION_INDEX exists.107108**Multi-perspective contrast:**109- Bring different topic perspectives into dialogue.110- Identify where topics support, contradict, or extend each other.111- Moderator synthesis of cross-topic relationships.112113**Shared generator mapping:**114- Find generators that appear across multiple topics.115- Map which phenomena they explain in each context.116117### Output118119- New or updated `00_Index/CONNECTION_INDEX.md` entries.120121### Connection rules122123- Valid types: `迁移`, `混搭`, `反转`.124- Every insight must be concrete and actionable.125- Do not duplicate existing topic pairs in either direction.126- Newest connections first.127- Connect discovers structural links between finalized Topic Notes. It is not a re-analysis of sources — analytical synthesis of raw Source Briefs belongs in deep-read's Synthesis Pack, not here.128129## Evolve130131Generate evolution summaries from existing indexes.132133### Input134135- `00_Index/TIMELINE_INDEX.md`136- `00_Index/TOPIC_INDEX.md`137- `00_Index/CONNECTION_INDEX.md`138- Full Topic Notes only when needed for depth.139140### Output141142- Monthly: `03_Content_Output/Longform/Evolution_YYYY-MM.md`143- Quarterly: `03_Content_Output/Longform/Evolution_YYYY-QN.md`144- Annual: `03_Content_Output/Longform/Evolution_YYYY.md`145146### Evolution structure1471481. 本期新增主题 — new topics with category, core idea, why it matters.1492. 本期关键发现 — 3-8 cross-topic findings prioritized over single-topic facts.1503. 知识演进趋势 — growth areas, theme changes, exits/archives, overall direction.1514. 跨领域连接发现 — from CONNECTION_INDEX filtered by period; cumulative statistics.1525. 附录数据 — quantitative metrics.153154### Token efficiency155156- Monthly: read TIMELINE_INDEX (target month) + TOPIC_INDEX + Topic Notes listed as new/updated.157- Quarterly: read 3 monthly TIMELINE sections; prefer existing monthly summaries.158- Annual: read quarterly summaries; only read full Topic Notes for most impactful topics.159- Filter CONNECTION_INDEX by period. Do NOT re-run connection analysis.160161### Evolution rules162163- Do not re-run connection discovery. Use existing CONNECTION_INDEX entries.164- For quarterly/annual, prefer existing lower-period summaries when available.165166## Index Rebuild167168Rebuild deterministic vault indexes.169170```bash171# Dry run172python3 scripts/build_indexes.py <vault-root>173174# Write175python3 scripts/build_indexes.py <vault-root> --write176```177178Rules:179- Match topics by exact title, preserve existing row order.180- Do not generate new knowledge insights during indexing.181- Prefer dry-run before writing.