cm_core.py as foundation. How ID generation, duplicate detection and temporal metadata work.
All 13 other scripts import cm_core. It provides: workspace management, ID generation, index I/O, history logging, tag normalization, duplicate detection and the temporal metadata factory.
generate_id() normally reads the index from disk. Problem: cm_ingest with --split creates 10 nodes in a loop. The disk index is written only at the end โ all IDs would be identical. Fix: optional in-memory index parameter.
find_similar_nodes compares title words and tags via set operations. Threshold 0.6 = 60% word overlap. No ML, no API calls โ just sets. Fast, transparent, deterministic.
Each node can carry source_date, valid_from, valid_until and temporal_confidence. The factory function creates the dict, cm_add.py stores it in the index.