mit einem Klick
code-quality
// Guardrails for keeping the Searchlite Rust workspace compliant with formatting, lint, build, test, and perf expectations; use when preparing or reviewing changes to ensure they meet project quality bars.
// Guardrails for keeping the Searchlite Rust workspace compliant with formatting, lint, build, test, and perf expectations; use when preparing or reviewing changes to ensure they meet project quality bars.
Use when implementing or updating Searchlite features that need pre-review hardening via per-feature invariant matrix maintenance, adversarial/regression coverage updates, and full quality-gate verification.
Send local completion notifications to the Agent Notifications app via POST http://127.0.0.1:60766/agent/notify after finishing a task; include title, content, and agent details so the desktop app shows a system notification.
Send local completion notifications to the agent-notifier service via POST http://127.0.0.1:60766/agent/notify after finishing a task; include title, content, and agent details so the desktop app shows a system notification.
Structured workflow for discovering, reproducing, and fixing bugs in Searchlite by inspecting real code paths (CLI/HTTP/core), validating durability invariants, and producing regression tests; use when investigating incorrect results, crashes, data loss risks, or “it sometimes fails” reports.
Playbook for diagnosing Searchlite issues across CLI/HTTP, storage, and indexing; use when triaging failures or odd search results.
Style guide for writing Searchlite documentation and examples; use when creating or editing docs/ guides.
| name | code-quality |
| description | Guardrails for keeping the Searchlite Rust workspace compliant with formatting, lint, build, test, and perf expectations; use when preparing or reviewing changes to ensure they meet project quality bars. |
Use this skill any time you:
vectors, gpu, zstd, ffi, wasm/IndexedDB storage)This is not a “nice-to-have.” The point is to make changes reviewable, reproducible, and safe.
A change is “done” only when:
--all-features (and ideally default features too)--all-featuresopenapi.yaml, search-request.schema.json, and docs/README examples)Run these in the repo root:
Format:
cargo fmt --allLint (deny warnings):
cargo clippy --all --all-features --all-targets -- -D warningsBuild:
cargo build --all --all-featuresTest:
cargo test --all --all-featuresBench (when touching ranking/index/query hot paths):
cargo bench -p searchlite-corejust shortcutsIf you use the workspace Justfile, keep the “one-liner” workflows working and equivalent:
just fmtjust lintjust buildjust testjust benchIf you update one side (Cargo vs
just), update the other.
rust-toolchain.toml and documents that setup explicitly (currently 1.92.0).If you need a newer language/library feature:
rust-toolchain.toml to 1.92.0):
Searchlite is explicitly feature-gated in key areas:
vectors (vector fields + ANN/HNSW behavior)gpu (GPU stubs / rerank integration points)zstd (docstore compression behavior)ffi (C ABI)searchlite-wasm, IndexedDB-backed storage)Quality bar:
#[cfg(feature = "...")], and/orSearchlite advertises small footprint + fast top-k via WAND/BMW pruning and block maxes. That implies real constraints:
Search supports multiple execution strategies:
bm25 (full evaluation)wand (exact WAND pruning)bmw (block-max WAND)When changing ranking/pruning logic, verify correctness/perf by:
cargo run -p searchlite-core --example pruningexecution=bm25 vs wand vs bmw.Searchlite’s durability story is a core product claim. Preserve it:
fsync) on write.If you change anything in:
…you must:
When you change any of:
You must update:
openapi.yaml (HTTP contract)search-request.schema.json (JSON request contract)Also preserve:
{"error":{"type":"...","reason":"..."}}cargo fmt --all cleancargo clippy --all --all-features --all-targets -- -D warnings cleancargo build --all --all-features cleancargo test --all --all-features cleanopenapi.yaml + schema JSON updatedfeat:, fix:, perf:, refactor:, docs:, test:, chore:.