v0.1 draft · open standard · a personal project by antferr
In tailoring, agio is the ease designed between body and garment. Here it is an open standard: three JSON documents, a reference algorithm and one rule — the profile stays yours; by default a shop gets a size and how sure it is, never your measurements.
01 · The vocabulary
The whole standard fits in three JSON schemas. You own the first, the seller publishes the second, and the third is the only thing that travels between the two. Open the examples to see the actual shape of the data.
fit-profile.schema.json
Your profile: body measurements (each with mandatory source and observed_at, tolerance strongly recommended), fit preferences and — the strongest signal — the history of how past garments actually fitted you.
Simplified excerpt: a full history entry also requires occurred_at and source.
cut-profile.schema.json
How the garment is cut, not what the brand calls the size: per-size measurements, intended ease (intended_ease), stretch. The measurement_method field is mandatory, with no default.
match-report.schema.json
The answer. Its shape is the normative part of the standard: exposed confidence, a per-zone explanation, explicit caveats. How much detail it carries is decided by the disclosure level.
A name only earns a place in the standard list if the specification can say where to put the tape, precisely enough that two people measuring the same garment arrive at the same number. The specification defines sixteen; a shirt uses five. Pick one to see it on the garment.
A shirt laid flat with five measuring points: 1 neck circumference, 42 cm; 2 shoulder width, 46.5 cm; 3 chest width, 58 cm; 4 waist width, 54 cm; 5 sleeve length, 65 cm.
The ending of each name says what is done with the tape, and whether the number is half a circumference:
These definitions are not yet proven. They were written from how the trade publishes its own measurements and from internal consistency, not from a table with a tape on it. They have not been checked against sewing or pattern-making practice. Two people measuring the same garment and getting different numbers is the failure that matters here, and reporting one is the most useful contribution this version can receive.
02 · Try it
Below are the reference implementation's actual answers (python -m agiofit.cli), generated for the two example profiles at every disclosure level. Pick a profile and a level, and watch what comes out, and above all what doesn't. Garment and profiles are the repository's real examples: Sartoria Esempio's Classic Oxford (a fictional brand), sizes 39–42.
Profile
Disclosure level
The simulator requires JavaScript.
What travels · the exact report
03 · Privacy as design
The caller doesn't decide how much it sees: the disclosure level does, and the numbers are stripped at serialisation, not by anyone's goodwill. There is a test that verifies it.
Size, confidence and the caveats on the answer. All a shop needs to sell you a shirt.
Adds the per-zone assessment (good, watch…) but no centimetres. With it come the alternatives, what the answer rests on and what would improve it.
Adds the ease of each zone in centimetres, from which your measurements for this garment follow. For services you trust more.
Adds the intended ease of each zone, which your preferences and your history may have moved. It should be rare, and whoever asks for it should justify it.
The garment's measurements are public (they live in the Cut Profile). If the recommendation also published the ease in centimetres, anyone could do:
116 cm of garment minus 16 cm of ease makes a 100 cm chest.
One subtraction reconstructs the body measurement. That's why at the lower levels the ease exists in the computation but does not survive serialisation — try it in the simulator by switching from scoped to explained.
04 · On your machine
The reference implementation is pure Python, zero dependencies. After cloning github.com/agiofit/agiofit:
# install and verify (101 tests, all must pass) $ cd agiofit/reference $ pip install -e ".[dev]" $ pytest 101 passed # mature profile: with no level the person's own applies (result_only), so this asks for explained $ python -m agiofit.cli ../examples/profile-mature.json ../examples/cut-shirt.json explained { "recommended_size": "41", "confidence": 0.84, ... } # cold start, result only $ python -m agiofit.cli ../examples/profile-cold-start.json ../examples/cut-shirt.json result_only { "recommended_size": "41", "confidence": 0.25, ... }
05 · Worth defending in public
The only field that records an accepted trade-off. Without it, the system learns you reject tight shoulders; with it, it learns you accept a loose waist to get the shoulders right. In the reference implementation a flaw already accepted counts half when a size is chosen, and the judgement on the zone stays as it is.
Flat-laid measurements are half circumferences. It's the industry's most common mistake, and it produces recommendations wrong by a factor of two, silently. Here, if you don't declare it, the document doesn't validate.
A brand that "runs small" runs small in the torso. Applying the same centimetre shift to the collar — where 1 cm is a whole size — turns a useful correction into a wrong answer. History applies per zone: 1.0 on the chest, 0.2 on the collar. And the correction goes only to the zones the history says were wrong: a return for tight shoulders does not widen the chest.
Zero body measurements, a single kept garment from the same brand: the system still answers, with confidence capped at 0.40, refuses cross-brand inference and tells you what to add to improve. History is worth more than centimetres.