Description
Configurable Markdown Normalization controls how a file becomes a Dotabase row. The normalizer contract receives parsed frontmatter, body content, filename, and path context, then returns a title, body, properties, tags, and metadata shaped for the destination. The shipped registry includes specialized normalizers for Artifacts, Lessons, Cabinet items, and Guardrails, plus generic, raw, field-map, inline-block, automatic, and mapping-driven strategies.
This separates file discovery from information architecture. The directory engine can remain deterministic while each corpus declares how source fields map to schema properties, how path segments become categories, and whether content should remain raw or be interpreted. A normalizer selection is explicit, making imports reproducible and reviewable.
Selling Points
- Adapts existing Markdown conventions without forcing users to rewrite their corpus first.
- Supports frontmatter, inline metadata blocks, file paths, headings, and raw-body strategies.
- Provides specialized mappings for important Dots knowledge types.
- Keeps normalization independent from hosted or local persistence backends.
- Exposes a small function contract for adding a purpose-built normalization strategy.
User Story
As a knowledge architect importing a structured notes folder, I map its status, owner, and category folders into my Dotabase schema while preserving each note body. The same mapping runs on every refresh, so the imported rows remain consistent with the source conventions.
Extension Surface
The rating is pluggable because packages/ingestion/src/markdown/normalizers/contract.ts defines a MarkdownNormalizer function contract and packages/ingestion/src/markdown/normalizers/registry.ts resolves registered built-in or configured factories. packages/ingestion/src/markdown/normalizers/mapping.ts also accepts declarative property mappings. A developer can supply a normalizer through the injected import seam without altering the walker or apply backend.
Capabilities & Limits
Capabilities include destination-specific frontmatter normalization, declarative field mapping, select-value bucketing, path-derived categories, inline key extraction, raw passthrough, automatic title selection, and sanitized import metadata. Limits remain: a normalizer cannot create schema options that do not exist, invalid values may be omitted rather than guessed, and source-specific business logic must still obey the normalized row contract.
Implementation Map
packages/ingestion/src/markdown/normalizers/contract.tspackages/ingestion/src/markdown/normalizers/registry.tspackages/ingestion/src/markdown/normalizers/mapping.tspackages/ingestion/src/markdown/normalizers/metadata.ts