Skip to content

docs: align docs with unified vector model and current API#62

Merged
matt-edmondson merged 1 commit intovectorsfrom
claude/analyze-and-log-issues-C93Xf
May 9, 2026
Merged

docs: align docs with unified vector model and current API#62
matt-edmondson merged 1 commit intovectorsfrom
claude/analyze-and-log-issues-C93Xf

Conversation

@matt-edmondson
Copy link
Copy Markdown
Contributor

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:

  • The physics system is now metadata-driven (dimensions.json + Roslyn generator)
    but the docs still described BootstrapUnits, hand-written PhysicalDimensions.cs,
    and an "8 domains, 80+ quantities" structure that doesn't exist anymore.
  • FluentValidation has been removed but fluent-validation-integration.md still
    promised an integration.
  • Validation references mentioned attributes that no longer exist (IsEmail,
    IsNotEmpty, HasLength, IsUrl, IsPositive, IsInRange).
  • The strategy doc still listed the four foundational design decisions as open
    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):

  1. V0 - V0 returns the same V0 of T.Abs(a - b). (Resolve open design decision for Vector0 subtraction #52)
  2. Dimensionless and angular quantities have both V0 (Ratio) and V1
    (SignedRatio) bases.
  3. Semantic overloads widen implicitly to base, narrow explicitly. (No tests for semantic overload conversions (Weight, Drag, Distance, Diameter, …) #55)
  4. Per-dimension physicalConstraints metadata + ArgumentException-throwing
    factory 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 the
    content of library-overview.md.
  • docs/physics-domains-guide.md — rewritten against the actual dimensions.json
    contents (dimension-by-dimension with vector forms and overloads).
  • docs/validation-reference.md — full attribute catalogue rebuilt from the
    actual files in Semantics.Strings/Validation/Attributes/ and
    Semantics.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 (IsEmailIsEmailAddress,
    etc.), FromString<T>(...)Create(...), FormatExceptionArgumentException,
    removed [ValidateWith(typeof(...))] since the attribute doesn't exist.

Added

  • docs/physics-generator.md — schema for dimensions.json plus end-to-end
    walk-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 into complete-library-guide.md).
  • docs/examples/comprehensive-physics-examples.md (empty duplicate of the
    PascalCase file).

Net diff: +857 / −3329 across 12 files.

docs/examples/ was deferred — those will get a follow-up pass once the open
generator/runtime issues land.

Test plan

🤖 Generated docs alignment to support the work queue in #48#61.


Generated by Claude Code

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.
@matt-edmondson matt-edmondson changed the base branch from main to vectors May 9, 2026 07:01
@matt-edmondson matt-edmondson merged commit 5452dba into vectors May 9, 2026
@matt-edmondson matt-edmondson deleted the claude/analyze-and-log-issues-C93Xf branch May 9, 2026 10:51
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.

2 participants