Dropping --release from staging/goose only fixed the build side; runtime
resolution still preferred release, so a dev box with stale release
artifacts would rebuild debug sidecars and then launch the stale release
ones anyway.
- desktop: command_search_dirs() now searches the dir matching this app's
own build profile first (cfg!(debug_assertions)). A debug desktop build
(tauri dev via `just staging`) prefers target/debug; a release build is
unchanged. Add a unit test for the ordering.
- goose / goose-bg: prepend $PWD/target/debug to PATH so the agent and the
`sprout` CLI its skills shell out to resolve to the same debug profile,
not a stale release binary.
Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
`just staging`, `goose`, and `goose-bg` built their sidecar/agent
binaries with `--release` on every invocation. These are short-lived
sidecar and local-agent processes, not perf-critical paths, so opt-3
codegen buys nothing while tripling compile time (debug ~35s vs release
~106s for the four sidecar crates locally). Drop `--release` and point
the run/copy paths at `target/debug/` to match.
Release variants (`build-release`, `relay-release`, `proxy-release`,
`reindex-kind0`, `desktop-release-build`) are unchanged — they are
intentional release builds.
Follow-up (not in this change): `just dev` only creates 0-byte sidecar
stubs to satisfy Tauri's externalBin validation, so agent/acp/cli
features don't actually run under `dev`. Whether that's intended or a
gap deserves its own review.
Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
## Summary
- Activate lefthook pre-commit and pre-push hooks that have existed in `lefthook.yml` since the initial desktop app but were never wired up.
- Add `just hooks` recipe: sets `core.hooksPath = .hooks` and runs `lefthook install --force` to generate hook scripts.
- Wire hook installation into `scripts/dev-setup.sh` so hooks activate automatically on `just setup`.
- Enable `parallel: true` for pre-commit hooks (pre-push already had it) — all 5 format/lint checks run simultaneously.
- Add `just mobile-fmt` recipe (`dart format .`) and `just fmt-all` recipe (Rust root + Tauri Rust + Dart) as one-shot formatters.
- `.hooks/` is gitignored since lefthook generates machine-specific scripts.
- Update `AGENTS.md`: document pre-commit/pre-push hooks in Quality Gates, add `just fmt-all` and `just hooks` usage, upgrade worktree fmt gotcha from CI note to commit blocker, add `just mobile-fmt` to mobile commands; also backfill CLI-first updates (`SPROUT_AUTH_TAG`, complete exit codes, `--format compact` flag position, two new gotchas).
All hook commands delegate to `just` recipes as the single source of truth.