wm_clean
Plan and execute policy-driven cleanup: dry-run returns the exact files to move to the recycle area with SHA-256 hashes, while execution applies the plan and journals every action for rollback.
Instructions
Plan or execute a policy-driven cleanup. By default it is a dry-run: returns the exact plan (what would be moved to the recycle area, with per-file SHA-256 hashes) and changes nothing. Pass execute=true to apply the plan: items are moved to a recycle area, never deleted by pattern, and every action lands in the hash-chained journal so rollback is possible. Use it when the workspace has accumulated policy-expired byproducts. Do NOT set execute=true without first running a dry-run and confirming the plan; G3 execution additionally requires approve=true and an approver.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grades | No | Comma-separated grades to clean, e.g. 'G4' or 'G3,G4'. Defaults to G4, the most aggressive auto-cleanable grade. | G4 |
| approve | No | Human approval gate; required together with 'approver' for G3-grade execution. | |
| execute | No | When false (default) this is a dry-run and nothing changes; set true to actually move files to the recycle area. | |
| approver | No | Name of the person or system approving G3 execution; required when grades include G3 and is recorded in the audit journal. | |
| decision_id | No | Link this run to a prior wm_govern decision_id so the journal shows intent -> decision -> execution. Optional. |