From afe17d8a2387bddba0adca61dc59b1232373cc6c Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 25 Jun 2026 19:58:26 +0000 Subject: [PATCH 1/5] chore(config): add project Claude Code settings Adds permissions allowlist, Dart auto-format hook, and worktree symlink config for the Flutter SDK cache. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01HUH7Gt2mzg4vx2o1uTRfWX --- .claude/settings.json | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .claude/settings.json diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 00000000..87dcdae7 --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,25 @@ +{ + "permissions": { + "allow": [ + "Bash(./bin/mise *)", + "Bash(git *)", + "Bash(jq *)" + ] + }, + "hooks": { + "PostToolUse": [ + { + "matcher": "Write|Edit", + "hooks": [ + { + "type": "command", + "command": "jq -r '.tool_input.file_path // empty' | grep -q '\\.dart$' && ./bin/mise run --no-deps dart:format >/dev/null 2>&1 || true" + } + ] + } + ] + }, + "worktree": { + "symlinkDirectories": [".mise"] + } +} From 028acb5cdb20c6a4824d42fb5f9ead5fc3aa8ad4 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 25 Jun 2026 20:00:59 +0000 Subject: [PATCH 2/5] chore(config): fix dart format hook and narrow permissions - Add dart:format:fast task to mise.toml: runs dart format without triggering code generation, making it suitable for editor hooks - Fix hook to use dart:format:fast (was incorrectly using --no-deps which skips tool installation, not task deps, so generate still ran) - Narrow mise permissions from Bash(./bin/mise *) to specific subcommands: run, tasks, exec, dr, cfg - Narrow git permissions: allow read-only + add/commit; push, reset, checkout, rebase, merge still prompt for confirmation Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01HUH7Gt2mzg4vx2o1uTRfWX --- .claude/settings.json | 17 ++++++++++++++--- mise.toml | 4 ++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.claude/settings.json b/.claude/settings.json index 87dcdae7..ec4f6c3f 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -1,8 +1,19 @@ { "permissions": { "allow": [ - "Bash(./bin/mise *)", - "Bash(git *)", + "Bash(./bin/mise run *)", + "Bash(./bin/mise tasks *)", + "Bash(./bin/mise exec *)", + "Bash(./bin/mise dr)", + "Bash(./bin/mise cfg *)", + "Bash(git status)", + "Bash(git log *)", + "Bash(git diff *)", + "Bash(git show *)", + "Bash(git fetch *)", + "Bash(git stash list)", + "Bash(git add *)", + "Bash(git commit *)", "Bash(jq *)" ] }, @@ -13,7 +24,7 @@ "hooks": [ { "type": "command", - "command": "jq -r '.tool_input.file_path // empty' | grep -q '\\.dart$' && ./bin/mise run --no-deps dart:format >/dev/null 2>&1 || true" + "command": "jq -r '.tool_input.file_path // empty' | grep -q '\\.dart$' && ./bin/mise run dart:format:fast >/dev/null 2>&1 || true" } ] } diff --git a/mise.toml b/mise.toml index 0d0783d0..d1f52a35 100644 --- a/mise.toml +++ b/mise.toml @@ -38,6 +38,10 @@ depends = ['generate'] sources = ['lib/**/*.dart', 'test/**/*_test.dart'] run = 'dart format .' +[tasks."dart:format:fast"] +description = "Format Dart code without running code generation — for editor hooks" +run = 'dart format .' + [tasks."dart:format:check"] description = "Check Dart formatting without modifying files" run = 'dart format --output=none --set-exit-if-changed .' From 95168c58e0e9dadabde92d771417e1bfed0d7ca2 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 25 Jun 2026 20:03:29 +0000 Subject: [PATCH 3/5] chore(config): narrow mise permissions to specific safe tasks Replace Bash(./bin/mise run *) with an explicit allowlist of tasks that are safe to run without prompting (test, analyze, format, lint). Tasks that require confirmation: build:web, dev, serve:release, setup:*, proto:generate/clients/dep-update, test:e2e*, screenshots:batch. New tasks added in future will not be auto-allowed. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01HUH7Gt2mzg4vx2o1uTRfWX --- .claude/settings.json | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.claude/settings.json b/.claude/settings.json index ec4f6c3f..1549dd3b 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -1,11 +1,31 @@ { "permissions": { "allow": [ - "Bash(./bin/mise run *)", "Bash(./bin/mise tasks *)", - "Bash(./bin/mise exec *)", "Bash(./bin/mise dr)", "Bash(./bin/mise cfg *)", + "Bash(./bin/mise run check)", + "Bash(./bin/mise run test*)", + "Bash(./bin/mise run analyze*)", + "Bash(./bin/mise run coverage)", + "Bash(./bin/mise run generate)", + "Bash(./bin/mise run format)", + "Bash(./bin/mise run dart:format)", + "Bash(./bin/mise run dart:format:check)", + "Bash(./bin/mise run dart:format:fast)", + "Bash(./bin/mise run fmt:check)", + "Bash(./bin/mise run mise:format)", + "Bash(./bin/mise run prettier:check)", + "Bash(./bin/mise run prettier:format)", + "Bash(./bin/mise run shell:check)", + "Bash(./bin/mise run shell:format)", + "Bash(./bin/mise run shell:format-check)", + "Bash(./bin/mise run proto:lint)", + "Bash(./bin/mise run proto:format)", + "Bash(./bin/mise run proto:api-lint)", + "Bash(./bin/mise run validate:festivals)", + "Bash(./bin/mise run test:worker)", + "Bash(./bin/mise run goldens:update*)", "Bash(git status)", "Bash(git log *)", "Bash(git diff *)", From 82f06bc61919dccf98b4ff34bb189ac480b8813b Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 25 Jun 2026 20:05:55 +0000 Subject: [PATCH 4/5] chore(config): extend format hooks to JS/TS, shell, TOML, and proto - Add prettier:format:fast task (no npm ci) for use in editor hooks - Add PostToolUse hooks for .js/.ts/.mjs, .sh, mise*.toml, and .proto - TOML hook matches only mise config files, not cliff.toml/wrangler.toml - Proto hook uses MISE_ENV=dev (buf only available in dev environment) - Add prettier:format:fast to permissions allowlist Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01HUH7Gt2mzg4vx2o1uTRfWX --- .claude/settings.json | 17 +++++++++++++++++ mise.toml | 4 ++++ 2 files changed, 21 insertions(+) diff --git a/.claude/settings.json b/.claude/settings.json index 1549dd3b..28965a4c 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -17,6 +17,7 @@ "Bash(./bin/mise run mise:format)", "Bash(./bin/mise run prettier:check)", "Bash(./bin/mise run prettier:format)", + "Bash(./bin/mise run prettier:format:fast)", "Bash(./bin/mise run shell:check)", "Bash(./bin/mise run shell:format)", "Bash(./bin/mise run shell:format-check)", @@ -45,6 +46,22 @@ { "type": "command", "command": "jq -r '.tool_input.file_path // empty' | grep -q '\\.dart$' && ./bin/mise run dart:format:fast >/dev/null 2>&1 || true" + }, + { + "type": "command", + "command": "jq -r '.tool_input.file_path // empty' | grep -qE '\\.(js|ts|mjs)$' && ./bin/mise run prettier:format:fast >/dev/null 2>&1 || true" + }, + { + "type": "command", + "command": "jq -r '.tool_input.file_path // empty' | grep -q '\\.sh$' && ./bin/mise run shell:format >/dev/null 2>&1 || true" + }, + { + "type": "command", + "command": "jq -r '.tool_input.file_path // empty' | grep -qE 'mise[^/]*\\.toml$' && ./bin/mise run mise:format >/dev/null 2>&1 || true" + }, + { + "type": "command", + "command": "jq -r '.tool_input.file_path // empty' | grep -q '\\.proto$' && MISE_ENV=dev ./bin/mise run proto:format >/dev/null 2>&1 || true" } ] } diff --git a/mise.toml b/mise.toml index d1f52a35..fcffefea 100644 --- a/mise.toml +++ b/mise.toml @@ -50,6 +50,10 @@ run = 'dart format --output=none --set-exit-if-changed .' description = "Format JS/TS/MJS files with Prettier" run = 'npm ci && npx prettier --write "**/*.{js,ts,mjs}"' +[tasks."prettier:format:fast"] +description = "Format JS/TS/MJS files without running npm ci — for editor hooks" +run = 'npx prettier --write "**/*.{js,ts,mjs}"' + [tasks."prettier:check"] description = "Check JS/TS/MJS formatting without modifying files" run = 'npm ci && npx prettier --check "**/*.{js,ts,mjs}"' From e7351d8c6c138395b45dc1cbb70971a9e0704078 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 25 Jun 2026 20:10:19 +0000 Subject: [PATCH 5/5] fix(config): prevent test* and analyze* wildcards from matching subcommands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test* prefix-matched test:e2e, test:e2e:headed, test:e2e:ui, and test:check-page — all browser-automation tasks intended to require confirmation. Replace with exact + space-separated-arg forms so only the bare task name (plus an optional file argument after a space) is allowed. Same fix for analyze* and goldens:update*. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01HUH7Gt2mzg4vx2o1uTRfWX --- .claude/settings.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.claude/settings.json b/.claude/settings.json index 28965a4c..3a187885 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -5,8 +5,10 @@ "Bash(./bin/mise dr)", "Bash(./bin/mise cfg *)", "Bash(./bin/mise run check)", - "Bash(./bin/mise run test*)", - "Bash(./bin/mise run analyze*)", + "Bash(./bin/mise run test)", + "Bash(./bin/mise run test *)", + "Bash(./bin/mise run analyze)", + "Bash(./bin/mise run analyze *)", "Bash(./bin/mise run coverage)", "Bash(./bin/mise run generate)", "Bash(./bin/mise run format)", @@ -26,7 +28,8 @@ "Bash(./bin/mise run proto:api-lint)", "Bash(./bin/mise run validate:festivals)", "Bash(./bin/mise run test:worker)", - "Bash(./bin/mise run goldens:update*)", + "Bash(./bin/mise run goldens:update)", + "Bash(./bin/mise run goldens:update *)", "Bash(git status)", "Bash(git log *)", "Bash(git diff *)",