Skip to content

[Feature] Cleaning ceremony to remove stale temp/scratch files #791

Closed

Description

@tamirdresher

Cleaning Ceremony

Problem

Even with a dedicated temp directory, files accumulate over time:

  • Old session logs
  • Stale orchestration logs
  • Abandoned worktree artifacts
  • Expired decision inbox files that were never merged
  • Old observation archive files

Proposed solution

Add a built-in cleanup ceremony that runs:

  • Automatically: After every 10 Ralph rounds (configurable)
  • Manually: User says "clean up" or "housekeeping"

What it cleans

  1. .squad/.tmp/ — delete everything (it's temp)
  2. .squad/orchestration-log/ — archive entries older than 30 days
  3. .squad/log/ — archive entries older than 30 days
  4. Repo root — scan for known temp file patterns and move to .squad/.tmp/
  5. Stale worktrees — remove worktrees for merged branches
  6. Stale decision inbox files — warn about inbox files older than 7 days

Implementation

  • New capability in watch: cleanup plugin
  • New ceremony in ceremonies.md: cleanup with when: 'after' trigger
  • Scribe handles the actual file operations (already owns .squad/ state)

Activity

  1. bradygaster commented on Apr 25, 2026

    @bradygaster
    Collaborator

    Closed by #theSquadsquad triage — verified fixed/superseded in v0.9.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions