<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged domain-driven-design</title>
<link>https://coderlegion.com/tag/domain-driven-design</link>
<description>Powered by Question2Answer</description>
<item>
<title>Domain Templates: Stop Configuring Your LLM Knowledge Base From Scratch</title>
<link>https://coderlegion.com/27184/domain-templates-stop-configuring-your-llm-knowledge-base-from-scratch</link>
<description>&lt;h3 id=&quot;the-two-weeks-before-the-first-document&quot;&gt;The Two Weeks Before the First Document&lt;/h3&gt;
&lt;p&gt;There is a common pattern in knowledge management projects that nobody talks about enough: the first two weeks are not spent capturing knowledge. They are spent arguing about structure.&lt;/p&gt;
&lt;p&gt;What pages should exist? How should the query routing be organized so that &quot;show me the LBO sensitivity table for the Acme deal&quot; lands on the right page instead of returning a generic financial overview? Which source types need their own intake forms, and what fields matter for a pharmaceutical company versus an investment fund? How aggressively should the lint gate fire - a compliance team needs every claim to be citation-backed, while a personal learning wiki can afford to be looser?&lt;/p&gt;
&lt;p&gt;These decisions are not arbitrary. They reflect how knowledge actually moves through a domain: the document types people produce, the questions they ask against existing content, the verification standards that professionals in that field consider non-negotiable. A compliance analyst's knowledge base has a fundamentally different shape than a DevOps runbook system, even if both are backed by the same LLM infrastructure.&lt;/p&gt;
&lt;p&gt;The problem is that most teams figure this out by trial and error. They install a blank wiki, start ingesting, discover the routing is wrong after a dozen queries fail to route correctly, rebuild the index, start over. The structural questions that should be answered on day one get answered by week four, after the team has already ingested content that no longer fits the corrected structure.&lt;/p&gt;
&lt;p&gt;This is the problem that domain templates solve.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-a-domain-template-actually-provides&quot;&gt;What a Domain Template Actually Provides&lt;/h3&gt;
&lt;p&gt;A domain template is not a demo or a sample dataset. It is a pre-made structural skeleton for a specific knowledge domain - everything that governs how knowledge is organized, ingested, and queried, without any of the actual content.&lt;/p&gt;
&lt;p&gt;When you install &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/axoviq-ai/synthadoc&quot;&gt;Synthadoc&lt;/a&gt; with a domain template, you get six structural components in one operation:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Query routing table (&lt;code&gt;ROUTING.md&lt;/code&gt;)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is the map that tells the query engine which branches of your wiki to search based on the nature of the question. A finance/investment template routes &quot;capital structure questions&quot; to pages about debt financing and covenants, while routing &quot;valuation questions&quot; to financial models and comparable companies. A compliance template routes &quot;regulatory requirement questions&quot; to the regulatory obligations register, separate from the controls and audit findings that address them.&lt;/p&gt;
&lt;p&gt;Writing this routing from scratch requires understanding how queries in that domain actually decompose - what the natural question categories are and which page types hold the answers. That is domain knowledge most developers building a knowledge system do not have, and it shows up as poor retrieval quality until someone with domain expertise intervenes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Domain-tuned agent guidelines&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Each template ships with a &lt;code&gt;CLAUDE.md&lt;/code&gt;, &lt;code&gt;AGENTS.md&lt;/code&gt;, and &lt;code&gt;GEMINI.md&lt;/code&gt; in the wiki root. These are the standard files that AI coding assistants — Claude Code, Gemini CLI, GitHub Copilot Agents — read automatically when they are active in a directory. The domain guidelines from the template are injected into each file, so any AI tool you already use becomes domain-aware the moment it opens the wiki.&lt;/p&gt;
&lt;p&gt;Here is what the clinical healthcare template puts in those files:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;Cite clinical guidelines by issuing body, title, year, and recommendation strength (Grade A/B/C or Level 1/2/3). Flag drug dosages with the approved indication, route, weight-based formula if applicable, and key contraindications. Note evidence quality for every clinical claim: RCT, meta-analysis, cohort study, expert consensus, or case report. Never store identifiable patient data in wiki pages — all examples must be de-identified or synthetic.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Compare that to the compliance template:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;Map every compliance obligation to the specific regulation, rule, or contractual requirement that creates it. Track compliance controls with the control owner, testing frequency, and last test date and result. Document exceptions and risk acceptances with approver, rationale, and expiry date. Distinguish between legal requirements (non-negotiable) and internal policy requirements (adjustable). Note jurisdiction and regulated entity for every obligation — compliance applies entity-by-entity.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;These are not generic instructions to &quot;be accurate and cite your sources.&quot; They reflect how practitioners in each field think about quality. When a compliance analyst has Claude Code running in their wiki directory and asks it to help write a page, draft an ingest command, or interpret a lint warning, Claude Code reads CLAUDE.md and already knows that regulatory citations need jurisdiction-level specificity, that control owners must be named, and that internal policy requirements are distinct from legal ones. The analyst gets a coding assistant that understands the domain's standards — without configuring anything.&lt;/p&gt;
&lt;p&gt;The same files also include the full Synthadoc CLI reference, page schema, lifecycle commands, and MCP tool list, so the AI assistant always knows how to operate the wiki correctly for that domain.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Scaffold stub pages&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Each template ships with 8–12 stub pages covering the core knowledge areas of that domain. For finance/investment, these include pages for companies, deals, financial models, and sectors. For a DevOps template, you get pages for infrastructure, incidents, pipelines, and runbooks.&lt;/p&gt;
&lt;p&gt;These pages are not populated with content — they are empty frames with the right titles, frontmatter, and a scaffold zone marker that tells the system where auto-generated content can live versus where your own edits are protected.&lt;/p&gt;
&lt;p&gt;The scaffold zone mechanic is worth explaining: every scaffold page contains an HTML comment &lt;code&gt;&amp;lt;!-- synthadoc:scaffold --&amp;gt;&lt;/code&gt; that divides the page into a preserved zone (above the marker, where you write permanent content) and a generated zone (below it, refreshed by the weekly scaffold job). This means the structural skeleton gets maintained automatically as your wiki grows, without ever overwriting work you have done by hand.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Blank intake forms&lt;/strong&gt; (&lt;code&gt;template-*.md&lt;/code&gt;)&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;raw_sources/&lt;/code&gt; subfolders in each template install contain blank intake forms for the document types common to that domain. A finance/investment install includes forms for company profiles, deal memos, financial models, and due diligence checklists. A pharmaceutical template includes forms for clinical trial summaries, regulatory submission packages, and drug safety reports.&lt;/p&gt;
&lt;p&gt;These are structured markdown templates with pre-defined fields that mirror what practitioners actually record for each document type. An investment banking associate filling in a deal memo form is prompted for the deal thesis, target return, capital structure, and key risks — the same fields they would populate in any professional deal memo, now wired directly into the knowledge base.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5. Pre-validated seed sources (&lt;code&gt;seeds.md&lt;/code&gt;)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Every template includes a &lt;code&gt;seeds.md&lt;/code&gt; file that lives in the wiki root after installation. This file contains curated ingest commands for public-domain reference sources specific to that domain — all checked for accessibility, domain relevance, and compliance with the domain's own quality standards before the template was released.&lt;/p&gt;
&lt;p&gt;For finance/investment, the seed sources include the SEC's investor education materials and the Federal Reserve's H.15 interest rate releases. For banking, they include the FDIC's regulations and the OCC's publications index. For healthcare/clinical, they include clinical guideline registries and evidence-based medicine references.&lt;/p&gt;
&lt;p&gt;The intent is to give the wiki real domain context before the team starts adding proprietary content. A query about LBO mechanics should have authoritative reference material to draw on, not just a blank slate.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6. Scheduled maintenance jobs&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A template install also pre-registers two recurring jobs: a weekly lint run (Sunday 2:00 AM) and a weekly scaffold job (Sunday 3:00 AM). The lint job validates every page in the wiki against the domain guidelines — checking for citation presence, orphan links, and internal contradictions — then promotes clean draft pages to active status automatically. The scaffold job refreshes the stub pages and index with new LLM-generated summaries of your current content.&lt;/p&gt;
&lt;p&gt;Neither job requires manual intervention once the wiki is running.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;template-library-30-domains-9-categories&quot;&gt;Template Library: 30 Domains, 9 Categories&lt;/h3&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/axoviq-ai/synthadoc&quot;&gt;Synthadoc&lt;/a&gt; ships 30 domain templates organized across 9 categories. The full library is shown below.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;┌─────────────────────────────────────────────────────────────────────────┐
│                    SYNTHADOC DOMAIN TEMPLATE LIBRARY                    │
├──────────────────┬──────────────────────────────────────────────────────┤
│  FINANCE (4)     │  Investment · Mortgage · Banking · Accounting        │
├──────────────────┼──────────────────────────────────────────────────────┤
│  TECHNOLOGY (4)  │  Software Dev · DevOps · AI/ML · Data Engineering    │
├──────────────────┼──────────────────────────────────────────────────────┤
│  HEALTHCARE (3)  │  Clinical · Pharmaceutical · Public Health           │
├──────────────────┼──────────────────────────────────────────────────────┤
│  LEGAL (3)       │  Legal Ops · Compliance · IP Management              │
├──────────────────┼──────────────────────────────────────────────────────┤
│  RESEARCH (3)    │  Academic · Market Research · Science Lab            │
├──────────────────┼──────────────────────────────────────────────────────┤
│  OPERATIONS (3)  │  Facility Mgmt · Manufacturing &amp;amp; QC · Supply Chain   │
├──────────────────┼──────────────────────────────────────────────────────┤
│  REAL ESTATE (3) │  Development · Investment · Property Management      │
├──────────────────┼──────────────────────────────────────────────────────┤
│  EDUCATION (3)   │  Personal Learning · Course Design · Corp. Training  │
├──────────────────┼──────────────────────────────────────────────────────┤
│  BUSINESS (4)    │  Project Mgmt · Product Mgmt · HR &amp;amp; People ·         │
│                  │  Marketing                                           │
└──────────────────┴──────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=4066504104426641760&quot; alt=&quot;domain templates&quot;&gt;&lt;/p&gt;
&lt;p&gt;The categories were not chosen arbitrarily. The selection reflects two criteria: domains where knowledge is both high-stakes (wrong answers have real consequences) and naturally document-heavy (the source material already exists, it is just not queryable). Finance, healthcare, and legal are the clearest examples — these fields produce enormous volumes of structured documents whose content practitioners need to recall accurately under time pressure. Technology operations and research are the next tier, where the cost of an engineer not knowing the current incident runbook or a researcher duplicating a failed experiment is concrete and measurable.&lt;/p&gt;
&lt;h4 id=&quot;how-the-guidelines-were-designed&quot;&gt;How the guidelines were designed&lt;/h4&gt;
&lt;p&gt;Each set of agent guidelines was written from the conventions and standards of the professional community, not from first principles. The investment banking guidelines are grounded in how analysts actually distinguish between management guidance, analyst consensus, and proprietary estimates — a distinction that matters for compliance reasons, not just accuracy. The clinical guidelines encode evidence grading scales (Grade A/B/C, Level 1/2/3) that clinical practitioners use daily. The compliance guidelines map obligations to the specific regulations that create them, which is how compliance officers structure their work to survive an audit.&lt;/p&gt;
&lt;p&gt;The seed sources were validated for two properties: &lt;strong&gt;accessibility&lt;/strong&gt; (the URL resolves and returns parseable content) and &lt;strong&gt;domain appropriateness&lt;/strong&gt; (the content meets the quality bar defined in the template's own guidelines). A seed URL that returns a 404, requires authentication, or produces content below the domain's evidence standards is not included. The seeds are regenerated automatically on each release by a validation script that re-checks every URL and re-runs the domain guidelines against the returned content.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;building-your-domain-wiki-from-install-to-first-query&quot;&gt;Building Your Domain Wiki: From Install to First Query&lt;/h3&gt;
&lt;p&gt;Getting a domain-template wiki to the point where it can answer real questions takes less than an hour for most domains.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 1: Install with a template&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;synthadoc templates list          # browse all 30 options
synthadoc install my-wiki --target ~/wikis --template finance/investment
synthadoc serve my-wiki
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The install command creates a standard wiki, then applies the template: routing table, agent guidelines, stub pages, intake forms, and seeds. &lt;code&gt;staging_policy&lt;/code&gt; is set to &lt;code&gt;all&lt;/code&gt; on template installs — every ingested page goes to a candidates queue for your review before it enters the live wiki.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2: Read seeds.md&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Open &lt;code&gt;seeds.md&lt;/code&gt; in the installed wiki. This is your starting checklist: the seed ingest commands at the top give you authoritative reference material in one copy-paste operation; the topic hints below them point you toward additional sources specific to your situation.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# From seeds.md for finance/investment:
synthadoc ingest &quot;https://www.investor.gov/introduction-investing&quot; -w my-wiki
synthadoc ingest &quot;https://www.federalreserve.gov/releases/h15/&quot; -w my-wiki
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Step 3: Add your own sources&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Place your documents in &lt;code&gt;raw_sources/&lt;/code&gt; using whatever subfolder structure makes sense for your domain. The intake forms in each subfolder show you what fields the ingest agent expects for each document type. Copy a form, rename it (drop the &lt;code&gt;template-&lt;/code&gt; prefix), fill it in, then ingest it.&lt;/p&gt;
&lt;p&gt;If you prefer to fill everything in first and ingest in one shot, that works too:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# All files in raw_sources/, excluding template-*.md blanks automatically
synthadoc ingest raw_sources/ --batch -w my-wiki
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Step 4: Review candidates&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;After ingesting, open the Obsidian plugin and run &lt;strong&gt;Synthadoc: Candidates: review candidate pages...&lt;/strong&gt; from the Command Palette. The modal lists every staged page with its slug, colour-coded confidence badge (&lt;code&gt;high&lt;/code&gt; / &lt;code&gt;medium&lt;/code&gt; / &lt;code&gt;low&lt;/code&gt;), and ingest timestamp — promote what passes your bar, discard what does not.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 5: Run lint&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;synthadoc lint run -w my-wiki
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Lint validates every page against the domain guidelines, checks citation presence, and flags orphan links and contradictions. Clean draft pages are promoted to &lt;code&gt;active&lt;/code&gt; status automatically. After lint, your wiki is queryable.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-happens-after-the-wiki-is-built&quot;&gt;What Happens After the Wiki Is Built&lt;/h3&gt;
&lt;p&gt;Once your domain wiki is active, you stop thinking about configuration entirely. The agentic workflows built into Synthadoc handle maintenance automatically, and the web UI guides you toward the next action without you having to ask.&lt;/p&gt;
&lt;p&gt;After every query or lint run, the web UI reads the response and surfaces a pre-filled prompt for the most important next step: stale pages detected → &quot;Re-ingest these pages&quot;; re-ingest just completed → &quot;Run lint to promote them&quot;; contradicted pages found → &quot;Run the contradiction resolver&quot;; orphan pages or broken wikilinks present → the relevant workflow queued and ready. You click, confirm, and the workflow runs. The hint engine also adapts the suggested queries shown at the start of each session to your wiki's current health state — a wiki with unresolved contradictions gets different starting prompts than one that is clean. Most users find they do not need to remember any maintenance commands at all.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Contradiction resolution&lt;/strong&gt; — when two pages in your wiki assert conflicting claims, the contradiction resolver workflow identifies the conflict, retrieves the original source documents, and proposes a resolution strategy. For a compliance wiki, this means conflicting regulatory interpretations are surfaced and queued for an analyst to adjudicate, not silently left in the knowledge base. The workflow runs interactively from both the web UI and the CLI.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Orphan management&lt;/strong&gt; — the lint workflow detects pages that exist but are not linked from anywhere in the wiki, then the orphan resolver workflow proposes where to link them. In a knowledge base that grows through continuous ingest, orphan pages are inevitable; having them surfaced and resolved automatically keeps the knowledge graph connected.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Re-ingest on source updates&lt;/strong&gt; — when a source document is updated, the re-ingest workflow can refresh the wiki page derived from it, comparing the new content against the old and proposing what changed. For domains like compliance (where regulatory updates are frequent) and clinical medicine (where guideline updates are routine), this means the wiki stays current with the underlying source of truth rather than drifting.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Broken wikilink repair&lt;/strong&gt; — as the wiki grows and pages are renamed or restructured, internal wikilinks can break. The broken wikilinks workflow scans all active pages, identifies links pointing to non-existent slugs, and proposes repairs — renaming the target, creating a stub, or removing the dead link. It runs from the web UI and the CLI and emits a per-page fix summary.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Citation integrity&lt;/strong&gt; — the citation faithfulness audit checks whether the claims in each wiki page are actually supported by the source documents it cites. Pages that have drifted from their sources — because the source was updated or the summary overreached — are flagged so they can be re-ingested with current content. For regulated domains, this is the difference between a knowledge base you can trust and one you merely hope is accurate.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sensitive data handling&lt;/strong&gt; — the sanitizer strips personally identifiable and confidential content from source documents at ingest time, before any text reaches the LLM or the wiki. If sensitive content is later discovered to have made it through, &lt;code&gt;synthadoc retract&lt;/code&gt; removes the affected source from the knowledge base and rolls back every wiki page that cited it, and no manual cleanup required.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Scheduled lint and scaffold&lt;/strong&gt; — the weekly jobs registered at install time keep running in the background. Lint promotes new draft pages and flags quality issues; scaffold updates the index and stub pages to reflect the current state of the wiki. For most wikis, the only manual intervention required is reviewing the contradiction resolver queue when it surfaces something.&lt;/p&gt;
&lt;p&gt;The goal is that after the first few days of populating your wiki, the agentic layer handles the maintenance work that would otherwise require a dedicated knowledge engineer.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;under-the-hood-template-architecture&quot;&gt;Under the Hood: Template Architecture&lt;/h3&gt;
&lt;p&gt;For readers who want to understand how the template system is built, the architecture is straightforward.&lt;/p&gt;
&lt;p&gt;Each template is a folder under &lt;code&gt;synthadoc/templates/&amp;lt;category&amp;gt;/&amp;lt;domain&amp;gt;/&lt;/code&gt; containing seven components: &lt;code&gt;description.txt&lt;/code&gt;, &lt;code&gt;guidelines.md&lt;/code&gt;, &lt;code&gt;routing.md&lt;/code&gt;, &lt;code&gt;seeds.md&lt;/code&gt;, &lt;code&gt;wiki/purpose.md&lt;/code&gt;, &lt;code&gt;wiki/index.md&lt;/code&gt;, and at least two stub pages. The agent skill files (&lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;CLAUDE.md&lt;/code&gt;, &lt;code&gt;GEMINI.md&lt;/code&gt;) are not stored in the template directory — they are generated at install time by combining the template's &lt;code&gt;guidelines.md&lt;/code&gt; with the standard skill file boilerplate. This means improvements to the boilerplate propagate to all 30 templates without any template file changes.&lt;/p&gt;
&lt;p&gt;The install command applies a delta-patch: it creates a standard wiki first, then overlays the template components. This keeps the install logic simple and ensures that structural improvements to the base wiki (new fields, new default settings) automatically benefit template installs.&lt;/p&gt;
&lt;p&gt;A completeness test gates every new template contribution. A template that is missing any of the required files, or whose stub pages lack valid frontmatter, will fail the test and cannot be merged. This prevents the template library from accumulating half-finished entries.&lt;/p&gt;
&lt;p&gt;Templates are discoverable automatically — no registration required. &lt;code&gt;synthadoc templates list&lt;/code&gt; reads the templates directory and builds the listing from the &lt;code&gt;description.txt&lt;/code&gt; files. Adding a new template is a file creation, not a registration process.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;quick-reference&quot;&gt;Quick Reference&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Browse the template library:&lt;/strong&gt; &lt;code&gt;synthadoc templates list&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Full install instructions and all 30 templates:&lt;/strong&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/templates/README.md&quot;&gt;/templates/README.md&lt;/a&gt; in the installed package&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sync template-managed files after an upgrade:&lt;/strong&gt; &lt;code&gt;synthadoc templates sync -w &amp;lt;wiki&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Release notes (v1.3.3):&lt;/strong&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/axoviq-ai/synthadoc/releases/tag/v1.3.3&quot;&gt;rtag&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/axoviq-ai/synthadoc&quot;&gt;Synthadoc&lt;/a&gt; is an open-source LLM-powered knowledge base system. The domain template library is included in every install - no additional packages required.&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/27184/domain-templates-stop-configuring-your-llm-knowledge-base-from-scratch</guid>
<pubDate>Mon, 14 Sep 2026 16:56:15 +0000</pubDate>
</item>
<item>
<title>Designing SAP Integrations for Hospitals in Venezuela: What Actually Makes Sense</title>
<link>https://coderlegion.com/20793/designing-sap-integrations-for-hospitals-in-venezuela-what-actually-makes-sense</link>
<description>&lt;p&gt;In most hospital IT conversations in Venezuela, SAP shows up as a kind of magic word:&lt;/p&gt;
&lt;p&gt;“&lt;strong&gt;If we put SAP in, inventory, billing, purchases and HR will finally be under control.&lt;/strong&gt;”&lt;/p&gt;
&lt;p&gt;SAP has been a de‑facto standard ERP for banking, retail and manufacturing for decades. It’s powerful, battle‑tested and, when designed well, can indeed tame a lot of operational chaos in healthcare.&lt;/p&gt;
&lt;p&gt;But in a real hospital environment, especially in Venezuela and Latin America, there are two hard questions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When does SAP actually make sense for a clinic or hospital?&lt;/li&gt;
&lt;li&gt;How do you integrate it with clinical systems (HIS, LIS, EHR) without breaking everything?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This post is my attempt to answer those questions from a &lt;strong&gt;software engineering and architecture&lt;/strong&gt; point of view, not from a vendor deck.&lt;/p&gt;
&lt;p&gt;I’ll focus on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What SAP really does in a hospital (and what it doesn’t do).&lt;/li&gt;
&lt;li&gt;The core mismatch: patient‑centric vs transaction‑centric systems.&lt;/li&gt;
&lt;li&gt;Three real‑world integration models I keep seeing.&lt;/li&gt;
&lt;li&gt;The special case of the lab: LIS ↔ SAP.&lt;/li&gt;
&lt;li&gt;When SAP is overkill and lighter ERPs make more sense.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;what-sap-actually-does-in-a-hospital&quot;&gt;What SAP actually does in a hospital&lt;/h3&gt;
&lt;p&gt;First clarification: &lt;strong&gt;SAP is not a Hospital Information System (HIS)&lt;/strong&gt; in the usual Latin American sense.&lt;/p&gt;
&lt;p&gt;Out of the box it does not:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Manage beds and wards.&lt;/li&gt;
&lt;li&gt;Act as the main UI for doctors’ daily work.&lt;/li&gt;
&lt;li&gt;Store detailed clinical notes or exam findings as an EMR.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What it does extremely well is everything around the clinical core, but not clinical itself:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Finance and accounting&lt;/strong&gt;: contracts with insurers, invoicing, revenue by service line, bank reconciliation, tax reporting.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Materials and inventory (SAP MM)&lt;/strong&gt;: pharmacy stock, surgical supplies, lab reagents, consumables, lot and expiry tracking.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Procurement and vendors&lt;/strong&gt;: purchase orders, tenders, supplier evaluation, pharmaceutical lot traceability.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;HR and payroll (SAP HCM / SuccessFactors)&lt;/strong&gt;: medical and admin staff, shift planning, leave, payroll.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Asset and equipment maintenance (SAP PM)&lt;/strong&gt;: preventive maintenance plans, calibration and breakdown history for biomedical devices.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Hospitals and large clinics in Venezuela (or the ones thinking about SAP) usually got to a point where:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;pharmacy stock is in Excel,&lt;/li&gt;
&lt;li&gt;accounting is in a standalone system,&lt;/li&gt;
&lt;li&gt;purchases run through email,&lt;/li&gt;
&lt;li&gt;and nothing talks to anything else.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;At that point, SAP (or any serious ERP) becomes attractive.&lt;/p&gt;
&lt;h3 id=&quot;the-core-problem-sap-doesn-t-know-the-patient-exists&quot;&gt;The core problem: SAP doesn’t know the patient exists&lt;/h3&gt;
&lt;p&gt;Technically, this is the main design challenge:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hospitals live in the world of patients and encounters. SAP lives in the world of transactions and documents.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A typical HIS/LIS/EHR organizes everything around:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;patients, visits, diagnoses (ICD‑10), orders, lab results, imaging, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The central entity is the person and their episode of care.&lt;/p&gt;
&lt;p&gt;SAP organizes everything around:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;purchase orders, inventory movements, accounting documents, HR events.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The central entity is the transaction.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A physician orders a blood test → the HIS/LIS stores the clinical order.&lt;/li&gt;
&lt;li&gt;The lab processes the sample → the result gets into the EHR.&lt;/li&gt;
&lt;li&gt;Up to this point, SAP knows nothing.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;that same sample consumed reagents from specific lots,&lt;/li&gt;
&lt;li&gt;has a unit cost per test,&lt;/li&gt;
&lt;li&gt;and should hit a given department’s budget or a cost center, and&lt;/li&gt;
&lt;li&gt;may need to be billed to an insurer under a specific contract.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here, &lt;strong&gt;SAP must come into play&lt;/strong&gt;. Which means HIS/LIS and SAP need to talk to each other.&lt;/p&gt;
&lt;h3 id=&quot;three-integration-models-you-actually-see-in-the-wild&quot;&gt;Three integration models you actually see in the wild&lt;/h3&gt;
&lt;p&gt;In Venezuela and LatAm you’ll see these three over and over (not just in healthcare):&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;File‑based integration (most common, most brittle)&lt;br&gt;
Classic pattern:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;HIS or LIS exports a daily file (CSV, Excel, maybe XML) with:&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;procedures done,&lt;/li&gt;
&lt;li&gt;materials consumed,&lt;/li&gt;
&lt;li&gt;patients/insurers to bill.&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;li&gt;An operator or script imports that into SAP as:&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;accounting documents,&lt;/li&gt;
&lt;li&gt;inventory movements,&lt;/li&gt;
&lt;li&gt;billing batches.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Simple to understand and implement.&lt;/li&gt;
&lt;li&gt;Can be done in weeks.&lt;/li&gt;
&lt;li&gt;No heavy middleware required.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Data arrives late (daily/weekly batches).&lt;/li&gt;
&lt;li&gt;Any change in file format breaks the integration.&lt;/li&gt;
&lt;li&gt;Error tracing is painful: you often discover issues at month‑end when numbers don’t match.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;For small clinics with low volume&lt;/strong&gt;, this can be “good enough”.&lt;br&gt;
For anything larger, it tends to become a “temporary solution” that turns permanent and fragile.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Middleware &amp;amp; events (the sane default in 2026)&lt;/strong&gt;&lt;br&gt;
Here you put an integration layer between clinical systems and SAP:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Something like SAP Integration Suite, MuleSoft, WSO2, Apache Camel, or a custom event bus.&lt;/li&gt;
&lt;li&gt;HIS/LIS publishes events such as:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;**- “procedure X completed for patient Y, consumed these materials”,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;“lab order Z billed to insurer K”.**&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The middleware transforms those into IDocs/BAPIs/REST calls for SAP.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you’re already thinking in HL7 v2 / FHIR on the clinical side, the middleware can also translate:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;from clinical standards (HL7/FHIR messages)&lt;/li&gt;
&lt;li&gt;to SAP structures (IDoc schemas, BAPI payloads).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Near‑real‑time data.&lt;/li&gt;
&lt;li&gt;Less human glue work.&lt;/li&gt;
&lt;li&gt;Centralized logging, retries, monitoring.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You now own an integration platform (licensing, infra, skills).&lt;/li&gt;
&lt;li&gt;You need an integration architect who understands both SAP and healthcare systems.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In a Venezuelan context, this usually means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;either a capable in‑house team,&lt;/li&gt;
&lt;li&gt;or a vendor that really knows both SAP and hospital IT (not just one side).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;SAP Healthcare verticals (rare in Venezuela, big in large systems)&lt;/strong&gt;&lt;br&gt;
SAP has built industry solutions for healthcare such as SAP for Healthcare (IS‑H) and S/4HANA Healthcare components that cover patient management, clinical coding, integration with EMR, etc.&lt;/p&gt;
&lt;p&gt;Reality in LatAm/Venezuela:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;They’re mostly used by very large hospital groups or public systems, often with international funding.&lt;/li&gt;
&lt;li&gt;They require highly specialized consultants with global‑market rates.&lt;/li&gt;
&lt;li&gt;License + project cost is way beyond what most local institutions can afford.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So in practice you’ll usually see:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;standard SAP ERP / S/4HANA for finance, logistics, HR,&lt;/li&gt;
&lt;li&gt;integrated with third‑party HIS/LIS/EHR,&lt;/li&gt;
&lt;li&gt;not the full “end‑to‑end SAP hospital” stack.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;The lab case: LIS ↔ SAP is where things get interesting&lt;/strong&gt;&lt;br&gt;
The clinical lab is almost always the most sensitive integration point.&lt;/p&gt;
&lt;p&gt;You have at least three very different flows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Clinical flow (LIS)&lt;/strong&gt;:&lt;br&gt;
Orders, samples, tests, validation, results, delivery to the physician.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reagents &amp;amp; inventory flow (SAP MM / LIMS)&lt;/strong&gt;:&lt;br&gt;
What reagents were used, from which lots, expiry dates, cost per test, remaining stock.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Billing flow (SAP FI/SD)&lt;/strong&gt;:&lt;br&gt;
Which tests were performed, for which patient, under which contract, at what price.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;A very common mistake is trying to make SAP drive the entire lab logic. It’s not designed to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;handle test panels,&lt;/li&gt;
&lt;li&gt;manage QC curves,&lt;/li&gt;
&lt;li&gt;apply analytical validation rules.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That’s what a proper LIS or LIMS is for.&lt;/p&gt;
&lt;p&gt;A reasonable architecture looks like:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;LIS → SAP MM&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;consumption of reagents per test,&lt;/li&gt;
&lt;li&gt;stock updates,&lt;/li&gt;
&lt;li&gt;lot + expiry tracking.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;LIS → SAP FI/SD&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;billing records or pre‑invoices per test / panel,&lt;/li&gt;
&lt;li&gt;mapping to patients and insurers.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;SAP MM → LIS&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;confirmations of reagent receipts,&lt;/li&gt;
&lt;li&gt;lot info, vendor data, pricing,&lt;/li&gt;
&lt;li&gt;min/max stock alerts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When this works, you stop having:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;“ghost stock” in the lab,&lt;/li&gt;
&lt;li&gt;expired reagents because no one saw the numbers,&lt;/li&gt;
&lt;li&gt;billing that doesn’t match what was actually done.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;When SAP actually makes sense (and when it doesn’t)&lt;/strong&gt;&lt;br&gt;
Four questions I’d ask before recommending SAP to a hospital in Venezuela:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Is your core problem financial/operational or clinical?&lt;br&gt;
&lt;strong&gt;If the pain is&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;“We don’t know what we really spend in pharmacy”,&lt;/li&gt;
&lt;li&gt;“Monthly closes are a nightmare”,&lt;/li&gt;
&lt;li&gt;“Purchases are chaos”,&lt;/li&gt;
&lt;li&gt;then SAP/ERP is attacking the right layer.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;If the pain is&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;“Doctors can’t see full patient history”,&lt;/li&gt;
&lt;li&gt;“Lab loses results”, then you need to fix HIS/LIS/EHR first, not buy SAP.&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Do you have enough scale?&lt;/strong&gt;&lt;br&gt;
SAP economics work better when you have:&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;high transaction volume,&lt;/li&gt;
&lt;li&gt;multiple sites,&lt;/li&gt;
&lt;li&gt;real logistical complexity.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For a small clinic (say &amp;lt;50 beds) or a low‑volume lab, often a lighter ERP or a specialized hospital ERP will have a better cost/benefit ratio.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Can you realistically maintain it?&lt;br&gt;
You’ll need:&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;SAP Basis / admin,&lt;/li&gt;
&lt;li&gt;functional consultants,&lt;/li&gt;
&lt;li&gt;developers for integrations.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In Venezuela and LatAm this talent exists, but it’s expensive and has high churn. That has to be part of the business case, not an afterthought.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Is your current HIS/LIS integrable?&lt;br&gt;
If your HIS/LIS vendor can’t show:&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;a documented API,&lt;/li&gt;
&lt;li&gt;a test environment,&lt;/li&gt;
&lt;li&gt;and some real‑world integrations,&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;getting it to talk to SAP will be painful and fragile.&lt;/p&gt;
&lt;p&gt;In many Venezuelan hospitals, the first step before SAP is replacing or modernizing the HIS/LIS that has no real API.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alternatives: when a lighter ERP is better&lt;/strong&gt;&lt;br&gt;
SAP is not the only way to solve hospital back‑office problems:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Odoo with healthcare modules&lt;/strong&gt;: open‑source, with hospital management apps (patients, appointments, pharmacy, billing, etc.) that can be customized heavily.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LatAm hospital ERPs&lt;/strong&gt;: regional products that ship with financial + clinical modules integrated, at lower license/consulting cost than SAP.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SAP Business One&lt;/strong&gt;: often used by medium‑sized healthcare institutions for finance, inventory and purchasing, integrated with third‑party HIS.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The real decision is not “SAP or nothing”, but:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;which operational problem you’re solving,&lt;/li&gt;
&lt;li&gt;what size/complexity you have,&lt;/li&gt;
&lt;li&gt;and what architecture you can realistically support in the next 5–10 years.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Closing thoughts&lt;/strong&gt;&lt;br&gt;
In hospitals, SAP is not a magic clinical system and it’s not a villain either.&lt;/p&gt;
&lt;p&gt;It’s a very strong tool for one specific layer: financial, logistical and HR complexity at scale. When properly integrated with HIS/LIS/EHR, it gives you:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;pharmacy and lab stock that actually reconciles,&lt;/li&gt;
&lt;li&gt;billing that reflects the real clinical activity,&lt;/li&gt;
&lt;li&gt;purchasing aligned with real consumption,&lt;/li&gt;
&lt;li&gt;and a clear picture for management.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When dropped in without integration strategy, change management or clear ownership, it becomes an expensive parallel universe that lives next to the usual spreadsheets.&lt;/p&gt;
&lt;p&gt;The difference is not the software. It’s the architecture and the decisions made before the first line of code or customizing.&lt;/p&gt;
&lt;p&gt;If you’re working on hospital IT, SAP, or clinical integrations in LatAm and facing similar problems, I’d love to hear your experience.&lt;/p&gt;
&lt;p&gt;The original long‑form article (in Spanish, with Venezuela‑specific context) is here:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://codebymelendez.com/insights/sap-hospitales-integracion-laboratorios-venezuela&quot;&gt;https://codebymelendez.com/insights/sap-hospitales-integracion-laboratorios-venezuela&lt;/a&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/20793/designing-sap-integrations-for-hospitals-in-venezuela-what-actually-makes-sense</guid>
<pubDate>Wed, 17 Jun 2026 08:31:26 +0000</pubDate>
</item>
<item>
<title>Your IDP needs DDD</title>
<link>https://coderlegion.com/9649/your-idp-needs-ddd</link>
<description>&lt;p&gt;It has been more than two decades since Eric Evans published his book on domain-driven design (DDD). The idea was to create software designed after the business domain, using the same language and mental models people used outside of the software team.&lt;/p&gt;
&lt;p&gt;We don’t talk about domain-driven design much these days. But as George Santayana said: “Those who cannot remember the past are condemned to repeat it.”&lt;/p&gt;
&lt;p&gt;As Platform Engineering grows into a movement at scale, we need to revisit the past and apply some lessons from domain-driven design to our internal developer platforms (IDPs). Otherwise, we continually step on rakes to learn why they shouldn’t be left on the lawn.&lt;/p&gt;
&lt;p&gt;There’s a host of interesting interconnected ideas in domain-driven design, but one that resonates with Platform Engineering is the concept of a core domain.&lt;/p&gt;
&lt;h3 id=&quot;what-core-domains-are&quot;&gt;What core domains are&lt;/h3&gt;
&lt;p&gt;When you build software, there are several areas where your innovation, opinions, and solutions create unique value for your organization. You also need many things that don’t add much value, but your software isn’t viable without them.&lt;/p&gt;
&lt;p&gt;Let’s use a pizza restaurant as an example. If you sell pizza, you want to make it easy for customers to choose what they want to eat and have it delivered. To complete the process, you need to look up their address and take a payment.&lt;/p&gt;
&lt;p&gt;Core domains are the areas where you want to do something different that will give you a competitive edge. For your pizza company, that might be how you present the menu, collect customizations, and offer deals and rewards.&lt;/p&gt;
&lt;p&gt;Non-core domains, also called generic domains, are areas where innovation and differentiation make little difference, or where doing things differently may even be undesirable. Customers expect that looking up their address and paying will work like elsewhere. They don’t want you to be innovative here, as it makes it harder to use.&lt;/p&gt;
&lt;p&gt;So, core domains are something unique or special to your organization. It’s essential to your business’s existence, and where you should invest the most. This is something you want to do so well that it’s hard for your competitors to copy.&lt;/p&gt;
&lt;h3 id=&quot;the-problem-of-generic-domains&quot;&gt;The problem of generic domains&lt;/h3&gt;
&lt;p&gt;When you spend time on generic domains, you direct time, attention, energy, and investment away from the areas that impact your organization most. Generic domains have limited value because they don’t benefit from doing something different or unique. The pizza company will never create such an excellent payment flow that you’d choose their offering over a competitor who offers better customization.&lt;/p&gt;
&lt;p&gt;Generic domains can be just as complex as your core domains, which means they can consume large amounts of investment. Suppose there’s a commercial provider of an offering in your generic domain space. In that case, they’ll be treating it as a core domain and innovating the space, which puts additional pressure on you to invest to avoid falling behind user expectations.&lt;/p&gt;
&lt;p&gt;Organizations that avoid the generic domain trap can outpace their competitors as they spend more time working on features that will make them stand out.&lt;/p&gt;
&lt;h3 id=&quot;how-to-tame-generic-domains&quot;&gt;How to tame generic domains&lt;/h3&gt;
&lt;p&gt;There’s an easy way to avoid the generic domain trap. Domain-driven design provides a pattern for managing them, which recognizes the asymmetry in the value gained by investment in core domains versus generic domains.&lt;/p&gt;
&lt;p&gt;Instead of reducing costs on paper, the goal is to minimize the real cost of working on generic domains: Lost value.&lt;/p&gt;
&lt;p&gt;Press enter or click to view image in full size&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=12520345172365436746&quot; alt=&quot;The stages in the decision making process: Off-the-shelf, isolate, outsoure, minimalism&quot;&gt;&lt;/p&gt;
&lt;p&gt;You should work through this list from the top and choose the earliest exit available.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Off-the-shelf&lt;/strong&gt;: Look for existing software or services that address the generic domain. In particular, look to use:  &lt;/li&gt;
&lt;li&gt;Commercial products and software-as-a-service offerings where the provider treats it as a core domain. Their innovation and support will ensure the generic domain doesn’t become an anchor dragging you back.  &lt;/li&gt;
&lt;li&gt;Open source tools that are robust and maintained, and where the overheads of adopting and updating them are low.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Isolation&lt;/strong&gt;: Where you have to build custom code for a generic domain, encapsulate and isolate it. Placing it behind a well-defined interface minimizes the impact on your core domain and lets you switch it out if an off-the-shelf solution emerges later.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Outsourcing&lt;/strong&gt;: While outsourcing your core domain can cause problems, outsourcing generic domains helps control the cost and distraction of the work. You can define the interface and have an outsourced team focus on the implementation details.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Minimalism&lt;/strong&gt;: When no other option is available, create a simple minimalist solution that meets the immediate need. Don’t over-engineer the generic domain or add features you don’t need. You can be reluctant to iterate the solution and keep your eyes and ears open for when someone creates a software product or service you can use to replace it.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;analyzing-build-versus-buy&quot;&gt;Analyzing build versus buy&lt;/h3&gt;
&lt;p&gt;Platform Teams who want to create the most significant force multiplier for the developers they serve need to protect their focus on fitting the tools to the organization. To do that, they need to identify and eliminate areas where their skills are wasted.&lt;/p&gt;
&lt;p&gt;A crucial part of this optimization process is performing a solid build versus buy analysis, which should factor in the initial development cost, ongoing maintenance and support costs, and the opportunity cost of diverting resources away from the core domains.&lt;/p&gt;
&lt;p&gt;Returning to the pizza restaurant, offloading the address lookup to a vendor that commonly provides this feature will mean users are familiar with how it works. The vendor will dedicate more attention to improving the user experience of their tool, and when the vendor introduces innovations, they appear commonly enough that users accept them.&lt;/p&gt;
&lt;p&gt;Similarly, you’d want to offload payments to a fast and secure payment provider. Hence, it works like other sites and keeps pace with developments like 3D secure, tokenization, card security codes, multi-factor authorization, and biometrics. These industry innovations would have forced the developers to revisit this generic domain many times just to keep pace with the baseline.&lt;/p&gt;
&lt;h3 id=&quot;why-this-is-crucial-for-platform-engineering&quot;&gt;Why this is crucial for Platform Engineering&lt;/h3&gt;
&lt;p&gt;Domain-driven design (DDD) tells us to optimize our development efforts where they will have the most impact on the organization’s success. You shouldn’t over-invest in non-core domains, as they have limited business value and drain resources. Building custom solutions for non-core domains brings unnecessary complexity and maintenance burden, and for what? To build something that you could have bought or outsourced.&lt;/p&gt;
&lt;p&gt;The software industry is about to re-learn the lessons that led to the discovery of domain-driven design. Industry-wide, we are dedicating thousands of developers to building the same thing. Not a simple minimalist solution to fill a gap left by commercial products, software-as-a-service, or open source software, but a million giant platforms that are out of date before they’ve been pushed to production.&lt;/p&gt;
&lt;p&gt;Internal developer platforms sink unless platform teams can shift weight down to underlying tools. By transferring ballast to commercial products or open source tools, the platform team can get back to agility and create simple, minimal solutions that handle real gaps in toolchains caused by truly bespoke needs.&lt;/p&gt;
&lt;p&gt;And it’s these very needs that are missed with behemoth platforms. An organization that needed to go an extra two miles on security may adopt Platform Engineering to tailor a truly robust solution to their security needs. As that platform grows and accumulates additional custom features, the focus on security is lost, and the investment is wasted building and maintaining code that doesn’t solve a unique need for the organization.&lt;/p&gt;
&lt;p&gt;But it’s not all doom and gloom for Platform Engineers. Commercial and open source tools can rescue them from this inevitability by providing features that make it easy to shift the weight down and keep the platform light enough to float.&lt;/p&gt;
&lt;h3 id=&quot;float-on-our-platform-hub&quot;&gt;Float on our Platform Hub&lt;/h3&gt;
&lt;p&gt;That’s where Platform Hub comes in. By adding features platform teams need, like process templates, project templates, and policies, platform teams can transfer the effort down to Octopus and lighten their platform by removing thousands of lines of bespoke templating code.&lt;/p&gt;
&lt;p&gt;Platform Teams can get back to focusing on the unique needs that make their platform vital to their organization. They will benefit from our innovative mechanisms for template management and policies, which go well beyond the attack of the template clones and the synchronization conflicts that platform teams report with their bespoke solutions.&lt;/p&gt;
&lt;p&gt;Happy deployments!&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/9649/your-idp-needs-ddd</guid>
<pubDate>Tue, 13 Jan 2026 12:14:52 +0000</pubDate>
</item>
<item>
<title>Systems As Mirrors</title>
<link>https://coderlegion.com/6323/systems-as-mirrors</link>
<description>&lt;p&gt;There’s something quietly unsettling about &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.wikiwand.com/en/articles/Conway%27s_law&quot;&gt;Conway’s Law&lt;/a&gt;. Most people who’ve worked in software long enough can sense its truth. What unsettles is what it reveals when you sit with it.&lt;/p&gt;
&lt;p&gt;The law definition, in its original form, is:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Organizations which design systems (in the broad sense used here) are constrained to produce designs which are copies of the communication structures of these organizations.&lt;/p&gt;
&lt;p&gt;— Melvin E. Conway, &lt;em&gt;How Do Committees Invent?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;At first, it seems structural. Org charts become system diagrams. Split your teams by department, and the system splits the same way. But over time, the reflection deepens. The system doesn’t only mirror who talks to whom — it starts echoing what’s understood, and what’s avoided.&lt;/p&gt;
&lt;p&gt;The most confusing systems I’ve seen don’t reflect complexity. They reflect ambiguity.&lt;/p&gt;
&lt;p&gt;You see it in familiar places. One service checks a user’s admin flag. Another checks something else entirely. A third overrides both. A field like “approved” means one thing to scoring, another to compliance, and something looser to product. The code bends around uncertainty. But what it adapts to isn’t complexity — it’s a missing decision.&lt;/p&gt;
&lt;p&gt;This gets worse when teams try to support everything. A lending flow starts with a clean path. Then you add freelancers, students, returning users. You don’t create new flows. You add flags: &lt;code&gt;hasPayslip&lt;/code&gt;, &lt;code&gt;isStudent&lt;/code&gt;, &lt;code&gt;incomeSource&lt;/code&gt;. Logic branches. Models fork. Scenarios pile up.&lt;/p&gt;
&lt;p&gt;Each rule makes sense in isolation. But together, they blur the center. “ApplicationApproved” starts meaning different things depending on the path taken. Eventually, no one can say what it means — only how it behaves under certain conditions.&lt;/p&gt;
&lt;p&gt;The system still works. But its meaning doesn’t.&lt;/p&gt;
&lt;p&gt;This is where outcome-driven modeling helps. &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.wikiwand.com/en/articles/Outcome-Driven_Innovation&quot;&gt;Jobs To Be Done&lt;/a&gt; is one approach. It shifts the focus from who the user is to what they’re trying to accomplish. It asks what outcome they’re hiring the system to deliver — and what tradeoffs they’re willing to make.&lt;/p&gt;
&lt;p&gt;A persona tells you the user is a freelancer who prefers mobile and has irregular income. The job tells you: access a short-term loan using recent invoices. Suddenly, the model sharpens. Income is about pattern, not payslips. Risk is about volatility. Rejection isn’t the fallback — manual review is.&lt;/p&gt;
&lt;p&gt;When you model from outcome, the system knows what it's trying to do.&lt;/p&gt;
&lt;p&gt;This is also where domain boundaries matter. &lt;a rel=&quot;nofollow&quot; href=&quot;https://martinfowler.com/bliki/DomainDrivenDesign.html&quot;&gt;Domain-Driven Design&lt;/a&gt; introduces the idea of &lt;a rel=&quot;nofollow&quot; href=&quot;https://martinfowler.com/bliki/BoundedContext.html&quot;&gt;bounded contexts&lt;/a&gt;: each part of the system defines its own meaning. Duplication isn’t always a mistake — it’s often how clarity is preserved. Reuse works best when meaning aligns.&lt;/p&gt;
&lt;p&gt;Take the classic &lt;code&gt;User&lt;/code&gt; model. In KYC, it means identity: documents, name, status. In Scoring, it means applicant: income, employment, credit history. In Auth, it means account: credentials, sessions, MFA. Reusing the ID is fine. Reusing the model leads to something brittle: dozens of nullable fields, conflicting assumptions, tangled dependencies.&lt;/p&gt;
&lt;p&gt;Some say duplication is always bad. But that’s a narrow view. It depends on what’s being repeated. Echoing confusion spreads it. But repeating meaning reinforces clarity. Duplication isn’t the enemy — imprecision is.&lt;/p&gt;
&lt;p&gt;Once each model speaks a single truth, everything downstream improves. The backend is easier to debug. The frontend becomes more predictable. Changes get safer. Teams stop negotiating the meaning of basic terms and start delivering again.&lt;/p&gt;
&lt;p&gt;And that brings us back to the mirror.&lt;/p&gt;
&lt;p&gt;Conway’s Law tells us systems mirror their makers. But reflections go further than structure. They echo our indecision, our shortcuts, the choices we didn’t make.&lt;/p&gt;
&lt;p&gt;So the real question is:&lt;br&gt;
&lt;em&gt;If every system is a mirror — what part of ourselves are we willing to see?&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/6323/systems-as-mirrors</guid>
<pubDate>Sun, 12 Oct 2025 08:26:19 +0000</pubDate>
</item>
<item>
<title>The Essence of Development: Unravelling the Complexities to Build High-End Applications</title>
<link>https://coderlegion.com/4102/the-essence-of-development-unravelling-the-complexities-to-build-high-end-applications</link>
<description>&lt;p&gt;&lt;img src=&quot;https://i.imgur.com/KpVtY8g.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;As developers, we dive daily into a sea of lines of code, features, and challenges. But before any technological choice, there is a fundamental truth that guides the success of any application, especially those built for established businesses: the clear distinction between &lt;strong&gt;business complexity&lt;/strong&gt; and &lt;strong&gt;technical complexity&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id=&quot;the-two-faces-of-complexity&quot;&gt;The Two Faces of Complexity&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Business complexity&lt;/strong&gt; resides in the rules, processes, and nuances of the very domain in which we operate. It would exist even without a single line of code. Think of the intricate tax regulations of an e-commerce site or the credit approval process of a financial institution. This is the essence, the &quot;why&quot; of our work.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Technical complexity&lt;/strong&gt;, on the other hand, is what we, as developers, introduce with tools, frameworks, architectures, and implementation decisions. While necessary to bring the solution to life, it should serve the business, not the other way around.&lt;/p&gt;
&lt;h3 id=&quot;from-distinction-to-powerful-architectures&quot;&gt;From Distinction to Powerful Architectures&lt;/h3&gt;
&lt;p&gt;When we cultivate the ability to clearly perceive and map this difference, something magical happens: we elevate our application to a new level. By focusing on accurately modelling the business, isolating it from purely technical concerns, we open the doors to &lt;strong&gt;Clean Architecture&lt;/strong&gt; and &lt;strong&gt;Hexagonal Architecture&lt;/strong&gt;. These approaches allow us to build systems that are more maintainable, testable, and adaptable to business changes, as the core of the application—the business logic—remains cohesive and independent of external layers.&lt;/p&gt;
&lt;h3 id=&quot;deepening-the-solution-with-domain-driven-design&quot;&gt;Deepening the Solution with Domain-Driven Design&lt;/h3&gt;
&lt;p&gt;And if the challenge is to build a robust system for a complex, large-scale business, &lt;strong&gt;Domain-Driven Design (DDD)&lt;/strong&gt; becomes a powerful ally. By immersing ourselves in the domain, in the language of business experts, and translating it into a rich, cohesive model, we build software that truly solves business problems in an aligned and evolving manner.&lt;/p&gt;
&lt;h3 id=&quot;conclusion-build-for-the-business-first&quot;&gt;Conclusion: Build for the Business First&lt;/h3&gt;
&lt;p&gt;In short, the journey to building high-level applications begins with a careful look at the nature of the complexity we face. By honouring the distinction between business and technology, we pave the way for solid architectures and, consequently, for the success of the product and the business it serves. Remember: understanding the core business is the first step to building solutions that truly make a difference.&lt;/p&gt;
</description>
<category>Full-stack Dev</category>
<guid isPermaLink="true">https://coderlegion.com/4102/the-essence-of-development-unravelling-the-complexities-to-build-high-end-applications</guid>
<pubDate>Thu, 17 Jul 2025 20:48:00 +0000</pubDate>
</item>
</channel>
</rss>