Problem
Workspace bloat is invisible until macOS complains or a command times out. DMC should proactively surface workspace health because it owns the runtime/workspace bridge.
Proposed solution
Add a scheduled workspace hygiene report, likely as a Data Machine system task registered by DMC.
The task should summarize:
- Total workspace size.
- Free disk space.
- Worktree count.
- Top repos by worktree size.
- Biggest cleanup candidates.
- Dirty/unpushed protected worktrees.
- Missing metadata / external worktree skips.
- Suggested cleanup command.
Delivery options
- CLI command for on-demand report.
- Recurring Data Machine system task for daily/weekly checks.
- Optional agent memory/log entry or Discord notification depending on site configuration.
Acceptance criteria
- There is an on-demand command that prints the hygiene report.
- There is a scheduled task hook/handler that can run the same report.
- The report does not require destructive actions.
- The report has JSON output for automation.
- The report highlights emergency thresholds, e.g. free disk below
20 GiB.
Example summary
Workspace hygiene report
- Free disk: 12.4 GiB (warning)
- Workspace size: 512.7 GiB
- Worktrees: 423
- Top repo: homeboy, 188 worktrees, 481.2 GiB
- Cleanup candidates: 91 clean merged/closed worktrees, estimated 274.3 GiB
- Protected: 12 dirty, 4 unpushed, 3 active symlink targets
Suggested next command:
wp datamachine-code workspace worktree cleanup --dry-run --sort=size
Problem
Workspace bloat is invisible until macOS complains or a command times out. DMC should proactively surface workspace health because it owns the runtime/workspace bridge.
Proposed solution
Add a scheduled workspace hygiene report, likely as a Data Machine system task registered by DMC.
The task should summarize:
Delivery options
Acceptance criteria
20 GiB.Example summary