<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Domain model on Katalyst Documentation</title><link>https://deploy-preview-116--stately-starburst-216875.netlify.app/deep-dives/domain-model/</link><description>Recent content in Domain model on Katalyst Documentation</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://deploy-preview-116--stately-starburst-216875.netlify.app/deep-dives/domain-model/index.xml" rel="self" type="application/rss+xml"/><item><title>Bases</title><link>https://deploy-preview-116--stately-starburst-216875.netlify.app/deep-dives/domain-model/base/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-116--stately-starburst-216875.netlify.app/deep-dives/domain-model/base/</guid><description>&lt;h1 id="bases"&gt;Bases&lt;a class="anchor" href="#bases"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;A &lt;strong&gt;base&lt;/strong&gt; is how Katalyst reaches a backend source and maps that source into the domain model.&lt;/p&gt;
&lt;p&gt;Every base must include configuration for &lt;strong&gt;raw&lt;/strong&gt; access. Raw access gives Katalyst a stable way to locate content in the source. For a filesystem, that can be a root directory. For SQL, that can be connection information for a specific instance.&lt;/p&gt;
&lt;p&gt;A &lt;strong&gt;collectionized&lt;/strong&gt; base keeps that raw access and adds collection definitions. Those definitions map base-native references into named collections and item identities that Katalyst commands can address directly. This is where two-way mapping applies.&lt;/p&gt;</description></item><item><title>Collections</title><link>https://deploy-preview-116--stately-starburst-216875.netlify.app/deep-dives/domain-model/collections/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-116--stately-starburst-216875.netlify.app/deep-dives/domain-model/collections/</guid><description>&lt;h1 id="collections"&gt;Collections&lt;a class="anchor" href="#collections"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;internal/project&lt;/code&gt; loader (&lt;code&gt;loader.go&lt;/code&gt;) is the orchestration hub: it loads a
project&amp;rsquo;s &lt;code&gt;.katalyst/&lt;/code&gt; directory, resolves named schemas, and assembles bases
and their collections. Each object type parses its own config: the base
registry validates a declared &lt;code&gt;type&lt;/code&gt;, and a collection parses its own block in
&lt;code&gt;storage/collection&lt;/code&gt;. It decides which schema applies to a given item, and the
&lt;code&gt;check&lt;/code&gt; lifecycle is driven from here.&lt;/p&gt;
&lt;p&gt;This page is the model and the &lt;em&gt;why&lt;/em&gt;; for the key-by-key surface see the
&lt;a href="https://deploy-preview-116--stately-starburst-216875.netlify.app/reference/configuration/"&gt;configuration reference&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Checks</title><link>https://deploy-preview-116--stately-starburst-216875.netlify.app/deep-dives/domain-model/checks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-116--stately-starburst-216875.netlify.app/deep-dives/domain-model/checks/</guid><description>&lt;h1 id="checks"&gt;Checks&lt;a class="anchor" href="#checks"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;A &lt;strong&gt;check&lt;/strong&gt; asserts one condition on an item and reports a violation when the
item fails it. The check engine turns a collection&amp;rsquo;s configuration into a
verdict on each item: it resolves the checks that apply, runs them, and
collects their violations. This page explains the model the engine is built on,
how check libraries supply and run checks, and why the pieces are shaped the way
they are. For the per-type catalog see the &lt;a href="https://deploy-preview-116--stately-starburst-216875.netlify.app/reference/check-types/"&gt;check types
reference&lt;/a&gt;; for the
end-to-end data flow of one &lt;code&gt;check&lt;/code&gt; invocation see the &lt;a href="https://deploy-preview-116--stately-starburst-216875.netlify.app/deep-dives/domain-model/"&gt;domain
model&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Inspectors</title><link>https://deploy-preview-116--stately-starburst-216875.netlify.app/deep-dives/domain-model/inspectors/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-116--stately-starburst-216875.netlify.app/deep-dives/domain-model/inspectors/</guid><description>&lt;h1 id="inspectors"&gt;Inspectors&lt;a class="anchor" href="#inspectors"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;An &lt;strong&gt;inspector&lt;/strong&gt; profiles content and returns &lt;em&gt;evidence&lt;/em&gt;: counts and
distributions, never recommendations. Inspectors are the descriptive dual of
&lt;a href="https://deploy-preview-116--stately-starburst-216875.netlify.app/deep-dives/domain-model/checks/"&gt;checks&lt;/a&gt; - a check asserts a predicate and reports
violations; an inspector reports the distribution that predicate would be tested
against. They drive the &lt;a href="https://deploy-preview-116--stately-starburst-216875.netlify.app/reference/cli/"&gt;&lt;code&gt;inspect&lt;/code&gt;&lt;/a&gt;
command. For the per-inspector catalog see the &lt;a href="https://deploy-preview-116--stately-starburst-216875.netlify.app/reference/inspectors/"&gt;inspectors
reference&lt;/a&gt;; this page is the
model and the rationale behind it.&lt;/p&gt;
&lt;h2 id="terms"&gt;Terms&lt;a class="anchor" href="#terms"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Term&lt;/th&gt;
					&lt;th&gt;Meaning&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Inspector&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;A read-only operation that profiles content and returns evidence.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Evidence&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;The measured counts, distributions, classes, or summaries an inspector reports. Evidence is not a recommendation or verdict.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Raw base layer&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;Inspectors that measure a base directly before collection configuration.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Collection layer&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;Inspectors that measure configured collection items by domain identity.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Measurement primitive&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;A reusable profiler such as &lt;code&gt;objectFields&lt;/code&gt;, &lt;code&gt;markdownBody&lt;/code&gt;, &lt;code&gt;fileMetadata&lt;/code&gt;, or content-shape parsing that inspectors point at a specific input.&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="model"&gt;Model&lt;a class="anchor" href="#model"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Inspectors come in two layers, distinguished by &lt;em&gt;how they reference the data&lt;/em&gt;:&lt;/p&gt;</description></item><item><title>Fix</title><link>https://deploy-preview-116--stately-starburst-216875.netlify.app/deep-dives/domain-model/fix/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-116--stately-starburst-216875.netlify.app/deep-dives/domain-model/fix/</guid><description>&lt;h1 id="fix"&gt;Fix&lt;a class="anchor" href="#fix"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Why &lt;a href="https://deploy-preview-116--stately-starburst-216875.netlify.app/reference/cli/"&gt;&lt;code&gt;katalyst fix&lt;/code&gt;&lt;/a&gt; rewrites
frontmatter the opinionated way it does. The parser and encoder live in
&lt;code&gt;internal/codec/markdownbodytext&lt;/code&gt;; the transform that drives the canonical
form, and the backend write that persists it, live in &lt;code&gt;internal/fix&lt;/code&gt; and
&lt;code&gt;internal/storage/collection/filesystem&lt;/code&gt; respectively.&lt;/p&gt;
&lt;h2 id="terms"&gt;Terms&lt;a class="anchor" href="#terms"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Term&lt;/th&gt;
					&lt;th&gt;Meaning&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Fix&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;A command that rewrites existing content into Katalyst&amp;rsquo;s canonical form when a check can supply a safe transformation.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Canonical form&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;The deterministic output format &lt;code&gt;fix&lt;/code&gt; writes: preserved frontmatter syntax, sorted top-level keys, native encoder style, preserved body bytes, and one trailing newline.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Report-only check&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;A check that can report violations but cannot safely rewrite content.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Check mode&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;The &lt;code&gt;--check&lt;/code&gt; form of &lt;code&gt;fix&lt;/code&gt;: print what would change, write nothing, and exit 1 if any item is non-canonical.&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="design-rationale"&gt;Design rationale&lt;a class="anchor" href="#design-rationale"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Fix is deliberately opinionated.&lt;/strong&gt;&lt;/p&gt;</description></item></channel></rss>