Просмотр исходного кода

Add .claude settings to scaffolds for auto-approved permissions

Jesse Vincent 9 месяцев назад
Родитель
Сommit
cd83439bb2

+ 17 - 0
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"

+ 2 - 0
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 \

+ 18 - 0
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"