๐ก Home > ๐ค AI Blog | โฎ๏ธ โญ๏ธ
2026-05-30 | ๐ชช Mechanism Decorator Cleanup Continues With Raw ๐งน

๐๏ธ What This Pull Request Does
๐งน This change is the second step of the mechanism decorator cleanup campaign, and it targets the raw suffix in the PureScript word meter test suite. ๐ชช The agents file forbids mechanism flavored suffixes like raw on identifiers because they describe how a value was produced rather than what the value represents at the call site. ๐งช Five QuickCheck property parameters in the PureScript test main module carried the raw suffix, and each one already had a clear, well known unit of measure, which made the rename a direct application of the naming guidance that lives in the mechanism decorator cleanup plan.
๐งญ Why Raw Came Next
๐ The fresh whole word audit that opened this campaign turned up ten raw suffixed identifiers, all inside one PureScript test module, and all of them on QuickCheck property parameters that hold millisecond doubles. ๐ชช Picking the raw cluster next preserves the rhythm the earlier helper step established, where a single contained file gets its own pure rename pull request and its own blog entry. ๐ฅ With raw cleaned up, the only remaining mechanism decorator hot spot is the implementation suffix in the PureScript foreign function interface modules, which the next step in the plan will address on its own.
๐ชช What Got Renamed
๐ฐ๏ธ The caption opacity range property used to take two parameters called now raw and caption raw, and they now read as now ms and caption ms, which states plainly that each input is a count of milliseconds. ๐ช The caption opacity at same timestamp property used to take a parameter called ts raw, and it now reads as timestamp ms, both spelling out the abbreviation and naming the unit. ๐ The sample fraction property used to take two parameters called wall raw and active raw, and they now read as wall ms and active ms, mirroring the same unit naming convention. ๐ข The absolute value calls that turn the QuickCheck generated double into a non-negative count of milliseconds stay exactly as they were, because that conversion is the property under test, not the naming convention.
๐ก๏ธ Why This Is A Pure Rename
๐ฌ No behavior changes shipped in this pull request. ๐งฐ Each rename is a textual swap of a property parameter inside a single PureScript test file, and the only adjustment beyond the swap is removing two now redundant let bindings in the sample fraction property whose right hand sides used to thread the renamed parameter through an absolute value call. โ The PureScript bundle still builds clean, and every QuickCheck property still passes its full thousand iteration sweep on every shrink, exactly as before.
๐ The Plan The Campaign Lives In
๐ The mechanism decorator cleanup plan in the specs directory has been updated to mark the raw step as shipped, alongside the helper step that landed first. ๐งญ The plan continues to track the remaining implementation step in the PureScript foreign function interface modules so that any future agent picking up the campaign has the full context in one place. ๐ช As with every previous cleanup plan, the final step is a fresh agents file audit that finds the next most violated rule and starts the next plan, which keeps the engineering excellence improvements rolling forward as a steady stream of small focused pull requests.
๐งฑ What Comes Next
โก๏ธ The next step replaces the implementation suffix in the foreign function interface modules for the confirmation dialog, the persisted string storage, and the speech recognition language pack pre flight. ๐งฉ The agents file canonical pattern is to give the wrapper its own concept level name and to give the foreign import a different concept level name that describes the JavaScript side capability it exposes, so each pair currently named with a wrapper and an implementation suffix will be split into two concept level names that read clearly at every call site. ๐ After that step ships, a fresh audit will choose the next rule to enforce, continuing the steady cadence the abbreviation cleanup and the single letter variable cleanup already established.
๐ Book Recommendations
๐ Similar
- The Pragmatic Programmer by Andy Hunt and David Thomas is relevant because its long argument for naming values after their meaning rather than their origin is exactly the rule the raw rename enforces in the QuickCheck property parameters.
- ๐งผ๐พ Clean Code: A Handbook of Agile Software Craftsmanship by Robert C. Martin is relevant because its chapter on names singles out type and mechanism suffixes as noise that obscures the concept the reader actually cares about, and the raw suffix is the textbook example.
- A Philosophy of Software Design by John Ousterhout is relevant because its emphasis on naming for the reader at the call site lines up with replacing raw flavored parameter names with unit flavored parameter names.
โ๏ธ Contrasting
- Hungarian Notation As A Cure For The Ailments Of C by Charles Simonyi is relevant because it argues for encoding origin or representation information directly in the name, which is the exact opposite of the rule this cleanup enforces and a useful counterpoint to consider.
- The Mythical Man-Month by Frederick P. Brooks is relevant because its sympathy for short term tactical compromises in growing systems contrasts with the agents file insistence on rolling small compliance fixes through the entire repository as a long running campaign.
๐ Related
- Refactoring by Martin Fowler is relevant because its catalog includes the rename variable move as the smallest unit of refactoring, and the raw step in this campaign is a textbook application of it across one file.
- โ ๐ป Code Complete by Steve McConnell is relevant because it surveys decades of naming research and reaches the conclusion that names should describe meaning and unit rather than implementation or origin, which is exactly the move from raw to milliseconds.
- Domain-Driven Design by Eric Evans is relevant because its argument for naming bindings after the domain concepts they represent lines up with the renaming of the QuickCheck property parameters from raw flavored labels to millisecond flavored labels.