scaffold.sh 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/bash
  2. # Scaffold the Svelte Todo test project
  3. # Usage: ./scaffold.sh /path/to/target/directory
  4. set -e
  5. TARGET_DIR="${1:?Usage: $0 <target-directory>}"
  6. SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
  7. # Create target directory
  8. mkdir -p "$TARGET_DIR"
  9. cd "$TARGET_DIR"
  10. # Initialize git repo
  11. git init
  12. # Copy design and plan
  13. cp "$SCRIPT_DIR/design.md" .
  14. cp "$SCRIPT_DIR/plan.md" .
  15. # Create .claude settings to allow reads/writes in this directory
  16. mkdir -p .claude
  17. cat > .claude/settings.local.json << 'SETTINGS'
  18. {
  19. "permissions": {
  20. "allow": [
  21. "Read(**)",
  22. "Edit(**)",
  23. "Write(**)",
  24. "Bash(npm:*)",
  25. "Bash(npx:*)",
  26. "Bash(mkdir:*)",
  27. "Bash(git:*)"
  28. ]
  29. }
  30. }
  31. SETTINGS
  32. # Create initial commit
  33. git add .
  34. git commit -m "Initial project setup with design and plan"
  35. echo "Scaffolded Svelte Todo project at: $TARGET_DIR"
  36. echo ""
  37. echo "To run the test:"
  38. echo " claude -p \"Execute this plan using superpowers:subagent-driven-development. Plan: $TARGET_DIR/plan.md\" --plugin-dir /path/to/superpowers"