docs: align docs with unified vector model and current API#62
Merged
matt-edmondson merged 1 commit intovectorsfrom May 9, 2026
Merged
docs: align docs with unified vector model and current API#62matt-edmondson merged 1 commit intovectorsfrom
matt-edmondson merged 1 commit intovectorsfrom
Conversation
Collapse and rewrite the documentation set so it matches the code on this branch (metadata-driven source generator, IVector0..IVector4 hierarchy, dimensions.json as the source of truth, FluentValidation removed, BootstrapUnits gone). Resolves the four blocking design questions in the strategy doc: - V0 - V0 returns the same V0 of |a - b|. - Dimensionless / angular have both V0 (Ratio) and V1 (SignedRatio) bases. - Semantic overloads widen implicitly to base, narrow explicitly. - Physical constraints come from per-dimension metadata + factory guards. Concrete changes: - Rewrite CLAUDE.md, README.md, complete-library-guide.md, physics-domains-guide.md, validation-reference.md, advanced-usage.md to match the actual code surface (real attribute names, real factory APIs, ArgumentException not FormatException, 62 dimensions / ~195 generated types). - Add docs/physics-generator.md describing the dimensions.json schema and the end-to-end add-a-dimension / add-an-overload / add-a-relationship workflows. - Trim docs/strategy-unified-vector-quantities.md: convert the "Open Questions" sections into "Resolved Decisions" with the locked-in rules. - Delete docs/fluent-validation-integration.md (FluentValidation has been removed), docs/design-semantic-quantities.md (superseded by the strategy doc), and docs/library-overview.md (merged into complete-library-guide.md). - Remove the empty duplicate docs/examples/comprehensive-physics-examples.md.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First pass at making the documentation match the code on this branch so we can
reference it as the source of truth while working through the open issues
(#48–#61). This PR is docs-only — no source changes.
The branch had drifted significantly from the docs:
dimensions.json+ Roslyn generator)but the docs still described
BootstrapUnits, hand-writtenPhysicalDimensions.cs,and an "8 domains, 80+ quantities" structure that doesn't exist anymore.
fluent-validation-integration.mdstillpromised an integration.
IsEmail,IsNotEmpty,HasLength,IsUrl,IsPositive,IsInRange).questions, which meant nothing in the docs could be authoritative.
What changed
Decisions resolved (all incorporated into the docs and tracked-against in
the open issues):
V0 - V0returns the same V0 ofT.Abs(a - b). (Resolve open design decision for Vector0 subtraction #52)Dimensionlessand angular quantities have both V0 (Ratio) and V1(
SignedRatio) bases.physicalConstraintsmetadata +ArgumentException-throwingfactory guards enforce floors like absolute zero. (Vector0 quantities do not enforce the non-negativity invariant #50, Domain-specific physical constraints (absolute zero, non-negative frequency, etc.) not enforced #51)
Rewritten
CLAUDE.md— replaced bootstrap/units narrative with the unified vector model,resolved decisions, and pointers to the new docs.
README.md— corrected counts (62 dimensions / ~195 types, not "8 domains /80+ quantities"), removed FluentValidation links, replaced stale physics
examples and stale attribute names.
docs/complete-library-guide.md— single canonical user guide; merged in thecontent of
library-overview.md.docs/physics-domains-guide.md— rewritten against the actualdimensions.jsoncontents (dimension-by-dimension with vector forms and overloads).
docs/validation-reference.md— full attribute catalogue rebuilt from theactual files in
Semantics.Strings/Validation/Attributes/andSemantics.Paths/Validation/Attributes/.Trimmed
docs/strategy-unified-vector-quantities.md— converted the "Open Questions"sections into "Resolved Decisions". Now safe to cite as the architecture spec.
docs/advanced-usage.md— fixed stale attribute names (IsEmail→IsEmailAddress,etc.),
FromString<T>(...)→Create(...),FormatException→ArgumentException,removed
[ValidateWith(typeof(...))]since the attribute doesn't exist.Added
docs/physics-generator.md— schema fordimensions.jsonplus end-to-endwalk-throughs for adding a dimension, a semantic overload, or a relationship.
Deleted
docs/fluent-validation-integration.md(FluentValidation removed).docs/design-semantic-quantities.md(superseded by the strategy doc).docs/library-overview.md(merged intocomplete-library-guide.md).docs/examples/comprehensive-physics-examples.md(empty duplicate of thePascalCase file).
Net diff: +857 / −3329 across 12 files.
docs/examples/was deferred — those will get a follow-up pass once the opengenerator/runtime issues land.
Test plan
docs/strategy-unified-vector-quantities.mdResolved Decisionssections to confirm they're the rules you want baked in.
docs/physics-generator.mdis the right level of detail toreference when working through QuantitiesGenerator emits a factory for only the first availableUnit #48 (factory generation), Vector0 quantities do not enforce the non-negativity invariant #50 (V0
non-negativity), Domain-specific physical constraints (absolute zero, non-negative frequency, etc.) not enforced #51 (physical constraints).
README.md/complete-library-guide.mdexamples against thegenerated types in
Semantics.Quantities/Generated/.🤖 Generated docs alignment to support the work queue in #48–#61.
Generated by Claude Code