# Conventions

- Keep behavior centered on the `mehen` CLI binary; avoid library-only dead paths unless they are consumed by the CLI.
- Metric behavior should stay deterministic across platforms.
- Do not edit `crates/mehen-*/src/grammar.rs` directly; these are generated by `cargo xtask tree-sitter generate <language>`.
- For grammar bumps or new tree-sitter-backed languages, update both `xtask/Cargo.toml` and the owning `crates/mehen-<lang>/Cargo.toml`, then regenerate with `cargo xtask tree-sitter generate --all`.
- Preserve mixed-worktree changes not made for the current task; stage only intended files when committing.