Skip to content

Proposal: add unit system metadata - #148

Open
LukaHummel wants to merge 1 commit into
cooklang:mainfrom
LukaHummel:agent/add-unit-system-metadata-proposal
Open

Proposal: add unit system metadata#148
LukaHummel wants to merge 1 commit into
cooklang:mainfrom
LukaHummel:agent/add-unit-system-metadata-proposal

Conversation

@LukaHummel

@LukaHummel LukaHummel commented Aug 2, 2026

Copy link
Copy Markdown

Summary

  • propose an optional recipe-level unit system metadata key
  • standardize metric, imperial, and us customary source-system values
  • define client behavior for ambiguous units, mixed-system recipes, unsupported conversions, and best-fit formatting

Motivation

Cooklang supports serving-based scaling, but clients do not have a portable source-system hint for unit conversion. This proposal lets recipe authors distinguish systems such as British Imperial and US customary while leaving conversion tables, rounding, target units, and presentation policy to each client.

This addresses #142.

Impact

The proposal does not change Cooklang grammar or require clients to implement conversion. Existing parsers can expose the key through generic YAML metadata, and clients without conversion support continue rendering recipes unchanged.

Full Proposal

@LukaHummel
LukaHummel marked this pull request as ready for review August 2, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant