Software Teams Cleanup
AI-generatedSummary
Clean up run-specific Software Teams files and Git worktrees using a correlation ID. If the Correlation ID is blank, the node parses it from the incoming item's merged pull request body; optional paths override locations derived from the Runs Base Directory and correlation ID.
Inputs
- Correlation ID — Run identifier used to select artefacts for cleanup. Leave blank to parse the machine-readable tag from the incoming item's pull request body.
- Runs Base Directory — Base directory for run cleanup paths; defaults to the configured environment value or
/data/software-teams-runs. Clone and plan artefact deletion paths are guarded to remain within this directory where applicable. - Worktree Path — Git worktree directory to remove. When blank, defaults to
<runsBaseDir>/<correlationId>/worktrees. - Clone Path — Repository clone directory to remove. When blank, defaults to
<runsBaseDir>/<correlationId>/clone. - Agent Memories Base — Base directory for per-run agent memory cleanup. When blank, defaults to
<runsBaseDir>/<correlationId>/memories. - Plans Directory — Directory containing plan and task artefacts; defaults to
.software-teams/plans. Cleanup targets only run-scoped artefacts matching the correlation ID and a matching per-run subdirectory, not the directory itself.
Output shape
A list of n8n items containing the incoming item data with cleanup results added.
The source pack's executable body is omitted, so it does not establish the exact output fields or whether the incoming data is preserved. Cleanup helpers are idempotent for missing paths; worktree removal and per-entry cleanup handle failures best-effort. The correlation ID must be available for run-scoped cleanup.
Examples
Example 1: Clean up a run after processing a merged pull request
Leave Correlation ID blank to read the machine-readable tag from the incoming pull request body. Leave paths blank to use locations derived from Runs Base Directory and the ID; set Plans Directory if the workflow stores plans elsewhere.