Skip to content

Style Guide

HMS Commander follows consistent coding standards for maintainability and LLM-friendliness.

For the complete style guide, see: STYLE_GUIDE.md in the repository root.

Quick Reference

Naming Conventions

Element Convention Example
Functions/Variables snake_case get_subbasins()
Classes PascalCase HmsBasin
Constants UPPER_SNAKE INCHES_TO_MM
Private Leading _ _parse_block()

Static Class Pattern

# Good
HmsBasin.get_subbasins(basin_path)

# Bad
basin = HmsBasin()
basin.get_subbasins(basin_path)

Docstring Template

def function_name(param1: type1, param2: type2) -> return_type:
    """
    Brief description.

    Args:
        param1 (type1): Description
        param2 (type2): Description

    Returns:
        return_type: Description

    Example:
        >>> result = function_name(val1, val2)
    """

When to Use Submodules

Use submodules when: - 5+ related classes - Optional dependencies - Experimental features - Large utility collections (500+ lines)

Don't use submodules for: - Single purpose classes - Few functions (<5 methods) - Premature organization

See full style guide for detailed patterns and examples.

CLB Engineering Corporation  ·  LLM Forward Engineering
HMS Commander is a free and open-source project maintained by CLB Engineering Corporation. For agencies and firms seeking to modernize H&H workflows with LLM Forward approaches, contact CLB to partner with the engineers who wrote the automation.