Design decisions

276. cpl fmt formats the corpus ports and spec/std in one mechanical commit (2026-11-22)

  • Decision. One commit runs cpl fmt over corpus/problems/*/port.cp and spec.cp, spec/std, corpus/lib and examples. Exempt:

    • test inputs, whose layout or line numbers are the test (spec/conformance, crates/*/tests);
    • dream.cp drafts, which are kept as written;
    • bench.

    The line-1 // cpl 0.3.0 stamp goes only on formatted files outside the exempt trees, never on conformance cases or goldens.

  • Why. This was the lint-fmt recommendation in plan/QUESTIONS.md. The corpus is the style reference agents learn from, so it should be fmt-clean. scripts/fmt_check.py proves the reformat is idempotent and preserves meaning on every tracked file. A stamp on line 1 of a test input would shift every expected line number.

  • Reverse. git revert the formatting commit (it is mechanical), and edit the exempt list.