# Vibe Kanban Dev Server Script Configuration

## The Problem

Vibe Kanban runs the dev server script from a different working directory than expected, causing "No such file or directory" errors.

## Solution: Use Absolute Path

In the Vibe Kanban dev server script field, use the **absolute path** to the wrapper script:

```bash
bash /Users/oda/Desktop/Projects/managing-apps/scripts/vibe-kanban/vibe-dev-server.sh
```

## Alternative: If Relative Path is Required

If Vibe Kanban requires a relative path and you know it runs from `/Users/oda/Desktop`, use:

```bash
bash Projects/managing-apps/scripts/vibe-kanban/vibe-dev-server.sh
```

## What the Wrapper Script Does

The `vibe-dev-server.sh` wrapper script:

1. ✅ Uses absolute paths internally
2. ✅ Changes to the correct project directory
3. ✅ Handles task ID parameters
4. ✅ Works regardless of Vibe Kanban's working directory
5. ✅ Provides debug output to help troubleshoot

## Testing the Script

You can test the script manually:

```bash
# From any directory
bash /Users/oda/Desktop/Projects/managing-apps/scripts/vibe-kanban/vibe-dev-server.sh TEST-001 0
```

## Debug Output

The script includes debug output that shows:
- Current working directory
- Script path being used
- Task ID and port offset

This helps identify if Vibe Kanban is running from an unexpected directory.

## Troubleshooting

### Error: "Script not found"

1. Verify the script exists:
   ```bash
   ls -la /Users/oda/Desktop/Projects/managing-apps/scripts/vibe-kanban/vibe-dev-server.sh
   ```

2. Check permissions:
   ```bash
   chmod +x /Users/oda/Desktop/Projects/managing-apps/scripts/vibe-kanban/vibe-dev-server.sh
   ```

3. Try running it directly:
   ```bash
   bash /Users/oda/Desktop/Projects/managing-apps/scripts/vibe-kanban/vibe-dev-server.sh TEST-001
   ```

### Error: "Cannot change to project root"

- Verify the project root exists: `/Users/oda/Desktop/Projects/managing-apps`
- Check directory permissions

## Configuration in Vibe Kanban

**Dev Server Script Field:**
```
bash /Users/oda/Desktop/Projects/managing-apps/scripts/vibe-kanban/vibe-dev-server.sh
```

**Health Check URL:**
```
http://localhost:{port}/health
```

**Port Detection:**
Vibe Kanban should detect the port from the script output or you may need to configure it manually.

