Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Twelve of thirteen stale docs were kept alive only by each other

Описание и применение

Большое количество устаревших Markdown‑файлов в репозиториях было безопасно перемещено в корзину, используя инструмент mdsweep, который классифицирует файлы по возрасту и ссылкам.

Задача

A large number of markdown documentation files in many repos were old and potentially unnecessary, but simple age‑based deletion would risk removing files that were still referenced within the repo.

Результат

The tool identified 687 active, 172 stale, and 176 orphan markdown files across 36 repos. Orphan files were safely moved to a trash directory, preserving a manifest for restoration. The approach avoided accidental deletion of referenced files while cleaning up truly unused documentation.

Рабочий процесс

  • 1. Scan repo for markdown files and collect metadata (age, inbound links).
  • 2. Classify each file: if age <= threshold → active; else if refs > 0 → stale; else → orphan.
  • 3. For orphan files, move them to .mdsweep/trash/<timestamp>/ and record original path in a manifest.
  • 4. Optionally run the tool with --apply to perform the move; otherwise review the report.
  • 5. Use mdsweep undo to restore files if needed.
  • 6. Periodically run the scan to keep the repo tidy.

Доказательства

Across those 36 repos: 687 active, 172 stale, 176 orphan.

Источник

Orphans get moved rather than deleted. fs.renameSync puts them in .mdsweep/trash/<timestamp>/ next to a manifest that records every original path.

Источник

  • Дата записи: 2026-09-15T22:00:15.187Z