<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Explanation on Mergeway</title><link>https://mergewayhq.github.io/docs/explanation/</link><description>Recent content in Explanation on Mergeway</description><generator>Hugo</generator><language>en</language><atom:link href="https://mergewayhq.github.io/docs/explanation/index.xml" rel="self" type="application/rss+xml"/><item><title>Why metadata as code?</title><link>https://mergewayhq.github.io/docs/explanation/metadata-as-code/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mergewayhq.github.io/docs/explanation/metadata-as-code/</guid><description>&lt;h1 id="why-metadata-as-code"&gt;Why metadata as code?&lt;a class="anchor" href="#why-metadata-as-code"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Metadata often begins as a small configuration file and grows into shared operational data: catalogs, ownership mappings, content, product definitions, or service inventories. A conventional database makes that data queryable, but its changes can become detached from the code, review, and deployment process that depends on it.&lt;/p&gt;
&lt;p&gt;Mergeway takes the opposite starting point. YAML and JSON records live in a Git repository beside explicit entity schemas. A proposed data change is therefore an ordinary change set: it has an author, a diff, reviewers, automated checks, and recoverable history.&lt;/p&gt;</description></item><item><title>The Mergeway repository model</title><link>https://mergewayhq.github.io/docs/explanation/repository-model/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mergewayhq.github.io/docs/explanation/repository-model/</guid><description>&lt;h1 id="the-mergeway-repository-model"&gt;The Mergeway repository model&lt;a class="anchor" href="#the-mergeway-repository-model"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Mergeway separates the logical data model from the files used to store it. Four terms keep that distinction clear.&lt;/p&gt;
&lt;h2 id="repository"&gt;Repository&lt;a class="anchor" href="#repository"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A &lt;strong&gt;repository&lt;/strong&gt; is the Git or project boundary containing Mergeway configuration, entity schemas, and record files. Documentation uses this term for the versioned body of data people review and share.&lt;/p&gt;
&lt;p&gt;The configuration entry point is normally &lt;code&gt;mergeway.yaml&lt;/code&gt;. A repository can keep definitions inline or include other files. Record sources can use YAML or JSON and can be divided into directories that make sense to maintainers.&lt;/p&gt;</description></item><item><title>The validation model</title><link>https://mergewayhq.github.io/docs/explanation/validation-model/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mergewayhq.github.io/docs/explanation/validation-model/</guid><description>&lt;h1 id="the-validation-model"&gt;The validation model&lt;a class="anchor" href="#the-validation-model"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Validation answers one repository-level question: can Mergeway load this file-based database as a consistent set of entities, records, and relationships? It proceeds in layers so a useful local error is reported before a dependent check produces noise.&lt;/p&gt;
&lt;h2 id="format"&gt;Format&lt;a class="anchor" href="#format"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The format phase reads configured YAML and JSON sources. Syntax errors, unsupported document shapes, or data that cannot be decoded stop the affected source from becoming records. Formatting and parsing are related but distinct: canonical formatting makes reviews predictable, while format validation determines whether data can be read.&lt;/p&gt;</description></item><item><title>Semantic diff versus file diff</title><link>https://mergewayhq.github.io/docs/explanation/semantic-diff/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mergewayhq.github.io/docs/explanation/semantic-diff/</guid><description>&lt;h1 id="semantic-diff-versus-file-diff"&gt;Semantic diff versus file diff&lt;a class="anchor" href="#semantic-diff-versus-file-diff"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;A Git file diff answers “which lines changed?” A Mergeway semantic diff answers “which records changed, and how?” Both views are useful, but they describe different layers of a repository.&lt;/p&gt;
&lt;h2 id="logical-records-outlive-files"&gt;Logical records outlive files&lt;a class="anchor" href="#logical-records-outlive-files"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Mergeway loads YAML, JSON, selected arrays, and other configured sources into one logical database. An entity name and identifier—such as &lt;code&gt;Post[post-001]&lt;/code&gt;—form a record&amp;rsquo;s identity. Its source file is provenance, not identity.&lt;/p&gt;</description></item><item><title>MCP access and security</title><link>https://mergewayhq.github.io/docs/explanation/mcp-access-security/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mergewayhq.github.io/docs/explanation/mcp-access-security/</guid><description>&lt;h1 id="mcp-access-and-security"&gt;MCP access and security&lt;a class="anchor" href="#mcp-access-and-security"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;mergeway-mcp&lt;/code&gt; separates mutation authority from inspection. Its catalog contains six query tools and no create, update, delete, shell, or arbitrary file-read tool. Calls reload saved repository state but never persist changes.&lt;/p&gt;
&lt;h2 id="what-read-only-guarantees"&gt;What read-only guarantees&lt;a class="anchor" href="#what-read-only-guarantees"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Through this server&amp;rsquo;s tools, a client can discover schemas, record fields, logical identifiers, configured backing paths, and structured exports. It cannot ask this server to modify them. This is narrower than saying the entire AI client is read-only: the client may have shell, editor, network, or other MCP tools with separate permissions.&lt;/p&gt;</description></item><item><title>Editor architecture</title><link>https://mergewayhq.github.io/docs/explanation/editor-architecture/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mergewayhq.github.io/docs/explanation/editor-architecture/</guid><description>&lt;h1 id="editor-architecture"&gt;Editor architecture&lt;a class="anchor" href="#editor-architecture"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Mergeway separates repository intelligence from editor presentation. &lt;code&gt;mergeway-lsp&lt;/code&gt; is the editor-neutral process: an LSP client launches it over stdio, supplies workspace folders and full document text, and renders the returned diagnostics and language features. An editor extension may add commands or a visual editor, but those are separate consumers of the same repository model.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;editor UI and client
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; │ stdio LSP
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ▼
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mergeway-lsp
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; │ roots + unsaved overlays
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ▼
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;configuration, data loader, validator, record index
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; │
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ▼
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;repository files on disk&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="roots-establish-isolation"&gt;Roots establish isolation&lt;a class="anchor" href="#roots-establish-isolation"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;At initialization the server takes &lt;code&gt;workspaceFolders&lt;/code&gt;, or falls back to &lt;code&gt;rootUri&lt;/code&gt; and then legacy &lt;code&gt;rootPath&lt;/code&gt;. Each candidate is checked directly for &lt;code&gt;mergeway.yaml&lt;/code&gt; and then &lt;code&gt;mergeway.yml&lt;/code&gt;. A valid candidate gets its own configuration, records, and identifier index. This isolation means equal identifiers in two roots neither collide nor navigate across roots.&lt;/p&gt;</description></item><item><title>Schema design choices</title><link>https://mergewayhq.github.io/docs/explanation/schema-design/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mergewayhq.github.io/docs/explanation/schema-design/</guid><description>&lt;h1 id="schema-design-choices"&gt;Schema design choices&lt;a class="anchor" href="#schema-design-choices"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Mergeway does not prescribe one repository layout. The durable choice is the one that makes identity, ownership, review, and automation clear for the team maintaining the records.&lt;/p&gt;
&lt;h2 id="native-fields-or-json-schema"&gt;Native fields or JSON Schema&lt;a class="anchor" href="#native-fields-or-json-schema"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Native &lt;code&gt;fields&lt;/code&gt; integrate directly with entity references, inheritance, defaults, enums, and path-derived fields. They are usually the clearest choice when Mergeway owns the schema.&lt;/p&gt;
&lt;p&gt;Use &lt;code&gt;json_schema&lt;/code&gt; when an external system owns an object contract or when its supported draft 2020-12 constraints are valuable. Mergeway converts only its documented subset, and JSON-Schema-backed entities cannot use inheritance. The &lt;a href="../../how-to/repositories/reuse-json-schema/"&gt;JSON Schema guide&lt;/a&gt; demonstrates the boundary.&lt;/p&gt;</description></item><item><title>Component architecture</title><link>https://mergewayhq.github.io/docs/explanation/component-architecture/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mergewayhq.github.io/docs/explanation/component-architecture/</guid><description>&lt;h1 id="component-architecture"&gt;Component architecture&lt;a class="anchor" href="#component-architecture"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Mergeway&amp;rsquo;s components are separate interfaces over one file-backed repository model. The specification defines the contract; shared Go packages load and validate it; each runnable component adds a workflow-specific boundary.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;repository files
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; │
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ▼
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;configuration + data + validation core
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; │
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ├── mergeway-cli operations, validation, formatting, export
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; │ └── JSON subprocess interface ── mergeway-python
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ├── mergeway-diff snapshots and semantic comparison
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ├── mergeway-mcp read-only MCP tools
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; └── mergeway-lsp diagnostics and language features
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ▲
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; │ stdio LSP
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; editor integrations&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="shared-repository-core"&gt;Shared repository core&lt;a class="anchor" href="#shared-repository-core"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;internal/config&lt;/code&gt; loads and normalizes configuration. &lt;code&gt;internal/data&lt;/code&gt; discovers sources and represents records. &lt;code&gt;internal/validation&lt;/code&gt; applies configuration, format, schema, and reference checks. This layering keeps identity, inheritance, path derivation, and reference semantics consistent across interfaces.&lt;/p&gt;</description></item></channel></rss>