text
| 1 | # Destructive Actions Policy |
| 2 | |
| 3 | Classification rules used by the pre-action check in `HARNESS.md`. When an action |
| 4 | doesn't clearly match a category, classify it at the *more* cautious level — treating |
| 5 | a borderline reversible action as destructive costs one extra confirmation; treating a |
| 6 | destructive action as reversible can be unrecoverable. |
| 7 | |
| 8 | ## Read-only (no gate) |
| 9 | |
| 10 | - Reading/searching files, listing directories, `git status`/`git log`/`git diff`. |
| 11 | - GET requests / read-only API calls. |
| 12 | - Running tests, linters, type checkers (unless they have a `--fix`/write mode enabled). |
| 13 | - Querying a database with `SELECT`-only statements. |
| 14 | |
| 15 | ## Reversible-write (proceeds, logged) |
| 16 | |
| 17 | - Editing or creating a file that's tracked in version control (recoverable via git |
| 18 | history/diff). |
| 19 | - Creating a new branch. |
| 20 | - Writing to a scratch/temp directory. |
| 21 | - Adding a row / creating a new resource via an API, where the created resource can be |
| 22 | deleted or is clearly low-stakes (e.g. a draft, a test-environment record). |
| 23 | |
| 24 | ## Destructive / irreversible (requires confirmation gate) |
| 25 | |
| 26 | - **Deleting** anything without a recoverable trash/soft-delete: files, database rows, |
| 27 | cloud resources (buckets, instances, secrets), branches with unmerged commits. |
| 28 | - **Force-pushing** or rewriting shared git history (`push --force` to a shared |
| 29 | branch, `rebase` on public history, `git reset --hard` that discards uncommitted |
| 30 | work). |
| 31 | - **Schema/infrastructure changes** with data-loss potential: dropping/altering a |
| 32 | table column, changing a database's access controls, modifying DNS, revoking API |
| 33 | keys or access grants, changing IAM/permission policies. |
| 34 | - **External communication**: sending an email, chat message, or notification to |
| 35 | anyone outside the immediate operator; posting/publishing public content; opening |
| 36 | or merging a PR without review when the repo's norm is to require review. |
| 37 | - **Financial actions**: any purchase, trade, transfer, subscription change, or refund |
| 38 | — regardless of amount. |
| 39 | - **Bulk operations**: anything matching a wildcard/glob/`--all`/`--force` flag that |
| 40 | could affect more targets than individually reviewed (e.g. "delete all branches |
| 41 | matching `feature/*`") — the confirmation gate must state the actual resolved count |
| 42 | of affected items, not just the pattern. |
| 43 | - **Credential/secret handling**: rotating, revoking, or regenerating any credential |
| 44 | that other systems depend on. |
| 45 | - **Overwriting without merge**: replacing a file/resource wholesale in a way that |
| 46 | discards concurrent changes (e.g. a force-overwrite that could clobber another |
| 47 | process's write). |
| 48 | |
| 49 | ## Never auto-escalate a classification downward |
| 50 | |
| 51 | An action doesn't become "just reversible-write" because the operator seems rushed, or |
| 52 | because a previous similar action was approved — each destructive action gets its own |
| 53 | gate, every time, per `HARNESS.md`. |
| 54 |