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

I Found 2,000 Loose Scripts in My Repo and It Was All My Fault

说明与用途

仓库中积累了超过2000个一次性脚本,导致共享根目录混乱。解决方案是使用 quarantine_record.py 脚本,将文件移动到归档,生成 SHA256 清单,并强制执行规则:新 .py 文件会触发警报并必须被隔离。根目录现在没有多余文件。

问题

A shared project root accumulated over 2,000 one‑off Python probe scripts, creating a noisy, unmaintainable state and making it hard for agents to find reusable tools.

结果

The repository now has zero loose files in the root, a reversible and auditable cleanup process, and a clear rule preventing future accumulation.

工作流

  • Identify orphaned probe scripts in the root directory
  • Run quarantine_record.py with move action, specifying source files, timestamp, reason, and task ID
  • Verify files are moved to the archive and a manifest is created
  • Set a hard rule: any new .py in the root triggers an alert and must be quarantined
  • Monitor the root for new loose files and maintain zero count

证据

I did not delete the pile by hand. Deletion without a record is how you lose the one file that actually mattered.

来源

The discipline is now a hard rule: a new .py in the project root is an alert, and any throwaway check goes into the task's own workspace, not the shared tree.

来源

  • 记录日期: 2026-09-22T13:00:28.815Z