close-all
Installation
SKILL.md
Batch Close All Complete Increments
Closes all active increments that have reached 100% task completion by delegating each one to sw:done. This skill is a thin batch-discovery loop; all actual closure logic (gates, reports, sync) lives in sw:done.
Step 1: Discover Closeable Increments
for meta in $(find .specweave/increments -maxdepth 2 -name "metadata.json" | sort); do
st=$(jq -r '.status' "$meta" 2>/dev/null)
[ "$st" != "active" ] && [ "$st" != "in-progress" ] && [ "$st" != "ready_for_review" ] && continue
d=$(dirname "$meta"); id=$(basename "$d"); tasks="$d/tasks.md"
[ ! -f "$tasks" ] && continue
pending=$(grep -c '\[ \]' "$tasks" 2>/dev/null || echo 0)
done_count=$(grep -c '\[x\]' "$tasks" 2>/dev/null || echo 0)
if [ "$pending" -eq 0 ] && [ "$done_count" -gt 0 ]; then
echo "CLOSEABLE: $id"
fi
done