GridWork HQ
AI Pipelines

Archive Outputs Pipeline

Automated rotation of pipeline output files older than 7 days.

Archive Outputs Pipeline

The archive-outputs pipeline moves old output files from the knowledge vault to a dated archive folder, keeping the active output directory clean.

Quick Reference

FieldValue
Triggerarchive-outputs (manual) or cron
DomainOperations
ModelHaiku
RequiresAccess to .output/ directory
OutputNo output file — this is a maintenance task

What It Does

  1. Checks knowledge/.output/ for files older than 7 days (by modification time)
  2. Creates a dated archive folder: ~/agency-workspace/archive/archive-YYYY-MM-DD/
  3. Moves each old file to the archive, preserving subdirectory structure
  4. Removes moved files from git and commits the change
  5. Logs the count of moved files

Rules

  • Only moves files older than 7 days
  • Never deletes files — moves only
  • Does not touch .output/compiled/ or .output/reports/ directories
  • Never removes .gitkeep files
  • If no files are older than 7 days, exits silently

On this page