Data Loss Gate
Confirmation gate before any bulk delete, cleanup, or destructive operation that could...
Install
npx skills add garrytan/gbrain --skill data-loss-gate -g -a claude-code -y- Repository
- garrytan/gbrain31.4k
- Category
- Data and ML
- Updated
- 3d ago
- License
- MIT
- Context cost
- Mediumabout 2,881 tokens
- Runs scripts
- No, instructions only
What it does
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.
Data Loss Gate, Confirmation Before Destructive Operations
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/.
What This Is
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.
When This Fires
Before ANY of these operations:
Shell / filesystem level:
rm -rfon any directory with datarm/unlinkon more than 10 filessed -ithat modifies more than 10 filesgit rmon tracked files- Truncating or stripping content from files in bulk
- Overwriting files with smaller versions (content stripping)
- Any operation described as "cleanup" or "freeing space" that touches data files
Brain / database level (gbrain-specific):
