Skip to content

docs: the add-a-type procedure, built on the clone sweep instead of a template - #176

Merged
CaffeinatedCoder merged 2 commits into
mainfrom
docs/add-a-type-procedure
Oct 18, 2026
Merged

CaffeinatedCoder merged 2 commits into
mainfrom
docs/add-a-type-procedure

Conversation

@CaffeinatedCoder

Copy link
Copy Markdown
Owner

Closes #174

Problem

Every concrete range union and value set is a hand-written copy of its siblings. Measured on main with the type names normalized, Int32Range and Int64Range differ in about 25 of 254 lines, Int32Set and Int64Set in 20 of 258, and across an axis about half, because discrete versus continuous and temporal versus numeric each change a different set of members. docs/architecture.md said what every type must carry but not how a contributor adds one, in which order, or which discovered tests will list what is left.

A scaffolding script was considered for this and rejected. It would be a twelfth sibling that no sweep reads, it rots on the first fix the live files take, and it scaffolds the hundred lines that take ten minutes while leaving the hundred that take thought. The clone-divergence sweep (#145) already made the siblings the template.

Change

  • docs/architecture.md: a new section, Adding a Range or Set Type. The measured duplication and why there is no template; then five steps: measure the domain on a live server before writing a line (what no sweep can do), copy the nearest sibling on each of four axes (a table naming the siblings per axis and what each axis changes), the hand-listed wiring sites outside the type's own file by project (core, EF, NodaTime, the tests that list types by hand, the catalogues, the docs), the tests to run in order with what each one's failures mean, and the seed for the type's guard. Float64Range/Float64Set and Float32Range/Float32Set over finite values only, mapped to custom float8range and float4range #153 (DoubleRange) is the worked example throughout.
  • AGENTS.md: the critical rule on new range types now points at the procedure and states that there is deliberately no scaffold.

Tests

Documentation only. Every test class, member and tool verb the section names was checked to exist in the tree. The conventions project passes (324 tests), which covers the catalogue and changelog consistency tests that read the docs; docs/architecture.md is an agent doc and is not a claim source, so no claims.json entry is due.

🤖 Generated with Claude Code

… template

Every concrete range union and value set is a hand-written copy of its siblings:
Int32Range and Int64Range differ in about 25 of 254 lines once the names are
normalized, Int32Set and Int64Set in 20 of 258, and across an axis about half.
A scaffolding script was considered and rejected: it would be a twelfth sibling
no sweep reads, rotting on the first fix, and it scaffolds the ten-minute lines
while leaving the ones that take thought. The clone-divergence sweep (#145)
already makes the siblings the template.

docs/architecture.md gains the procedure that was missing: measure the domain on
a live server first, copy the nearest sibling on each of four axes (the sweep's
families name them), the hand-listed wiring sites by project, the tests and
catalogues that list what is left in the order to run them, and the seed for the
type's guard. AGENTS.md's rule on new range types points at it.

Closes #174

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@CaffeinatedCoder CaffeinatedCoder added documentation Improvements or additions to documentation area/ranges Range unions, variants and the shape engines area/value-sets Value set families and wrapper arities package/nodatime Affects CodoMetis.ValueRanges.NodaTime package/efcore Affects CodoMetis.ValueRanges.EFCore.PostgreSQL package/core Affects CodoMetis.ValueRanges package/efcore-nodatime Affects CodoMetis.ValueRanges.EFCore.PostgreSQL.NodaTime labels Oct 18, 2026
@CaffeinatedCoder CaffeinatedCoder added this to the 10.0.0 milestone Oct 18, 2026
@CaffeinatedCoder
CaffeinatedCoder merged commit bab799b into main Oct 18, 2026
@CaffeinatedCoder
CaffeinatedCoder deleted the docs/add-a-type-procedure branch October 18, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ranges Range unions, variants and the shape engines area/value-sets Value set families and wrapper arities documentation Improvements or additions to documentation package/core Affects CodoMetis.ValueRanges package/efcore Affects CodoMetis.ValueRanges.EFCore.PostgreSQL package/efcore-nodatime Affects CodoMetis.ValueRanges.EFCore.PostgreSQL.NodaTime package/nodatime Affects CodoMetis.ValueRanges.NodaTime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document the add-a-type procedure: copy the nearest sibling, let the sweeps list what is left

1 participant