scaffold.sh 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/usr/bin/env bash
  2. # Scaffold the Go Fractals 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(go:*)",
  25. "Bash(mkdir:*)",
  26. "Bash(git:*)"
  27. ]
  28. }
  29. }
  30. SETTINGS
  31. # Create initial commit
  32. git add .
  33. git commit -m "Initial project setup with design and plan"
  34. echo "Scaffolded Go Fractals project at: $TARGET_DIR"
  35. echo ""
  36. echo "To run the test:"
  37. echo " claude -p \"Execute this plan using superpowers:subagent-driven-development. Plan: $TARGET_DIR/plan.md\" --plugin-dir /path/to/superpowers"