What is the 'Highlighted Core' technique for distilling a domain model, and what problem does it solve when a team can't yet afford to physically restructure the codebase?
answer
- diagram/document only, no code moves
- cheapest distillation technique
- marks core visually
- advisory, not enforced
- precursor to segregated core
basics
~10 sHighlighted Core means marking which parts of an existing model are the core domain — with a diagram, document, or comments — without moving any code, so everyone can see what matters most.
solid answer
~40 sHighlighted Core is a lightweight distillation technique: instead of refactoring code, you produce a document — often a diagram of the existing model with the core-domain elements visually marked, or a short distillation document listing which classes/concepts are core — plus an explanation of why those elements matter and how they relate to the rest. It's the cheapest distillation technique because it changes no code, so it's used when a full segregated-core refactor is too risky or expensive right now, or as a first pass before deciding whether heavier restructuring is worth it. Its main limitation is that it's advisory only — nothing in the code enforces or reflects the distinction, so it can drift out of date as the code changes underneath it.
go deeper
Should recognize it's just marking, not moving code, and be able to read a highlighted diagram to understand what it's communicating.
Should be able to produce one for a feature area they own and explain the rationale for why specific classes, not whole modules, are marked.
Should know when to escalate from highlighted to segregated core and recognize signs of drift between the diagram and the actual code.
Should use it strategically as an interim governance tool across teams and decide organization-wide when a heavier refactor is warranted.
## What the technique produces The **Highlighted Core** is the lightest-weight of the core-domain distillation techniques. Instead of touching any source code, a team produces a supplementary artifact: - **most often, a diagram** of the existing domain model with the classes, aggregates, or concepts that constitute the core domain visually marked (bold outlines, a distinct color, an asterisk), accompanied by a short written explanation of why each marked element belongs to the core and how it relates to the surrounding, unmarked generic or supporting parts of the model; - **a short 'distillation document'**, which some teams instead maintain: a page that lists, in prose, which modules or classes carry the core domain logic and which are considered supporting scaffolding. Either way, the defining property is that the technique produces **knowledge, not structural change** — the code's package layout, class boundaries, and module dependencies are completely untouched. ## Why it exists This technique exists because the two heavier distillation techniques both require real refactoring effort and carry real risk: - **segregated core**, which physically separates core code from the rest; - **abstract core**, which extracts a small abstract layer. Moving code across module boundaries can break tests, ripple through consumers, and requires enough confidence in what actually is core to justify the churn. Early on, or in a codebase under active feature pressure, a team frequently knows roughly where the core value lives but doesn't yet have the shared, precise, validated understanding needed to safely reorganize the code around that boundary — and even if they did, they may not have the calendar space to do it safely right now. The Highlighted Core lets the team capture and communicate that emerging understanding immediately, cheaply, and reversibly, so that new team members, code reviewers, and planning discussions can orient around 'here's what's core' well before any refactor happens — or even in cases where no refactor is ever planned. ## The trade-off: durability versus cost The central trade-off is **durability versus cost**. | | Cost to produce | Enforcement | |---|---|---| | **Highlighted Core** | lives outside the code — in a wiki page, a diagram tool, a README section — so it costs almost nothing to produce and update compared to a code refactor | carries zero structural enforcement, for exactly that reason | | **Segregated Core** | by contrast, expensive to build | self-enforcing in a much stronger sense: putting core code in its own module or package with an explicit boundary makes accidental entanglement visible immediately, because it requires new imports or changes the dependency graph | Nothing stops a developer from adding a new class to the 'core' area of the model without updating the diagram, or from making the core noticeably more entangled with generic infrastructure over successive changes, because the highlighting exists only in a document that most day-to-day commits never touch. The Highlighted Core deliberately trades that enforcement away for speed and low risk. ## Failure modes 1. The dominant failure mode in production is exactly this **drift**: teams draw the highlighted-core diagram once, during a workshop or a big-picture design review, then never touch it again as the code evolves underneath it. Months later the diagram still shows the original core aggregates, but some of them have since absorbed generic cross-cutting concerns — audit logging, notification triggers, permission checks — that make them behave like ordinary application glue rather than a focused, high-value model. Anyone who trusts the stale diagram over the actual code makes bad prioritization and staffing calls. 2. A second failure mode is **drawing the highlighting too coarsely** — marking entire packages or modules as 'core' without saying which specific classes or responsibilities inside them are the actual differentiator — which gives reviewers no more guidance than the unmarked model did, defeating the point of the exercise. 3. A third is using it as a **permanent substitute for a segregated core** when the core domain has clearly outgrown that arrangement: if the core is large, actively growing, and repeatedly getting entangled with generic subdomains despite the highlighting, that's a signal the team needs to invest in the heavier, code-level separation rather than keep re-drawing the same diagram. ## A concrete scenario A concrete scenario: a small SaaS team building an expense-approval product has, over a year, accreted a single 'expenses' module containing both the actual **approval-routing rule engine** — who must approve what, under which delegation-of-authority policy, the genuine differentiator — and a mass of generic CRUD for expense line items, receipt uploads, and currency conversion. Rather than immediately splitting the module, risky mid-quarter with a release imminent, the tech lead produces a one-page diagram highlighting the rule-engine classes and annotating why they matter, and shares it with the team. New hires now know within their first week which handful of classes deserve careful review and which are safe to touch casually, without a single line of code having moved.
- When would a team choose Highlighted Core over doing a full Segregated Core refactor?When a full refactor is too risky or expensive right now — for instance mid-release, or before the team has validated exactly which classes are core — or as a deliberate first pass to build shared understanding before deciding whether the heavier restructuring is worth the cost.
- What's the biggest structural weakness of a highlighted core compared to a segregated core?It has no enforcement mechanism. A segregated core's module boundary makes entanglement with generic code visible through the compiler or dependency graph, while a highlighted core is just a document that the code can silently drift away from without anyone noticing.
- How can a team reduce the risk that a highlighted-core diagram goes stale?Tie it to a recurring review cadence, store it close to the code it describes (such as in a README next to the relevant package) rather than a disconnected wiki, and revisit it explicitly during architecture or prioritization discussions rather than treating it as a one-time deliverable.
Like sticky-note flags on pages of a thick reference book marking the chapters that actually matter for the exam — the book itself is untouched, but anyone who opens it knows where to focus.
saying these in an interview costs you the question
- believes highlighting changes the code's actual structure
- draws the diagram once and never revisits it
- marks whole modules with no rationale for individual classes
- treats it as adequate forever for a large, actively growing core
- can't articulate how it differs from a general architecture diagram