FOCUSCurrently working on ScheduleSomething and LayerdEvents algorithmsLearn More
FOCUSCurrently working on ScheduleSomething and LayerdEvents algorithmsLearn More
FOCUSCurrently working on ScheduleSomething and LayerdEvents algorithmsLearn More
FOCUSCurrently working on ScheduleSomething and LayerdEvents algorithmsLearn More
SECURITY.MdEngineering Handbook
Coding Philosophy
DocsSECURITY.mdEngineering HandbookCoding Philosophy
GitHub Live Sync

Coding Philosophy

Live technical documentation fetched from GitHub repository omghante/metapilot/docs/engineering/coding-philosophy.md

Coding Philosophy

Guidelines for code style, structural design, and maintenance across MetaPilot.

1. Explicit is Better Than Implicit

  • Avoid magic behavior. Use explicit function signatures, named arguments, and type hints (
    def set_value(self, plain_value: str) -> None:
    ).
  • Document non-obvious rationale, design decisions, or business constraints using clean docstrings.

2. No Silent Failures or Swallow-Except Patches

  • Never resolve errors by masking symptoms, swallowing exceptions (
    except Exception: pass
    ), returning dummy fallbacks silently, or commenting out failing unit tests.
  • Always log the exact traceback and raise appropriate domain exceptions.

3. Local State & Immutability First

  • Keep state transient and scoped within local functions or local component states.
  • Avoid mutating global objects or arrays in-place.

4. Single Source of Truth

  • Avoid duplicate constants or configuration logic.
  • Place shared constants in app settings or dedicated
    choices.py
    /
    constants.py
    modules.

5. Audit Before Re-Inventing

  • Search the codebase and commit history for pre-existing utility functions or models before writing custom helper functions from scratch.