# Handling Destructive Actions in i-have-adhd: Safety Protocols vs. Standard Responses

> Learn how i-have-adhd skill safeguards destructive actions with explicit confirmation, differentiating them from standard ADHD-optimized responses for enhanced safety.

- Repository: [Ayoub Ghriss/i-have-adhd](https://github.com/ayghri/i-have-adhd)
- Tags: deep-dive
- Published: 2026-08-29

---

**The i-have-adhd skill intercepts destructive actions—such as `rm -rf` commands or database drops—to require explicit user confirmation before execution, while standard responses follow immediate, no-preamble ADHD-optimized formatting.**

The open-source `ayghri/i-have-adhd` repository defines a specialized skill for AI assistants that optimizes interactions for users with ADHD. Unlike standard conversational flows, this implementation treats **destructive actions** as critical exceptions that demand safety verification before any irreversible operation is emitted.

## Rule-Based Detection of Destructive Operations

According to the source code in [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md), the skill identifies potentially harmful operations through a specific trigger in the "When to break the rules" section. When a response would include a destructive command—such as `rm -rf`, a database-drop statement, a forced push, or any schema migration—the system matches **Rule 2** at lines 221-224: *"Destructive action ahead … Confirm before acting."*

This rule acts as a gatekeeper that overrides the standard output flow. Instead of immediately returning the command, the skill flags the operation as high-risk and initiates a confirmation subroutine. The detection logic applies to any operation that can delete, modify, or permanently affect data or the environment.

## The Confirmation Workflow

When Rule 2 triggers, the assistant pauses execution and requests explicit validation. The flow follows this strict sequence:

1. **Warning Emission** – The assistant emits a single-line warning identifying the destructive nature of the operation (e.g., "⚠️ This step will delete the `build/` folder").
2. **Explicit Consent** – The assistant asks, "Are you sure you want to proceed? Reply `yes` to confirm."
3. **Conditional Execution** – Only upon receiving an affirmative "yes" does the assistant include the destructive command in the response. Any other input results in cancellation with the message: "Operation canceled. No changes were made."

```markdown
⚠️ This step will delete the `build/` folder.  
Are you sure you want to proceed? Reply `yes` to confirm.

```

If confirmed:

```bash
rm -rf build/

```

If denied:

```markdown
Operation canceled. No changes were made.

```

This ensures safety while maintaining the ADHD-friendly constraint of keeping interactions concise and action-oriented.

## Standard Non-Destructive Response Pattern

For queries that do not involve destructive operations, the assistant follows the standard ADHD-optimized rules defined in the skill file. These responses prioritize cognitive accessibility through specific formatting constraints:

- **Lead with the immediate actionable step** – No preambles or conversational padding
- **Number multi-step tasks** – Sequential numbering (1, 2, 3) for complex workflows
- **End with one concrete "next" action** – Clear handoff for continued execution
- **Suppress tangents** – No explanatory rabbit holes
- **Restate state and provide concrete time estimates** – Grounding context without fluff

```markdown
1. Open `src/auth.ts`  
2. Replace the `verifyToken` function with the updated implementation  
3. Run `npm test -- auth.spec.ts`  

Next: run the test suite and paste the first failing line.

```

This format eliminates cognitive overhead while delivering executable instructions immediately.

## Implementation Architecture

The logic enforcing these behavioral differences resides entirely within the **skill definition** at [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md). By encoding the destructive-action rule in the canonical skill file rather than runtime-specific code, the repository guarantees **consistency across runtimes**.

Every compatible runtime—including Claude, Codex, and OpenCode—that loads this skill inherits the same confirmation requirements for destructive actions. This architectural choice centralizes safety policy in a human-readable markdown file rather than distributing it across multiple implementation languages.

Additional documentation in [`INSTALL.md`](https://github.com/ayghri/i-have-adhd/blob/main/INSTALL.md) and [`CONTRIBUTING.md`](https://github.com/ayghri/i-have-adhd/blob/main/CONTRIBUTING.md) references these safeguards, ensuring that contributors understand the safety exceptions when extending the skill.

## Summary

- **Destructive actions** trigger Rule 2 in [`SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/SKILL.md) (lines 221-224), requiring explicit user confirmation before execution.
- Standard responses follow ADHD-optimized formatting: immediate action steps, numbered tasks, and concrete next actions without preambles.
- The confirmation flow emits a warning, requests a "yes" reply, and either executes the command or cancels based on user input.
- Safety logic is centralized in [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md), ensuring uniform behavior across all supported runtimes.

## Frequently Asked Questions

### What constitutes a destructive action in i-have-adhd?

Destructive actions include any operations that can permanently delete, modify, or damage data or environments—specifically `rm -rf` commands, database-drop statements, forced git pushes, and schema migrations. The skill file explicitly catalogs these in Rule 2 as operations requiring confirmation before acting.

### Where is the destructive action rule defined?

The rule is defined in [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) within the "When to break the rules" subsection at lines 221-224. This canonical skill definition is read by runtime harnesses to determine when to inject confirmation prompts.

### Does the confirmation requirement slow down ADHD-friendly workflows?

No. The confirmation step maintains ADHD optimization by remaining concise and action-oriented. It presents a single-line warning and a binary choice (`yes` to proceed), avoiding the cognitive overhead of lengthy explanations or complex menus while ensuring safety for irreversible operations.

### Which runtimes support this safety feature?

Because the rule is defined in the portable skill file at [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md), any runtime that loads the i-have-adhd skill—including Claude, Codex, and OpenCode—inherits the destructive-action handling automatically. The safety feature is runtime-agnostic by design.