---
description: Always use build.sh for building the application, and remind to run it manually
globs: **/*.{ts,js,go,svelte}
---
<rule>
When making changes that require rebuilding the application:

1. Never attempt to run build commands directly. Instead:
   - Use the build.sh script from the project root
   - Command: ./build.sh
   - This ensures consistent build process across all environments

2. The build script handles:
   - Frontend build with correct environment
   - Static assets copying
   - Backend compilation
   - All necessary pre and post-build steps

3. When to run build.sh:
   - After any frontend code changes
   - After any backend code changes
   - After dependency updates
   - Before testing production builds
   - Before deploying

4. Important notes:
   - Always run from project root directory
   - Ensure script has execute permissions (chmod +x build.sh)
   - Wait for the build to complete before testing changes
   - Check build output for any errors

metadata:
  priority: high
  version: 1.0
</rule>

examples:
  - input: |
      # Bad: Running individual build commands
      cd frontend && bun run build
    output: |
      # Good: Using build script
      ./build.sh

  - input: |
      # Bad: Manual multi-step build
      bun run build
      go build
    output: |
      # Good: Using unified build script
      ./build.sh