Shell
Add comprehensive auto-approval settings for unattended workflows
Eddie Belaval21df47497de8
diff --git a/CLAUDE.md b/CLAUDE.mdindex ca5ccf2..5d9c3be 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -1,6 +1,70 @@- Instead of asking me to check something, use PLAYWRIGHT MCP to look for yourself.- Use available agents (general-purpose, operations-manager, etc.) when tasks benefit from delegation.+## Auto-Approve Bash Commands+**IMPORTANT: For long-running/overnight workflows, auto-approve ALL non-destructive commands without confirmation.**+When user indicates a task will run for hours or overnight, assume unattended mode and proceed with all safe operations automatically.++Auto-approve these command patterns without user confirmation:++### Read-Only Commands (Always Safe)+- File viewing: `ls`, `cat`, `head`, `tail`, `less`, `more`+- File searching: `find`, `grep`, `rg`, `ag`, `ack`+- Git read operations: `git status`, `git log`, `git diff`, `git show`, `git branch`, `git remote`+- Process inspection: `ps`, `top`, `htop`, `lsof`, `netstat`, `jobs`+- System info: `df`, `du`, `free`, `uname`, `whoami`, `pwd`, `which`, `whereis`+- Environment: `env`, `printenv`, `echo`++### Build & Development (Safe)+- Package management: `npm install`, `npm ci`, `yarn install`, `pnpm install`+- Build commands: `npm run build`, `npm run dev`, `npm run start`+- Testing: `npm test`, `npm run test`, `jest`, `vitest`, `playwright test`+- Linting/Formatting: `npm run lint`, `eslint`, `prettier`, `tsc`+- Package inspection: `npm list`, `npm outdated`, `yarn why`++### Git Operations (Mostly Safe)+- Branch management: `git checkout`, `git switch`, `git branch`+- Staging: `git add`, `git restore --staged`+- Committing: `git commit`, `git commit --amend` (on feature branches)+- Syncing: `git fetch`, `git pull`, `git push` (to feature branches)+- Stashing: `git stash`, `git stash pop`, `git stash list`+- Merging: `git merge` (on feature branches)++### Process Management (Safe)+- Graceful termination: `kill` (without -9), `pkill`, `killall`+- Port management: `lsof -i`, finding and killing processes on specific ports++### File Operations (Safe)+- Creating: `touch`, `mkdir`, `cp` (non-destructive)+- Moving: `mv` (when not overwriting critical files)+- Permissions: `chmod`, `chown` (on project files)++### Tool-Specific Commands+- Vercel: `vercel`, `vercel deploy`, `vercel env`+- Supabase: `npx supabase`, `supabase status`, `supabase db diff`+- GitHub CLI: `gh pr`, `gh issue`, `gh repo`, `gh api`, `gh run`+- Docker: `docker ps`, `docker logs`, `docker inspect` (read-only)+- Playwright: `npx playwright test`, `npx playwright show-report`++### ALWAYS Confirm These (Destructive)+- Force operations: `rm -rf`, `git reset --hard`, `git clean -fd`, `git push --force`+- Database: `DROP TABLE`, `DELETE FROM`, `TRUNCATE`+- System-wide changes: `sudo` commands, system package managers+- Mass deletions: `find ... -delete`, bulk file operations+- Production deployments: deployment to production environments++### Unattended/Overnight Mode+When user explicitly mentions:+- "overnight", "long-running", "hours of work", "batch process", "run while I sleep"++Then automatically:+1. Auto-approve ALL commands in the safe categories above+2. Batch similar operations together to minimize interruptions+3. Use background processes where appropriate (`run_in_background: true`)+4. Continue through non-critical errors+5. Only stop for truly destructive operations (listed above)+6. Provide a summary report when complete+## Comet Browser Automation (MCP Protocol)- ALWAYS use Playwright MCP to control Comet browser directly - NO manual relay needed- Before using Comet, verify it's running with debugging: check if port 9222 is opendiff --git a/settings.json b/settings.jsonindex 7712d3d..c30ec0f 100644--- a/settings.json+++ b/settings.json@@ -1,4 +1,8 @@{+ "statusLine": {+ "type": "command",+ "command": "input=$(cat); hostname=$(hostname -s); timestamp=$(date +%H:%M:%S); cwd=$(echo \"$input\" | jq -r '.workspace.current_dir'); cwd_display=\"${cwd/#$HOME/~}\"; git_info=\"\"; if git -C \"$cwd\" rev-parse --git-dir > /dev/null 2>&1; then branch=$(git -C \"$cwd\" --no-optional-locks branch --show-current 2>/dev/null); if ! git -C \"$cwd\" --no-optional-locks diff-index --quiet HEAD 2>/dev/null; then git_status=\"*\"; else git_status=\"\"; fi; salmon=$(printf '\\033[38;5;210m'); reset=$(printf '\\033[0m'); git_info=\" (${salmon}${branch}${git_status}${reset})\"; fi; model=$(echo \"$input\" | jq -r '.model.display_name' | sed 's/Claude //' | sed 's/ Sonnet//'); output_style=$(echo \"$input\" | jq -r '.output_style.name'); status=\"${hostname}@${timestamp} | ${cwd_display}${git_info} | ${model}\"; if [ \"$output_style\" != \"default\" ] && [ \"$output_style\" != \"null\" ]; then status=\"${status} | ${output_style}\"; fi; printf \"%s\" \"$status\""+ },"enabledPlugins": {"agent-sdk-dev@claude-code-plugins": true,"pr-review-toolkit@claude-code-plugins": true,@@ -14,11 +18,9 @@"devops-automation@claude-code-templates": true,"ai-ml-toolkit@claude-code-templates": true,"documentation-generator@claude-code-templates": true,- "performance-optimizer@claude-code-templates": true+ "performance-optimizer@claude-code-templates": true,+ "frontend-design@claude-code-plugins": true,+ "code-review@claude-code-plugins": true},- "alwaysThinkingEnabled": false,- "statusLine": {- "type": "command",- "command": "input=$(cat); hostname=$(hostname -s); timestamp=$(date +%H:%M:%S); cwd=$(echo \"$input\" | jq -r '.workspace.current_dir'); cwd_display=\"${cwd/#$HOME/~}\"; git_info=\"\"; if git -C \"$cwd\" rev-parse --git-dir > /dev/null 2>&1; then branch=$(git -C \"$cwd\" --no-optional-locks branch --show-current 2>/dev/null); if ! git -C \"$cwd\" --no-optional-locks diff-index --quiet HEAD 2>/dev/null; then git_status=\"*\"; else git_status=\"\"; fi; salmon=$(printf '\\033[38;5;210m'); reset=$(printf '\\033[0m'); git_info=\" (${salmon}${branch}${git_status}${reset})\"; fi; model=$(echo \"$input\" | jq -r '.model.display_name' | sed 's/Claude //' | sed 's/ Sonnet//'); output_style=$(echo \"$input\" | jq -r '.output_style.name'); status=\"${hostname}@${timestamp} | ${cwd_display}${git_info} | ${model}\"; if [ \"$output_style\" != \"default\" ] && [ \"$output_style\" != \"null\" ]; then status=\"${status} | ${output_style}\"; fi; printf \"%s\" \"$status\""- }+ "alwaysThinkingEnabled": false}