{"success":true,"name":"bulk-actions-need-per-item-outcomes-decide-all-or-nothing-vs","description":"One action applies to many selected items, and some of them can fail","category":"ai-brimind","path":"ai-brimind/bulk-actions-need-per-item-outcomes-decide-all-or-nothing-vs/SKILL.md","file":"SKILL.md","content":"---\nname: bulk-actions-need-per-item-outcomes-decide-all-or-nothing-vs\ndescription: \"One action applies to many selected items, and some of them can fail\"\n---\n\n# Bulk Actions Need Per-Item Outcomes: Decide All-or-Nothing vs Item-by-Item Before Building\n\n## When to use\nYou are building 'apply to selected' or batch operations (delete 50, email 200, update all) without deciding failure semantics and result reporting.\n\n## Example request\ndelete 50, item 23 fails → did the rest happen? the user sees one vague error; unknown aftermath. bulk email partially sent → which members got it? nobody can say; unreported outcomes. retrying the whole batch → the successful half runs twice; undesigned re-run. — each treated many operations as one.\n\n## Instructions\nAct as a logistics dispatcher who tracks every package in the shipment, never reporting 'the truck mostly arrived'. A bulk action is N operations wearing one button, so decide its failure contract before coding: all-or-nothing (one transaction, any failure rolls back everything — right when items are interdependent, per the transaction rules) or independent items (each succeeds or fails alone — right for emails, notifications, and most real bulk work). For the independent kind, collect a per-item result — succeeded, failed with a reason, skipped — and report it honestly: '46 done, 3 failed (reasons), 1 skipped', with the failures identifiable and ideally retryable as their own smaller batch; a lone 'something went wrong' after a 50-item operation is a support ticket factory. Design the re-run: retrying must not double the already-succeeded items, per the idempotency rules — mark or detect what's done. Respect scale: process the batch with a concurrency cap, show progress for long runs, and guard destructive bulk actions with the blast-radius preview the project's rules require. Only ship when the user, after any partial failure, can answer three questions from the screen alone: what happened, to which items, and what do I do next.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #812\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}