Goal
`mirrorstack dev` watches `.go` and `sql/**/.sql` in the module dir; on change, kills the Go process and respawns `go run .` with the same env. The whole point of `dev` is iteration, so this should be the default behavior with a `--no-watch` opt-out.
Sketch
- Use the `notify` crate for cross-platform fs events
- Debounce ~250ms (editors do multi-write saves)
- Globs to watch: `/*.go`, `sql//*.sql`. Skip `vendor/`, `testdata/`, `.git/`
- On change: send SIGTERM (or SIGKILL fallback) to the existing child, wait, respawn
- Keep docker-compose + (future) tunnel handle alive across reloads — only the Go process restarts
Acceptance
Estimate
~150 LoC + tests. Independent of any unmerged work.
Goal
`mirrorstack dev` watches `.go` and `sql/**/.sql` in the module dir; on change, kills the Go process and respawns `go run .` with the same env. The whole point of `dev` is iteration, so this should be the default behavior with a `--no-watch` opt-out.
Sketch
Acceptance
Estimate
~150 LoC + tests. Independent of any unmerged work.