Skip to the content.

AGENTS.md

Fifteen-year-old PHP order management system. Many parts have no tests. Production depends on it daily.

Commands

How to change code here

  1. Before changing untested code, add a characterization test that records current behavior (see tests/Characterization/ for examples).
  2. Make the smallest change that solves the task. No drive-by refactors; list cleanup ideas in your summary instead.
  3. Keep the old public function signatures; many are called from templates and cron scripts. Search templates/ and cron/ too.
  4. New code goes in src/ (namespaced, typed, tested). Legacy code in lib/ may call new code, not the other way round.

Known traps