# How i-have-adhd Confirms Destructive Actions: Safety-First Validation

> Learn how i-have-adhd confirms destructive actions with explicit user prompts before commands like rm -rf or force pushes, ensuring safety and preventing accidental data loss.

- Repository: [Ayoub Ghriss/i-have-adhd](https://github.com/ayghri/i-have-adhd)
- Tags: how-to-guide
- Published: 2026-08-25

---

**i-have-adhd forces an explicit user confirmation step before executing any destructive command such as `rm -rf`, force pushes, or database schema migrations, prioritizing safety over brevity.**

The *i-have-adhd* repository implements a defensive AI agent skill designed to prevent accidental data loss. When the system detects requests that could harm user data, it does not execute immediately. Instead, it halts the workflow to **confirm destructive actions** through an interactive validation step that requires explicit human approval.

## Recognizing Dangerous Operations

The skill maintains a strict inventory of high-risk operations that trigger the safety protocol. According to the canonical skill definition in [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md), the system flags commands including `rm -rf` recursive deletions, Git force pushes, database schema migrations, and SQL table drops.

When the agent parses a user request containing these patterns, it classifies the action as destructive. This classification immediately escalates the interaction from automatic execution to guarded confirmation mode.

## The Confirmation Protocol

The validation flow operates through two complementary rule sets that reinforce the same safety principle.

### Canonical Rule Definition

The primary rule resides in [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) under the "When to break the rules" section. The specification mandates:

```markdown

## When to break the rules

2. Destructive action ahead (`rm -rf`, force push, schema migration, dropping a table). 
   Confirm before acting. Safety wins over brevity.

```

This directive establishes that **safety wins over brevity**, requiring the agent to insert a pause regardless of how the user phrased the request.

### Agent-Specific Enforcement

The Gemini-specific configuration in [`skills/i-have-adhd/agents/gemini.toml`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/agents/gemini.toml) hardens this requirement for specific runtimes:

```toml

# skills/i-have-adhd/agents/gemini.toml (excerpt)

2. Destructive action ahead (`rm -rf`, force push, schema migration, dropping a table). 
   Confirm before acting. Safety beats brevity.

```

Both files explicitly list the same four destructive categories: recursive deletion (`rm -rf`), force-pushing to version control, schema migrations, and dropping database tables.

## Implementation in Practice

When a user requests a destructive workflow, the agent generates a descriptive confirmation prompt rather than executing code. For example, if the user asks, "Delete every untracked file in my repository," the system responds with a risk disclosure:

> *"The request will permanently delete all untracked files, including ignored ones. Do you want to proceed? Please reply with 'yes' to confirm."*

Only after receiving an affirmative response does the agent proceed to generate the underlying destructive command. This two-step verification ensures that accidental natural language instructions cannot immediately erase data.

## Evaluation and Safety Guarantees

The validation logic is enforced through automated testing defined in [`tests/evals/rubric.md`](https://github.com/ayghri/i-have-adhd/blob/main/tests/evals/rubric.md). This evaluation rubric verifies that the agent correctly handles safety, confirmation, and ambiguity scenarios. The test suite ensures that any implementation change maintains the strict requirement to **confirm destructive actions** before execution.

## Summary

- **Explicit Rule Set**: [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) defines destructive actions as `rm -rf`, force pushes, schema migrations, or table drops.
- **Runtime Enforcement**: [`skills/i-have-adhd/agents/gemini.toml`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/agents/gemini.toml) reinforces confirmation requirements for specific agent configurations.
- **User Confirmation**: The agent generates descriptive risk warnings and waits for explicit "yes" approval.
- **Safety Priority**: The "safety wins over brevity" principle prevents automatic execution of dangerous commands.
- **Automated Validation**: [`tests/evals/rubric.md`](https://github.com/ayghri/i-have-adhd/blob/main/tests/evals/rubric.md) ensures consistent safety behavior across updates.

## Frequently Asked Questions

### What specific commands trigger the confirmation prompt?

Destructive actions triggering confirmation include `rm -rf` operations, Git force pushes, database schema migrations, and SQL `DROP TABLE` statements. The exact list is codified in both [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) and [`skills/i-have-adhd/agents/gemini.toml`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/agents/gemini.toml).

### Does the agent ever skip confirmation for destructive actions?

No. According to the source code analysis, the skill contains an explicit rule that forbids skipping confirmation. The "When to break the rules" section specifically mandates confirmation before acting, with safety prioritized over response brevity.

### How does the confirmation process handle ambiguous requests?

The agent generates a clear description of the specific risk before requesting approval. For destructive file operations, it explicitly names which files will be affected and requires the user to reply with "yes" to proceed, ensuring informed consent.

### Where is the safety logic tested?

The confirmation behavior is validated against the criteria defined in [`tests/evals/rubric.md`](https://github.com/ayghri/i-have-adhd/blob/main/tests/evals/rubric.md), which provides an evaluation framework to verify that the agent correctly implements safety checks and confirmation flows for all destructive operation types.