--- name: damage-control description: Three-level access control for agent filesystem operations. Zero-access, read-only, and no-delete path rules. user-invocable: true --- # Damage Control Rules Apply three-level access control to protect sensitive files from agent operations. ## Three Access Levels ### Zero Access (can't read or write) ```yaml zeroAccessPaths: - .env - ~/.ssh/ - *.pem - credentials.json ``` ### Read-Only (can read, can't modify) ```yaml readOnlyPaths: - package-lock.json - yarn.lock - node_modules/ ``` ### No-Delete (can modify, can't delete) ```yaml noDeletePaths: - .git/ - Dockerfile - README.md - .github/workflows/ ``` ## Dangerous Patterns ```yaml bashToolPatterns: - pattern: "^rm -rf" block: true - pattern: "git reset --hard" block: true - pattern: "DROP DATABASE" block: true - pattern: "sudo" ask: true ``` ## Usage ```bash # Save as .pi/damage-control-rules.yaml pi -e extensions/damage-control.ts ``` $ARGUMENTS