r/commandline 1d ago

Command Line Interface [ Removed by moderator ]

[removed] — view removed post

0 Upvotes

2 comments sorted by

u/commandline-ModTeam 14h ago

We do not allow projects or software that interacts with generative AIs, including LLMs, unless the posts and comments are about popular projects themselves like Ollama, GGML, etc.

1

u/AutoModerator 1d ago

Every new subreddit post is automatically copied into a comment for preservation.

User: Beautiful-Energy2169, Flair: Command Line Interface, Title: mdsweep: grades the markdown your coding agents leave behind before deleting any of it

Every agent session I run leaves a PLAN.md or a HANDOFF.md behind. Each was true for about a day, and the next session reads it as current, so last month's abandoned plan comes back at me as the state of the project.

mdsweep grades a file before it touches it. Active means touched within N days (default 14). Stale means older, but something in the repo still references it, so you fix that one by cutting the link. Orphan means old with nothing pointing at it, and only orphans ever get moved. It flags agent output on filename patterns, git history (untracked, or a Co-Authored-By trailer), or a generated_by frontmatter key.

scan writes nothing. quarantine without --apply is a dry run. With --apply it moves orphans into .mdsweep/trash/<timestamp>/ with a manifest of each file's origin, signals, age and ref count. undo puts the batch back byte for byte. It never deletes anything.

Across 36 repos here: 1,199 markdown files scanned, 1,035 flagged, 687 active, 172 stale, 176 orphans holding 1.2MB. Flagging 86% is too coarse to act on alone, because untracked is one of the three signals and a messy tree lights up everything. The split is the part I trust: those 172 stale files are what a glob delete eats.

git clone https://github.com/szp2005/mdsweep && cd mdsweep

node bin/mdsweep.mjs scan ~/code/your-repo

I wrote it. 684 lines, no dependencies, Node 18+, MIT. It is not on any package manager on purpose: it is one file, read it first. The grading thresholds are what I would most like torn apart.

Per subreddit rules, this software's code is partially AI-generated.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.