Avoid hardcoding configuration values that affect user experience or behavior. Instead, make these values configurable with sensible defaults. This is especially important for timing values, thresholds, and user-facing constants that different users may want to customize.

Examples of values that should be configurable rather than hardcoded:

When making values configurable:

// Instead of:
const MIN_WORD_LEN: usize = 7;

// Do:
pub struct CompletionConfig {
    pub min_word_length: usize,
}

impl Default for CompletionConfig {
    fn default() -> Self {
        Self {
            min_word_length: 7, // Reasonable default, but configurable
        }
    }
}

This approach improves user experience by allowing customization while maintaining reasonable defaults for users who don’t need to change the settings.