# Parameter objects: max-params 3 was always a proxy

I have lost count of the times I have read a function call with five positional arguments and had to count the commas backwards to work out which one is the timeout and which is the retry count. The fix has been in the Refactoring catalogue since 1999: Introduce Parameter Object. Bundle a recurring group of arguments into a class.

The cap is editorial. Robert C. Martin says zero is ideal, three is the polyadic ceiling, and anything past that needs very special justification. The Prickles repo sets max-params: 3. ESLint and typescript-eslint both release the rule out of the box, so the constraint costs you nothing but a line in the config.

## The smell underneath

Fowler's Data Clump entry names the thing. Two engineers see the same fields travelling together. The third caller arrives. The rule is pointing at something real even when the number it picks is arbitrary.

A parameter object is not a quieter way to pass the same eight things. The group becomes a concept, and if it will not take a name you have found the problem.

## Why three is a proxy

The count catches things early and cheaply, which is why it stays switched on. It does not define the rule. A function taking two arguments where one is a mode flag and the other is an options bag that grew is not fine because the number is small.

The count really detects that the signature has stopped being readable. That is a name-shaped problem more often than a number-shaped one. Bundling is how you fix it, which is why the refactoring and the rule agree on the remedy.

## The stub objection

There is a real thing to say against the hard cap, which is that a parameter object used once, for a single caller, is a class that exists to satisfy a linter. If nothing else ever passes that group, you have moved the arguments somewhere less obvious and gained a file.

That resolves on the second caller. Until then the honest move is to leave the arguments alone and let the count flag it, rather than inventing a type that has never been needed.

## What agents changed

An agent reads the signature and takes it as given. Handed five positional arguments it copies the order, and if the order https://prickles.org/tenet/parameter-object/S3
