diff options
| author | Jesse Vincent <jesse@fsck.com> | 2025-12-11 15:55:05 -0800 |
|---|---|---|
| committer | Jesse Vincent <jesse@fsck.com> | 2025-12-17 16:44:52 -0800 |
| commit | cd83439bb2411b4c5300e8724578d7ca18d0d16b (patch) | |
| tree | 550301b8134ca6b568cc14a09d973226e4b7aca6 /tests/subagent-driven-dev | |
| parent | ed06dcbe278da219f189cc3e34d90e43912f2878 (diff) | |
Add .claude settings to scaffolds for auto-approved permissions
Diffstat (limited to 'tests/subagent-driven-dev')
| -rwxr-xr-x | tests/subagent-driven-dev/go-fractals/scaffold.sh | 17 | ||||
| -rwxr-xr-x | tests/subagent-driven-dev/run-test.sh | 2 | ||||
| -rwxr-xr-x | tests/subagent-driven-dev/svelte-todo/scaffold.sh | 18 |
3 files changed, 37 insertions, 0 deletions
diff --git a/tests/subagent-driven-dev/go-fractals/scaffold.sh b/tests/subagent-driven-dev/go-fractals/scaffold.sh index 5f1e07a..d11ea74 100755 --- a/tests/subagent-driven-dev/go-fractals/scaffold.sh +++ b/tests/subagent-driven-dev/go-fractals/scaffold.sh @@ -18,6 +18,23 @@ git init cp "$SCRIPT_DIR/design.md" . cp "$SCRIPT_DIR/plan.md" . +# Create .claude settings to allow reads/writes in this directory +mkdir -p .claude +cat > .claude/settings.local.json << 'SETTINGS' +{ + "permissions": { + "allow": [ + "Read(**)", + "Edit(**)", + "Write(**)", + "Bash(go:*)", + "Bash(mkdir:*)", + "Bash(git:*)" + ] + } +} +SETTINGS + # Create initial commit git add . git commit -m "Initial project setup with design and plan" diff --git a/tests/subagent-driven-dev/run-test.sh b/tests/subagent-driven-dev/run-test.sh index fbc1fdf..3803726 100755 --- a/tests/subagent-driven-dev/run-test.sh +++ b/tests/subagent-driven-dev/run-test.sh @@ -71,6 +71,8 @@ echo "" # Run claude and capture output # Using stream-json to get token usage stats +# Run from project directory so .claude/settings.local.json is picked up +cd "$OUTPUT_DIR/project" claude -p "$PROMPT" \ --plugin-dir "$PLUGIN_DIR" \ --output-format stream-json \ diff --git a/tests/subagent-driven-dev/svelte-todo/scaffold.sh b/tests/subagent-driven-dev/svelte-todo/scaffold.sh index 32ed7bb..f58129d 100755 --- a/tests/subagent-driven-dev/svelte-todo/scaffold.sh +++ b/tests/subagent-driven-dev/svelte-todo/scaffold.sh @@ -18,6 +18,24 @@ git init cp "$SCRIPT_DIR/design.md" . cp "$SCRIPT_DIR/plan.md" . +# Create .claude settings to allow reads/writes in this directory +mkdir -p .claude +cat > .claude/settings.local.json << 'SETTINGS' +{ + "permissions": { + "allow": [ + "Read(**)", + "Edit(**)", + "Write(**)", + "Bash(npm:*)", + "Bash(npx:*)", + "Bash(mkdir:*)", + "Bash(git:*)" + ] + } +} +SETTINGS + # Create initial commit git add . git commit -m "Initial project setup with design and plan" |
