Fix leaked Google Docs comment markers on the clusters page

Merged
LU
4mo ago
+10-10

Summary

  • Six cluster/sub-cluster descriptions on the live /clusters/ page showed literal bracket artifacts like process:[ag][ah] and feedback[ai][aj], have received instead of clean prose.
  • Root cause: scripts/parse_clusters_to_sheet.py fetches the source Google Doc via its plain-text export (export?format=txt). Google Docs' plain-text export represents unresolved inline comments as bracketed reference codes (a, b, ... aa, ab, ...) inserted directly into the body text at the comment's anchor point.
  • The script already had an extract_annotations() helper built for exactly this pattern (used for citation text and sub-cluster ToC names), but the code paths that build cluster- and sub-cluster-level description text appended the raw, uncleaned line instead — 5 call sites across parse_cluster_toc(), parse_subclusters_standard(), and parse_cluster_11().

Changes

  • Fixed all 5 call sites to strip annotation markers, so future re-syncs from the Google Doc won't reintroduce this even if comments are left open.
  • Directly cleaned the 6 already-leaked instances in data/clusters_v4.json with a minimal, scoped fix targeting only the affected fields — not a full re-sync from the live doc, to avoid pulling in unrelated content drift.

Test plan

  • Rebuilt the site locally and confirmed 0 occurrences of the leaked markers in the rendered /clusters/ page
  • Confirmed the diff only touches the 5 affected description fields, nothing else

šŸ¤– Generated with Claude Code