- WSL2 ENOENT race: after any
cargo initor file write, verify content with Read before proceeding - Security hook blocks
Writetool on.github/workflows/files — use Bash heredoc instead
- Module interface (never deviate):
pub fn render(ctx: &Context, cfg: &CshipConfig) -> Option<String> - Disabled flag → silent
None(no warn); absent data → explicitmatch+tracing::warn!+None- Exception:
context_barintentionally renders a 0% empty bar (styled viaempty_style) whencontext_windowis absent, rather than returningNone. This is a deliberate UX choice — showing an empty bar is more informative than showing nothing. It usestracing::debug!(notwarn!) because absence is the normal state at session start.
- Exception:
- Never use
?operator on paths that require a warning — use explicitmatch - stdout owned by
main.rsonly; all module diagnostics viatracing::*macros; noeprintln!anywhere - Exception: CLI-action subcommands (e.g.
uninstall,explain) may useprintln!directly — the stdout rule applies to the rendering pipeline only - All config structs:
#[derive(Debug, Deserialize, Default)], all fieldspub Option<T> - Never add
deny_unknown_fieldsto any struct — omitted intentionally on bothContextand config structs so future Claude Code versions can add fields without breaking deserialization
- Adding a native module: create
src/modules/{name}.rs+ updatesrc/modules/mod.rsonly (2 files max) - Config structs →
src/config.rsonly; ANSI logic →src/ansi.rsonly; threshold styling →ansi::apply_style_with_threshold