Confirmation gate before any bulk delete, cleanup, or destructive operation that could result in data loss — shell-level (rm -rf, git rm, bulk sed) or brain-level (bulk forget, delete sweeps, purge-deleted, source removal, raw-SQL truncation). Presents a recoverability card and requires an explicit "yes" from the user before proceeding. Routing convention, not an operation-boundary enforcement.
71
88%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Convention: see conventions/brain-first.md — inspect the actual target before proposing deletion:
get_backlinks,gbrain graph <slug>,git logon the underlying files. The confirmation card below is only as good as the inspection behind it.Convention: see _brain-filing-rules.md — the post-confirmation deletion log files date-keyed under
daily/.
A gate that fires BEFORE any destructive operation and requires explicit user confirmation. The agent stops, presents a recoverability card, and waits.
Scope honesty: this gate is a routing convention — the harness resolves it
into context when a destructive intent matches, and a well-behaved agent
follows it. It is NOT an operation-boundary enforcement: nothing in the gbrain
runtime mechanically blocks a delete if the skill never loads. (A native
confirm gate at the operation boundary is a filed TODO; until it lands, this
convention is the line of defense.) Some CLI surfaces carry their own flag
gates — e.g. gbrain sources remove requires --confirm-destructive — but
the flag confirms that the AGENT is sure. This skill exists to confirm that
the USER is.
Before ANY of these operations:
Shell / filesystem level:
rm -rf on any directory with datarm / unlink on more than 10 filessed -i that modifies more than 10 filesgit rm on tracked filesBrain / database level (gbrain-specific):
gbrain forget <fact-id> over many
facts. One forget is a considered, idempotent act; a forget sweep is data loss.gbrain delete <slug> in a loop, or any script that
sweeps delete_page across a set of slugs. Deletes are soft (recoverable via
gbrain restore <slug>) until purged — say so on the card, then gate anyway:
a sweep that's wrong in bulk is expensive to un-wrong in bulk.gbrain purge-deleted — permanently removes soft-deleted pages. This is
the point of no return for the soft-delete safety net.gbrain sources remove <id> deletes the source AND
every page in it. The --confirm-destructive flag does not substitute for
the card.gbrain mounts remove <id> only removes the local
registration (the mounted brain's database survives; re-add to recover). Gate
it anyway when the flow ALSO plans to delete the mount's underlying database
or files — then the full card applies to those.DROP TABLE, TRUNCATE, or DELETE without a
narrow WHERE against the brain database, via any path (psql, a migration
script, an engine executeRaw call).Do NOT run the destructive command. Inspect the actual target first (backlinks, graph edges, git history, file contents — whatever grounds the card), then present the user with:
⚠️ DATA DELETION — Confirmation Required
What: [exactly what will be deleted/modified]
Count: [number of files/rows/pages/facts affected]
Size: [how much data will be removed]
Location: [exact paths, slugs, or source/mount ids]
Why: [the reason for the deletion]
Recoverable?
- [ ] Backed up to a remote (git remote, database backup, object storage)
- [ ] In git history (can git checkout)
- [ ] Soft-deleted in the brain (restorable via `gbrain restore` until purged)
- [ ] Re-fetchable from an upstream source (which one, how long)
- [ ] NOT recoverable — permanent data loss
What we'd lose:
- [specific data/capability that would be gone]
- [any downstream systems that depend on this data]
Alternative to deletion:
- [compress instead of delete?]
- [move to cold storage?]
- [archive to a remote backup?]
- [soft-delete and defer the purge?]
Proceed? (yes/no)For the mechanics of presenting the gate and stopping the turn, use the ask-user choice-gate pattern — this skill supplies the card content and the explicit-yes strictness; ask-user supplies the stop-and-wait discipline.
After confirmation:
daily/notes/YYYY-MM-DD.md under ## Data DeletionsThere are no categories of data that are disposable by default. Old logs, git stash entries, build artifacts, caches — each of these has, at some point, been the source of truth for something. Disposability is a property of the SPECIFIC target, verified by inspecting it (backlinks, git status, what depends on it, whether it's re-fetchable and at what cost) — never a property of its category. If the inspection genuinely shows the target is ephemeral and regenerable, the card is quick to fill out and the user's "yes" is quick to get. That's the cost of the gate working.
A downstream agent once deleted a multi-gigabyte cache of raw source files from its brain's data directory to free disk space. The files looked like "just cache" — but they were the source data for a planned feature. The data happened to be re-fetchable from its upstream source, but the deletion was still wrong because:
The rule: if it's data and it's bulk, ASK FIRST. Always.
This skill guarantees:
daily/notes/YYYY-MM-DD.md under
## Data Deletions with timestamp, scope, and recovery path.writes_to:.The full behavior contract is documented in the body sections above; this section exists for the conformance test.
Two artifacts:
daily/notes/YYYY-MM-DD.md:## Data Deletions
- **[HH:MM]** [what was deleted] — [count], [size]. Reason: [why].
Recovery: [backup/git/restore path, or "none — permanent"].43597b1
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.