Imported from YimingQiao/bloom (
AGENTS.md). Install upstream withnpx skills add YimingQiao/bloom. Copyright stays with the author.
Bloomsea development rules
- Do not add
try/catchblocks to extension-owned C++ undersrc/. Runtime, I/O, deserialization, and worker errors must propagate to the caller instead of being hidden or converted into a silent fallback. - Use
D_ASSERTfor internal invariants. Invalid user input and failures that can occur in a valid release build still require an explicit DuckDB exception. - Use DuckDB's
ExecutorandTaskExecutordirectly. On the normal path, explicitly callCancelTasks()orWorkOnTasks()before either the executor or state borrowed by its tasks is destroyed; do not add scoped executor wrappers solely for exceptional-path cleanup. - Keep every project header under
src/include/. - Do not introduce a new class, result wrapper, enum, or source file unless it owns a distinct responsibility that cannot remain a local implementation detail.
- Treat a very large source file as a signal to review its responsibilities.
First split the owning class by state lifecycle and invariant; moving one
unchanged class across several
.cppfiles is not an architectural split. Keep a thin coordinator only when the extracted components own real state, and group multiple implementation files in a same-named module directory. - Treat instant sampling as one module. Keep shared scheduling/selection logic
in
instant_sampler/common.*and backend-specific code innative.cpporparquet.cpp; avoid duplicating backend branches in the estimator. - Keep prepared-sample acquisition, persistence, and preload behavior in
prepared_sampler.*; the sampling estimator only selects a mode and evaluates predicates against the resulting sample.
