feat(strings): add Semantics.Strings.Identifiers package (Phase 0)#108
Merged
Conversation
…tly, no using System, Ensure.NotNull)
|
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
Adds a new
ktsu.Semantics.Strings.Identifierspackage — the first batteries-included concrete semantic-string types on top of theSemantics.Stringsframework, which until now shipped only the validation framework with zero concrete types. This is Phase 0 of the semantic-domains roadmap (docs/roadmap-semantic-domains.md), scoped to the identifier subset.Six validated identifier types, each a
sealed record : SemanticString<T>with one package-local validation attribute:UuidUlidIbanIsbnX) or ISBN-13 (mod-10) check digitCreditCardNumberJwtTokenDesign decisions
NativeSemanticStringValidationAttribute/ValidationAdapter); nothing domain-specific leaks intoSemantics.Strings.IsEmailAddress) which pass on empty to compose with a length rule, identifier attributes reject""—Uuid.Create("")throwsArgumentException.IsEmailAddressprecedent): real check-digit maths where a checksum exists; documented non-goals (e.g. JWT signature is not verified; IBAN per-country BBAN tables not enforced; no BIN/PCI for card numbers).ToGuid(), JWT claim decode); those are a clean follow-up (YAGNI).Base64,HexString,SemVer,HexColor) → futureSemantics.Strings.Formats; web types (Email,Url, …) → futureSemantics.Strings.Web.Testing
As<T>round-trip). Full suite: 944/944 passing, solution build clean (0 warnings across all five TFMsnet10.0–net8.0+netstandard2.0/2.1).JsonDocument.Parse(byte[]),Convert.FromBase64String,Regextimeouts all available).Docs
docs/superpowers/specs/2026-07-01-concrete-semantic-strings-design.mddocs/superpowers/plans/2026-07-01-semantics-strings-identifiers.mdCLAUDE.mdproject-layout row.Note on versioning
New additive package — the merge commit should carry a
[minor]tag per the ktsu versioning convention.🤖 Generated with Claude Code