<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: canonical</title>
    <description>The latest articles on DEV Community by canonical (@canonical).</description>
    <link>https://dev.to/canonical</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3578743%2Feccf1f85-53c3-4e4a-9948-7737f0c99a91.jpeg</url>
      <title>DEV Community: canonical</title>
      <link>https://dev.to/canonical</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/canonical"/>
    <language>en</language>
    <item>
      <title>Why Attractor Guided Engineering Cannot Be Demoted to an AI Agent Skill</title>
      <dc:creator>canonical</dc:creator>
      <pubDate>Mon, 01 Jun 2026 07:05:49 +0000</pubDate>
      <link>https://dev.to/canonical/why-attractor-guided-engineering-cannot-be-demoted-to-an-ai-agent-skill-2iik</link>
      <guid>https://dev.to/canonical/why-attractor-guided-engineering-cannot-be-demoted-to-an-ai-agent-skill-2iik</guid>
      <description>&lt;p&gt;Agent Skill is already one of the most widely accepted practices in AI Agent engineering: encapsulating repeatable tasks into capability packages that are discoverable, callable, and injectable into context.&lt;/p&gt;

&lt;p&gt;This is certainly valuable. Diagnosing bugs can be a skill. Reviewing code can be a skill. Generating slides can be a skill. Converting files can be a skill. Skills let an Agent enter a proven way of working faster, and they allow teams to distill experience into reusable work specifications.&lt;/p&gt;

&lt;p&gt;But as the saying goes: “If all you have is a hammer, everything looks like a nail.” The same is true for skills: as soon as people find a useful practice, their first instinct is often “wrap it into a reusable skill.”&lt;/p&gt;

&lt;p&gt;Attractor Guided Engineering (AGE) points out that if every AI engineering practice is turned into a skill, we lose sight of the most critical question in AI-dominated software engineering: &lt;strong&gt;how does the system remain controlled and convergent under continuous perturbation?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Skills solve the problem of capability invocation. AGE solves the problem of how domain structure is preserved during the long-term evolution of a repository, and how trajectory drift is suppressed.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This also explains why AGE cannot be demoted to a skill: making skills the primary vehicle for AGE practices would collapse repository-level convergence mechanisms into one-shot invocation capabilities, defeating the purpose of AGE.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The Essence of a Skill is a Semantic-Level Hash Map
&lt;/h2&gt;

&lt;p&gt;When many people think of skills, they first see the file form: &lt;code&gt;SKILL.md&lt;/code&gt;, description, trigger words, supporting files, scripts, templates.&lt;/p&gt;

&lt;p&gt;But these are just the shell. Where a skill really works is that the Agent runtime organizes them into a &lt;strong&gt;semantic-level lookup table&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;task intent -&amp;gt; matched skill -&amp;gt; procedure bundle
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In other words, the Agent does not gain capability simply because a file is named &lt;code&gt;SKILL.md&lt;/code&gt;; it gains capability because the current task intent can be matched in the skill description space to a loadable work specification.&lt;/p&gt;

&lt;p&gt;The hash here is not a string hash. The key is not a fixed string but a combination of task intent, contextual clues, trigger words, and descriptions; the value is not a single file but a collection of instructions, scripts, templates, and examples that can be injected into the context.&lt;/p&gt;

&lt;p&gt;This structure is ideally suited to answering one question:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I need to do this kind of task — which set of practices should I load?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Therefore, skills are very suitable for encapsulating local capabilities: diagnosing bugs, reviewing diffs, calling tools, generating reports, executing checklists. &lt;strong&gt;Their organizing axis is invocation intent, mapping “what to do” to “which capability package to load.”&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The Information Format Is Not the Key
&lt;/h2&gt;

&lt;p&gt;Since the real mechanism of a skill is semantic matching, we must not fetishize the file format of a skill.&lt;/p&gt;

&lt;p&gt;For an intelligent agent, the format in which information is written is not essential. AI can read Markdown, and it can also read XML and other formats. Database models, API models, and the like can be fully expressed in DSLs (domain-specific languages).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;AGENTS.md&lt;/code&gt; and &lt;code&gt;docs/index.md&lt;/code&gt; can perfectly serve as information routers and can even do better: through file links, we can provide hierarchical routing by domain structure. The AI can first read a compact entry point and then, as the task requires, progressively open more specific owner docs, model files, tests, and source code.&lt;/p&gt;

&lt;p&gt;Therefore, the question is not “has this piece of knowledge been written as a skill?”&lt;/p&gt;

&lt;p&gt;The question is: &lt;strong&gt;after the information changes form, does the original structure still exist?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A key capability of intelligence is the ability to freely transform information across forms. If the structure remains, knowledge written as Markdown, XML, tests, DSL/schema, or source code anchors can all be used by the AI. If the structure is lost, wrapping it in the most exquisite skill only makes the fragments—after the structure is lost—easier to invoke.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Why Dynamical Systems Care About Preserving Structure
&lt;/h2&gt;

&lt;p&gt;Dynamical systems in mathematics and physics provide a useful intuition: the variables describing a system can change, but the key structures governing the system’s evolution must not be casually discarded.&lt;/p&gt;

&lt;p&gt;Imagine a pendulum clock. You can describe it with angle and angular velocity, or with position and velocity, or with energy and phase. The form of expression can change, but the key structure of the pendulum cannot be lost: how position and velocity are coupled, how energy changes, how damping dissipates energy, where external forces enter.&lt;/p&gt;

&lt;p&gt;If an algorithm only pursues “the next position looks roughly right” without preserving these structures, it might make only small errors at each step, yet over the long term it makes the pendulum swing higher and higher for no reason, or stop suddenly. The local output looks similar, but the long-term system is no longer the original system.&lt;/p&gt;

&lt;p&gt;Consider an electrical circuit. You can describe it with node voltages, or with branch currents, or treat the energy stored in capacitors and inductors as state variables. The variable form can change, but some structures must not be lost: charge conservation, the coupling relationships between voltage and current, energy storage and dissipation in components, where the external power source injects energy.&lt;/p&gt;

&lt;p&gt;If an algorithm only pursues voltage values at a few sampling points that look close, without preserving these structures, the long-term simulation may spontaneously generate energy, or turn a system that should dissipate into one that oscillates endlessly. The local curve resembles the truth, but the physical meaning of the system is already wrong.&lt;/p&gt;

&lt;p&gt;This is what it means to preserve structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The form of expression can change, but key constraints, coupling relationships, and conservation/dissipation structures must not be lost.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A controlled system converges over the long term not because each step seems reasonable, but because these structures are preserved through repeated transformations and perturbations.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. The State Space Is Not the Source Code Space
&lt;/h2&gt;

&lt;p&gt;If we observe software engineering through the lens of dynamical systems, a repository is no longer a static folder but a system that is repeatedly perturbed. Every requirements clarification, plan generation, code modification, test addition, review, and log update pushes the repository to a new state.&lt;/p&gt;

&lt;p&gt;Traditional software engineering rests on an implicit assumption: the human brain can serve as the long-term implicit integrator of system truth. Source code, requirements, architectural trade-offs, historical bugs, and unwritten context can ultimately be fully understood by a few core engineers who decide the direction of evolution.&lt;/p&gt;

&lt;p&gt;After deep participation of AI, this underlying assumption is shaken. AI can generate at high frequency, modify at large amplitude, and spread across modules, while each session lacks a sustained sense of direction. The expansive force that AI introduces into the state space far exceeds the information processing capacity of a few humans. At this point, unless we forcibly slow AI down to a rhythm that humans can continuously integrate, the source of truth in the system's evolution can no longer be the memory inside someone's head. What the next session can re-read is not the complete intent in the author’s mind, but the code, diffs, logs, tests, docs, models, and audit evidence in the repository.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The history of &lt;code&gt;nop-chaos-flux&lt;/code&gt; has already recorded this kind of drift multiple times. Workstream 8 of &lt;code&gt;docs/plans/436-deep-audit-2026-05-24-full-remediation-plan.md&lt;/code&gt; fixed an active-doc drift: the documentation described &lt;code&gt;component:open/close/toggle&lt;/code&gt;, &lt;code&gt;component:refresh&lt;/code&gt;, the old package split, old source anchors, and an outdated component inventory as current facts, while the live repo was no longer like that. &lt;code&gt;docs/logs/2026/05-26.md&lt;/code&gt; recorded a proof drift: the E2E tests still asserted that the spreadsheet's &lt;code&gt;30&lt;/code&gt; row headers were mounted simultaneously, while the live spreadsheet shell had already been virtualized, so the correct proof could only assert that visible row headers were mounted. Code, documentation, and tests might each be locally reasonable, but the owner/proof/precedence relationships among them had already drifted.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Thus, the basic premise of AGE is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Repository = Source of Truth
Chat = Transient work surface
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Under this premise, the core question is not:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Did the Agent invoke the right skill this time?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;but:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;After many Agent perturbations, does the repository still converge in a controlled manner along the domain structure?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The basic picture of AGE is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;State space -&amp;gt; Attractor -&amp;gt; Trajectory -&amp;gt; Control
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The state space here is not the “source code state space.” Source code answers what the current implementation is, but it cannot alone answer where the system should converge, why a certain design is valid, which behavior has been proven, why a certain deviation was accepted, and from where the AI should recover context next time.&lt;/p&gt;

&lt;p&gt;AGE is concerned with the state of the entire repository engineering reality: source code, tests, owner docs, requirements, plans, logs, bug notes, schemas, XML models, database models, XDSL, &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;docs/index.md&lt;/code&gt;, CI configuration, and audit evidence together constitute a state.&lt;/p&gt;

&lt;p&gt;These are not several separable materials, but the distribution of the same set of semantic commitments across different carriers. Code has authority over implementation facts; owner docs have authority over convergence direction; tests have authority over proven behavior; logs/bug notes have authority over the evolution trajectory; plans/audits have authority over whether the current cycle of changes is closed. What AGE must maintain is the relationships among these authorities, not the sanctification of any single file format.&lt;/p&gt;

&lt;p&gt;A Skill occupies a different position. &lt;strong&gt;AGE organizes the repository itself; skills are external capabilities or control inputs that act upon the repository.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;External capabilities can change the system, but they cannot replace the internal structure of the system. A &lt;code&gt;bug-diagnosis&lt;/code&gt; skill can be used in many repositories, many domains, many bug types. Its organizing logic is general task capability, not the topology of domain concepts inside a specific repository.&lt;/p&gt;

&lt;p&gt;What truly needs to be preserved inside the repository are the relationships among source code, documentation, tests, models, plans, logs, and audit evidence — relationships such as owner, proof, precedence, and freshness. Skills can help modify these things, but they cannot replace the relationships themselves.&lt;/p&gt;

&lt;p&gt;At this point, we realize that the skill’s semantic hash is insufficient to solve the problem. What a skill stores is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;task intent -&amp;gt; capability package
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What AGE needs to preserve is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;domain concept -&amp;gt; semantic commitment -&amp;gt; implementation location -&amp;gt; proof evidence -&amp;gt; audit/memory -&amp;gt; subsequent obligations
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These two structures are not the same. A skill can tell an Agent how to review, but it cannot automatically know which owner doc holds the current semantic fact. A skill can tell an Agent how to write tests, but it cannot automatically know which domain commitment this test protects. A skill can tell an Agent how to update documentation, but it cannot automatically determine whether a piece of information should go into an owner doc, a bug note, a log, a lesson, a reference, or a skill.&lt;/p&gt;

&lt;p&gt;These judgments are not invocation capabilities; they are the semantic authority structure of the repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Why &lt;code&gt;age-skill&lt;/code&gt; Is a Wrong Abstraction
&lt;/h2&gt;

&lt;p&gt;Turning AGE into an &lt;code&gt;age-skill&lt;/code&gt; is superficially tempting: take AGE’s rules, procedures, checklists, and document templates and write them into a callable capability package. When the Agent needs AGE, it loads this skill.&lt;/p&gt;

&lt;p&gt;But this places AGE at exactly the wrong level. A skill is a capability package that is matched and loaded after a task occurs; AGE should be the repository structure that already exists before the task begins. It determines how the task is understood, where information is read from, whose voice prevails in a conflict, and how closure is proved after completion.&lt;/p&gt;

&lt;p&gt;AGE cannot wait to appear only after a certain skill is selected. It should already be embodied in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The operational boundary of &lt;code&gt;AGENTS.md&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The routing structure of &lt;code&gt;docs/index.md&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The fact ownership of owner docs&lt;/li&gt;
&lt;li&gt;The conflict rules of source-of-truth precedence&lt;/li&gt;
&lt;li&gt;The obligation declarations of plans&lt;/li&gt;
&lt;li&gt;The proof relations of tests&lt;/li&gt;
&lt;li&gt;The closure gates of audits&lt;/li&gt;
&lt;li&gt;The trajectory memory of logs, bug notes, and lessons&lt;/li&gt;
&lt;li&gt;The action constraints of freshness/autonomy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If these relationships exist only inside an &lt;code&gt;age-skill&lt;/code&gt;, they are not repository structure but merely the content of a procedure bundle. Whenever the Agent does not match this skill, or the skill conflicts with the live repo, AGE becomes ineffective.&lt;/p&gt;

&lt;p&gt;Making &lt;code&gt;age-skill&lt;/code&gt; an always-on or global skill does not solve this problem either. At best, it can prescribe “read these owner docs first, check precedence this way, do a closure audit like that.” But the real owner, proof, precedence, and freshness relationships must still exist among the repository’s files, tests, logs, plans, and audit evidence.&lt;/p&gt;

&lt;p&gt;So the problem is not whether &lt;code&gt;age-skill&lt;/code&gt; is loaded every time; the problem is that a skill is still a capability package imposed on the repository from the outside. AGE must become the underlying topology of the repository itself. As long as owner, proof, precedence, and freshness are not internalized as repository state, AGE is demoted to an external operating method rather than an intrinsic convergence structure.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. The Missing Concepts That AGE Supplies
&lt;/h2&gt;

&lt;p&gt;Under the image of controlled convergence and structure preservation, what AGE supplies is not a new checklist, but a set of first-class system concepts that skill-ification practices lack.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Attractor
&lt;/h3&gt;

&lt;p&gt;To what structure should the system return in the long run? This cannot be decided by any single skill. It needs to be carried by owner docs, architectural baselines, domain design, and source-of-truth precedence. Without an attractor, a skill can only tell the Agent how to do things; it cannot tell the repository where it should converge.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Trajectory
&lt;/h3&gt;

&lt;p&gt;Completing a single task does not mean the system direction is correct. Logs, bug notes, lessons, plans, and audit records record how the repository arrived at its current state step by step. Without trajectory memory, the AI starts anew from a local cross-section each time, making it hard to judge whether the system is converging or drifting.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Semantic Authority
&lt;/h3&gt;

&lt;p&gt;When a skill, plan, code, test, and documentation disagree, whose voice prevails? AGE requires owner, routing, and precedence, rather than letting the currently invoked skill adjudicate on the fly. Semantic authority is not part of the execution steps; it is the internal order of the repository’s state space.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Proof Relation
&lt;/h3&gt;

&lt;p&gt;It is not enough for tests to “have coverage.” Tests must declare which semantic commitment they protect. Audit is not a checklist, either, but an examination of whether commitments have disappeared, weakened, or migrated to non-authoritative carriers. Proof relation makes verification not just about passing commands, but about returning to domain commitments.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Freshness / Autonomy
&lt;/h3&gt;

&lt;p&gt;Documentation is not eternally trustworthy just because it was written. Whether a document is fresh affects whether the AI can act on it, how far it can go autonomously, and when it must stop and ask a human. Freshness/autonomy turns “can we trust this, can we do this automatically” into a visible state of the repository, rather than an ad-hoc judgment inside a single session.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Structure-Preserving Document Routing
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;AGENTS.md&lt;/code&gt; can provide the AI with a compact operational entry point, and &lt;code&gt;docs/index.md&lt;/code&gt; can provide complete routing. The purpose of both is not to cram all knowledge into a single file, but to let the AI progressively open the right information according to the task’s needs. Information disclosure can be layered, but the domain structure must not be fragmented.&lt;/p&gt;

&lt;p&gt;These concepts together form the semantic authority topology of AGE.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. AGE Can Use Skills, But Cannot Become a Skill
&lt;/h2&gt;

&lt;p&gt;AGE is not opposed to skills. Skills are excellent execution scaffolds.&lt;/p&gt;

&lt;p&gt;But within AGE, skills can only be method nodes; they cannot be the source of truth, nor can they be AGE itself.&lt;/p&gt;

&lt;p&gt;The correct order is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;First, find the route via AGENTS.md / docs/index.md
Then, read the domain or architectural owner doc
Then, read the active requirement / plan / audit evidence
Finally, select the appropriate skill as the execution method
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Not:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;First, select a skill, then let the skill decide fact ownership
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, a bug diagnosis skill can tell the Agent how to reproduce and locate a problem. But which domain concept the root cause belongs to, which owner doc needs updating, which test proves the fix, and which category of regression the bug note will constrain in the future — all of these must be decided by returning to the semantic topology of AGE.&lt;/p&gt;

&lt;p&gt;A good skill accelerates execution. Bad skill-ification replaces domain structure with execution methods.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Judgment Criteria
&lt;/h2&gt;

&lt;p&gt;To judge whether a set of AI engineering practices is over-skill-ified, ask:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Does it organize knowledge primarily by operational verbs, or by domain concepts and architectural ownership?&lt;/li&gt;
&lt;li&gt;Are its links mainly execution resource references, or owner / invariant / proof / precedence / freshness relationships?&lt;/li&gt;
&lt;li&gt;After information is transformed between skills, plans, code, tests, docs, and logs, can the domain structure still be recovered?&lt;/li&gt;
&lt;li&gt;If all skills are deleted, does the repository still know what is correct, who owns it, and how to prove it?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If the answers are negative, skills have already taken on attractor responsibilities they should not bear.&lt;/p&gt;

&lt;p&gt;The ultimate distinction can be compressed into a single sentence:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Skill packages capabilities by invocation.
AGE preserves domain structure across transformations.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Skills make the Agent better at doing things. AGE ensures that after the Agent does things repeatedly, the repository still converges in a controlled manner along the domain structure.&lt;/p&gt;

&lt;h2&gt;
  
  
  AGE Application Development Template
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/entropy-cloud/attractor-guided-engineering-template" rel="noopener noreferrer"&gt;https://github.com/entropy-cloud/attractor-guided-engineering-template&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Gitee: &lt;a href="https://gitee.com/canonical-entropy/attractor-guided-engineering-template" rel="noopener noreferrer"&gt;https://gitee.com/canonical-entropy/attractor-guided-engineering-template&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>contextengineering</category>
      <category>harnessengineering</category>
      <category>ai</category>
      <category>agentskills</category>
    </item>
    <item>
      <title>Beyond Harness Engineering: Understanding Attractor-Guided Engineering through Nonlinear Dynamical System Control</title>
      <dc:creator>canonical</dc:creator>
      <pubDate>Fri, 29 May 2026 15:17:19 +0000</pubDate>
      <link>https://dev.to/canonical/beyond-harness-engineering-understanding-attractor-guided-engineering-through-nonlinear-dynamical-glh</link>
      <guid>https://dev.to/canonical/beyond-harness-engineering-understanding-attractor-guided-engineering-through-nonlinear-dynamical-glh</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This article is aimed at readers who are already familiar with Harness Engineering but not yet familiar with Attractor-Guided Engineering (AGE).&lt;/p&gt;

&lt;p&gt;Harness Engineering focuses on how to constrain, verify, and audit AI-generated outputs; AGE asks further: what long-term structure should these control mechanisms eventually pull the repository trajectories back to?&lt;/p&gt;

&lt;p&gt;For a detailed introduction to AGE, see my previous article: &lt;a href="https://mp.weixin.qq.com/s/TwMkUDLNo2-bIrXrfvPqIw" rel="noopener noreferrer"&gt;Attractor Before Harness: A Methodology for AI-Scale Development&lt;/a&gt;. This article focuses on a methodological analogy: using the language of nonlinear dynamical system control—in particular the structure-preserving terminology of port-Hamiltonian systems (PHS) and the target-manifold image of Immersion and Invariance—to explain some structures that already exist in AGE but have not yet been fully named: how semantic commitments are conserved, how change obligations are transformed, how document topology preserves structure, and how AI sessions recover the same system reality in a repository across time.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  1. Why This Analogy Is Needed
&lt;/h2&gt;

&lt;p&gt;AGE already has a core language:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;State space → attractor → trajectory → control&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This basic AGE vocabulary precisely captures a core problem in AI-scale development: when AI perturbs the repository at high frequency and amplitude with no persistent memory, how do we describe whether the system is still converging to a stable structure over the long term?&lt;/p&gt;

&lt;p&gt;More precisely, AGE examines AI-driven software engineering through the &lt;strong&gt;mental image of a dynamical system&lt;/strong&gt;. A single AI task can be seen as one perturbation and correction on the repository trajectory; a single input-output is only a local cross-section of that trajectory. The repository is a state space that evolves over time; AI, humans, CI, audits, and documentation updates all change the trajectory; owner docs define the attractor the system should repeatedly return to; plans, tests, audits, and logs provide local calibration mechanisms.&lt;/p&gt;

&lt;p&gt;Nonlinear dynamical system control is the theoretical branch that systematically studies “states, trajectories, stability, manifolds, feedback, observation, and structure preservation.” PHS (port-Hamiltonian systems) is a representative example of the structure-preserving approach. It decomposes a complex system into four structural classes: the Hamiltonian records how much energy is stored in the system; the interconnection matrix records how energy is transferred losslessly among internal variables; damping records irreversible losses such as resistance or friction; ports record the boundaries where the system exchanges energy with the external world. The key role of PHS modeling is to classify the coupling terms in the equations by function: some coupling terms only move energy internally, some represent true dissipation, and some come from external ports. Once these structures are distinguished, control design knows which terms should be preserved and which should be compensated or suppressed.&lt;/p&gt;

&lt;p&gt;This article does not try to equate AGE with PHS, but rather borrows the representative vocabulary of PHS to further identify conserved quantities, phase variables, interconnection topology, dissipation mechanisms, and port boundaries in AGE.&lt;/p&gt;

&lt;p&gt;Terminology conventions used in this article:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AGE: Attractor-Guided Engineering. The core hierarchy is “state space → attractor → trajectory → control.”&lt;/li&gt;
&lt;li&gt;Harness Engineering: the engineering practice of building execution scaffolding around AI generation, such as guardrails, verification, review, audit, and diagnostics.&lt;/li&gt;
&lt;li&gt;PHS: port-Hamiltonian systems, the representative language of the structure-preserving approach in nonlinear dynamical system control, describing complex systems using an energy function, interconnection, dissipation, and ports.&lt;/li&gt;
&lt;li&gt;Hamiltonian: the system’s stored energy function, describing how much energy the system currently holds.&lt;/li&gt;
&lt;li&gt;Immersion and Invariance: a method that handles nonlinear control, observation, and adaptation problems by constructing a target invariant manifold.&lt;/li&gt;
&lt;li&gt;owner docs: long-term documents that hold the ultimate interpretive authority for certain categories of facts in the repository, such as architecture baselines, feature designs, or component contracts.&lt;/li&gt;
&lt;li&gt;closure audit: an audit that re-checks the closure evidence along requirements, owner docs, code, tests, and logs before a task is considered complete.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Compared with PHS, the basic language of AGE still has an underexplored layer:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Between repeated inputs, plans, implementations, verifications, audits, and logs, what exactly is being preserved, transformed, routed, and dissipated?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If we answer in ordinary process language, it is easy to fall back into a linear pipeline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;input → requirement → design → plan → code → test → log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This image misleads the reader. Real development does not simply read the output of the previous stage and generate the next artifact. When writing and reviewing code, the AI typically needs to reference simultaneously: the current requirement, owner docs, live code, tests, a known-good baseline, bugs, logs, the plan, audit results, external contracts, and the reading routes given by the document index and architecture hierarchy.&lt;/p&gt;

&lt;p&gt;In other words, AGE is more like a multi-port coupled system; the unidirectional cascade pipeline only describes a local projection of it.&lt;/p&gt;

&lt;p&gt;The inspiration from nonlinear control lies exactly here: &lt;strong&gt;complex coupling terms are not necessarily noise; many coupling terms are themselves the way the system preserves structure.&lt;/strong&gt; In motor control, the d-q coordinates—direct-axis and quadrature-axis coordinates that rotate with the rotor—are commonly used; under these coordinates, certain speed-dependent, skew-symmetric cross-coupling terms can represent lossless flow of energy between different coordinates. Similarly, in AGE the cross-references among &lt;code&gt;requirements&lt;/code&gt;, &lt;code&gt;architecture&lt;/code&gt;, &lt;code&gt;plans&lt;/code&gt;, &lt;code&gt;code&lt;/code&gt;, &lt;code&gt;tests&lt;/code&gt;, and &lt;code&gt;logs&lt;/code&gt; bear the topological function of keeping semantic commitments recoverable across different carriers—not just document redundancy.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The Structure-Preserving Language of PHS
&lt;/h2&gt;

&lt;p&gt;The basic starting point of PHS is to view a physical system as a combination of “energy storage, interconnection, dissipation, and port exchange.” A common finite-dimensional form can be written as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dx/dt = (J(x) − R(x)) ∇H(x) + G(x) u
y = G(x)ᵀ ∇H(x)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This formula shows how several core symbols are organized:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;H measures the energy currently stored in the system;&lt;/li&gt;
&lt;li&gt;J only moves energy; it neither creates nor destroys energy;&lt;/li&gt;
&lt;li&gt;R dissipates the system’s internal energy;&lt;/li&gt;
&lt;li&gt;u is the port input, y is the port output; the pair forms the port power yᵀu;&lt;/li&gt;
&lt;li&gt;G describes how the ports couple to the internal state.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We can borrow this vocabulary to express three methodological principles from nonlinear control:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;First find quantities that tend to be conserved, then judge which errors need to be eliminated.&lt;/li&gt;
&lt;li&gt;Distinguish lossless routing from true dissipation; do not mistake “information moved” for “the system converged.”&lt;/li&gt;
&lt;li&gt;View “transport, dissipation, and external injection/extraction” separately, and avoid flattening all coupling into a linear task chain.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  3. The Feedback-Linearization–Style Software Engineering Fallacy
&lt;/h2&gt;

&lt;p&gt;In control theory, exact feedback linearization attempts to cancel nonlinear terms using coordinate transformations and feedback so that the system behaves as a linear object. This works in some systems, but it can also be highly dependent on exact parameters and destroy the system’s original energy structure.&lt;/p&gt;

&lt;p&gt;There is a similar impulse in software engineering: to make things easier for the AI, flatten all knowledge into a single unified artifact—a spec, a change request, a task list, an issue, a pull request description, or some master plan document.&lt;/p&gt;

&lt;p&gt;This practice appears to reduce complexity, but it is actually performing an engineering version of “linearization”:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Context in raw input is flattened into requirement entries;&lt;/li&gt;
&lt;li&gt;The long-term structure of owner docs is flattened into this iteration’s task description;&lt;/li&gt;
&lt;li&gt;Architecture precedence is flattened into a checklist;&lt;/li&gt;
&lt;li&gt;Historical judgments in logs, bugs, and analysis are flattened into “known items”;&lt;/li&gt;
&lt;li&gt;Tests and audits are flattened into “completed proof.”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Locally, this makes it easier for the AI to execute. Over the long term, it destroys the semantic topology of the repository. After different types of facts are squeezed into the same coordinate system, the AI no longer knows which material answers “what is,” which material answers “where we should converge,” and which material is only “why we did it that way at the time.”&lt;/p&gt;

&lt;p&gt;AGE can use specs and checklists, but it should not forcibly compress all knowledge into the same execution form. &lt;code&gt;docs/architecture/&lt;/code&gt;, &lt;code&gt;docs/components/&lt;/code&gt;, &lt;code&gt;docs/plans/&lt;/code&gt;, &lt;code&gt;docs/logs/&lt;/code&gt;, &lt;code&gt;docs/bugs/&lt;/code&gt;, &lt;code&gt;docs/analysis/&lt;/code&gt; need to retain distinct responsibilities, because they are different energy ports and different state coordinates within the same repository system.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Semantic Commitment as the Energy Storage Function of AGE
&lt;/h2&gt;

&lt;p&gt;In PHS, the Hamiltonian is the system’s stored energy function, answering “how much energy does the system currently hold.” When applied to AGE, we can regard the semantic commitments that must be recovered, preserved, and used to constrain future evolution across sessions as the repository system’s “stored energy”:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;H_repo = total amount of semantic commitment in the repository that remains valid
         and must be recoverable across sessions to constrain future evolution.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here “semantic commitment” means facts, contracts, and judgments that the system has accepted and that should not be casually lost; file word count or number of document entries is not equivalent to semantic commitment. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A certain user-visible behavior must exist;&lt;/li&gt;
&lt;li&gt;A certain schema field has a definite meaning;&lt;/li&gt;
&lt;li&gt;A certain package dependency direction must not be reversed;&lt;/li&gt;
&lt;li&gt;A certain renderer contract needs to be stable;&lt;/li&gt;
&lt;li&gt;The root cause of a certain historical bug must not be reintroduced;&lt;/li&gt;
&lt;li&gt;A certain audit finding has been falsified and should no longer drive corrective action;&lt;/li&gt;
&lt;li&gt;A certain owner doc defines the current specification baseline, not a future aspiration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These commitments can be roughly decomposed as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;H_repo = H_intent + H_requirement + H_owner + H_contract + H_behavior + H_proof + H_memory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These components correspond to:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;th&gt;Typical carriers&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Hintent
&lt;/td&gt;
&lt;td&gt;Genuine intent brought by external input&lt;/td&gt;
&lt;td&gt;User requests, PM explanations, external material&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hrequirement
&lt;/td&gt;
&lt;td&gt;Requirement commitments that the current slice must fulfill&lt;/td&gt;
&lt;td&gt;requirement, plan goals&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Howner
&lt;/td&gt;
&lt;td&gt;Long-term stable structural commitments&lt;/td&gt;
&lt;td&gt;architecture docs, component design docs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hcontract
&lt;/td&gt;
&lt;td&gt;Contracts that can be relied upon externally or downstream&lt;/td&gt;
&lt;td&gt;schema, API, public types, renderer contracts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hbehavior
&lt;/td&gt;
&lt;td&gt;Actual running behavior in the live repo&lt;/td&gt;
&lt;td&gt;code, examples, playground&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hproof
&lt;/td&gt;
&lt;td&gt;Re-examinable proof&lt;/td&gt;
&lt;td&gt;tests, verification, audit evidence&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hmemory
&lt;/td&gt;
&lt;td&gt;Trajectory judgments that should not be forgotten in the future&lt;/td&gt;
&lt;td&gt;logs, bugs, retrospectives, analysis&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;An implementation changes the carrier shape of a commitment: the same semantic commitment transforms from “a change obligation not yet fulfilled” into “a stable, recoverable fact in code, tests, owner docs, and logs.”&lt;/p&gt;

&lt;p&gt;Hrepo describes only the commitments that have been accepted by the system and need to be retained and recovered. It excludes free uncertainty that has not yet been clarified, assigned, or verified. The latter is recorded separately as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;F_repo = free semantic uncertainty in the repository not yet bound
         to a stable commitment, owner, or proof.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Therefore, Frepo is not a component of Hrepo. It is more like unbound energy floating around the semantic commitments: when requirements are not yet clear, owners not yet determined, tests not yet proven, audits not yet closed—the commitment has emerged but has not yet settled into a stable repository structure.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Energy Redistribution Is About Authority Weight, Not File Count
&lt;/h2&gt;

&lt;p&gt;Each folder should not be naively viewed as a separate energy bin. After a requirement is turned into code, the requirement file does not disappear; after an owner doc is updated, the input file still exists. What truly changes is the active authority of the same semantic commitment across different carriers—the redistribution of interpretive power, constraining power, and proving power.&lt;/p&gt;

&lt;p&gt;For example, a commitment initially appears in raw input:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Hidden form fields should not participate in submission."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After it enters the requirement, the raw input is still retained, but the direct interpretive authority for the current implementation transfers to the requirement. After it enters an architecture owner doc, long-term baseline interpretive authority transfers to the owner doc. After it enters code and tests, behavioral execution and proving authority transfer to implementation and verification. After it enters a bug note or log, historical judgment becomes a recoverable memory for future sessions.&lt;/p&gt;

&lt;p&gt;Therefore, a more accurate statement is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Files are not conserved.
The effective weight of semantic commitments is redistributed among multiple carriers.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Within a closed slice, unless an explicit human decision changes the scope, Hrepo should not increase or decrease out of nowhere. What truly should decrease is Frepo—the free semantic uncertainty that has not yet been bound, assigned, or verified.&lt;/p&gt;

&lt;p&gt;The goal of AGE can be written as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;preserve H_repo while reducing F_repo.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Requirement clarification, owner-doc alignment, tests, verification, and closure audits bind commitments from a free, vague, driftable state into a stable, recoverable, provable form.&lt;/p&gt;

&lt;p&gt;In PHS, R dissipates physical energy H; in AGE, Hrepo represents the total semantic commitment that should be preserved as much as possible, and should not be treated as an object of dissipation. Later, the term &lt;code&gt;R-flow&lt;/code&gt; will refer to reducing Frepo—that is, reducing the free uncertainty generated when the same semantic commitment is not yet bound, assigned, or verified.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. q and p: Stable State Representation and Change Obligation Representation
&lt;/h2&gt;

&lt;p&gt;If we view Hrepo as a scalar defined on some phase space, that phase space requires at least two classes of conjugate variables.&lt;/p&gt;

&lt;p&gt;It can be written as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;H_repo(q, p).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here I borrow the notation q and p to represent two complementary semantic dimensions in AGE, not to treat them as physical position and momentum.&lt;/p&gt;

&lt;p&gt;q is the stable state representation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;q_i = the current form in which a certain semantic commitment exists
      within the stable structure of the repository.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It answers: what the system is now.&lt;/p&gt;

&lt;p&gt;p is the change obligation representation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;p_i = the directional pressure that a certain semantic commitment exerts
      on future evolution.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It answers: why the system needs to move next, and in which direction.&lt;/p&gt;

&lt;p&gt;A simple example explains why the q/p duality is still needed even in one-dimensional cases. Suppose the semantic commitment is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;c = "administrators can export CSV (comma-separated value) files."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the code currently has no CSV export, two completely different situations can exist:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Situation&lt;/th&gt;
&lt;th&gt;qc
&lt;/th&gt;
&lt;th&gt;pc
&lt;/th&gt;
&lt;th&gt;AI's expected action&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;CSV explicitly out of scope&lt;/td&gt;
&lt;td&gt;currently unsupported&lt;/td&gt;
&lt;td&gt;no change obligation&lt;/td&gt;
&lt;td&gt;should not implement&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CSV is the top-priority active requirement&lt;/td&gt;
&lt;td&gt;currently unsupported&lt;/td&gt;
&lt;td&gt;strong change obligation&lt;/td&gt;
&lt;td&gt;should implement per plan&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Looking only at q, both are “currently unsupported.” But p is completely different.&lt;/p&gt;

&lt;p&gt;Conversely, if the current code supports CSV but an owner doc decides to remove it, qc remains “currently supported” while pc becomes a reverse change obligation. Without p, the AI cannot distinguish “stable existence” from “should be deleted but not yet deleted.”&lt;/p&gt;

&lt;p&gt;In the AGE documentation system, q is primarily carried by these materials:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Current baselines in &lt;code&gt;docs/architecture/&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;Component contracts in &lt;code&gt;docs/components/*/design.md&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;Live code and exported types;&lt;/li&gt;
&lt;li&gt;Passing tests and examples;&lt;/li&gt;
&lt;li&gt;Schema, public contracts, runtime behavior.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;p is primarily carried by these materials:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Active plan;&lt;/li&gt;
&lt;li&gt;Backlog or audit findings;&lt;/li&gt;
&lt;li&gt;Failing test;&lt;/li&gt;
&lt;li&gt;Bug report;&lt;/li&gt;
&lt;li&gt;Open question;&lt;/li&gt;
&lt;li&gt;Stale-doc conflict;&lt;/li&gt;
&lt;li&gt;Closure gate;&lt;/li&gt;
&lt;li&gt;Human decision pending.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is only a tendency of responsibility, not a fixed directory mapping. The same file may simultaneously carry both q and p. A requirement describes both the target state and the implementation obligation; a plan records both the current baseline and the closure pressure; a bug note records both historical facts and imposes constraints on future changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Development Is Converting Legitimate p into Stable q
&lt;/h2&gt;

&lt;p&gt;A correct implementation in AGE converts legitimate change obligations into stable state commitments. “Completing the task” is only the surface narrative; what really matters is whether this change has entered a recoverable, provable repository structure.&lt;/p&gt;

&lt;p&gt;Again take CSV export as an example.&lt;/p&gt;

&lt;p&gt;In the table below, T(p) denotes the total tension or pressure of change obligations—not a new physical energy, but a marker for “why the system still needs to evolve.”&lt;/p&gt;

&lt;p&gt;Before implementation:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;State&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Hrequirement
&lt;/td&gt;
&lt;td&gt;high, requirement carries "CSV support needed"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Howner
&lt;/td&gt;
&lt;td&gt;low or needs update, owner doc hasn't absorbed the capability&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hbehavior
&lt;/td&gt;
&lt;td&gt;low, code not yet implemented&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hproof
&lt;/td&gt;
&lt;td&gt;low, no tests or verification&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;T(p)&lt;/td&gt;
&lt;td&gt;high, plan/backlog holds change pressure&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;After implementation:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;State&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Hrequirement
&lt;/td&gt;
&lt;td&gt;still present, but unclosed obligation decreases&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Howner
&lt;/td&gt;
&lt;td&gt;increases if it becomes a stable capability&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hbehavior
&lt;/td&gt;
&lt;td&gt;increases, code carries behavior&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hproof
&lt;/td&gt;
&lt;td&gt;increases, tests and verification carry evidence&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hmemory
&lt;/td&gt;
&lt;td&gt;increases, log/audit records closure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;T(p)&lt;/td&gt;
&lt;td&gt;decreases, change obligation released&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In engineering language, this is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;active requirement / plan pressure
→ owner baseline / code behavior / proof / memory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The commitment did not disappear; it only transformed from “an obligation to be fulfilled in the future” into “a stable fact the current system already supports.”&lt;/p&gt;

&lt;p&gt;This also explains why a closure audit should not merely look at checkboxes. &lt;code&gt;- [x]&lt;/code&gt; only indicates that the executor claims something is done. The real question is: has this p been transformed into stable q, or has it merely been moved from plan to summary, from summary to log, from log to the next round of follow-ups?&lt;/p&gt;

&lt;h2&gt;
  
  
  8. J-flow and R-flow: Routing Is Not Dissipation
&lt;/h2&gt;

&lt;p&gt;In PHS, J represents the lossless interconnection structure, and R represents dissipation. AGE likewise needs to distinguish two completely different classes of actions.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;J-flow&lt;/code&gt; and &lt;code&gt;R-flow&lt;/code&gt; here are engineering labels created in this article by borrowing cybernetic language; they are not standard control-theory terms.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;J-flow&lt;/code&gt; is the transport and transformation of semantic commitments along the correct topology.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Raw input is recorded in &lt;code&gt;docs/input/&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;Requirements are synthesized into a requirement;&lt;/li&gt;
&lt;li&gt;Stable rules enter an owner doc;&lt;/li&gt;
&lt;li&gt;A plan references owner docs and the live baseline;&lt;/li&gt;
&lt;li&gt;Traceable links are established among code/test/log/audit.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These actions themselves do not necessarily reduce uncertainty. They mainly let commitments flow along the correct topology and avoid being stuffed into wrong positions.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;R-flow&lt;/code&gt; is what truly reduces Frepo:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A human explicitly cuts scope;&lt;/li&gt;
&lt;li&gt;A requirement writes testable acceptance criteria;&lt;/li&gt;
&lt;li&gt;An owner doc absorbs a stable baseline;&lt;/li&gt;
&lt;li&gt;Automated tests prove behavior;&lt;/li&gt;
&lt;li&gt;Focused verification exercises real paths;&lt;/li&gt;
&lt;li&gt;An independent closure audit overthrows or confirms a completion narrative;&lt;/li&gt;
&lt;li&gt;A bug note records a non-obvious root cause, reducing the risk of future drift.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This distinction is critical. A great deal of seemingly diligent documentation work is actually only &lt;code&gt;J-flow&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Moving ambiguity from input to discussion;&lt;/li&gt;
&lt;li&gt;Writing an undecided design into a plan;&lt;/li&gt;
&lt;li&gt;Writing a plan summary into a log;&lt;/li&gt;
&lt;li&gt;Turning preliminary audit findings directly into a backlog;&lt;/li&gt;
&lt;li&gt;Writing “should test” as a closure gate, but never truly executing it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These may be necessary steps, but they mainly change the location of free semantic energy without truly eliminating it. The real danger is mistaking &lt;code&gt;J-flow&lt;/code&gt; for &lt;code&gt;R-flow&lt;/code&gt;—mistaking “information moved” for “the system converged.”&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Park Transformation: From Chat Coordinates to Repo Coordinates
&lt;/h2&gt;

&lt;p&gt;From the nonlinear control perspective, the significance of the Park transformation is that it converts the rotational couplings hidden in time-varying three-phase coordinates into d-q coordinates, where power relationships and interconnection structure are easier to identify.&lt;/p&gt;

&lt;p&gt;A similar move exists in AGE. The raw chat, PM materials, and discussions in a long context constitute a time-varying, strongly coupled, implicit coordinate system. Requirements, architecture, execution, proof, history, and assumptions are all mixed together. In this coordinate system, the AI can easily mistake exploration for baseline, plans for facts, and historical judgments for current contracts.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;docs/&lt;/code&gt; system performs the function of transforming this mixed semantic field into more stable repo coordinates:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Coordinate&lt;/th&gt;
&lt;th&gt;Responsibility&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docs/architecture/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Current canonical architecture and owner precedence&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docs/components/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Component-level contracts and schema semantics&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docs/plans/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;How this round of work will close&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docs/logs/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;What happened and short-term context&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docs/bugs/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Non-obvious defects and regression risks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docs/analysis/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Exploration, comparison, rejected directions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docs/testing/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Manual or exploratory proof&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;live code/tests&lt;/td&gt;
&lt;td&gt;Current implementation facts and executable evidence&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This step is more like a coordinate transformation: it turns a hidden semantic interconnection structure into a routable, auditable, recoverable topology. Document classification is only the external form of this coordinate transformation.&lt;/p&gt;

&lt;p&gt;One could say:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AGE's document system resembles a Park-style re-coordinatization:
it expresses the time-varying, implicit, strongly coupled semantic quantities
in chat into more stable, routable, auditable responsibility coordinates
in the repository. This process is not lossless transformation; it is a
structured transcription that includes interpretation, assignment, and
evidence binding.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  10. Space, Time, and Conservation
&lt;/h2&gt;

&lt;p&gt;If we continue unfolding the energy-function language, “space” and “time” in AGE can also receive a clearer explanation.&lt;/p&gt;

&lt;p&gt;Here space refers to the semantic responsibility space, not the filesystem path itself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;space = the set of positions where a commitment can be placed,
        interpreted, constrained, and proven.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It can also be called:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;space ≃ semantic ownership topology.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, the same commitment “should hidden form fields participate in submission” might simultaneously reside in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;docs/architecture/form-validation.md&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;docs/architecture/data-domain-owner.md&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;runtime code;&lt;/li&gt;
&lt;li&gt;validation tests;&lt;/li&gt;
&lt;li&gt;a historical bug note;&lt;/li&gt;
&lt;li&gt;plan closure evidence.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These positions are more like coordinate axes; together they define the spatial distribution of this commitment in the repository, rather than forming a before-and-after sequence of stages.&lt;/p&gt;

&lt;p&gt;Here time refers to the discrete evolution sequence of the repository state, not the natural calendar:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;time = sequence of repository state transitions across sessions.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A plan closure, an audit overturn, a commit, a full-green baseline, an owner-doc update—these are all events in AGE time.&lt;/p&gt;

&lt;p&gt;AI does not have human continuous memory. Therefore, AGE time is not psychological time but externalized, recoverable repository time. If a decision exists only in chat and never enters the repository, it barely existed in AGE time at all.&lt;/p&gt;

&lt;p&gt;From this, we can define two important homogeneities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Temporal homogeneity&lt;/strong&gt;: When the same repository state is re-read on different dates, in different AI sessions, and in different context windows, the same set of effective commitments and execution rules should be recovered.&lt;/p&gt;

&lt;p&gt;This is the deep meaning of file-in/file-out:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;temporal homogeneity = session translation invariance.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the AI knows today that a feature is out of scope, but tomorrow in a different session does not know it because it was only written in chat, then temporal homogeneity is broken and Hrepo suffers a semantic leak.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Spatial homogeneity&lt;/strong&gt;: The same type of semantic commitment, no matter in which local feature it appears, should follow the same ownership, routing, and proof rules.&lt;/p&gt;

&lt;p&gt;For example, a permission commitment should not bypass the permission owner doc just because it appears inside a CSV export button; schema authoring semantics should not bypass compiler/runtime contracts just because they appear in an example; a complex host capability should not leak directly into the core scope just because the current implementation makes it convenient.&lt;/p&gt;

&lt;p&gt;AGE space is not a uniform Euclidean space but a responsibility space with topology and curvature:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Protected areas are high-curvature zones; entering them requires a change in trajectory;&lt;/li&gt;
&lt;li&gt;Owner docs are centers of a potential field; nearby changes will be pulled back toward the baseline;&lt;/li&gt;
&lt;li&gt;Stale docs are coordinate singularities and should not be taken at face value;&lt;/li&gt;
&lt;li&gt;External integrations are open ports that may inject or extract commitments;&lt;/li&gt;
&lt;li&gt;Audits are observation surfaces, not sources of fact.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Therefore, AGE does not require all spatial points to be homogeneous. It requires homogeneity within the same type of responsibility region, and that cross-region transitions obey clear topology.&lt;/p&gt;

&lt;h2&gt;
  
  
  11. Immersion and Invariance: From Attractor to Target Manifold
&lt;/h2&gt;

&lt;p&gt;The core idea of Immersion and Invariance is to first construct a target manifold, rather than estimating all unknown parameters accurately. Immersion means embedding the desired low-dimensional target dynamics into the original system’s state space so that the target behavior becomes a set of state relationships the system can reach. Invariance means that once the trajectory lands on this set of relationships, the system evolution will not take it off the manifold. The task of the controller or observer is to make the trajectory converge to this manifold and maintain self-consistent evolution on it.&lt;/p&gt;

&lt;p&gt;The relationship to the attractor concept can be understood this way: the attractor answers “what structure the system should converge to in the long term,” while Immersion and Invariance answers “when unknown parameters and local unobservability exist, how to construct a convergent, maintainable target manifold.” The former defines the long-term structure; the latter gives a control-design image for making the trajectory enter and stay near that structure.&lt;/p&gt;

&lt;p&gt;In AI development there are also massive “parameters” that can never be fully known:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The product manager’s complete true intent;&lt;/li&gt;
&lt;li&gt;Future user behavior;&lt;/li&gt;
&lt;li&gt;The full boundaries of external systems;&lt;/li&gt;
&lt;li&gt;All the historical reasons in legacy code;&lt;/li&gt;
&lt;li&gt;What the next AI session will misunderstand;&lt;/li&gt;
&lt;li&gt;The real evolutionary pressure on a certain abstraction six months later.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Traditional approaches easily fall into two extremes: either try to clarify all unknowns before acting, or swallow all unknowns and code directly.&lt;/p&gt;

&lt;p&gt;AGE is closer to the Immersion and Invariance compromise:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Do not require knowing all parameters; only require that the current slice
be embedded into, and converge to, a closable invariant manifold.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Corresponding to AGE, owner docs define the long-term attractor; the current plan’s goals, non-goals, accepted assumptions, verification gates, and closure audit define the local target manifold for this slice. A slice does not have to resolve all unknowns, but it needs to state which local manifold it is embedded into, and why it will not escape this manifold after completion.&lt;/p&gt;

&lt;p&gt;This manifold is jointly defined by the following materials:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;goals;&lt;/li&gt;
&lt;li&gt;non-goals;&lt;/li&gt;
&lt;li&gt;owner-doc invariants;&lt;/li&gt;
&lt;li&gt;accepted assumptions;&lt;/li&gt;
&lt;li&gt;blocking assumptions;&lt;/li&gt;
&lt;li&gt;verification gates;&lt;/li&gt;
&lt;li&gt;closure audit;&lt;/li&gt;
&lt;li&gt;live code baseline.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What a plan should really spell out is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;This slice is permitted to ignore X because X is orthogonal to this closure.
This slice needs to resolve Y because Y changes current contracts or
user-visible behavior.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This does not give a green light to vague requirements. On the contrary, it demands the classification of uncertainty: which unknowns can remain unknown, and which must be eliminated first through human decisions or owner-doc alignment.&lt;/p&gt;

&lt;h2&gt;
  
  
  12. Structure-Preserving Observer: Audit Is Not Another Narrative Source
&lt;/h2&gt;

&lt;p&gt;The key inspiration from structure-preserving PHS observer design is: an observer can preserve the system’s original structure rather than constructing a separate estimator disconnected from the system topology.&lt;/p&gt;

&lt;p&gt;AGE’s audit should be the same. A good closure audit re-observes the system state along the same set of owner-doc precedence, live code, tests, logs, and plan gates; the implementer’s completion narrative is merely material to be verified.&lt;/p&gt;

&lt;p&gt;This is also why a closure audit in AGE should not merely ask “is the task done,” but should ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Has the live behavior truly landed;&lt;/li&gt;
&lt;li&gt;Does the owner doc still describe the current baseline;&lt;/li&gt;
&lt;li&gt;Do the tests protect the commitment rather than an accidental implementation;&lt;/li&gt;
&lt;li&gt;Are the plan’s &lt;code&gt;Goals&lt;/code&gt;/&lt;code&gt;Non-Goals&lt;/code&gt; still honest;&lt;/li&gt;
&lt;li&gt;Does the closure evidence exist in the repository, not just in a summary;&lt;/li&gt;
&lt;li&gt;Have in-scope defects been downgraded to vague follow-ups;&lt;/li&gt;
&lt;li&gt;Has &lt;code&gt;J-flow&lt;/code&gt; been misreported as &lt;code&gt;R-flow&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If an audit does not preserve structure, it becomes another high-density narrative source. It may create new findings, new backlogs, a new sense of completion, without actually reducing Frepo.&lt;/p&gt;

&lt;p&gt;Thus, the audit in AGE should resemble a structure-preserving observer: it re-estimates the system state according to the existing fact topology, and calibrates its estimation with live repo evidence; it does not create a separate fact topology.&lt;/p&gt;

&lt;h2&gt;
  
  
  13. Implications for AGE Practice
&lt;/h2&gt;

&lt;p&gt;The value of this nonlinear control analogy for AGE practice lies in pointing out several directly improvable methodological points. New terminology is meaningful only when it helps distinguish real engineering actions.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Plans Should Explicitly Write the Reference Set
&lt;/h3&gt;

&lt;p&gt;Writing and reviewing code both require materials beyond the previous-stage file. A plan can more explicitly require listing the reference constellation for this slice:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Reference Set&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Context / routing:
&lt;span class="p"&gt;-&lt;/span&gt; Active owner docs:
&lt;span class="p"&gt;-&lt;/span&gt; Live code routes:
&lt;span class="p"&gt;-&lt;/span&gt; Tests / verification baseline:
&lt;span class="p"&gt;-&lt;/span&gt; Logs / bugs / known regressions:
&lt;span class="p"&gt;-&lt;/span&gt; External contracts:
&lt;span class="p"&gt;-&lt;/span&gt; Plan / audit evidence:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This can prevent the AI from treating the plan as the sole source of truth.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Plans Should Explicitly Write the Commitment Phase State
&lt;/h3&gt;

&lt;p&gt;Current plans already emphasize baseline, goals, non-goals, and closure gates. The nonlinear control perspective further asks to spell out q/p:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Commitment Phase State&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Stable state now (&lt;span class="sb"&gt;`q`&lt;/span&gt;):
&lt;span class="p"&gt;-&lt;/span&gt; Active change pressure (&lt;span class="sb"&gt;`p`&lt;/span&gt;):
&lt;span class="p"&gt;-&lt;/span&gt; Target stable state after closure:
&lt;span class="p"&gt;-&lt;/span&gt; Proof that &lt;span class="sb"&gt;`p`&lt;/span&gt; was converted into stable &lt;span class="sb"&gt;`q`&lt;/span&gt;:
&lt;span class="p"&gt;-&lt;/span&gt; Remaining pressure and why it is non-blocking:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This can distinguish “the behavior currently does not exist because it is stably unnecessary” from “the behavior currently does not exist but needs to be implemented.”&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Closure Audit Should Check Semantic Conservation
&lt;/h3&gt;

&lt;p&gt;One more question can be added:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Did any in-scope commitment disappear, weaken, or move to a non-authoritative artifact?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is more accurate than “were the documents updated.” What we truly need to avoid is commitments leaking during transformation.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Owner Docs Should Write Stable Commitments
&lt;/h3&gt;

&lt;p&gt;For important owner docs, structures like the following can be gradually added:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Stable Commitments&lt;/span&gt;

&lt;span class="gu"&gt;## Allowed Variation&lt;/span&gt;

&lt;span class="gu"&gt;## Drift / Leakage Signals&lt;/span&gt;

&lt;span class="gu"&gt;## Correction Path&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes owner docs more like structural equations than instruction manuals.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Audit Prompts Should Distinguish J-flow and R-flow
&lt;/h3&gt;

&lt;p&gt;During an audit, one should ask:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Which changes merely routed commitments between artifacts?
Which changes actually reduced free semantic uncertainty through
decision, proof, or owner-doc alignment?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This avoids mistaking “more documents were written” for “the system has become more convergent.”&lt;/p&gt;

&lt;h2&gt;
  
  
  14. Conclusion: The Nonlinear Dynamical System Control Image of AGE
&lt;/h2&gt;

&lt;p&gt;If AGE is reinterpreted under the lens of nonlinear dynamical system control, it can be seen as a structure-preserving AI engineering control system. PHS provides the representative vocabulary of energy, interconnection, dissipation, and ports; Immersion and Invariance supplements the image of a target manifold, unknown parameters, and trajectory convergence.&lt;/p&gt;

&lt;p&gt;This image can be summarized as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hrepo is the total semantic commitment that should be conserved across sessions;&lt;/li&gt;
&lt;li&gt;q is the stable state representation of commitment;&lt;/li&gt;
&lt;li&gt;p is the change obligation representation of commitment;&lt;/li&gt;
&lt;li&gt;Development is the conversion of legitimate p into stable q;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;J-flow&lt;/code&gt; is responsible for routing commitments along the correct ownership topology;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;R-flow&lt;/code&gt; is responsible for reducing free semantic energy that is unbound, unverified, and unassigned;&lt;/li&gt;
&lt;li&gt;The docs system is a Park transformation from chat coordinates to repo coordinates;&lt;/li&gt;
&lt;li&gt;File-in/file-out maintains temporal homogeneity, i.e., session translation invariance;&lt;/li&gt;
&lt;li&gt;Owner docs, plans, tests, audits, and logs together form a multi-port coupled convergence mechanism.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The core judgment is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The disorder in AI development is not just noise; it is often semantic energy that has not yet been correctly coordinatized. The next step for AGE is to more clearly model how these semantic commitments are injected, routed, stored, transformed, proven, and conserved, rather than simply piling on more processes.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Therefore, AGE can be understood as:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A nonlinear dynamical system control image for software engineering under high-speed AI perturbation: use owner docs to define the attractor, use plans to embed the current slice into a local target manifold, use routing to preserve structure, use verification/audit to reduce free semantic energy, and use logs/bugs to preserve the trajectory memory across time.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Appendix: PHS Mathematical Background
&lt;/h2&gt;

&lt;p&gt;PHS is a structured modeling framework developed by van der Schaft, Maschke, and others around the 1990s around nonlinear systems, generalized bond graphs, and port interconnections, and is closely intertwined with the passivity-based control and energy shaping work of Ortega and others. Its difference from ordinary state-space models lies in putting the energy function and interconnection topology first. Mechanical systems, electrical circuits, motors, power networks, and fluid networks can all be viewed under this perspective as combinations of energy-storage elements, dissipative elements, and port interconnections.&lt;/p&gt;

&lt;p&gt;Interconnection and Damping Assignment Passivity-Based Control further applies this approach to control design: the controller does not simply cancel nonlinearities, but reconfigures the closed-loop system’s interconnection structure and damping distribution so that the closed-loop energy function has the desired shape. Structure-preserving observers, PHS network stability, and passive interconnection of microgrids all inherit the same judgment: preserving structure is often more robust than flattening it.&lt;/p&gt;

&lt;p&gt;A common form of finite-dimensional PHS is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dx/dt = (J(x) − R(x)) ∇H(x) + G(x) u
y = G(x)ᵀ ∇H(x)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;where:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Symbol&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;x&lt;/td&gt;
&lt;td&gt;System state, e.g., mechanical position/momentum, circuit flux linkage/charge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;H(x)&lt;/td&gt;
&lt;td&gt;Total energy function of the system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;∇H(x)&lt;/td&gt;
&lt;td&gt;Gradient of energy with respect to state, also often called co-energy variables; under specific port choices can correspond to conjugate quantities like force, voltage, current&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;J(x)&lt;/td&gt;
&lt;td&gt;Skew-symmetric interconnection matrix, satisfying J(x)ᵀ = −J(x), represents lossless energy routing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;R(x)&lt;/td&gt;
&lt;td&gt;Positive semidefinite dissipation matrix, satisfying R(x) = R(x)ᵀ ≽ 0, represents dissipation such as resistance, friction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G(x)&lt;/td&gt;
&lt;td&gt;How external ports couple into the system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;u&lt;/td&gt;
&lt;td&gt;Port input, e.g., applied voltage, external force&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;y&lt;/td&gt;
&lt;td&gt;Port output, usually paired with u to form input power yᵀu&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Taking the derivative of H along system trajectories:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dH/dt = (∇H)ᵀ ẋ = (∇H)ᵀ J ∇H − (∇H)ᵀ R ∇H + (∇H)ᵀ G u.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since J is skew-symmetric, for any vector a we have aᵀ J a = 0. Therefore:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dH/dt = − (∇H)ᵀ R ∇H + yᵀ u.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If there is no dissipation and no external input, i.e., R = 0 and u = 0, then dH/dt = 0—energy is conserved. If u = 0 but R ≽ 0, then dH/dt ≤ 0—the system energy is non-increasing. This is the fundamental reason why passivity-based control and energy shaping can work.&lt;/p&gt;

&lt;p&gt;Integrating the above from 0 to t gives the passivity inequality:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;H(x(t)) − H(x(0)) ≤ ∫₀ᵗ y(τ)ᵀ u(τ) dτ.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It expresses that the increase in stored energy will not exceed the total energy injected through the external ports. The system can store energy, release energy, and dissipate energy, but cannot create energy out of nothing.&lt;/p&gt;

&lt;p&gt;This inequality explains why PHS is particularly suitable for network systems. If two passive systems are interconnected in a power-conserving way, for example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;u₁ = −y₂, u₂ = y₁,
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then the sum of the two port powers is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;y₁ᵀ u₁ + y₂ᵀ u₂ = y₁ᵀ (−y₂) + y₂ᵀ y₁ = 0.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The interconnection itself neither injects nor dissipates energy; it only moves energy between the two subsystems. Therefore, lossless interconnection of passive systems remains passive. This property is key to extending PHS from single motors, robot arms, and circuits to microgrids, networked systems, and large-scale physical systems modeling.&lt;/p&gt;

&lt;p&gt;The minimal canonical Hamiltonian system can be written as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;x = (q, p),

[ dq/dt ]   [ 0  I ] [ ∂H/∂q ]
[ dp/dt ] = [ −I 0 ] [ ∂H/∂p ].
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here q is a position-like variable, p is a momentum-like variable, and the matrix in the middle is the most basic symplectic structure. Its role is not to dissipate energy, but to let energy reciprocally convert between “positional potential energy” and “momentum kinetic energy.”&lt;/p&gt;

&lt;p&gt;If dissipation and ports are added, we obtain a more general form:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ dq/dt ]   [ 0  I ] [ ∂H/∂q ]
[ dp/dt ] = [ −I 0 ] [ ∂H/∂p ] − damping terms + port input terms.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The reason the Park transformation is important in electric motors is that it converts the time-varying rotational relationships in stationary three-phase coordinates into d-q coordinates, making speed-dependent cross-couplings easier to identify as part of the interconnection structure. From the energy perspective, such a cross-term is not an ordinary disturbance, but a structural channel through which energy flows among the d-axis, q-axis, and mechanical momentum.&lt;/p&gt;

&lt;p&gt;This fact can be seen from a two-dimensional skew-symmetric matrix:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;S = [ 0  −1 ]
    [ 1   0 ],  Sᵀ = −S.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For any 2D vector z, we have zᵀ S z = 0. If a local dynamic contains a term ω S z, it will cause the two components of z to rotate mutually and exchange energy forms, but it will not change the quadratic energy ½ zᵀ z:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;d/dt (½ zᵀ z) = zᵀ ż = zᵀ (ω S z) = ω zᵀ S z = 0.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is why the PHS perspective cautions against the intuition to “cancel all cross-coupling terms.” Some cross-terms are not errors, but the manifestation of system topology in local coordinates.&lt;/p&gt;

&lt;h2&gt;
  
  
  AGE Application Development Template
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/entropy-cloud/attractor-guided-engineering-template" rel="noopener noreferrer"&gt;https://github.com/entropy-cloud/attractor-guided-engineering-template&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Gitee: &lt;a href="https://gitee.com/canonical-entropy/attractor-guided-engineering-template" rel="noopener noreferrer"&gt;https://gitee.com/canonical-entropy/attractor-guided-engineering-template&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>computerscience</category>
      <category>softwareengineering</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Attractor Before Harness: A Methodology for Large-Scale AI Development</title>
      <dc:creator>canonical</dc:creator>
      <pubDate>Thu, 21 May 2026 12:08:33 +0000</pubDate>
      <link>https://dev.to/canonical/attractor-before-harness-a-methodology-for-large-scale-ai-development-2omk</link>
      <guid>https://dev.to/canonical/attractor-before-harness-a-methodology-for-large-scale-ai-development-2omk</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;In systems where AI deeply participates in development, the first-principles question is not "how to constrain AI's behavior," but "what long-term structure the system should converge to."&lt;br&gt;&lt;br&gt;
Only after this direction is clearly defined can mechanisms like harness, guardrail, verification, audit, and closure truly have meaning. Otherwise, they are merely efficiently solidifying a wrong baseline.&lt;br&gt;&lt;br&gt;
This claim is inevitable because AI collaboration pushes "trajectory convergence"—a problem long treated as an add-on in software engineering methodology—to a position where it must be explicitly modeled.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  1. Why Harness Is the First Thing People Think of When Discussing AI Engineering
&lt;/h2&gt;

&lt;p&gt;In current discussions about AI-assisted development, the most common terms are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;guardrail&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;verification&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;review&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;feedback loop&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;agent harness&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This set of intuitions assumes a single premise by default:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The correct direction of the system is already known.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Given that premise, the problems naturally become:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to limit deviations&lt;/li&gt;
&lt;li&gt;How to expose failures as early as possible&lt;/li&gt;
&lt;li&gt;How to make reviews stricter&lt;/li&gt;
&lt;li&gt;How to prevent agents from going rogue&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This language suffices for small tasks. For a script, a CRUD page, or a local bug fix, you usually already know "what a correct result looks like"; the remaining work is mainly about execution and verification.&lt;/p&gt;

&lt;p&gt;But what truly makes large systems difficult is often not "how to prevent crossing the line," but "which path is the right long-term structure in the first place."&lt;/p&gt;

&lt;p&gt;To answer this question, we must first recognize one thing: &lt;strong&gt;all current harness-type mechanisms rest on an implicit premise—the evaluation unit is primarily state, and trajectory convergence relies on the developer's tacit sense of direction as a backstop.&lt;/strong&gt; AI collaboration removes precisely this backstop.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The Backstop That Has Been Removed
&lt;/h2&gt;

&lt;p&gt;Open any mainstream engineering methodology—TDD, DDD, Clean Architecture, Agile, Code Review culture—and their first-class evaluation targets are almost always state:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Evaluate "whether this PR is correct," not "whether the cumulative direction of the last 100 PRs is correct."&lt;/li&gt;
&lt;li&gt;Evaluate "whether the current architecture is clean," not "whether the architecture is being continuously pushed toward a stable form during evolution."&lt;/li&gt;
&lt;li&gt;Evaluate "whether tests cover the current behavior," not "whether the test suite itself has been corroded by implementation details."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Traditional methodologies are not entirely without trajectory awareness—refactoring, technical debt, code smells, evolutionary architecture, and Lehman's laws of software evolution all touch on trajectory. But these concepts exist in the methodology as &lt;em&gt;corrective mechanisms&lt;/em&gt; and &lt;em&gt;diagnostic vocabulary&lt;/em&gt;, not as fundamental objects. When a theory must continuously introduce negative concepts like "debt," "fragility," and "corrosion" to retroactively acknowledge trajectory problems, it reveals that its foundational category set lacks a positive trajectory object.&lt;/p&gt;

&lt;p&gt;This state-centric paradigm has worked for so long because human engineers themselves act as a perturbation source with low frequency and stable directional sense. A person writes a few hundred lines of code per day; each perturbation is small in magnitude, and a continuous sense of direction is maintained in the mind. State-level quality assurance combined with the programmer's implicit directional sense ensures that the trajectory does not drift.&lt;/p&gt;

&lt;p&gt;AI collaboration removes this backstop. AI is not a faster programmer; it is a &lt;strong&gt;structurally different perturbation source&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;High frequency&lt;/strong&gt;: A single session can generate hundreds of lines of code spanning multiple modules in minutes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High magnitude&lt;/strong&gt;: Each generation can introduce cross-boundary structural changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No persistent directional sense&lt;/strong&gt;: Each session is independent, with no implicit architectural judgment carried across sessions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Highly reasonable locally&lt;/strong&gt;: Interfaces, types, tests, and documentation can be produced simultaneously, and each piece passes inspection when viewed in isolation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The last point is crucial. &lt;strong&gt;In AI collaboration, all state-level checks can pass while the system as a whole drifts continuously.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Plan 76 of &lt;code&gt;nop-chaos-flux&lt;/code&gt; is a typical example. An attempt to remove the local state mirror in &lt;code&gt;array-editor&lt;/code&gt; / &lt;code&gt;key-value&lt;/code&gt; immediately caused 11 test failures. But what was exposed was not a specific bug, but a deeper fact: &lt;strong&gt;the tests themselves had become tightly coupled to the timing of the old implementation.&lt;/strong&gt; From a state perspective, every incremental change had passed review and CI; from a trajectory perspective, the test suite had unconsciously drifted into a position where it could no longer support structural evolution.&lt;/p&gt;

&lt;p&gt;Traditional theory has a symptom name for this—"test fragility"—but a symptom name is a cross-sectional diagnosis. It does not name the &lt;em&gt;process&lt;/em&gt; by which 100 legitimate commits accumulate into fragility. Trajectory problems are process problems, and process problems require a process language.&lt;/p&gt;

&lt;p&gt;Thus, the issue is not that AI makes old problems worse, but that AI pushes trajectory problems from an occasional repair target to a high-frequency, first-class citizen. For these problems to enter the methodology's field of view, engineering methodology must adopt "trajectory" as a fundamental category.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Dynamical Systems Language: Making Trajectory Problems Explicit
&lt;/h2&gt;

&lt;p&gt;In mathematics and physics, a &lt;strong&gt;dynamical system&lt;/strong&gt; refers to a system whose state evolves continuously over time, with each next state depending on the current state. What we care about is not just whether it is correct at a single moment, but what kind of &lt;strong&gt;trajectory&lt;/strong&gt; it traces out over time.&lt;/p&gt;

&lt;p&gt;Translated to large-scale AI development, this language corresponds to four mutually defining fundamental objects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;State Space&lt;/strong&gt;: All possible implementation states the system can evolve into under current constraints.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Attractor&lt;/strong&gt;: The stable structure to which the system is repeatedly pulled back during long-term evolution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trajectory&lt;/strong&gt;: The actual evolutionary path left behind after each round of generation, verification, and correction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Control&lt;/strong&gt;: The various mechanisms that continuously influence the trajectory through local signals.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The repository, under existing constraints, has a set of all possible combinations of code, documentation, and tests it could evolve into—this constitutes the state space. The continuous actions of humans, AI, review, CI, and documentation updates constitute the evolution rules. The interaction of these two forms the live repo history, which is the trajectory. The attractor is the stable structure to which the system is repeatedly pulled back during long-term iteration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One point must be made clear: this language is not a "more elegant way of saying things," but the foundational language of a new ontology.&lt;/strong&gt; The four concepts—state space, attractor, trajectory, control—define one another; if one is missing, the other three cannot be rigorously expressed. Attempting to translate these concepts into the language of the old ontology (architecture, constraints, goals, process) inevitably incurs information loss—this is the root of misreadings like "Isn't Attractor Guided Engineering just Harness?"&lt;/p&gt;

&lt;p&gt;The relationship among the four objects is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;State Space → Attractor → Trajectory → Control&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is not a rhetorical ordering; it is a logical dependency.&lt;/strong&gt; Without defining the state space, there is no talk of an attractor; without defining the attractor, one cannot judge whether the trajectory is drifting; without trajectory judgment, control has no target.&lt;/p&gt;

&lt;p&gt;The "before" here refers to &lt;strong&gt;logical priority&lt;/strong&gt;: in execution, attractor and harness co-evolve in a closed loop, but the attractor can be conceptually defined independently of the harness, while the harness cannot be conceptually defined independently of the attractor (to correct deviation, toward what?). This asymmetry corresponds to the relationship between final cause and efficient cause in dynamical systems—acknowledging co-evolution does not weaken the "before" claim. Final cause and efficient cause act together in physical systems as well, but the final cause remains the logical prerequisite for the efficient cause.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. What Exactly Is an Attractor
&lt;/h2&gt;

&lt;p&gt;Take the well-known Lorenz attractor as an example. It is implicitly defined by differential equations. It is not a checklist that enumerates all correct trajectories in advance, nor is it a simple boundary. Within the attractor, local trajectories are highly complex and appear nearly chaotic in the short term, yet the whole does not fly apart randomly; it is always pulled back into the same type of geometric shape.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuegfpnvkeqol77ldzizj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuegfpnvkeqol77ldzizj.png" alt="Lorenz attractor" width="800" height="697"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Lorenz attractor: Local trajectories are highly complex, yet the whole is still constrained by a stable structure. Chaos does not equal randomness; local unpredictability does not mean the whole is out of control.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;An engineering attractor works the same way. &lt;strong&gt;It is more like an "equation-defined manifold" than "a list of all legal points enumerated one by one."&lt;/strong&gt; The equation does not write out every point on the manifold in advance; it only stipulates which relations must hold. Points satisfying these relations naturally fall within the same structure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key difference from traditional architecture concepts&lt;/strong&gt;: DDD and Clean Architecture also emphasize long-term structure, but they treat that long-term structure as a &lt;strong&gt;target state&lt;/strong&gt;—the methodology's job is to "reach X." A trajectory ontology treats the long-term structure as an &lt;strong&gt;attractor&lt;/strong&gt;—the methodology's job is to "return to the vicinity of X no matter how far you are pushed away." &lt;strong&gt;The second perspective addresses stability under perturbation.&lt;/strong&gt; This is exactly the core problem in AI collaboration scenarios, and exactly the problem for which traditional methodologies lack first-class conceptual tools.&lt;/p&gt;

&lt;p&gt;To prevent conceptual drift, an attractor in engineering can be strictly divided into three layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Structural layer (the attractor itself)&lt;/strong&gt;: A small number of high-order invariants, such as how responsibilities are divided, how boundaries are established, and which structural relationships cannot be violated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Carrier layer (the engineering carrier of the attractor)&lt;/strong&gt;: Externalizing these invariants into versionable, auditable documents.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implementation layer (the instantaneous projection of the attractor)&lt;/strong&gt;: The parts of the current code that actually embody these invariants.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The attractor is not the document; the document is the carrier of the attractor. The attractor is not the code; the code is an instantaneous projection of the attractor.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This layering is important because it resolves a common confusion: "When architecture docs and code conflict, which one do we follow?" The answer is not "which one is more authoritative," but "what question are you asking?" If you are asking about current implementation behavior, the code is authoritative. If you are asking where the system should converge, the docs are authoritative. If you are asking why a certain path was abandoned, logs/bugs/analysis are authoritative. Each layer is authoritative only for its corresponding question.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. The Repository Begins to Bear the System's Truth, Making Harness Infrastructure
&lt;/h2&gt;

&lt;p&gt;Once AI deeply participates, the repository is no longer merely an external projection of human cognition; it begins to become the sole carrier of the system's truth. No one person fully grasps all the design details in the system, and no one can answer questions about the system's design without consulting the project source code. What the next session can re-read is not the full intent in the author's mind, but the code, diffs, logs, tests, and documentation.&lt;/p&gt;

&lt;p&gt;This has a direct engineering consequence:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Generation and acceptance must be genuinely separated.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Generation actions can be completed at high speed by AI within the same context, but acceptance can no longer rely on that generative context itself. You must return to the external evidence in the repository and re-evaluate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Whether the behavior was truly implemented.&lt;/li&gt;
&lt;li&gt;What the current baseline actually is.&lt;/li&gt;
&lt;li&gt;Which materials are authoritative.&lt;/li&gt;
&lt;li&gt;Whether this "completion" is just a feeling of completion.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is precisely because the repository begins to bear the system's truth that generation and evaluation must be separated; and it is precisely because generation and evaluation are separated that the harness is upgraded from a "safer engineering habit" to necessary infrastructure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In traditional collaboration, harness is optional discipline; in AI collaboration, harness is the necessary condition for making trajectory judgment possible.&lt;/strong&gt; The reason is this: while AI generates code, it also generates all the materials for judging whether that code is correct—types, tests, documentation, completion summaries are all produced together by the same context based on the same understanding. If that understanding is skewed, all "verification evidence" will be skewed consistently in the same direction, not contradicting each other, yet entirely wrong as a whole. This &lt;strong&gt;self-verification trap&lt;/strong&gt; is naturally weakened in human collaboration—CI rules, reviewers, spec documents are all independent external standards maintained by different cognitive subjects. AI collaboration breaks this independence, so we must use engineering means—fresh sessions, independent audits, returning to live repo forensics—to artificially reconstruct the separation of generation and acceptance.&lt;/p&gt;

&lt;p&gt;Under repo-truth conditions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;test / lint / audit&lt;/code&gt; functions more like measurement.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;owner doc / plan / closure&lt;/code&gt; functions more like constraints.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;logs / bugs / discussions&lt;/code&gt; functions more like trajectory records and externalized memory.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. Three Most Common Ontological Confusions
&lt;/h2&gt;

&lt;p&gt;First, &lt;strong&gt;mistaking the attractor for a boundary.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Boundaries answer "what cannot be done," and violating them causes an error immediately. Attractors answer "where the system should converge in the long run." A single violation may not cause an error, but persistent deviation causes structural decay. Boundaries define forbidden zones; attractors define stability zones. Confusing the two downgrades the attractor to a stricter guardrail, missing its core capability of handling "stability under perturbation."&lt;/p&gt;

&lt;p&gt;Second, &lt;strong&gt;mistaking the attractor for a stronger guardrail.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Guardrails operate at the execution layer (checked for each action), while attractors operate at the direction layer (whether the accumulation of multiple actions trends toward it). Understanding it as stricter governance, denser constraints, or stronger auditing still reduces the primary problem to the control layer. The root of this reduction is the failure to recognize that the two belong to different levels.&lt;/p&gt;

&lt;p&gt;Third, &lt;strong&gt;mistaking the attractor for another way of saying "control target."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The phrase &lt;code&gt;control target&lt;/code&gt; seems very close, but it assumes that a control framework is already in place. Under a trajectory ontology, the attractor's role is to &lt;strong&gt;provide the final cause for control&lt;/strong&gt;—it is prior to control, not within it. If the attractor is not defined first, so-called control has no target, and mechanisms like harness, guardrail, verification, and audit have no unified meaning.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. In the nop-chaos-flux Repository, the Attractor Is First and Foremost &lt;code&gt;docs/architecture/&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;If the attractor remains only at an abstract level, it has no real engineering significance. For &lt;code&gt;nop-chaos-flux&lt;/code&gt;, what first bears the attractor is the &lt;strong&gt;owner-doc system with precedence within &lt;code&gt;docs/architecture/&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In this repository, the engineering landing point is clear: the specification definitions under &lt;code&gt;docs/architecture/&lt;/code&gt; come first, followed by convergence mechanisms like plan, verification, audit, and logs.&lt;/p&gt;

&lt;p&gt;Within &lt;code&gt;docs/architecture/&lt;/code&gt;, this "equation layer" also has a clear precedence:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;docs/architecture/README.md&lt;/code&gt; is responsible for explaining the architecture hierarchy and reading order.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;flux-design-principles.md&lt;/code&gt; handles the direction layer, explaining design intent and stable principles.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;frontend-programming-model.md&lt;/code&gt; handles the top-level specification layer, defining primitive identity, macro boundaries, and hard invariants.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;flux-core.md&lt;/code&gt; handles the current codebase-wide baseline.&lt;/li&gt;
&lt;li&gt;Narrower architecture docs define local contracts within their respective topics.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In &lt;code&gt;nop-chaos-flux&lt;/code&gt;, the structural layer of the attractor is not an abstract "correct architecture," but is defined by a small number of high-value invariants: the closed set of seven primitives, the compile-first pipeline, the Template/Instance separation, Data/Capability orthogonality, the unified renderer/hook contract, and the dependency direction &lt;code&gt;flux-core → flux-formula → flux-compiler → flux-action-core → flux-runtime → flux-react&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;These are not parallel pieces of governance material; they are structural equations fixed by owner docs. The value of architecture lies not in describing everything, but in making wrong structures unable to continue existing legitimately.&lt;/p&gt;

&lt;p&gt;It is precisely for this reason that many truly important convergence actions in this repository end up manifesting as "a certain old structure being excluded from the legitimate state space."&lt;/p&gt;

&lt;p&gt;The final removal of &lt;code&gt;CompiledSchemaNode&lt;/code&gt; is a typical example. It was not merely a refactoring cleanup; it demonstrated that once the new baseline of template/instance separation was established, the old intermediate structure, though still functional, no longer belonged to the correct structure and was thus excluded.&lt;/p&gt;

&lt;p&gt;Similarly, the three-way split of &lt;code&gt;flux-compiler&lt;/code&gt; / &lt;code&gt;flux-action-core&lt;/code&gt; / &lt;code&gt;flux-runtime&lt;/code&gt; is not simply a matter of "extracting two more packages," but a case where the attractor became more precise: the system was not just "able to run," but was further converged into a more stable responsibility structure.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. What Is Harness
&lt;/h2&gt;

&lt;p&gt;If the attractor solves "what is the direction," then harness solves:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to continuously measure, correct, and update the system's trajectory through local signals.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The term "harness" here does not mean the narrow testing harness, but a broader execution scaffold. It typically includes: context routing, separation of implementation and acceptance, planning and closure conditions, verification mechanisms, audit mechanisms, diagnostic tools, and externalized memory.&lt;/p&gt;

&lt;p&gt;In this repository, at least five layers of harness can be seen:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Routing Harness
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;docs/index.md&lt;/code&gt; and &lt;code&gt;docs/architecture/README.md&lt;/code&gt; determine: what to read first for a given problem, what is the current baseline, and what is merely analysis, plan, or history.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Plan Harness
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;docs/plans/&lt;/code&gt; addresses "how this round of expansion closes," not "what the system is."&lt;/p&gt;

&lt;p&gt;Fields like &lt;code&gt;current baseline&lt;/code&gt;, &lt;code&gt;goals / non-goals&lt;/code&gt;, &lt;code&gt;exit criteria&lt;/code&gt;, &lt;code&gt;validation checklist&lt;/code&gt;, and &lt;code&gt;closure audit evidence&lt;/code&gt; define how a local trajectory can be effectively closed.&lt;/p&gt;

&lt;p&gt;After Plan 145's closure/audit, the newly confirmed follow-ups were broken out into Plan 146. Plan 143's closure assumptions were repeatedly overturned by fresh audits until the live repo truly crossed the line and closure was allowed. Plans here are not a to-do list, but a local convergence mechanism—they don't just list "what needs to be done now," but stipulate where this round of expansion must close, what exit criteria must be met, and what independent evidence closure requires.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Verification Harness
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;lint&lt;/code&gt;, &lt;code&gt;check&lt;/code&gt;, &lt;code&gt;typecheck&lt;/code&gt;, &lt;code&gt;build&lt;/code&gt;, &lt;code&gt;test&lt;/code&gt; push high-frequency, clear, automatable deviation detection to the machine layer ahead of time.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Audit Harness
&lt;/h3&gt;

&lt;p&gt;Not all deviations can be caught by automated rules. Higher-level semantic drift, structural bias, false completion, and problems that are locally self-consistent but globally distorted still require independent auditing.&lt;/p&gt;

&lt;p&gt;Auditing itself is also a closed loop: discover deviation points, filter out conflicts and false problems, and return to the live repo for confirmation. The focus of high-quality auditing is not to pile up more problems, but to eliminate invalid problems as quickly as possible.&lt;/p&gt;

&lt;p&gt;In this repository, one of the most critical harness rules is: &lt;strong&gt;never let the same context serve as both implementer and completion judge.&lt;/strong&gt; Completion must be re-evaluated against the live repo by a fresh session or independent audit. The reason the closures of Plan 143 and Plan 145 carry weight is precisely because "completion" is not self-reported by the implementer, but comes from an independent convergence judgment.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Memory Harness
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;docs/logs/&lt;/code&gt;, &lt;code&gt;docs/bugs/&lt;/code&gt;, &lt;code&gt;docs/discussions/&lt;/code&gt; constitute cross-session externalized memory.&lt;/p&gt;

&lt;p&gt;This layer is especially important because for AI, "why that understanding is invalid" is itself part of the system's memory. It is often insufficient to retain only the final conclusion; you must also retain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which premise has been falsified&lt;/li&gt;
&lt;li&gt;Which path has been proven to diverge&lt;/li&gt;
&lt;li&gt;Which terminological translation degrades the problem&lt;/li&gt;
&lt;li&gt;Which "completed" judgment was later overturned by the live repo&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without this memory harness, the system loses a portion of its historical trajectory information each time.&lt;/p&gt;

&lt;p&gt;True closed-loop is not "define the attractor once, then execute harness forever," but "define attractor → expand → correct → update attractor → expand again." The three-way split of &lt;code&gt;flux-compiler&lt;/code&gt; / &lt;code&gt;flux-action-core&lt;/code&gt; / &lt;code&gt;flux-runtime&lt;/code&gt; is an example of the attractor being refined by practice before continuing expansion.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Why a New Attractor Is Usually Not Evolved by AI on Its Own
&lt;/h2&gt;

&lt;p&gt;Even with harness in place, you cannot expect AI to slowly evolve a new attractor on its own through high-speed iteration.&lt;/p&gt;

&lt;p&gt;At least under the training distribution and biases of current mainstream models, this generally cannot be expected to happen naturally.&lt;/p&gt;

&lt;p&gt;To be more specific:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Current mainstream AI excels at high-speed expansion and convergence around an existing attractor.&lt;/li&gt;
&lt;li&gt;However, it typically falls back to the average solution it has seen.&lt;/li&gt;
&lt;li&gt;Truly novel conceptual decompositions, boundary redefinitions, and architectural languages still require a human to propose first.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The responsibility for defining a new attractor cannot be silently outsourced to AI.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In large-scale framework development, the division of labor between humans and AI cannot be simplified to "AI writes code, humans do review." The more realistic division is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Humans define new attractors.&lt;/li&gt;
&lt;li&gt;AI performs high-speed expansion around the defined attractor.&lt;/li&gt;
&lt;li&gt;Harness continuously pulls the trajectory back on track.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Concepts like the separation of &lt;code&gt;ActionScope&lt;/code&gt; and &lt;code&gt;Data Scope&lt;/code&gt;, or lexical scoping—concepts that genuinely change the system's structural language—cannot grow by letting AI freely sample average solutions. They are new attractors that must be proposed first; only then can AI perform large-scale expansion on the new baseline.&lt;/p&gt;

&lt;p&gt;A limitation must be acknowledged: &lt;strong&gt;this means the effectiveness of this methodology depends on the presence of people within the team capable of defining attractors.&lt;/strong&gt; This is not a weakness of the methodology, but a fact it correctly identifies—architectural judgment is a scarce resource. In traditional collaboration, this judgment could partially reside in the architect's mind, transmitted through oral tradition and code review. AI has no cross-session memory; any architectural judgment not explicitly externalized does not exist for AI. The engineering contribution of this methodology is precisely to externalize this scarce resource into a &lt;strong&gt;versionable, auditable, inheritable repository structure&lt;/strong&gt; so that it does not have to leave with the individual. However, if no one on the team can make such judgments at all, the methodology cannot generate them out of thin air.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Conclusion
&lt;/h2&gt;

&lt;p&gt;The truly difficult part of large-scale AI development is not getting AI to write more code, but ensuring the system continues to converge toward the correct structure during high-speed expansion.&lt;/p&gt;

&lt;p&gt;This convergence problem has &lt;strong&gt;no positive object&lt;/strong&gt; in traditional methodologies where state is the first-class citizen—it can only be indirectly acknowledged through negative terms like "debt," "fragility," and "corrosion." For the convergence problem to become a first-class citizen object that can be expressed, discussed, and engineered, the methodology must incorporate trajectory into its foundational categories.&lt;/p&gt;

&lt;p&gt;Whoever proposes a new attractor defines the structural baseline for the system's subsequent evolution.&lt;/p&gt;

&lt;p&gt;Compressing this methodology to its core, only one line remains:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;State Space → Attractor → Trajectory → Control.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is not a more complex engineering process; it is a more fundamental engineering conceptual structure. Only with a structure defining where the system should converge in the long run can there be a judgment of whether the trajectory has deviated; only with a judgment of trajectory deviation can the subsequent harness, guardrail, verification, audit, and closure have a unified meaning.&lt;/p&gt;

&lt;p&gt;In the age of AI, what is truly scarce is not more agents that can write code, but people who can first answer the question, "Where should the system converge?"&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;nop-chaos-flux is open source:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/entropy-cloud/nop-chaos-flux" rel="noopener noreferrer"&gt;https://github.com/entropy-cloud/nop-chaos-flux&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Gitee: &lt;a href="https://gitee.com/canonical-entropy/nop-chaos-flux" rel="noopener noreferrer"&gt;https://gitee.com/canonical-entropy/nop-chaos-flux&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>aigc</category>
      <category>programming</category>
      <category>lowcode</category>
    </item>
    <item>
      <title>From Spec-Driven Development to Attractor-Guided Engineering</title>
      <dc:creator>canonical</dc:creator>
      <pubDate>Thu, 21 May 2026 11:52:48 +0000</pubDate>
      <link>https://dev.to/canonical/from-spec-driven-development-to-attractor-guided-engineering-134i</link>
      <guid>https://dev.to/canonical/from-spec-driven-development-to-attractor-guided-engineering-134i</guid>
      <description>&lt;p&gt;&lt;code&gt;nop-chaos-flux&lt;/code&gt; is a low-code runtime framework built on React 19, Zustand 5, and Vite 8. It is inspired by Baidu AMIS but independently implemented from scratch based on innovative design principles. It includes a JSON Schema compiler and runtime, as well as design tools such as a report designer and Flow Designer.&lt;/p&gt;

&lt;p&gt;The initial version of this project was completed by a single programmer in two months, developed entirely through AI automation. Unlike typical AI-assisted development, as features were continuously added, the project did not suffer from quality degradation. Instead, module boundaries became clearer, document categorization more stable, testing and auditing increasingly captured real issues, and code quality continuously improved.&lt;/p&gt;

&lt;p&gt;I recently gave some internal sharing sessions and named this practice Attractor-Guided Engineering (AGE). Later, during code reviews, I found that many people did not truly understand it. Some operated in a way close to casual vibe coding, while others adopted a spec-driven development style similar to OpenSpec, leaning overall toward task-driven, feature-by-feature development. As the workload accumulated, inconsistencies in the code steadily built up, and deviations from the architectural design became the norm.&lt;/p&gt;

&lt;p&gt;This article analyzes the differences between AGE and spec-driven development, and what ordinary business projects can learn from the large-scale AI engineering practices of &lt;code&gt;nop-chaos-flux&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Hierarchy
&lt;/h2&gt;

&lt;p&gt;At the heart of AGE lies the following conceptual hierarchy:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;State Space → Attractor → Trajectory → Control&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;State Space&lt;/strong&gt;: All possible implementation states the system can evolve into under current constraints.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Attractor&lt;/strong&gt;: The stable structure to which the system is repeatedly pulled back during long-term evolution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trajectory&lt;/strong&gt;: The actual evolutionary path preserved after each round of generation, verification, and correction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Control&lt;/strong&gt;: Various mechanisms that continuously influence the trajectory through local signals.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All possible combinations of code, documentation, and tests that the repository could evolve into under existing constraints constitute the state space. The continuous actions of humans, AI, review, CI, and document updates form the evolutionary rules. The live repo history created by the superposition of the two is the trajectory. The attractor is the stable structure to which the system is repeatedly pulled back over long-term iteration.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuegfpnvkeqol77ldzizj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuegfpnvkeqol77ldzizj.png" alt="abstractor.png" width="800" height="697"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Large-scale AI development is essentially a controlled convergence problem for a dynamical system. AI expands the state space extremely fast. The key is not to add guardrails everywhere, but to first figure out: what structure should the system be pulled back to over the long term?&lt;/p&gt;

&lt;p&gt;An attractor is not a fully written-out end point, not a roadmap, and not a "scope of permitted activity." It is a structure implicitly defined by a small set of high-order constraints: local implementations can vary, but the whole will be pulled back to the same type of form by these relationships.&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;nop-chaos-flux&lt;/code&gt;, what first defines the attractor is not the plan, lint, test, audit, or any single spec file, but the architecture docs with precedence under &lt;code&gt;docs/architecture/&lt;/code&gt;. In the following text, these architecture docs with owner and precedence are referred to as owner docs.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docs/architecture/README.md&lt;/code&gt; explicitly states: &lt;code&gt;docs/architecture/&lt;/code&gt; is the current final-state architecture baseline, &lt;code&gt;flux-design-principles.md&lt;/code&gt; is the governing-principles anchor, &lt;code&gt;frontend-programming-model.md&lt;/code&gt; holds the top-level primitives and core-boundary precedence, and other normative docs hold local precedence within their respective topics.&lt;/p&gt;

&lt;p&gt;These documents do not enumerate all correct implementations. They define a stable structure like an equation: what primitives exist, which dependency directions are legal, which owner boundaries must not be broken, and which old patterns no longer belong to the correct state space. They first define the cluster of states that can sustainably exist, so that subsequent implementation, testing, planning, and auditing have a reference.&lt;/p&gt;

&lt;p&gt;Plan, verification, audit, logs, bugs, testing all come later. They are not the attractor itself, but the harness that keeps the system trajectory continuously close to the attractor.&lt;/p&gt;

&lt;p&gt;Flux/AGE is not centered on spec evolution, but on attractor definition and trajectory convergence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real Development History
&lt;/h2&gt;

&lt;p&gt;"Architecture docs define the attractor" might sound like ordinary document governance at first, but the difference becomes clear if you carefully examine the actual development records in &lt;code&gt;docs/logs/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For example, &lt;code&gt;docs/plans/371-deep-audit-2026-05-19-owner-routing-plan.md&lt;/code&gt; is a typical entry point. It does not directly change the code, but converges the &lt;code&gt;64&lt;/code&gt; retained findings from the &lt;code&gt;2026-05-19&lt;/code&gt; deep audit into an owner-routing baseline. Each finding has a unique owner bucket, priority, successor plan, and owner-doc obligation. No ownerless items, no multiply-owned items, no silent downgrade to vague follow-ups.&lt;/p&gt;

&lt;p&gt;Its role is to first freeze how a round of deviations should be resolved, after which the subsequent execution plans close the local trajectory to concrete outcomes. &lt;code&gt;docs/plans/382-deep-audit-2026-05-19-table-and-crud-owner-state-and-event-contract-plan.md&lt;/code&gt; resolves the table/CRUD owner state and event payload: &lt;code&gt;Current Baseline&lt;/code&gt; declares the live status of explicit empty-array owner state and event payload, execution items fix the empty-array fallback, focused tests prove the result, &lt;code&gt;docs/components/table/design.md&lt;/code&gt; and &lt;code&gt;docs/components/crud/design.md&lt;/code&gt; synchronize the owner contract, and finally repo-wide &lt;code&gt;pnpm typecheck&lt;/code&gt;, &lt;code&gt;pnpm build&lt;/code&gt;, &lt;code&gt;pnpm lint&lt;/code&gt;, &lt;code&gt;pnpm test&lt;/code&gt; all pass, with the independent closure audit &lt;code&gt;ses_1bd9ed593ffeVpkho4lb4wPR6p&lt;/code&gt; recording &lt;code&gt;Verdict: acceptable&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docs/plans/388-deep-audit-2026-05-19-form-tree-widget-accessibility-plan.md&lt;/code&gt; demonstrates another type of closure: visible node roving focus, &lt;code&gt;ArrowUp&lt;/code&gt;/&lt;code&gt;ArrowDown&lt;/code&gt;/&lt;code&gt;Home&lt;/code&gt;/&lt;code&gt;End&lt;/code&gt; navigation, loading &lt;code&gt;aria-busy&lt;/code&gt;/&lt;code&gt;aria-describedby&lt;/code&gt; for input-tree and tree-select all have focused proof, but the plan explicitly rules &lt;code&gt;No owner-doc update required&lt;/code&gt;. This shows that a plan is not just a to-do list; it is also responsible for judging whether this change modifies the owner-doc baseline.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docs/plans/400-deep-audit-2026-05-19-test-harness-reliability-plan.md&lt;/code&gt; and &lt;code&gt;docs/bugs/62-e2e-shared-websocket-error-suppression-fix.md&lt;/code&gt; demonstrate the role of memory harness. The problem was not a business function failure, but that the E2E shared fixture's filter scope was too broad, filtering out real transport/runtime failures as well. The fix not only changes the code, but also adds &lt;code&gt;tests/e2e/fixtures-hard-gate.spec.ts&lt;/code&gt; to prove it now fails, and records a rule in the bug note: if future tests genuinely expect a WebSocket failure, a per-test allowance must be used, and fixture-wide suppression must not be restored.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docs/logs/2026/05-19.md&lt;/code&gt; and &lt;code&gt;docs/logs/2026/05-20.md&lt;/code&gt; are not mere daily logs. They record the focused proof of each closure slice, owner-doc rulings, repo-wide gates, independent audits, and full-green baselines.&lt;/p&gt;

&lt;p&gt;These materials form a real chain: owner docs define the long-term structure, audits discover deviations, plans route and freeze ownership, focused proof demonstrates local results, owner-doc rulings decide whether to update, logs/bugs/testing preserve cross-session memory, and closure audits re-judge completion status from the live repo.&lt;/p&gt;

&lt;p&gt;This is the harness in AGE. The goal is not to make each task appear more complete, but to make the system trajectory continuously return to the vicinity of the attractor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where OpenSpec's Structure Excels
&lt;/h2&gt;

&lt;p&gt;OpenSpec is a representative spec-driven development framework that structures a category of work well:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;openspec/specs/&lt;/code&gt; stores the behavioral specifications of current capabilities.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;openspec/changes/&lt;/code&gt; stores proposed changes, including &lt;code&gt;proposal.md&lt;/code&gt; (why change, what changes, impact), &lt;code&gt;design.md&lt;/code&gt; (technical design when necessary), and &lt;code&gt;tasks.md&lt;/code&gt; (implementation checklist).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;changes/&amp;lt;name&amp;gt;/specs/&lt;/code&gt; records spec deltas using &lt;code&gt;ADDED/MODIFIED/REMOVED/RENAMED&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Archive applies the deltas back to the main specs through fixed rules.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This mechanism lowers the cost of updating specifications. OpenSpec does not require the AI to freely understand the entire requirement and then arbitrarily modify documents each time. Instead, it uses fixed sections, requirement header matching, and delta application to merge structured changes back into the main specs. This approach is well-suited for scenarios where behavioral specifications are clear and need to be parseable, archivable, and re-writable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where OpenSpec Is Limited
&lt;/h2&gt;

&lt;p&gt;OpenSpec's spec format (Requirement, Scenario, SHALL/MUST, delta sections) is tool-parseable friendly, but is not flexible enough as a way to organize general project knowledge.&lt;/p&gt;

&lt;p&gt;A lot of repository knowledge does not naturally grow into requirement/scenario form:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Architecture hierarchy and precedence.&lt;/li&gt;
&lt;li&gt;History of terminology misunderstandings.&lt;/li&gt;
&lt;li&gt;External research materials (PPT, discussion records).&lt;/li&gt;
&lt;li&gt;Analysis conclusions from a source code audit.&lt;/li&gt;
&lt;li&gt;Phenomena discovered through manual testing.&lt;/li&gt;
&lt;li&gt;The elimination path of a complex bug.&lt;/li&gt;
&lt;li&gt;Why a plan cannot be closed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If everything must first be translated into a spec/change to gain an official place, the conversion cost is high, and the original context is also lost. External documents, discussion records, analysis reports, and bug retrospectives could directly become repository memory. Forcing them into requirement/scenario format tends to flatten the information.&lt;/p&gt;

&lt;p&gt;In terms of execution verification, the two reflect different tool philosophies. OpenSpec's &lt;code&gt;tasks.md&lt;/code&gt; is a checklist; &lt;code&gt;/opsx:verify&lt;/code&gt; is an optional agent verification skill (requires manually enabling expanded workflows). &lt;code&gt;archive&lt;/code&gt; checks task status and prompts about risks, but can still proceed after user confirmation—strict closure is left to the team's own conventions.&lt;/p&gt;

&lt;p&gt;Flux plan, on the other hand, bakes independent closure audit in as a required step: you must start from the current baseline, write clear &lt;code&gt;Goals&lt;/code&gt;, &lt;code&gt;Non-Goals&lt;/code&gt;, execution items (each annotated with &lt;code&gt;Fix&lt;/code&gt;/&lt;code&gt;Decision&lt;/code&gt;/&lt;code&gt;Proof&lt;/code&gt;), and &lt;code&gt;Closure Gates&lt;/code&gt;; before marking &lt;code&gt;completed&lt;/code&gt;, an independent sub-agent or independent reviewer must go back to the live repo and perform a closure audit. &lt;code&gt;docs/plans/361-slot-contract-host-manifest-and-owner-doc-closure-plan.md&lt;/code&gt; puts together the current baseline, the finding ownership matrix, execution phases, closure gates, the deferred items that have been ruled on, and independent review evidence. This is not a checklist, but an execution contract that strictly defines closure conditions and requires independent audit. &lt;strong&gt;It emphasizes not what was done, but to what standard something counts as truly landed.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Spec-Driven Easily Becomes Task-Oriented
&lt;/h2&gt;

&lt;p&gt;The default structure of spec-driven development easily pulls the attention of both humans and AI back to "how to complete this change."&lt;/p&gt;

&lt;p&gt;A change typically has a proposal, design, tasks, and delta specs. This is much better than verbal requirements, but it is naturally organized around one change: why change, what to change, how to do it, which checklist items are done. Over time, spec-driven development can easily become a more formal task dispatch system.&lt;/p&gt;

&lt;p&gt;This task orientation has a hidden risk: specs are updated, tasks are checked, archive is done, and both AI and humans get a strong sense of completion. But whether the system is truly closer to the long-term structure is not proven by the change itself. It must be verified by looking back at the architecture docs, the live repo, tests, logs, and independent audits.&lt;/p&gt;

&lt;p&gt;If one tries to long-term maintain specs to the level of precision in Flux, the cost is usually higher. What Flux maintains is not a single specification tree, but a set of repository memories with different responsibilities: architecture docs define the attractor, plans define local trajectory closure, logs record evolution, bugs preserve complex defect diagnosis, testing preserves manual findings, analysis preserves research judgments, and audit is responsible for looking back at the live repo. Cramming all of this into a spec/change structure incurs continuous conversion cost.&lt;/p&gt;

&lt;p&gt;Spec-driven can serve as a local harness within AGE to manage behavioral spec evolution. But it should not replace architecture docs, nor should it replace the separate repository memories of plan closure, logs, bugs, testing, and audit.&lt;/p&gt;

&lt;h2&gt;
  
  
  What If You Just Need to Look Up an Owner Doc?
&lt;/h2&gt;

&lt;p&gt;This reveals a fundamental difference between the two approaches.&lt;/p&gt;

&lt;p&gt;If, in Flux, you simply want to check the current owner contract of the renderer runtime, you can directly route from &lt;code&gt;docs/index.md&lt;/code&gt; to &lt;code&gt;docs/architecture/renderer-runtime.md&lt;/code&gt; and the relevant references. You do not need to create a change, do not need a proposal, do not need tasks, and do not need to rewrite the question into a spec delta.&lt;/p&gt;

&lt;p&gt;If it's just research, it might go into &lt;code&gt;docs/analysis/&lt;/code&gt;. If it's just a discovery from manual testing, it goes into &lt;code&gt;docs/testing/&lt;/code&gt; first. If it's a complex bug, it goes into &lt;code&gt;docs/bugs/&lt;/code&gt;. If it's an execution closure, then a plan is written. A stable baseline change then goes back to the owner doc.&lt;/p&gt;

&lt;p&gt;Flux's document organization is free but not arbitrary. Free means: it does not force all knowledge to first enter the same artifact workflow. Constraint means: each type of material has a clear responsibility and cannot arbitrarily compete for factual status.&lt;/p&gt;

&lt;p&gt;OpenSpec's organization is more structured. It is good at putting proposed behavioral changes into a change package and then writing spec deltas back to main specs. But general repository knowledge routing is not the main problem it aims to solve by default.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tasks Are Not Plans
&lt;/h2&gt;

&lt;p&gt;OpenSpec's &lt;code&gt;tasks.md&lt;/code&gt; does not correspond to Flux's &lt;code&gt;plans&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;tasks.md&lt;/code&gt; at most corresponds to the execution checklist fragment inside a Flux plan, or the todo list of the current session. It can help AI avoid missing steps, but it does not answer these questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is the current live repo baseline?&lt;/li&gt;
&lt;li&gt;What is explicitly not being done this time?&lt;/li&gt;
&lt;li&gt;What evidence can prove it is truly complete?&lt;/li&gt;
&lt;li&gt;Which defects cannot be downgraded to follow-ups?&lt;/li&gt;
&lt;li&gt;Who independently verifies the completion status?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The value of a Flux plan is not in "having more tasks," but in it being a closure contract for a local trajectory.&lt;/p&gt;

&lt;p&gt;So tasks are necessary for AI, but tasks are not the source of truth. &lt;code&gt;- [x]&lt;/code&gt; only indicates that the executor claims an item is complete. The real proof must return to the current code, tests, owner docs, and independent review.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources of Change Go Beyond Spec Changes
&lt;/h2&gt;

&lt;p&gt;OpenSpec's path is very clear: organize behavioral spec evolution around specs and changes.&lt;/p&gt;

&lt;p&gt;Flux's sources of change are broader:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;New requirements raised by users.&lt;/li&gt;
&lt;li&gt;Architectural drift discovered by reading source code.&lt;/li&gt;
&lt;li&gt;Owner boundary problems discovered by audits.&lt;/li&gt;
&lt;li&gt;Interaction problems exposed by testing issues.&lt;/li&gt;
&lt;li&gt;Historical regression risks recorded in bug notes.&lt;/li&gt;
&lt;li&gt;Design judgments derived from external research or analysis.&lt;/li&gt;
&lt;li&gt;A plan closure audit overturning a previous judgment of "completed."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These sources should not all be transformed into spec deltas first. They can first land in analysis, testing, bugs, logs, plans, or directly update architecture docs. Whether they ultimately need to become a behavioral contract depends on whether they are part of the long-term baseline.&lt;/p&gt;

&lt;p&gt;This is the significance of Flux's organizational freedom in documentation. Information from different sources first stops at different positions, rather than being shoved entirely into a single spec evolution channel.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Files-In, Files-Out Matters
&lt;/h2&gt;

&lt;p&gt;I have emphasized many times in sharing sessions that a best practice for AI-driven development is files-in, files-out. This is not just documentation fastidiousness—the attractor and the harness need a physical carrier.&lt;/p&gt;

&lt;p&gt;Files-in: do not leave input only in the chat window. Even if the content is messy, first write it to a requirements file, analysis file, or plan file, and then &lt;code&gt;@&lt;/code&gt; this file in OpenCode.&lt;/p&gt;

&lt;p&gt;Files-out: do not end with output just printed in the window. Important conclusions, analyses, plans, test records, bug diagnoses, and architectural constraints are all written into &lt;code&gt;docs/&lt;/code&gt;, categorized by responsibility:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Architecture rules → &lt;code&gt;docs/architecture/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Change closures → &lt;code&gt;docs/plans/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Execution trajectory → &lt;code&gt;docs/logs/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Manual testing findings → &lt;code&gt;docs/testing/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Complex defect diagnosis → &lt;code&gt;docs/bugs/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Research judgments → &lt;code&gt;docs/analysis/&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The point is not "write more documents." Once output is categorized and persisted, it enters the repository memory. The chat window is temporary context; files are the repository memory.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code Is the Current Implementation Fact, Not the Only Fact
&lt;/h2&gt;

&lt;p&gt;Code is the source of truth for the current implementation. Types and tests protect the current behavior. The architecture owner docs with precedence define the attractor—the structure the system should converge to over the long term. Logs, bugs, analysis, and testing record the trajectory and externalize memory.&lt;/p&gt;

&lt;p&gt;These do not conflict. Conflicts arise in two situations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When documents start regurgitating implementation details that easily rot.&lt;/li&gt;
&lt;li&gt;When the completed state of a document is taken as proof that the code is already correct.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;OpenSpec's behavior-first boundary actually avoids the first problem to some extent: behavioral specs should write verifiable behavior, not internal implementation details. Flux further emphasizes the second problem: even if the document describes the correct behavior, it cannot replace the verification of the current repository. True closure must return to code, tests, owner docs, logs, and audit evidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real Difference
&lt;/h2&gt;

&lt;p&gt;What OpenSpec solves: how to use structured specs/changes/delta/archive to organize the update of behavioral specifications, focusing on the evolution flow of specs.&lt;/p&gt;

&lt;p&gt;What AGE solves: when AI rapidly expands the state space, how the system first defines an attractor, and then uses harnesses such as plan, verification, audit, logs, bugs, analysis, and testing to make the trajectory continuously converge.&lt;/p&gt;

&lt;p&gt;The two tools solve problems at different levels. OpenSpec's strength is the structured specification workflow. Flux/AGE's strength is using architecture owner docs with precedence to define the attractor, and then using free but responsibility-bounded document routing and a strict closure harness to make the repository converge over the long term.&lt;/p&gt;

&lt;p&gt;Moving from spec-driven development to Attractor-Guided Engineering is not moving from "writing specs" back to "not writing specs," but moving from "organizing changes into spec updates" toward "defining where the system should converge over the long term, and making every round of AI generation continuously pulled back by this structure."&lt;/p&gt;

&lt;h2&gt;
  
  
  What Ordinary Projects Can Directly Adopt
&lt;/h2&gt;

&lt;p&gt;There is no need to copy the full governance of Flux.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First, files-in, files-out.&lt;/strong&gt; Write input into a file first before &lt;code&gt;@&lt;/code&gt;-ing it to AI; output goes into &lt;code&gt;docs/&lt;/code&gt;, not left only in the chat window. This step takes just a few minutes, but it gives AI traceable repository memory instead of relying on conversational context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Second, write an architecture document for the core business that defines the business attractor.&lt;/strong&gt; Do not write a code guide. Instead, write down the sources of truth, state transitions, ownership boundaries, and common misunderstandings.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Third, write lightweight plans for complex changes.&lt;/strong&gt; Include the current baseline, goals, what is not being done, an execution checklist, proof items, and closure conditions. Before completion, have an independent session or independent reviewer re-verify.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fourth, turn recurring problems into repository memory.&lt;/strong&gt; Manual issues go into testing, complex bugs go into bugs, research conclusions go into analysis, and high-frequency errors go into audit scripts.&lt;/p&gt;

&lt;p&gt;Specification updates are a necessary layer. System convergence still needs an attractor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;nop-chaos-flux is open source:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/entropy-cloud/nop-chaos-flux" rel="noopener noreferrer"&gt;https://github.com/entropy-cloud/nop-chaos-flux&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Gitee: &lt;a href="https://gitee.com/canonical-entropy/nop-chaos-flux" rel="noopener noreferrer"&gt;https://gitee.com/canonical-entropy/nop-chaos-flux&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>aigc</category>
      <category>programming</category>
      <category>typescript</category>
    </item>
    <item>
      <title>NOP Chaos Flux Architecture Evolution: Rewriting from AMIS to a Modern Low-Code Runtime</title>
      <dc:creator>canonical</dc:creator>
      <pubDate>Tue, 19 May 2026 12:57:52 +0000</pubDate>
      <link>https://dev.to/canonical/nop-chaos-flux-architecture-evolution-rewriting-from-amis-to-a-modern-low-code-runtime-3nk2</link>
      <guid>https://dev.to/canonical/nop-chaos-flux-architecture-evolution-rewriting-from-amis-to-a-modern-low-code-runtime-3nk2</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This article is based on the development logs under &lt;code&gt;docs/logs/2026/&lt;/code&gt; (2026-03-20 to 2026-05-03), sorting out the architectural decisions, module splits, performance optimizations, and platform evolution of the entire framework from zero to maturity. Each phase includes key code paths and document links for traceability.&lt;/p&gt;

&lt;p&gt;This article is a collation of historical evolution and implementation trajectory, not a current normative owner doc. For judgments involving current primitive boundaries, action execution model, resource publishing contracts, template instantiation, or package boundaries, the current owner docs and live code pointed to by &lt;code&gt;docs/architecture/README.md&lt;/code&gt; shall prevail.&lt;/p&gt;

&lt;p&gt;The "key path" filenames appearing in the text are recorded according to the repository state at that time; some paths may have been moved, split, or deleted today and should not be used as current entry indexes.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Preface: Source of Design Ideas
&lt;/h2&gt;

&lt;p&gt;The core design ideas of Flux were not discovered gradually during implementation, but were established as early as the AMIS theory research phase. The two articles under &lt;code&gt;nop-entropy/docs/theory/amis/&lt;/code&gt; — &lt;a href="https://zhuanlan.zhihu.com/p/599773955" rel="noopener noreferrer"&gt;Why Baidu AMIS Framework is an Excellent Design&lt;/a&gt; and &lt;a href="https://zhuanlan.zhihu.com/p/601375558" rel="noopener noreferrer"&gt;Revisiting Baidu AMIS Framework and Declarative Programming&lt;/a&gt; — laid the theoretical foundation for the entire project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Env environment abstraction&lt;/strong&gt;: AMIS's &lt;code&gt;env&lt;/code&gt; object virtualizes all I/O operations, making &lt;code&gt;output = AmisPage(Input)&lt;/code&gt; possible. Flux's &lt;code&gt;RendererEnv&lt;/code&gt; is a modern implementation of this idea.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Api and value/function duality&lt;/strong&gt;: The Api object is a Ref encapsulation of remote async calls, essentially an asynchronous upgrade of &lt;code&gt;computed&lt;/code&gt;. Flux's Resource (&lt;code&gt;data-source&lt;/code&gt;) primitive directly inherits this idea.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data chain = lexical scope&lt;/strong&gt;: AMIS's data chain is essentially lexical scope lookup at the DSL level. Flux's &lt;code&gt;ScopeRef&lt;/code&gt; chain structure is a compile-time enhancement of this model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;xui:import&lt;/code&gt; action modularization&lt;/strong&gt;: The &lt;code&gt;xui:import&lt;/code&gt; attribute introduced by the Nop platform for AMIS injects external function libraries into the action system by lexical scope. Flux's &lt;code&gt;xui:imports&lt;/code&gt; + &lt;code&gt;ActionScope&lt;/code&gt; is a complete compile-time implementation of this mechanism.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Declarative first&lt;/strong&gt;: From imperative DOM manipulation to reactive data binding to compiled artifact execution — each step increases the proportion of declarativeness. Flux's compile-first principle is the endpoint of this evolution.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Therefore, the architectural evolution of Flux is not "discovering principles during design" but "systematically implementing established principles on a modern technology stack (React 19, Zustand, TypeScript 6.0)". The evolution history records split decisions, performance breakthrough bottlenecks, and contract refinements on the implementation path, not swings in design direction.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Most Fundamental Shift: From Runtime Interpretation to Compile-Time Execution
&lt;/h3&gt;

&lt;p&gt;The above principles answer "what to design"; the most fundamental implementation shift throughout the evolution is "how to execute":&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AMIS is essentially a runtime interpreter&lt;/strong&gt; — takes a JSON schema, reads and executes it on the fly. Data chain is looked up at runtime, actions are dispatched at runtime, validation is triggered at runtime, field visibility is judged at runtime. All design principles operate at the runtime level.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Flux inserts a compilation phase between DSL and runtime&lt;/strong&gt;, moving forward various categories of AMIS runtime behavior into compiled artifacts:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;AMIS Runtime Behavior&lt;/th&gt;
&lt;th&gt;Flux Compiled Artifact&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Runtime type judgment of values&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;CompiledValueNode&lt;/code&gt; five static node types&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Runtime traversal of schema structure&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;TemplateNode&lt;/code&gt; immutable graph (compile once, instantiate multiple times)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Runtime resolution of actions&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;CompiledActionProgram&lt;/code&gt; / &lt;code&gt;CompiledActionNode&lt;/code&gt; IR&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Runtime wiring of host contracts&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;CapabilityProjectionManifest&lt;/code&gt; compile-time visible and verifiable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Runtime exposure of schema problems&lt;/td&gt;
&lt;td&gt;Compile-time diagnostics (unknown attributes, contract shape validation)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This shift was not completed at once but runs through the entire evolution process as the main thread: from value compilation (03-25) to template instantiation (04-07) to action pre-compilation (04-20) to compiler package extraction (04-21) — each step is a milestone on the same path of "moving runtime judgment forward to compile time". The final three-layer split of &lt;code&gt;flux-compiler&lt;/code&gt; / &lt;code&gt;flux-action-core&lt;/code&gt; / &lt;code&gt;flux-runtime&lt;/code&gt; is the physical form of this shift: the compiler is responsible for producing immutable artifacts, and the runtime only consumes and instantiates them.&lt;/p&gt;




&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Phase 1: Core Concept Establishment and Package Structure Setup&lt;/li&gt;
&lt;li&gt;Phase 2: Flow Designer from Proof of Concept to Production-Grade&lt;/li&gt;
&lt;li&gt;Phase 3: Renaming, Styling System, and Component Migration&lt;/li&gt;
&lt;li&gt;Phase 4: Complex Renderers and Architecture Audit&lt;/li&gt;
&lt;li&gt;Phase 5: Code Audit and Quality Convergence&lt;/li&gt;
&lt;li&gt;Phase 6: Runtime Architecture Convergence and Performance Optimization&lt;/li&gt;
&lt;li&gt;Phase 7: Frontend Programming Model Finalization and In-depth Design&lt;/li&gt;
&lt;li&gt;Phase 8: Template Instantiation and Node Identity System&lt;/li&gt;
&lt;li&gt;Phase 9: Deep Audit, Performance Optimization, and Architecture Convergence&lt;/li&gt;
&lt;li&gt;Phase 10: Compiler Independence and Package Boundary Hardening&lt;/li&gt;
&lt;li&gt;Phase 11: Comprehensive Quality Convergence and Host Maturity&lt;/li&gt;
&lt;li&gt;Key Principles of Architectural Evolution&lt;/li&gt;
&lt;li&gt;Appendix: Timeline Overview&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  1. Phase 1: Core Concept Establishment and Package Structure Setup
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;: 2026-03-20 ~ 2026-03-23&lt;/p&gt;

&lt;p&gt;On 03-20, systematic bug analysis and first-round fixes of the early Flux runtime were completed (dual-state desynchronization, concurrent submit race, validation coverage, etc.). On the same day, &lt;code&gt;@nop-chaos/amis-debugger&lt;/code&gt; (later renamed &lt;code&gt;nop-debugger&lt;/code&gt;) was created, positioned from the start as an AI-first structured diagnostic tool.&lt;/p&gt;

&lt;h3&gt;
  
  
  1.1 Action Scope and Import Semantics
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;docs/architecture/action-scope-and-imports.md&lt;/code&gt; established one of the most core conceptual layers of Flux:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;ScopeRef&lt;/code&gt;&lt;/strong&gt; is a pure data scope, only carrying data reads/writes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;ActionScope&lt;/code&gt;&lt;/strong&gt; is a capability scope, carrying namespaced actions and imported library capabilities.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;xui:import&lt;/code&gt;&lt;/strong&gt; is declarative import semantics (order-independent, repeatable, deduplicated by normalized key), not execution order semantics.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The dispatch path is fixed as: &lt;code&gt;built-in → component:&amp;lt;method&amp;gt; → namespaced action&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  1.2 Flow Designer Package Creation
&lt;/h3&gt;

&lt;p&gt;The two packages &lt;code&gt;@nop-chaos/flow-designer-core&lt;/code&gt; and &lt;code&gt;@nop-chaos/flow-designer-renderers&lt;/code&gt; were created in this phase. Core contains the pure graph runtime (&lt;code&gt;GraphDocument&lt;/code&gt;, &lt;code&gt;GraphNode&lt;/code&gt;, &lt;code&gt;GraphEdge&lt;/code&gt;, &lt;code&gt;DesignerConfig&lt;/code&gt;), and Renderers contains renderer definitions for &lt;code&gt;designer-page&lt;/code&gt;, &lt;code&gt;designer-field&lt;/code&gt;, &lt;code&gt;designer-canvas&lt;/code&gt;, &lt;code&gt;designer-palette&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  1.3 Collaborative Documentation System
&lt;/h3&gt;

&lt;p&gt;The complexity of Flow Designer gave birth to a layered documentation system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;docs/architecture/flow-designer/design.md&lt;/code&gt; — target architecture&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;docs/architecture/flow-designer/runtime-snapshot.md&lt;/code&gt; — current implementation snapshot&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;docs/architecture/flow-designer/collaboration.md&lt;/code&gt; — runtime collaboration boundaries&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;docs/architecture/flow-designer/canvas-adapters.md&lt;/code&gt; — canvas adapter boundaries&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Key decision&lt;/strong&gt;: Split documentation into "target state" and "snapshot state" to avoid confusion between target architecture and current implementation.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Key paths: &lt;code&gt;packages/flux-runtime/src/action-runtime.ts&lt;/code&gt;, &lt;code&gt;packages/flow-designer-core/src/core.ts&lt;/code&gt;, &lt;code&gt;docs/architecture/action-scope-and-imports.md&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  2. Phase 2: Flow Designer from Proof of Concept to Production-Grade
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;: 2026-03-23 ~ 2026-03-27&lt;/p&gt;

&lt;h3&gt;
  
  
  2.1 Canvas Bridge Pattern
&lt;/h3&gt;

&lt;p&gt;Introduced the &lt;code&gt;DesignerCardCanvasBridge&lt;/code&gt; contract, abstracting canvas interactions (select, delete, move, connect, reconnect, viewport sync) as bridge callbacks, allowing the card canvas and XYFlow canvas to share the same command adapter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Renderer UI Events → Bridge Callbacks → Command Adapter → Core Mutations
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key decision&lt;/strong&gt;: Replacing the canvas renderer does not require reintroducing direct graph mutation paths. All mutations go through the shared command adapter.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.2 Command Adapter
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;designer-command-adapter.ts&lt;/code&gt; introduced a target-side command normalization layer, providing a unified result shape of &lt;code&gt;ok&lt;/code&gt;/&lt;code&gt;snapshot&lt;/code&gt;/&lt;code&gt;data&lt;/code&gt;/&lt;code&gt;error&lt;/code&gt;/&lt;code&gt;reason&lt;/code&gt;. Both Provider and canvas bridge dispatch commands through this surface, avoiding fragmented semantic rejection logic.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.3 Schema-Driven Designer
&lt;/h3&gt;

&lt;p&gt;Flow Designer completed the migration from hardcoded React components to JSON configuration-driven. Node/edge rendering is defined through the &lt;code&gt;body: SchemaInput&lt;/code&gt; field, allowing complex node appearances to be composed using AMIS schemas such as &lt;code&gt;flex&lt;/code&gt;, &lt;code&gt;container&lt;/code&gt;, &lt;code&gt;tpl&lt;/code&gt;, &lt;code&gt;icon&lt;/code&gt;. &lt;code&gt;classAliases&lt;/code&gt; and &lt;code&gt;themeStyles&lt;/code&gt; enable theme customizability.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.4 Production-Grade Visual Alignment
&lt;/h3&gt;

&lt;p&gt;Completed visual alignment with the &lt;code&gt;flow-editor-static.html&lt;/code&gt; prototype, unifying node two-line semantics, selection states, palette icon chips, quick action buttons, edge/label tokens, minimap anchor positions, etc.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Key paths: &lt;code&gt;packages/flow-designer-renderers/src/canvas-bridge.tsx&lt;/code&gt;, &lt;code&gt;packages/flow-designer-renderers/src/designer-command-adapter.ts&lt;/code&gt;, &lt;code&gt;apps/playground/src/schemas/workflow-designer-schema.json&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  3. Phase 3: Renaming, Styling System, and Component Migration
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;: 2026-03-25 ~ 2026-03-29&lt;/p&gt;

&lt;h3&gt;
  
  
  3.1 AMIS → Flux Renaming
&lt;/h3&gt;

&lt;p&gt;Comprehensively migrated package references and documentation from the AMIS namespace to the Flux namespace:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;amis-schema&lt;/code&gt; → &lt;code&gt;flux-core&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;amis-runtime&lt;/code&gt; → &lt;code&gt;flux-runtime&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;amis-react&lt;/code&gt; → &lt;code&gt;flux-react&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;amis-debugger&lt;/code&gt; → &lt;code&gt;nop-debugger&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Window global variables renamed from &lt;code&gt;__NOP_AMIS_*&lt;/code&gt; to &lt;code&gt;__NOP_FLUX_*&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3.2 flux-core Modular Split
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;packages/flux-core/src/index.ts&lt;/code&gt; (1183 lines) was split into a modular structure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;types.ts&lt;/code&gt; (687 lines) — all type definitions&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;validation-model.ts&lt;/code&gt; (174 lines) — validation model functions&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;utils/object.ts&lt;/code&gt; — object utilities&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;utils/path.ts&lt;/code&gt; — path utilities&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;utils/schema.ts&lt;/code&gt; — schema utilities&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;constants.ts&lt;/code&gt; — constants&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3.3 Styling System Established
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;docs/architecture/styling-system.md&lt;/code&gt; established a TailwindCSS-first styling solution:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Semantic attributes&lt;/strong&gt; (&lt;code&gt;direction&lt;/code&gt;, &lt;code&gt;gap&lt;/code&gt;, &lt;code&gt;align&lt;/code&gt;) as syntactic sugar for Tailwind classes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;classAliases&lt;/code&gt;&lt;/strong&gt; mechanism for reusable Tailwind class definitions, supporting nested alias expansion and scope inheritance&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Layout renderers only emit marker classes&lt;/strong&gt; (&lt;code&gt;nop-container&lt;/code&gt;, &lt;code&gt;nop-flex&lt;/code&gt;), marker classes carry no visual styling&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Spacing explicitly declared in schema via &lt;code&gt;stack-*&lt;/code&gt;/&lt;code&gt;hstack-*&lt;/code&gt; aliases&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3.4 shadcn/ui Migration
&lt;/h3&gt;

&lt;p&gt;Created &lt;code&gt;@nop-chaos/ui&lt;/code&gt; package, based on the shadcn/ui component library pattern (class-variance-authority + tailwind-merge + lucide-react), migrating the underlying layer from radix-ui to base-ui:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Button, Input as first migrated components&lt;/li&gt;
&lt;li&gt;Gradually covering the full component set: Textarea, Checkbox, Switch, RadioGroup, Select, Dialog, Tabs, Table, Card, etc.&lt;/li&gt;
&lt;li&gt;First batch of renderers (Button, Input, Form) migrated to &lt;code&gt;@nop-chaos/ui&lt;/code&gt;, subsequent renderers follow in batches&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3.5 RendererComponentProps Contract
&lt;/h3&gt;

&lt;p&gt;Established the &lt;code&gt;RendererComponentProps&lt;/code&gt; pattern that all renderers must follow:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Data Source&lt;/th&gt;
&lt;th&gt;Provides&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;props.props&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Compiled runtime values&lt;/td&gt;
&lt;td&gt;Schema-driven values&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;props.meta&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Compiled metadata&lt;/td&gt;
&lt;td&gt;Control state&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;props.regions&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Pre-compiled child render handles&lt;/td&gt;
&lt;td&gt;Render child fragments&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;props.events&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Runtime event handlers&lt;/td&gt;
&lt;td&gt;Event binding&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;props.helpers&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Stable runtime helpers&lt;/td&gt;
&lt;td&gt;dispatch, evaluate&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  3.6 FieldFrame and Renderer Wrapping Contract
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;FieldFrame&lt;/code&gt; component was introduced into the &lt;code&gt;flux-react&lt;/code&gt; layer to uniformly handle form label/error/hint wrapping. The &lt;code&gt;RendererDefinition.wrap&lt;/code&gt; flag lets &lt;code&gt;NodeRenderer&lt;/code&gt; automatically add labels and error displays for renderers that need field wrapping.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.7 Report Designer and Spreadsheet Migration
&lt;/h3&gt;

&lt;p&gt;Migrated four packages from &lt;code&gt;nop-chaos-next&lt;/code&gt; into the workspace (completed 03-25):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;@nop-chaos/spreadsheet-core&lt;/code&gt; / &lt;code&gt;spreadsheet-renderers&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@nop-chaos/report-designer-core&lt;/code&gt; / &lt;code&gt;report-designer-renderers&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Integrated workspace configuration (tsconfig references, path aliases, Vite aliases), fixed runtime/test issues, ensured all tests pass.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.8 testid and Architecture Consistency
&lt;/h3&gt;

&lt;p&gt;On 03-29, added the &lt;code&gt;testid&lt;/code&gt; field to &lt;code&gt;BaseSchema&lt;/code&gt;, propagated through the compilation→parsing pipeline, all production renderers apply &lt;code&gt;data-testid&lt;/code&gt; to the root element. On the same day, completed an architecture consistency audit, discovering issues such as implicit layout injection by renderers, validation trigger semantic drift, theme token naming drift, etc., and established a two-phase fix strategy.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Key paths: &lt;code&gt;packages/ui/src/&lt;/code&gt;, &lt;code&gt;docs/architecture/styling-system.md&lt;/code&gt;, &lt;code&gt;packages/flux-react/src/field-frame.tsx&lt;/code&gt;, &lt;code&gt;packages/spreadsheet-renderers/src/&lt;/code&gt;, &lt;code&gt;packages/report-designer-renderers/src/&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  4. Phase 4: Complex Renderers and Architecture Audit
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;: 2026-03-28 ~ 2026-03-31&lt;/p&gt;

&lt;h3&gt;
  
  
  4.1 Full shadcn/ui Migration
&lt;/h3&gt;

&lt;p&gt;On 03-28, completed the full migration of the shadcn/ui component library. The &lt;code&gt;@nop-chaos/ui&lt;/code&gt; package expanded to cover the full suite of components including Inputs/fields, Overlay, Layout/feedback, etc. Flow Designer, form renderers, code editor, etc., fully switched to shadcn/ui components.&lt;/p&gt;

&lt;h3&gt;
  
  
  4.2 Code Editor Package
&lt;/h3&gt;

&lt;p&gt;On 03-30, &lt;code&gt;@nop-chaos/flux-code-editor&lt;/code&gt; was created based on CodeMirror 6, unifying the expression editor and SQL editor. Features include: support for 8 languages, expression/SQL completion, expression validation, friendly name tagging, template mode, fullscreen toggle, light/dark themes. Subsequently on 03-31, SQL enhancements (formatting, snippet templates, variable panel, SQL execution result preview) were completed.&lt;/p&gt;

&lt;h3&gt;
  
  
  4.3 Condition Builder
&lt;/h3&gt;

&lt;p&gt;On 03-30, a complete &lt;code&gt;condition-builder&lt;/code&gt; renderer was implemented in &lt;code&gt;flux-renderers-form&lt;/code&gt;, supporting embedded/selector mode, AND/OR/NOT logic, field search, grouping, unique fields, nested groups, custom operators.&lt;/p&gt;

&lt;h3&gt;
  
  
  4.4 Word Editor Package
&lt;/h3&gt;

&lt;p&gt;On 03-31, &lt;code&gt;@nop-chaos/word-editor-core&lt;/code&gt; (framework-agnostic bridge layer with zero React dependencies + Store) and &lt;code&gt;@nop-chaos/word-editor-renderers&lt;/code&gt; (EditorCanvas, RibbonToolbar, FontControls, WordEditorPage) were created. Integrated &lt;code&gt;@hufe921/canvas-editor&lt;/code&gt; as the canvas rendering engine, with template expressions stored as hyperlinks. On the same day, completed Phase 1 basic editor integration and Phase 1~4 toolbar controls.&lt;/p&gt;

&lt;h3&gt;
  
  
  4.5 Architecture Audit
&lt;/h3&gt;

&lt;p&gt;On 03-31, conducted a comprehensive audit of core packages (flux-core, flux-runtime, flux-react, flux-formula, 3 renderer packages), analyzing approximately 32,000 lines of non-test source code. Findings: flux-core's design is correct (it is a base package containing shared pure utilities, not a pure types package), form-runtime has been decomposed into 10 sub-modules, and the dependency flow is clean.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Key paths: &lt;code&gt;packages/ui/src/&lt;/code&gt;, &lt;code&gt;packages/flux-code-editor/src/&lt;/code&gt;, &lt;code&gt;packages/word-editor-core/src/&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  5. Phase 5: Code Audit and Quality Convergence
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;: 2026-04-01 ~ 2026-04-03&lt;/p&gt;

&lt;h3&gt;
  
  
  5.1 Code Audit Fix Plan (Plan #25)
&lt;/h3&gt;

&lt;p&gt;Executed 14 fixes covering 8 packages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Build hygiene&lt;/strong&gt;: Removed stale tsconfig include paths, created &lt;code&gt;scripts/verify-no-src-artifacts.mjs&lt;/code&gt; CI guard&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logical correctness&lt;/strong&gt;: Fixed Flow Designer &lt;code&gt;allowMultiEdge&lt;/code&gt; logic error, unified &lt;code&gt;executeApiObject()&lt;/code&gt; request pipeline&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Defensive fixes&lt;/strong&gt;: Wrapped &lt;code&gt;NodeRenderer&lt;/code&gt; with &lt;code&gt;React.memo&lt;/code&gt;, added boundary protection for &lt;code&gt;evaluateArray&lt;/code&gt;/&lt;code&gt;evaluateObject&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance optimizations&lt;/strong&gt;: API cache LRU eviction, Proxy cache WeakMap&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5.2 Comprehensive Code Overhaul (Plan #27)
&lt;/h3&gt;

&lt;p&gt;Executed comprehensive code overhaul including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Render phase remains side-effect free&lt;/li&gt;
&lt;li&gt;Form path state &lt;code&gt;relatedPaths&lt;/code&gt; fix&lt;/li&gt;
&lt;li&gt;Extracted shared hook for form field controller&lt;/li&gt;
&lt;li&gt;Dynamic renderer API payload validation&lt;/li&gt;
&lt;li&gt;Changed root component registry from module-level mutable state to instance-level state&lt;/li&gt;
&lt;li&gt;Added change detection to &lt;code&gt;ScopeRef.merge()&lt;/code&gt; method&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5.3 Data Source Redesign
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;DataSourceSchema&lt;/code&gt; removed the &lt;code&gt;body&lt;/code&gt; region, instead injecting data into the current scope. If &lt;code&gt;dataPath&lt;/code&gt; is set, the response is written to &lt;code&gt;scope[dataPath]&lt;/code&gt;; otherwise, the response is merged as a plain object into the current scope.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.4 useOwnScopeSelector Dual Hooks and Full Adoption of @nop-chaos/ui
&lt;/h3&gt;

&lt;p&gt;On 04-03, &lt;code&gt;flux-react&lt;/code&gt; exposed &lt;code&gt;useOwnScopeSelector()&lt;/code&gt; in parallel with the lexical &lt;code&gt;useScopeSelector()&lt;/code&gt;. Report Designer shell renderers migrated to the own-scope hook, consuming only fragment host data. On the same day, completed adoption migration of &lt;code&gt;word-editor-renderers&lt;/code&gt;, &lt;code&gt;report-designer-renderers&lt;/code&gt;, &lt;code&gt;spreadsheet-renderers&lt;/code&gt; to &lt;code&gt;@nop-chaos/ui&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.5 Dependency and Lint Upgrades
&lt;/h3&gt;

&lt;p&gt;From 04-02 to 04-03, the workspace upgraded to &lt;code&gt;eslint-plugin-react-hooks&lt;/code&gt; &lt;code&gt;recommended-latest&lt;/code&gt; strict rule set (later deepened on 04-16 to React 19 strict lint baseline), completed Lucide React patch fixes, and cleaned up all build artifact leaks in &lt;code&gt;src/&lt;/code&gt; directories.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Key paths: &lt;code&gt;packages/flux-runtime/src/request-runtime.ts&lt;/code&gt;, &lt;code&gt;packages/flux-renderers-data/src/data-source-renderer.tsx&lt;/code&gt;, &lt;code&gt;scripts/verify-no-src-artifacts.mjs&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  6. Phase 6: Runtime Architecture Convergence and Performance Optimization
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;: 2026-04-04 ~ 2026-04-06&lt;/p&gt;

&lt;h3&gt;
  
  
  6.1 Formily Comparative Analysis and Performance Direction
&lt;/h3&gt;

&lt;p&gt;Completed a detailed comparison with 10+ low-code platforms (AMIS, Formily, LowCode Engine, Appsmith, ToolJet, Retool, etc.). Core findings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The reactivity model is the most critical shortcoming&lt;/strong&gt;: The current Pull Model triggers evaluation of O(number of nodes × number of expressions) on parent scope changes, whereas Formily's Push Model is O(number of dependents)&lt;/li&gt;
&lt;li&gt;Flux's AOT compilation, orthogonal scope design, and field metadata-driven compilation are unique architectural advantages&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Decision&lt;/strong&gt;: Maintain Flux's compile-first general-purpose platform baseline, allowing only thin local capability extensions in the form subdomain&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6.2 Dependency Tracking and Change Path Notification
&lt;/h3&gt;

&lt;p&gt;Implemented ScopeChange dependency tracking baseline:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ScopeStore&lt;/code&gt; carries &lt;code&gt;ScopeChange&lt;/code&gt; (set of changed paths)&lt;/li&gt;
&lt;li&gt;Formula leaf evaluation refreshes dependency set after each successful run&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;NodeRenderer&lt;/code&gt; subscriptions gate metadata/property recomputation through dependency path intersection&lt;/li&gt;
&lt;li&gt;Later evolved into &lt;strong&gt;lexical root binding&lt;/strong&gt; model: dependency tracking converges to lexical roots like &lt;code&gt;user&lt;/code&gt;, &lt;code&gt;row&lt;/code&gt;, &lt;code&gt;record&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6.3 Source Registry and Reaction Runtime
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Source Registry&lt;/strong&gt; (&lt;code&gt;source-registry.ts&lt;/code&gt;): &lt;code&gt;RendererRuntime&lt;/code&gt; exposes &lt;code&gt;registerDataSource(...)&lt;/code&gt;, sources are bucketed by &lt;code&gt;ScopeRef.id&lt;/code&gt;, the &lt;code&gt;data-source&lt;/code&gt; renderer is only responsible for registration/release lifecycle&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reaction Runtime&lt;/strong&gt; (&lt;code&gt;reaction-runtime.ts&lt;/code&gt;): &lt;code&gt;ReactionSchema&lt;/code&gt; supports &lt;code&gt;watch&lt;/code&gt;, &lt;code&gt;when&lt;/code&gt;, &lt;code&gt;immediate&lt;/code&gt;, &lt;code&gt;debounce&lt;/code&gt;, &lt;code&gt;once&lt;/code&gt;, reaction execution async scheduling occurs after writes stabilize&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-cascade protection&lt;/strong&gt;: Queued reaction triggers merge change paths by pending turn, self-cascading reactions hard-stop after a limited number of times&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6.4 Action Control Flow Extensions
&lt;/h3&gt;

&lt;p&gt;The action system added &lt;code&gt;when&lt;/code&gt;/&lt;code&gt;parallel&lt;/code&gt;/&lt;code&gt;timeout&lt;/code&gt;/&lt;code&gt;retry&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;when&lt;/code&gt;: Precondition check, returns structured skip result if false&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;parallel&lt;/code&gt;: &lt;code&gt;Promise.all&lt;/code&gt; parallel execution&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;timeout&lt;/code&gt;: Structured timeout result, cancelable request-like actions participate in actual cancellation&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;retry&lt;/code&gt;: Retry strategy with fixed attempts/fixed delay&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6.5 Complex Renderer State Ownership
&lt;/h3&gt;

&lt;p&gt;On 04-05, the Table renderer introduced a &lt;code&gt;local&lt;/code&gt;/&lt;code&gt;controlled&lt;/code&gt; two-level state ownership model, extended to three levels on 04-06 with the addition of &lt;code&gt;scope&lt;/code&gt; mode:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;local&lt;/code&gt; (default) — internal renderer state&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;controlled&lt;/code&gt; — external schema/runtime driven&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;scope&lt;/code&gt; (added 04-06) — reads/writes reactive state directly from the current rendering scope&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6.6 Frontend Programming Model Documentation
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;docs/architecture/frontend-programming-model.md&lt;/code&gt; was established as the top-level architecture baseline document, defining Flux's seven core primitives (at that time the first primitive was still called Base Tree, officially renamed to Template on 04-21). The seven primitives are: Template (formerly Base Tree), ScopeRef, Value, Resource, Reaction, Capability, Host Projection.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.7 WorkbenchShell Extraction
&lt;/h3&gt;

&lt;p&gt;On 04-04, extracted the shared &lt;code&gt;WorkbenchShell&lt;/code&gt; React component from various designers into &lt;code&gt;packages/flux-react/src/workbench/&lt;/code&gt;. The page renderers of Flow Designer and Report Designer migrated from handwritten three-column layouts to the unified &lt;code&gt;WorkbenchShell&lt;/code&gt;. Shell is purely presentational, carrying no Flux scope or domain knowledge.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Key paths: &lt;code&gt;packages/flux-runtime/src/source-registry.ts&lt;/code&gt;, &lt;code&gt;packages/flux-runtime/src/reaction-runtime.ts&lt;/code&gt;, &lt;code&gt;packages/flux-runtime/src/action-runtime.ts&lt;/code&gt;, &lt;code&gt;packages/flux-react/src/workbench/workbench-shell.tsx&lt;/code&gt;, &lt;code&gt;docs/architecture/frontend-programming-model.md&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  7. Phase 7: Frontend Programming Model Finalization and In-depth Design
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;: 2026-04-06 ~ 2026-04-11&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: This phase had parallel work with Phase 8 (Template Instantiation), with overlapping dates.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  7.1 Programming Model Evolution Discussions
&lt;/h3&gt;

&lt;p&gt;After multiple rounds of in-depth discussions (8 rounds of discussion recorded in &lt;code&gt;docs/discussions/2026-04-06-programming-model-optimality-critique.md&lt;/code&gt;), finally established:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep the seven primitives closed, do not introduce an alternative primitive system&lt;/li&gt;
&lt;li&gt;Understand &lt;code&gt;data-source&lt;/code&gt; as "registering a named dynamic value into scope"&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;name&lt;/code&gt; as the sole normalized publication path, &lt;code&gt;mergeToScope: true&lt;/code&gt; as the only special publication mode&lt;/li&gt;
&lt;li&gt;Action semantics (&lt;code&gt;when&lt;/code&gt; + &lt;code&gt;then&lt;/code&gt; + &lt;code&gt;onError&lt;/code&gt; + &lt;code&gt;parallel&lt;/code&gt;) already form a DAG at execution time&lt;/li&gt;
&lt;li&gt;Distinguish between "progressive authoring surface" and "DAG execution semantics"&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  7.2 Action/API Convergence Construction
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Renamed declarative request from &lt;code&gt;ApiObject&lt;/code&gt; to &lt;code&gt;ApiSchema&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;type: 'source'&lt;/code&gt; as an action-based anonymous value consumption form&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;data-source&lt;/code&gt; as the named/dispatch extension of &lt;code&gt;source&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Standardized built-in action naming to camelCase (&lt;code&gt;openDialog&lt;/code&gt;, &lt;code&gt;showToast&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  7.3 Validation System In-depth Design
&lt;/h3&gt;

&lt;p&gt;On 04-11, completed a unified validation design (&lt;code&gt;docs/analysis/2026-04-11-flux-validation-unified-design.md&lt;/code&gt;), covering:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;modelGeneration&lt;/code&gt; counter to track validation model replacements&lt;/li&gt;
&lt;li&gt;Async run identity quintuple (&lt;code&gt;ownerId&lt;/code&gt;, &lt;code&gt;modelGeneration&lt;/code&gt;, &lt;code&gt;path&lt;/code&gt;, &lt;code&gt;ruleId&lt;/code&gt;, &lt;code&gt;runGeneration&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Two lifecycle paths: owner-compatible model refresh vs. owner boundary change&lt;/li&gt;
&lt;li&gt;State retention rules: always reset materialized caches and async runs&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  7.4 Form Linkage and Hidden Field Policy
&lt;/h3&gt;

&lt;p&gt;On 04-11, fully implemented the &lt;code&gt;HiddenFieldPolicy&lt;/code&gt; contract (Plan 67): &lt;code&gt;clearValueWhenHidden&lt;/code&gt;, &lt;code&gt;validatePath&lt;/code&gt; skipping, &lt;code&gt;notifyFieldHidden&lt;/code&gt;, 21 new tests.&lt;br&gt;
Constraint-based declarative linkage (&lt;code&gt;xui:linkage&lt;/code&gt;) compiled into existing node metadata/properties and validation flow.&lt;br&gt;
Field presentation snapshot (&lt;code&gt;effectiveDisabled&lt;/code&gt;/&lt;code&gt;effectiveRequired&lt;/code&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  7.5 Owner Status Model
&lt;/h3&gt;

&lt;p&gt;On 04-09, unified loading/pending/status as owner-specific read-only summaries:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Internal form expressions standardized to &lt;code&gt;$form&lt;/code&gt; binding&lt;/li&gt;
&lt;li&gt;Cross-form observers standardized to explicit &lt;code&gt;statusPath&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Surface owners (dialog/drawer) expose external read-only status via &lt;code&gt;statusPath&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  7.6 Component Documentation System and xui:imports Expression Projection
&lt;/h3&gt;

&lt;p&gt;On 04-07, established the &lt;code&gt;docs/components/&lt;/code&gt; component documentation system, each component directory carries &lt;code&gt;design.md&lt;/code&gt; + &lt;code&gt;example.json&lt;/code&gt;, distinguishing registered renderers from planned renderers. Component naming standardized to Flux native vocabulary rather than AMIS legacy names.&lt;/p&gt;

&lt;p&gt;On the same day, completed &lt;code&gt;xui:imports&lt;/code&gt; expression projection; import aliases can now be used in expressions as &lt;code&gt;$alias.method(...)&lt;/code&gt;, sharing the same import namespace provider mapping as the existing &lt;code&gt;namespace:method&lt;/code&gt; action dispatch.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Key paths: &lt;code&gt;docs/architecture/frontend-programming-model.md&lt;/code&gt;, &lt;code&gt;docs/architecture/api-data-source.md&lt;/code&gt;, &lt;code&gt;docs/architecture/action-scope-and-imports.md&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  8. Phase 8: Template Instantiation and Node Identity System
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;: 2026-04-07 ~ 2026-04-08&lt;/p&gt;

&lt;h3&gt;
  
  
  8.1 Template Instantiation Architecture
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;docs/architecture/template-instantiation-and-node-identity.md&lt;/code&gt; established the architecture of "compile the template once, instantiate it multiple times at runtime":&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cid&lt;/code&gt; is strictly a mount-time active node bridge ID&lt;/li&gt;
&lt;li&gt;Structure resolution belongs to the runtime-owned resolver&lt;/li&gt;
&lt;li&gt;Canonical runtime address as &lt;code&gt;NodeLocator = runtimeId + templateGraphId + templateNodeId + instancePath&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  8.2 Repeated Instance Identity Propagation
&lt;/h3&gt;

&lt;p&gt;Table row child rendering (cell, buttons, expanded) passes in &lt;code&gt;[{ repeatedTemplateId: 'table.row', instanceKey: rowKey }]&lt;/code&gt;, row child debug locator data can now see the real &lt;code&gt;instancePath&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  8.3 NodeRenderer Compatibility Migration
&lt;/h3&gt;

&lt;p&gt;Through Plan 40, gradually migrated &lt;code&gt;CompiledSchemaNode&lt;/code&gt; dependencies to &lt;code&gt;NodeInstance&lt;/code&gt;/&lt;code&gt;templateNode&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;NodeFrameWrapper&lt;/code&gt; consumes &lt;code&gt;templateNode&lt;/code&gt; + explicit renderer &lt;code&gt;wrap&lt;/code&gt; metadata&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;RendererComponentProps&lt;/code&gt; and &lt;code&gt;useCurrentNodeMeta()&lt;/code&gt; mirror &lt;code&gt;templateNode&lt;/code&gt; + optional &lt;code&gt;locator&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Fragment/dialog ownership seams migrated to active-node-first fallback&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  8.4 Compiler-Integrated Diagnostics
&lt;/h3&gt;

&lt;p&gt;Plan 41 implemented compiler-integrated schema diagnostics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;flux-core&lt;/code&gt; exposes a formal schema diagnostic contract&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CompileSchemaOptions&lt;/code&gt; carries diagnostic/validation policy&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;RendererDefinition&lt;/code&gt; can contribute &lt;code&gt;schemaValidator&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Form and table renderers contributed renderer-owned schema validator checks&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  8.5 BEM Migration Completed
&lt;/h3&gt;

&lt;p&gt;All internal &lt;code&gt;__&lt;/code&gt; markers cleaned up, field framework, code editor, spreadsheet/report designer, workbench areas migrated to &lt;code&gt;data-slot&lt;/code&gt;/&lt;code&gt;data-*&lt;/code&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Key paths: &lt;code&gt;docs/architecture/template-instantiation-and-node-identity.md&lt;/code&gt;, &lt;code&gt;packages/flux-react/src/node-instance.ts&lt;/code&gt;, &lt;code&gt;packages/flux-runtime/src/node-resolver.ts&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  9. Phase 9: Deep Audit, Performance Optimization, and Architecture Convergence
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;: 2026-04-12 ~ 2026-04-20&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: This phase was the highest-density convergence period of the entire project, with code changes, document audits, performance optimizations, and architectural decisions densely interwoven.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  9.1 Architecture Document Consistency Audit and Governance System Maturation
&lt;/h3&gt;

&lt;p&gt;On 04-12, completed the first full-scope architecture document consistency audit, checking all files under &lt;code&gt;docs/architecture/&lt;/code&gt; for consistency with code and with each other. Discovered cross-document conflicts (&lt;code&gt;Final Execution Schema&lt;/code&gt; wording, node identity model, &lt;code&gt;xui:imports&lt;/code&gt; boundaries, style contract drift, etc.), established a repair strategy sharded by document family.&lt;/p&gt;

&lt;p&gt;This phase also marked the formal maturation of Flux's unique development governance method:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First write owner doc (target state architecture document)&lt;/li&gt;
&lt;li&gt;Then write execution plan&lt;/li&gt;
&lt;li&gt;Write daily log after execution&lt;/li&gt;
&lt;li&gt;Finally use an independent sub-audit to confirm closure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Many subsequent Plans (73~121) followed this method.&lt;/p&gt;

&lt;h3&gt;
  
  
  9.2 Plan 82: Architecture Contract Implementation Convergence
&lt;/h3&gt;

&lt;p&gt;Plan 82 was the core convergence plan from 04-12 to 04-14, covering multiple parallel contract alignment threads:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;xui:imports node lifecycle tightening&lt;/strong&gt; (Phase 5): The creation of &lt;code&gt;ActionScope&lt;/code&gt; for import declaration nodes and namespace registration began to separate from renderer policies; module loading deduplication and scope namespace lifecycle initially became independent. The final import-owned boundary was finalized in Plan 133 on 04-23 (see Phase 10, 10.3)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Surface family extraction&lt;/strong&gt; (Phase 5): dialog/drawer state extracted from &lt;code&gt;page.store&lt;/code&gt; into independent &lt;code&gt;SurfaceStore&lt;/code&gt;, &lt;code&gt;SurfaceRuntime&lt;/code&gt; became the unified owner for dialog/drawer/surface&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Value adaptation contract convergence&lt;/strong&gt; (Phase 6): &lt;code&gt;detail-field&lt;/code&gt;, &lt;code&gt;detail-view&lt;/code&gt;, &lt;code&gt;object-field&lt;/code&gt;, &lt;code&gt;array-field&lt;/code&gt;, &lt;code&gt;variant-field&lt;/code&gt; gradually aligned to shared value-adaptation helper and unified scope model&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Architecture narrowing decision&lt;/strong&gt;: After multiple rounds of implementation attempts, the architecture documentation clearly positioned &lt;code&gt;object-field&lt;/code&gt;, &lt;code&gt;array-field&lt;/code&gt;, &lt;code&gt;variant-field&lt;/code&gt; as inline live-edit controls (editing directly writes to parent form), only &lt;code&gt;detail-field&lt;/code&gt;/&lt;code&gt;detail-view&lt;/code&gt; retain staged owner semantics (confirm/cancel boundaries)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  9.3 ScopeRef Read-Write Separation and Per-Path Subscription
&lt;/h3&gt;

&lt;p&gt;From 04-14 to 04-15, performed a major refactoring of ScopeRef's core APIs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;read()&lt;/code&gt; → &lt;code&gt;readVisible()&lt;/code&gt; + &lt;code&gt;materializeVisible()&lt;/code&gt;&lt;/strong&gt; (Plan 89): &lt;code&gt;readVisible()&lt;/code&gt; uses the prototype chain to provide a lazy lexical view; &lt;code&gt;materializeVisible()&lt;/code&gt; is called only at explicit flattening boundaries (formula broad-access, debugger dump, request &lt;code&gt;includeScope: '*'&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Per-path fine-grained subscription&lt;/strong&gt; (Plan 90): &lt;code&gt;FormStore&lt;/code&gt; added a &lt;code&gt;subscribeToPath(path)&lt;/code&gt; mechanism; keystrokes on field A no longer wake subscribers of field B, achieving O(1) field-level invalidation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Host Projection scope base&lt;/strong&gt; (Plan 87): &lt;code&gt;RendererRuntime.createHostProjectionScope(...)&lt;/code&gt; moved the read-only/write-protection boundary of host projection from React hooks into a shared runtime contract&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  9.4 Performance Optimization Series (Plans 100~110)
&lt;/h3&gt;

&lt;p&gt;On 04-16, executed an entire performance optimization plan series, from audit to per-package implementation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Playground loading and bundle boundaries&lt;/strong&gt; (Plan 102)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flux React hot path fixes&lt;/strong&gt; (Plan 103): &lt;code&gt;NodeRenderer&lt;/code&gt; &lt;code&gt;useSyncExternalStore&lt;/code&gt; selector stabilization, &lt;code&gt;ClassAliasesContext&lt;/code&gt; broadcast debouncing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Formula runtime hot path&lt;/strong&gt; (Plan 104)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spreadsheet performance and virtualization&lt;/strong&gt; (Plan 105): &lt;code&gt;setCells()&lt;/code&gt; batch operations, grid virtualization (binary search for visible range), &lt;code&gt;requestAnimationFrame&lt;/code&gt; batch selection/fill/zoom&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Runtime and form invalidation performance&lt;/strong&gt; (Plan 106): parallel field validation, &lt;code&gt;computeScopeState&lt;/code&gt; caching, &lt;code&gt;publishStatus&lt;/code&gt; skip unchanged updates&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collection renderer scalability&lt;/strong&gt; (Plan 107): table viewport-driven virtualization (threshold 50 rows, overscan 10), row scope cache changed from full clone to in-place mutation + generation counter&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Form field consumer performance&lt;/strong&gt; (Plan 108): &lt;code&gt;useBoundFieldValue()&lt;/code&gt; uses &lt;code&gt;UNUSED_VALUE&lt;/code&gt; sentinel selector to avoid inactive subscriptions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flow Designer performance hygiene&lt;/strong&gt; (Plan 109): node synchronization reduced from O(n²) to O(n)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API request and cache hygiene&lt;/strong&gt; (Plan 110): source refresh O(1) name indexing, polling changed from &lt;code&gt;setInterval&lt;/code&gt; to &lt;code&gt;setTimeout&lt;/code&gt; chain&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  9.5 @nop-chaos/flux-renderers-form-advanced Split
&lt;/h3&gt;

&lt;p&gt;On 04-16, split 11 advanced renderers from &lt;code&gt;flux-renderers-form&lt;/code&gt; (~15,800 lines) into the new &lt;code&gt;@nop-chaos/flux-renderers-form-advanced&lt;/code&gt; package: condition-builder, variant-field, detail-view, detail-field, object-field, array-field, array-editor, tag-list, key-value, etc. &lt;code&gt;flux-renderers-form&lt;/code&gt; was reduced to ~3,000 lines. Dependency direction confirmed as form-advanced → form → basic (no cycles).&lt;/p&gt;

&lt;h3&gt;
  
  
  9.6 Capability Projection Manifest
&lt;/h3&gt;

&lt;p&gt;On 04-16, introduced the Capability Projection Manifest architecture (Plan 112), upgrading host protocols from runtime wiring conventions to compile-time visible and verifiable static contracts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;HostCapabilityProjectionManifest&lt;/code&gt; declares host projection fields and namespaced capability methods&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;RendererDefinition.hostContract&lt;/code&gt; lets renderer definitions carry host contract metadata&lt;/li&gt;
&lt;li&gt;Flow Designer as the first pilot, declaring 30 &lt;code&gt;designer:*&lt;/code&gt; methods&lt;/li&gt;
&lt;li&gt;Compiler-integrated diagnostics: &lt;code&gt;validateActionShape()&lt;/code&gt; can now validate host action parameter shapes&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  9.7 @nop-chaos/flux-i18n Internationalization Package
&lt;/h3&gt;

&lt;p&gt;On 04-17, created the &lt;code&gt;@nop-chaos/flux-i18n&lt;/code&gt; package, based on i18next and react-i18next, supporting zh-CN (default) and en-US. All translation keys use the &lt;code&gt;flux.&lt;/code&gt; prefix. Subsequently migrated hardcoded strings from packages like condition-builder, report-designer, code-editor, form-advanced to &lt;code&gt;t()&lt;/code&gt; calls, upgrading the ESLint &lt;code&gt;i18next/no-literal-string&lt;/code&gt; rule from &lt;code&gt;warn&lt;/code&gt; to &lt;code&gt;error&lt;/code&gt;, ensuring that new hardcoded strings cause build failures.&lt;/p&gt;

&lt;h3&gt;
  
  
  9.8 ValueAdapter Unified Protocol
&lt;/h3&gt;

&lt;p&gt;On 04-20, &lt;code&gt;docs/architecture/value-adaptation-and-detail-field.md&lt;/code&gt; established &lt;code&gt;ValueAdapter&lt;/code&gt; as the canonical shared protocol (Plan 121):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simple fields use declarative adapters: &lt;code&gt;stringAdapter()&lt;/code&gt;, &lt;code&gt;booleanStringAdapter()&lt;/code&gt;, array adapters&lt;/li&gt;
&lt;li&gt;Composite owners (object-field, variant-field) uniformly connect to &lt;code&gt;actionAdapter()&lt;/code&gt; for &lt;code&gt;transformInAction&lt;/code&gt; / &lt;code&gt;transformOutAction&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Staged helpers of detail-field/detail-view internally delegate to &lt;code&gt;actionAdapter()&lt;/code&gt;, keeping the public API unchanged&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ValueAdapter&lt;/code&gt; becomes the standard access method for new value-oriented fields, replacing JSX local type conversions&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  9.9 CompiledSchemaNode Complete Elimination
&lt;/h3&gt;

&lt;p&gt;On 04-16, the compilation pipeline no longer passes through the &lt;code&gt;CompiledSchemaNode&lt;/code&gt; intermediate layer, directly generating &lt;code&gt;TemplateNode&lt;/code&gt; from &lt;code&gt;SchemaInput&lt;/code&gt;. &lt;code&gt;CompiledSchemaMeta&lt;/code&gt; and &lt;code&gt;CompiledNodeRuntimeState&lt;/code&gt; were demoted to type aliases. This cleanup simplified the compilation pipeline and eliminated an indirection layer that no longer held value after the template/instance separation landed.&lt;/p&gt;

&lt;h3&gt;
  
  
  9.10 Renderers Contract Unified Static Metadata
&lt;/h3&gt;

&lt;p&gt;On 04-20 (Plan 117), added unified static contract fields to &lt;code&gt;RendererDefinition&lt;/code&gt;: &lt;code&gt;rendererClass&lt;/code&gt;, &lt;code&gt;rendererTraits&lt;/code&gt;, &lt;code&gt;propContracts&lt;/code&gt;, &lt;code&gt;eventContracts&lt;/code&gt;, &lt;code&gt;componentCapabilityContracts&lt;/code&gt;, &lt;code&gt;scopeExportContracts&lt;/code&gt;. &lt;code&gt;propContracts&lt;/code&gt; immediately participates in compiler unknown attribute checking; the remaining fields are reserved for tooling (Inspector, online editor). button, form, crud, designer-page served as the first pilots.&lt;/p&gt;

&lt;h3&gt;
  
  
  9.11 Action Pre-compilation and Async Governance
&lt;/h3&gt;

&lt;p&gt;On 04-20 (Plans 119~120), pushed the action system into the compile phase:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CompiledActionProgram IR&lt;/strong&gt;: &lt;code&gt;compileAction()&lt;/code&gt; compiles &lt;code&gt;ActionSchema&lt;/code&gt; to &lt;code&gt;CompiledActionProgram&lt;/code&gt;/&lt;code&gt;CompiledActionNode&lt;/code&gt;; the runtime executor no longer mixes raw schema execution paths internally&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Async governance convergence&lt;/strong&gt;: Shared &lt;code&gt;async-governance.ts&lt;/code&gt; base unified the run identity, stale publish gating, and debug diagnostics for three categories of async runtime owners: data-source, reaction, and async validation&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  9.12 Documentation Governance and Deep Audits
&lt;/h3&gt;

&lt;p&gt;From 04-12 to 04-19, multiple rounds of deep audits were produced (12 audit dimensions covering API surface, state ownership, reactivity precision, async safety, validation consistency, renderer contracts, style compliance, field slot modeling, lifecycle, etc.). After each audit, only true defects still reproducible in the current code were fixed, avoiding over-fixing.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Key paths: &lt;code&gt;packages/flux-core/src/value-adapter.ts&lt;/code&gt;, &lt;code&gt;packages/flux-runtime/src/async-governance.ts&lt;/code&gt;, &lt;code&gt;packages/flux-runtime/src/action-compiler.ts&lt;/code&gt;, &lt;code&gt;packages/flux-i18n/src/&lt;/code&gt;, &lt;code&gt;packages/flux-renderers-form-advanced/&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  10. Phase 10: Compiler Independence and Package Boundary Hardening
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;: 2026-04-21 ~ 2026-04-25&lt;/p&gt;

&lt;h3&gt;
  
  
  10.1 Compiler Package Extraction
&lt;/h3&gt;

&lt;p&gt;Extracted the &lt;code&gt;@nop-chaos/flux-compiler&lt;/code&gt; package from &lt;code&gt;flux-runtime&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Schema compilation/validation&lt;/li&gt;
&lt;li&gt;Action pre-compilation&lt;/li&gt;
&lt;li&gt;Compilation symbol table&lt;/li&gt;
&lt;li&gt;Diagnostics and validation lowering&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;flux-runtime&lt;/code&gt; briefly retained a compatibility re-export layer (removed in Plan 124 on 04-22; runtime side no longer holds any compiler code)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  10.2 Action Core Package Extraction
&lt;/h3&gt;

&lt;p&gt;On 04-22, further extracted the &lt;code&gt;@nop-chaos/flux-action-core&lt;/code&gt; package from &lt;code&gt;flux-runtime&lt;/code&gt;, with &lt;code&gt;ActionRuntimeAdapter&lt;/code&gt; becoming the unified action invocation boundary. By this step, Flux completed a three-layer split:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;flux-compiler&lt;/code&gt; responsible for "turning schema into executable artifacts"&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;flux-action-core&lt;/code&gt; responsible for "action dispatching, control flow, and unified invocation exit"&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;flux-runtime&lt;/code&gt; responsible for "connecting compiled artifacts with the host environment and holding lifecycle"&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  10.3 Import Boundary Semantic Convergence
&lt;/h3&gt;

&lt;p&gt;On 04-23, the creation of &lt;code&gt;ActionScope&lt;/code&gt; for &lt;code&gt;xui:imports&lt;/code&gt; was separated from renderer policy into import-owned boundary semantics (Plan 133). Module loading deduplication and scope namespace registration operate independently; import lifecycle and compile-time diagnostics participate in the compilation pipeline, completing the second phase of the &lt;code&gt;ActionScope&lt;/code&gt; / &lt;code&gt;xui:imports&lt;/code&gt; model proposed in late March.&lt;/p&gt;

&lt;p&gt;On the same day, Plan 132 eliminated runtime fallback reads of raw &lt;code&gt;Schema&lt;/code&gt; objects — &lt;code&gt;DataSource&lt;/code&gt; and &lt;code&gt;Reaction&lt;/code&gt; fully migrated to compiled data; the runtime no longer holds uncompiled schemas. This is a direct manifestation of the compile-forward mainline.&lt;/p&gt;

&lt;h3&gt;
  
  
  10.4 Base Tree → Template Renaming
&lt;/h3&gt;

&lt;p&gt;On 04-21, the first primitive of the programming model was renamed from &lt;code&gt;Base Tree&lt;/code&gt; to &lt;code&gt;Template&lt;/code&gt;, emphasizing its nature as a compile-time immutable program definition. &lt;code&gt;SchemaCompiler&lt;/code&gt; produces an immutable &lt;code&gt;TemplateNode&lt;/code&gt; graph; the runtime only consumes and instantiates.&lt;/p&gt;

&lt;h3&gt;
  
  
  10.5 Data Domain Owner Architecture
&lt;/h3&gt;

&lt;p&gt;On 04-22, the &lt;code&gt;Data Domain Owner&lt;/code&gt; concept was formally elevated to an architecture baseline document (&lt;code&gt;docs/architecture/data-domain-owner.md&lt;/code&gt;). &lt;code&gt;object-field&lt;/code&gt;, &lt;code&gt;array-field&lt;/code&gt;, &lt;code&gt;variant-field&lt;/code&gt; aligned to the Data Domain Owner baseline — composite fields become explicit data domain owners, with clear value adaptation, validation coordination, and sub-scope lifecycle. This complements the staged owner semantics of &lt;code&gt;detail-field&lt;/code&gt;/&lt;code&gt;detail-view&lt;/code&gt;: two ownership models (inline live-edit vs. staged confirm/cancel boundaries) cover all composite field paradigms.&lt;/p&gt;

&lt;h3&gt;
  
  
  10.6 DingFlow Tree Mode
&lt;/h3&gt;

&lt;p&gt;Introduced a structured process tree contract: nodes can have branch groups, branches implicitly merge, continuation flow enters the downstream &lt;code&gt;child&lt;/code&gt; of the owner node. In tree mode, free connections, free reconnections, and manual node dragging are disabled.&lt;/p&gt;

&lt;h3&gt;
  
  
  10.7 CRUD Contract Finalization and Shared Context Menu
&lt;/h3&gt;

&lt;p&gt;The design and implementation of CRUD spanned multiple phases: component contract document completed on 04-12 (&lt;code&gt;docs/components/crud/design.md&lt;/code&gt;), entered implementation around 04-17, and completed interaction and contract finalization on 04-24 ~ 04-25:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CRUD selection summary and refresh behavior stabilized&lt;/li&gt;
&lt;li&gt;Spreadsheet shared context menu baseline (copy, cut, paste, clear, insert/delete rows/columns)&lt;/li&gt;
&lt;li&gt;Double-click fill handle uses adjacent data region for auto-fill down&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On 04-25, Plan 139 removed the &lt;code&gt;DataSourceSchema.api&lt;/code&gt; field; all remote calls are uniformly dispatched via &lt;code&gt;{ action: 'ajax', args: ... }&lt;/code&gt;. &lt;code&gt;ApiSchema&lt;/code&gt; is explicitly defined as a transport contract used internally by the &lt;code&gt;ajax&lt;/code&gt; action; author side no longer directly touches independent API definitions — the convergence from independent execution paths to unified action dispatch is completed here.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Key paths: &lt;code&gt;packages/flux-compiler/src/&lt;/code&gt;, &lt;code&gt;packages/flux-action-core/src/&lt;/code&gt;, &lt;code&gt;docs/architecture/flux-runtime-module-boundaries.md&lt;/code&gt;, &lt;code&gt;docs/architecture/capability-projection-manifest.md&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  11. Phase 11: Comprehensive Quality Convergence and Host Maturity
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;: 2026-04-25 ~ 2026-05-03&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: This phase was the second high-density convergence period after Phase 9 (04-12~04-20), but the focus shifted from "architecture contract alignment" to "comprehensive quality convergence" — performance audit, test institutionalization, adversarial security review, validation owner boundary precision, host tooling engineering. If Phase 9 answered "is the architecture right?", Phase 11 answered "is the implementation robust enough".&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  11a. Performance Audit and Hot Path Optimization (04-26)
&lt;/h3&gt;

&lt;p&gt;Conducted in-depth performance audits on four hot paths: runtime, form, spreadsheet, report-designer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Eliminated &lt;code&gt;JSON.stringify&lt;/code&gt; full-value comparisons&lt;/strong&gt;: Form &lt;code&gt;valuesPath&lt;/code&gt; publication used &lt;code&gt;JSON.stringify&lt;/code&gt; for change detection, incurring significant serialization overhead in high-field-count forms. Replaced with path-aware structural comparison.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spreadsheet batch writes&lt;/strong&gt;: Batch operations like paste/cut changed from per-cell full Map cloning to &lt;code&gt;setCells()&lt;/code&gt; batch interface, eliminating O(n) immutable clone overhead.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Condition-builder recursive structural equality&lt;/strong&gt;: Condition builder used &lt;code&gt;JSON.stringify&lt;/code&gt; for value comparison; replaced with recursive structural equality function, avoiding stringification overhead and key-order sensitivity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Path-aware form value subscription&lt;/strong&gt;: &lt;code&gt;useCurrentFormState&lt;/code&gt; added an optional &lt;code&gt;{ path: name }&lt;/code&gt; parameter; field-level subscribers are woken only when the specified path changes, eliminating cascading re-renders of unrelated fields.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full adoption in advanced form renderers&lt;/strong&gt;: Path-aware subscription extended to all advanced form renderers including object-field, array-field, detail-field, variant-field, array-editor, key-value, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  11b. Test Coverage Institutionalization and Deep Audit (04-26 ~ 04-27)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Plan 143: Coverage threshold institutionalization&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Enforced 80% Vitest coverage thresholds in all core package configurations. Systematically closed coverage gaps in the following packages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;flux-runtime, flux-react, flux-renderers-data&lt;/li&gt;
&lt;li&gt;flux-renderers-form, flux-renderers-form-advanced, flux-renderers-basic&lt;/li&gt;
&lt;li&gt;flux-formula&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;First 18-dimensional deep audit (04-27)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Full-dimensional audit covering 24 packages, discovering 1 P0, 16 P1, 28 P2, 36 P3 issues. Audit dimensions included:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Architecture consistency, state ownership, async safety, reactivity precision&lt;/li&gt;
&lt;li&gt;Host contracts, test quality, accessibility, security&lt;/li&gt;
&lt;li&gt;Performance, boundary clarity, dependency direction, API surface stability&lt;/li&gt;
&lt;li&gt;Documentation synchronization, type safety, error handling, internationalization, observability, extensibility&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  11c. Renderer Contract and Host Projection Convergence (04-26 ~ 04-30)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Plan 145: runtime/react/renderer hot spot boundary convergence&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Extracted shared helper functions, established projected-owner scope base, CRUD owner bridging, Flow Designer page-shell/adapter split. Cross-package dependencies in renderer hot paths converged to explicit contracts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Plan 146: Domain-host projection and lexical convergence&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Word Editor real-time save vs. auto-save timing semantics clarified&lt;/li&gt;
&lt;li&gt;Report Designer standardized selection vocabulary&lt;/li&gt;
&lt;li&gt;Host projection interfaces of various domain designers aligned to a unified baseline&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Plan 144: Execution boundary diagnostics and host contract tooling&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Diagnostic information carries source location, supporting precise jumping from runtime errors to schema definition locations&lt;/li&gt;
&lt;li&gt;Host contract manifest tooling, supporting automated contract checking&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Plan 150: &lt;code&gt;xui:actions&lt;/code&gt; — Schema-local named action chains&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Introduced the &lt;code&gt;xui:actions&lt;/code&gt; attribute, allowing declaration of named action chains on schema nodes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;__xui_actions__&lt;/code&gt; synthetic namespace carries schema-local action definitions&lt;/li&gt;
&lt;li&gt;Lexical inheritance: child nodes inherit &lt;code&gt;xui:actions&lt;/code&gt; from the parent scope, sharing the same namespace resolution mechanism as &lt;code&gt;xui:imports&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Action chains support &lt;code&gt;when&lt;/code&gt;/&lt;code&gt;then&lt;/code&gt;/&lt;code&gt;onError&lt;/code&gt; control flow&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  11d. Adversarial Review and Security Hardening (05-01 ~ 05-02)
&lt;/h3&gt;

&lt;p&gt;Conducted an adversarial review of the entire codebase (24 packages), covering compiler-runtime contract consistency, reaction cascade depth, scope dangerous key filtering, formula parser/evaluator depth limits, form validation resilience, accessibility.&lt;/p&gt;

&lt;p&gt;Key fixes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;$Date&lt;/code&gt; symbol table fix&lt;/strong&gt;: Completed from 7 methods to 14 methods, covering all date operations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;booleanStringAdapter("false")&lt;/code&gt; fix&lt;/strong&gt;: &lt;code&gt;Boolean("false")&lt;/code&gt; pitfall — the string &lt;code&gt;"false"&lt;/code&gt; is truthy in JavaScript; adapter must explicitly parse&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Action compilation depth limit&lt;/strong&gt;: &lt;code&gt;MAX_ACTION_COMPILE_DEPTH=128&lt;/code&gt; to prevent malicious nested action chains from causing compile stack overflow&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scope snapshot sanitization&lt;/strong&gt;: &lt;code&gt;sanitizeSnapshot()&lt;/code&gt; blocks prototype pollution keys like &lt;code&gt;__proto__&lt;/code&gt;, &lt;code&gt;constructor&lt;/code&gt;, &lt;code&gt;prototype&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Formula parser depth limit&lt;/strong&gt;: &lt;code&gt;MAX_PARSER_DEPTH=256&lt;/code&gt;, &lt;code&gt;MAX_EVAL_DEPTH=256&lt;/code&gt; to prevent deeply nested expression attacks&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  11e. Validation Owner Boundary Convergence (04-30 ~ 05-03)
&lt;/h3&gt;

&lt;p&gt;The validation owner boundary underwent three stages of precision refinement, finally forming a clear ownership hierarchy:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Plan 157: validation owner boundary&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;formId&lt;/code&gt; becomes a true targeting carrier, no longer just an identifier&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;submitWhenHidden&lt;/code&gt; semantics removed — submission behavior of hidden fields is uniformly controlled by the owner&lt;/li&gt;
&lt;li&gt;Registration identity maintains path-singleton: registrations on the same path are automatically replaced, no duplication&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Plan 163: core boundary&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;flux-core&lt;/code&gt; completely removes React type dependencies, becoming a pure TypeScript package&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;flux-react&lt;/code&gt; owns the &lt;code&gt;reactComponent&lt;/code&gt; convenience path&lt;/li&gt;
&lt;li&gt;Surface runtime creates an independent validation owner for each surface, achieving validation isolation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Plan 168: validation owner convergence&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;formId&lt;/code&gt; resolution path unified&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;validateOn: 'change'&lt;/code&gt; no longer gates on &lt;code&gt;touched&lt;/code&gt; — validation on change, orthogonal to touched state&lt;/li&gt;
&lt;li&gt;Summary-gate enforcement during submission: collect all validation summaries on submit, block until all pass&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Plan 174: Strict Validation Mode&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Schema authors can enable strict compilation mode, causing the compiler to report unknown attributes. This mechanism fills the last piece of schema validation: from "compiler ignores unknown attributes" to "unknown attributes are compile errors in strict mode".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final Validation Owner Hierarchy&lt;/strong&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Owner Level&lt;/th&gt;
&lt;th&gt;Coverage&lt;/th&gt;
&lt;th&gt;Typical Scenario&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;form&lt;/td&gt;
&lt;td&gt;All fields within the form&lt;/td&gt;
&lt;td&gt;Main form submission&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;page-root&lt;/td&gt;
&lt;td&gt;Page-level validation&lt;/td&gt;
&lt;td&gt;Page-level linkage constraints&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;surface&lt;/td&gt;
&lt;td&gt;Independent validation domain within dialog/drawer&lt;/td&gt;
&lt;td&gt;Popup form independent submission&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;detail-child&lt;/td&gt;
&lt;td&gt;Sub-validation domain within staged owner&lt;/td&gt;
&lt;td&gt;Detail row edit confirm/cancel boundary&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  11f. Host Tooling and Engineering (04-30)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Turborepo introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Turborepo as the workspace task runner, enabling parallel execution of build/typecheck/test/lint. The task dependency graph is automatically topologically sorted by Turborepo, eliminating manual orchestration scripts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repository-level audit toolchain&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;dependency-cruiser&lt;/strong&gt;: Dependency direction validation, preventing circular dependencies and illegal cross-layer references&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;knip&lt;/strong&gt;: Dead code detection, identifying unused exports, types, and dependencies&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stryker&lt;/strong&gt;: Mutation testing pilot, validating the effectiveness of test suites&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semgrep&lt;/strong&gt;: Static security scanning, detecting known unsafe patterns&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Bundle analysis&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Support for &lt;code&gt;pnpm analyze&lt;/code&gt; via &lt;code&gt;rollup-plugin-visualizer&lt;/code&gt;, visualizing bundle composition of each package, helping identify size regressions and unexpected dependencies.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Key paths: &lt;code&gt;packages/flux-runtime/src/form-runtime.ts&lt;/code&gt;, &lt;code&gt;packages/spreadsheet-core/src/&lt;/code&gt;, &lt;code&gt;packages/flux-formula/src/&lt;/code&gt;, &lt;code&gt;packages/flux-core/src/&lt;/code&gt;, &lt;code&gt;docs/plans/143-*&lt;/code&gt;, &lt;code&gt;docs/plans/145-*&lt;/code&gt;, &lt;code&gt;docs/plans/157-*&lt;/code&gt;, &lt;code&gt;docs/plans/163-*&lt;/code&gt;, &lt;code&gt;docs/plans/168-*&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  12. Key Principles of Architectural Evolution
&lt;/h2&gt;

&lt;p&gt;Looking across the evolution history from 2026-03-20 to 2026-05-03, the following principles repeatedly appear in key decisions:&lt;/p&gt;

&lt;h3&gt;
  
  
  12.1 Compile First
&lt;/h3&gt;

&lt;p&gt;Flux always does as much work as possible at compile time: value classification, expression compilation, action pre-compilation, schema diagnostics. The runtime only executes compiled artifacts and makes no additional judgments. This principle runs from the five node types of &lt;code&gt;CompiledValueNode&lt;/code&gt; through the &lt;code&gt;TemplateNode&lt;/code&gt;/&lt;code&gt;NodeInstance&lt;/code&gt; separation.&lt;/p&gt;

&lt;h3&gt;
  
  
  12.2 Data and Capability Separation
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;ScopeRef&lt;/code&gt; purely carries data, &lt;code&gt;ActionScope&lt;/code&gt; purely carries capabilities; they are orthogonally separated. This decision avoids turning &lt;code&gt;ScopeRef&lt;/code&gt; into a general-purpose method registry, keeping the scope model simple.&lt;/p&gt;

&lt;h3&gt;
  
  
  12.3 Renderer Contract Consistency
&lt;/h3&gt;

&lt;p&gt;All renderers follow the unified &lt;code&gt;RendererComponentProps&lt;/code&gt; pattern, with data coming from &lt;code&gt;props.props&lt;/code&gt;/&lt;code&gt;props.meta&lt;/code&gt;/&lt;code&gt;props.regions&lt;/code&gt;/&lt;code&gt;props.events&lt;/code&gt;/&lt;code&gt;props.helpers&lt;/code&gt;, and do not directly access stores. This ensures renderer replaceability and testability.&lt;/p&gt;

&lt;h3&gt;
  
  
  12.4 Marker Classes Carry No Styling
&lt;/h3&gt;

&lt;p&gt;Layout renderers only emit semantic marker classes (&lt;code&gt;nop-container&lt;/code&gt;, &lt;code&gt;nop-flex&lt;/code&gt;); marker classes carry no visual styling. All spacing/direction/padding is explicitly declared via &lt;code&gt;classAliases&lt;/code&gt; or semantic attributes in the schema. This avoids implicit layout and style drift.&lt;/p&gt;

&lt;h3&gt;
  
  
  12.5 Domain Bridge Pattern
&lt;/h3&gt;

&lt;p&gt;Complex designers (Flow Designer, Report Designer, Spreadsheet) are integrated via the DomainBridge pattern: core packages provide pure logic runtime, renderer packages provide React integration, and the canvas is decoupled via bridge callbacks. This allows canvas implementations to be replaced without affecting core logic.&lt;/p&gt;

&lt;h3&gt;
  
  
  12.6 Documentation as Architecture
&lt;/h3&gt;

&lt;p&gt;From the layered documentation system of Flow Designer to multiple rounds of discussion on the frontend programming model, the Flux project always uses documentation as the carrier of architectural decisions. The separation of target state and snapshot state, and the separation of discussion records from normative documents, ensure the sustainable maintenance of architectural knowledge.&lt;/p&gt;

&lt;h3&gt;
  
  
  12.7 AI-First Observability
&lt;/h3&gt;

&lt;p&gt;The debugger was designed as AI-first from the start: structured automation APIs, diagnostic reports, session export, interaction tracing. Subsequent dependency tracking change paths, source/reaction registry snapshots, and node locator identity all follow the "machine-readable over human-readable" observability design.&lt;/p&gt;

&lt;h3&gt;
  
  
  12.8 Design First, Implementation Approximates
&lt;/h3&gt;

&lt;p&gt;Flux's core design ideas (Env environment abstraction, Api/Resource as asynchronous reactive values, lexical scope data chain, &lt;code&gt;xui:imports&lt;/code&gt; action modularization, declarative first) were established as early as the AMIS theory research phase. The architectural evolution records not the discovery of design directions, but the gradual approximation of implementation precision to design principles — from runtime interpretation to compile-time staticization, from implicit conventions to explicit contracts, from monolithic to layered package boundaries.&lt;/p&gt;

&lt;h3&gt;
  
  
  12.9 Host Boundary Testing Ground
&lt;/h3&gt;

&lt;p&gt;Flow Designer is the first testing ground for Flux to validate host protocols. What Flux learned from Flow Designer is not "how to make a flowchart editor", but that complex controls must access the runtime via host boundaries, namespaced actions, bridge snapshots, and configuration-driven approaches. The same unified runtime later successfully accommodated two vastly different complex host paradigms: structured process tree (DingFlow) and Excel-native workbench (Spreadsheet/Report Designer).&lt;/p&gt;

&lt;h3&gt;
  
  
  12.10 Implementation-Driven Convergence
&lt;/h3&gt;

&lt;p&gt;Although design ideas were established early, the implementation path was not achieved overnight. Flux's architecture gradually became precise through continuous implementation, failure, regression, splitting, renaming, rewriting documentation, and then being forced to converge by sub-audits. Each step of implementation advancement was accompanied by clear documentation and regression test coverage, ensuring traceability of implementation decisions.&lt;/p&gt;

&lt;h3&gt;
  
  
  12.11 Audit Rule Extraction Forms Long-Term Governance Loop
&lt;/h3&gt;

&lt;p&gt;From the deep audits of Phase 9 to the 18-dimensional audit of Phase 11, the Flux project continuously distilled audit findings into reusable governance rules: coverage thresholds (Plan 143), compilation depth limits, scope snapshot sanitization, strict validation mode. The output of each audit is not just fixes, but the extraction of new rules. These rules are written into code (threshold configs, compiler checks) rather than documentation, forming an automated governance loop.&lt;/p&gt;

&lt;h3&gt;
  
  
  12.12 Adversarial Review Complements Deep Audit
&lt;/h3&gt;

&lt;p&gt;Deep audits discover problems from architectural dimensions (state ownership, dependency direction, contract consistency); adversarial reviews expose vulnerabilities from an attacker's perspective (prototype pollution, deep nesting, truthy traps). The two complement each other: deep audits ensure "architecture is correct", adversarial reviews ensure "attacks do not succeed". Phase 11 institutionalized both as standard processes before release.&lt;/p&gt;

&lt;h3&gt;
  
  
  12.13 Reactive Subscription Precision is an Architectural Concern
&lt;/h3&gt;

&lt;p&gt;From per-path subscription (Plan 90) in Phase 9 to path-aware &lt;code&gt;useCurrentFormState&lt;/code&gt; in Phase 11, subscription precision has always been an architectural concern, not a local optimization. The wake-up scope of React re-renders directly determines the responsiveness performance of forms, tables, and designers. Flux's answer is progressive precision from full-value comparison → dependency path intersection → path-aware precise subscription; each step is an architectural decision, not an implementation detail.&lt;/p&gt;

&lt;h3&gt;
  
  
  12.14 Validation Owner Hierarchy
&lt;/h3&gt;

&lt;p&gt;The ownership of the validation system is not a binary "has/has not", but a hierarchical model: form (form domain) → page-root (page domain) → surface (popup domain) → detail-child (staged sub-domain). Each layer has an independent lifecycle, submission gating, and validation summary. This hierarchy was the result of three Plans (157 → 163 → 168) gradually converging in Phase 11, evolving from implicit "form owns all validation" to an explicit four-layer ownership model.&lt;/p&gt;




&lt;h2&gt;
  
  
  13. Appendix: Timeline Overview
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Phase&lt;/th&gt;
&lt;th&gt;Date&lt;/th&gt;
&lt;th&gt;Key Events&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Phase 1&lt;/td&gt;
&lt;td&gt;03-20 ~ 03-23&lt;/td&gt;
&lt;td&gt;Bug #1~#5 analysis and fixes, debugger birth, ActionScope/Import semantics established, Flow Designer packages created, canvas bridge initial implementation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Phase 2&lt;/td&gt;
&lt;td&gt;03-23 ~ 03-27&lt;/td&gt;
&lt;td&gt;Canvas bridge, command adapter, schema-driven designer, production-grade visual alignment&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Phase 3&lt;/td&gt;
&lt;td&gt;03-25 ~ 03-29&lt;/td&gt;
&lt;td&gt;AMIS→Flux renaming, flux-core split, styling system, shadcn/ui migration, FieldFrame, Report/Spreadsheet migration, testid&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Phase 4&lt;/td&gt;
&lt;td&gt;03-28 ~ 03-31&lt;/td&gt;
&lt;td&gt;Full shadcn/ui migration, Code Editor, Condition Builder, Word Editor, architecture audit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Phase 5&lt;/td&gt;
&lt;td&gt;04-01 ~ 04-03&lt;/td&gt;
&lt;td&gt;Code audit fixes, comprehensive overhaul, data source redesign, dual-hook design, full @nop-chaos/ui adoption&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Phase 6&lt;/td&gt;
&lt;td&gt;04-04 ~ 04-06&lt;/td&gt;
&lt;td&gt;Formily comparison, dependency tracking, source registry, reaction runtime, action control flow, WorkbenchShell, table state ownership, programming model doc&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Phase 7&lt;/td&gt;
&lt;td&gt;04-06 ~ 04-11&lt;/td&gt;
&lt;td&gt;Programming model finalization, Action/API convergence, Owner Status, component documentation system, imports expression projection, validation design, HiddenFieldPolicy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Phase 8&lt;/td&gt;
&lt;td&gt;04-07 ~ 04-08&lt;/td&gt;
&lt;td&gt;Template instantiation, repeated instance identity, NodeRenderer migration, compiler diagnostics, BEM cleanup&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Phase 9&lt;/td&gt;
&lt;td&gt;04-12 ~ 04-20&lt;/td&gt;
&lt;td&gt;Deep audit, architecture doc consistency, Plan 82 contract convergence, ScopeRef read-write separation, per-path subscription, performance optimization series (Plans 100~110), form-advanced split, Capability Projection Manifest, flux-i18n, ValueAdapter unified protocol, CompiledSchemaNode elimination, action pre-compilation IR, async governance convergence&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Phase 10&lt;/td&gt;
&lt;td&gt;04-21 ~ 04-25&lt;/td&gt;
&lt;td&gt;Compiler package extraction, action core package extraction, Import Boundary convergence, Base Tree→Template, DingFlow tree mode, CRUD, shared context menu&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Phase 11&lt;/td&gt;
&lt;td&gt;04-25 ~ 05-03&lt;/td&gt;
&lt;td&gt;Performance audit and hot path optimization, test coverage institutionalization (Plan 143), 18-dimensional deep audit, renderer contract convergence (Plans 145/146/144), xui:actions (Plan 150), adversarial security review and hardening, validation owner four-layer boundary convergence (Plans 157/163/168), Strict Validation Mode (Plan 174), Turborepo engineering&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The architectural evolution of NOP Chaos Flux is a process of systematically implementing established design ideas on a modern technology stack. The core designs — Env environment abstraction, Api/Resource as asynchronous reactive values, lexical scope data chain, &lt;code&gt;xui:imports&lt;/code&gt; action modularization, declarative first — were established as early as the AMIS theory research phase (see &lt;code&gt;c:/can/nop/nop-entropy/docs/theory/amis/&lt;/code&gt;). What Flux did was not to invent these principles, but to solve the structural limitations of AMIS at the schema layer (parallel field explosion) and runtime layer (MST tight coupling), and to implement these principles in a compile-first, type-safe, package-boundary-clear manner.&lt;/p&gt;

&lt;p&gt;The strongest mainline throughout the evolution is from runtime interpretation to compile-time execution: value classification, template instantiation, action pre-compilation, host contract staticization, compiler package extraction — each step is a milestone on the same path of moving runtime judgment forward to compile time. But this mainline is not the only one. Running in parallel and equally important are two others: the ownership convergence of owner / validation / surface (from implicit dual-state to explicit staged owner, finally converging to the four-layer validation owner of form / page-root / surface / detail-child), and the boundary explicitization of host contract / import boundary / capability manifest (from runtime wiring conventions to compile-time visible contracts). The final three-layer split of &lt;code&gt;flux-compiler&lt;/code&gt; / &lt;code&gt;flux-action-core&lt;/code&gt; / &lt;code&gt;flux-runtime&lt;/code&gt; is the physical form of the compile-forward mainline. Phase 11 built on the three-layer split to complete comprehensive quality convergence: performance hot path optimization, 80% coverage institutionalization, adversarial security review, validation owner boundary precision, host tooling engineering — a leap from "architecture correct" to "implementation robust".&lt;/p&gt;

&lt;p&gt;The resulting architecture — DSL-first + compilation/execution separation + orthogonal scopes + template instantiation + domain bridging + compile-time host contracts + layered validation owner + automated quality governance — provides a clear modern runtime reference for declarative frontend low-code DSLs.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;nop-chaos-flux is open source:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/entropy-cloud/nop-chaos-flux" rel="noopener noreferrer"&gt;https://github.com/entropy-cloud/nop-chaos-flux&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Gitee: &lt;a href="https://gitee.com/canonical-entropy/nop-chaos-flux" rel="noopener noreferrer"&gt;https://gitee.com/canonical-entropy/nop-chaos-flux&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>react</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Design Principles of nop-chaos-flux, a Next-Generation Low-Code Rendering Framework</title>
      <dc:creator>canonical</dc:creator>
      <pubDate>Tue, 19 May 2026 12:38:06 +0000</pubDate>
      <link>https://dev.to/canonical/design-principles-of-nop-chaos-flux-a-next-generation-low-code-rendering-framework-3chc</link>
      <guid>https://dev.to/canonical/design-principles-of-nop-chaos-flux-a-next-generation-low-code-rendering-framework-3chc</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;nop-chaos-flux is the rendering layer of the Nop platform—a low‑code runtime driven by declarative DSLs, designed to render and execute application pages described by Schema in the browser. Its DSL surface syntax resembles that of Baidu AMIS, but achieves conceptual unification (e.g., eliminating the &lt;code&gt;xxxOn&lt;/code&gt; suffix family). Its internal compilation model, runtime architecture, and expression engine have all been redesigned.&lt;/p&gt;

&lt;p&gt;Most low‑code platforms treat the Schema as the runtime input configuration. The runtime then simultaneously carries authoring‑time structures, domain semantics, and scheduling logic. Every new capability adds another set of primitives, a new global provider, another authoritative Schema channel, and the core keeps bloating.&lt;/p&gt;

&lt;p&gt;Flux starts from a different path: elevating the DSL from a runtime input format to an independent, first‑class structural layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. DSL First
&lt;/h2&gt;

&lt;p&gt;The DSL is not an input format fed to the runtime; it is a &lt;strong&gt;first‑class artifact&lt;/strong&gt; of the platform: an independent, operable structural layer. Before ever entering the runtime, it already possesses its own lifecycle, transformation space, and organization rules.&lt;/p&gt;

&lt;p&gt;Many systems have a DSL, but it is only used as a runtime input format—there is no independent structural manipulation. Flux does not see it that way. Flux’s DSL is a structural layer that can be edited, composed, trimmed, and transformed even outside the runtime:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Operation&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;Edit&lt;/td&gt;
&lt;td&gt;Source location retention, aliases, editor metadata, round‑trip fidelity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Merge / Inherit&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;x:extends&lt;/code&gt; inheritance, override expansion, fragment composition&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Trim&lt;/td&gt;
&lt;td&gt;Permission trimming, feature flag trimming, profile assembly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Transform&lt;/td&gt;
&lt;td&gt;i18n string replacement, static default expansion&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Meta‑programming&lt;/td&gt;
&lt;td&gt;Express variations through structural conventions (not by growing runtime interfaces)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;DSL transformations are layered: permission trimming, i18n replacement, and default expansion each operate independently. Removing authoring‑time metadata must not change runtime behavior.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Authoring–Execution Separation
&lt;/h2&gt;

&lt;p&gt;Even when adopting a DSL‑first approach, many systems still maintain only one model, forcing the runtime to directly carry authoring‑time structures. Flux deliberately does not do this. Instead, it places the Authoring Model and the Execution Model on opposite sides of a pre‑compilation boundary.&lt;/p&gt;

&lt;p&gt;The point of this principle is not “having two models” per se, but acknowledging that the two sides have different optimisation goals: authoring time serves understanding, editing, composition, and fidelity; execution time serves conceptual simplification, reduced runtime overhead, and stable execution semantics.&lt;/p&gt;

&lt;h3&gt;
  
  
  Two‑sided optimisation goals
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Aspect&lt;/th&gt;
&lt;th&gt;Authoring Model&lt;/th&gt;
&lt;th&gt;Execution Model&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Optimisation goal&lt;/td&gt;
&lt;td&gt;Understandability, domain expressiveness, editing fidelity&lt;/td&gt;
&lt;td&gt;Performance, unified internal concepts, minimal runtime overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Structural form&lt;/td&gt;
&lt;td&gt;Retains source location, aliases, editor metadata, domain‑specific edit structures&lt;/td&gt;
&lt;td&gt;Final assembled Execution Schema, no redundancy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Correctness&lt;/td&gt;
&lt;td&gt;Round‑trip fidelity, author intent never lost&lt;/td&gt;
&lt;td&gt;Behavioural equivalence, deterministic execution&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Replaceability&lt;/td&gt;
&lt;td&gt;Many editors/designers/collaborative engines can produce the same DSL&lt;/td&gt;
&lt;td&gt;The same Final Execution Schema can execute on different runtime hosts&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Significance of the boundary
&lt;/h3&gt;

&lt;p&gt;The pre‑compilation boundary means more than “do some optimisation early”. It ensures that structural problems that should never land on the runtime surface are resolved at the structural layer:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Compile‑time structural decisions&lt;/strong&gt; — type resolution, renderer binding, default expansion are done during the loading phase; runtime overhead is zero.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compile‑time policy trimming&lt;/strong&gt; — permission nodes, feature flag branches are removed before entering the runtime; the runtime never sees them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compile‑time action DAG assembly&lt;/strong&gt; — &lt;code&gt;then&lt;/code&gt; / &lt;code&gt;onError&lt;/code&gt; / &lt;code&gt;parallel&lt;/code&gt; are assembled at compile time into a cycle‑free execution graph; no graph discovery or cycle detection at runtime.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unified Value IR&lt;/strong&gt; — All forms of Value (literal/expression/template/array/object) are compiled into a unified IR; evaluation is unified at runtime.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;If a problem can be solved at the structural transformation layer, it must never be dragged onto the runtime surface.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  3. Reactive Data‑Driven
&lt;/h2&gt;

&lt;p&gt;Flux’s core execution model is reactive and declarative. The author does not need to explicitly build imperative linkage logic: whenever a dynamic value reads a path from the scope via a field path, name, or &lt;code&gt;${expr}&lt;/code&gt;, it automatically falls into the dependency graph and will be re‑evaluated when the dependency changes.&lt;/p&gt;

&lt;p&gt;Basic rhythm: &lt;strong&gt;evaluate → collect dependencies → propagate changes → targeted re‑evaluation / invalidation → republish&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Dependency tracking is a built‑in design semantic of the Value primitive. Dependencies are automatically collected during evaluation, not declared statically beforehand. Value, Resource, and Reaction all use this mechanism, but with different consequences: Value is re‑evaluated, Resource is marked dirty and refreshed, a Reaction may trigger a Capability.&lt;/p&gt;

&lt;p&gt;The current implementation uses React and &lt;code&gt;useSyncExternalStore&lt;/code&gt; to interface with the rendering host, but the principle itself is not tied to any UI framework.&lt;/p&gt;

&lt;h3&gt;
  
  
  Read/Write and Effect Separation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Read&lt;/strong&gt;: Value / Resource published values / Host Projection snapshots are all read‑only via ScopeRef.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write&lt;/strong&gt;: User edits, &lt;code&gt;FormRuntime.setValue&lt;/code&gt;, &lt;code&gt;ScopeRef.update&lt;/code&gt;, Resource publication—these modify owner‑owned data and belong to the data owner side; they will publish store/scope changes, but that is not equivalent to triggering an action.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Command / Effect&lt;/strong&gt;: Schema‑authored commands (API calls, &lt;code&gt;setValue&lt;/code&gt; action, submission, navigation, host commands, etc.) are dispatched only through Capability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Change → Effect&lt;/strong&gt;: Data changes do not directly trigger actions; they must pass through a Reaction or a Semantic Lifecycle Entry.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Rendering Host Interfacing
&lt;/h3&gt;

&lt;p&gt;The Store layer runs the reactive logic self‑consistently; React is merely a rendering host that subscribes to Store snapshots.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Settled Update Turn&lt;/code&gt; is a runtime‑store concept, not a React &lt;code&gt;useEffect&lt;/code&gt; ordering concept.&lt;/li&gt;
&lt;li&gt;React concurrent mode can interrupt, replay, and discard renders; Flux does not constrain such scheduling behaviour—it only defines when the store settles an update turn and when a stable snapshot is published.&lt;/li&gt;
&lt;li&gt;The rendering host consumes the published results; it does not directly hold reactive protocol objects.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. Gradual Evolution
&lt;/h2&gt;

&lt;p&gt;Complex capabilities in Flux should not be obtained by continually inventing new primitives; they should grow naturally from simpler existing forms. This principle constrains two things at the same time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The author‑visible DSL naturally extends from simple forms to complex forms without frequent mental model switches.&lt;/li&gt;
&lt;li&gt;Complex capabilities inside the runtime should be composed from existing primitives (derived system) as much as possible, instead of expanding the primitive set under pressure.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  DSL‑level evolution: natural growth from simple forms
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Concept&lt;/th&gt;
&lt;th&gt;Simple form&lt;/th&gt;
&lt;th&gt;→&lt;/th&gt;
&lt;th&gt;Complex form&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Value&lt;/td&gt;
&lt;td&gt;literal → expression → anonymous source&lt;/td&gt;
&lt;td&gt;→&lt;/td&gt;
&lt;td&gt;named &lt;code&gt;data-source&lt;/code&gt; (Resource)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Action&lt;/td&gt;
&lt;td&gt;single‑step dispatch&lt;/td&gt;
&lt;td&gt;→&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;when&lt;/code&gt; guard → &lt;code&gt;then&lt;/code&gt;/&lt;code&gt;onError&lt;/code&gt; branches → &lt;code&gt;parallel&lt;/code&gt; fan‑out → compilable to DAG execution graph&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Structure&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;visible&lt;/code&gt; (display level)&lt;/td&gt;
&lt;td&gt;→&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;when&lt;/code&gt; (lifecycle activation) → &lt;code&gt;loop&lt;/code&gt; (collection expansion) → &lt;code&gt;dynamic-renderer&lt;/code&gt; (remote assembly)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Host write&lt;/td&gt;
&lt;td&gt;semantic command&lt;/td&gt;
&lt;td&gt;→&lt;/td&gt;
&lt;td&gt;generic patch‑style &lt;code&gt;applyPatch&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  Value evolution
&lt;/h4&gt;

&lt;p&gt;The same property chooses the appropriate form based on complexity. How the consumer reads the value stays the same: &lt;code&gt;${countries}&lt;/code&gt; remains uniform from literal to data‑source.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json-doc"&gt;&lt;code&gt;&lt;span class="c1"&gt;// literal&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"options"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"draft"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"published"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"archived"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c1"&gt;// expression&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"options"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${role === 'admin' ? adminOptions : userOptions}"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c1"&gt;// source: field‑level anonymous request, not published to scope&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"options"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ajax"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/api/countries"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"params"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"region"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${form.region}"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c1"&gt;// data-source: named Resource with producer lifecycle &amp;amp; scheduling policy&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"data-source"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"countries"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ajax"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/api/countries"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"interval"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"stopWhen"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${countries.complete}"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Action evolution
&lt;/h4&gt;

&lt;p&gt;The compiler recursively assembles nested schemas into a &lt;code&gt;CompiledActionNode&lt;/code&gt; DAG (&lt;code&gt;flux-compiler/action-compiler.ts&lt;/code&gt;). The runtime simply traverses edges to execute; no graph discovery or cycle detection is needed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json-doc"&gt;&lt;code&gt;&lt;span class="c1"&gt;// single-step dispatch&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"setValue"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"value"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"test"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c1"&gt;// when guard: skip if condition not met, result marked skipped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"setValue"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"when"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${isEnabled}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"value"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"test"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c1"&gt;// then/onError branches: different paths based on ActionResult triage&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ajax"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/api/users"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"then"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"showToast"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Save successful"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"onError"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"showToast"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${error.message}"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c1"&gt;// parallel fan-out + onSettled aggregation&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"parallel"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"parallel"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ajax"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/api/notify/email"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ajax"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/api/notify/sms"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"onSettled"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"showToast"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Notifications complete"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c1"&gt;// form submission: submitAction owned by the form node; button is only a thin component:submit trigger&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"form"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"profile-form"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"submitAction"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ajax"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/api/profile"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"method"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"post"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"onSubmitSuccess"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"closeSurface"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"onSubmitError"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"showToast"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${error.message}"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Branch contexts (&lt;code&gt;result&lt;/code&gt; / &lt;code&gt;error&lt;/code&gt; / &lt;code&gt;prevResult&lt;/code&gt;) are automatically injected into the evaluation environment during dispatching (&lt;code&gt;flux-action-core/action-core.ts&lt;/code&gt; &lt;code&gt;createBranchEvaluationBindings&lt;/code&gt;).&lt;/p&gt;

&lt;h4&gt;
  
  
  Structure evolution
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;visible&lt;/code&gt; and &lt;code&gt;when&lt;/code&gt; are not synonyms: fields hidden by &lt;code&gt;visible&lt;/code&gt; still participate in validation; subtrees with &lt;code&gt;when=false&lt;/code&gt; are entirely inactive and do not participate in the lifecycle.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json-doc"&gt;&lt;code&gt;&lt;span class="c1"&gt;// visible: display‑level toggle, node still exists&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"input-text"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"adminCode"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"visible"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${role === 'admin'}"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c1"&gt;// when: lifecycle activation, affects existence and subtree validation&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"fragment"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"when"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${showSummary}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Summary content"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c1"&gt;// loop: collection expansion, each iteration gets its own repeated‑item scope&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"loop"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"items"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${users}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"itemName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"user"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"indexName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"idx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${idx + 1}. ${user.name}"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"empty"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"No data"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c1"&gt;// dynamic-renderer: runtime remote assembly, decides which fragment to render&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="c1"&gt;// Note: it is not a second Resource facet — data‑source produces named values, dynamic‑renderer assembles fragments&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"dynamic-renderer"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"loadAction"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ajax"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/api/schema/${componentType}"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Loading..."&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  5. Lexical Ownership
&lt;/h2&gt;

&lt;p&gt;This principle is an organisational constraint for Principle 3. Data, capabilities, resources, reactions, and runtime sidecars belong to the lexical scope or subtree boundary; they are not held by a global runtime mega‑object.&lt;/p&gt;

&lt;h3&gt;
  
  
  Three resolution mechanisms
&lt;/h3&gt;

&lt;p&gt;Data lookup (ScopeRef), action lookup (ActionScope), and instance location (ComponentHandleRegistry) are architecturally separate resolution mechanisms, each with its own scoping rules.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lexical shadowing
&lt;/h3&gt;

&lt;p&gt;Child scopes override parent publications through natural lexical shadowing, not global overrides. Bindings with the same name can independently exist in different lexical scopes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json-doc"&gt;&lt;code&gt;&lt;span class="c1"&gt;// page scope has items&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"page"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"items"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"a"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"b"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="c1"&gt;// dialog child scope also has items, shadows parent&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"dialog"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"items"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"x"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"y"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${items}"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// → ["x", "y"]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Resource publication ownership
&lt;/h3&gt;

&lt;p&gt;Within the same owning scope, the same binding target should not be long‑term co‑occupied by two simultaneously active publishing producers. This constraint applies to authoritative publication (continuous publication by a Resource), not ordinary writes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json-doc"&gt;&lt;code&gt;&lt;span class="c1"&gt;// compliant: two forms write to the same path at different times&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"dialog"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"form"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"createForm"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"onSubmitSuccess"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"setValue"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"result"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"value"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${result}"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"form"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"editForm"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"onSubmitSuccess"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"setValue"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"result"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"value"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${result}"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c1"&gt;// violation: two data‑sources simultaneously claim to publish "status"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"page"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"data-source"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ajax"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/api/a"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"data-source"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ajax"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/api/b"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Runtime sidecars (Resource state, Reaction state, caches, diagnostics) follow lexical ownership, but they must not become methods or mutable protocol objects attached to a ScopeRef. The Scope hosts the data environment; it does not carry bridges, controllers, handles, or other command‑like objects.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Domain Isolation &amp;amp; Abstraction
&lt;/h2&gt;

&lt;p&gt;The Flux core maintains a small, stable abstraction layer. Its goal is not to absorb all frontend domain semantics, but to provide a sufficiently stable execution kernel that allows different domains to grow outside the core.&lt;/p&gt;

&lt;p&gt;The litmus test for this principle is not “can the core directly describe all complex systems?” but “can the core provide a stable embedding surface for complex systems without pushing domain complexity back into the core vocabulary?”&lt;/p&gt;

&lt;h3&gt;
  
  
  Isolation contract
&lt;/h3&gt;

&lt;p&gt;Interactions between domain systems (Flow Designer, Report Designer, Spreadsheet Editor, collaborative engines, CRDT/OT, etc.) and the Flux core are narrowed down to:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Direction&lt;/th&gt;
&lt;th&gt;Mechanism&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;Core → Domain (read)&lt;/td&gt;
&lt;td&gt;Host Projection&lt;/td&gt;
&lt;td&gt;Read‑only snapshot projection, host‑driven refresh&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Domain → Core (write)&lt;/td&gt;
&lt;td&gt;Capability&lt;/td&gt;
&lt;td&gt;Namespaced command dispatch (e.g., &lt;code&gt;designer:*&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Instance location&lt;/td&gt;
&lt;td&gt;ComponentHandleRegistry&lt;/td&gt;
&lt;td&gt;Explicit target component instance method invocation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Host‑private&lt;/td&gt;
&lt;td&gt;DomainBridge&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;getSnapshot/subscribe/dispatch&lt;/code&gt;, does NOT enter Schema‑visible Scope&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Why the core stays stable
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Graph algorithms, layout, collision detection, collaboration protocols, CRDT/OT, local‑first sync, gesture loops—these are all important, but they are &lt;strong&gt;domain systems&lt;/strong&gt; and should not become core primitives. From Flux’s perspective, they are just production strategies behind a Resource, host snapshots behind a Host Projection, or command systems behind a Capability.&lt;/li&gt;
&lt;li&gt;New domains plug in by declaring a host type + projection fields + capability namespace, without needing to introduce new global provider families, environment registries, or new authoritative Schema channels.&lt;/li&gt;
&lt;li&gt;Cross‑domain generic write pattern for editable hosts: read Host Projection → write Capability (structured patch DTO) → DomainBridge host‑private.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Business semantics ownership
&lt;/h3&gt;

&lt;p&gt;Business pipelines (form submission, dialog confirmation, page entry) belong to the &lt;strong&gt;node&lt;/strong&gt; that owns that lifecycle boundary, not to the UI trigger. Concrete examples are given in Section 4 (Semantic Lifecycle Entry). This is a concrete manifestation of lexical ownership and domain isolation.&lt;/p&gt;




&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;#&lt;/th&gt;
&lt;th&gt;Principle&lt;/th&gt;
&lt;th&gt;One‑liner&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;DSL First&lt;/td&gt;
&lt;td&gt;The DSL is a first‑class structural layer independent of the runtime: editable, composable, and transformable before execution.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Authoring–Execution Separation&lt;/td&gt;
&lt;td&gt;Authoring and execution serve different optimisation goals; they should be separated by a pre‑compilation boundary, not mixed in the runtime.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Reactive Data‑Driven&lt;/td&gt;
&lt;td&gt;The Value primitive has built‑in dependency tracking, read/write separation, and side effects are funnelled through Capability.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Gradual Evolution&lt;/td&gt;
&lt;td&gt;Complexity should grow naturally from simple DSL forms and existing primitives, not by expanding the primitive set under pressure.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;Lexical Ownership&lt;/td&gt;
&lt;td&gt;Data, capabilities, resources, reactions, and their sidecars belong to lexical/subtree boundaries, not to a global runtime mega‑object.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;Domain Isolation &amp;amp; Abstraction&lt;/td&gt;
&lt;td&gt;The core provides a small, stable execution kernel; domain complexity stays outside the core and embeds through a narrow contract.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;nop-chaos-flux is open source:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/entropy-cloud/nop-chaos-flux" rel="noopener noreferrer"&gt;https://github.com/entropy-cloud/nop-chaos-flux&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Gitee: &lt;a href="https://gitee.com/canonical-entropy/nop-chaos-flux" rel="noopener noreferrer"&gt;https://gitee.com/canonical-entropy/nop-chaos-flux&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>frontend</category>
      <category>react</category>
      <category>lowcode</category>
      <category>ai</category>
    </item>
    <item>
      <title>Nop Chaos Flux: The Next-Generation Low-Code Rendering Engine After Baidu AMIS</title>
      <dc:creator>canonical</dc:creator>
      <pubDate>Wed, 06 May 2026 09:42:15 +0000</pubDate>
      <link>https://dev.to/canonical/nop-chaos-flux-the-next-generation-low-code-rendering-engine-after-baidu-amis-4ihc</link>
      <guid>https://dev.to/canonical/nop-chaos-flux-the-next-generation-low-code-rendering-engine-after-baidu-amis-4ihc</guid>
      <description>&lt;h2&gt;
  
  
  1. Introduction — Why Another Low-Code Framework?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://aisuda.bce.baidu.com/amis/zh-CN/docs/index" rel="noopener noreferrer"&gt;Baidu AMIS is an outstanding design&lt;/a&gt;. It is powerful, well-documented, widely used in various enterprise applications, and has a profound influence in the low‑code rendering space. However, AMIS has a long development history — through continuous iteration, its internal implementation has gradually become bloated and complex, and conceptual consistency is suboptimal in many places. Specifically, several issues stand out:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Inconsistent expression rules at the schema layer.&lt;/strong&gt; Although AMIS automatically handles boolean expressions with the &lt;code&gt;xxxOn&lt;/code&gt; suffix and template expressions with the &lt;code&gt;xxxExpr&lt;/code&gt; suffix via a generic regex in &lt;code&gt;getExprProperties&lt;/code&gt;, it does not generally support template interpolation on plain string properties (e.g., &lt;code&gt;label: "Hello ${name}"&lt;/code&gt;), nor expressions inside deeply nested objects. At the same time, static and dynamic values use different field names in the schema: &lt;code&gt;disabled&lt;/code&gt; / &lt;code&gt;disabledOn&lt;/code&gt;, &lt;code&gt;options&lt;/code&gt; / &lt;code&gt;source&lt;/code&gt;. Whether a property supports expressions, and which syntax it uses, lacks uniform rules.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Over‑responsibility of the store at runtime, mixing data and behavior.&lt;/strong&gt; AMIS's MST store acts as both a data container (&lt;code&gt;data&lt;/code&gt; field) and a carrier for data operations (&lt;code&gt;updateData&lt;/code&gt;, &lt;code&gt;changeValue&lt;/code&gt;), API calls (&lt;code&gt;fetchData&lt;/code&gt;, &lt;code&gt;saveRemote&lt;/code&gt;), dialog management (&lt;code&gt;openDialog&lt;/code&gt;, &lt;code&gt;closeDialog&lt;/code&gt;) — behavior methods are attached directly to the store. Moreover, the store's &lt;code&gt;data&lt;/code&gt; field itself is a scope object built on the prototype chain (&lt;code&gt;Object.create(superProps)&lt;/code&gt;), where data inheritance is implicit in the object structure, interweaving reactive updates with variable lookup.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;System environment dependencies passed layer by layer through props.&lt;/strong&gt; All system‑level objects in AMIS — store, env, data, render functions — must be passed down through React props. The props interfaces of renderers grow increasingly bloated; even intermediate layers that do not use these objects must forward them, increasing coupling between components and making renderer interfaces heavy.&lt;/p&gt;

&lt;p&gt;Previously, due to the enormous workload, I wrote only a few articles outlining thoughts on improving AMIS's design, never intending to rebuild a better low‑code runtime from scratch (see &lt;a href="https://mp.weixin.qq.com/s/kW_H7ZTZhwWG5KCFty7CoQ" rel="noopener noreferrer"&gt;Why Baidu AMIS Framework is an Excellent Design&lt;/a&gt; and &lt;a href="https://mp.weixin.qq.com/s/kCR-NNIH9t-WoGTCe8HxaA" rel="noopener noreferrer"&gt;Revisiting Baidu AMIS Framework and Declarative Programming&lt;/a&gt;). But with the support of AI, a single architect can now directly implement a complex framework. Therefore, starting in April 2026, I designed and implemented the Flux architecture. Flux is a complete rewrite of AMIS, but the goal is not to change the technology stack — it is to address the structural limitations of AMIS at the schema and runtime layers.&lt;/p&gt;

&lt;p&gt;Flux is the rendering layer of the Nop platform, not a standalone framework. The Nop platform, based on reversible computing principles, provides a series of structural transformation capabilities before the schema reaches the renderer — i18n substitution, permission pruning, module decomposition and inheritance, compile‑time metaprogramming. These concerns are addressed at the JSON structure level, without relying on any frontend framework runtime mechanisms. Section 10 of this article details these platform‑level capabilities. The rendering framework layer and the platform layer each fulfill their own responsibilities; this layering is an intentional architectural decision: problems that can be solved at the structural transformation layer are not carried into the rendering runtime.&lt;/p&gt;

&lt;p&gt;At the same time, Flux is designed with the assumption that the primary way schemas are produced is shifting from human handwriting to AI generation. This premise influences several design decisions — notably the explicitness of the styling system and tolerance for schema redundancy. For AI, explicit and predictable interfaces are friendlier than implicit conventions; for humans, reviewing and locally modifying an explicitly declared schema is also more reliable than understanding implicit defaults. Of course, this does not mean the framework is unusable for human‑authored schemas — it merely tips the design trade‑off toward determinism.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Core Philosophy — Unified Value Semantics
&lt;/h2&gt;

&lt;p&gt;The most fundamental difference between Flux and AMIS lies in how values are expressed.&lt;/p&gt;

&lt;p&gt;AMIS's approach: a property can be either a static value or an expression. To distinguish the two, AMIS introduces a family of parallel fields in the base schema (&lt;code&gt;amis-core/src/schema.ts&lt;/code&gt;). Every property that needs dynamic control is split into two: a static field and an expression variant with an &lt;code&gt;On&lt;/code&gt; suffix — &lt;code&gt;disabled&lt;/code&gt; / &lt;code&gt;disabledOn&lt;/code&gt;, &lt;code&gt;visible&lt;/code&gt; / &lt;code&gt;visibleOn&lt;/code&gt;, &lt;code&gt;hidden&lt;/code&gt; / &lt;code&gt;hiddenOn&lt;/code&gt;, &lt;code&gt;static&lt;/code&gt; / &lt;code&gt;staticOn&lt;/code&gt;. At the form item level there is &lt;code&gt;required&lt;/code&gt; / &lt;code&gt;requiredOn&lt;/code&gt;, and in some renderers (like Table/CRUD) there are expression variants like &lt;code&gt;classNameExpr&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This split creates difficulties when extending. The number of fields doubles, and schema authors have to remember which properties use the static form and which use the expression form. Worse, the two are mutually exclusive — writing &lt;code&gt;disabled: true&lt;/code&gt; and &lt;code&gt;disabledOn&lt;/code&gt; together is not allowed, but the framework does not enforce this. It all relies on conventions and documentation.&lt;/p&gt;

&lt;p&gt;AMIS's parallel fields elevate the semantic difference inside a value — "this is static" vs. "this is dynamic" — to the structural level of the object, expressing that difference through distinct field names. This approach externalizes a judgment that should belong to the &lt;strong&gt;value&lt;/strong&gt; as an &lt;strong&gt;object structure&lt;/strong&gt;, forcing structural changes when extension is needed.&lt;/p&gt;

&lt;p&gt;Flux's approach unifies under a single field name, letting the compiler distinguish the type of value.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;disabled&lt;/code&gt; is just &lt;code&gt;disabled&lt;/code&gt;. It can be a static boolean &lt;code&gt;true&lt;/code&gt;, an expression &lt;code&gt;${$form.submitting}&lt;/code&gt;, or a template string containing an expression &lt;code&gt;"${name} is disabled"&lt;/code&gt;. How to distinguish these forms? Let the compiler decide, rather than having schema authors memorize various suffixes. This judgment is confined to the expression of the value and does not need to be elevated to the object structure level.&lt;/p&gt;

&lt;p&gt;The type system behind this is as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;CompiledValueNode&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;T&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;static-node&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;T&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;expression-node&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;compiled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;CompiledExpression&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;T&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;template-node&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;compiled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;CompiledStringTemplate&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;T&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;array-node&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;CompiledValueNode&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;object-node&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;keys&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;[];&lt;/span&gt; &lt;span class="nl"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Record&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;CompiledValueNode&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At compile time, the compiler analyzes each field's value, determines which kind of node it is, and wraps the result into &lt;code&gt;CompiledRuntimeValue&lt;/code&gt; at runtime — static nodes are directly wrapped as &lt;code&gt;StaticRuntimeValue&lt;/code&gt; (zero‑cost return), dynamic nodes are wrapped as &lt;code&gt;DynamicRuntimeValue&lt;/code&gt; (carrying evaluation closure and state tracking). &lt;code&gt;CompiledValueNode&lt;/code&gt; at compile time is a pure data tree; &lt;code&gt;CompiledRuntimeValue&lt;/code&gt; at runtime is an executable wrapper:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;CompiledRuntimeValue&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;T&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;static&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;isStatic&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;node&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;StaticValueNode&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;T&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;T&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dynamic&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;isStatic&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;node&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;DynamicValueNode&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;T&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nf"&gt;createState&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="nx"&gt;RuntimeValueState&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;T&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nf"&gt;exec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;ValueEvaluationResult&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;T&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The compiler analyzes each field's value at compile time, determines which kind of node it is, and generates the corresponding compiled result. At runtime, only the compiled result is executed — no further determination is needed. Expression compilation also performs automatic optimization: if the expression's value is constant (e.g., &lt;code&gt;"${1 + 2}"&lt;/code&gt; is optimized to the static value &lt;code&gt;3&lt;/code&gt;), it directly returns a static value without incurring dynamic evaluation overhead. Therefore, even if written as an expression, the compiler automatically eliminates dynamic evaluation cost when the result is constant. To output a literal &lt;code&gt;$&lt;/code&gt; symbol in a template string, use &lt;code&gt;${'$'}&lt;/code&gt; for escaping.&lt;/p&gt;

&lt;p&gt;By limiting the semantic difference of "a value can be static or dynamic" to the value level via the five node types of &lt;code&gt;CompiledValueNode&lt;/code&gt;, three benefits are achieved:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Simpler schema:&lt;/strong&gt; the number of fields is halved; schema authors do not need to memorize &lt;code&gt;xxxOn&lt;/code&gt; rules; &lt;code&gt;disabled&lt;/code&gt; is just &lt;code&gt;disabled&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unambiguous composition and inheritance:&lt;/strong&gt; each field name is unique; there is no priority conflict when both &lt;code&gt;disabled&lt;/code&gt; and &lt;code&gt;disabledOn&lt;/code&gt; appear; semantics remain clear when overriding layer by layer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compile‑time classification paves the way for later optimizations:&lt;/strong&gt; &lt;code&gt;static-node&lt;/code&gt; takes the zero‑cost fast path; &lt;code&gt;expression-node&lt;/code&gt; and &lt;code&gt;object-node&lt;/code&gt; independently track references, providing the structural prerequisite for full‑value tree compilation (Section 3).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This design also provides a structural foundation for type safety: each node has an explicit type tag, allowing TypeScript to provide effective type checking on most call paths — the implementation keeps a small number of type assertions for practicality; type safety is layered rather than absolute.&lt;/p&gt;

&lt;p&gt;This distinction is not merely syntactic convenience; it sinks the semantic difference of values from the object structure down to the value level. What schema authors see is what exists at runtime, with no cognitive gap.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Full‑Value Tree Compilation — Static Fast Path and Dynamic Reuse
&lt;/h2&gt;

&lt;p&gt;An important feature enabled by unified value semantics is that we can compile the entire schema value tree, not just the expressions inside it.&lt;/p&gt;

&lt;p&gt;Traditional frameworks typically compile only expressions, using static values directly at runtime. Flux compiles the entire value tree structure.&lt;/p&gt;

&lt;p&gt;Consider a static configuration object:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"button"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Submit"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"disabled"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"className"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"btn-primary"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In a traditional framework, this object must be parsed and passed on every render. In Flux, when the schema is first passed to the renderer, the compiler triggers a one‑time JIT compilation — it recognizes this as a purely static node, generates the corresponding compiled result, and caches it. Every subsequent runtime access to this compiled result directly returns a reference to the original object, without any further decision making.&lt;/p&gt;

&lt;p&gt;For an object containing dynamic parts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"button"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Submit"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"disabled"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${$form.submitting}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"className"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${$form.submitting ? 'btn-disabled' : 'btn-primary'}"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The compiler compiles this object into an &lt;code&gt;object-node&lt;/code&gt;, where each expression field has its own evaluation state. At runtime, each field tracks its previous computed result independently; finally, the assembled object is compared with the previous result using &lt;code&gt;shallowEqual&lt;/code&gt; — if none of the field references have changed, the previously computed object reference is returned directly without creating a new object.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;RuntimeValueState&lt;/code&gt; maintains the previously computed value for each node; the &lt;code&gt;reusedReference&lt;/code&gt; flag in &lt;code&gt;ValueEvaluationResult&lt;/code&gt; tells the caller whether an old reference was reused. This mechanism works most stably for object structures defined by the schema (&lt;code&gt;object-node&lt;/code&gt;): each field's expression is tracked separately; as long as the references of field values do not change, the outer object's reference does not change either.&lt;/p&gt;

&lt;p&gt;This design has a significant impact on React performance. React's re‑rendering is based on reference equality; stable object references allow child components to skip unnecessary renders.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Scope Chain — Explicit Lexical Interface and Lazy Merging
&lt;/h2&gt;

&lt;p&gt;In low‑code frameworks, scope is a core concept. Components need to access various contextual information such as form data, page parameters, and environment variables.&lt;/p&gt;

&lt;p&gt;AMIS builds the scope chain via &lt;code&gt;createObject&lt;/code&gt; (&lt;code&gt;amis-core/src/utils/object.ts&lt;/code&gt;), which is implemented using JavaScript's prototype chain: child scopes are created via &lt;code&gt;Object.create(parentScope)&lt;/code&gt;, variable lookup travels upward along the prototype chain, and same‑named variables automatically shadow those in parent scopes. This mechanism is not inherently crude, but its problem lies in &lt;strong&gt;implicitness&lt;/strong&gt; — everything is implemented through the JS engine's internal prototype chain, with no explicit interface contracts, and no way to accurately distinguish between "read only the current layer" and "read the entire chain" without understanding the internal implementation.&lt;/p&gt;

&lt;p&gt;Flux adopts an explicit &lt;code&gt;ScopeRef&lt;/code&gt; lexical lookup chain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;ScopeRef&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;parent&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nx"&gt;ScopeRef&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Record&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kr"&gt;any&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;unknown&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nf"&gt;has&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nf"&gt;readOwn&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="nb"&gt;Record&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kr"&gt;any&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nf"&gt;readVisible&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="nb"&gt;Record&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kr"&gt;any&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nf"&gt;materializeVisible&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="nb"&gt;Record&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kr"&gt;any&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each scope is linked via a &lt;code&gt;parent&lt;/code&gt; pointer, forming a chain structure. When looking up a variable, the &lt;code&gt;get(path)&lt;/code&gt; method walks up the chain until it finds the corresponding value or reaches the root.&lt;/p&gt;

&lt;p&gt;This design has several key advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Explicit interface semantics:&lt;/strong&gt; &lt;code&gt;readOwn()&lt;/code&gt; returns only the current layer's data; &lt;code&gt;readVisible()&lt;/code&gt; returns the lexically visible view; &lt;code&gt;materializeVisible()&lt;/code&gt; explicitly expands when a plain object is truly needed. The underlying implementation may use the prototype chain to optimize &lt;code&gt;readVisible()&lt;/code&gt; performance, but the interface semantics are independent of the implicit behavior of the JS prototype chain — the boundaries between these operations are immediately clear, without needing to understand internal details.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lazy expansion:&lt;/strong&gt; only when a complete plain object is truly required does &lt;code&gt;materializeVisible()&lt;/code&gt; execute; most of the time access goes through &lt;code&gt;get()&lt;/code&gt; or &lt;code&gt;readVisible()&lt;/code&gt; to access individual variables, avoiding unnecessary object construction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testability:&lt;/strong&gt; &lt;code&gt;ScopeRef&lt;/code&gt; is an ordinary interface that can be constructed and tested independently, without relying on the implicit behavior of the JS prototype chain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Traceability:&lt;/strong&gt; the &lt;code&gt;id&lt;/code&gt; and &lt;code&gt;path&lt;/code&gt; fields allow scopes to be precisely located during debugging and logging.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The usage pattern is also clear: &lt;code&gt;scope.get(path)&lt;/code&gt; is the fast path for high‑frequency operations; &lt;code&gt;scope.readVisible()&lt;/code&gt; is suitable for obtaining the lexically visible view; &lt;code&gt;scope.materializeVisible()&lt;/code&gt; is the low‑frequency fallback for plain‑object needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Data, Actions, Components — Three Trees, Three Origins
&lt;/h2&gt;

&lt;p&gt;Flux splits the runtime into three independent tree structures.&lt;/p&gt;

&lt;p&gt;Starting from the fundamental structure of object‑oriented GUI systems, a complete GUI runtime essentially contains three orthogonal dimensions: &lt;strong&gt;ComponentTree&lt;/strong&gt; (the organization of components on the interface), &lt;strong&gt;StateTree&lt;/strong&gt; (the distribution and flow of data and state), and &lt;strong&gt;ActionTree&lt;/strong&gt; (the operations that can be performed and their naming/resolution rules). Although these three dimensions collaborate within the same UI, they have fundamentally different growth patterns and lifecycles. Traditional object‑oriented design mixes them into a single tree, which is the root of complexity.&lt;/p&gt;

&lt;p&gt;In Flux, these three conceptual dimensions correspond to concrete runtime carriers: &lt;strong&gt;StateTree ≈ &lt;code&gt;ScopeRef&lt;/code&gt;&lt;/strong&gt; (lexical data visibility chain), &lt;strong&gt;ActionTree ≈ &lt;code&gt;ActionScope&lt;/code&gt;&lt;/strong&gt; (namespace action resolution chain), &lt;strong&gt;ComponentTree ≈ compiled &lt;code&gt;Template&lt;/code&gt; structure&lt;/strong&gt; (immutable component tree description). &lt;code&gt;ComponentHandleRegistry&lt;/code&gt; is a separate instance‑level location layer responsible for looking up component handles by &lt;code&gt;id&lt;/code&gt;/&lt;code&gt;name&lt;/code&gt;; it supports the resolution of instance‑targeted actions like &lt;code&gt;component:&amp;lt;method&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This divide‑and‑conquer approach stems from a fundamental observation about object‑oriented GUI systems: the core essence of OO technology in the GUI domain lies in the organizational relationship between ComponentTree, StateTree, and ActionTree — components form the static structure, data flows in the state tree, and events bubble along the action tree. Flux formalizes this observation into three independent runtime structures, each with explicit lexical lookup semantics.&lt;/p&gt;

&lt;p&gt;Particularly noteworthy is the isomorphism between lexical scoping and event bubbling: if we stipulate that event names passed upward are exactly function names, then the event bubbling process can be seen as a function name resolution process in the lexical scope. &lt;code&gt;xui:imports&lt;/code&gt; creates different lexical scopes at different levels; action resolution always starts from the nearest scope and, if not found, looks up to the parent scope — exactly the same as variable resolution rules in programming languages. The separation of the three trees is not for its own sake, but because they have fundamentally different growth patterns and lifecycles; forcibly unifying them would only introduce unnecessary coupling.&lt;/p&gt;

&lt;p&gt;In traditional low‑code frameworks like AMIS, data and behavior are mixed in the same scope object. Need to access data? Take it from the scope. Need to invoke an action? Also take it from the scope. This design is convenient for simple scenarios, but it masks an essential difference: &lt;strong&gt;the composition sources of data and behavior are fundamentally different.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data is structural.&lt;/strong&gt; Data flows in naturally as the component tree renders — when a form component mounts, its field values enter the scope; when a &lt;code&gt;data-source&lt;/code&gt; component receives a response, the result is written into the scope. The growth of the data scope is strictly bound to the rendering process of the component tree — it is passive and follows the structure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Behavior is declaratively imported.&lt;/strong&gt; Through &lt;code&gt;xui:imports&lt;/code&gt;, a container can import capabilities from external libraries — &lt;code&gt;demo-lib&lt;/code&gt;, &lt;code&gt;spreadsheet-lib&lt;/code&gt;. These libraries have no relation to the position of the current component in the tree; they are loaded asynchronously and have their own initialization and destruction lifecycles. The source of behavior lies outside the component tree.&lt;/p&gt;

&lt;p&gt;If data and behavior are placed in the same tree, fundamental lifecycle conflicts arise: the data scope follows the mounting/unmounting of components; libraries loaded via &lt;code&gt;xui:imports&lt;/code&gt; may need asynchronous initialization, reference counting to manage multiple imports, and independent teardown when unmounted. These requirements cannot be uniformly managed by the same mechanism.&lt;/p&gt;

&lt;p&gt;Therefore, Flux splits the runtime into three independent trees:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ScopeRef&lt;/strong&gt; handles the data layer: values, variables, form state, and other pure data information. &lt;code&gt;get(path)&lt;/code&gt; walks up the chain to look up a variable name; &lt;code&gt;readOwn()&lt;/code&gt; reads only the current layer; &lt;code&gt;readVisible()&lt;/code&gt; returns the lexically visible view — the semantics of the three operations are directly expressed by the interface names, rather than reliant on implementation details.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ActionScope&lt;/strong&gt; handles action capabilities, i.e., executable operations. Actions are organized by namespaces — &lt;code&gt;designer:addNode&lt;/code&gt;, &lt;code&gt;spreadsheet:setCellValue&lt;/code&gt; — namespaces are dynamically registered via &lt;code&gt;xui:imports&lt;/code&gt;, completely isolated from the data scope, so adding or removing actions does not affect variable lookup. The action resolution order in the action dispatcher has a clear priority: first built‑in platform actions (&lt;code&gt;setValue&lt;/code&gt;, &lt;code&gt;ajax&lt;/code&gt;, &lt;code&gt;dialog&lt;/code&gt;), then component‑targeted actions (&lt;code&gt;component:submit&lt;/code&gt;, &lt;code&gt;component:validate&lt;/code&gt;), and finally namespace actions (&lt;code&gt;designer:export&lt;/code&gt;, &lt;code&gt;spreadsheet:mergeRange&lt;/code&gt;). This hierarchy ensures both flexibility and sensible defaults.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ComponentHandleRegistry&lt;/strong&gt; handles the location and access of component instances. &lt;code&gt;id&lt;/code&gt; is a stable and unique anchor within a page; &lt;code&gt;name&lt;/code&gt; is a local logical name suitable for reuse within different local boundaries — but if duplicated within the same resolution boundary, an explicit ambiguity error is triggered. Schema authors use &lt;code&gt;component:&amp;lt;method&amp;gt;&lt;/code&gt; together with &lt;code&gt;componentId&lt;/code&gt; or &lt;code&gt;componentName&lt;/code&gt; to specify the target component; the runtime may perform internal index optimizations for statically resolvable targets to reduce common lookup costs.&lt;/p&gt;

&lt;p&gt;These three trees share the same design intuition: &lt;strong&gt;chain lexical lookup&lt;/strong&gt;. &lt;code&gt;ScopeRef.get(path)&lt;/code&gt; resolves variable names; &lt;code&gt;ActionScope.resolve('demo:open')&lt;/code&gt; looks up the &lt;code&gt;demo&lt;/code&gt; namespace along the chain (just like lexical scope resolution of function names in programming languages); &lt;code&gt;ComponentHandleRegistry.resolve(target)&lt;/code&gt; locates component handles. Each tree maintains its own independent lifecycle semantics, but the lookup logic inside each tree follows the same upward‑chain principle, preserving overall design consistency.&lt;/p&gt;

&lt;p&gt;This "three‑tree separation" design continues the separation‑of‑concerns thinking from classic architectures like MVC, but grounds it as a self‑consistent implementation scheme for the low‑code domain.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.1 xui:actions — Schema‑Local Named Action Chains
&lt;/h3&gt;

&lt;p&gt;The separation of the three trees makes the origin of actions clear and controllable, but a recurring issue remains in practice: how can reusable action sequences be expressed in a schema?&lt;/p&gt;

&lt;p&gt;In previous implementations, if multiple schema nodes needed to execute the same action sequence (e.g., a set of &lt;code&gt;ajax&lt;/code&gt; calls with fixed parameters), the only options were to define those actions at a higher‑level node and reference them by name, or to duplicate the definitions on each node. The former moves action definitions far from their usage sites; the latter creates redundancy.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;xui:actions&lt;/code&gt; solves this problem. Schema nodes can now declare named action chains via &lt;code&gt;xui:actions&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"container"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"xui:actions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"myAction"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ajax"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/api/submit"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"notify"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Submitted successfully"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"button"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"onClick"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"myAction"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At compile time, action chains declared in &lt;code&gt;xui:actions&lt;/code&gt; are compiled and stored on the template node. At runtime, they are accessible via &lt;code&gt;ActionScope&lt;/code&gt; — a synthetic namespace driven by the compilation results, not requiring an explicit import via &lt;code&gt;xui:imports&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Lexical inheritance is the key design feature: when the requested action name is not found at the current level, the namespace provider falls back upward to the parent scope. This means child nodes automatically inherit named actions defined by parent nodes, without needing to redeclare them. This behavior is exactly consistent with the lexical lookup model of the data scope — although the origin of actions differs from data, the lookup semantics follow the same design intuition.&lt;/p&gt;

&lt;p&gt;The action resolution order thus expands to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Built‑in platform actions&lt;/strong&gt; (&lt;code&gt;setValue&lt;/code&gt;, &lt;code&gt;ajax&lt;/code&gt;, &lt;code&gt;dialog&lt;/code&gt;, etc.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Component‑targeted actions&lt;/strong&gt; (&lt;code&gt;component:submit&lt;/code&gt;, &lt;code&gt;component:validate&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Named actions&lt;/strong&gt; (local action chains defined by &lt;code&gt;xui:actions&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Namespace actions&lt;/strong&gt; (external libraries imported via &lt;code&gt;xui:imports&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resolution failure:&lt;/strong&gt; error reported if none of the above match&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With the addition of &lt;code&gt;xui:actions&lt;/code&gt;, "named actions" become first‑class citizens in the resolution chain, standing alongside built‑in actions and namespace actions. Each layer has its own origin and priority. This resolves the previous practical pain point: reusable action sequences can be defined locally, inherited lexically, and no longer require a binary choice between global definitions and per‑node duplication.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. xui:imports — Declarative Capability Import
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;xui:imports&lt;/code&gt; is a direct manifestation of the separation between behavior and data. It addresses a very practical problem: schema authors cannot write &lt;code&gt;import&lt;/code&gt; statements; schemas may be dynamically loaded from the server. How can a schema fragment declare the external capabilities it depends on without causing global pollution?&lt;/p&gt;

&lt;p&gt;In traditional frameworks, third‑party capabilities are usually introduced through global registration. The problem is that global registration easily leads to conflicts and offers no control over scope.&lt;/p&gt;

&lt;p&gt;Flux draws inspiration from ES module imports and introduces the &lt;code&gt;xui:imports&lt;/code&gt; declaration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"container"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"xui:imports"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"from"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"demo-lib"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"as"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"demo"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"button"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"onClick"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"demo:open"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${id}"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;from&lt;/code&gt; specifies the library to import; &lt;code&gt;as&lt;/code&gt; specifies the namespace prefix after import. The imported library is registered into the &lt;code&gt;ActionScope&lt;/code&gt; of the current container, becoming an action namespace available to that container and its descendants. Complex hosts such as Flow Designer, Report Designer, and Spreadsheet also follow the same lexical boundary discipline: each host page establishes its own local &lt;code&gt;ActionScope&lt;/code&gt;, and then registers the host namespace within that boundary.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;xui:imports&lt;/code&gt; has several key characteristics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Declarative:&lt;/strong&gt; dependencies are explicitly declared in the schema, without requiring code‑side registration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lexical visibility:&lt;/strong&gt; child containers see imports from parent containers, but sibling containers do not see each other's imports — this is intuitive and avoids naming conflicts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Idempotency and automatic deduplication:&lt;/strong&gt; when the same library is imported at multiple levels, module loading is deduplicated by a normalized import key; registration on the scope side follows the container's lifecycle. The current implementation already has frame‑level reference counting and release paths — repeated installation increments &lt;code&gt;refCount&lt;/code&gt;, and on release the import stack is popped and the corresponding registration is cleaned up.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security:&lt;/strong&gt; the &lt;code&gt;from&lt;/code&gt; value is resolved by the host‑provided &lt;code&gt;env.importLoader&lt;/code&gt;; the framework itself does not perform any URL resolution or script loading. The security boundary is clearly defined: the framework is responsible for managing lexical visibility and lifecycle (registration and teardown) of imports; the host decides which libraries can be loaded and how. It is recommended that hosts implement a whitelist mechanism, allowing only pre‑registered trusted library identifiers rather than accepting arbitrary URLs. In the current implementation, if the host does not provide an &lt;code&gt;importLoader&lt;/code&gt;, imports are not silently ignored but enter an explicit failure state, exposing the wiring error via &lt;code&gt;env.notify('error', ...)&lt;/code&gt; and monitor diagnostics; subsequent calls to that namespace return a failure result. Namespace isolation ensures that imported libraries cannot override built‑in platform actions (&lt;code&gt;setValue&lt;/code&gt;, &lt;code&gt;ajax&lt;/code&gt;, etc.); namespace actions always have lower resolution priority than built‑in actions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This also explains why &lt;code&gt;ActionScope&lt;/code&gt; must be separate from &lt;code&gt;ScopeRef&lt;/code&gt;: library loading is asynchronous and has its own registration, reference counting, and teardown semantics, which are fundamentally incompatible with the synchronous, structural growth pattern of the data scope.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Data Fetching and Dynamic Schema — Splitting the Service
&lt;/h2&gt;

&lt;p&gt;In AMIS, &lt;code&gt;Service&lt;/code&gt; is a "do‑everything" component: it simultaneously takes on two responsibilities — fetching data via &lt;code&gt;api&lt;/code&gt; (&lt;code&gt;store.fetchData&lt;/code&gt;) and dynamically loading a Schema via &lt;code&gt;schemaApi&lt;/code&gt; (&lt;code&gt;store.fetchSchema&lt;/code&gt;). These two paths share the same component instance and the same store, tightly coupling their lifecycles. If you want to load both a schema and data, and even add polling, properties like &lt;code&gt;initFetch&lt;/code&gt;, &lt;code&gt;initFetchSchema&lt;/code&gt;, &lt;code&gt;interval&lt;/code&gt;, &lt;code&gt;stopAutoRefreshWhen&lt;/code&gt; must be combined, making the intent of the schema fuzzy.&lt;/p&gt;

&lt;p&gt;Moreover, the way AMIS merges API request data with the scope is implicit — internally, it uses &lt;code&gt;createObject&lt;/code&gt; to merge the current data scope into request parameters, making it difficult for users to precisely control which data is sent to the server. Schema authors must understand these implicit behaviors to use them correctly.&lt;/p&gt;

&lt;p&gt;From a computational model perspective, &lt;code&gt;api&lt;/code&gt; and &lt;code&gt;schemaApi&lt;/code&gt; are two fundamentally different computation patterns. &lt;code&gt;api&lt;/code&gt; is essentially a &lt;strong&gt;reactive asynchronous computation&lt;/strong&gt;: it establishes a mapping from "state → remote value", retriggering the request when the state changes — it is an asynchronous version of &lt;code&gt;computed&lt;/code&gt;. The input is the current state in the scope; the output is a remote value that updates as the state changes. &lt;code&gt;schemaApi&lt;/code&gt;, on the other hand, is a one‑time &lt;strong&gt;structure initialization&lt;/strong&gt;: it fires when the component first mounts, and the result is a description of the render tree, used to decide "what to render", not "what data to show". Mixing the two in the same component couples lifecycles and conflates computational semantics.&lt;/p&gt;

&lt;p&gt;Flux splits these two responsibilities into separate renderers. Remote calls uniformly enter the runtime via action dispatch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"container"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"data-source"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ajax"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/api/user/${userId}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"includeScope"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"userId"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"user"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"interval"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"stopWhen"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${user.loaded}"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Hello, ${user.name}"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;data-source&lt;/code&gt; is dedicated to declarative data fetching. It is a side‑effect node that does not directly render UI: it fetches data via the action mechanism, publishes the result into the current scope under &lt;code&gt;name&lt;/code&gt;, and optionally polls via &lt;code&gt;interval&lt;/code&gt; + &lt;code&gt;stopWhen&lt;/code&gt;. It returns &lt;code&gt;null&lt;/code&gt;, so loading, empty, or error states are handled by sibling nodes in the same scope or by the host notification mechanism.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"dynamic-renderer"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"loadAction"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ajax"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/api/schema/${pageId}"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Loading..."&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;dynamic-renderer&lt;/code&gt; is dedicated to dynamic schema loading. It declares the loading action via &lt;code&gt;loadAction&lt;/code&gt; (unified with the action mechanism used by &lt;code&gt;data-source&lt;/code&gt;), obtains the remote schema, and renders it — focusing solely on the "what to render" concern.&lt;/p&gt;

&lt;p&gt;This split brings several benefits. First, concerns are clearer: each component does one thing, making intent easier to understand. Second, lifecycles are independent — polling in &lt;code&gt;data-source&lt;/code&gt; does not affect schema loading in &lt;code&gt;dynamic-renderer&lt;/code&gt;. Finally, the semantics of the request description object become more precise: &lt;code&gt;includeScope&lt;/code&gt; explicitly declares which lexical scope variables are injected into the request; &lt;code&gt;params&lt;/code&gt; clearly distinguishes URL query parameters; the actual execution path is uniformly converged to the &lt;code&gt;ajax&lt;/code&gt; action and the runtime request preparation flow.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Field Metadata Driven — Compiler Makes Decisions, Not Renderers
&lt;/h2&gt;

&lt;p&gt;A &lt;code&gt;title&lt;/code&gt; field might be a string &lt;code&gt;"Hello"&lt;/code&gt;, or a rendering fragment &lt;code&gt;{"type": "text", "text": "Hello ${name}"}&lt;/code&gt;, or even an event handler. A renderer would have to determine the field type each time and dispatch logic accordingly — error‑prone and performance‑impacting.&lt;/p&gt;

&lt;p&gt;Flux's approach: let renderers define field metadata, and let the compiler perform normalization during compilation.&lt;/p&gt;

&lt;p&gt;Field metadata includes the kind of field: &lt;code&gt;meta&lt;/code&gt;, &lt;code&gt;prop&lt;/code&gt;, &lt;code&gt;region&lt;/code&gt;, &lt;code&gt;value-or-region&lt;/code&gt;, &lt;code&gt;event&lt;/code&gt;, &lt;code&gt;ignored&lt;/code&gt;, etc. The most interesting is &lt;code&gt;value-or-region&lt;/code&gt;, which allows the same field name to be compiled differently depending on the input type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"card"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Simple Title"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here &lt;code&gt;title&lt;/code&gt; is a string, compiled and passed directly to the renderer as &lt;code&gt;props.title&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"card"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${name} - ${status}"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here &lt;code&gt;title&lt;/code&gt; is a schema fragment. Compiled and placed into &lt;code&gt;regions.title&lt;/code&gt;, the renderer will render the content of this fragment.&lt;/p&gt;

&lt;p&gt;The renderer's code becomes extremely simple, requiring no manual decisions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;titleContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;regions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The compiler has already moved the complex decision logic forward, keeping the renderer simple — it only consumes the compiled output.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Styling System — Configurable Explicit Styles
&lt;/h2&gt;

&lt;p&gt;Hardcoding styles in renderers (e.g., a container adding &lt;code&gt;gap‑4&lt;/code&gt; by default) makes it hard for schema authors to adjust because they cannot see the default values; providing no styling at all forces every usage scenario to repeat configuration.&lt;/p&gt;

&lt;p&gt;Flux's styling system draws from shadcn/ui's design philosophy, dividing styling responsibilities into two layers: &lt;strong&gt;visual defaults at the component library layer&lt;/strong&gt; and &lt;strong&gt;structural arrangement at the renderer layer&lt;/strong&gt;. The underlying UI components (shadcn/ui based on Base UI) come with sensible visual defaults — borders, rounded corners, focus rings, spacing — so that a &lt;code&gt;{"type": "input-text"}&lt;/code&gt; renders as a consistently styled input without any additional class names. &lt;strong&gt;The renderer layer does not inject extra visual preferences on top of the component library's defaults&lt;/strong&gt;; &lt;code&gt;className&lt;/code&gt; in the schema is used for layout customization and visual tailoring, not for providing basic appearance.&lt;/p&gt;

&lt;p&gt;The core principle is: the renderer layer does not inject default visual styles unrelated to the schema's intent. The basic visual appearance of primitive components is provided by shadcn/ui; the renderer is only responsible for translating structural semantics (flex direction, alignment, etc.). This means that when you look at the schema for a component, the &lt;code&gt;className&lt;/code&gt; you see is a declaration of layout and customization, not a repetition of basic appearance. Components like &lt;code&gt;nop-container&lt;/code&gt; and &lt;code&gt;nop-flex&lt;/code&gt; are only responsible for structural semantics and do not carry fixed visual styles. When a renderer maps semantic attributes like &lt;code&gt;direction&lt;/code&gt;, &lt;code&gt;align&lt;/code&gt; to utility classes like &lt;code&gt;flex&lt;/code&gt;, &lt;code&gt;items-center&lt;/code&gt;, this is a direct translation of the schema's intent, not an implicit preference introduced outside the schema.&lt;/p&gt;

&lt;p&gt;This approach has several practical benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Full controllability:&lt;/strong&gt; all renderer‑layer styles are explicitly visible in the schema; there is no confusion like "where did this spacing come from?"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unambiguous overrides:&lt;/strong&gt; because the renderer does not inject implicit styles, any custom class names take effect directly, without needing &lt;code&gt;!important&lt;/code&gt; to fight framework defaults.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Project‑level reusability:&lt;/strong&gt; the same Tailwind configuration can be shared across pages, ensuring visual consistency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI‑friendly:&lt;/strong&gt; an explicit, predictable style interface is more beneficial for AI generation scenarios — the AI does not need to "know" what styles the renderer internally injects; the generated result is WYSIWYG.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When the same set of Tailwind class names appears repeatedly in multiple places, &lt;code&gt;classAliases&lt;/code&gt; provides an abstraction for reuse:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"classAliases"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"card"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"bg-white rounded-lg shadow-md p-4"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"card-hover"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"hover:shadow-lg hover:border-blue-300"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"btn-primary"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"bg-blue-500 text-white hover:bg-blue-600"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In components, these aliases are referenced directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"card"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"className"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"card card-hover"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"button"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"className"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"btn-primary"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Submit"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;classAliases&lt;/code&gt; is a naming abstraction on top of Tailwind — it does not change the principle of "explicitly declared styles". The schema still writes &lt;code&gt;className: "card card-hover"&lt;/code&gt;; no style is silently injected by the renderer. It solves the problem of repetitive writing, rather than introducing implicit behavior.&lt;/p&gt;

&lt;p&gt;The scope inheritance mechanism is also natural: child components can override aliases of the same name from parent components. For example, if a different &lt;code&gt;card&lt;/code&gt; style is needed in a specific region, it can be redefined in that region's &lt;code&gt;classAliases&lt;/code&gt; without affecting other places.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Layered Responsibilities — What the Renderer Does Not Need to Know
&lt;/h2&gt;

&lt;p&gt;A common design tendency in low‑code frameworks is to stuff every concern into the rendering layer: i18n using the &lt;code&gt;t('key')&lt;/code&gt; function, permissions using conditional rendering like &lt;code&gt;v-if="hasPermission"&lt;/code&gt;, modularization using global registration. This blurs the responsibility boundary of the rendering framework and leads to growing internal complexity.&lt;/p&gt;

&lt;p&gt;Flux adopts a different strategy: &lt;strong&gt;explicitly divide which concerns belong to the rendering framework, which belong to the platform layer, and which belong to the component library layer.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Nop Platform Layer (structural transformation)
  → i18n text substitution (@i18n: prefix, pure JSON operations)
  → permission pruning (xui:roles / xui:permissions, delete nodes without permission)
  → module decomposition and merging (x:extends / x:gen-extends)
  → compile‑time metaprogramming (XPL template language)
  → XML/JSON bidirectional conversion
         ↓ outputs processed, clean JSON
Flux Rendering Framework Layer
  → unified value compilation, scope management, action dispatch, rendering coordination
         ↓
shadcn/ui / Radix UI Component Layer
  → component‑level visual defaults
  → component‑level accessibility support (ARIA roles, focus management, keyboard navigation)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The core principle of this layering is: each layer solves only its own problems and does not leak responsibilities to adjacent layers.&lt;/p&gt;

&lt;h3&gt;
  
  
  10.1 Internationalization (i18n) — Structural Transformation at the Platform Layer
&lt;/h3&gt;

&lt;p&gt;i18n is handled at the platform layer via JSON structural transformation, without involving any frontend framework runtime mechanisms. The Nop platform provides two complementary syntaxes:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Inline value approach&lt;/strong&gt; — compact, suitable for new schemas:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@i18n:common.batchDelete|Batch delete"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;@i18n:&lt;/code&gt; prefix identifies the internationalization key to replace; the text after &lt;code&gt;|&lt;/code&gt; serves as both a fallback and provides readability — even without looking up an i18n dictionary, one can understand what the schema is saying.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Companion property approach&lt;/strong&gt; — non‑invasive to the original value, suitable for retrofitting i18n into existing schemas:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Batch Delete"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"@i18n:label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"common.batchDelete"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add a corresponding &lt;code&gt;@i18n:key&lt;/code&gt; property for each key that needs internationalization; the original value is not modified.&lt;/p&gt;

&lt;p&gt;After processing, &lt;code&gt;@i18n:&lt;/code&gt; markers no longer exist in the JSON; what the rendering framework sees is the final text for the current locale. This means that even if the rendering layer is replaced — Flux, AMIS, or even native React — i18n continues to work.&lt;/p&gt;

&lt;h3&gt;
  
  
  10.2 Permission Control — Structural Pruning over Runtime Hiding
&lt;/h3&gt;

&lt;p&gt;Permission control is also handled at the platform layer. The Nop platform defines permission‑related properties such as &lt;code&gt;xui:roles&lt;/code&gt; and &lt;code&gt;xui:permissions&lt;/code&gt;. Upon receiving the JSON page data, it automatically verifies whether the permission conditions are satisfied and &lt;strong&gt;deletes all nodes that do not meet the permission requirements&lt;/strong&gt;. This processing takes place on the JSON structure, without involving any frontend‑framework‑specific knowledge.&lt;/p&gt;

&lt;p&gt;This is safer than runtime conditional hiding: sensitive structures never leave the server. The rendering framework never sees content that the user is not authorized to access, eliminating the risk of "the component is hidden in the DOM but the data has already reached the client".&lt;/p&gt;

&lt;h3&gt;
  
  
  10.3 Schema Modularization — Decomposition and Merging via Reversible Computing
&lt;/h3&gt;

&lt;p&gt;The Nop platform implements a generic decomposition and merging mechanism for JSON and XML based on reversible computing theory. It can decompose a very large JSON file into multiple small files according to generic rules, effectively supplementing low‑code schemas with module organization syntax.&lt;/p&gt;

&lt;p&gt;The two most commonly used syntaxes are: &lt;code&gt;x:extends&lt;/code&gt; for inheriting an external file, and &lt;code&gt;x:gen-extends&lt;/code&gt; for dynamically generating an inheritable JSON object:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;x:gen-extends&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
  &lt;span class="s"&gt;&amp;lt;web:GenPage view="NopAuthDept.view.xml" page="main"&lt;/span&gt;
               &lt;span class="s"&gt;xpl:lib="/nop/web/xlib/web.xlib" /&amp;gt;&lt;/span&gt;

&lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;crud-grid&lt;/span&gt;
  &lt;span class="na"&gt;actions&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;button&lt;/span&gt;
      &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;test-button&lt;/span&gt;
      &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Test'&lt;/span&gt;
      &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;dialog&lt;/span&gt;
        &lt;span class="na"&gt;args&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;x:extends'&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="s"&gt;test.page.yaml&lt;/span&gt;
          &lt;span class="s"&gt;title&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Test&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Dialog'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above example means: first dynamically generate a CRUD page based on the configuration of &lt;code&gt;NopAuthDept.view.xml&lt;/code&gt;, then add a Test button to the batch action button area. The dialog popped up by the button reuses the existing &lt;code&gt;test.page.yaml&lt;/code&gt; file; the &lt;code&gt;title&lt;/code&gt; property overrides the inherited content from &lt;code&gt;x:extends&lt;/code&gt;, setting the dialog title to &lt;code&gt;Test Dialog&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;x:extends&lt;/code&gt; acts as a generic operator on tree structures, similar to object‑oriented inheritance. This directly solves the modularization difficulty of "one big JSON file per large page" that plagues most low‑code frameworks.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;x:gen-extends&lt;/code&gt; further allows dynamic generation of the inherited structure at compile time using the XPL template language, enabling compile‑time metaprogramming. For any external file in JSON format, simply replace the ordinary loading function with a call to the Nop platform's &lt;code&gt;ResourceLoader&lt;/code&gt;, and the decomposition/merging operations defined by reversible computing are automatically available.&lt;/p&gt;

&lt;p&gt;These capabilities are completed before the JSON reaches the renderer; Flux does not need — and should not — embed a module system.&lt;/p&gt;

&lt;h3&gt;
  
  
  10.4 Bidirectional Conversion between XML and JSON
&lt;/h3&gt;

&lt;p&gt;When writing and reading manually, the XML format has certain advantages over JSON, especially when integrating with external template engines for dynamic generation. The Nop platform adds an XML syntax representation for low‑code schemas, implementing bidirectional conversion between XML and JSON based on a few simple rules:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The &lt;code&gt;type&lt;/code&gt; property corresponds to the tag name.&lt;/li&gt;
&lt;li&gt;Simple‑type properties correspond to XML attributes.&lt;/li&gt;
&lt;li&gt;Complex‑type properties correspond to XML child nodes.&lt;/li&gt;
&lt;li&gt;For list types, mark the node with &lt;code&gt;j:list=true&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;body&lt;/code&gt; property is specially recognized and does not need explicit &lt;code&gt;j:list&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For example, the following JSON:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"operation"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Operation"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"buttons"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Details"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"button"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"level"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"link"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"onClick"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"openDialog"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"View Details"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"form"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
              &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"input-text"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"browser"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Browser"&lt;/span&gt;&lt;span class="w"&gt;
              &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Corresponds to the XML format:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;operation&lt;/span&gt; &lt;span class="na"&gt;label=&lt;/span&gt;&lt;span class="s"&gt;"Operation"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;buttons&lt;/span&gt; &lt;span class="na"&gt;j:list=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;label=&lt;/span&gt;&lt;span class="s"&gt;"Details"&lt;/span&gt; &lt;span class="na"&gt;level=&lt;/span&gt;&lt;span class="s"&gt;"link"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;onClick&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;"openDialog"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;args&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"View Details"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;input-text&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"browser"&lt;/span&gt; &lt;span class="na"&gt;label=&lt;/span&gt;&lt;span class="s"&gt;"Browser"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/args&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/onClick&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/buttons&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/operation&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The XPL template language in the Nop platform provides many simplifications for dynamically generating XML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;xpl:if=&lt;/span&gt;&lt;span class="s"&gt;"xxx"&lt;/span&gt; &lt;span class="na"&gt;label=&lt;/span&gt;&lt;span class="s"&gt;"${'$'}{grade}"&lt;/span&gt; &lt;span class="na"&gt;icon=&lt;/span&gt;&lt;span class="s"&gt;"${icon}"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;xpl:if&lt;/code&gt; is a conditional expression; the entire node is generated only if it returns true. During generation, if any XML attribute value is null, it is automatically omitted from the final output — leveraging this null attribute filtering mechanism, one can concisely control which attributes are generated.&lt;/p&gt;

&lt;p&gt;Schemas converted to XML become very close to ordinary HTML or Vue templates, greatly improving the experience of manual writing and reading.&lt;/p&gt;

&lt;h3&gt;
  
  
  10.5 Accessibility (a11y) — Responsibility of the Component Library Layer
&lt;/h3&gt;

&lt;p&gt;Accessibility is handled by the underlying component library. shadcn/ui is built on Base UI, which provides complete WAI‑ARIA support:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dialog:&lt;/strong&gt; automatic focus trapping, Escape to close, focus restoration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Select / Combobox:&lt;/strong&gt; full ARIA roles, arrow key navigation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Menu:&lt;/strong&gt; roving tabindex, &lt;code&gt;aria‑expanded&lt;/code&gt; state management.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Form controls:&lt;/strong&gt; automatic association between labels and inputs, &lt;code&gt;aria‑describedby&lt;/code&gt; for error messages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The responsibility of the Flux renderer is &lt;strong&gt;not to break&lt;/strong&gt; these existing accessibility capabilities — pass through &lt;code&gt;aria‑*&lt;/code&gt; attributes, do not replace semantic elements with &lt;code&gt;div&lt;/code&gt;, do not swallow keyboard events. This is about "not doing wrong things" rather than "actively doing things".&lt;/p&gt;

&lt;h3&gt;
  
  
  10.6 GraphQL Simplification
&lt;/h3&gt;

&lt;p&gt;GraphQL always requires specifying the list of fields to return. However, for a low‑code platform, which fields exist in a form can be derived from the model. The Nop platform supports directly calling a GraphQL backend via REST‑style configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/r/NopAuthUser__get"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${id}"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"gql:selection"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"xxx,yyy"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;gql:selection&lt;/code&gt; automatically generates the GraphQL field selection set based on the current form's field definitions, reducing the amount of information schema authors need to manually maintain.&lt;/p&gt;

&lt;h3&gt;
  
  
  10.7 Summary
&lt;/h3&gt;

&lt;p&gt;This layering allows Flux to maintain a smaller responsibility scope and a simpler internal structure. The rendering framework is a pure schema interpreter; it does not need to know about i18n, permissions, or modularity — those concerns have already been resolved before it sees the JSON. a11y is guaranteed by the component library layer; the renderer only needs to ensure it does not break existing accessibility capabilities. The responsibility boundary of each layer is explicit: problems that can be solved at the structural transformation layer are not carried into the runtime; problems that can be solved at the component library layer are not re‑implemented in the renderer.&lt;/p&gt;

&lt;h2&gt;
  
  
  11. Technology Stack and Layered Architecture
&lt;/h2&gt;

&lt;p&gt;Flux uses React 19, TypeScript 6.0 strict mode, Zustand 5, Vite 8, TailwindCSS 4, pnpm workspace. The choice of Zustand vanilla stores has a clear architectural motivation: the store is decoupled from the React lifecycle, can be created, updated, and subscribed to independently, and is not tied to the component tree — this directly addresses the tight coupling between the store tree and the component tree in AMIS's MST architecture.&lt;/p&gt;

&lt;p&gt;The entire project adopts a layered architecture with clear dependencies between packages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flux-core (type definitions, contracts, pure utilities)
  → flux-formula (expression compiler, evaluator)
    → flux-compiler (schema compilation, diagnostics, template graph construction)
      → flux-action-core (action compilation and dispatch semantics)
        → flux-runtime (stores, lifecycle, runtime bridging)
          → flux-react (React hooks, rendering layer)
            → flux-renderers-* / designer / editor
              → apps/playground

flux-core
  → flux-i18n
    → flux-react / @nop-chaos/ui
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each layer has clear responsibilities; upper layers depend on lower layers, not vice versa. The dependency direction is one‑way, and package boundaries are clean.&lt;/p&gt;

&lt;p&gt;The React integration approach is also carefully designed: explicit at the boundaries, implicit in the middle.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Renderer props contain renderer‑local data: schema, node, props, meta, regions, events.&lt;/li&gt;
&lt;li&gt;Hooks provide access to runtime state: &lt;code&gt;useRendererRuntime&lt;/code&gt;, &lt;code&gt;useScopeSelector&lt;/code&gt;, &lt;code&gt;useCurrentForm&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This division makes component interfaces clearer — which data comes from props and which is obtained via hooks is immediately obvious.&lt;/p&gt;

&lt;h2&gt;
  
  
  12. Host Contract — RendererEnv
&lt;/h2&gt;

&lt;p&gt;The host contract is not an invention of Flux. AMIS already designed &lt;code&gt;RendererEnv&lt;/code&gt;: renderers do not call &lt;code&gt;fetch()&lt;/code&gt; directly, but call &lt;code&gt;env.fetcher()&lt;/code&gt;; they do not manipulate routing directly, but call &lt;code&gt;env.jumpTo()&lt;/code&gt;. The core insight of this pattern is: &lt;strong&gt;a low‑code framework is essentially an interpreter, and its "system calls" should be implemented by the host, not hardcoded by the framework&lt;/strong&gt;. The framework only specifies the interface; the concrete implementation is left to the host — this allows the same framework to be embedded into different host environments, leaving the choice of HTTP library and routing library on the host side.&lt;/p&gt;

&lt;p&gt;Flux makes two improvements on this foundation.&lt;/p&gt;

&lt;p&gt;The first is the &lt;strong&gt;introduction of &lt;code&gt;env.importLoader&lt;/code&gt;&lt;/strong&gt;. &lt;code&gt;xui:imports&lt;/code&gt; is a new capability introduced by Flux; AMIS has no corresponding mechanism, so naturally AMIS's &lt;code&gt;RendererEnv&lt;/code&gt; does not have this interface. &lt;code&gt;importLoader&lt;/code&gt; takes over the library loading logic for &lt;code&gt;xui:imports&lt;/code&gt; declarations — which module identifier to load, how to cache, how to handle loading failures — all these decisions are fully controlled by the host, while the framework is only responsible for calling it at the right time and managing lexical visibility, registration, and release. The security boundary is thus established: the framework is responsible for executing declarations in the schema that have entered the runtime boundary; the loading and execution of external libraries are completely controlled by the host via &lt;code&gt;importLoader&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The second improvement is the &lt;strong&gt;clarification of the minimal required interface&lt;/strong&gt;. Flux's &lt;code&gt;RendererEnv&lt;/code&gt; reduces the interface to two required fields — &lt;code&gt;fetcher&lt;/code&gt; (network requests) and &lt;code&gt;notify&lt;/code&gt; (message notifications) — all other capabilities (&lt;code&gt;navigate&lt;/code&gt;, &lt;code&gt;confirm&lt;/code&gt;, &lt;code&gt;functions&lt;/code&gt;, &lt;code&gt;filters&lt;/code&gt;, &lt;code&gt;importLoader&lt;/code&gt;, &lt;code&gt;monitor&lt;/code&gt;) are optional. Importantly, the &lt;code&gt;fetcher&lt;/code&gt; no longer receives an author‑facing &lt;code&gt;ApiSchema&lt;/code&gt;, but an &lt;code&gt;ExecutableApiRequest&lt;/code&gt; after runtime request preparation; that is, the evaluation of request expressions, &lt;code&gt;includeScope&lt;/code&gt; merging, &lt;code&gt;params&lt;/code&gt; normalization, and adaptor application occur before &lt;code&gt;fetcher&lt;/code&gt;, so the host sees the final executable request.&lt;/p&gt;

&lt;p&gt;Together, these two improvements allow Flux's host contract to be summarized by a formula:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;FluxPage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;schema&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;schema&lt;/code&gt; is a declaration describing "what to render"; &lt;code&gt;env&lt;/code&gt; is the execution environment provided by the host; &lt;code&gt;FluxPage&lt;/code&gt; is the interpreter. As long as &lt;code&gt;RendererEnv&lt;/code&gt; is implemented, Flux can be embedded into any host framework without making any assumptions about the host's routing library, request library, or module system. This is the direction of abstraction that AMIS established, and Flux follows it more thoroughly.&lt;/p&gt;

&lt;h2&gt;
  
  
  13. Performance Design Principles
&lt;/h2&gt;

&lt;p&gt;In Flux, performance is an architectural decision, not a post‑facto optimization. Flux's performance design follows several prioritized principles:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Preserve the static fast path: access to static values should be zero‑cost, directly returning object references.&lt;/li&gt;
&lt;li&gt;Preserve dynamic reference reuse: if the result of a dynamic computation has not changed, return the same object reference.&lt;/li&gt;
&lt;li&gt;Avoid constructing merged objects in hot paths: prefer &lt;code&gt;scope.get()&lt;/code&gt; over &lt;code&gt;scope.materializeVisible()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Keep selector subscriptions precise: subscribe only to the data that is truly needed.&lt;/li&gt;
&lt;li&gt;Apply debouncing or cancellation to high‑frequency actions.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;useScopeSelector(selector, equalityFn)&lt;/code&gt; is an important tool. It allows selective access to data in the scope instead of subscribing to the entire scope. This avoids cascading re‑renders.&lt;/p&gt;

&lt;p&gt;The splitting of React contexts is also critical. Different contexts — runtime, scope, action‑scope, component‑registry, node‑meta, form, page — have different change frequencies. Splitting them reduces unnecessary re‑renders.&lt;/p&gt;

&lt;p&gt;These designs are framework‑level general guarantees, not dependent on specific scenarios.&lt;/p&gt;

&lt;h2&gt;
  
  
  14. Error Handling and Developer Experience
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Compilation phase:&lt;/strong&gt; Under the current baseline, failures in compiling expressions and templates are no longer treated as a default "silent degradation" path; compilation/evaluation errors should be understood and handled as potentially throwing exceptions. Structural issues like unknown renderer types should also be explicitly exposed by the compiler or runtime, rather than relying on implicit fallbacks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Expression evaluation:&lt;/strong&gt; Errors during runtime expression evaluation propagate upwards. The error tolerance boundary lies at the host side or in React's &lt;code&gt;ErrorBoundary&lt;/code&gt;, not inside the framework.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dynamic schema loading:&lt;/strong&gt; When the &lt;code&gt;loadAction&lt;/code&gt; request of &lt;code&gt;dynamic-renderer&lt;/code&gt; fails, an inline error message is rendered (Error: {message}); the body region is rendered as placeholder content before the schema loading completes. Retrying requires changing the &lt;code&gt;loadAction&lt;/code&gt; dependencies to trigger re‑mounting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Development tools:&lt;/strong&gt; &lt;code&gt;nop-debugger&lt;/code&gt; currently provides a floating debug panel to view timelines for compile, render, action, api, notify, error events, along with a network view and node inspection capabilities based on &lt;code&gt;data-cid&lt;/code&gt;. With component handles and form stores, it can already show some component state and form state snapshots. The namespace chain of &lt;code&gt;ActionScope&lt;/code&gt; and the complete internal index of &lt;code&gt;ComponentHandleRegistry&lt;/code&gt; are not yet exposed as stable debug UI; the expression evaluation panel also remains disabled. Dynamic nodes (&lt;code&gt;expression-node&lt;/code&gt;, &lt;code&gt;template-node&lt;/code&gt;) retain the &lt;code&gt;source&lt;/code&gt; field after compilation, allowing tracing back to the original expression text during debugging; static nodes have no &lt;code&gt;source&lt;/code&gt; field.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Strict validation mode:&lt;/strong&gt; Schema authors can enable &lt;code&gt;strictValidation: true&lt;/code&gt; on &lt;code&gt;SchemaRenderer&lt;/code&gt; to activate strict compilation mode. In strict mode, the compiler performs stricter checks on schema properties: for renderers with a closed‑prop model, unknown schema properties are reported as errors; for open renderers, unknown properties are reported as warnings. This distinction ensures strictness without affecting renderer types that are designed to accept arbitrary properties.&lt;/p&gt;

&lt;p&gt;The practical value of strict mode lies in forward‑compatibility safety: when a renderer's schema contract changes (e.g., a property is renamed or removed), strict mode immediately catches residual old properties instead of silently ignoring them. This immediate feedback avoids subtle issues where "the schema looks correct but the behavior is not as expected". Strict mode can also be toggled at runtime via the debugger, allowing real‑time schema validation without redeployment.&lt;/p&gt;

&lt;h2&gt;
  
  
  15. Validation Owner Hierarchy
&lt;/h2&gt;

&lt;p&gt;Flux's validation system is organized around a hierarchical Owner structure, where each Owner manages a set of validation contracts with independent lifecycles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Form owner:&lt;/strong&gt; the primary validation Owner within a form scope, responsible for managing form‑level field validation. When a renderer detects &lt;code&gt;type: "form"&lt;/code&gt;, it automatically creates a Form owner and takes over the validation lifecycle of all fields under it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Page‑root owner:&lt;/strong&gt; &lt;code&gt;SchemaRenderer&lt;/code&gt; creates a validation Owner at the page root level, responsible for handling validation of top‑level fields that do not belong to any form. This ensures that even without an explicit form wrapper, top‑level fields still receive validation support.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Surface owner:&lt;/strong&gt; a separate validation Owner created by a hosted dialog or drawer surface, providing scoped validation for the content carried by the surface. The lifecycle of a Surface owner is bound to the opening/closing of the surface; when closed, all validation states under it are automatically destroyed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Detail‑child owner:&lt;/strong&gt; child validation contracts created by &lt;code&gt;detail‑field&lt;/code&gt; / &lt;code&gt;detail‑view&lt;/code&gt;, attached to a parent Owner, supporting staged editing and draft validation. Child owners can validate independently without affecting the validation state of the parent Owner; only when submitting are the validation results merged into the parent.&lt;/p&gt;

&lt;p&gt;Each Owner has explicit lifecycle stages: &lt;code&gt;bootstrapping&lt;/code&gt; → &lt;code&gt;active&lt;/code&gt; → &lt;code&gt;refreshing&lt;/code&gt; → &lt;code&gt;disposed&lt;/code&gt;. The &lt;code&gt;bootstrapping&lt;/code&gt; stage completes field registration and mounting of initial validation rules; the &lt;code&gt;active&lt;/code&gt; stage accepts user interactions and real‑time validation; the &lt;code&gt;refreshing&lt;/code&gt; stage handles synchronization of validation state due to scope data refreshes; the &lt;code&gt;disposed&lt;/code&gt; stage cleans up all validation resources.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;formId&lt;/code&gt; mechanism makes cross‑form operations possible: actions like &lt;code&gt;setValue&lt;/code&gt; / &lt;code&gt;setValues&lt;/code&gt; / &lt;code&gt;submitForm&lt;/code&gt; can precisely specify the target form via &lt;code&gt;formId&lt;/code&gt;, and explicitly fail when &lt;code&gt;formId&lt;/code&gt; does not match — avoiding the subtle issue of actions being mistakenly sent to the wrong form.&lt;/p&gt;

&lt;h2&gt;
  
  
  16. Summary — Design Philosophy
&lt;/h2&gt;

&lt;p&gt;Looking back over the entire Flux design, several consistent core principles can be seen:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Unified semantics over parallel field families.&lt;/strong&gt; The semantic difference inside a value is determined at the value level, not elevated to object structure; one field, multiple forms, compiler decides, unique field name ensures unambiguous composition.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Compile once, static optimization, dynamic reuse.&lt;/strong&gt; A one‑time JIT compilation is triggered when the schema loads; at runtime, the benefits of static analysis and dynamic reuse are both enjoyed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lexical scope chain, explicit interface, lazy merging.&lt;/strong&gt; &lt;code&gt;get()&lt;/code&gt; is the fast path; &lt;code&gt;readVisible()&lt;/code&gt; provides the visible view; &lt;code&gt;materializeVisible()&lt;/code&gt; is the low‑frequency fallback; interface semantics are clear and testable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GUI three‑tree orthogonal separation.&lt;/strong&gt; ComponentTree, StateTree, ActionTree are independent, sharing the design intuition of lexical lookup but maintaining their own lifecycle semantics.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Declarative import and lexical visibility.&lt;/strong&gt; ES‑module‑style imports, in‑scope capability visibility, independent lifecycle management (idempotent loading + reference counting + release).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Field‑metadata‑driven compilation; renderers do not guess.&lt;/strong&gt; The compiler handles complex logic up front; renderers consume normalized output.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Single responsibility, clear computational semantics.&lt;/strong&gt; &lt;code&gt;data-source&lt;/code&gt; is a runtime‑owned value‑producing node; &lt;code&gt;loadAction&lt;/code&gt; is a one‑time structure initialization; remote calls uniformly enter the runtime via action dispatch, while the request description object is only responsible for the transport contract.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Configurable explicit styles.&lt;/strong&gt; The renderer layer does not inject default visual styles unrelated to the schema's intent; basic component visual appearance is provided by shadcn/ui; layout and customization are explicitly declared in the schema via Tailwind utility classes and &lt;code&gt;classAliases&lt;/code&gt;, balancing predictability and reusability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Carry forward and improve the host contract.&lt;/strong&gt; &lt;code&gt;RendererEnv&lt;/code&gt; is the direction of abstraction established by AMIS; Flux builds on it by introducing &lt;code&gt;env.importLoader&lt;/code&gt; to support &lt;code&gt;xui:imports&lt;/code&gt; and narrowing the fetcher to the final executable request boundary, making the framework a pure schema runtime.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Layered resolution, no cross‑boundary handling.&lt;/strong&gt; i18n, permissions, modularization are solved at the platform layer via JSON structural transformation; a11y is solved at the component library layer via Radix UI; the rendering framework layer only handles its own concerns — compilation, scoping, actions, rendering coordination. The responsibility boundary of each layer is explicit: problems that can be solved at the structural transformation layer are not carried into the runtime; problems that can be solved at the component library layer are not re‑implemented in the renderer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Performance designed into the architecture up front.&lt;/strong&gt; Not post‑facto patching, but a design constraint from the first line of code.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These principles have dependencies among them: unified value semantics enables full‑value tree compilation; value‑level determination makes field composition unambiguous; the three‑tree orthogonal separation allows the asynchronous lifecycle of &lt;code&gt;xui:imports&lt;/code&gt; to be managed independently; the computational semantic separation of &lt;code&gt;data-source&lt;/code&gt; and &lt;code&gt;dynamic-renderer&lt;/code&gt; provides a more solid theoretical foundation for splitting the Service; &lt;code&gt;RendererEnv&lt;/code&gt; gives the outermost layer of the layered architecture a clear host integration boundary. Flux does not need to be a do‑everything framework; it only needs to get the rendering layer right, leaving the rest to the platform layer and the component library layer, each fulfilling its own role.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;nop-chaos-flux is open source:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/entropy-cloud/nop-chaos-flux" rel="noopener noreferrer"&gt;https://github.com/entropy-cloud/nop-chaos-flux&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Gitee: &lt;a href="https://gitee.com/canonical-entropy/nop-chaos-flux" rel="noopener noreferrer"&gt;https://gitee.com/canonical-entropy/nop-chaos-flux&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>lowcode</category>
      <category>frontend</category>
      <category>react</category>
      <category>ai</category>
    </item>
    <item>
      <title>The Essence of DDD: The Practice Guide from Philosophy to Mathematics to Engineering</title>
      <dc:creator>canonical</dc:creator>
      <pubDate>Sat, 21 Feb 2026 11:48:35 +0000</pubDate>
      <link>https://dev.to/canonical/the-essence-of-ddd-the-practice-guide-from-philosophy-to-mathematics-to-engineering-37gp</link>
      <guid>https://dev.to/canonical/the-essence-of-ddd-the-practice-guide-from-philosophy-to-mathematics-to-engineering-37gp</guid>
      <description>&lt;h2&gt;
  
  
  Introduction: From Theory to Practice
&lt;/h2&gt;

&lt;p&gt;In the first half of this article, the &lt;a href="https://dev.to/canonical/the-essence-of-ddd-a-complete-guide-from-philosophy-to-mathematics-to-engineering-practice-the-4jfa"&gt;Theory Guide&lt;/a&gt;, we explored the philosophical background and mathematical principles of DDD, introducing (Generalized) Reversible Computation as its technical core. We recognized that DDD's effectiveness lies in its ability to guide us in building computational models that are closer to the essence of the domain, while Reversible Computation provides the mathematical foundation for system construction and evolution.&lt;/p&gt;

&lt;p&gt;The value of theory must be validated through practice. In this guide, we will focus on the concrete implementation of these ideas, highlighting how the &lt;strong&gt;Nop Platform&lt;/strong&gt; applies Reversible Computation theory to real-world DDD practice. We will see how, through a systematic engineering approach, DDD's strategic and tactical designs can be effectively implemented in code and architecture, thereby lowering the barrier to entry and enhancing the maintainability and evolutionary capabilities of systems.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The (Generalized) Reversible Computation theory mentioned in this text is not the same as the concept of Reversible Computing in physics. It does not refer to the reverse execution of computational instructions but rather to an extended understanding of the concept of "reversibility" at the level of software construction. See &lt;a href="https://dev.to/canonical/reversible-computation-a-next-generation-theory-for-software-construction-27fk"&gt;Reversible Computation: The Next-Generation Software Construction Theory&lt;/a&gt; and &lt;a href="https://dev.to/canonical/generalized-reversible-computation-grc-the-naming-and-elucidation-of-a-software-construction-2cp"&gt;Generalized Reversible Computation: Naming and Explaining a Software Construction Paradigm&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The Nop Platform is an open-source reference implementation of (Generalized) Reversible Computation theory. Nop is a recursive acronym for "Nop is not Programming."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Chapter 9: Closing the Engineering Loop of DDD — The Reversible Computation Practice of the Nop Platform&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Introduction: From Theory to an Executable Engineering System
&lt;/h3&gt;

&lt;p&gt;In the preceding chapters, we constructed a cognitive framework for software design and evolution from the abstract heights of philosophy and mathematics. Its core is built upon the four pillars of "Space," "Time," "Coordinate System," and "Delta." However, no matter how grand a theory is, it will ultimately become a castle in the air if it cannot be translated into a rigorous, executable, and governable engineering system.&lt;/p&gt;

&lt;p&gt;Now, we must answer the final and most crucial question: &lt;strong&gt;How is this theory implemented?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Nop Platform was created to answer this very question. It does not simply provide a set of auxiliary tools for DDD; instead, it thoroughly integrates DDD's strategic and tactical patterns into the unified engineering paradigm of "&lt;strong&gt;Reversible Computation + DSL Atlas + Delta&lt;/strong&gt;." Its ultimate goal is to transform DDD from an "art for masters," dependent on team experience and individual enlightenment, into an "engineering science" that is orchestratable, verifiable, and evolvable.&lt;/p&gt;

&lt;h3&gt;
  
  
  9.1 Institutionalizing Strategic Design: Boundary-First, Language as Coordinate System
&lt;/h3&gt;

&lt;p&gt;Strategic design is the essence of DDD. The Nop Platform ensures that the strategic blueprint can be accurately and losslessly mapped into the code structure through a series of hard engineering mechanisms.&lt;/p&gt;

&lt;h4&gt;
  
  
  9.1.1 Physicalizing the Bounded Context: From &lt;code&gt;Modular Directories&lt;/code&gt; to a &lt;code&gt;DSL Atlas&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;In the Nop Platform, a &lt;strong&gt;Bounded Context&lt;/strong&gt; is no longer a vague logical concept; it is precisely physicalized in engineering terms as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  An independent &lt;strong&gt;module root directory&lt;/strong&gt; (e.g., &lt;code&gt;/nop/iam&lt;/code&gt; for the Identity and Access Management context).&lt;/li&gt;
&lt;li&gt;  Within this directory, a set of DSLs specific to this context form a "&lt;strong&gt;DSL Atlas&lt;/strong&gt;." This atlas may include:

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Data Models&lt;/strong&gt;: &lt;code&gt;app.orm.xlsx&lt;/code&gt; or &lt;code&gt;*.orm.xml&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;API and Metadata Models&lt;/strong&gt;: &lt;code&gt;*.xmeta&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;View Models&lt;/strong&gt;: &lt;code&gt;*.view.xml&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Rule Models&lt;/strong&gt;: &lt;code&gt;*.rule.xml&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Workflow Models&lt;/strong&gt;: &lt;code&gt;*.wf.xml&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  ...and so on.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;These DSLs, constrained by a unified &lt;code&gt;XDef&lt;/code&gt; meta-model, ensure that the &lt;strong&gt;Ubiquitous Language&lt;/strong&gt; is no longer a vocabulary floating in wikis or meeting minutes, but a living, parsable, verifiable, and code-generation-driving &lt;strong&gt;domain coordinate system&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;All these DSLs can be freely converted between Excel and XML/JSON formats through configuration (no coding required). This allows many models to be expressed directly in the familiar Excel format, enabling business analysts to participate directly in the modeling process. The resulting Excel file is both an intuitive requirements document and a precise model that can be automatically parsed to drive code generation, eliminating the disconnect between documentation and code from the source.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  9.1.2 Engineering Context Mapping: &lt;code&gt;Events&lt;/code&gt;, &lt;code&gt;Services&lt;/code&gt;, and &lt;code&gt;Transformation DSLs&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;In the Nop Platform, the collaboration mechanisms between Bounded Contexts are concretized into the following executable engineering elements, with unified abstract interfaces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Asynchronous Event Communication&lt;/strong&gt;: Cross-context collaboration prioritizes &lt;strong&gt;Domain Events&lt;/strong&gt; for loose coupling. The platform provides a unified abstract interface &lt;code&gt;IMessageService&lt;/code&gt; for &lt;strong&gt;one-way messaging&lt;/strong&gt; and includes a default implementation based on mechanisms like the &lt;code&gt;SysEvent&lt;/code&gt; table, which integrates with database transactions to ensure reliable event publication.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Unified one-way message abstraction&lt;/span&gt;
&lt;span class="kd"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;IMessageService&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;IMessageSender&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;IMessageReceiver&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;CompletionStage&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Void&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;sendAsync&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;topic&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; 
          &lt;span class="nc"&gt;Object&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;MessageSendOptions&lt;/span&gt; &lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="nc"&gt;IMessageSubscription&lt;/span&gt; &lt;span class="nf"&gt;subscribe&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;topic&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; 
          &lt;span class="nc"&gt;IMessageConsumer&lt;/span&gt; &lt;span class="n"&gt;listener&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;MessageSubscribeOptions&lt;/span&gt; &lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Service Call Integration&lt;/strong&gt;: For request-response bidirectional communication, the platform provides a unified abstraction through the &lt;code&gt;IRpcService&lt;/code&gt; interface. &lt;strong&gt;NopRPC, its core implementation, offers a Feign-like strongly-typed client calling experience in about 3000 lines of code&lt;/strong&gt;. It supports creating proxy interfaces via runtime reflection or compile-time code generation, transparently mapping local method calls to remote &lt;code&gt;IRpcService&lt;/code&gt; calls.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Unified two-way RPC abstraction&lt;/span&gt;
&lt;span class="kd"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;IRpcService&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;CompletionStage&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ApiResponse&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;?&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;callAsync&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;serviceMethod&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; 
          &lt;span class="nc"&gt;ApiRequest&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;?&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;ICancelToken&lt;/span&gt; &lt;span class="n"&gt;cancelToken&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Standardized response wrapper for easy error handling and cross-protocol adaptation&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ApiResponse&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="no"&gt;T&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;Map&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Object&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// For adapting command-line return codes&lt;/span&gt;
    &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="no"&gt;T&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The platform also provides adapters like &lt;code&gt;MessageRpcClient&lt;/code&gt;/&lt;code&gt;MessageRpcServer&lt;/code&gt; to &lt;strong&gt;achieve flexible conversion of communication patterns&lt;/strong&gt;: the core mechanism is request-response correlation based on message IDs. The client generates a unique ID for each request, sends it to a request topic, and waits for a response with the corresponding ID on a response topic. The server subscribes to the request topic, processes the request, and sends the result (or error) along with the ID to the response topic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Similarly, the capabilities of &lt;code&gt;IRpcService&lt;/code&gt; can be used to simulate a one-way &lt;code&gt;IMessageService&lt;/code&gt; interface over a two-way RPC channel&lt;/strong&gt;. This bidirectional adaptation capability demonstrates the flexibility and symmetry of the communication abstraction layer.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Distributed Transaction Coordination&lt;/strong&gt;: For business scenarios requiring strong consistency, the platform supports &lt;strong&gt;TCC (Try-Confirm-Cancel)&lt;/strong&gt; and &lt;strong&gt;Saga&lt;/strong&gt; patterns for distributed transactions through the &lt;strong&gt;&lt;code&gt;NopTcc&lt;/code&gt;&lt;/strong&gt; component. Transaction boundaries and compensation logic are defined via annotations or tcc configurations in the XBiz model, coordinating business operations across multiple services to ensure eventual consistency.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;DSL-izing and Dynamic Evolution of the Anti-Corruption Layer (ACL)&lt;/strong&gt;: When model transformation is needed, the &lt;strong&gt;Anti-Corruption Layer&lt;/strong&gt; is no longer scattered throughout the business code. The Nop Platform recommends using the &lt;strong&gt;&lt;code&gt;Xpl&lt;/code&gt; template language&lt;/strong&gt; or a dedicated &lt;strong&gt;transformation DSL&lt;/strong&gt; to perform model translation during load-time or compile-time, ensuring the runtime domain core remains unpolluted by external models.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Powerful Record Mapping&lt;/strong&gt;: The platform includes a dedicated &lt;strong&gt;&lt;code&gt;record-mapping&lt;/code&gt;&lt;/strong&gt; DSL for mapping between two complex objects. It supports conditional mapping, many-to-one/one-to-many transformations, dictionary lookups, and other advanced features, greatly simplifying model transformation logic.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Multi-format Codec and Batch Processing&lt;/strong&gt;: The &lt;code&gt;record&lt;/code&gt; model itself supports encoding and parsing of binary and text formats, which can be automatically used for parsing and generating TCP messages, data files, etc. Combined with the &lt;strong&gt;&lt;code&gt;NopBatch&lt;/code&gt;&lt;/strong&gt; model, it's easy to implement multi-machine, multi-threaded, chunked parallel data processing, providing powerful support for high-performance data integration and ETL scenarios.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Dynamically Evolving Anti-Corruption Logic&lt;/strong&gt;: The logic of the anti-corruption layer can also be dynamically evolved through the &lt;strong&gt;Delta customization mechanism&lt;/strong&gt;, ensuring that integration logic can adapt to changes in external systems without modifying the core domain model.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;The decay of architecture essentially stems from the system being continuously eroded by random, accidental requirements, leading to an increase in system entropy. &lt;strong&gt;Various architectural methods are essentially trying to prevent this entropy increase, but the law of entropy in physics states that this is an unavoidable fate for any system. However, if we change our perspective, even if we cannot completely stop entropy from increasing, we can try to control where it occurs&lt;/strong&gt;. By isolating random and accidental requirements into independent Delta increments, the overall integrity of the core architecture is decoupled from ever-changing demands, thereby achieving long-term stability and systematically slowing down the process of decay.&lt;/p&gt;

&lt;h4&gt;
  
  
  9.1.3 Guardrails for Hexagonal Architecture: Descriptive Contracts Derived from &lt;code&gt;BizModel&lt;/code&gt; and &lt;code&gt;XMeta&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;After clarifying the collaboration mechanisms between contexts, we turn to architectural governance within a context. The core design principle of the Nop Platform is &lt;strong&gt;minimal information expression&lt;/strong&gt;: business descriptions should only contain core domain concepts (What), while delaying or omitting specific technical implementation details (How). This descriptive approach naturally possesses &lt;strong&gt;framework-neutrality&lt;/strong&gt; (independent of any specific runtime), providing an ideal engineering foundation for implementing Hexagonal Architecture.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Technology-Neutral Port Definitions&lt;/strong&gt;: The service &lt;strong&gt;ports&lt;/strong&gt; provided by a context are represented in code as plain Java classes based on &lt;code&gt;@BizModel&lt;/code&gt; (or equivalent XBiz DSL models). Annotations like &lt;code&gt;@BizMutation&lt;/code&gt;/&lt;code&gt;@BizQuery&lt;/code&gt; only declare business semantics, &lt;strong&gt;without containing any HTTP paths, methods, or other protocol-specific information&lt;/strong&gt;. This ensures the purity of the domain model and its potential for multi-protocol adaptation (e.g., GraphQL, gRPC) from the source.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Contracts Uniquely Derived from Models&lt;/strong&gt;: The complete contract for a port is uniquely derived from the &lt;strong&gt;XMeta model&lt;/strong&gt; as the Single Source of Truth (SSOT). This model defines data structures, validation rules, and permissions in a purely descriptive manner, and automatically generates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  GraphQL Schema and OpenAPI documentation&lt;/li&gt;
&lt;li&gt;  Runtime input validation logic&lt;/li&gt;
&lt;li&gt;  Front-end page skeletons and form rules
This ensures &lt;strong&gt;source-of-truth consistency&lt;/strong&gt; from the model to various contract forms.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Supplementing Implementation Details via &lt;code&gt;Delta&lt;/code&gt;&lt;/strong&gt;: Based on Reversible Computation theory, the platform allows for the &lt;strong&gt;non-invasive addition&lt;/strong&gt; of protocol-specific details through the &lt;code&gt;Delta&lt;/code&gt; mechanism. For example, a custom URL path can be specified in XMeta via the &lt;code&gt;rest:path&lt;/code&gt; extension attribute. This supplementary information is &lt;strong&gt;optional and localized&lt;/strong&gt;, achieving a unification of minimal expression and full customization.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Configurable Replacement of Adapters&lt;/strong&gt;: All interactions with external infrastructure (databases, message queues, etc.) are handled through &lt;strong&gt;Adapters/Drivers&lt;/strong&gt;. These adapters are where framework dependencies are concentrated and can be replaced via Nop's IoC container in the &lt;code&gt;_delta&lt;/code&gt; directory through configuration, &lt;strong&gt;without modifying the core code&lt;/strong&gt;. This ensures the isolation of the domain core from external technical implementations at the architectural level.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Closing the Theoretical Loop: From Minimal Expression to Framework Neutrality&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Nop Platform's DSL models are a minimal, descriptive representation of business information. They capture the most stable and essential business structures, becoming the &lt;strong&gt;standard intermediate representation&lt;/strong&gt; for free transformation between different technical frameworks.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The Inner Logic of Minimal Information Expression&lt;/strong&gt;: It means describing only the goal (What) while omitting execution details (How). If multiple frameworks all achieve true minimal expression, their information content will inevitably converge toward uniqueness. This uniqueness guarantees that a &lt;strong&gt;reversible, equivalent transformation&lt;/strong&gt; must exist between the different framework representations. By inserting a formal transformation layer into the architecture and combining it with the principle of minimal expression, framework neutrality is naturally achieved.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This purely POJO-based, minimal information expression brings a direct engineering advantage: Nop Platform's API service functions can always be unit-tested in a pure fashion. Because its input parameters and return objects are plain Java objects, testing does not require simulating complex web containers or framework contexts. One can simply construct POJO inputs and validate POJO outputs, which greatly reduces testing costs and, in turn, proves the purity and framework-neutrality of its architecture.&lt;/p&gt;

&lt;h3&gt;
  
  
  9.2 Platformizing Tactical Design: Built-in Patterns and Emergent Robustness
&lt;/h3&gt;

&lt;p&gt;The Nop Platform internalizes the complex tactical patterns of DDD into standard platform capabilities, allowing developers to naturally follow best practices without conscious effort.&lt;/p&gt;

&lt;h4&gt;
  
  
  9.2.1 Aggregates, Entities, and Value Objects: Unified by &lt;code&gt;NopORM&lt;/code&gt; and &lt;code&gt;XMeta&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;The Nop Platform provides a unified, efficient, and domain-aligned design foundation for DDD tactical modeling through its &lt;code&gt;NopORM&lt;/code&gt; engine and &lt;code&gt;XMeta&lt;/code&gt; metadata model. Its implementation retains the core value of these patterns while avoiding some of the rigid designs of traditional ORMs (like JPA), reflecting the "progressive" and "delta-based" philosophy guided by Reversible Computation theory.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Entity Generation and Extension: The Generation Gap Pattern&lt;/strong&gt;&lt;br&gt;
Entities in the Nop Platform are directly generated from the ORM model and adopt the classic &lt;strong&gt;Generation Gap Pattern&lt;/strong&gt;. Each entity is generated in two parts: a base class maintained by tools (e.g., &lt;code&gt;_NopAuthUser&lt;/code&gt;) and a subclass that developers can freely extend (e.g., &lt;code&gt;NopAuthUser&lt;/code&gt;). This pattern perfectly separates &lt;strong&gt;mechanical code&lt;/strong&gt; from &lt;strong&gt;business code&lt;/strong&gt;, ensuring that developer-added business methods are safely preserved when code is regenerated after model changes. Since &lt;code&gt;NopORM&lt;/code&gt; entities naturally support one-to-one and one-to-many associations and can directly map rich object graphs, the entity itself often naturally assumes the role of an aggregate root in many scenarios, eliminating the need for extra abstraction layers. Domain logic can operate directly on the association graph centered on the entity, and developers only need to add auxiliary domain methods to the entity (e.g., &lt;code&gt;order.calculateTotalAmount()&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pragmatic Handling of Associations: Re-examining "Many-to-Many"&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;NopORM&lt;/code&gt; was intentionally designed &lt;strong&gt;without built-in support for many-to-many associations&lt;/strong&gt;. This decision stems from an insight into the nature of relational databases—they do not directly support many-to-many relationships but implement them through an intermediate table. NopORM encourages developers to explicitly define the intermediate entity (e.g., &lt;code&gt;OrderLine&lt;/code&gt;), thereby preserving maximum flexibility and extensibility in the model. At the same time, to provide convenience at the domain layer, the platform supports the &lt;strong&gt;automatic generation of helper methods on entities that simulate many-to-many associations&lt;/strong&gt; through a marker during code generation. For example, the &lt;code&gt;order.getProducts()&lt;/code&gt; method can internally access the &lt;code&gt;order.getOrderLines()&lt;/code&gt; collection and then retrieve the &lt;code&gt;Product&lt;/code&gt; associated with each &lt;code&gt;OrderLine&lt;/code&gt; to compose the return value. This allows developers to program in a natural object-oriented way at the domain layer while maintaining precise mapping and control of relationships at the persistence layer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Entities with Built-in Deltas: &lt;code&gt;OrmEntity&lt;/code&gt; and State Tracking&lt;/strong&gt;&lt;br&gt;
Unlike JPA's transparent lazy loading and implicit dirty checking, &lt;code&gt;NopORM&lt;/code&gt; provides an active &lt;code&gt;OrmEntity&lt;/code&gt; base implementation. This base class accurately tracks all changed properties through a &lt;code&gt;dirtyProps&lt;/code&gt; set and automatically records the values before and after modification. This means &lt;strong&gt;every &lt;code&gt;OrmEntity&lt;/code&gt; instance has a built-in "delta" representation of its own state changes&lt;/strong&gt;. This mechanism offers two core advantages:&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1.  **High-Performance Delta Updates**: When saving an entity, `NopORM` can generate and execute SQL only for the changed fields, rather than updating the entire object.
2.  **Safe Domain Data Merging**: Using the `OrmEntityCopier` tool, complex JSON data from the front end (which can be seen as a data delta `Δ`) can be safely and efficiently merged into the current aggregate root object. This achieves an effect similar to `aggregateRoot.merge(Δ)`, which is crucial for handling concurrent updates and command merging.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The Essence and Implementation of Value Objects: &lt;code&gt;OrmComponent&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
The essence of a Value Object is not just its immutability, but more importantly, that it &lt;strong&gt;encapsulates a cohesive set of business rules and invariants&lt;/strong&gt;. NopORM implements this encapsulation through the &lt;code&gt;IOrmComponent&lt;/code&gt; interface, which is similar in role to JPA's &lt;code&gt;@Embeddable&lt;/code&gt; components. However, Nop's design philosophy is &lt;strong&gt;progressive and view-based&lt;/strong&gt;, in stark contrast to JPA's rigid "either-or" choice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;JPA's Rigidity&lt;/strong&gt;: A field is either a native field or encapsulated in a Component; you must choose one.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;NopORM's Flexibility&lt;/strong&gt;: &lt;strong&gt;It always generates native get/set methods for every database field&lt;/strong&gt;, ensuring the most basic access capability. At the same time, &lt;code&gt;OrmComponent&lt;/code&gt; is designed as a &lt;strong&gt;computable, non-invasive "view"&lt;/strong&gt; built on top of the entity's fields.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This "view" model brings unprecedented flexibility:&lt;/p&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1.  **A single field can be reused by multiple Components**: For example, a `latitude/longitude` field can belong to both a `Geolocation` Component and a `RegionBoundary` Component.
2.  **Robust handling of nulls**: When a Component is composed of multiple fields, a `null` value in one of them **does not cause the entire Component object to be `null`**. The Component always exists, and its internal methods can robustly handle partially missing data, avoiding the potential null pointer traps found in JPA.
3.  **Explicit lifecycle control**: The `IOrmComponent` interface defines methods like `flushToEntity` and `reset`, making the timing of data synchronization between the Component and its owning entity controllable and explicit. This is particularly useful for handling complex derived logic and temporary computed states.

Therefore, in NopORM, a Value Object is seen more as a **carrier of domain rules** and a **consistent view of data**, rather than a simple data container. Its immutability is not a mandatory requirement but is determined by the needs of the invariants it encapsulates.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dynamic Extension of Entity Models: Built-in Extension Fields Mechanism&lt;/strong&gt;&lt;br&gt;
To cope with frequent changes in business models and avoid the real-world challenge of frequent database table modifications, the Nop Platform has a built-in, comprehensive &lt;strong&gt;Extension Fields&lt;/strong&gt; mechanism in &lt;code&gt;NopORM&lt;/code&gt;. By simply adding a &lt;code&gt;use-ext-field&lt;/code&gt; tag to an entity in the Excel data model, you can dynamically add any number of extension fields to the entity without modifying the DDL. These fields are stored uniformly in a dedicated extension table (e.g., &lt;code&gt;nop_sys_ext_field&lt;/code&gt;) and, through the ORM engine, provide an &lt;strong&gt;access experience at the entity object level that is indistinguishable from native fields&lt;/strong&gt;. Whether in Java code, EQL queries, or GraphQL interfaces, extension fields can be used, filtered, and sorted just like regular fields. This mechanism provides a standardized solution for resolving customization conflicts in productized software.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Seamless Data Flow and Validation from Port to Entity&lt;/strong&gt;&lt;br&gt;
The Nop Platform builds an automated, metadata-driven data pipeline from external ports to internal domain entities. The core of this lies in a multi-layered, customizable meta-model system:&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1.  **ORM Model (`EntityModel`)**: An `OrmEntity` can directly access its `EntityModel`, which contains complete reflection information at the ORM layer. This is the metadata foundation that supports **persistence concerns** like multi-tenancy, logical deletion, and field encryption.
2.  **XMeta Model**: The **data contract and validation rules** for external ports (like GraphQL, RPC) are defined by the `XMeta` metadata model. `XMeta` can be automatically generated from the ORM entity model (e.g., generating `_NopAuthUser.xmeta`) and also follows the **Generation Gap Pattern**—developers can customize, override, or extend the auto-generated rules in the non-underscored `NopAuthUser.xmeta` file.
3.  **End-to-End Data Processing**: Data from the front end is first validated and transformed by the `ObjMetaBasedValidator`, which is based on `XMeta`. Configurations in `XMeta` like `mapToProp`, `getter`, and `setter` enable declarative implementation of needs like **front-end/back-end property name mapping**, **data format conversion**, and **complex logic computation**. The `validatedData` obtained after validation and transformation is finally merged into the domain entity object using the efficient `OrmEntityCopier` tool. This mechanism ensures the **security, correctness, and semantic consistency** of data as it crosses system boundaries, while liberating developers from tedious data glue code.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Domain-Driven Invariant Abstraction: &lt;code&gt;domain&lt;/code&gt; and Metaprogramming&lt;/strong&gt;&lt;br&gt;
The Nop Platform further deepens the "domain-driven" concept by introducing the concept of &lt;strong&gt;data domains (&lt;code&gt;domain&lt;/code&gt;)&lt;/strong&gt; at the field level. This is similar to a Domain in PowerDesigner and serves as an abstraction for field-level business semantics and invariants. For example, a field can be assigned a &lt;code&gt;domain&lt;/code&gt; like &lt;code&gt;currency&lt;/code&gt; or &lt;code&gt;createTime&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This simple configuration triggers a wide range of &lt;strong&gt;cascading semantic effects&lt;/strong&gt; across the platform, perfectly embodying Nop's design philosophy of "few assumptions, general mechanisms":&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1.  **Persistence Behavior**: A field marked as `createTime` will **automatically** be set to the current time when the entity is saved, without any manual coding.
2.  **Front-end Control Binding**: Front-end tag libraries like `control.xlib` will automatically recognize the `domain` configuration and look for a corresponding dedicated control (e.g., `&amp;lt;editor-currency&amp;gt;`), achieving **automatic mapping from domain semantics to UI implementation**.
3.  **Interface Model Generation**: Even more powerfully, through metaprogramming rules defined in `meta-prop.xlib`, a `domain` can **dynamically generate or correct property definitions in XMeta**. For example, for a domain marked as a comma-separated list, the platform will automatically apply transformation rules to convert a `String` type to `List&amp;lt;String&amp;gt;` at the interface level and automatically inject serialization (`transformOut`) and deserialization (`transformIn`) logic.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- Metaprogramming rule example: dynamically generate List&amp;lt;String&amp;gt; schema and transformation logic for the csv-list domain --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;domain-csv-list&lt;/span&gt; &lt;span class="na"&gt;outputMode=&lt;/span&gt;&lt;span class="s"&gt;"node"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;attr&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"propNode"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;source&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;prop&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"${propNode.getAttr('name')}"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;schema&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"List&amp;lt;String&amp;gt;"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;transformIn&amp;gt;&lt;/span&gt;return value?.$toCsvListString();&lt;span class="nt"&gt;&amp;lt;/transformIn&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;transformOut&amp;gt;&lt;/span&gt;return value?.$toCsvList();&lt;span class="nt"&gt;&amp;lt;/transformOut&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/prop&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/source&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/domain-csv-list&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The introduction of these rules is not hard-coded into the platform. Instead, they are dynamically implemented through metaprogramming segments like &lt;code&gt;x:post-extends&lt;/code&gt; in XMeta files, which call &lt;strong&gt;general metaprogramming directives&lt;/strong&gt; like &lt;code&gt;&amp;lt;meta-gen:GenPropFromDomain/&amp;gt;&lt;/code&gt;. &lt;strong&gt;The Nop Platform has very few built-in assumptions; a large number of features and rules are introduced and composed on-demand through general, reversible metaprogramming mechanisms like &lt;code&gt;x:gen-extends&lt;/code&gt; and &lt;code&gt;x:post-extends&lt;/code&gt;.&lt;/strong&gt; This allows the platform's core to remain extremely concise while possessing nearly limitless semantic extension capabilities.&lt;/p&gt;

&lt;h3&gt;
  
  
  9.2.2 Transparent Services and Repositories: NopTaskFlow Orchestration and the Generic &lt;code&gt;EntityDao&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;The Nop Platform internalizes DDD's complex tactical patterns into standard platform capabilities, with the transparent design of Repositories and Services being particularly prominent. Through the unified &lt;code&gt;IEntityDao&lt;/code&gt; interface, powerful &lt;code&gt;QueryBean&lt;/code&gt; capabilities, and the &lt;code&gt;NopTaskFlow&lt;/code&gt; logic orchestration engine, developers can naturally follow best practices without conscious effort.&lt;/p&gt;

&lt;h4&gt;
  
  
  Unified Repository Abstraction: The Complete &lt;code&gt;IEntityDao&lt;/code&gt; Interface
&lt;/h4&gt;

&lt;p&gt;In NopORM, repositories are completely transparent. Through the unified &lt;code&gt;DaoProvider&lt;/code&gt;, developers can obtain a strongly-typed &lt;code&gt;IEntityDao&amp;lt;T&amp;gt;&lt;/code&gt; interface (e.g., &lt;code&gt;IEntityDao&amp;lt;NopAuthUser&amp;gt;&lt;/code&gt;). Although each entity has a corresponding Dao interface, business logic typically &lt;strong&gt;only uses the Dao interface of the aggregate root&lt;/strong&gt;, which naturally reinforces the DDD concept of aggregate boundaries.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;IEntityDao&lt;/code&gt; provides a very complete set of CRUD operations, &lt;strong&gt;eliminating the need to derive custom repositories&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Query by equality&lt;/span&gt;
&lt;span class="nc"&gt;User&lt;/span&gt; &lt;span class="n"&gt;example&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setStatus&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="nc"&gt;IEntityDao&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;dao&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;daoProvider&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;daoFor&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;userList&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;dao&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;findAllByExample&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;pageList&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;dao&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;findPageByExample&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;of&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;orderBy&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;PROP_NAME_status&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="o"&gt;)),&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="nc"&gt;User&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;dao&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;findFirstByExample&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="kt"&gt;long&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;dao&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;countByExample&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;dao&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;saveEntity&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;newEntity&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Powerful &lt;code&gt;QueryBean&lt;/code&gt;: Standardized Encapsulation for Complex Queries
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;QueryBean&lt;/code&gt; provides rich query condition encapsulation, supporting various query scenarios from simple to complex:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Complex Condition Queries&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Similar to MyBatisPlus's LambdaQueryWrapper&lt;/span&gt;
&lt;span class="nc"&gt;QueryBean&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;QueryBean&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;addFilter&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;eq&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;PROP_NAME_username&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Zhang San"&lt;/span&gt;&lt;span class="o"&gt;))&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;addFilter&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;and&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;or&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;between&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;PROP_NAME_age&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt;
            &lt;span class="n"&gt;eq&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;PROP_NAME_gender&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
        &lt;span class="o"&gt;)))&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;addOrderField&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;PROP_NAME_createTime&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;offset&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;limit&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

&lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;userList&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;dao&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;findPageByQuery&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="nc"&gt;User&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;dao&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;findFirstByQuery&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Embedded Subqueries&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;addFilter&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="no"&gt;SQL&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;begin&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"o.id in (select y.xx from tbl y where y.id=?)"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
   &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;end&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;asFilter&lt;/span&gt;&lt;span class="o"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Automatic Join Queries&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Composite properties are automatically expanded into join queries&lt;/span&gt;
&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;addFilter&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;eq&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"product.productType.name"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"abc"&lt;/span&gt;&lt;span class="o"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Unified Filter Model&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxva9hrurztreiscr344o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxva9hrurztreiscr344o.png" alt="FilterModel" width="800" height="478"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Filter provides a standard way to express complex conditional logic, reusable across multiple scenarios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  In Java code, built via the &lt;code&gt;FilterBeans&lt;/code&gt; utility class&lt;/li&gt;
&lt;li&gt;  In XML/Xpl templates, using syntax like &lt;code&gt;&amp;lt;eq name="status" value="1" /&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  Automatically converted to SQL statements or Java Predicates&lt;/li&gt;
&lt;li&gt;  Visually editable in the front-end via a Condition control&lt;/li&gt;
&lt;li&gt;  Used uniformly in rule engines, data permissions, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  Unified SQL Management: The &lt;code&gt;sql-lib&lt;/code&gt; Mechanism Surpassing MyBatis
&lt;/h4&gt;

&lt;p&gt;Using the Nop Platform's built-in infrastructure, the &lt;code&gt;sql-lib&lt;/code&gt; model can be implemented in less than 1000 lines of code. It centrally manages all complex SQL/EQL/DQL statements, offering capabilities more powerful than MyBatis:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;DQL is a multi-dimensional data query language for OLAP invented by the report vendor Ruqian, allowing business users to perform complex cross-table data analysis with simple syntax. See &lt;a href="http://c.raqsoft.com.cn/article/1653901344139?p=1&amp;amp;m=0" rel="noopener noreferrer"&gt;Say Goodbye to Wide Tables, Achieve a New Generation of BI with DQL - Qian Academy&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;1. Unified Management of Multiple Query Languages&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;sql-lib&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;sqls&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;sql&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"nativeSql"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;...&lt;span class="nt"&gt;&amp;lt;/sql&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;eql&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"entityQuery"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;...&lt;span class="nt"&gt;&amp;lt;/eql&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;query&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"dqlQuery"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;...&lt;span class="nt"&gt;&amp;lt;/query&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/sqls&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/sql-lib&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Delta Customization Support&lt;/strong&gt;&lt;br&gt;
Customize SQL statements without modifying base product code, using delta files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;sql-lib&lt;/span&gt; &lt;span class="na"&gt;x:extends=&lt;/span&gt;&lt;span class="s"&gt;"super"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;sqls&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;eql&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"yyy"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;...&lt;span class="nt"&gt;&amp;lt;/eql&amp;gt;&lt;/span&gt; &lt;span class="c"&gt;&amp;lt;!-- Overrides the base definition --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/sqls&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/sql-lib&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Powerful XPL Template Language&lt;/strong&gt;&lt;br&gt;
Compared to MyBatis's limited tags, XPL provides full programming capabilities and tag abstraction:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;sql&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"complexQuery"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;source&amp;gt;&lt;/span&gt;
    select &lt;span class="nt"&gt;&amp;lt;my:CustomFields/&amp;gt;&lt;/span&gt;
    from MyEntity o
    where &lt;span class="nt"&gt;&amp;lt;my:AuthFilter/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;c:if&lt;/span&gt; &lt;span class="na"&gt;test=&lt;/span&gt;&lt;span class="s"&gt;"${!_.isEmpty(status)}"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      and o.status = ${status}
    &lt;span class="nt"&gt;&amp;lt;/c:if&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/source&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/sql&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Macro Tag Metaprogramming&lt;/strong&gt;&lt;br&gt;
Simplify SQL writing through compile-time macro transformations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;sql:filter&amp;gt;&lt;/span&gt;and o.classId = :myVar&lt;span class="nt"&gt;&amp;lt;/sql:filter&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;&amp;lt;!-- Expands at compile-time to --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;c:if&lt;/span&gt; &lt;span class="na"&gt;test=&lt;/span&gt;&lt;span class="s"&gt;"${!_.isEmpty(myVar)}"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  and o.classId = ${myVar}
&lt;span class="nt"&gt;&amp;lt;/c:if&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5. Secure SQL Output Mode&lt;/strong&gt;&lt;br&gt;
Automatic SQL injection prevention and intelligent parameter handling:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;ids&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;!&lt;/span&gt;&lt;span class="c1"&gt;-- Automatically expands to id in (?,?,?) --&amp;gt;&lt;/span&gt;
&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;  &lt;span class="o"&gt;&amp;lt;!&lt;/span&gt;&lt;span class="c1"&gt;-- Automatically parameterized --&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;6. Strongly-Typed Mapper Interfaces&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@SqlLibMapper&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/app/mall/sql/LitemallGoods.sql-lib.xml"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;LitemallGoodsMapper&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;syncCartProduct&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;@Name&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"product"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nc"&gt;LitemallGoodsProduct&lt;/span&gt; &lt;span class="n"&gt;product&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Service Logic Orchestration: NopTaskFlow's Fine-Grained Flow Control
&lt;/h4&gt;

&lt;p&gt;NopTaskFlow is the Nop Platform's built-in logic orchestration engine. It adopts the design principle of &lt;strong&gt;minimal information expression&lt;/strong&gt; and can support both heavyweight distributed service orchestration and lightweight, fine-grained logic orchestration at the function level within a service.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages Over Microservice Orchestration Engines&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Direct Local Function Calls&lt;/strong&gt;: No REST call serialization overhead, supports passing complex domain object references.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Local Environment Integration&lt;/strong&gt;: Supports executing multiple steps within the same database transaction or OrmSession.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Lightweight Execution&lt;/strong&gt;: Can run in a lightweight mode with no third-party dependencies and no persistence.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Asynchrony and State Recovery&lt;/strong&gt;: Built-in support for asynchronous processing, timeout retries, and breakpoint resumption.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Seamless Integration of Service Functions and TaskFlow&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;In the xbiz model, a service function can be delegated to a TaskFlow with minimal configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;biz&lt;/span&gt; &lt;span class="na"&gt;x:extends=&lt;/span&gt;&lt;span class="s"&gt;"/nop/biz/lib/common.xbiz"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;actions&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;mutation&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"callTask"&lt;/span&gt; &lt;span class="na"&gt;task:name=&lt;/span&gt;&lt;span class="s"&gt;"test/DemoTask"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/actions&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/biz&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Through compile-time metaprogramming, the platform automatically infers the input and output parameter types and implementation code for the service function from the TaskFlow model, achieving &lt;strong&gt;responsive derivation&lt;/strong&gt;: when the TaskFlow model is modified, the dependent service function definition is automatically updated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TaskFlow Example: Order Discount Rules&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
&lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;xpl&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;book_discount_1&lt;/span&gt;
    &lt;span class="na"&gt;when&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;order.getOriginalPrice()&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;100"&lt;/span&gt;
    &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
      &lt;span class="s"&gt;order.setRealPrice(order.getOriginalPrice());&lt;/span&gt;
      &lt;span class="s"&gt;logInfo("No discount");&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;xpl&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;book_discount_4&lt;/span&gt;
    &lt;span class="na"&gt;when&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;order.getOriginalPrice()&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;gt;=&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;300"&lt;/span&gt;
    &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
      &lt;span class="s"&gt;order.setRealPrice(order.getOriginalPrice() - 100);&lt;/span&gt;
      &lt;span class="s"&gt;logInfo("Discount of 100");&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;xpl&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;book_discount_2&lt;/span&gt;
    &lt;span class="na"&gt;when&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;order.getOriginalPrice()&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;gt;=&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;100&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;order.getOriginalPrice()&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;200"&lt;/span&gt;
    &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
      &lt;span class="s"&gt;order.setRealPrice(order.getOriginalPrice() - 20);&lt;/span&gt;
      &lt;span class="s"&gt;logInfo("Discount of 20");&lt;/span&gt;
&lt;span class="na"&gt;outputs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;realPrice&lt;/span&gt;
    &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;order.realPrice&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Rule Engine Integration: NopRule for Professional Decision Handling
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7c7b5bf8djfbidlu42xd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7c7b5bf8djfbidlu42xd.png" alt="DecisionTree" width="799" height="219"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For complex business rules, the Nop Platform also provides a dedicated rule engine, NopRule, which integrates seamlessly with TaskFlow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;steps&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;xpl&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"calcDiscount"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;source&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;rule:Execute&lt;/span&gt; &lt;span class="na"&gt;ruleModelPath=&lt;/span&gt;&lt;span class="s"&gt;"/nop/demo/rule/discount.rule.xlsx"&lt;/span&gt;
                    &lt;span class="na"&gt;inputs=&lt;/span&gt;&lt;span class="s"&gt;"${{order}}"&lt;/span&gt; &lt;span class="na"&gt;xpl:return=&lt;/span&gt;&lt;span class="s"&gt;"outputs"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;c:script&amp;gt;&lt;/span&gt;
        order.setRealPrice(order.originalPrice - outputs.discount);
      &lt;span class="nt"&gt;&amp;lt;/c:script&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/source&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/xpl&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/steps&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;NopRule supports decision tables and decision trees, which can be configured visually via Excel (or edited online), making it especially suitable for managing complex business rules.&lt;/p&gt;

&lt;h4&gt;
  
  
  Clear Division of Labor in the Service Layer
&lt;/h4&gt;

&lt;p&gt;Through the collaboration of the above components, the Nop Platform achieves a clear division of labor in the service layer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Repository Layer&lt;/strong&gt;: Unified abstraction by &lt;code&gt;IEntityDao&lt;/code&gt;, providing powerful data access.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Domain Logic&lt;/strong&gt;: Complex business rules handled by &lt;code&gt;NopRule&lt;/code&gt;, process orchestration managed by &lt;code&gt;NopTaskFlow&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Application Service&lt;/strong&gt;: Hosted by the &lt;code&gt;XBiz&lt;/code&gt; model, responsible for use case orchestration and transaction management.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Query Abstraction&lt;/strong&gt;: All data queries managed uniformly through &lt;code&gt;QueryBean&lt;/code&gt; and &lt;code&gt;sql-lib&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;CRUD Automation&lt;/strong&gt;: The platform automatically handles templated CRUD operations, allowing developers to focus on business logic.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  9.2.3 Natural Emergence of Event-Driven Architecture: Platform-wide Observability and Declarative Event Weaving
&lt;/h3&gt;

&lt;p&gt;Event-driven architecture is the soul of DDD, but traditional implementations often rely on developers manually publishing events in their code. This "deliberate" approach can easily lead to omissions and clutter domain code with technical concerns. The Nop Platform takes a different path: through &lt;strong&gt;system-wide model definitions&lt;/strong&gt; and a &lt;strong&gt;unified delta syntax&lt;/strong&gt;, it transforms the system into a "&lt;strong&gt;naturally observable&lt;/strong&gt;" organism. This allows event listening and triggering to become a side effect that can be &lt;strong&gt;seamlessly woven in at any level in a declarative manner&lt;/strong&gt;, letting an event-driven architecture "emerge" naturally from the platform.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Cross-Context Events: Reliable Event Bus and the &lt;code&gt;Outbox&lt;/code&gt; Pattern&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;For loosely coupled integration between Bounded Contexts, the platform provides a standardized asynchronous event communication abstraction, &lt;code&gt;IMessageService&lt;/code&gt;, with a built-in default implementation, &lt;strong&gt;&lt;code&gt;SysDaoMessageService&lt;/code&gt;&lt;/strong&gt;, based on mechanisms like the &lt;strong&gt;&lt;code&gt;SysEvent&lt;/code&gt;&lt;/strong&gt; table. This implementation is tightly integrated with database transactions, ensuring that domain events are published atomically within the &lt;strong&gt;same database transaction&lt;/strong&gt; as the business operation, providing a reliable engineering foundation for eventual consistency.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;System-wide Observability: A Standardized Coordinate System for Event Triggering&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;As a thoroughly model-driven architecture, the Nop Platform defines DSL models with clear lifecycles at &lt;strong&gt;every level&lt;/strong&gt; of the system. These models naturally standardize event trigger points, providing a unified "&lt;strong&gt;observation coordinate system&lt;/strong&gt;" for declarative event listening:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Service Layer Observation Points&lt;/strong&gt;: In the &lt;strong&gt;&lt;code&gt;XBiz&lt;/code&gt;&lt;/strong&gt; model, which hosts application services, developers can use the &lt;code&gt;observe&lt;/code&gt; section to declaratively configure listeners that trigger before or after a service function executes. These listeners can respond to events on a global EventBus, implementing cross-cutting concerns decoupled from business logic.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- Declarative listening in an XBiz model: triggers when an action of the specified BizModel is executed --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;observe&lt;/span&gt; &lt;span class="na"&gt;from=&lt;/span&gt;&lt;span class="s"&gt;"MyBizObj"&lt;/span&gt; &lt;span class="na"&gt;event=&lt;/span&gt;&lt;span class="s"&gt;"createOrder"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;source&amp;gt;&lt;/span&gt;
    &lt;span class="c"&gt;&amp;lt;!-- Write Xpl template script here to respond to the event, e.g., send notifications, record audit logs --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/source&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/observe&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Persistence Layer Observation Points&lt;/strong&gt;: The &lt;code&gt;NopORM&lt;/code&gt; engine, through the &lt;strong&gt;&lt;code&gt;IOrmInterceptor&lt;/code&gt;&lt;/strong&gt; interface, provides extremely fine-grained, entity-level lifecycle events (e.g., &lt;code&gt;pre-save&lt;/code&gt;, &lt;code&gt;post-save&lt;/code&gt;, &lt;code&gt;pre-update&lt;/code&gt;, &lt;code&gt;post-delete&lt;/code&gt;). More importantly, the platform's &lt;strong&gt;&lt;code&gt;XplOrmInterceptorFactoryBean&lt;/code&gt;&lt;/strong&gt; mechanism allows developers to define "&lt;strong&gt;database trigger&lt;/strong&gt;"-style interception logic for specific entities using the Xpl template language, simply by configuring a &lt;code&gt;/_moduleId/orm/app.orm-interceptor.xml&lt;/code&gt; file, without writing any Java code.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;interceptor&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;entity&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"io.nop.auth.dao.entity.NopAuthUser"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;post-save&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"syncToEs"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="c"&gt;&amp;lt;!-- Declarative implementation: automatically sync to Elasticsearch after a user entity is saved --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/post-save&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/entity&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/interceptor&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Process Layer Observation Points&lt;/strong&gt;: When business logic is finely orchestrated using the &lt;strong&gt;&lt;code&gt;NopTaskFlow&lt;/code&gt;&lt;/strong&gt; engine, the event mechanism becomes even more flexible. Developers can either directly insert &lt;strong&gt;observation steps&lt;/strong&gt; to trigger events at any point in the process or use the Step's &lt;strong&gt;&lt;code&gt;decorator&lt;/code&gt;&lt;/strong&gt; mechanism (which acts similarly to Java annotations) to non-invasively attach event-triggering side-effect logic to a step.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Declarative Event Weaving: Metaprogramming Injection Based on &lt;code&gt;Delta&lt;/code&gt;&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The most advanced manifestation of the Nop Platform's event-driven capabilities lies in its &lt;strong&gt;unified delta-based customization ability&lt;/strong&gt;. All DSL models follow the XLang delta syntax, supporting metaprogramming extensions through &lt;code&gt;x:gen-extends&lt;/code&gt; and &lt;code&gt;x:post-extends&lt;/code&gt;. This means that &lt;strong&gt;event listening logic itself can exist outside the base model and be "injected" into existing models during a later customization phase via a &lt;code&gt;Delta&lt;/code&gt; file&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example, a standard product module might not initially include audit logging functionality. However, when deploying for a specific client, we can use a &lt;code&gt;_delta&lt;/code&gt; customization file to "apply a delta" to key service methods or entity persistence operations, declaratively adding the logic to trigger audit events. &lt;strong&gt;This approach achieves complete decoupling and on-demand composition of event concerns, making system observability a dynamically evolving feature rather than a fixed, static design.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Closing the Theoretical Loop: From "Deliberate Design" to "Natural Emergence"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the Nop Platform, event-driven is no longer just a tactical pattern in DDD; it is elevated to a &lt;strong&gt;system-level first principle&lt;/strong&gt; that permeates the entire architecture. Through:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Standardized observation points&lt;/strong&gt; (the lifecycles of models at every layer),&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;A unified listening mechanism&lt;/strong&gt; (Observe section, OrmInterceptor, TaskFlow Decorator),&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Delta-based weaving capabilities&lt;/strong&gt; (metaprogramming injection),&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;event listening becomes a "pluggable" capability that can be &lt;strong&gt;declared after the fact, precisely targeted, and non-invasively attached&lt;/strong&gt;. Developers can make the system "grow" event-driven nerve endings without modifying core business logic. This is a profound embodiment of Reversible Computation theory at the architectural level: using a delta (Δ) to superimpose new behavior (⊕) onto an already generated base system (F(X)), ultimately allowing complex event-response capabilities to naturally &lt;strong&gt;emerge&lt;/strong&gt; from the platform.&lt;/p&gt;

&lt;h3&gt;
  
  
  9.2.4 Queries and Read Models: The Automation of &lt;code&gt;GraphQL&lt;/code&gt; and &lt;code&gt;DataLoader&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;A long-standing dilemma in traditional API design is whether to create complex interfaces that lead to "over-fetching" or multiple simple interfaces that cause "under-fetching" and numerous network requests.&lt;/p&gt;

&lt;h4&gt;
  
  
  GraphQL as a Composable Information Algebra System
&lt;/h4&gt;

&lt;p&gt;NopGraphQL fundamentally &lt;strong&gt;reinterprets&lt;/strong&gt; GraphQL, elevating it from a mere API protocol to a &lt;strong&gt;universal engine for information decomposition, composition, and dispatch&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;GraphQL is essentially REST with a standardized, composable &lt;code&gt;@selection&lt;/code&gt; parameter.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="k"&gt;query&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;NopAuthDept__findAll&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;children&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;is equivalent to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/r/NopAuthDept__findAll?@selection=name,status,children{name,status}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means GraphQL is a &lt;strong&gt;natural superset&lt;/strong&gt; of REST: when &lt;code&gt;@selection&lt;/code&gt; is not provided, the system degrades to traditional REST behavior. This mathematically proves that &lt;strong&gt;REST is a special case of GraphQL in select-all mode&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Two-Phase Execution Model: Built-in Separation of Read/Write Concerns
&lt;/h4&gt;

&lt;p&gt;NopGraphQL employs a &lt;strong&gt;two-phase execution model&lt;/strong&gt;, naturally achieving an architectural separation of read and write operations, which aligns with the principles of CQRS:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Phase One: Core Business Execution (within a transaction)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Automatically starts and commits a database transaction for &lt;code&gt;@BizMutation&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;  Executes the main service function to complete the state change.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The transaction is committed immediately&lt;/strong&gt;, releasing the database connection in the shortest possible time.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Phase Two: Result Processing (read-only)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Invokes &lt;code&gt;@BizLoader&lt;/code&gt; on-demand based on the client's &lt;code&gt;FieldSelection&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;  The ORM Session is forced into &lt;strong&gt;read-only mode&lt;/strong&gt; to prevent state pollution.&lt;/li&gt;
&lt;li&gt;  Performs field-level permission checks and data masking.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;CQRS Connection&lt;/strong&gt;: Through &lt;code&gt;@BizLoader&lt;/code&gt; and the &lt;code&gt;XMeta&lt;/code&gt; model, the system can define &lt;strong&gt;data structures and loading logic specifically for query scenarios&lt;/strong&gt;. This forms a natural separation of responsibilities from the write model, which primarily focuses on state changes and business rules. The read side can freely compose data across aggregates, define computed fields, and apply performance optimization strategies without being constrained by the write model's transaction boundaries or function signatures.&lt;/p&gt;

&lt;h4&gt;
  
  
  DataLoader Automation: Solving the N+1 Query Problem
&lt;/h4&gt;

&lt;p&gt;Achieve orthogonal decomposition of knowledge through the &lt;code&gt;@BizLoader&lt;/code&gt; mechanism:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Core query&lt;/span&gt;
&lt;span class="nd"&gt;@BizQuery&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;NopAuthUser&lt;/span&gt; &lt;span class="nf"&gt;getUser&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;@Name&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"id"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;userDao&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;findById&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Associated loader&lt;/span&gt;
&lt;span class="nd"&gt;@BizLoader&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;roles&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;@ContextSource&lt;/span&gt; &lt;span class="nc"&gt;NopAuthUser&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;roleDao&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;findRolesByUserId&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getId&lt;/span&gt;&lt;span class="o"&gt;());&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When a client queries &lt;code&gt;{ user(id:"123") { id, name, roles } }&lt;/code&gt;, the engine automatically:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Calls &lt;code&gt;getUser&lt;/code&gt; to fetch the core object.&lt;/li&gt;
&lt;li&gt; Discovers the need for the &lt;code&gt;roles&lt;/code&gt; field and matches it to the &lt;code&gt;roles&lt;/code&gt; loader.&lt;/li&gt;
&lt;li&gt; Merges and batches queries through the DataLoader mechanism, &lt;strong&gt;solving the N+1 problem at its root&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Performance Optimization: Early Information Use and Execution Pruning
&lt;/h4&gt;

&lt;p&gt;Avoid unnecessary computations in phase one by checking the field selection:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@BizQuery&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;Order&lt;/span&gt; &lt;span class="nf"&gt;getOrder&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;@Name&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"id"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;FieldSelection&lt;/span&gt; &lt;span class="n"&gt;selection&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;Order&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;orderDao&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getById&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// Perform expensive calculation only when the client needs it&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;selection&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;hasField&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"salesAnalysis"&lt;/span&gt;&lt;span class="o"&gt;))&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setSalesAnalysis&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;analysisService&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;calculateAnalysis&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="o"&gt;));&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  The Dual Unity of Aggregate Roots and GraphQL
&lt;/h4&gt;

&lt;p&gt;The Nop Platform reinterprets the meaning of an Aggregate Root:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;An Aggregate Root is an information construction operation&lt;/strong&gt;: It builds a unified, highly cohesive "conceptual map."&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;GraphQL is an information deconstruction operation&lt;/strong&gt;: It dynamically trims the required data through &lt;code&gt;FieldSelection&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This dual unity of "aggregation" and "selection" ensures both the expressive power of the model and the efficiency of the runtime, allowing the front-end and back-end to evolve independently with clear contracts.&lt;/p&gt;

&lt;h4&gt;
  
  
  Security Assurance: Field-Level Permission Control
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Field-level security&lt;/strong&gt; is built into the &lt;code&gt;XMeta&lt;/code&gt; model.&lt;/li&gt;
&lt;li&gt;  Field-level ACLs and data masking policies pre-prune permissions during the query plan generation phase.&lt;/li&gt;
&lt;li&gt;  Unauthorized access and side-channel information leaks are prevented at the source.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Theoretical Value
&lt;/h4&gt;

&lt;p&gt;The innovation of NopGraphQL lies in &lt;strong&gt;elevating APIs from a "collection of endpoints" to a "composable information algebra system."&lt;/strong&gt; Business logic is written once and can be automatically adapted by the engine to multiple protocols like GraphQL, REST, and gRPC, creating a truly &lt;strong&gt;living information space&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  9.2.5 Eradicating Stubborn Problems: Solving &lt;code&gt;N+1&lt;/code&gt; and &lt;code&gt;Database Deadlocks&lt;/code&gt; at the Source
&lt;/h3&gt;

&lt;p&gt;In traditional DDD practice, the inherent conflict between object-oriented navigational queries and database transaction mechanisms often leads to the stubborn performance and concurrency problems of &lt;code&gt;N+1 queries&lt;/code&gt; and &lt;code&gt;database deadlocks&lt;/code&gt;. The Nop Platform addresses these issues with targeted mitigation and avoidance through the systematic design of its &lt;code&gt;NopORM&lt;/code&gt; engine.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Farewell to N+1: Declarative Batch Loading&lt;/strong&gt;
The &lt;code&gt;batchLoadProps&lt;/code&gt; function provided by &lt;code&gt;IEntityDao&lt;/code&gt; allows developers to preload all necessary associated properties with a single batch query after fetching a list of entities. A simple declaration is all it takes to solve the N+1 problem without breaking the encapsulation of the aggregate.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;MyEntity&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;dao&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;findAll&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;span class="c1"&gt;// Preload multi-level associations with a single batch query&lt;/span&gt;
&lt;span class="n"&gt;dao&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;batchLoadProps&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;list&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Arrays&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;asList&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"parent"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"children"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"parent.parent"&lt;/span&gt;&lt;span class="o"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Its internal mechanism is similar to GraphQL's `DataLoader` but is deeply optimized for the association graph characteristics of ORM entities. Compared to the dilemma in JPA—where using entity navigation is most natural, but performance bottlenecks force invasive rewrites of business code—NopORM's **descriptive batch loading** provides a **performance optimization path decoupled from business logic**.

This mechanism also broadens the applicability of aggregate roots. For scenarios like batch processing that require loading large amounts of data, developers do not need to abandon the object-oriented programming model. Simply executing `batchLoad` after loading each chunk is enough to efficiently assemble the complete object graph. More importantly, in higher-level frameworks like `NopGraphQL` and `SqlManager`, batch loading can be automatically analyzed and executed based on the client's Field Selection, achieving **performance optimization that is transparent and imperceptible** to the developer.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Systematically Avoiding Deadlocks: Globally Ordered Write Operations&lt;/strong&gt;&lt;br&gt;
NopORM abandons JPA's &lt;code&gt;auto-flush&lt;/code&gt; mode, which is prone to causing chaos. Write operations like &lt;code&gt;dao.save(entity)&lt;/code&gt; only register the entity's state with the current &lt;code&gt;OrmSession&lt;/code&gt; and do not immediately generate SQL. All actual database write operations are deferred until just before the transaction commits, to be executed in a single, unified &lt;code&gt;flush&lt;/code&gt; operation.&lt;/p&gt;

&lt;p&gt;During this process, NopORM &lt;strong&gt;globally sorts all pending INSERT, UPDATE, and DELETE operations based on table dependencies and entity primary keys&lt;/strong&gt;. This mechanism ensures that in any concurrent scenario, the order in which multiple transactions acquire database locks is &lt;strong&gt;deterministic and consistent&lt;/strong&gt;, thus greatly reducing the probability of deadlocks at a system level. The tricky concurrency problem of deadlocks is no longer solely reliant on developers following fragile best practices to avoid; it is largely "&lt;strong&gt;designed away&lt;/strong&gt;" through architectural design.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Addendum: OrmSession as a LoadingCache
&lt;/h4&gt;

&lt;p&gt;In essence, an &lt;code&gt;OrmSession&lt;/code&gt; can be viewed as a &lt;code&gt;LoadingCache&lt;/code&gt; specifically designed for ORM. When associated data is accessed through object navigation, if the target entity is not yet loaded, the Session automatically calls the corresponding &lt;code&gt;Persister&lt;/code&gt; to load it from the database. With NopORM, we can achieve &lt;strong&gt;data source transparency&lt;/strong&gt;: developers can manually "inject" entity objects obtained through any means (e.g., remote API calls, message queues, file parsing) into the Session using the &lt;code&gt;attach&lt;/code&gt; method. Once managed by the Session, these objects are indistinguishable from entities loaded from the database; all mechanisms for association access, state tracking, and persistence based on object navigation will work correctly. This ensures that &lt;strong&gt;when the data source changes, the core domain model code requires no modification&lt;/strong&gt;, truly achieving data-source-agnostic domain programming.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;IOrmSession&lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;

    &lt;span class="cm"&gt;/**
     * Attaches an entity from outside the session to the session.
     *
     * @param entity
     */&lt;/span&gt;
    &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;attach&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;IOrmEntity&lt;/span&gt; &lt;span class="n"&gt;entity&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;boolean&lt;/span&gt; &lt;span class="n"&gt;cascade&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

    &lt;span class="cm"&gt;/**
     * Assumes all data is in memory, directly finds collection elements in the session,
     * and assembles them into a collection object.
     *
     * @param collectionName
     */&lt;/span&gt;
    &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;assembleAllCollectionInMemory&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;collectionName&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

    &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;assembleCollectionInMemory&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Collection&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;?&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;IOrmEntity&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;coll&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Architectural Panorama: A Unified Technical Core and Platformized Capabilities&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Through the detailed analysis above, we have seen how the Nop Platform internalizes DDD's tactical patterns into standard platform capabilities. The following diagram provides a panoramic view of how these capabilities work together around a unified technical core to form a complete tactical design support system:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsxofz1c17sfjbr9ihz37.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsxofz1c17sfjbr9ihz37.png" alt="NopGraphQL" width="800" height="569"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This architecture reflects the following core design principles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Domain Model at the Center&lt;/strong&gt;: &lt;code&gt;BizObject&lt;/code&gt; and &lt;code&gt;ORM&lt;/code&gt; form a unified domain object model, hosting the core business logic.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Multi-Engine Platform Integration&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;  The &lt;code&gt;GraphQL&lt;/code&gt; engine provides flexible query capabilities, automatically optimizing N+1 problems.&lt;/li&gt;
&lt;li&gt;  The &lt;code&gt;Workflow&lt;/code&gt; and &lt;code&gt;StateMachine&lt;/code&gt; engines drive complex business processes.&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;BizModel&lt;/code&gt; achieves organic composition of business logic through a "dispatch-extend" mechanism.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;  &lt;strong&gt;Transparent Data Access Enhancement&lt;/strong&gt;: The &lt;code&gt;ORM&lt;/code&gt; layer has built-in enterprise-grade features like lazy loading, batch loading, extension fields, and distributed transactions.&lt;/li&gt;

&lt;li&gt;  &lt;strong&gt;Orthogonal Security Architecture&lt;/strong&gt;: Data permissions and operation permissions are treated as separate concerns, injected into business processes through standard interfaces.&lt;/li&gt;

&lt;li&gt;  &lt;strong&gt;Diverse Integration Support&lt;/strong&gt;: Native support for integration patterns like &lt;code&gt;MessageQueue&lt;/code&gt;, &lt;code&gt;RPC&lt;/code&gt;, and &lt;code&gt;BatchFile&lt;/code&gt;.&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;This design allows developers to naturally achieve a robust and evolvable system architecture without consciously following DDD patterns—this is the engineering embodiment of "emergent robustness."&lt;/p&gt;

&lt;h2&gt;
  
  
  9.3 Programmable Evolution: The "Trinity" Paradigm of Reversible Computation
&lt;/h2&gt;

&lt;p&gt;Reversible Computation provides a solid mathematical and engineering foundation for the implementation and long-term evolution of DDD models through the unified paradigm &lt;code&gt;Y = F(X) ⊕ Δ&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  9.3.1 The Unified Evolution Formula: &lt;code&gt;Effective Model = Generator&amp;lt;Base Model&amp;gt; ⊕ Δ(Delta)&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;In the Nop Platform, the construction of any model follows this formula. Whether it's a data model, a UI model, or a process model, its final effective form is composed of a base model (often &lt;strong&gt;generated&lt;/strong&gt; from an upstream model) and one or more &lt;strong&gt;Delta&lt;/strong&gt; packages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Profound Mathematical Insight: Full Content is a Special Case of a Delta&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This design is rooted in a profound mathematical principle: &lt;strong&gt;a full representation is just a special case of a delta&lt;/strong&gt; (&lt;code&gt;A = 0 + A&lt;/code&gt;). In any system with a unit element, the full representation is equivalent to "the unit element + itself." For example, in software construction, the "do nothing" null operation is the unit element, and any operation can be seen as a delta on top of that null operation. This seemingly simple cognitive shift is actually a paradigm shift from "action-oriented thinking" to "noun-oriented thinking" and is the key breakthrough in treating &lt;strong&gt;delta as a first-class concept&lt;/strong&gt;. It completely unifies "building from scratch" and "customizing modifications" mathematically, providing unprecedented flexibility for software evolution.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;The Engineering Value of Isomorphic Design&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The direct engineering manifestation of this principle is &lt;strong&gt;isomorphic design&lt;/strong&gt;: the format for expressing a delta is identical to that of the full model, eliminating the need for a special format for deltas. Compare JSON Patch with the Nop Platform's implementation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;JSON&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Patch&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;(Heterogeneous&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;design,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;special&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;format)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"op"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"add"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/columns/-"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"value"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"newColumn"&lt;/span&gt;&lt;span class="p"&gt;}},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"op"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"remove"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/columns/2"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Nop&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Platform&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;(Isomorphic&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;design,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;unified&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;format)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"columns"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"newColumn"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"string"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"column2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"x:override"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"remove"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;JSON Patch uses a completely different syntax and relies on unstable array indices. The Nop Platform's delta maintains the same structure as the full model, using only a few extension attributes like &lt;code&gt;x:override&lt;/code&gt; to express the intent of the change and relying on stable semantic identifiers (like &lt;code&gt;name&lt;/code&gt;) to locate elements. This isomorphic design is consistent throughout the platform: from modified data submitted by the front-end to change records in the back-end database, all use a unified delta representation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Breakthrough Insight: The Scope of a Delta Can Cover Any Granularity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Recognizing that "full content is a special case of a delta" also shatters a common misconception: that deltas must be small, local changes. In reality, &lt;strong&gt;the scope of a delta can cover any granularity&lt;/strong&gt;—from modifying a single field to refactoring an entire module, and even building a brand new system, all can be expressed through deltas. In a mathematical context with inverse elements, a delta can even express the reverse operation of "from the current system to an empty state." This understanding liberates the mindset of software evolution, providing a unified theoretical framework for system refactoring and customization.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Built-in Delta Support in DSLs: All DSLs Follow a Unified Decomposition and Merge Mechanism&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;All DSLs in the Nop Platform natively support decomposition and merging, implementing complex model management through the standardized XLang Delta syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- Inherit a base model via x:extends --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;x:extends=&lt;/span&gt;&lt;span class="s"&gt;"_NopAuthUser.xmeta"&lt;/span&gt; &lt;span class="na"&gt;x:schema=&lt;/span&gt;&lt;span class="s"&gt;"/nop/schema/xmeta.xdef"&lt;/span&gt;
      &lt;span class="na"&gt;xmlns:x=&lt;/span&gt;&lt;span class="s"&gt;"/nop/schema/xdsl.xdef"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

    &lt;span class="c"&gt;&amp;lt;!-- Dynamically generate model content via metaprogramming --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;x:post-extends&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;biz-gen:GenDictLabelFields&lt;/span&gt; &lt;span class="na"&gt;xpl:lib=&lt;/span&gt;&lt;span class="s"&gt;"/nop/core/xlib/biz-gen.xlib"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/x:post-extends&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/meta&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key mechanisms include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;&lt;code&gt;x:extends&lt;/code&gt;&lt;/strong&gt;: Inherits from an existing model file.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;&lt;code&gt;x:gen-extends&lt;/code&gt;/&lt;code&gt;x:post-extends&lt;/code&gt;&lt;/strong&gt;: Built-in metaprogramming mechanism, implementing the Generator part of Reversible Computation.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;&lt;code&gt;x:override&lt;/code&gt;&lt;/strong&gt;: Specifies the node merge strategy (merge, replace, remove, etc.).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Extension Attribute Support&lt;/strong&gt;: All DSL model objects support arbitrary extension attributes without modifying the platform's built-in meta-models.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  9.3.2 The Deterministic Construction Phase: &lt;code&gt;S-N-V&lt;/code&gt; (Structure Merge - Normalization - Validation) Loading
&lt;/h3&gt;

&lt;p&gt;The construction process for all DSL models in the Nop Platform is decomposed into three deterministic phases: S (Structure Merge) &lt;strong&gt;→&lt;/strong&gt; N (Normalization) &lt;strong&gt;→&lt;/strong&gt; V (Validation). This layered principle, through clever "process decomposition" and "separation of concerns," solves the core challenges in designing a universal merge algorithm.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;The Fundamental Insight: Retreating to Structural Unification&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Similar to how relational databases solve data consistency issues by &lt;strong&gt;retreating to a non-redundant, standardized table structure&lt;/strong&gt;, the Nop Platform achieves unified delta processing by &lt;strong&gt;retreating to a standardized XDSL structural layer&lt;/strong&gt;. That is, delta merging is not performed at the level of parsed, strongly-typed object models, but at a lower-level, standardized tree structure (XNode).&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Relational Model Theory&lt;/th&gt;
&lt;th&gt;Reversible Computation Theory&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Schema Definition&lt;/td&gt;
&lt;td&gt;XDefinition Meta-model Specification&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Non-redundant Tabular Data&lt;/td&gt;
&lt;td&gt;Non-redundant Tree-like Information Structure: XDSL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;On-the-fly computation on standardized data structures: SQL&lt;/td&gt;
&lt;td&gt;Compile-time computation on a generic XNode data structure: XLang&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This "one step back" design allows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Decoupling of merge algorithms from business semantics&lt;/strong&gt;: A single universal algorithm can handle the merging of all DSLs.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Deterministic merge results&lt;/strong&gt;: The same input will always produce the same output structure.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Support for unified cross-domain processing&lt;/strong&gt;: DSLs from different business domains use the same merge mechanism.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;"Virtual Time" and Deferred Validation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The S-N-V principle introduces a philosophy of "Virtual Time," which boldly allows a model to exist in a &lt;strong&gt;temporary, semantically inconsistent intermediate state&lt;/strong&gt; during its construction. Before the final validation occurs, the system tolerates the model's "imperfections," thereby completely decoupling the generic "structural arrangement" from the complex "meaning check."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Three-Phase Decomposition&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;S - Structure Merge: Generic Tree Structure Operations&lt;/strong&gt;&lt;br&gt;
This phase operates only at the &lt;strong&gt;structural layer&lt;/strong&gt;, executing domain-agnostic, universal algorithms. It mechanically merges the XNode tree based on meta-directives like &lt;code&gt;x:override&lt;/code&gt;, ensuring the merge process satisfies the &lt;strong&gt;associative law&lt;/strong&gt;. The output may be an intermediate model that does not yet satisfy semantic constraints.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;N - Normalization: Domain-Specific Semantic Processing&lt;/strong&gt;&lt;br&gt;
On the basis of the merged structure, domain-specific semantic corrections are performed. This is analogous to view computation in relational databases and includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Parsing and applying default values&lt;/li&gt;
&lt;li&gt;  Computing derived properties&lt;/li&gt;
&lt;li&gt;  Expanding shorthand syntax&lt;/li&gt;
&lt;li&gt;  Automatically resolving benign semantic conflicts&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;V - Validation: Final Legality Check&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
After all structural semantics have stabilized, a final, global validation is performed to ensure the output is a completely legal model.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Engineering Value: Determinism from Structural Unification&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Unified model loading process: Structure Layer =&amp;gt; Object Layer&lt;/span&gt;
&lt;span class="nx"&gt;modelPath&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;XDSL&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;S&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;N&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;V&lt;/span&gt; &lt;span class="nx"&gt;processing&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;DslModel&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This structure-layer-based unified processing ensures:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Algorithmic Generality&lt;/strong&gt;: The S phase uses one set of algorithms for all models, with O(1) complexity.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Semantic Extensibility&lt;/strong&gt;: The N/V phases are attached as pluggable rules to specific domains.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;High Runtime Performance&lt;/strong&gt;: All complex transformations are completed at load-time.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Online Dynamic Updates&lt;/strong&gt;: Supports runtime model hot-swapping through a virtual file system.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Dynamic Delta-based Updates
&lt;/h4&gt;

&lt;p&gt;How can we ensure runtime state consistency when a DSL model is updated with a delta? To answer this, we can look at the solution provided by microservices architecture.&lt;/p&gt;

&lt;p&gt;Microservices can achieve dynamic rolling updates because of their so-called stateless design. The traditional object-oriented approach encapsulates functions and the data they process into objects, leading to a tangled mess of functions and data—a spaghetti-like structure that is difficult to break down and, consequently, difficult to update partially. Ideally, we want a layered structure, like a mille-feuille pastry, where layers can be added or removed at will.&lt;/p&gt;

&lt;p&gt;The essence of stateless design is the decoupling of processing logic from the runtime state space. The "pure air" of static logic rises, and the "turbid air" of dynamic runtime state sinks. This dynamic state data is pushed out of the static logic structure, with some becoming parameters passed between functions and some becoming persistent data stored in shared storage. This way, the microservice's runtime structure itself no longer explicitly contains state data, so its dynamic updates are not entangled with state space data migration, becoming a problem that can be solved independently.&lt;/p&gt;

&lt;p&gt;When accessing a microservice, we first go to a service registry, dynamically look up the service instance by name, and then send it input parameters. The service instance then automatically loads persistent state data based on these parameters. In the abstract language of functional programming, the process of a microservice corresponds to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  serviceName =&amp;gt; Service =&amp;gt; input =&amp;gt; state =&amp;gt; Result
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Similarly, in the Nop Platform, the processing of all models follows the same logical structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  modelPath =&amp;gt; XDSL =&amp;gt; DslModel =&amp;gt; arguments =&amp;gt; scope =&amp;gt; Result
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Like microservices, the dynamic updating of a DSL model can be independent of the structural migration of the state space.&lt;/p&gt;

&lt;h3&gt;
  
  
  9.3.3 The Fractal Software Production Line: &lt;code&gt;XORM&lt;/code&gt; → &lt;code&gt;XMeta&lt;/code&gt; → &lt;code&gt;XView&lt;/code&gt; → &lt;code&gt;XPage&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiu7n4brr3t7h0l0uxg4m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiu7n4brr3t7h0l0uxg4m.png" alt="delta-product-line" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Nop Platform decomposes the process from data to page into a multi-stage &lt;strong&gt;fractal software production line&lt;/strong&gt;. Each transformation step on this line strictly follows the evolution formula of Reversible Computation:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;XMeta = Generator&amp;lt;XORM&amp;gt; ⊕ Δ_meta&lt;/code&gt;&lt;br&gt;
&lt;code&gt;XView = Generator&amp;lt;XMeta&amp;gt; ⊕ Δ_view&lt;/code&gt;&lt;br&gt;
&lt;code&gt;XPage = Generator&amp;lt;XView&amp;gt; ⊕ Δ_page&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Essence of Fractal: Infinitely Recursive Decomposition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The core of this fractal design is its &lt;strong&gt;self-similarity&lt;/strong&gt;: each component can be further decomposed into a combination of finer-grained generators and deltas. Not only does the final product follow this pattern, but the generators and deltas themselves also follow the same structure:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Generator&amp;lt;X&amp;gt; = Generator&amp;lt;Generator&amp;lt;X&amp;gt;&amp;gt; ⊕ Δ_generator&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Δ_meta = Generator&amp;lt;Δ_base&amp;gt; ⊕ Δ_custom&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Generators can be constructed in layers&lt;/strong&gt;: A base generator can be customized with a delta to create a more specialized generator.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Deltas can be defined recursively&lt;/strong&gt;: A delta itself can be composed from more fundamental deltas via a generator.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Unity at every granularity&lt;/strong&gt;: From the finest-grained field definition to a complete page layout, everything follows the same construction pattern.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Complete Independence at Every Level&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Based on this fractal characteristic, each level possesses complete, independent capabilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;XMeta Level&lt;/strong&gt;: Can be entirely generated from XORM, written manually from scratch, or built from zero using &lt;code&gt;Generator&amp;lt;Empty&amp;gt; ⊕ Δ_meta&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;XView Level&lt;/strong&gt;: The generator itself can be &lt;code&gt;Generator&amp;lt;XMeta&amp;gt;&lt;/code&gt;, or it can be &lt;code&gt;Generator&amp;lt;Empty&amp;gt;&lt;/code&gt; plus a complete &lt;code&gt;Δ_view&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Arbitrary Combination&lt;/strong&gt;: Any level can selectively use information from the level below or be developed completely independently.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This infinitely recursive fractal design completely solves the rigid constraints of traditional MDA (either fully automatic or fully manual), achieving a truly flexible software production line. Developers can intervene at any granularity and any level, using the delta mechanism to achieve all kinds of customization needs, from minor tweaks to fundamental refactoring, while the entire system maintains a unified mathematical structure and predictable behavior.&lt;/p&gt;
&lt;h3&gt;
  
  
  9.3.4 Full-Stack Delta Customization: The Path of Evolution Without Changing a Single Line of Base Code
&lt;/h3&gt;

&lt;p&gt;In the Nop Platform, the Reversible Computation concept of delta customization is systematically realized through the core technology of a &lt;strong&gt;Delta File System&lt;/strong&gt;. This mechanism turns the ideal of deep customization "without changing a single line of base code" into an engineering reality, fundamentally changing the software delivery and evolution model.&lt;/p&gt;
&lt;h4&gt;
  
  
  The Delta File System: The Cornerstone of System-Level Customization
&lt;/h4&gt;

&lt;p&gt;The Nop Platform's virtual file system provides capabilities similar to UnionFS in Docker technology, implementing system-level resource customization through layered overlays:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;code&gt;/_vfs/_delta/default/a.xml&lt;/code&gt; will automatically override &lt;code&gt;/_vfs/a.xml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;  All code loaded via &lt;code&gt;ResourceComponentManager.loadComponentModel("/a.xml")&lt;/code&gt; will actually read &lt;code&gt;/_vfs/_delta/default/a.xml&lt;/code&gt; after the delta layer is enabled.&lt;/li&gt;
&lt;li&gt;  Multiple delta layers can be supported by configuring &lt;code&gt;nop.core.vfs.delta-layer-ids&lt;/code&gt;, enabling more complex customization strategies.&lt;/li&gt;
&lt;li&gt;  Model records in the database (e.g., &lt;code&gt;wf:MyWf/1.0&lt;/code&gt;) can also be mapped to virtual file paths, bringing dynamically created models under the management of the delta mechanism.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  Full-Stack Customization Example: Seamless Overlays from Data Model to Front-end UI
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmuymbs2cxh9hmophqbj4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmuymbs2cxh9hmophqbj4.png" alt="full stack delta" width="799" height="329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the &lt;code&gt;_delta&lt;/code&gt; directory, by using delta files with the same names as the base models, any layer of the system can be non-invasively modified:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Data Model Delta&lt;/strong&gt;: In &lt;code&gt;orm/app.orm.xml&lt;/code&gt;, use &lt;code&gt;x:override="remove"&lt;/code&gt; to delete fields from the base product, or directly add new business entities.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Business Logic Delta&lt;/strong&gt;: Through an &lt;code&gt;xbiz/app.xbiz&lt;/code&gt; file, declaratively add new business methods to the base entity's CRUD services or override existing logic.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;IoC Configuration Delta&lt;/strong&gt;: Override &lt;code&gt;beans/app.beans.xml&lt;/code&gt;, using &lt;code&gt;x:extends="super"&lt;/code&gt; to append new beans, modify the properties of existing beans, or even replace an entire bean's implementation class.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Front-end UI Delta&lt;/strong&gt;: In &lt;code&gt;pages/MyEntity/MyEntity.view.xml&lt;/code&gt;, add new action buttons to a base list page or modify the layout of a form through delta merging.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Engine Capability Delta&lt;/strong&gt;: All engine models (rules, reports, workflows) are XDSLs, and extension nodes can be injected or existing definitions modified via the &lt;code&gt;Delta&lt;/code&gt; mechanism.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  Paradigm Shift: From "1 Core + N Forks" to "1 Base + N Deltas"
&lt;/h4&gt;

&lt;p&gt;The delta mechanism of Reversible Computation brings about a fundamental paradigm shift, upgrading the software construction and delivery model from the traditional branching model to a delta-stacking model:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Traditional Model (1 Core + N Forks)&lt;/strong&gt;: Based on a core version, multiple independent branches (Forks) are created to meet the needs of different customers or markets. This leads to an &lt;strong&gt;exponential increase in maintenance costs&lt;/strong&gt;, makes it difficult to synchronize features between branches, and ultimately results in merge hell.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reversible Computation Model (1 Base + N Deltas)&lt;/strong&gt;: Based on a unified base product, the final system is generated by stacking multiple independent, composable delta packages (Δ). The unified formula is:&lt;br&gt;
&lt;code&gt;Effective System = Base ⊕ Δ_Industry ⊕ Δ_Region ⊕ Δ_Customer&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  The Sustainability of Customization and Evolution
&lt;/h4&gt;

&lt;p&gt;This full-stack, delta-based customization method ensures the sustainability of software evolution:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;The base product can be upgraded independently&lt;/strong&gt;: Delta customizations are physically isolated from the base code. Bug fixes and feature enhancements to the base product can be released independently, and custom projects can safely merge these changes by updating their dependency versions.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Customization logic can be accumulated and reused&lt;/strong&gt;: Customization logic for specific industries or customers can be packaged as independent Delta modules and reused in different projects.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Customization conflicts can be visually traced&lt;/strong&gt;: Thanks to the metadata preserved by XNode during the merge process, the origin of every custom element can be precisely traced. When conflicts occur between multiple Delta modules, they can be quickly located and resolved.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Through this systematic delta customization mechanism, the Nop Platform achieves the ideal goal of "retaining the efficiency of automation without losing the flexibility of customization," providing a solid technical foundation for the long-term evolution of complex business systems.&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;Platformized Multi-tenancy: The Tenant as a Coordinate Dimension&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;This full-stack delta customization mechanism provides an exceptionally elegant, platform-level solution for the complex requirement of multi-tenancy. In the Nop Platform, multi-tenancy is not a "special case" that requires special coding but a natural consequence of its core architecture. Based on the idea that "extensibility is dimension extension," a &lt;strong&gt;Tenant is treated as an independent dimension in the system's coordinate space&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;When the system needs to load any resource (like an ORM model, a business process, or a UI page), its core model loader (&lt;code&gt;Loader&lt;/code&gt;) automatically adds a &lt;code&gt;tenantId&lt;/code&gt; dimension, extending the loading function from &lt;code&gt;Model = Loader(resourcePath)&lt;/code&gt; to &lt;code&gt;Model = Loader(resourcePath ⊗ tenantId)&lt;/code&gt;. &lt;strong&gt;This is analogous to extending a single-variable function in mathematics to a function acting on a tensor product space.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This abstraction is seamlessly implemented in engineering terms through the platform's &lt;strong&gt;Delta File System&lt;/strong&gt;: when the &lt;code&gt;Loader&lt;/code&gt; loads &lt;code&gt;a.xml&lt;/code&gt;, it automatically considers the "current tenant ID" as a dimension, prioritizing searching and merging from the tenant-specific delta layer (e.g., &lt;code&gt;/_delta/tenantA/a.xml&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Therefore, whether implementing simple &lt;strong&gt;data isolation&lt;/strong&gt; (by customizing the &lt;code&gt;NopORM&lt;/code&gt; model under a tenant delta layer to automatically add a tenant ID filter to all queries) or implementing complex &lt;strong&gt;tenant-specific business logic&lt;/strong&gt; (by customizing &lt;code&gt;NopTaskFlow&lt;/code&gt; or &lt;code&gt;NopRule&lt;/code&gt; models), everything is accomplished under the unified delta paradigm of &lt;code&gt;Y = F(X) ⊕ Δ&lt;/code&gt;. Multi-tenancy is no longer a collection of scattered &lt;code&gt;if-else&lt;/code&gt; statements but a universal, predictable system behavior that &lt;strong&gt;emerges&lt;/strong&gt; from the platform's first principles.&lt;/p&gt;
&lt;h3&gt;
  
  
  9.4 Contract-First: From "Living Documents" to "Living Systems"
&lt;/h3&gt;

&lt;p&gt;The Nop Platform elevates the DDD principles of "Ubiquitous Language" and "Model-Driven" to a truly automated, contract-first software production line.&lt;/p&gt;
&lt;h4&gt;
  
  
  9.4.1 Contract is Model, Model is Contract: An Automated Production Pipeline Starting with &lt;code&gt;Excel&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;In Nop, Contract-First is implemented in its most thorough form. All key designs, such as data models and API interfaces, are clearly defined in an &lt;strong&gt;Excel model&lt;/strong&gt; during the requirements phase. This model is no longer a static document but an "&lt;strong&gt;executable contract&lt;/strong&gt;," the single source of truth that drives all subsequent automated processes. Once the "contract" is established, the platform can automatically generate database DDL, back-end entities and services, API documentation, and even front-end page skeletons.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI-Enhanced Model Generation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Nop Platform's DSL-driven architecture is naturally suited for AI-assisted development. By interacting with large AI models, one can directly generate DSLs like &lt;code&gt;orm.xml&lt;/code&gt; and &lt;code&gt;xmeta&lt;/code&gt;, which can then be automatically converted to Excel format using the platform's built-in converters:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AI Generation =&amp;gt; orm.xml =&amp;gt; Automatic Conversion =&amp;gt; Excel Model
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  9.4.2 Reversible Transformation of Multiple Representations: Lossless Conversion and Delta Merging of Excel, XML, JSON
&lt;/h4&gt;

&lt;p&gt;Reversible Computation theory states that information has multiple representations that are mutually convertible. The Nop Platform engineers this: &lt;strong&gt;any model naturally has multiple forms, such as Excel, XML, JSON, and YAML, and can be automatically converted back and forth&lt;/strong&gt;. A technical person can enjoy the syntax checking of XML in an IDE, while a business person can review and even edit the same model in the familiar environment of Excel.&lt;/p&gt;

&lt;p&gt;More importantly, these representations are also &lt;strong&gt;delta-based&lt;/strong&gt;. A business person can define only the changes in an &lt;code&gt;app-delta.orm.xlsx&lt;/code&gt; file, and then, using command-line tools, safely merge multiple &lt;code&gt;Delta&lt;/code&gt; models with the base model.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# XML → XLSX&lt;/span&gt;
java &lt;span class="nt"&gt;-jar&lt;/span&gt; nop-cli.jar convert app.orm.xml  &lt;span class="nt"&gt;-o&lt;/span&gt; app.orm.xlsx

&lt;span class="c"&gt;# XLSX + Delta XLSX → XML&lt;/span&gt;
java &lt;span class="nt"&gt;-jar&lt;/span&gt; nop-cli.jar convert app.orm.xlsx app-delta.orm.xlsx &lt;span class="nt"&gt;-o&lt;/span&gt; app.orm.xml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  9.4.3 Unified Governance and Quality Assurance: Full-Link &lt;code&gt;Traceability&lt;/code&gt; and &lt;code&gt;Snapshot Testing&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;The Nop Platform provides powerful governance capabilities for this complex automated system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Full-Link Traceability&lt;/strong&gt;: Thanks to the rich metadata preserved by XNode during the merge process, any final result in the system (like a button on a page) can be &lt;code&gt;_dump&lt;/code&gt;ed with a single command to precisely trace its complete "generation history": in which base file and on which line it was originally defined, and which delta files modified it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Contract is Test&lt;/strong&gt;: Through &lt;code&gt;JunitAutoTestCase&lt;/code&gt; and the &lt;code&gt;@EnableSnapshot&lt;/code&gt; annotation, the platform can automatically record service call requests, responses, and all observable side effects as a "snapshot." Subsequent test runs automatically compare against this snapshot, achieving "&lt;strong&gt;contract as test&lt;/strong&gt;." This can dramatically reduce the cost of creating and maintaining automated tests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Complete Observability and Deterministic Side Effects&lt;/strong&gt;: Reversible Computation theory posits that a well-designed system should have complete observability. The key criterion for this is that &lt;strong&gt;all side effects (such as database state changes, message queue sends, cache updates, file system operations, external API calls, etc.) should be observable&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The complete behavior of a software system can be abstracted as:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Complete System Behavior &lt;span class="o"&gt;=&lt;/span&gt; Input + Output + Side Effects
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Traditional unit tests often focus only on inputs and outputs, ignoring various side effects, which leads to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Non-deterministic test results&lt;/li&gt;
&lt;li&gt;  Fragility due to environmental dependencies&lt;/li&gt;
&lt;li&gt;  Difficult-to-reproduce intermittent issues&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Nop Platform, through its systematic observation mechanisms, can capture and record all key side-effect data. When we supplement the input/output dataset with this observed side-effect data, we get the &lt;strong&gt;complete information set&lt;/strong&gt; of the system's behavior:&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;Deterministic Test Case &lt;span class="o"&gt;=&lt;/span&gt; Input + Output + Observed Side Effects
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;This complete observability &lt;strong&gt;eliminates all unknown side-effect influences, restoring a test case that was once disturbed by its environment into a purely deterministic function&lt;/strong&gt;. This fundamentally overcomes the problem of test fragility caused by incomplete information.&lt;/p&gt;

&lt;p&gt;Based on this principle, the Nop Platform implements reliable &lt;strong&gt;record-and-replay unit testing&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Recording Phase&lt;/strong&gt;: The system completely records input parameters, return values, and all observable side effects (including database change logs, message sending records, cache operations, etc.).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Replay Phase&lt;/strong&gt;: By replaying the same input, the test verifies the complete consistency of the output and all side effects.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Environment Isolation&lt;/strong&gt;: The test does not depend on a real external environment; all side effects are replayed in a controlled, simulated environment.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This testing method is particularly suitable for verifying complex systems after multiple &lt;code&gt;Delta&lt;/code&gt; layers have been applied, ensuring that customizations do not break original business logic and providing a solid guarantee for the reliable evolution of the system.&lt;/p&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;From an architectural perspective, complete observability provides a solid technical foundation for event-driven architecture.&lt;/strong&gt; As mentioned earlier, through system-wide standardized observation points, the system can automatically trigger events at the precise moment of a state change, making declarative event weaving possible and thus achieving a complete decoupling of business logic from cross-cutting concerns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This also inversely proposes an important criterion for judging architectural design: is the system's observability sufficient to enable automated record-and-replay testing, transforming complex business logic processing into a deterministic pure function?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Chapter 10: The Final Paradigm Revolution — From "Applying DDD" to "Emergent DDD"&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Introduction: The "No-Move Is the Best Move" State of Architecture
&lt;/h3&gt;

&lt;p&gt;At this point, we have detailed from an engineering perspective how the Nop Platform solidifies DDD's strategic and tactical patterns into a rigorous, executable, and closed-loop system. However, to truly understand the change that the Nop Platform brings, we must answer a deeper question: what is the fundamental difference between it and other frameworks that attempt to standardize DDD?&lt;/p&gt;

&lt;p&gt;The answer lies in a profound &lt;strong&gt;paradigm revolution&lt;/strong&gt;: from &lt;strong&gt;consciously "Applying DDD"&lt;/strong&gt; to &lt;strong&gt;unconsciously "Emergent DDD."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This transformation is akin to the paradigm shift in physics from Newtonian mechanics to relativity. &lt;strong&gt;Newtonian mechanics relies on detailed force analysis&lt;/strong&gt;, requiring us to precisely calculate every action and reaction—just as traditional DDD practice demands that developers constantly maintain design vigilance, consciously partitioning boundaries, defining entities, and building aggregates. It is an "architectural design" based on external rules and active effort.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But Einstein's relativity showed that spacetime itself is curved by mass and energy, and the motion of objects is simply them following the shortest path (a geodesic) in this curved spacetime.&lt;/strong&gt; It no longer focuses on isolated "forces" but describes the intrinsic geometric properties of spacetime itself. Similarly, the ultimate goal of the Nop Platform is not to provide a more refined set of "DDD design tools," but to shape a "curved space" through its meta-model system and delta-merge mechanism, a space where domain models can grow naturally. In this "space," defined by Reversible Computation theory, the organization of code, the partitioning of boundaries, and the evolution of models spontaneously tend toward the form that best fits the essence of the domain.&lt;/p&gt;

&lt;p&gt;Just as the highest level of martial arts is "the best move is no move," the ideal endpoint of DDD practice may well be to "forget DDD" itself. When the construction space of the system inherently contains all the evolutionary possibilities of domain models, the deliberate "application" of specific design patterns is no longer necessary. Structures that are true to the domain's essence will emerge naturally within it.&lt;/p&gt;

&lt;h3&gt;
  
  
  10.1 From Application-Layer Abstractions to First-Principle Support
&lt;/h3&gt;

&lt;p&gt;A fine example of traditional DDD architecture is the Explicit Architecture proposed by Herberto Graca. See &lt;a href="https://www.jianshu.com/p/d3e8b9ac097b" rel="noopener noreferrer"&gt;Explicit Architecture (01): Fusing DDD, Onion Architecture, Clean Architecture, CQRS...&lt;/a&gt;. The Nop Platform aims to achieve similar technical goals, but through a different path.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgitee.com%2Fcanonical-entropy%2Fnop-entropy%2Fraw%2Fmaster%2Fdocs%2Ftheory%2Fddd%2Fexplicit-arch-diagram.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgitee.com%2Fcanonical-entropy%2Fnop-entropy%2Fraw%2Fmaster%2Fdocs%2Ftheory%2Fddd%2Fexplicit-arch-diagram.png" alt="explicit arch" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most frameworks that attempt to engineer DDD are essentially providing &lt;strong&gt;fixed abstractions at the application layer&lt;/strong&gt;. They offer a series of base classes or interfaces like &lt;code&gt;AggregateRootBase&lt;/code&gt;, &lt;code&gt;AbstractRepository&lt;/code&gt;, and &lt;code&gt;DomainEvent&lt;/code&gt;. Developers must consciously inherit from and implement them, as if they were building an application with a set of "DDD building blocks." The intention is good, but it still requires the developer to first be a competent DDD thinker and then "translate" that thinking into calls to the framework's specific APIs.&lt;/p&gt;

&lt;p&gt;The Nop Platform takes a radically different path. It &lt;strong&gt;does not provide fixed DDD patterns at the application layer but instead provides the first principles at the underlying level of software construction that support the natural emergence of these patterns&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  10.1.1 The Internalization of Patterns: A Comparison with the Evolution of the &lt;code&gt;Singleton&lt;/code&gt; Pattern and &lt;code&gt;DI&lt;/code&gt; Frameworks
&lt;/h4&gt;

&lt;p&gt;This is like the history of modern high-level languages and frameworks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Once upon a time, developers had to manually implement the "Singleton Pattern" and constantly be wary of concurrency pitfalls like double-checked locking. But with the advent of modern Dependency Injection (DI) frameworks (like Spring or NopIoC), a developer simply declares a component's scope (&lt;code&gt;@Singleton&lt;/code&gt;), and the "singleton" becomes a natural result; we no longer need to care about its complex underlying implementation. Similarly, we once had to manually implement the "Observer Pattern," but today's reactive programming frameworks allow us to simply declare data streams and transformation relationships, and the complex event propagation and subscription management are made transparent by the framework.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;The Nop Platform elevates this idea of "pattern internalization" to the level of the entire DDD system.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  10.1.2 The Protocol-Neutral BizModel: Dissolving the Redundant &lt;code&gt;Controller/Service/DTO&lt;/code&gt; Layers
&lt;/h3&gt;

&lt;p&gt;In traditional layered architectures (like Controller-Service-DAO), concepts like &lt;code&gt;Controller&lt;/code&gt;, &lt;code&gt;Service&lt;/code&gt;, and &lt;code&gt;DTO&lt;/code&gt; form explicit, mandatory layers. This leads to a large amount of glue code and "translation loss": domain objects need to be converted and encapsulated at each layer, and the rich domain objects returned by a &lt;code&gt;Service&lt;/code&gt; are "flattened" or converted into specialized &lt;code&gt;DTOs&lt;/code&gt; in the &lt;code&gt;Controller&lt;/code&gt; layer to adapt to front-end requirements or hide internal details.&lt;/p&gt;

&lt;p&gt;The Nop Platform, through its unified &lt;code&gt;NopGraphQL&lt;/code&gt; engine and &lt;strong&gt;protocol-neutral BizModel&lt;/strong&gt;, completely dissolves these redundant boundaries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A &lt;code&gt;BizModel&lt;/code&gt; is a pure expression of business logic, independent of any external interface protocol.&lt;/strong&gt; A developer simply uses &lt;code&gt;@BizModel&lt;/code&gt; and &lt;code&gt;@BizMutation&lt;/code&gt;/&lt;code&gt;@BizQuery&lt;/code&gt; annotations on a plain Java class (POJO) to define the core business logic. This method directly returns domain entities, aggregate roots, or other complex domain objects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The key to achieving protocol neutrality lies in its minimalist interface signature.&lt;/strong&gt; Unlike many traditional MVC frameworks that allow or even encourage exposing runtime-specific objects like &lt;code&gt;HttpServletRequest&lt;/code&gt; or &lt;code&gt;WebContext&lt;/code&gt; in Controller methods, NopGraphQL service function input parameters are strictly limited to &lt;strong&gt;pure POJOs&lt;/strong&gt; (or primitive types), and an optional &lt;code&gt;FieldSelection&lt;/code&gt; (to sense client query needs). It does not need, and cannot access, any runtime objects specific to the HTTP protocol or any other transport protocol.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This design brings fundamental benefits:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Automatic Decoupling&lt;/strong&gt;: Business logic is decoupled from any specific interface protocol (like HTTP, gRPC, or message queues) at its source. The same &lt;code&gt;BizModel&lt;/code&gt; can be exposed as GraphQL, REST, RPC, and other endpoints without any modification.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Purity and Testability&lt;/strong&gt;: Since it does not depend on any web container or framework context, the service function can be unit-tested in a pure fashion. Testing simply involves constructing POJO inputs and validating POJO outputs, drastically reducing the complexity and cost of testing.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Clear Intent&lt;/strong&gt;: The function signature clearly expresses the business input and output, with no "noise" related to technical implementation, making the domain logic the absolute core.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;So, with such a pure interface, how are complex interface adaptation needs met? The fundamental reason is that the &lt;code&gt;NopGraphQL&lt;/code&gt; engine provides a powerful, standardized "post-processing pipeline" that replaces the hand-written, scattered glue code of traditional architectures.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When a &lt;code&gt;BizModel&lt;/code&gt;'s service function returns a result, the engine's subsequent processing is far from simple JSON serialization. This substantial post-processing layer automatically executes a series of complex and critical logic:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;On-Demand Loading and N+1 Optimization&lt;/strong&gt;: The engine parses the client's &lt;code&gt;FieldSelection&lt;/code&gt;, automatically identifies associated properties that need to be lazy-loaded, and uses the &lt;code&gt;DataLoader&lt;/code&gt; mechanism for batch loading, solving the N+1 query problem at its root.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Field-Level Post-Processing&lt;/strong&gt;: Based on configurations like &lt;code&gt;transformOut&lt;/code&gt; and &lt;code&gt;getter&lt;/code&gt; defined in the &lt;code&gt;XMeta&lt;/code&gt; meta-model, it performs complex transformations, calculations, and formatting on field values. This allows the interface to return &lt;strong&gt;computed fields&lt;/strong&gt; or &lt;strong&gt;derived fields&lt;/strong&gt; that do not directly exist on the entity model.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Field-Level Security Control&lt;/strong&gt;: It automatically applies data permission checks and data masking policies at the field level. Based on the current user's permissions, it dynamically decides which fields can be returned (field pruning) and how sensitive fields (like phone numbers, ID cards) should be returned (field masking).&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Multi-Protocol Adaptation&lt;/strong&gt;: The same &lt;code&gt;BizModel&lt;/code&gt; can be simultaneously exposed as GraphQL, REST, gRPC, and other protocols. The post-processing pipeline will appropriately wrap the response according to the protocol's characteristics.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Therefore, the return value of a &lt;code&gt;BizModel&lt;/code&gt; does not need to be a DTO specially prepared and "pre-processed" for a specific interface. It only needs to return the most natural and richest domain object.&lt;/strong&gt; All the adaptation, trimming, security, and optimization work for the interface is handled uniformly and declaratively by the engine's post-processing pipeline. The &lt;code&gt;BizModel&lt;/code&gt; becomes a &lt;strong&gt;protocol-neutral domain core&lt;/strong&gt;, and the &lt;code&gt;NopGraphQL&lt;/code&gt; engine acts as the single, powerful &lt;strong&gt;universal adapter&lt;/strong&gt;, completely eliminating tedious DTOs and manual glue code.&lt;/p&gt;

&lt;h3&gt;
  
  
  10.1.3 Separating the CRUD Subspace: From the &lt;code&gt;Repository&lt;/code&gt; Pattern to &lt;code&gt;IEntityDao&lt;/code&gt; and "Complement Space" Programming
&lt;/h3&gt;

&lt;p&gt;A widely held view in the DDD community is that "simple CRUD systems are not suitable for DDD." This reflects the powerlessness of the &lt;code&gt;Repository&lt;/code&gt; pattern when faced with large amounts of templated CRUD code. The traditional approach requires defining a dedicated &lt;code&gt;Repository&lt;/code&gt; interface for each aggregate root, which leads to an inherent contradiction: &lt;strong&gt;CRUD operations themselves form a highly unified mathematical subspace with a complete set of operations, yet they are artificially segregated by different object types.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Nop Platform proposes a solution derived from mathematical thinking: &lt;strong&gt;separate the CRUD subspace&lt;/strong&gt;. Since CRUD operations (Create, Read, Update, Delete) have a unified structure and a complete set of operations, they should be addressed with a unified, generic solution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. A Unified Entity Space and Descriptive Persistence&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In NopORM, we no longer need to define a separate &lt;code&gt;Repository&lt;/code&gt; for each entity. The platform provides a generic &lt;code&gt;IEntityDao&amp;lt;T&amp;gt;&lt;/code&gt; interface, which serves as a complete tool applicable to all entity types. More importantly, NopORM reinterprets persistence operations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The traditional &lt;code&gt;Repository.save&lt;/code&gt; carries an imperative execution semantic&lt;/strong&gt;; calling it means immediately or scheduled execution of a database operation.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;In NopORM, &lt;code&gt;session.save&lt;/code&gt; is essentially descriptive&lt;/strong&gt;: It merely registers the entity object with the current &lt;code&gt;OrmSession&lt;/code&gt;, a unified &lt;strong&gt;entity space&lt;/strong&gt;, for management. The entity is brought under the Session's jurisdiction, its state changes are tracked (via the built-in &lt;code&gt;dirtyProps&lt;/code&gt; delta), but the actual database operations are deferred until the transaction commits, to be handled uniformly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The direct benefit of this descriptive management is that &lt;strong&gt;the composition of operations has mathematical determinism&lt;/strong&gt;. For example, saving an entity and then immediately deleting it will result in these two operations canceling each other out during the final flush, producing no database calls. This reflects the "delta stacking" idea in Reversible Computation: &lt;code&gt;(+Δ) ⊕ (-Δ) = 0&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Subspace Decomposition: Long-Wave Background and Short-Wave Foreground&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We can understand this design using an analogy from wavelet analysis in signal processing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;CRUD operations&lt;/strong&gt; are like the &lt;strong&gt;long-wave background&lt;/strong&gt; of a signal. They change slowly, have a uniform structure, and can be perfectly predicted and automated.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Unique domain logic&lt;/strong&gt; is like the &lt;strong&gt;short-wave foreground&lt;/strong&gt; of a signal. It carries the main information content, changing rapidly and unpredictably.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The traditional &lt;code&gt;Repository&lt;/code&gt; pattern attempts to decompose the entire signal using the same "basis" (i.e., one Repository per aggregate root), which causes the background noise (CRUD template code) to interfere with the foreground information (domain logic). Nop Platform's approach is to perform an &lt;strong&gt;orthogonal subspace decomposition&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;CRUD Subspace&lt;/strong&gt;: Handled automatically by the generic &lt;code&gt;IEntityDao&lt;/code&gt; and the built-in &lt;code&gt;CrudBizModel&lt;/code&gt;. This subspace chooses a set of "standard orthogonal bases" (create, delete, update, find, paginate, etc.), providing a unified and complete solution for all entity types.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Domain Logic Complement Space&lt;/strong&gt;: This is where the truly valuable, non-standard, and unique business logic resides. Developers are refocused here, in the &lt;code&gt;XBiz&lt;/code&gt; model or domain services, to concentrate on writing that unique business logic.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This can be expressed with an elegant Reversible Computation formula:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Complete Domain Behavior = Generator&amp;lt;CRUD Subspace&amp;gt; ⊕ Δ(Domain Complement Space)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;: Developers do not need to have all their business classes inherit from interfaces like &lt;code&gt;CrudRepository&lt;/code&gt;. &lt;code&gt;IEntityDao&lt;/code&gt; is used as a &lt;strong&gt;complete tool&lt;/strong&gt; to solve the uniform CRUD background problem. The developer's core job is to work in the &lt;code&gt;XBiz&lt;/code&gt; "delta (Δ)" model, within the &lt;strong&gt;domain complement space&lt;/strong&gt;, focusing on implementing the unique logic that truly defines the core business value, thereby being completely liberated from boilerplate CRUD code.&lt;/p&gt;

&lt;h3&gt;
  
  
  10.2 From "Deployment Decision" to "Compositional Freedom"
&lt;/h3&gt;

&lt;p&gt;DDD emphasizes that a microservice is a deployment decision, while a Bounded Context is a logical boundary. The Nop Platform brings this philosophy to its ultimate practice through its modularization mechanism.&lt;/p&gt;

&lt;h4&gt;
  
  
  10.2.1 Module as Bounded Context: A Physical Carrier with an Independent &lt;code&gt;DSL Atlas&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;In Nop, a &lt;strong&gt;module&lt;/strong&gt; is the physical carrier of a Bounded Context. Each module has its own independent ORM model, permission model, business service model (BizModel), and a whole set of other models, forming its own "&lt;strong&gt;DSL Atlas&lt;/strong&gt;." They are self-contained and have their own "intrinsic coordinate system."&lt;/p&gt;

&lt;h4&gt;
  
  
  10.2.2 Composition as Architecture: Free Switching Between &lt;code&gt;Modular Monolith&lt;/code&gt; and &lt;code&gt;Microservices&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;Nop's IoC container has powerful capabilities for automatic module discovery and assembly, which brings unprecedented architectural flexibility:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  When you package your application and &lt;strong&gt;include multiple module dependencies&lt;/strong&gt;, they run in the same process, automatically forming a high-performance "&lt;strong&gt;modular monolith&lt;/strong&gt;."&lt;/li&gt;
&lt;li&gt;  When you &lt;strong&gt;package only one module&lt;/strong&gt;, it independently becomes a "&lt;strong&gt;microservice&lt;/strong&gt;" application.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  10.2.3 Location-Transparent Communication: Automatic Adaptation Between &lt;code&gt;Local Calls&lt;/code&gt; and &lt;code&gt;Remote RPC&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;Interaction between modules always occurs through defined &lt;strong&gt;API interfaces (ports)&lt;/strong&gt;. The underlying Nop framework automatically handles the communication details: if the called module is in the same process, it's an efficient &lt;strong&gt;local method call&lt;/strong&gt;; if the called module is remote, it automatically switches to an &lt;strong&gt;RPC call&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This means that architectural evolution—from monolith to microservices—is no longer a painful, major refactoring effort, but merely a matter of changing the application's packaging composition.&lt;/p&gt;

&lt;h3&gt;
  
  
  10.3 From "Data-Centric" to "Information Flow Inversion"
&lt;/h3&gt;

&lt;p&gt;The design philosophy of the Nop Platform also triggers a fundamental shift in how business logic is implemented.&lt;/p&gt;

&lt;h3&gt;
  
  
  10.3.1 Refocusing the Aggregate Root: From "Write Boundary" to "Information Access Center"
&lt;/h3&gt;

&lt;p&gt;In traditional DDD, the primary responsibility of an Aggregate Root is established as the &lt;strong&gt;write boundary&lt;/strong&gt; for "consistency" and "transactions." This design has its merits in a monolithic architecture, often manifesting as a black-box command method (e.g., &lt;code&gt;order.confirm()&lt;/code&gt;) that is internally responsible for synchronously and atomically transitioning the aggregate from one consistent state to another.&lt;/p&gt;

&lt;p&gt;However, this pattern reveals its limitations in microservices architectures and complex business scenarios:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Stateless, service-oriented architectures reduce the need for strong in-memory consistency&lt;/strong&gt;: Domain objects are temporarily reconstructed from persisted data that is already consistent. A brief inconsistency within a process is not observable externally. The key guarantee lies at the &lt;strong&gt;commit threshold&lt;/strong&gt;—ensuring that the final persisted &lt;strong&gt;delta change (Δ)&lt;/strong&gt; satisfies database constraints and business rules.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Black-box methods are not conducive to orchestrating and understanding complex logic&lt;/strong&gt;: Encapsulating a complex business operation involving multiple entities and invariants within a single method on the aggregate root turns that method into a large, difficult-to-test and maintain "God function." More importantly, &lt;strong&gt;the very concept of using a single function to guarantee all invariants is inappropriate&lt;/strong&gt;. A business consistency constraint (invariant) typically involves only a few objects and properties within the aggregate, which could have been described and validated independently.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The Nop Platform, through its &lt;code&gt;NopTaskFlow&lt;/code&gt; orchestration engine, provides a more expressive "gray-box" modeling approach. The function that modifies a business entity does not have to be a black-box method on the aggregate root. A service function (or a large business action) can be decomposed into multiple clearly defined &lt;strong&gt;Steps&lt;/strong&gt;, each responsible for handling a local state transition or validating a specific invariant. This decomposition makes the process of guaranteeing complex consistency transparent, traceable, and easily composable.&lt;/p&gt;

&lt;p&gt;To understand this shift, we need to re-examine the essence of a &lt;strong&gt;domain model&lt;/strong&gt;. A domain model is expressed through a domain language, and the &lt;strong&gt;aggregate root is the most direct and cheapest carrier for implementing that domain language&lt;/strong&gt;. The so-called ubiquitous language first provides a vocabulary (class names, method names, property names), and the aggregate root then defines the feasible organization of these words. &lt;strong&gt;The aggregate root provides a stable "base space" (data structure and associations), while domain services represent the "dynamics" (business behavior) that occur in this base space.&lt;/strong&gt; This clear separation of roles can be seen as an improvement on traditional DDD after absorbing ideas from functional programming.&lt;/p&gt;

&lt;p&gt;Based on this understanding, the Nop Platform fundamentally reinterprets and refocuses the responsibilities of the aggregate root:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The core value of an aggregate root lies in defining a stable "domain structure space" (base space) and ensuring "optimal information accessibility."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This structure space is composed of the following elements, which remain highly stable throughout the product's lifecycle, across deployments for different customers, and through various customizations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Core data structures&lt;/strong&gt;: The entity and its key properties.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Rich intrinsic associations&lt;/strong&gt;: Stable relationships between entities (one-to-one, one-to-many, etc.).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Fixed computed properties&lt;/strong&gt;: A small number of derived calculations that are independent of specific business logic and are purely determined by the entity's own properties (e.g., &lt;code&gt;totalPrice = unitPrice × quantity&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The primary responsibility of the aggregate root shifts from maintaining a "write boundary" and providing "black-box consistency methods" back to building a logically unified, richly associated, and freely navigable object graph. This object graph becomes the &lt;strong&gt;information access center&lt;/strong&gt; for the entire Bounded Context, providing the most natural and complete source of information for various &lt;strong&gt;read-side&lt;/strong&gt; needs (like condition checks in the &lt;code&gt;NopRule&lt;/code&gt; engine, data extraction for reporting engines, data sources for complex queries) and for the steps of &lt;strong&gt;write-side&lt;/strong&gt; processes.&lt;/p&gt;

&lt;p&gt;Under this model, the consistency guarantee for write operations is moved up, decomposed, and "&lt;strong&gt;platformized&lt;/strong&gt;":&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Transaction Boundaries&lt;/strong&gt;: Defined by service methods (i.e., Actions in &lt;code&gt;@BizModel&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Consistency Constraints&lt;/strong&gt;: Guaranteed step-by-step by process steps and ultimately validated by database constraints, forming a multi-layered safety net.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This refocusing brings a fundamental advantage: &lt;strong&gt;the aggregate root no longer sacrifices its structural clarity and evolutionary flexibility to accommodate an outdated consistency encapsulation model&lt;/strong&gt;. It returns to its essence as a rich "information source," while complex state transition logic is elegantly implemented through orchestratable process steps. This clear &lt;strong&gt;separation of structure (base space) and behavior (dynamics)&lt;/strong&gt; is the architectural cornerstone that supports the deep customization and long-term evolution of productized software.&lt;/p&gt;

&lt;h3&gt;
  
  
  10.3.2 Decoupling Business Logic: From "Pushing Data (DTOs)" to "Pulling Information (Expression Language - EL)"
&lt;/h3&gt;

&lt;p&gt;In the traditional approach, each business function (like a rule or a report) requires its own carefully prepared parameters (DTOs). When the logic is slightly adjusted, it often requires modifying multiple function signatures along the call chain. The essence of this pattern is: &lt;strong&gt;we are always writing code for a specific requirement, so we need to prepare and push dedicated data for each requirement.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Nop Platform, by establishing the aggregate root as a stable "information center," achieves an &lt;strong&gt;inversion of information flow&lt;/strong&gt;. The key lies in a philosophical shift:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In Nop's design, the domain model expressed by the aggregate root is not tailored for specific business requirements but exists as an objective, directly usable, universal information source.&lt;/strong&gt; It provides a unified, semantically rich information space where various business logics can freely explore and retrieve the information they need.&lt;/p&gt;

&lt;p&gt;Based on this design:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;From "Push" to "Pull"&lt;/strong&gt;: When the rule engine (&lt;code&gt;NopRule&lt;/code&gt;) or report engine executes, what is passed in is the entire aggregate root object or object graph. The engine internally uses expressions (like &lt;code&gt;order.customer.address.city&lt;/code&gt;) to &lt;strong&gt;actively pull&lt;/strong&gt; the required information from this rich, universal information source.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Localized Changes&lt;/strong&gt;: When the logic of a report or rule needs to be adjusted (e.g., changing from basing it on the customer's address to the shipping address), we &lt;strong&gt;do not need to modify any caller's code&lt;/strong&gt;. Because what is passed in is always that complete, objective information source, we only need to modify the local data-fetching expression within the report/rule model itself. This "pull" model greatly enhances the system's decoupling and evolutionary capabilities.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;This inversion of information flow completely decouples business logic from the method of data supply.&lt;/strong&gt; Business components no longer depend on the outside world to prepare data in a specific structure; instead, they declaratively extract what they need from a unified information space. This significantly reduces the coupling between components, making the system much more flexible in responding to business changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Chapter 11: Case Study — The Reversible Computation Transformation of a Large Bank's Core System&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The value of theory lies in guiding practice. To prove that Reversible Computation is not an "ivory tower" theory tied exclusively to the Nop Platform but a universal, implementable technical philosophy, we examine the transformation of a large bank's core system. This project, &lt;strong&gt;without fully adopting the Nop Platform&lt;/strong&gt;, systematically introduced the core ideas of Reversible Computation into a standard technology stack of &lt;strong&gt;SpringBoot + MyBatis + SpringMVC + GraphQL Java&lt;/strong&gt;, and achieved remarkable results.&lt;/p&gt;

&lt;h3&gt;
  
  
  11.1 Lightweight Implementation of Core Principles: &lt;code&gt;Loader as Generator&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;The Reversible Computation formula, &lt;code&gt;App = Generator&amp;lt;DSL&amp;gt; ⊕ Δ&lt;/code&gt;, hinges on treating the superposition of "generation" and "delta" as a unified construction process. In the bank project, this idea was realized through the lightweight principle of &lt;strong&gt;"Loader as Generator."&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Load-Time Implementation of Delta Merging&lt;/strong&gt;: The project team developed a &lt;strong&gt;&lt;code&gt;Delta Aware&lt;/code&gt; model loader&lt;/strong&gt; to replace standard JSON/XML parsers. When this loader reads a base model file (e.g., &lt;code&gt;cms.beans.xml&lt;/code&gt;, &lt;code&gt;User.mapper.xml&lt;/code&gt;), it automatically finds and merges the corresponding file in the delta directory (e.g., &lt;code&gt;/_delta/default/beans/cms.beans.xml&lt;/code&gt;). This means the merge logic of &lt;code&gt;Generator&amp;lt;DSL&amp;gt; ⊕ Δ&lt;/code&gt; is encapsulated within the loader, making it &lt;strong&gt;completely transparent to the runtime engines&lt;/strong&gt;. What Spring's IoC container and MyBatis see is the final, merged model.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Separation of Compile-Time and Run-Time&lt;/strong&gt;: Drawing inspiration from Nop Platform's &lt;code&gt;nop-cli&lt;/code&gt; tool, they moved some complex model transformations (like Excel to JSON conversion, &lt;code&gt;x:gen-extends&lt;/code&gt; expansion, and &lt;code&gt;xdef&lt;/code&gt; meta-model validation) to the &lt;strong&gt;Maven packaging phase&lt;/strong&gt;. The runtime engine did not need to be aware of these concepts, keeping the technology stack pure and high-performing. This perfectly illustrates the profound value of &lt;strong&gt;separating the "construction phase" from the "run-time phase"&lt;/strong&gt; in Reversible Computation theory.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  11.2 Handling Major Model Changes: The Power of Delta Customization
&lt;/h3&gt;

&lt;p&gt;During the project implementation, the system underwent major model change requirements, which fully validated the resilience of the Reversible Computation architecture:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;External System Integration and Table Structure Changes&lt;/strong&gt;: Key configuration tables and account tables were required to reuse content from external systems, involving destructive changes like table naming conventions and field reductions.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Zero-Code-Change Data Layer Adaptation&lt;/strong&gt;: Through &lt;strong&gt;Delta customization&lt;/strong&gt;, without modifying the core system's code, the database mapping relationships in MyBatis's &lt;code&gt;mapper.xml&lt;/code&gt; were changed solely through delta data model definitions. After merging the Delta models, the system automatically generated a data access layer that conformed to the new specifications.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Mixed Data Source Support&lt;/strong&gt;: When fetching business objects (BOs), the system could transparently combine multiple data sources:

&lt;ul&gt;
&lt;li&gt;  Some information was fetched from the local database.&lt;/li&gt;
&lt;li&gt;  Other information was fetched from remote APIs.&lt;/li&gt;
&lt;li&gt;  All data was managed uniformly in a &lt;code&gt;DataCache&lt;/code&gt;, forming a complete domain object view.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  11.3 Elastic Extension of Process Orchestration
&lt;/h3&gt;

&lt;p&gt;Based on the Reversible Computation process orchestration mechanism, the system achieved flexible extension of business logic:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Automatically Generated Calling Skeletons&lt;/strong&gt;: The system automatically generated the basic calling structure for process orchestration based on the API model.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Delta Customization of Processes&lt;/strong&gt;: Non-invasive modifications were made to the process orchestration definitions through delta files.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Pre and Post Adapters&lt;/strong&gt;: Pre-adapter steps were added for request data transformation (like dictionary mapping), and post-transformation steps handled response data.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Distributed Transaction Support&lt;/strong&gt;: At the end of the process, changes in the &lt;code&gt;DataCache&lt;/code&gt; were automatically synchronized to remote systems via API calls.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Key Outcome&lt;/strong&gt;: Despite major changes to the business model, the &lt;strong&gt;core business processing code remained almost entirely unchanged&lt;/strong&gt; (some processing steps were added, and parameters of existing steps were adjusted), fully demonstrating the stability of the delta-stacking architecture in the face of business changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  11.4 Purifying the Domain Model: Modifying MyBatis to Enable "Aggregate Root Programming"
&lt;/h3&gt;

&lt;p&gt;The core of DDD tactical design is object-oriented programming centered on the Aggregate Root. However, in traditional MyBatis practice, developers often get bogged down in "anemic models" and a proliferation of DAO calls. This project made a key modification to MyBatis to support a domain programming model similar to JPA.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Introducing a &lt;code&gt;DataCache&lt;/code&gt; Context&lt;/strong&gt;: They created a &lt;strong&gt;&lt;code&gt;DataCache&lt;/code&gt;&lt;/strong&gt; component, similar to the &lt;code&gt;OrmSession&lt;/code&gt; in NopORM. Within the lifecycle of a business operation (typically corresponding to a GraphQL request or a Service method), it acts as a cache and change tracker for entity objects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;State Management and Dirty Checking&lt;/strong&gt;: State properties (like &lt;code&gt;_state&lt;/code&gt;) and a dirty properties set (&lt;code&gt;_dirtyProps&lt;/code&gt;) were introduced to the entity objects. When an entity property is modified, it is automatically marked as "dirty."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A Revolution in Programming Model&lt;/strong&gt;: After this transformation, the way back-end business logic was written changed fundamentally:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="c1"&gt;// 1. Get the aggregate root from the Manager (Application Service) entry point&lt;/span&gt;
&lt;span class="nc"&gt;IAccountBo&lt;/span&gt; &lt;span class="n"&gt;accountBo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;accountManager&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getAccountBo&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;accountId&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="nc"&gt;Account&lt;/span&gt; &lt;span class="n"&gt;account&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;accountBo&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getAccount&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// 2. Pure object programming: Navigate within the aggregate root to execute business logic&lt;/span&gt;
&lt;span class="nc"&gt;ICustomerBo&lt;/span&gt; &lt;span class="n"&gt;customerBo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;accountBo&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getCustomerBo&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;span class="nc"&gt;IAccountBo&lt;/span&gt; &lt;span class="n"&gt;foreignCurrencyBo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;accountBo&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getForeignCurrencyBo&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;currencyCode&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// ... Complex business logic, all accomplished through object method calls ...&lt;/span&gt;

&lt;span class="c1"&gt;// 3. Declare the intent to save&lt;/span&gt;
&lt;span class="n"&gt;dataCache&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;save&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;account&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// 4. At the transaction boundary (e.g., at the end of @Transactional), DataCache automatically flushes.&lt;/span&gt;
&lt;span class="c1"&gt;// At this point, based on dirty checking, it generates and executes SQL only for the changed fields and handles associated objects.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The Core Value of This Transformation&lt;/strong&gt;: It established a strict programming discipline—&lt;strong&gt;absolutely avoid direct use of DAOs in business logic code&lt;/strong&gt;. When writing business logic, developers only need to, and &lt;strong&gt;can only&lt;/strong&gt;, program against the pure domain concept of the aggregate root. All data access is done through object navigation.&lt;/p&gt;

&lt;p&gt;This "Aggregate Root Programming" model brought significant advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Clear Code Intent&lt;/strong&gt;: Business logic revolves entirely around domain concepts, no longer cluttered with database access details.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Decoupling from Persistence Implementation&lt;/strong&gt;: Business code does not depend on specific DAO implementations, facilitating testing and architectural evolution.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Transparent Performance Optimization&lt;/strong&gt;: The &lt;code&gt;DataCache&lt;/code&gt;'s dirty checking mechanism automatically avoids unnecessary SQL execution while ensuring data consistency.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Clear Architectural Constraints&lt;/strong&gt;: DAOs are used only at the application service entry point to fetch aggregate roots; within the business logic layer, work is done entirely on the object model.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  11.5 Unification and Automation of the Service Layer: Enhancing GraphQL Java
&lt;/h3&gt;

&lt;p&gt;At the service layer, the project chose GraphQL as the unified API gateway and enhanced the standard GraphQL Java library.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;RESTful Mapping&lt;/strong&gt;: To facilitate calls from traditional front-ends, a REST-style mapping layer was provided for GraphQL Java, allowing complex GraphQL queries to be invoked via simple HTTP POST requests.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Automation of Standard CRUD&lt;/strong&gt;: Based on the Reversible Computation idea of "generation," they developed a set of &lt;strong&gt;code generators&lt;/strong&gt; that could automatically generate GraphQL Schema and corresponding CRUD Resolver implementations from the data model (metadata). This drastically reduced repetitive coding for simple entities, allowing the team to focus on complex business rules.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  11.6 Delta-based Configuration for the Front-end: Modular Governance of AMIS JSON
&lt;/h3&gt;

&lt;p&gt;The front-end used the low-code platform AMIS, but its JSON configurations tended to become bloated as the business grew. The project team applied the delta-based thinking of Reversible Computation to manage front-end configurations.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Delta JSON Loader&lt;/strong&gt;: A generic &lt;strong&gt;Delta JSON loader&lt;/strong&gt; was developed, capable of recognizing extension markers like &lt;code&gt;x:extends&lt;/code&gt; in the JSON configuration.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Decomposition and Merging of Configurations&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Vertical Decomposition&lt;/strong&gt;: A large page JSON was &lt;strong&gt;split into multiple sub-files&lt;/strong&gt; by UI components (like tables, forms, dialogs).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Horizontal Generation and Customization&lt;/strong&gt;: First, basic view skeletons like &lt;code&gt;_form_view.json&lt;/code&gt; were &lt;strong&gt;automatically generated&lt;/strong&gt; from the back-end model (e.g., &lt;code&gt;XMeta&lt;/code&gt;). Then, developers could create a hand-written &lt;code&gt;form_view.json&lt;/code&gt; file to &lt;strong&gt;correct, override, and extend&lt;/strong&gt; the auto-generated content using the &lt;code&gt;x:extends&lt;/code&gt; mechanism.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  11.7 Lessons from the Case Study: Thought Over Form
&lt;/h3&gt;

&lt;p&gt;The successful transformation of this bank's core system provides us with crucial insights:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Reversible Computation is an architectural philosophy, not a specific product&lt;/strong&gt;: Its core principles—&lt;strong&gt;delta stacking, generative programming, and the separation of construction and run-time&lt;/strong&gt;—can permeate different technology stacks. The Nop Platform is a complete and self-consistent implementation of this philosophy, but you can also extract its essence to empower your existing systems.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;A Path of Gradual Evolution&lt;/strong&gt;: Enterprises do not need to undergo "shock therapy" by replacing their entire technology stack. They can start by focusing on individual dimensions, such as &lt;strong&gt;delta-based management of configuration files&lt;/strong&gt; or &lt;strong&gt;purification of the domain layer&lt;/strong&gt;, to gradually enjoy the improvements in maintainability and evolvability that the theory brings.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;It Solves Fundamental Pain Points&lt;/strong&gt;: Whether it's the customization of back-end configurations, the anemia of domain models, or the bloating of front-end configurations, these are all fundamental challenges in software engineering. Reversible Computation provides a unified mental model and a tool paradigm to systematically address these challenges.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This case study eloquently demonstrates that the laws of software construction revealed by Reversible Computation theory are being, and will inevitably be, validated and adopted by a wider range of engineering practices, regardless of their specific form of implementation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion: The End of DDD Is to "Forget DDD"
&lt;/h3&gt;

&lt;p&gt;What the Nop Platform has initiated is a quiet revolution. It doesn't give you a more complex DDD toolbox; instead, it provides a simpler, more powerful "physics" of software.&lt;/p&gt;

&lt;p&gt;In this physics, &lt;strong&gt;DDD is not a discipline to be learned, but a destination that is naturally reached&lt;/strong&gt;. When you use a set of construction tools derived from first principles, you no longer need to constantly constrain yourself with the rules and patterns of design. Your energy will shift completely from the technical problem of "&lt;strong&gt;how to build correctly&lt;/strong&gt;" to the fundamental question of "&lt;strong&gt;what the business being built actually is&lt;/strong&gt;."&lt;/p&gt;

&lt;p&gt;Developers need only focus on using DSLs to sketch the blueprint of the business, and a robust, evolvable, and clearly bounded system will emerge as naturally as the stars move in their orbits. This, perhaps, is the most ideal future for DDD in the realm of engineering.&lt;/p&gt;

</description>
      <category>ddd</category>
      <category>softwareengineering</category>
      <category>programming</category>
      <category>springboot</category>
    </item>
    <item>
      <title>The Essence of DDD: A Complete Guide from Philosophy to Mathematics to Engineering Practice—The Theory Part</title>
      <dc:creator>canonical</dc:creator>
      <pubDate>Tue, 03 Feb 2026 13:07:27 +0000</pubDate>
      <link>https://dev.to/canonical/the-essence-of-ddd-a-complete-guide-from-philosophy-to-mathematics-to-engineering-practice-the-4jfa</link>
      <guid>https://dev.to/canonical/the-essence-of-ddd-a-complete-guide-from-philosophy-to-mathematics-to-engineering-practice-the-4jfa</guid>
      <description>&lt;p&gt;The prevalence of microservices has sparked a renaissance for Domain-Driven Design (DDD). However, a profound debate persists in the industry about whether, and how, its best practices can or should be standardized into a unified technical framework. In the process of implementing DDD, many design meetings are filled with pointless arguments over technical details, with no one able to convince the others.&lt;/p&gt;

&lt;p&gt;So, what exactly are the advantages of DDD? Is it about better adapting to the object-oriented ecosystem? Or is it about aligning the team's mental model and clearly mapping managerial resistance into the technical world, thereby bridging the chasm between technology and business? Or perhaps, does it possess a certain technical inevitability that can be proven at a mathematical level? This article, combining the theory of (Generalized) Reversible Computation and the technical implementation of the open-source low-code platform, Nop Platform, will dissect the technical core of DDD.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The (Generalized) Reversible Computation theory mentioned in this article is not the same as the concept of Reversible Computing in physics. It does not refer to the reverse execution of computational instructions but rather to an expanded understanding of the concept of "reversibility" at the level of software construction. See &lt;a href="https://dev.to/canonical/reversible-computation-a-next-generation-theory-for-software-construction-27fk"&gt;Reversible Computation: The Next-Generation Software Construction Theory&lt;/a&gt; and &lt;a href="https://dev.to/canonical/generalized-reversible-computation-grc-the-naming-and-elucidation-of-a-software-construction-2cp"&gt;Generalized Reversible Computation: Naming and Interpretation of a Software Construction Paradigm&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The Nop Platform is an open-source reference implementation of the (Generalized) Reversible Computation theory. Nop is a recursive acronym for "Nop is not Programming."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  I. The Standard Understanding of DDD: Strategic and Tactical Design
&lt;/h2&gt;

&lt;p&gt;If we were to ask a large AI model: Do you understand DDD? Do you know why it works?&lt;/p&gt;

&lt;p&gt;GPT-5 would likely provide the following standard answer:&lt;/p&gt;




&lt;p&gt;Yes, I do. Domain-Driven Design (DDD) is both a mindset and a set of practices used in complex business domains to closely align software design with domain knowledge, enabling the faster and more stable delivery of evolvable systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  What It Is (A Two-Layered Perspective)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Strategic Design: Mapping the Business Landscape, Defining Boundaries, and Team Collaboration
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Domain/Subdomain:&lt;/strong&gt; Decompose business capabilities (Core, Supporting, Generic).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Bounded Context:&lt;/strong&gt; Use a consistent model and terminology within a clear boundary. Contexts communicate through integration patterns (e.g., Anti-Corruption Layer).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Ubiquitous Language:&lt;/strong&gt; Business and technical teams share a common language to avoid "translation loss."&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Tactical Design: How to Model and Implement within a Boundary
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Entity/Value Object, Aggregate &amp;amp; Aggregate Root:&lt;/strong&gt; Define invariants and transaction consistency boundaries.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Domain Service, Domain Event, Repository, Factory, Specification, etc.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Ports &amp;amp; Adapters (Hexagonal Architecture):&lt;/strong&gt; Isolate the domain from infrastructure.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why It Works (The Underlying Mechanisms)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Reduces Cognitive and Communication Overhead:&lt;/strong&gt; The Ubiquitous Language and collaborative modeling make implicit rules explicit, reducing the "paraphrasing layer" between requirements and code.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Manages Complexity:&lt;/strong&gt; Bounded Contexts break down large problems into smaller, "high cohesion, low coupling" problems. Aggregates localize strong consistency constraints.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Ensures Business Correctness:&lt;/strong&gt; Invariants are embedded in the model (rather than scattered in controllers/SQL/validators), making "invalid states unrepresentable."&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Promotes Evolution:&lt;/strong&gt; Clear boundaries and inward-facing dependencies facilitate refactoring and replacement. Domain events and eventual consistency enable looser coupling for cross-boundary collaboration.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Socio-Technical Alignment:&lt;/strong&gt; Leverages Conway's Law by aligning team boundaries with Bounded Contexts, reducing cross-team friction.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Focuses Resources:&lt;/strong&gt; Classifying subdomains into Core, Supporting, and Generic helps concentrate modeling and engineering efforts on the "differentiating value" of the core domain.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  When It's a Good Fit
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  For long-term, evolvable projects with complex business rules and changing concepts (e.g., e-commerce orders, financial risk control, supply chain planning).&lt;/li&gt;
&lt;li&gt;  When multiple teams are collaborating, system boundaries are unclear, and integration is complex.&lt;/li&gt;
&lt;li&gt;  When strict control over invariants and consistency is required.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  When It's Not a Good Fit
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  For small, short-lived projects that are primarily CRUD-based with simple rules; a simpler architecture is more efficient in these cases.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to Get Started (Practical Advice)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Discovery &amp;amp; Alignment&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  Use Domain Interviews, Event Storming, and Domain Storytelling to map out processes and events.&lt;/li&gt;
&lt;li&gt;  Partition subdomains and assess their value (distinguish Core/Supporting/Generic), aligning them with team boundaries.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;  &lt;strong&gt;Drawing Boundaries &amp;amp; Integration&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  Define Bounded Contexts and Context Maps (Shared Kernel, Published Language, Anti-Corruption Layer, etc.).&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;  &lt;strong&gt;Modeling &amp;amp; Implementation&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  Use invariants to define Aggregates; favor small aggregates. Use events or process orchestration (Saga/Process Manager) for eventual consistency across aggregates.&lt;/li&gt;
&lt;li&gt;  Prioritize Value Objects (immutable, easy to test); use Entities only when an identity is truly needed.&lt;/li&gt;
&lt;li&gt;  Application Services orchestrate use cases, Domain Services contain cross-aggregate domain logic, and Repositories are only responsible for persisting Aggregate Roots.&lt;/li&gt;
&lt;li&gt;  Use Ports &amp;amp; Adapters to isolate external systems and infrastructure.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;  &lt;strong&gt;Iteration&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  Evolve the model as understanding deepens; refactor frequently. Measure change costs and defect rates to validate if boundaries are appropriate.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  A Simplified Example (E-commerce)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Bounded Contexts:&lt;/strong&gt; Catalog, Pricing, Ordering, Payment, Shipping.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Ordering Context Aggregate:&lt;/strong&gt; &lt;code&gt;Order&lt;/code&gt; (Invariants: total amount = sum of line items; state transitions are restricted; an order cannot be paid for twice).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Cross-Context:&lt;/strong&gt; An &lt;code&gt;OrderPlaced&lt;/code&gt; event notifies the Inventory and Shipping contexts. After successful payment, a &lt;code&gt;PaymentConfirmed&lt;/code&gt; event is published, and the order status is updated asynchronously. An Anti-Corruption Layer (ACL) adapts different models between boundaries to avoid shared database coupling.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Common Pitfalls
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Using only "tactical patterns" (Entity/Repository) without strategic design, resulting in a Big Ball of Mud.&lt;/li&gt;
&lt;li&gt;  Treating DDD as a "microservices silver bullet": Microservices are a deployment decision, while DDD is a modeling and collaboration method. DDD can be implemented first within a modular monolith.&lt;/li&gt;
&lt;li&gt;  Over-enforcing consistency: Forcing invariants that span multiple contexts into a single transaction, leading to high coupling and performance/availability issues.&lt;/li&gt;
&lt;li&gt;  Failing to implement the language: Using business terms in meetings but switching to technical jargon in the code, breaking the Ubiquitous Language.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  One-Sentence Summary
&lt;/h2&gt;

&lt;p&gt;DDD is effective because it uses clear business boundaries, a shared language, and explicit invariants to directly reflect the knowledge structure of a complex business in the code and team collaboration, thereby reducing complexity, increasing correctness, and supporting continuous evolution.&lt;/p&gt;

&lt;p&gt;------------End of GPT-5's creation---------&lt;/p&gt;

&lt;h2&gt;
  
  
  II. The First Principle of DDD: Discovering and Expressing the Inherent Laws of the Domain
&lt;/h2&gt;

&lt;p&gt;As a mature software engineering methodology, DDD is inevitably a comprehensive socio-technical system involving &lt;strong&gt;management, technology, and external environmental constraints&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The reason DDD is often difficult to "perfectly implement" is precisely that it attempts to solve real-world problems entangled with various non-technical factors. For instance, when we collaborate with an external team with varying technical skills, high communication costs, and even conflicting interests, &lt;strong&gt;these human and organizational issues of interest and coordination (so-called "office politics") directly influence the system's interface design, module division, and even technology choices&lt;/strong&gt;. This fully demonstrates that many of DDD's design decisions are often rooted in &lt;strong&gt;human factors, communication games, and inter-organizational interest coordination&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;However, is this the whole truth of DDD? If we temporarily strip away its socio-technical shell and focus purely on the technical domain, do the patterns advocated by DDD still exhibit some form of technical superiority? In other words, why is a pattern like "Aggregate Root" technically better at controlling state transitions than an arbitrary combination of objects? Why is the division of "Bounded Contexts" better at reducing coupling than a monolithic model?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If DDD can indeed solve technical problems widely and effectively, there must be an underlying essential reason at a mathematical level—a manifestation of some objective law that is independent of people and environment.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The starting point of this objective law can be boiled down to one core insight: &lt;strong&gt;business logic is, in essence, technology-agnostic&lt;/strong&gt;. It is a pure information description of concepts, rules, and processes within a domain. Therefore, the most stable and time-resistant software structure is one that can &lt;strong&gt;use, and only use&lt;/strong&gt;, the concepts from the business domain to express business logic. The "and only use" here is key; it means maximizing the avoidance of "technical noise"—those accidental factors originating from specific implementation technologies like databases, message queues, and web frameworks.&lt;/p&gt;

&lt;p&gt;Once we can achieve this, we obtain a description built entirely on the &lt;strong&gt;domain's inherent structure&lt;/strong&gt;. By shedding the accidental nature of technical implementations, this description gains long-term stability. More importantly, because it directly reflects the laws of the domain itself, it appears &lt;strong&gt;conceptually purer&lt;/strong&gt; and more elegant.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The domain possesses an inherent regularity, which is the core reason why a domain model can endure through business development cycles and provide lasting value.&lt;/strong&gt; Imagine if a domain had no inherent laws. In that case, writing code directly for specific business scenarios would suffice. Why bother extracting a stable domain model that can adapt to various business developments? Why is this "intermediate layer" necessary? This is like in software product line engineering, where the reason we extract core assets and variability mechanisms is precisely that we believe there are stable, abstractable, and reusable structures behind a series of similar products. &lt;strong&gt;The value of a domain model lies precisely in its ability to capture the stable, essential, and inherently regular parts of the domain problem space.&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We can often observe that a business log table designed by a business expert with no knowledge of distributed systems to ensure process correctness is strikingly similar in structure to a Saga log or event sourcing table designed by a distributed systems expert to ensure data consistency.&lt;br&gt;
This is because they are facing the same fundamentally constrained problem: "how to ensure overall correctness in a multi-step, unreliable process." It is the inherent structure of the problem itself that often leads its solutions to converge on similar structures.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;From this perspective, DDD's tactical patterns (Aggregate, Entity, Value Object, Domain Service, etc.) are no longer just "best practices" but a series of tools and constraints we've invented to build a &lt;strong&gt;technology-neutral, pure expression system for business logic&lt;/strong&gt;. DDD is technically effective because it guides us to discover and construct a &lt;strong&gt;structurally more refined "computational model"&lt;/strong&gt; that is closer to the essence of the domain problem, rather than scattering business logic haphazardly and accidentally across various corners tightly coupled with technical implementation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is also the most fundamental reason why the "Ubiquitous Language" is so important.&lt;/strong&gt; It is not just to make the team's communication "smoother" or to improve daily interactions, but to &lt;strong&gt;ensure that the business logic in the code accurately maps the domain's inherent laws using the problem's own language, avoiding contamination by implementation details&lt;/strong&gt;. When we insist on using domain concepts instead of technical concepts to express business logic, we are actually ensuring that the code maps the stable structure of the domain, not the accidental features of a specific technology stack. Only a domain model built this way can remain stable and continue to provide value through business evolution and technological change.&lt;/p&gt;

&lt;h2&gt;
  
  
  III. The Art of Decomposition: Vertical Slicing and Horizontal Layering
&lt;/h2&gt;

&lt;p&gt;Having understood that the goal of DDD is to capture the inherent laws of a domain, a subsequent question arises: How do we systematically construct this "computational model" that reflects the domain's laws? A powerful mental framework is to &lt;strong&gt;view software design essentially as a process of "divide and conquer" over a complex problem space, a process that can be reduced to two fundamental dimensions of decomposition: vertical and horizontal.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Vertical Decomposition: The Natural Emergence of Object-Orientation
&lt;/h3&gt;

&lt;p&gt;If we want to decompose a complex design space, the most direct goal is to &lt;strong&gt;minimize the coupling between the resulting parts&lt;/strong&gt;. The ideal situation is for the decomposed parts to be able to evolve completely independently and in parallel.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;First-Level Decomposition and Object Naming&lt;/strong&gt;: To achieve this isolation, the primary task is to find the dimension that "slices the system most cleanly" (the primary decomposition dimension). The choice of this dimension directly corresponds to which &lt;strong&gt;core components&lt;/strong&gt; we conceptualize the system into. When we assign names to these components—such as "Order," "Customer," "Inventory"—we are, in fact, performing &lt;strong&gt;object decomposition&lt;/strong&gt;. This is the most fundamental means of abstraction because it directly corresponds to our cognitive division of core entities in the problem domain. A proper object decomposition has the highest internal cohesion and the weakest inter-component associations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Second-Level Decomposition and Internal Structure&lt;/strong&gt;: After identifying the core objects, we naturally need to describe the internal composition of each object. At this point, the second-level decomposed parts cannot be completely unrelated (otherwise, they should have been independent first-level objects). These "somewhat related yet somewhat different" structures are precisely what define an object's internal characteristics and behaviors. In the programming world, they are naturally named &lt;strong&gt;properties (data)&lt;/strong&gt; and &lt;strong&gt;methods (functions)&lt;/strong&gt;. This is not a coincidence but a consequence of data and functions being the most basic building blocks of the programming universe.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Therefore, &lt;strong&gt;vertical decomposition is a process that naturally leads to object-oriented abstraction&lt;/strong&gt;. By identifying the core concepts in the domain and their internal constitution, it encapsulates the system's complexity into a series of modular units with clear boundaries and well-defined responsibilities.&lt;/p&gt;

&lt;h4&gt;
  
  
  Engineering Implementation of Vertical Decomposition: From Conceptual Splitting to Addressable Domain Coordinates
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;"The nameless is the beginning of heaven and earth. The named is the mother of all things."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The essence of vertical decomposition is to introduce structural asymmetry into an initially homogeneous and egalitarian space of functions and data by identifying "intrinsic relatedness," thereby allowing higher-level concepts (objects) to "naturally emerge."&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The earliest programming languages consisted of the 0s and 1s of binary machine language, represented by punched paper tapes. Assembly language "gave aliases" to instructions and addresses, opening the door to a symbolic world. High-level languages like C/Pascal went a step further, supporting &lt;strong&gt;custom type names&lt;/strong&gt; for complex data structures and creating local variable names through local scopes. Object-orientation achieved the next conceptual leap by naming all related data and functions and introducing &lt;strong&gt;relative names&lt;/strong&gt; through the &lt;code&gt;this&lt;/code&gt; pointer: the specific meaning of &lt;code&gt;this.fly()&lt;/code&gt; is no longer absolute but is determined relative to the object entity pointed to by &lt;code&gt;this&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Looking from the outside in, the first thing we see is the &lt;strong&gt;conceptual splitting&lt;/strong&gt; brought about by vertical decomposition. Taking the Nop Platform as an example, the REST link format for frontend access to the backend is determined by first principles to be &lt;code&gt;/r/{bizObjName}__{bizAction}&lt;/code&gt; (e.g., &lt;code&gt;/r/NopAuthUser__findPage&lt;/code&gt;). This intuitively &lt;strong&gt;splits&lt;/strong&gt; a complete backend service into multiple independent semantic subspaces based on core domain concepts (like User, Order).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Object names define the split boundaries&lt;/strong&gt;: &lt;code&gt;NopAuthUser&lt;/code&gt; is the product of this split, acting as a coordinate that defines the boundary of a highly cohesive domain concept.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Splitting gives rise to internal aggregation&lt;/strong&gt;: Within this boundary, the system automatically aggregates all technical implementations of this concept:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;code&gt;NopAuthUser.xbiz&lt;/code&gt; - Defines business logic&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;NopAuthUser.xmeta&lt;/code&gt; - Defines metadata model&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;NopAuthUser.view.xml&lt;/code&gt; - Defines the view outline&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Recursive evolution of splitting&lt;/strong&gt;: This splitting process can be applied recursively to achieve fine-grained, delta-based governance. For example: &lt;code&gt;/r/NopAuthUser_admin__active_findPage&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Further vertical splitting&lt;/strong&gt;: &lt;code&gt;NopAuthUser_admin&lt;/code&gt; is split again from the generic user concept, forming a specialized version for the administrator role. It can have its own custom business logic (&lt;code&gt;NopAuthUser_admin.xbiz&lt;/code&gt;) and UI model, while selectively inheriting the generic user's definition (using &lt;code&gt;x:extends&lt;/code&gt;). This perfectly embodies the evolutionary design from a single generic model to a "core model + multiple delta variants."&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Horizontal refinement&lt;/strong&gt;: &lt;code&gt;active_findPage&lt;/code&gt; refines the behavior. Its basic logic is the same as &lt;code&gt;findPage&lt;/code&gt;, but it additionally specifies the &lt;code&gt;active&lt;/code&gt; query condition.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the Nop Platform, the URL is a direct manifestation of this conceptual splitting, transforming abstract vertical slicing into a stable, addressable engineering contract.&lt;/p&gt;

&lt;h3&gt;
  
  
  Horizontal Decomposition: The Inevitability of Layered Architecture
&lt;/h3&gt;

&lt;p&gt;Complementing vertical decomposition, which focuses on "what different things constitute the system," horizontal decomposition focuses on "which steps in the process of handling any one thing are fundamentally different." Its goal is to &lt;strong&gt;separate concerns&lt;/strong&gt;, allowing technical logic of different natures to change and be reused independently.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Natural Separation of Input, Processing, and Output&lt;/strong&gt;: The most basic horizontal decomposition is to view any process as three stages: &lt;strong&gt;"Input -&amp;gt; Processing -&amp;gt; Output."&lt;/strong&gt; We immediately realize that the same core "Processing" logic can be adapted to different "Input" sources and "Output" destinations. To reuse the core logic and isolate changes, separating these three stages into independent layers becomes a necessary choice.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Three-Tier Architecture&lt;/strong&gt;: The classic &lt;strong&gt;Presentation Layer, Business Logic Layer, and Data Persistence Layer&lt;/strong&gt; three-tier architecture is a direct embodiment of this horizontal decomposition thinking. It separates the input (Web requests) and output (database operations), which are strongly tied to technical details, from the core business processing logic.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Unifying the Two: A Matrix to Govern Complexity
&lt;/h3&gt;

&lt;p&gt;In a real software system, vertical and horizontal decomposition are not mutually exclusive choices but are &lt;strong&gt;simultaneously at play, interwoven&lt;/strong&gt; to form a design matrix.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Vertical decomposition defines the system's "static structure"&lt;/strong&gt;: It answers, "What are the core objects in the system?" (What it is)&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Horizontal decomposition defines the system's "dynamic flow"&lt;/strong&gt;: It answers, "How does a request for each use case travel through the layers, interact with these objects, and complete its task?" (How it works)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An elegant architecture is one that makes clear, consistent cuts along both of these dimensions. It is at the intersection of this vertical and horizontal grid that we can precisely locate the responsibility of each piece of code, thus systematically building a system structure that is stable, flexible, and faithfully reflects the inherent laws of the domain.&lt;/p&gt;

&lt;h2&gt;
  
  
  IV. Bounded Context: The Revolution of Discovering "Space"
&lt;/h2&gt;

&lt;p&gt;Before the advent of DDD, the world of software design was like the world of physics before Newton's classical mechanics.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The Pre-DDD Era: An Infinite, Homogeneous "Absolute Space"
&lt;/h3&gt;

&lt;p&gt;In classical object and layered design, the entire software system was treated as a &lt;strong&gt;single, infinite, homogeneous "absolute space."&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Unified and Infinite&lt;/strong&gt;: All objects, regardless of their business domain, existed in the same global namespace and semantic field. In theory, any object could directly or indirectly interact with any other object. This is like all celestial bodies floating in the same boundless ether.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Homogeneous&lt;/strong&gt;: The space itself had no properties. We only focused on the "objects" (entities) within the space and their interactions (method calls), ignoring the possibility that the "space" itself might have properties and boundaries. &lt;strong&gt;Space was merely a passive, transparent background container.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Focus of Design&lt;/strong&gt;: Consequently, all design complexity was concentrated on how to manage and organize the "objects" in this space. We invented design patterns, componentization, and other methods to try to bring order to the tangled web of object relationships. But we never considered that the problem might lie with the "space" itself.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. The DDD Revolution: Discovering "Relative Space"—The Bounded Context
&lt;/h3&gt;

&lt;p&gt;The paradigm shift introduced by DDD is, at a cognitive level, analogous to the shift in physics from Newton's absolute spacetime to Einstein's theory of relativity. Einstein showed that space is not a passive background but a dynamic entity that can be curved by mass and has its own properties.&lt;/p&gt;

&lt;p&gt;Similarly, through the &lt;strong&gt;Bounded Context&lt;/strong&gt;, DDD reveals to us that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The software design space is not unified, but is composed of multiple heterogeneous, bounded "relative spaces."&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Each "space" (Bounded Context) has its own unique "physical laws"&lt;/strong&gt;—this is the &lt;strong&gt;Ubiquitous Language&lt;/strong&gt;. In the "Order space," a "Product" follows one set of rules; in the "Inventory space," the "Product" follows a completely different set of rules.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;"Space" defines the meaning of "objects"&lt;/strong&gt;: The true meaning and behavior of an object (like a "Product") are determined by the "space" (Bounded Context) it resides in. Talking about an object without its context is meaningless.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Therefore, the core contribution of the Bounded Context is that it allows us to "see" the space itself for the first time.&lt;/strong&gt; We no longer take space for granted as a transparent background, but rather treat it as a &lt;strong&gt;first-class citizen of design&lt;/strong&gt;. (Previously, we only saw the foreground and ignored the background.)&lt;/p&gt;

&lt;h3&gt;
  
  
  3. The Paradigm Shift in Design Brought by "Space"
&lt;/h3&gt;

&lt;p&gt;Once we discover the existence of "space," the entire design paradigm undergoes a fundamental transformation:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;From "Objects First, Then Relationships" to "Space First, Then Objects"&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Old Paradigm&lt;/strong&gt;: We first design a large number of objects and then rack our brains to sort out the relationships between them.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;New Paradigm (DDD Strategic Design)&lt;/strong&gt;: The first thing we must do is &lt;strong&gt;partition the space&lt;/strong&gt; (identify Bounded Contexts). This is a strategic, macroscopic decision. Only after the space is defined can we safely and unambiguously design and evolve the objects (Aggregates, Entities) that belong to that space. &lt;strong&gt;Slicing happens within the space.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;From "Internal Tidying" to "Boundary Isolation" for Complexity Governance&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Old Paradigm&lt;/strong&gt;: Faced with complexity, we try to arrange the furniture more neatly within the same large room.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;New Paradigm&lt;/strong&gt;: We build walls directly, partitioning one large room into several functionally independent small rooms. Each small room can be simple internally, and interactions between rooms occur through well-defined doors (Anti-Corruption Layers, Open Host Services). &lt;strong&gt;Complexity is effectively isolated and controlled by the boundaries.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  V. Hexagonal Architecture: Boundaries and Isolation
&lt;/h2&gt;

&lt;p&gt;The "space revolution" in the vertical dimension solves the problem of macroscopic semantic boundaries. Within a single Bounded Context, the evolution of horizontal architecture is dedicated to protecting the purity of the domain model, marked by the evolution from &lt;strong&gt;Three-Tier Architecture&lt;/strong&gt; to &lt;strong&gt;Hexagonal Architecture&lt;/strong&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Contributions and Limitations of Three-Tier Architecture&lt;/strong&gt;&lt;br&gt;
The classic three-tier architecture (Presentation, Business Logic, Data Persistence) is a successful application of horizontal decomposition. By &lt;strong&gt;separating concerns&lt;/strong&gt;, it isolates tasks of different natures—user interaction, core logic, and data persistence—theoretically allowing the business logic layer to exist independently of specific data sources and user interfaces.&lt;/p&gt;

&lt;p&gt;However, in practice, the "Business Logic Layer" often becomes a vague container. Technical implementation details (like transaction management, database connections, remote calls) can easily leak in and become entangled with core domain rules. More critically, it implies a certain "top-down" hierarchical concept and fails to clearly and symmetrically express a core design intent: &lt;strong&gt;to protect the domain core from any external technical influence&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Hexagonal Architecture: A Clear Inside and Outside&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1cp0gx91v5yrwrgf09lo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1cp0gx91v5yrwrgf09lo.png" alt="hexagonal-arch-diagram" width="800" height="598"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Hexagonal Architecture (also known as Ports and Adapters) is a thorough implementation and sublimation of the three-tier concept. It performs a fundamental conceptual refactoring:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*   **From "Up/Down" to "Inside/Outside"**: It abandons the hierarchically suggestive "upper-layer/lower-layer" concept and explicitly divides the system into an **Inside (Domain Model)** and an **Outside (Technical Implementations &amp;amp; the World)**.
*   **Ports and Adapters**:
    *   The **Inside** declares what functionality it needs or can provide through **Ports**—a set of abstract interfaces.
    *   The **Outside** connects concrete implementations (like web controllers, database repositories) to these ports via **Adapters**.

The essence of Hexagonal Architecture is to transform "technical layering" into "boundary division between the business core and technical implementations." It places the core domain model at the center of the architecture, isolated by a protective ring of ports and adapters. **The domain model is thus no longer "dependent" on any specific technology; it merely defines contracts (ports), and the outside world adapts to it.** This perfectly achieves the goal mentioned earlier of "building a technology-neutral expression system for business logic."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This architectural evolution can be compared to how biological cells achieve a separation of "boundary and interior" through the &lt;strong&gt;cell membrane&lt;/strong&gt;. The cell membrane (&lt;strong&gt;Ports and Adapters&lt;/strong&gt;), acting as a selective boundary, strictly controls the exchange of matter and information between the inside and outside. Its fundamental purpose is to &lt;strong&gt;create a protected internal environment, allowing the internal structures to be decoupled from the complexity of the external environment, thereby gaining the ability to evolve and adapt independently.&lt;/strong&gt; It is through this mechanism that the highly complex and precise chemical reactions (&lt;strong&gt;core business logic&lt;/strong&gt;) within the cytoplasm and nucleus (&lt;strong&gt;Domain Model&lt;/strong&gt;) can proceed stably and efficiently, free from the disorderly interference of the external environment. Bounded Context and Hexagonal Architecture, working together, achieve a similar "cellularization" encapsulation in software systems.&lt;/p&gt;

&lt;h3&gt;
  
  
  A Convergence of Vertical and Horizontal to Build a Cognitive Mirror
&lt;/h3&gt;

&lt;p&gt;At this point, we can see a clear evolutionary path:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Vertically&lt;/strong&gt;, DDD completes a paradigm revolution from "organizing objects" to "partitioning space" through &lt;strong&gt;Bounded Contexts&lt;/strong&gt;, solving the problem of macroscopic semantic boundaries.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Horizontally&lt;/strong&gt;, architectural styles have refined the concept from "separating concerns" to "protecting the core" through &lt;strong&gt;Hexagonal Architecture&lt;/strong&gt;, solving the problem of microscopic technical dependencies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When the two are combined, we get a powerful architectural paradigm: &lt;strong&gt;a system is composed of multiple Bounded Contexts (vertical semantic spaces), and each Bounded Context, in turn, uses a Hexagonal Architecture (horizontal technical boundaries) to organize its internal structure.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This marks an evolution in our design thinking from simple "slicing" and "layering" to the thoughtful design and governance of "boundaries." By drawing clear, robust boundaries in these vertical and horizontal dimensions, we finally construct a software system that can truly &lt;strong&gt;map the inherent laws of the domain&lt;/strong&gt;, possessing both resilience and evolvability—a precise &lt;strong&gt;cognitive mirror&lt;/strong&gt; of domain knowledge in the digital world.&lt;/p&gt;

&lt;h2&gt;
  
  
  VI. Entity and Domain Event: Evolution in the Time Dimension
&lt;/h2&gt;

&lt;p&gt;Through vertical and horizontal decomposition, we have shaped the spatial structure of a software system. However, a model that truly reflects the laws of a domain must not only depict its &lt;strong&gt;static snapshot&lt;/strong&gt; at a given moment but also describe its &lt;strong&gt;dynamic evolution&lt;/strong&gt; over time. DDD opens up our understanding of the system's behavioral time dimension through two core constructs: &lt;strong&gt;Entity&lt;/strong&gt; and &lt;strong&gt;Domain Event&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Entity: Continuity of Identity Through Time
&lt;/h3&gt;

&lt;p&gt;In DDD's tactical patterns, an &lt;strong&gt;Entity&lt;/strong&gt; is defined as an object determined by its &lt;strong&gt;identity&lt;/strong&gt;, not its attribute values. This definition, though seemingly simple, contains a profound philosophical insight: it captures those things in the domain that need to maintain &lt;strong&gt;identity&lt;/strong&gt; as time passes.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Identity: The Anchor Across Time&lt;/strong&gt;&lt;br&gt;
An "Order" may constantly change its state (amount, shipping address, logistics information) from creation to payment to delivery, but we always consider it the &lt;strong&gt;same&lt;/strong&gt; order. The identity (like an order number) is the "anchor" that allows this order to maintain its selfhood in the stream of time. It answers a fundamental question: "In the full set of state changes, what is immutable and used to track the thing itself?"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Finiteness of State&lt;/strong&gt;&lt;br&gt;
An entity's state transitions are not arbitrary. The &lt;strong&gt;Aggregate Root&lt;/strong&gt; pattern imposes a boundary, specifying which states an entity can "control" (those within its aggregate), and ensures the &lt;strong&gt;legitimacy&lt;/strong&gt; of state transitions by guarding invariants. This makes the entity's lifecycle, though long, follow a predictable and constrained path.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;An Entity, in essence, is a model for things in the domain that are stateful, have a lifecycle, and need to be continuously tracked over time.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Command and Notice: The Philosophical Distinction Between Intent and Fact
&lt;/h3&gt;

&lt;p&gt;At the source that drives an entity's state evolution, we must make a fundamental distinction: &lt;strong&gt;Command&lt;/strong&gt; versus &lt;strong&gt;Notice&lt;/strong&gt;, which is the divide between &lt;strong&gt;intent&lt;/strong&gt; and &lt;strong&gt;fact&lt;/strong&gt; (To-Do list vs. operation log).&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Command: Intent Laden with Uncertainty&lt;/strong&gt; (Points to the future, the start of a process)&lt;br&gt;
A &lt;strong&gt;Command&lt;/strong&gt; is an &lt;strong&gt;imperative sentence&lt;/strong&gt; expressing the &lt;strong&gt;intent&lt;/strong&gt; for the system to perform an action, such as &lt;code&gt;PlaceOrder&lt;/code&gt; or &lt;code&gt;ConfirmPayment&lt;/code&gt;. The outcome of a command is not predetermined; it depends on the system's &lt;strong&gt;current state&lt;/strong&gt; and &lt;strong&gt;external environment&lt;/strong&gt; when the command is received. Therefore, &lt;strong&gt;executing the same command multiple times may produce different results due to different timing and contexts&lt;/strong&gt;. This uncertainty is a direct reflection of business rule complexity and the non-deterministic nature of the real world.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Notice: Event as a Confirmed Fact&lt;/strong&gt; (Points to the past, the end of a process)&lt;br&gt;
A &lt;strong&gt;Notice&lt;/strong&gt; (often represented as a &lt;strong&gt;Domain Event&lt;/strong&gt; in DDD) is a &lt;strong&gt;declarative sentence&lt;/strong&gt; recording a &lt;strong&gt;fact&lt;/strong&gt; that has already occurred and cannot be changed, such as &lt;code&gt;OrderPlaced&lt;/code&gt; or &lt;code&gt;PaymentConfirmed&lt;/code&gt;. It is an assertion about the outcome of a state transition and contains no execution logic itself. &lt;strong&gt;Processing the same notice multiple times should yield a deterministic and idempotent result&lt;/strong&gt;, because it describes the past, and the past cannot be changed.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;[A Note from a Design Perspective]&lt;/strong&gt;&lt;br&gt;
This distinction clarifies a potential misunderstanding in the classic &lt;strong&gt;Command Pattern&lt;/strong&gt; when applied to business modeling. The "command" recorded in that pattern, to enable safe &lt;code&gt;Redo/Undo&lt;/code&gt;, must have its inherent uncertainty eliminated. It essentially records a &lt;strong&gt;deterministic change function&lt;/strong&gt; on the state space. This is closer to what we call an "event" in &lt;strong&gt;Event Sourcing&lt;/strong&gt;—a confirmed, safely replayable factual notice. The true business "command," on the other hand, precedes this deterministic change function; it is the input that triggers the computation and contains the seeds of uncertainty itself.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  From a Single Timeline to Parallel Universes: A New Picture of the Time Dimension
&lt;/h3&gt;

&lt;p&gt;The traditional modeling perspective is a "top-down view," where we observe the final state of an entity at a specific point in time. Domain events and technologies like CDC (Change Data Capture) shift our perspective to a "side view"—we begin to focus on the &lt;strong&gt;timeline&lt;/strong&gt; constituted by state transitions itself.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Timeline as a First-Class Citizen and State Deltas&lt;/strong&gt;&lt;br&gt;
When we take a side view, the entity's current state is no longer the sole focus. The &lt;strong&gt;timeline&lt;/strong&gt; of its complete lifecycle, composed of domain events, becomes equally, if not more, fundamental. The current state is merely a cross-section of this timeline at the "present" moment. More importantly, we can understand this relationship with a concise mathematical formula:&lt;br&gt;
&lt;code&gt;NewState = Action(OldState, Event) = OldState ⊕ Event&lt;/code&gt;&lt;br&gt;
Here, the &lt;strong&gt;Event can be precisely understood as a &lt;code&gt;Delta&lt;/code&gt; in the state space&lt;/strong&gt;, and the &lt;code&gt;⊕&lt;/code&gt; operation represents the &lt;strong&gt;deterministic evolution function&lt;/strong&gt; that applies this delta to the old state to produce the new state. This formula clearly reveals the essence of an event as a "state increment."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Possibility of Multi-Verse Evolution&lt;/strong&gt;&lt;br&gt;
This mathematical perspective provides a theoretical basis for "multi-verse" evolution. Since the system's evolution is driven by a stream of events, starting from the same initial state &lt;code&gt;S0&lt;/code&gt; and applying different event sequences &lt;code&gt;[E1, E2, ...]&lt;/code&gt; through the continuous application of the &lt;code&gt;⊕&lt;/code&gt; operation will give rise to different &lt;strong&gt;timeline branches&lt;/strong&gt;. This is akin to the "parallel universes" discussed by physicists.&lt;br&gt;
&lt;strong&gt;Event Sourcing&lt;/strong&gt; technology is the engineering practice of this idea: it uses the event stream &lt;code&gt;[E1, E2, ..., En]&lt;/code&gt; as the single source of truth for the system's state. The current state is simply the result of calculating &lt;code&gt;S0 ⊕ E1 ⊕ E2 ⊕ ... ⊕ En&lt;/code&gt;. This allows us to precisely reconstruct the entity's state at any point in history by replaying the event stream, and even to simulate different "what if..." scenarios by injecting different event sequences.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Infinite Event Streams and System Resilience&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Infinitely long, replayable message queues&lt;/strong&gt; (like Apache Kafka) provide the infrastructure for this multi-timeline picture. They allow domain events, as deterministic deltas, to serve as a permanent, shared communication medium. Different Bounded Contexts (and even different derived systems) can independently consume and process events from the stream at their own pace and with their own logic, building their own state universes based on the same &lt;code&gt;S0&lt;/code&gt; and &lt;code&gt;⊕&lt;/code&gt; function, thereby achieving unprecedented system decoupling and evolutionary resilience.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Conclusion: Building a System That is Traceable and Sim-ulatable in the Time Domain
&lt;/h3&gt;

&lt;p&gt;By combining the lifecycle of an &lt;strong&gt;Entity&lt;/strong&gt;, the uncertainty of a &lt;strong&gt;Command&lt;/strong&gt;, and the determinism of an &lt;strong&gt;Event&lt;/strong&gt; as a state delta, we construct a model within the software system that is &lt;strong&gt;traceable and even sim-ulatable in the time domain&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Entity&lt;/strong&gt; provides the &lt;strong&gt;subject&lt;/strong&gt; for tracking changes over time.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Command&lt;/strong&gt; is the &lt;strong&gt;intent input&lt;/strong&gt;, laden with uncertainty, that drives change.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Event (Δ)&lt;/strong&gt; is the &lt;strong&gt;state delta&lt;/strong&gt; that records confirmed changes, constituting the timeline and driving deterministic state evolution via the &lt;code&gt;⊕&lt;/code&gt; operation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This "Command-Event-Entity" triangle, supplemented by the &lt;code&gt;State ⊕ Event&lt;/code&gt; mathematical model and the shift from a "state top-down view" to a "timeline side view," makes the system's dynamic behavior thoroughly explicit and mathematical. It transforms business logic from a black box hidden behind method calls into a series of observable, traceable, and even simulatable causal chains. It is on this time dimension that the systems we build with DDD truly gain the insight and evolutionary capability to cope with the complexity and uncertainty of the real business world.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;An Entity corresponds to a timeline with its own intrinsic activity. Any operation on it means that different timelines will become entangled, creating complex histories and hard-to-manage side effects. A Value Object, on the other hand, is an immutable snapshot of a fact at a point in time. It has no timeline of its own and can therefore be safely embedded in any timeline as a universal descriptor. This is why one should use Value Objects wherever possible, to avoid the "entanglement" cost brought about by unnecessary entity-fication.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Epilogue: The Price of Irreversible Time—The Real-World Dilemma of Traditional Design
&lt;/h3&gt;

&lt;p&gt;However, in most traditional software designs, this systematic consideration of the time dimension is severely lacking. Systems typically only maintain the "current state" of an entity, discarding the complete evolutionary history. This design leads to the &lt;strong&gt;irreversibility of time&lt;/strong&gt;—when the business needs to "roll back" (e.g., for refunds or interest recalculations), the reverse logic, lacking precise historical events, can only be based on &lt;strong&gt;speculation and estimation&lt;/strong&gt;, which is essentially an imprecise approximation (a reversal based on assumptions, not facts).&lt;/p&gt;

&lt;p&gt;This technical information deficit ultimately forces the business to compromise, creating various "imperfect but feasible" solutions. This starkly contrasts with the value of an event-centric model that preserves the complete timeline. It requires us to confront the need for &lt;strong&gt;time symmetry&lt;/strong&gt; from the very beginning of the design process, ensuring the system retains enough information to not only evolve forward but also to perform precise "reversals" when necessary.&lt;/p&gt;

&lt;p&gt;This is not just a technical implementation upgrade, but a fundamental shift in design philosophy: &lt;strong&gt;from caring only about "what it is now," to also caring about "how it became now" and "how to get back to the past."&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  VII. Mathematical Insights: Language as a Coordinate System
&lt;/h2&gt;

&lt;p&gt;We have established the cognitive framework for Domain-Driven Design (DDD) to master complexity through the philosophical concepts of "boundary" and "time." Traditional DDD stops here—it provides powerful analytical thinking and a series of patterns, but it essentially remains at the level of qualitative cognition. Can we, however, transform this methodological philosophy into a rigorous, computable, and executable software construction system? The answer lies hidden in a pure mathematical examination of "extensibility" and "system evolution."&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The Mathematical Axioms of Extensibility
&lt;/h3&gt;

&lt;p&gt;Let's abstract the process of software evolution into a mathematical formula. Suppose a system evolves from an initial state &lt;code&gt;X&lt;/code&gt; to a new state &lt;code&gt;Y&lt;/code&gt;. If we consider &lt;code&gt;X&lt;/code&gt; as a set composed of parts &lt;code&gt;A&lt;/code&gt;, &lt;code&gt;B&lt;/code&gt;, and &lt;code&gt;C&lt;/code&gt;, then the evolved &lt;code&gt;Y&lt;/code&gt; might become a set of &lt;code&gt;A'&lt;/code&gt;, &lt;code&gt;B'&lt;/code&gt;, and a new part &lt;code&gt;D&lt;/code&gt;. This process can be expressed as:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;X = A + B + C&lt;/code&gt;, &lt;code&gt;Y = A' + B' + D&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Here, &lt;code&gt;A'&lt;/code&gt; and &lt;code&gt;B'&lt;/code&gt; are modifications of &lt;code&gt;A&lt;/code&gt; and &lt;code&gt;B&lt;/code&gt;, which we can represent as &lt;code&gt;A' = A + dA&lt;/code&gt; and &lt;code&gt;B' = B + dB&lt;/code&gt;. Substituting this into the equation, we get:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Y = (A + dA) + (B + dB) + D&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To establish a clear mathematical relationship between the evolved &lt;code&gt;Y&lt;/code&gt; and the original &lt;code&gt;X&lt;/code&gt;, we introduce the concept of a "Delta," defining &lt;code&gt;Y = X + Delta&lt;/code&gt;. Through simple algebraic manipulation, we can reveal the specific composition of &lt;code&gt;Delta&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Delta = Y - X&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Delta = (A + dA + B + dB + D) - (A + B + C)&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Delta = dA + dB + D - C&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This is a heuristic derivation. The mathematical definition of a Delta in reversible computation theory is more complex, and general Deltas do not necessarily satisfy the commutative law.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This seemingly simple formula reveals two indispensable mathematical axioms for achieving true extensibility:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A Delta Must Include Both "Addition" and "Subtraction"&lt;/strong&gt;: &lt;code&gt;Delta&lt;/code&gt; not only contains the new part &lt;code&gt;D&lt;/code&gt; and modifications &lt;code&gt;dA&lt;/code&gt;, &lt;code&gt;dB&lt;/code&gt; (which can be seen as additions), but it must also contain an &lt;strong&gt;inverse element &lt;code&gt;-C&lt;/code&gt;&lt;/strong&gt;, i.e., the ability to &lt;strong&gt;delete&lt;/strong&gt; an original part. Any extension mechanism that only supports "addition" (like most plugin systems) is mathematically incomplete.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A Delta Must Be Separable and Relocatable&lt;/strong&gt;: To achieve separation of concerns, we want to consolidate all changes (&lt;code&gt;dA&lt;/code&gt;, &lt;code&gt;dB&lt;/code&gt;, &lt;code&gt;D&lt;/code&gt;, &lt;code&gt;-C&lt;/code&gt;) into an independent &lt;code&gt;Delta&lt;/code&gt; package, managed separately from the base system &lt;code&gt;X&lt;/code&gt;. When this &lt;code&gt;Delta&lt;/code&gt; needs to be applied, the system must be able to know precisely that &lt;code&gt;dA&lt;/code&gt; should act on &lt;code&gt;A&lt;/code&gt; and &lt;code&gt;-C&lt;/code&gt; should remove &lt;code&gt;C&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This second axiom leads directly to an inevitable conclusion: &lt;strong&gt;there must exist a precise, unambiguous positioning system within the system, such that any part that can be modified can be uniquely "referenced."&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The Coordinate System: From Positioning to Addressing
&lt;/h3&gt;

&lt;p&gt;The formal mathematical name for this "positioning system" is a &lt;strong&gt;coordinate system&lt;/strong&gt;. A proper coordinate system must provide us with two basic operations:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;code&gt;value = get(path)&lt;/code&gt;: Get a value based on a unique coordinate (path).&lt;/li&gt;
&lt;li&gt; &lt;code&gt;set(path, value)&lt;/code&gt;: Set (or modify/delete) a value based on a unique coordinate.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This requires that &lt;strong&gt;all objects in the system that need to be focused on, modified, and evolved must have a unique, stable coordinate in this coordinate system.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Looking back at our traditional extension mechanisms, we find that their essence is an attempt to construct some kind of coordinate system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Plugins/Extension Points&lt;/strong&gt;: These can be seen as a &lt;strong&gt;discrete, predefined set of coordinate points&lt;/strong&gt;. We pre-dig several "holes" in the system and name them—these are the coordinates. The fundamental flaw of this approach is its &lt;strong&gt;predictive nature&lt;/strong&gt;—we must predict all possible extension points in advance. Too few extension points, and the architecture becomes rigid; too many, and the architecture "dissolves," losing its cohesion. We can never apply an effect at an unforeseen location without modifying the source code.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. The Intrinsic Coordinates of Language: From General to Specific
&lt;/h3&gt;

&lt;p&gt;How can we establish a coordinate system that is all-encompassing and requires no prediction? The answer lies in something we take for granted: &lt;strong&gt;programming languages&lt;/strong&gt;. Because all system logic must ultimately be expressed through some language, &lt;strong&gt;the structure of the language itself constitutes a natural coordinate system.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;However, different languages have vastly different precision and applicability in their coordinate systems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Coordinate System of General-Purpose Languages (GPLs)&lt;/strong&gt;: Languages like Java and C# provide a &lt;strong&gt;two-level "class-method" coordinate system&lt;/strong&gt;. We can locate a class, and then a method within it. &lt;strong&gt;AOP (Aspect-Oriented Programming)&lt;/strong&gt; essentially utilizes this coordinate system and, by introducing mechanisms like Annotations, "refines" it to some extent, adding more "coordinate points." But it still cannot delve inside a method, nor can it stably reference an anonymous inner class or a lambda expression. This is a &lt;strong&gt;general-purpose, but coarse-grained&lt;/strong&gt;, coordinate system. When a minor business change occurs, the "structural mismatch" of the coordinate system often leads to scattered, non-local changes across many source files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Intrinsic Coordinate System of a Domain-Specific Language (DSL)&lt;/strong&gt;: Physics tells us that the most natural coordinate system for describing circular motion is polar coordinates, not Cartesian coordinates. This polar coordinate system is "intrinsic" to the geometric properties of the problem itself. It leverages the inherent constraint that the radius &lt;code&gt;r&lt;/code&gt; is constant, thus simplifying the description of a trajectory that would otherwise require two variables (&lt;code&gt;x&lt;/code&gt;, &lt;code&gt;y&lt;/code&gt;) to one that requires only one variable, &lt;code&gt;θ&lt;/code&gt; (angle), achieving &lt;strong&gt;dimensionality reduction of the problem&lt;/strong&gt;. Similarly, the most natural way to describe a business domain is with a custom-built &lt;strong&gt;Domain-Specific Language (DSL)&lt;/strong&gt;. Every node and attribute in the Abstract Syntax Tree (AST) of this DSL can be precisely located by its unique path (e.g., XPath). This constitutes a &lt;strong&gt;fine-grained, stable, intrinsic coordinate system tailored for the domain problem&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;[Analogy: The Method of Moving Frames in Differential Geometry]&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This idea can be compared to the &lt;strong&gt;Method of Moving Frames&lt;/strong&gt; in differential geometry. While a moving trajectory can be described in an external coordinate system, what is more profound is that &lt;strong&gt;the trajectory itself naturally generates an intrinsic coordinate system attached to it, one that best reflects its internal geometric properties&lt;/strong&gt;. For example, for a curve in three-dimensional space, its "moving frame" at each point consists of three mutually orthogonal unit vectors:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Tangent vector (T)&lt;/strong&gt;: Points in the direction the curve is moving.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Normal vector (N)&lt;/strong&gt;: Points in the direction the curve is bending.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Binormal vector (B)&lt;/strong&gt;: Is perpendicular to both the tangent and normal vectors, describing the direction the curve is "twisting" out of its current plane.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These three vectors are completely determined by the curve's own local geometry (velocity, acceleration), not by a fixed external coordinate system. Similarly, business logic is described in a DSL, and the structure of this DSL itself provides the most natural intrinsic coordinate system for describing &lt;em&gt;changes&lt;/em&gt; to the business logic (i.e., the &lt;code&gt;Delta&lt;/code&gt;).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The core contribution of language paradigms like XLang is to ensure, through mechanisms like the &lt;code&gt;XDef&lt;/code&gt; metamodel, that every syntax node in any defined DSL automatically receives a stable domain coordinate.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. The Macroscopic Puzzle and a Field-Theoretic Worldview
&lt;/h3&gt;

&lt;p&gt;So far, we have found an intrinsic coordinate system for a single domain. But a complex enterprise system often involves multiple domains (e.g., orders, inventory, payments). Trying to describe all domains with a single, monolithic DSL is like trying to accurately map the streets of every city with a single flat world map—it's both impossible and unnecessary.&lt;/p&gt;

&lt;p&gt;In modern mathematics, the breakthrough of differential manifold theory was the realization that describing a complex curved space (like the surface of the Earth) cannot rely on a single coordinate system. Instead, one must introduce an &lt;strong&gt;"Atlas"&lt;/strong&gt; composed of multiple local coordinate systems (maps). Each map is responsible for describing only a small region, and the maps are smoothly "glued" together by "transition functions." This idea can be heuristically mapped to software architecture:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  A complex system should be described by a &lt;strong&gt;"DSL forest"&lt;/strong&gt; or a &lt;strong&gt;"DSL Atlas."&lt;/strong&gt; Each DSL (e.g., &lt;code&gt;orm.xml&lt;/code&gt;, &lt;code&gt;workflow.xml&lt;/code&gt;, &lt;code&gt;view.xml&lt;/code&gt;) is a "local map," responsible for describing the intrinsic structure of a Bounded Context.&lt;/li&gt;
&lt;li&gt;  A foundational framework like the Nop Platform, in turn, has the core responsibility of providing the universal "glue"—the common &lt;strong&gt;Delta computation mechanism&lt;/strong&gt; (like &lt;code&gt;x-extends&lt;/code&gt;). This allows us to apply a unified, coordinate-based &lt;code&gt;Delta&lt;/code&gt; package across different DSL "maps," thereby achieving global, consistent system evolution.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With the introduction of a coordinate system, our worldview undergoes a fundamental shift. It is no longer about the interaction of discrete objects but moves towards a &lt;strong&gt;Field Theory&lt;/strong&gt; worldview. A "field" is a space where a ubiquitous coordinate system exists, and a physical quantity can be defined at every point in that coordinate system. Our focus is no longer on isolated objects, but on objects immersed in the field, and the properties of the field itself.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. A Revolution in Worldview: From Particles to Waves, From Assembly to Superposition
&lt;/h3&gt;

&lt;p&gt;Ultimately, mastering this ideology based on coordinate systems and deltas will bring about a profound &lt;strong&gt;revolution in worldview&lt;/strong&gt;. This can be compared to the &lt;strong&gt;wave-particle duality&lt;/strong&gt; revealed by quantum physics.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Traditional Worldview: Particle View&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Basic Unit&lt;/strong&gt;: The world is made of discrete, bounded "&lt;strong&gt;objects&lt;/strong&gt;," "components," and "modules." These are the fundamental "particles" of the software world.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Construction Method&lt;/strong&gt;: Through &lt;strong&gt;Invasive Assembly&lt;/strong&gt;. We rigidly connect these "particles" through invocation, inheritance, composition, etc., to build larger aggregates.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Focus&lt;/strong&gt;: The internal state and behavior of individual objects. We think: "What &lt;strong&gt;is&lt;/strong&gt; this object? What can it &lt;strong&gt;do&lt;/strong&gt;?"&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;New Worldview: Wave View&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Basic Unit&lt;/strong&gt;: The world is composed of a &lt;strong&gt;continuous pattern (the coordinate system/field)&lt;/strong&gt; as the background, and the &lt;strong&gt;perturbations (the deltas/Δ)&lt;/strong&gt; that act upon it.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Construction Method&lt;/strong&gt;: Through &lt;strong&gt;Non-Invasive Superposition&lt;/strong&gt;. Different "waves" (delta packages &lt;code&gt;Delta&lt;/code&gt;) interfere and superimpose within the same "field" (base structure &lt;code&gt;X&lt;/code&gt;), collectively shaping the final complex form &lt;code&gt;Y&lt;/code&gt; that we observe.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Focus&lt;/strong&gt;: How the background &lt;strong&gt;coordinate system evolves&lt;/strong&gt;, and how the &lt;strong&gt;changes (Δ) themselves are combined, transmitted, and interact&lt;/strong&gt;. We think: "In &lt;strong&gt;which coordinate system&lt;/strong&gt; did &lt;strong&gt;what change&lt;/strong&gt; occur?"&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;This cognitive revolution is the most valuable gift that (Generalized) Reversible Computation offers us. It leads us from an ontology of "being" to an evolution theory of "becoming." Our understanding of software shifts from static, isolated "entities" to dynamic, interconnected "processes." Once we complete this worldview transformation, we will be able to master the eternal and ubiquitous force in the software world—&lt;strong&gt;change&lt;/strong&gt;—with unprecedented clarity, elegance, and power.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. A Paradigm Shift in the Principle of Reuse: From "Decomposition-Reassembly" to "Whole-Transformation"
&lt;/h3&gt;

&lt;p&gt;The establishment of the coordinate system and delta model directly triggers a &lt;strong&gt;paradigm shift&lt;/strong&gt; in "reuse." The core of this shift is &lt;strong&gt;transforming the cost of change from being "related to the overall complexity of the system" to being "related only to the size of the change itself."&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Old Paradigm: "Decomposition-Reassembly" Reuse Based on "Sameness"&lt;/strong&gt;&lt;br&gt;
Traditional reuse is &lt;strong&gt;"modification-based reuse."&lt;/strong&gt; When a system evolves from &lt;code&gt;X&lt;/code&gt; to &lt;code&gt;Y&lt;/code&gt;, we must &lt;strong&gt;"open up"&lt;/strong&gt; the internals of &lt;code&gt;X&lt;/code&gt;, identify the &lt;strong&gt;same&lt;/strong&gt; parts for reuse, and then modify, replace, and reassemble the remaining parts. In this process, the &lt;strong&gt;cost of change is directly related to the overall complexity of the base system &lt;code&gt;X&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;New Paradigm: "Whole-Transformation" Reuse Based on "Relatedness"&lt;/strong&gt;&lt;br&gt;
Reversible computation's reuse is &lt;strong&gt;"superposition-based reuse."&lt;/strong&gt; We treat the entire &lt;code&gt;X&lt;/code&gt; as a black-box whole, &lt;strong&gt;untouched&lt;/strong&gt;, and independently create a &lt;strong&gt;delta &lt;code&gt;Delta&lt;/code&gt;&lt;/strong&gt; that describes all changes. Finally, we obtain the new system through &lt;code&gt;Y = X + Delta&lt;/code&gt;. &lt;code&gt;X&lt;/code&gt; is never "opened" or "modified." The &lt;strong&gt;cost of change is related only to the complexity of the delta &lt;code&gt;Delta&lt;/code&gt; and is completely decoupled from the size and complexity of &lt;code&gt;X&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;This is like the difference between "genetic surgery" and "wearing equipment":&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Traditional reuse is "genetic surgery"&lt;/strong&gt;: The cost and risk of the surgery are strongly correlated with the complexity of the organism itself.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Reversible computation is "wearing equipment"&lt;/strong&gt;: All costs and risks lie in making the "equipment" (&lt;code&gt;Delta&lt;/code&gt;), regardless of whether the organism is a mouse or an elephant.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;The ultimate insight of this &lt;strong&gt;paradigm shift&lt;/strong&gt; lies in the fundamental leap of the reuse principle: from &lt;strong&gt;Reuse of Sameness&lt;/strong&gt; to &lt;strong&gt;Reuse of Relatedness&lt;/strong&gt;. We are no longer limited to reusing the same parts in a "part-whole" relationship but can establish a transformation relationship via a &lt;code&gt;Delta&lt;/code&gt; between any two related systems &lt;code&gt;X&lt;/code&gt; and &lt;code&gt;Y&lt;/code&gt;. This makes it possible to "&lt;strong&gt;inherit an entire software product just like inheriting a class&lt;/strong&gt;," perfectly solving the core conflict between "productization and deep customization" in the enterprise software domain.&lt;/p&gt;

&lt;h3&gt;
  
  
  A Note on the Real-World Form of "Domain Languages"
&lt;/h3&gt;

&lt;p&gt;It is important to note that in the vast majority of DDD practices, the so-called "Ubiquitous Language" or "Domain Language" is far from reaching the rigor of a &lt;strong&gt;complete formal language&lt;/strong&gt; (with precisely defined syntax and semantics). More often, it manifests as a &lt;strong&gt;domain vocabulary&lt;/strong&gt; agreed upon through negotiation, relying on the team's experience and conventions to constrain the combinatorial relationships between these concepts.&lt;/p&gt;

&lt;p&gt;The manifestation of this constrained relationship in code is precisely the &lt;strong&gt;encapsulation&lt;/strong&gt; and &lt;strong&gt;association&lt;/strong&gt; mechanisms of object-oriented programming: specific methods can only belong to specific classes (defining "what can be done"), and specific classes can only be associated in specific ways (defining "who is related to whom"). This is, in effect, simulating a &lt;strong&gt;constrained context-free grammar&lt;/strong&gt;—class names and associations form the syntax, while method implementations provide the semantics. Many successful &lt;strong&gt;internal DSLs&lt;/strong&gt; today follow this path: they do not create a new language from scratch but cleverly leverage the class system of a host language (like Java or C#) to build a restricted subset of expressions that is morphologically closer to the domain problem, often using methods like the &lt;strong&gt;Fluent Interface&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Therefore, the real-world significance of the "Language as a Coordinate System" insight is that it pushes us to &lt;strong&gt;engineer&lt;/strong&gt; the implicit, vague rules of vocabulary combination into a &lt;strong&gt;finite but precise set of explicit specifications&lt;/strong&gt;. A superior domain DSL is the ultimate embodiment of this process—it strives to upgrade the "coordinate system" of domain expression from an experience-dependent "rough sketch" to a machine-parsable "engineering blueprint."&lt;/p&gt;

&lt;p&gt;Wittgenstein famously said, &lt;strong&gt;"The limits of my language mean the limits of my world."&lt;/strong&gt; The (Generalized) Reversible Computation theory further interprets this as: &lt;strong&gt;A language is a coordinate system, and from a coordinate system, a delta naturally arises.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  VIII. Reversible Computation: Making Evolution Programmable
&lt;/h2&gt;

&lt;p&gt;After "seeing space" with Bounded Contexts and "seeing time" with event timelines, we are just one step away from truly bringing software into a state of sustainable order: seeing the shape of "change" itself and making it orchestratable. The insight of Reversible Computation lies precisely here—it does not treat change as an accidental side effect but reifies change itself, making it data-driven and composable (demoting it from a verb to a noun). It attempts to establish a unified "evolutionary dynamics" for system construction and growth with an extremely simple yet infinitely recursive formula: &lt;code&gt;Y = F(X) ⊕ Δ&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The Universal Pattern of Evolution: From a Perturbation Model to a Construction Paradigm
&lt;/h3&gt;

&lt;p&gt;Any computation can be abstractly described as &lt;code&gt;Result = Function(Data)&lt;/code&gt;. When a system evolves, both the &lt;code&gt;Function&lt;/code&gt; and the &lt;code&gt;Data&lt;/code&gt; can change: &lt;code&gt;NewFunction = BaseFunction + ΔFunction&lt;/code&gt;, and &lt;code&gt;NewData = BaseData + ΔData&lt;/code&gt;. The interaction of these underlying changes ultimately leads to a change in the &lt;code&gt;Result&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Traditional approaches get bogged down in analyzing these complex interactions. The revolutionary assertion of Reversible Computation is that &lt;strong&gt;regardless of how complex the underlying changes are, their net effect on the final result can always be encapsulated into a single, structured 'Total Delta'.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This means we can describe evolution with a universal perturbation model:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;NewResult = BaseFunction(BaseData) + TotalDelta&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This formula describes the necessary structure of any evolving system; &lt;strong&gt;it is a mathematical necessity.&lt;/strong&gt; Consider this: if we view the output result as binary data, we can always define a delta between any two pieces of data in binary space using an XOR operation. However, such a raw bitstream-level delta has no business value; it is difficult to understand intuitively and cannot be efficiently composed or maintained.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The real breakthrough is to apply the delta to a structured space.&lt;/strong&gt; The key here can be compared to the success of Docker container technology:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  The delta backup mechanism of &lt;strong&gt;virtual machine images&lt;/strong&gt; is like operating in binary space—feasible but cumbersome.&lt;/li&gt;
&lt;li&gt;  The &lt;strong&gt;&lt;code&gt;App = DockerBuild&amp;lt;Dockerfile&amp;gt; overlay-fs BaseImage&lt;/code&gt;&lt;/strong&gt; paradigm, however, by establishing a Delta within the structured &lt;strong&gt;filesystem namespace&lt;/strong&gt;, achieves lightweight reuse and flexible composition of image layers, thus completely liberating productivity.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Reversible Computation theory elevates this idea to a higher dimension of software construction, implementing the universal computation pattern &lt;code&gt;Y = F(X) ⊕ Δ&lt;/code&gt; as a very specific, executable technical formula:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;App = Delta x-extends Generator&amp;lt;DSL&amp;gt;&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This paradigm precisely decomposes the software construction process into three independently evolvable &lt;strong&gt;First-class Citizens&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DSL (Domain-Specific Language)&lt;/strong&gt;: &lt;strong&gt;As a precise "Domain Coordinate System"&lt;/strong&gt;&lt;br&gt;
It defines the problem's description space. A well-structured DSL provides a stable, addressable location for every semantic unit in the system. This is the &lt;strong&gt;structural prerequisite&lt;/strong&gt; for &lt;code&gt;Delta&lt;/code&gt; to perform precise addressing and application, and for &lt;code&gt;x-extends&lt;/code&gt; to achieve reversible merging.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Generator&lt;/strong&gt;: &lt;strong&gt;As a "Model Transformer" and "Truth Unfolder"&lt;/strong&gt;&lt;br&gt;
At compile-time, it is responsible for executing multi-stage transformations from abstract to concrete (model-to-model, model-to-code). More profoundly, like the derivation process of a mathematical theorem, it automatically unfolds a highly condensed "kernel truth" (the DSL model) into a complete, runnable base application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Delta&lt;/strong&gt;: &lt;strong&gt;As a composable "Evolution Unit"&lt;/strong&gt;&lt;br&gt;
It is an independent, reversible, and non-invasive unit of change. &lt;code&gt;Delta&lt;/code&gt; encapsulates all changes, including &lt;strong&gt;structured deletion&lt;/strong&gt;, and its merge operation satisfies the &lt;strong&gt;associative law&lt;/strong&gt;, meaning multiple &lt;code&gt;Deltas&lt;/code&gt; can be pre-composed into an independently distributable and versionable "feature pack" or "patch."&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Finally, these three first-class citizens are deterministically combined via the &lt;code&gt;x-extends&lt;/code&gt; operator. &lt;code&gt;x-extends&lt;/code&gt; is an &lt;strong&gt;algebraic upgrade&lt;/strong&gt; to the traditional &lt;code&gt;extends&lt;/code&gt;. It is no longer simple property overriding but a reversible, deterministic merge of a first-class citizen &lt;code&gt;Delta&lt;/code&gt; within a well-defined structural space. Because its operation is deterministic, the concept of "merge conflicts" found in traditional version control (like Git) does not exist.&lt;/p&gt;

&lt;p&gt;In this way, Reversible Computation elevates the trickiest problems in software engineering—"customization," "reuse," and "evolution"—from the realm of external tools or design patterns &lt;strong&gt;to the core semantic level of the language itself&lt;/strong&gt;, providing them with a native, unified, and mathematically sound solution.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgitee.com%2Fcanonical-entropy%2Fnop-entropy%2Fblob%2Fmaster%2Fdocs-en%2Ftheory%2Fxlang-review%2Fxlang-theory-en.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgitee.com%2Fcanonical-entropy%2Fnop-entropy%2Fblob%2Fmaster%2Fdocs-en%2Ftheory%2Fxlang-review%2Fxlang-theory-en.svg" alt="xlang-theory" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It must be emphasized that the formula &lt;code&gt;App = Delta x-extends Generator&amp;lt;DSL&amp;gt;&lt;/code&gt; in Reversible Computation theory is not a metaphorical illustration but a technical path that can be rigorously defined mathematically and strictly implemented in engineering.&lt;/strong&gt; The Nop Platform systematically implements this programming paradigm through XLang, a fourth-generation programming language with a built-in concept of deltas. For details, see &lt;a href="https://dev.to/canonical/why-is-xlang-an-innovative-programming-language-5fja"&gt;Why XLang is an Innovative Programming Language?&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The Fractal Construction of Software: Longitudes and Latitudes
&lt;/h3&gt;

&lt;p&gt;To truly understand the essence of Reversible Computation as a "system construction theory," we must grasp the most profound characteristic of the invariant &lt;code&gt;Y = F(X) ⊕ Δ&lt;/code&gt;: its &lt;strong&gt;recursivity&lt;/strong&gt;. It is not just a formula but a &lt;strong&gt;fractal self-similarity principle&lt;/strong&gt; that is recursively applied throughout the software world.&lt;/p&gt;

&lt;p&gt;This self-similarity is manifested in several fundamental dimensions of software architecture: the vertical "longitudes" (cross-layer), the horizontal "latitudes" (cross-domain), the flow of time (version evolution), and the "meta-level" of the construction system itself. Together, they weave a complete, evolvable "DSL Atlas."&lt;/p&gt;

&lt;h4&gt;
  
  
  2.1 Vertical Longitudes: The Multi-Stage Software Production Line
&lt;/h4&gt;

&lt;p&gt;The vertical "longitudes" depict a &lt;strong&gt;multi-stage software production line&lt;/strong&gt;, which solves a core dilemma of traditional Model-Driven Architecture (MDA). In traditional MDA, if the reasoning chain is too long (e.g., directly generating final UI code from a highly abstract business model), it leads to overly complex source model definitions and allows information from different abstraction levels to mix chaotically, ultimately becoming difficult to maintain and extend.&lt;/p&gt;

&lt;p&gt;Reversible Computation provides a standardized technical path for this, decomposing a one-off, complex model transformation into a series of controllable, clear steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Decompose the Reasoning Pipeline&lt;/strong&gt;: First, a complex &lt;code&gt;A =&amp;gt; C&lt;/code&gt; transformation is broken down into smaller, more focused steps, such as &lt;code&gt;A =&amp;gt; B =&amp;gt; C&lt;/code&gt;. This makes each stage's responsibility singular and simplifies the model definitions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Deltify Each Step&lt;/strong&gt;: This is the most critical innovation. In each transformation step, the upstream model (e.g., &lt;code&gt;A&lt;/code&gt;) does not directly generate the final downstream model (&lt;code&gt;B&lt;/code&gt;). Instead, it generates a "draft" or "base" model, conventionally named with a leading underscore (e.g., &lt;code&gt;_B&lt;/code&gt;). The final &lt;code&gt;B&lt;/code&gt; is then obtained by applying a &lt;code&gt;Delta&lt;/code&gt; package to customize and extend this draft. This process can be precisely described as:&lt;br&gt;
&lt;strong&gt;&lt;code&gt;B = Δ_B ⊕ _B&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
where &lt;code&gt;_B = Generator&amp;lt;A&amp;gt;&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Allow Information Passthrough&lt;/strong&gt;: Every stage (&lt;code&gt;Generator&lt;/code&gt;) in the production line follows the "principle of tolerance." It only processes information it can understand. For unrecognized extension attributes or metadata from upstream, it will temporarily store and "pass them through" to the downstream unmodified. This ensures that customized information injected at any stage of the production line is not lost.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Taking the built-in model-driven production line of NopPlatform as an example, it clearly decomposes the process from data to page into four main model stages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;XORM&lt;/strong&gt;: Storage layer model&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;XMeta&lt;/strong&gt;: Interface layer model&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;XView&lt;/strong&gt;: Framework-agnostic frontend logical view&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;XPage&lt;/strong&gt;: Final page model bound to a specific frontend framework&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This production line is a perfect embodiment of the technical path described above, where each step can be clearly described by the formula of reversible computation:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;XMeta = Δ_meta ⊕ Generator&amp;lt;XORM&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;XView = Δ_view ⊕ Generator&amp;lt;XMeta&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;XPage = Δ_page ⊕ Generator&amp;lt;XView&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In this way, Reversible Computation completely resolves the dilemma of MDA. It allows us to &lt;strong&gt;no longer pursue perfect coverage of all details during modeling&lt;/strong&gt;. We can concentrate on building core model generators (&lt;code&gt;Generator&lt;/code&gt;) that handle 80% of common scenarios, while the remaining 20% of special requirements can be precisely and elegantly injected at any stage of the production line via &lt;code&gt;Delta&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  2.2 Horizontal Latitudes: Parallel Projection of DSL Feature Vectors
&lt;/h4&gt;

&lt;p&gt;The horizontal "latitudes" depict a landscape of a &lt;strong&gt;DSL feature vector space&lt;/strong&gt;. In an "Atlas" composed of multiple DSLs, whether it's a UI model, a data model, or a business logic model, they all follow the &lt;strong&gt;exact same&lt;/strong&gt; superpositional evolution rule.&lt;/p&gt;

&lt;p&gt;A cross-domain business requirement (e.g., "add a VIP user level") can be precisely decomposed into a set of "isomorphic" deltas &lt;code&gt;{Δ_ui, Δ_data, Δ_logic, ...}&lt;/code&gt; acting on different DSL models. Due to the universality of the superposition operator &lt;code&gt;⊕&lt;/code&gt; (i.e., &lt;code&gt;x-extends&lt;/code&gt;), these deltas can be applied uniformly and deterministically within their respective domains. This constitutes a &lt;strong&gt;precise feature vector decomposition&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;App = [DSL1, DSL2, ..., Δ_residual]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The &lt;code&gt;Δ_residual&lt;/code&gt; here ensures the completeness of the decomposition&lt;/strong&gt;: it represents the "residual" that cannot be perfectly captured by the existing DSL system or requires special coordination. &lt;strong&gt;Furthermore, when we treat all known DSLs and their rules as "background knowledge" and strip them away, the remaining content represented by &lt;code&gt;Δ_residual&lt;/code&gt; can itself be considered a logically complete whole with its own syntax and semantics, understandable independently of the aforementioned background.&lt;/strong&gt; This makes the entire vector decomposition mathematically precise and lossless.&lt;/p&gt;

&lt;h4&gt;
  
  
  2.3 Time Recursion: The Self-Similarity of Version Evolution
&lt;/h4&gt;

&lt;p&gt;In addition to spatial decomposition along longitudes and latitudes, the recursivity of &lt;code&gt;Y = F(X) ⊕ Δ&lt;/code&gt; is also reflected in the &lt;strong&gt;time dimension&lt;/strong&gt;. Any entity in the system (be it the entire product or a &lt;code&gt;Delta&lt;/code&gt; package) can itself be seen as the result of superimposing an evolution delta onto its earlier version (the base). This forms an infinitely extending evolutionary chain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;code&gt;Product_V3 = Δ_v3 x-extends Product_V2&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  And &lt;code&gt;Product_V2&lt;/code&gt; itself is &lt;code&gt;Δ_v2 x-extends Product_V1&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Furthermore, each element in the formula (&lt;code&gt;X&lt;/code&gt;, &lt;code&gt;F&lt;/code&gt;, &lt;code&gt;Δ&lt;/code&gt;) can itself be decomposed again. For example, a complex feature delta &lt;code&gt;Δ_feature&lt;/code&gt; can be composed of its base version &lt;code&gt;Δ_base&lt;/code&gt; and a patch for it &lt;code&gt;Δ_patch&lt;/code&gt;: &lt;code&gt;Δ_feature = Δ_patch x-extends Δ_base&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This makes &lt;strong&gt;"change" itself a manageable, versionable, and evolvable core asset&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In the engineering implementation of the Nop Platform, this temporal recursion is perfectly embodied through the built-in Delta customization mechanism: developers can make delta-based modifications to existing data models, business logic, and even UI interfaces simply by adding a file with the same name in a specific Delta directory, without modifying a single line of the base product's source code. See &lt;a href="https://dev.to/canonical/how-to-implement-customized-development-without-modifying-the-base-product-source-code-2pp5"&gt;How to Achieve Customized Development Without Modifying the Base Product's Source Code&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  2.4 Meta-Recursion: The Bootstrapping of the Construction System Itself
&lt;/h4&gt;

&lt;p&gt;This is the most disruptive aspect of Reversible Computation: &lt;strong&gt;the toolchain, rules, and platform used to construct the software themselves follow the exact same invariant for their evolution.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Evolution of DSL Definitions (Metamodels)&lt;/strong&gt;: &lt;code&gt;MyDSL_v2 = Δ_meta x-extends MyDSL_v1&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Evolution of Build Tools&lt;/strong&gt;: &lt;code&gt;Compiler_Pro = Δ_feature x-extends Compiler_Base&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Even the Evolution of Merge Rules Themselves&lt;/strong&gt;: &lt;code&gt;MergeRule_New = Δ_rule x-extends MergeRule_Old&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The entire software world—from the final product to intermediate models, to the construction system itself—becomes a vast, self-similar delta structural space connected by the &lt;code&gt;⊕&lt;/code&gt; operator. In this "fractal space," entities at any level and any granularity share the same construction and evolution philosophy. This achieves a true "&lt;strong&gt;one law to rule them all&lt;/strong&gt;," elevating software engineering from a "cottage industry" of repeatedly inventing extension mechanisms for different domains and layers to a unified, self-consistent new era of industrialization. In this new era, the tools we use to build software, and the software we build, follow the same laws of growth.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgitee.com%2Fcanonical-entropy%2Fnop-entropy%2Fraw%2Fmaster%2Fdocs%2Ftheory%2Fddd%2Fdelta-oriented-arch.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgitee.com%2Fcanonical-entropy%2Fnop-entropy%2Fraw%2Fmaster%2Fdocs%2Ftheory%2Fddd%2Fdelta-oriented-arch.svg" alt="delta-oriented-arch" width="1000" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figure: A schematic of a delta-oriented architecture based on Reversible Computation, showing the complete stack from the infrastructure layer, through the core engine layer, to the business application layer, with a consistent delta customization mechanism running through all layers. The architecture itself also follows the meta-recursive principle &lt;code&gt;Y = F(X) ⊕ Δ&lt;/code&gt;—components at every layer can be customized and extended via deltas, including the construction rules of the architecture itself.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. The Unified Engineering Cornerstones
&lt;/h4&gt;

&lt;p&gt;To make the grand fractal structure described above achievable in engineering, all DSLs must share an intrinsically unified "physical law." Reversible Computation provides three unified engineering cornerstones for this.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Unified Intermediate Representation (IR): XNode&lt;/strong&gt;&lt;br&gt;
All DSLs are represented in memory as an enhanced, XML-like tree structure (XNode). It uses a mechanism similar to XML namespaces to achieve "&lt;strong&gt;localized metadata&lt;/strong&gt;," meaning each node and attribute can carry its own metadata (like source file, merge history, etc.) without polluting the business data itself. Based on this structure, we can build a universal, coordinate-based delta merging algorithm whose &lt;strong&gt;runtime cost is proportional only to the size of the change, not the size of the overall model&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Unified Metamodel Definition: XDef&lt;/strong&gt;&lt;br&gt;
XDef is a DSL for defining DSLs. Unlike traditional metamodel technologies (like EMF/Ecore), XDef itself is fully integrated into the delta-superposition evolutionary system. We can customize and extend the language's own syntax rules through deltas, just as we customize business models, providing unprecedented flexibility for language evolution.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Unified Full-Link Traceability: &lt;code&gt;_dump&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
Thanks to the rich metadata carried and preserved by XNode during the merge process, any final result in the system (e.g., the color of a button on a page) can be precisely traced back to its origin. We can one-click &lt;code&gt;_dump&lt;/code&gt; its complete "generation history": in which line of which base file it was originally defined, which modifications from which delta files it underwent, and how it ultimately reached its current state. This capability provides irreplaceable convenience for debugging and understanding complex customized systems.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Through these three cornerstones, Reversible Computation ensures that every "map" in the "DSL Atlas" uses the same paper, the same drafting standards, and the same coordinate positioning mechanism, thus making unified, recursive evolutionary programming possible.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For a detailed introduction to the theory of Reversible Computation, you can refer to my other articles.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://mp.weixin.qq.com/s/iZWcRa_Af8Io6AAUXd-0Vg" rel="noopener noreferrer"&gt;Making Evolution Programmable: XLang and the Structured Paradigm of Reversible Computation&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://mp.weixin.qq.com/s/gEvFblzpQghOfr9qzVRydA" rel="noopener noreferrer"&gt;XDef: An Evolution-Oriented Metamodel and Its Construction Philosophy&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  To Be Continued
&lt;/h2&gt;

&lt;p&gt;The above is the first half of this article, where we explored DDD from multiple perspectives, including its philosophical underpinnings, mathematical principles, and theoretical framework. We covered the essence of DDD as "discovering and expressing the inherent laws of the domain," analyzed methods for managing complexity through "vertical and horizontal decomposition," and introduced the cognitive shift from "absolute space" to "relative space." Leveraging (Generalized) Reversible Computation theory and the mathematical perspective of "language as a coordinate system," we have provided a possible theoretical foundation for the engineering of DDD.&lt;/p&gt;

&lt;p&gt;The value of theory must ultimately be tested by practice. in the second half of this article, we will turn to the engineering practice level, focusing on how the Nop Platform, based on the theories above, specifically implements DDD's various patterns through the engineering paradigm of Reversible Computation. We will also explore a key question: &lt;strong&gt;How can a system design that aligns with DDD principles be made to "emerge" naturally through the support of an underlying technology platform, thereby lowering the barrier to practice, rather than relying entirely on the personal experience and discipline of the designer?&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Preview of the Second Half:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Chapter 9: The Engineering Closure of DDD—Reversible Computation in Practice on the Nop Platform&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;9.1 Institutionalizing Strategic Design: Boundary-First, Language as a Coordinate System&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  9.1.1 Physicalization of Bounded Contexts: From &lt;code&gt;Modular Directories&lt;/code&gt; to a &lt;code&gt;DSL Atlas&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  9.1.2 Engineering Context Maps: &lt;code&gt;Events&lt;/code&gt;, &lt;code&gt;APIs&lt;/code&gt;, and &lt;code&gt;Transformation DSLs&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  9.1.3 Guardrails of Hexagonal Architecture: Declarative Contracts Derived from &lt;code&gt;BizModel&lt;/code&gt; and &lt;code&gt;XMeta&lt;/code&gt; Models&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;  &lt;strong&gt;9.2 Platformizing Tactical Design: Built-in Patterns and Emergent Robustness&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  9.2.1 Aggregates, Entities, and Value Objects: Unified in &lt;code&gt;NopORM&lt;/code&gt; and &lt;code&gt;XMeta&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  9.2.2 Transparent Services and Repositories: NopTaskFlow Orchestration and a Generic &lt;code&gt;EntityDao&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  9.2.3 The Natural Emergence of Event-Driven Architecture: A Platform-level &lt;code&gt;Outbox&lt;/code&gt; and &lt;code&gt;Synchronous Events&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  9.2.4 Queries and Read Models: Automation with &lt;code&gt;GraphQL&lt;/code&gt; and &lt;code&gt;DataLoader&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  9.2.5 Eradicating Stubborn Problems: Solving &lt;code&gt;N+1&lt;/code&gt; and &lt;code&gt;Database Deadlocks&lt;/code&gt; at the Root&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;  &lt;strong&gt;9.3 Programmable Evolution: The "Trinity" Paradigm of Reversible Computation&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  9.3.1 The Unified Evolution Formula: &lt;code&gt;EffectiveModel = Δ(Delta) ⊕ Generator&amp;lt;BaseModel&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  9.3.2 The Deterministic Construction Phase: &lt;code&gt;S-N-V&lt;/code&gt; (Structure-Merge, Normalize, Validate) Loading&lt;/li&gt;
&lt;li&gt;  9.3.3 The Fractal Software Production Line: &lt;code&gt;XORM&lt;/code&gt; → &lt;code&gt;XMeta&lt;/code&gt; → &lt;code&gt;XView&lt;/code&gt; → &lt;code&gt;XPage&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  9.3.4 Full-Stack Delta Customization Example: The Path of Evolution &lt;strong&gt;Without Changing a Single Line of Base Code&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;  &lt;strong&gt;9.4 Contract-First: From "Living Documents" to "Living Systems"&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  9.4.1 Contract is Model, Model is Contract: The Automated Production Pipeline Starting from &lt;code&gt;Excel&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  9.4.2 Reversible Transformation of Multiple Representations: Lossless Conversion and Delta Merging of Excel, XML, and JSON&lt;/li&gt;
&lt;li&gt;  9.4.3 Unified Governance and Quality Assurance: Full-Link &lt;code&gt;Traceability&lt;/code&gt; and &lt;code&gt;Snapshot Testing&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Chapter 10: The Final Paradigm Revolution—From "Applying DDD" to "Emergent DDD"&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;10.1 From Application-Layer Abstraction to First-Principle Support&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  10.1.1 Internalization of Patterns: A Comparison with the Evolution of the &lt;code&gt;Singleton&lt;/code&gt; Pattern and &lt;code&gt;DI&lt;/code&gt; Frameworks&lt;/li&gt;
&lt;li&gt;  10.1.2 The Protocol-Neutral BizModel: Eliminating the Redundant &lt;code&gt;Controller/Service/DTO&lt;/code&gt; Layers&lt;/li&gt;
&lt;li&gt;  10.1.3 Separation of the CRUD Subspace: From the &lt;code&gt;Repository&lt;/code&gt; Pattern to &lt;code&gt;IEntityDao&lt;/code&gt; and "Complementary Space" Programming&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;  &lt;strong&gt;10.2 From "Deployment Decision" to "Compositional Freedom"&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  10.2.1 Module as Bounded Context: The Physical Carrier with an Independent &lt;code&gt;DSL Atlas&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  10.2.2 Composition as Architecture: The Free Switching Between &lt;code&gt;Modular Monolith&lt;/code&gt; and &lt;code&gt;Microservices&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  10.2.3 Location-Transparent Communication: Automatic Adaptation Between &lt;code&gt;Local Calls&lt;/code&gt; and &lt;code&gt;Remote RPC&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;  &lt;strong&gt;10.3 From "Data-Centric" to "Information Flow Inversion"&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  10.3.1 Refocusing the Aggregate Root: From "Write Boundary" to "Information Access Center"&lt;/li&gt;
&lt;li&gt;  10.3.2 Decoupling Business Logic: From "Pushing Data (DTO)" to "Pulling Information (EL)"&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Chapter 11: Case Study—The Reversible Computation Transformation of a Large Bank's Core System&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  11.1 Lightweight Implementation of Core Principles: &lt;code&gt;Loader as Generator&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  11.2 Dealing with Major Model Changes: The Power of Delta Customization&lt;/li&gt;
&lt;li&gt;  11.3 The Elastic Extension of Process Orchestration&lt;/li&gt;
&lt;li&gt;  11.4 Purifying the Domain Model: Modifying MyBatis to Achieve "Aggregate Root Programming"&lt;/li&gt;
&lt;li&gt;  11.5 Unification and Automation of the Service Layer: Enhancing GraphQL-Java&lt;/li&gt;
&lt;li&gt;  11.6 Delta-based Configuration for the Frontend: Modular Governance of AMIS JSON&lt;/li&gt;
&lt;li&gt;  11.7 Lessons from the Case: Substance Over Form&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ddd</category>
      <category>programming</category>
      <category>softwareengineering</category>
      <category>designpatterns</category>
    </item>
    <item>
      <title>Third Round of Q&amp;A on the XLang Language</title>
      <dc:creator>canonical</dc:creator>
      <pubDate>Sun, 01 Feb 2026 11:47:43 +0000</pubDate>
      <link>https://dev.to/canonical/third-round-of-qa-on-the-xlang-language-4bk4</link>
      <guid>https://dev.to/canonical/third-round-of-qa-on-the-xlang-language-4bk4</guid>
      <description>&lt;h2&gt;
  
  
  1. Is XLang a framework or a programming language?
&lt;/h2&gt;

&lt;p&gt;XLang is not a traditional programming language, but if you ask DeepSeek, DeepSeek would answer:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;XLang combines the high abstraction of fourth-generation languages with the theoretical innovations of fifth-generation languages. Its core positioning is a “meta-language supporting Reversible Computation,” which boosts development efficiency through low-code and domain-specific syntax while redefining the underlying rules of program construction via structural space theory and Delta operations. Therefore, XLang can be regarded as an evolutionary form of a fourth-generation language—call it a “Fourth-Generation+ Language”—achieving a unique balance between low-code and theoretical innovation.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Mainstream programming languages today are so-called third-generation programming languages (3GL), which typically use a main function as the program’s entry point. Fundamentally, the language design is about writing that executable main function, and the compiler translates the execution logic written in the programming language into instructions executable by a hardware model. Fourth-generation programming languages (4GL), however, began to emphasize descriptiveness, simplifying development through highly abstract declarative syntax and graphical programming tools. In other words, the core of 4GL is “non-procedural,” emphasizing higher-level abstraction rather than adaptation to lower-level hardware models.&lt;/p&gt;

&lt;p&gt;With the rise of LLVM, hardware-level optimization is essentially a separate concern, and different programming languages can share a common compilation backend. This does not constitute an essential requirement of a programming language. I expect new languages like &lt;code&gt;Moonbit&lt;/code&gt; to offer a very compact, lightweight toolchain. As long as XScript’s AST is translated to &lt;code&gt;Moonbit&lt;/code&gt;’s AST, the rest is handled automatically.&lt;br&gt;
XLang includes a sub-language XScript, whose syntax deliberately adopts a subset of JavaScript plus minor extensions, and the type system mimics a simplified Java-like type system. This ensures lossless translation at the AST level to all mainstream programming languages.&lt;/p&gt;

&lt;p&gt;Although the Nop platform is a complete low-code platform built on the XLang language, this does not mean that XLang itself is a framework. While XLang currently runs on the JVM and relies on certain helper libraries and implementation classes provided by the underlying Java language, it does not depend on Java. The entire content of XLang can be ported to other programming languages such as &lt;code&gt;Lisp&lt;/code&gt; or &lt;code&gt;Rust&lt;/code&gt;. When writing business code, you can use only the XLang language without touching the underlying Java language.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. The fundamental reason a Turing machine achieves Turing completeness is that a Turing machine can be viewed as a virtual machine that can simulate all other automatic computing machines.
&lt;/h2&gt;

&lt;p&gt;For this statement, those with formal training may object: Turing completeness is defined via the Turing machine, so “a Turing machine is Turing-complete” is a conclusion by definition. My view is: if you get entangled in the mathematical definition and say Turing completeness is defined via the Turing machine, that’s fine; but this is merely due to a historical contingency.&lt;/p&gt;

&lt;p&gt;Conceptually, Turing completeness and NP-completeness are similar classifications in computation. The computational complexities of every NP-complete problem are comparable; solving any one of them allows you to solve all NP-complete problems. Yet we do not define NP-completeness as “knapsack-completeness.”&lt;/p&gt;

&lt;p&gt;Similarly, Turing completeness is an abstract computational capability. All computing machines are equivalent at this capability boundary; no particular machine has a more special capability. By historical accident, this capability was named Turing completeness. Turing completeness can be defined as a computing system’s ability to execute any computable function; it could just as well have been named Lambda Calculus completeness.&lt;/p&gt;

&lt;p&gt;In physics, all concepts are independent of any particular problem or choice of reference frame. If one insists that Turing completeness is defined via the Turing machine, that is merely a concrete manifestation of using a specific idealized model to describe an abstract computational capability. What we care about is not the concrete form, but the universal capability itself.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. Is the development goal of XLang to replace general-purpose languages like Java?
&lt;/h2&gt;

&lt;p&gt;XLang’s development goal is not to replace mainstream languages such as &lt;code&gt;C++&lt;/code&gt; or &lt;code&gt;Java&lt;/code&gt;; in fact, they should be complementary.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;c:script&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"groovy"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  Groovy syntax can be used here
&lt;span class="nt"&gt;&amp;lt;/c:script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;XLang uses XML syntax. When execution logic needs to be expressed, it employs the Xpl template language, a sub-language that is Turing-complete. Within it, you can embed XScript via the &lt;code&gt;&amp;lt;c:script&amp;gt;&lt;/code&gt; tag. If &lt;code&gt;lang="groovy"&lt;/code&gt; is specified, you can implement the script in Groovy. Similarly, you can integrate virtually any other language.&lt;/p&gt;

&lt;p&gt;Existing programming languages already address a large problem space effectively; there is often no need to invent new syntax for expressing procedural computation logic—reusing existing language syntax or even language runtimes will suffice.&lt;br&gt;
XLang focuses on areas not effectively handled by existing languages. By introducing the concepts of Delta and Reversible Computation, XLang can solve many problems that require the computing pattern &lt;code&gt;F(X)+Delta&lt;/code&gt; to be handled effectively. In other words, the problem space XLang addresses is largely non-overlapping with that of existing languages. However, this does not mean XLang is a DSL; its syntax and semantics are general-purpose and not tied to any specific business domain. Ultimately, in usage, XLang can cooperate with any third-generation programming language: the XScript part can be replaced with any other third-generation programming language.&lt;/p&gt;

&lt;p&gt;If we regard TypeScript as an extension of JavaScript, &lt;code&gt;TypeScript = JavaScript + JSX + TypeSystem&lt;/code&gt;, then XLang can also be viewed as an extension of JavaScript, &lt;code&gt;XLang = XScript + Xpl + XDef + MetaProgramming + DeltaProgramming&lt;/code&gt;. Xpl is an XML-form template language, similar in purpose to JSX.&lt;br&gt;
The distinctive parts here are DeltaProgramming and MetaProgramming. XLang does not strongly depend on JavaScript syntax; the XScript sub-language can be replaced by any other third-generation programming language.&lt;/p&gt;

&lt;p&gt;Some misunderstand XLang’s capabilities because it adopts an XML syntactic form and thus fail to associate it with a conventional programming language. But if you think carefully, TypeScript embeds XML-like JSX syntax inside JavaScript, and JavaScript code blocks can be embedded inside JSX. It is a bona fide programming language. Conversely, embedding JavaScript syntax inside XML format is equivalent to what TypeScript does, isn’t it?&lt;/p&gt;

&lt;p&gt;XLang’s outermost entry point is not a simple main function; rather, it is a variety of DSLs with diverse structures and semantics, and even visual models.&lt;/p&gt;
&lt;h2&gt;
  
  
  4. Can XLang build its own ecosystem?
&lt;/h2&gt;

&lt;p&gt;Certainly. But the content in XLang’s ecosystem is not the usual generic functionality that every new language seems destined to re-implement, such as JSON parsers or HTTP clients. XLang is typically used with a host language (e.g., Java), allowing direct reuse of functionality implemented in the host, at most with a wrapper over standard interfaces. This is similar to how TypeScript directly reuses the underlying JavaScript host ecosystem.&lt;br&gt;
Future directions include cross-language code reuse across multiple syntactic forms, e.g., all based on WASM bytecode, or via GraalVM’s polyglot interop mechanisms.&lt;/p&gt;

&lt;p&gt;What should be shared within XLang’s ecosystem are primarily XDef meta-model definitions for various DSLs, as well as code generators and meta-programming structural transformations written in the Xpl template language.&lt;/p&gt;

&lt;p&gt;To reiterate, XLang’s primary use is to rapidly develop and extend domain-specific languages, realizing the so-called Language Oriented Programming paradigm. Business development is essentially independent of any specific programming language—akin to physical facts being independent of coordinate systems. A general-purpose language is like a general Euclidean coordinate system; locally, we can adopt more efficient specialized coordinate systems, i.e., DSLs. As technology advances, descriptive programming and imperative programming can be better integrated, and the descriptive subspace occupied by DSLs can grow larger. Multiple DSLs can be seamlessly bonded via &lt;code&gt;G&amp;lt;DSL1&amp;gt; + G&amp;lt;DSL2&amp;gt; +Delta&lt;/code&gt;; the concept of Delta must be added to break the limitation that a DSL applies only to a single domain.&lt;/p&gt;
&lt;h2&gt;
  
  
  5. Are there intuitive examples showing how XLang is used?
&lt;/h2&gt;

&lt;p&gt;You can refer to the following articles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/canonical/kustomize-from-the-perspective-of-reversible-computation-45ec"&gt;Looking at Kustomize through Reversible Computation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://mp.weixin.qq.com/s/rus4sPKvO-C78cOjSd0ivA" rel="noopener noreferrer"&gt;Design Comparison: NopTaskFlow Logic Orchestration Engine vs. SolonFlow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/canonical/xdsl-general-purpose-domain-specific-language-design-35g6"&gt;XDSL: A General-Purpose Domain-Specific Language Design&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/canonical/a-theoretical-analysis-of-reversible-computation-for-programmers-2feb"&gt;A Theoretical Analysis of Reversible Computation for Programmers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/canonical/a-supplementary-analysis-of-reversible-computation-theory-for-programmers-2bd3"&gt;Addendum: A Theoretical Analysis of Reversible Computation for Programmers&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Detailed syntax can be found in the Nop platform documentation &lt;a href="https://nop-platform.github.io/projects/nop-entropy/docs-en/dev-guide/xlang/" rel="noopener noreferrer"&gt;XLang Language&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In most cases we do not develop business applications directly with XLang. Instead, we first use XLang to define a DSL, and then develop the actual business using that DSL. XLang defines DSL structure via the XDef meta-model language; the Nop platform’s &lt;code&gt;nop-xdefs&lt;/code&gt; module collects all meta-model files of already-defined DSLs.&lt;br&gt;
When developing your own DSL, you generally do not have to start from scratch. You can compose these existing XDef meta-model definitions directly—for example, reuse the variable definition model &lt;code&gt;var-define.xdef&lt;/code&gt; via &lt;code&gt;xdef:ref&lt;/code&gt; in a rules model.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;rule&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"!var-name"&lt;/span&gt; &lt;span class="na"&gt;xdef:ref=&lt;/span&gt;&lt;span class="s"&gt;"schema/var-define.xdef"&lt;/span&gt; &lt;span class="na"&gt;xdef:name=&lt;/span&gt;&lt;span class="s"&gt;"RuleInputDefineModel"&lt;/span&gt;
         &lt;span class="na"&gt;computed=&lt;/span&gt;&lt;span class="s"&gt;"!boolean=false"&lt;/span&gt; &lt;span class="na"&gt;mandatory=&lt;/span&gt;&lt;span class="s"&gt;"!boolean=false"&lt;/span&gt; &lt;span class="na"&gt;xdef:unique-attr=&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
  ...
&lt;span class="nt"&gt;&amp;lt;/rule&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In fact, XLang’s concrete merge algorithm is very simple—essentially akin to the virtual DOM diff algorithms in React and Vue, only simpler. XLang stipulates that elements in a list have unique identifiers such as name or id, thereby ensuring stable XPath that can serve as domain coordinates. During diff and merge computation, items are merged directly by coordinates.&lt;/p&gt;

&lt;p&gt;Syntactically, XLang is essentially ordinary XML augmented with a small set of special annotations such as &lt;code&gt;x:schema&lt;/code&gt;, &lt;code&gt;x:extends&lt;/code&gt;, and &lt;code&gt;x:override&lt;/code&gt;. The underlying language engine understands these annotations and performs Delta merge after parsing. &lt;code&gt;x:schema&lt;/code&gt; imports the XDef meta-model; via XDef we can define the types of nodes and attributes in XML. If an attribute’s type is specified as xpl, that attribute is parsed using the Xpl template language.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;task&lt;/span&gt; &lt;span class="na"&gt;x:schema=&lt;/span&gt;&lt;span class="s"&gt;"/nop/schema/xdef.xdef"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;steps&lt;/span&gt; &lt;span class="na"&gt;xdef:body-type=&lt;/span&gt;&lt;span class="s"&gt;"list"&lt;/span&gt; &lt;span class="na"&gt;xdef:key-attr=&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;xpl&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"!string"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;source&lt;/span&gt; &lt;span class="na"&gt;xdef:value=&lt;/span&gt;&lt;span class="s"&gt;"xpl"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/xpl&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/steps&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/task&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The meta-model above defines the structure of &lt;code&gt;task.xml&lt;/code&gt;. It states that steps are a set of step definitions, each step has type xpl, and it has a source attribute, which is parsed using the Xpl template language.&lt;/p&gt;

&lt;p&gt;An example of a concrete task.xml:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;task&lt;/span&gt; &lt;span class="na"&gt;x:schema=&lt;/span&gt;&lt;span class="s"&gt;"/nop/schema/task.xdef"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;steps&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;xpl&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"test"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;source&amp;gt;&lt;/span&gt;
        logInfo("hello world");
      &lt;span class="nt"&gt;&amp;lt;/source&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/xpl&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/steps&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/task&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note that the structure of the &lt;code&gt;task.xdef&lt;/code&gt; meta-model and the &lt;code&gt;task.xml&lt;/code&gt; model file it describes are essentially identical. &lt;code&gt;task.xdef&lt;/code&gt; is like an XML template with annotations indicating the types of the template’s attributes. The concrete &lt;code&gt;task.xml&lt;/code&gt; is the result of filling the template’s attributes and child nodes with specific values.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;x:schema="/nop/schema/xdef.xdef"&lt;/code&gt; on the root of the meta-model indicates that &lt;code&gt;task.xdef&lt;/code&gt; is a meta-model definition file whose structure is constrained by &lt;code&gt;xdef.xdef&lt;/code&gt;. Meanwhile, &lt;code&gt;x:schema="/nop/schema/task.xdef&lt;/code&gt; on the root of &lt;code&gt;task.xml&lt;/code&gt; indicates that &lt;code&gt;task.xml&lt;/code&gt; is a model file whose structure is constrained by &lt;code&gt;task.xdef&lt;/code&gt;.&lt;br&gt;
If you look at the definition of &lt;code&gt;xdef.xdef&lt;/code&gt;, you will find its &lt;code&gt;x:schema&lt;/code&gt; also points to &lt;code&gt;xdef.xdef&lt;/code&gt;. In other words, model structure is defined by the XDef meta-model, and the XDef meta-model itself is defined using the XDef meta-model.&lt;/p&gt;

&lt;p&gt;Here is one community member’s understanding:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I finally fully grasped your principle of Delta-based merging today. XLang is a set of standard attribute definitions used to add, delete, or modify node definitions. Delta-based merging is the process of merging a main file with a Delta, and the merge rules are defined by the XLang language specification. After merging, you get a new DSL description (which can be XML, JSON, or any tree structure). You then hand this new DSL to an execution engine; how it parses and handles the DSL is the execution engine’s responsibility.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;XLang defines DSLs and automatically implements DSL decomposition, merging, and Delta customization. In principle, once you obtain the merged DSL, it is no longer tied to XLang; the execution engine can use any other technology to parse XML/YAML for subsequent processing. If you use the Nop platform deeply, the execution engine can leverage the XDef meta-model to automatically parse the DSL, and executable code segments can directly reuse the Xpl template language.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. How does XLang define Delta at the language level? (not a formula)
&lt;/h2&gt;

&lt;p&gt;XLang defines XDSL via the XDef meta-model; every syntactic element in an XDSL has a unique, stable domain coordinate. Business is expressed in XDSL, effectively projecting business into the coordinate system defined by XDSL. A Delta can be defined at any point in this coordinate system. Furthermore, Deltas that arise at many coordinates can be factored out and recognized and managed conceptually as one large Delta—an integrated change pattern that becomes an independent cognitive entity.&lt;/p&gt;

&lt;p&gt;XLang can be viewed as a meta-language. It does not directly express Deltas; it first defines a DSL, and then defines language-level Deltas within that DSL. At a more abstract level, all sub-languages in XLang are defined via the XDef meta-model language, and XDef itself is defined via XDef as well. Consequently, all its sub-languages automatically inherit the concept of language-level Deltas.&lt;/p&gt;

&lt;p&gt;Many find this difficult to grasp because they do not realize the meta-level nature here. It is not directly about “A solves problem X,” but rather solving it at a higher meta-level through a logical ladder, then projecting it down to the next level where it manifests concretely.&lt;/p&gt;

</description>
      <category>nop</category>
      <category>programming</category>
      <category>architecture</category>
      <category>lowcode</category>
    </item>
    <item>
      <title>Further explanations on the article "Why XLang is an innovative programming language"</title>
      <dc:creator>canonical</dc:creator>
      <pubDate>Sun, 18 Jan 2026 12:30:33 +0000</pubDate>
      <link>https://dev.to/canonical/further-explanations-on-the-article-why-xlang-is-an-innovative-programming-language-3da1</link>
      <guid>https://dev.to/canonical/further-explanations-on-the-article-why-xlang-is-an-innovative-programming-language-3da1</guid>
      <description>&lt;p&gt;The XLang language is a key foundational technology underpinning the next-generation open-source low-code Nop platform. Traditional programming languages that support generic metaprogramming correspond structurally to the construction formula &lt;code&gt;Map = Map extends Map&amp;lt;Map&amp;gt;&lt;/code&gt;, whereas XLang effectively extends this to &lt;code&gt;Tree = Tree x-extends Tree&amp;lt;Tree&amp;gt;&lt;/code&gt;. That is, Map is generalized to Tree, and the extends operation between Map structures is generalized to the &lt;code&gt;x-extends&lt;/code&gt; operation on Tree structures—particularly, &lt;code&gt;x-extends&lt;/code&gt; adds reverse-deletion semantics.&lt;/p&gt;

&lt;p&gt;XLang is innovative because it creates a new program-structure space in which the computing paradigm proposed by Reversible Computation, &lt;code&gt;Y = F(X) + Delta&lt;/code&gt;, can be implemented with ease. This conceptual innovation departs from the inertia of traditional computer-science thinking, so some classically trained practitioners may experience additional cognitive friction when trying to understand it.&lt;/p&gt;

&lt;p&gt;Previously, I published two articles explaining the design principles of XLang on my WeChat official account: &lt;a href="https://dev.to/canonical/why-is-xlang-an-innovative-programming-language-5fja"&gt;Why is XLang an innovative programming language?&lt;/a&gt; and &lt;a href="https://dev.to/canonical/qa-on-why-xlang-is-an-innovative-programming-language-3998"&gt;Q&amp;amp;A on "Why XLang is an innovative programming language"&lt;/a&gt;. A friend commented on Zhihu:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Having patiently read through your two masterpieces, I must say claiming I completely understood them would be dishonest—but understanding just a little is more confusing than not understanding at all: What is XLang actually for? Is it a super registry-style data structure? How do you realize the grand goals you mention (or that I suppose)? Are functions first-class citizens in your language?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Such confusion is common. Fundamentally, it stems from the fact that the theoretical basis of XLang comes from mathematics and physics; therefore, students trained only in computer science tend to map XLang’s concepts to the familiar notions of CS, often causing psychological discomfort. One cannot easily understand what one has not yet understood, and what one has already accepted is often subconsciously regarded as self-evident. Cognitions that deviate from existing understanding tend to be ignored or resisted. In this article, I will provide more targeted explanations. If you have questions, feel free to discuss in the comments.&lt;/p&gt;

&lt;h2&gt;
  
  
  I. What is XLang for?
&lt;/h2&gt;

&lt;p&gt;XLang’s primary purpose is rapid development and extension of domain-specific languages (DSLs), enabling the so-called Language Oriented Programming paradigm. This paradigm was not invented by me; it has existed in computer science for many years. See, for example, the 1994 paper &lt;a href="https://www.semanticscholar.org/paper/Language-Oriented-Programming-Ward/825a90a7eaebd7082d883b198e1a218295e0ed3b" rel="noopener noreferrer"&gt;[PDF] Language-Oriented Programming | Semantic Scholar&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We typically implement business logic using general-purpose programming languages, while Language Oriented Programming emphasizes DSLs (Domain Specific Languages). When developing business features, one first develops a DSL dedicated to that business domain, then uses this DSL to express the logic. JetBrains, the company behind the IntelliJ IDEA IDE, has a related product: &lt;a href="https://www.jetbrains.com/mps/" rel="noopener noreferrer"&gt;MPS (Meta Programming System)&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Using XLang to develop a new DSL is extremely simple—so simple that you only need to add an XDef metamodel definition file, and you immediately get a new DSL. The Nop platform provides a general IntelliJ IDEA plugin that automatically reads XDef metamodels to implement syntax hints, link navigation, breakpoints, etc., for custom DSLs, with type inference to follow. The Nop platform’s infrastructure automatically generates model class definitions from XDef metamodel files, implements parsers and validators, and automatically generates visual editors.&lt;/p&gt;

&lt;p&gt;DSLs defined with XLang do not need special consideration for extensibility (nor special syntax for it), and they also do not need to worry about how multiple DSLs can be seamlessly integrated for combined use. The Nop platform’s underlying infrastructure implements all of this uniformly. Within DSL files, built-in syntax like &lt;code&gt;x:extends&lt;/code&gt; and &lt;code&gt;x:gen-extends&lt;/code&gt; automatically enable model decomposition/merging and compile-time metaprogramming.&lt;/p&gt;

&lt;p&gt;Extending an existing DSL’s syntax is also very simple: just add an XDef metamodel file that inherits from the existing XDef metamodel file.&lt;/p&gt;

&lt;p&gt;All software products developed using XLang-defined DSLs automatically support the so-called Delta customization mechanism. That is, without modifying any existing source code, you can add Delta files under the Delta directory to modify or delete existing logic, and of course also add new logic.&lt;/p&gt;

&lt;p&gt;These capabilities provided by XLang are innovative in ways no previous programming language has had. They are crucial for the Nop platform to solve coarse-grained, system-level software reuse. In other words, the most challenging customization problems in the ToB market can be essentially improved under the Nop platform’s technical architecture—especially, the architecture of the base product will not be affected by custom development.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A core banking application developed with XLang can, without any modification to the base product’s source code, be customized across the entire stack—from data model to business logic to front-end display—simply by adding Delta files under the Delta directory.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A low-code platform developed with XLang can, without modifying its own code, customize all visual designers’ UI and editing features via the same Delta customization approach, and even customize the model objects being edited.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  II. Is XLang a super registry-style data structure?
&lt;/h2&gt;

&lt;p&gt;Understanding XLang as a registry is like understanding Lisp as a linked list: related, but not the point.&lt;/p&gt;

&lt;p&gt;When using existing programming languages to build abstractions, we typically define discrete extension points, which can be managed by a registry-like structure. This idea is deeply entrenched. For example, Huawei’s TinyEngine low-code engine emphasized in its 2.0 design that “the registry mechanism makes it easy to replace components, APIs, etc., enabling flexible plug-and-play and customization.” See &lt;a href="https://mp.weixin.qq.com/s/oX73EX3ZFpk3i6MupiYKZA" rel="noopener noreferrer"&gt;Introduction to TinyEngine low-code engine 2.0 new features&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For an existing implementation like ABC, if we want to turn it into an extensible abstraction, the most common approach is variable extraction, e.g., &lt;code&gt;A{X:B}C&lt;/code&gt;. Replace B with a variable X, then use a variable-mapping Map (essentially a registry) to assign a concrete value to X. To reduce configuration, we can also specify a default value B and proclaim this as a design principle—convention over configuration. This approach is like digging holes where changes might be needed, and then filling the holes differently depending on requirements.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This can also be explained as adding a layer of indirection: any problem that can’t be solved can be addressed by adding one extra pointer hop; if that still doesn’t solve it, add another layer.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If only a few places might need extension, digging a few holes is easy. But what if we don’t know in advance where changes are needed, and many places might change? If we dig holes everywhere, the original architecture becomes hollow—what meaning does it have left? Digging holes adds cost, affects runtime performance, and increases cognitive complexity. Some pre-dug holes may never be used, and some may even obstruct truly needed extensions. For example, after turning &lt;code&gt;ABC&lt;/code&gt; into &lt;code&gt;{X}{Y}C&lt;/code&gt;, the actual requirement might be neither replacing X nor Y, but part of Y and part of C. What then?&lt;/p&gt;

&lt;p&gt;Each extension point can be viewed as a degree of freedom of the extension space. As extension points increase, the degrees of freedom of the extension space increase. When the degrees of freedom of the extension space grow without bound, can we establish an appropriate abstraction method? Traditional software construction theory answers no. In current theory, we rely on prior prediction to preset extension points, and cannot add or modify extension points post hoc without changing the original system’s code—nor can we remove extension points without code changes.&lt;/p&gt;

&lt;p&gt;XLang’s solution to the problem of unlimited extension freedoms is to borrow a concept from physics: coordinate systems. Essentially, it shifts from a rigid-body mechanics worldview to a field-theoretic worldview. In high school we learned Newtonian physics, a branch of classical mechanics rooted in rigid-body mechanics, which is fully mechanistic: a rigid body’s motion is described by a small set of parameters—center-of-mass coordinates, size, shape, orientation. Internal structure is unobservable and irrelevant. Rigid bodies interact via direct contact, and shapes must match precisely to form a seamless whole (compare the software component black-box model). Even in classical mechanics, slightly more advanced perspectives switch to Lagrangian or Hamiltonian formulations, whose spirit is the field-theoretic worldview. A field is a ubiquitous coordinate system with a physical quantity defined at every point. The field has infinite degrees of freedom, yet through the coordinate system it is definable, measurable, and analyzable; we can precisely measure local changes at each coordinate point. In the same spirit, Reversible Computation’s basic setup is first to establish a sufficiently fine and general domain-description coordinate system in which we can point-and-act and act-and-point (coordinate uniqueness).&lt;/p&gt;

&lt;p&gt;In Reversible Computation theory, a coordinate system assigns a unique coordinate to every value involved in the system.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;value = get(path);
set(path, value);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Formally, implementing a coordinate system looks like a registry. But a coordinate system is an abstract concept with many forms. For example, a file system can be viewed as a coordinate system, where coordinates are file paths; each path corresponds to a file, and each file has a unique path (ignoring links, or considering canonical paths only). Generally, we don’t regard a file system as a registry, let alone a DSL as a registry.&lt;/p&gt;

&lt;p&gt;How is the coordinate system implemented in XLang? The answer is simple: each DSL automatically defines a coordinate system. This may sound subtle, but if you’ve studied the moving frame method in differential geometry, it becomes intuitive. Typically we define motion within a selected coordinate system, but the moving frame method uses the motion’s intrinsic properties to automatically define an intrinsic coordinate system attached to the trajectory—meaning motion happens within a coordinate system and simultaneously induces a coordinate system. Similarly, business logic is expressed using a DSL, and the DSL’s abstract syntax tree (AST) and its node attributes automatically form a coordinate system. Concretely, every attribute on the AST has a unique XPath, e.g., &lt;code&gt;/task/steps[@name=a]/@name&lt;/code&gt; indicates the name attribute of step a. Because any logic must be expressed by a programming language, there can be no case where the coordinate system doesn’t cover it; all business necessarily occurs in the coordinate space defined by this coordinate system.&lt;/p&gt;

&lt;p&gt;Any programming language can be parsed into an AST whose nodes and attributes have unique XPaths. Therefore, any programming language defines an intrinsic coordinate system. The problem is that, at the business level, coordinates in general-purpose languages are unstable. For example, if you add a field at the data-model level, expressing it in a general-purpose language may require editing many places by hand. But if you use a model-driven architecture, a data-model DSL may require modifying only a single place, from which the other changes are inferred automatically. We can say that adding a field induces only a local perturbation in the coordinate system defined by the data model. If you’ve studied Dirac’s delta function, we can formally express it as $ Field*\delta(x-x_0)$.&lt;/p&gt;

&lt;p&gt;DSLs defined by XLang differ from general Tree structures by introducing an additional convention: all list elements must have an attribute that can serve as a unique identifier, e.g., name, id, etc. If the business domain lacks such an attribute, XLang provides a built-in &lt;code&gt;x:id&lt;/code&gt;. With this rule, each Tree node in the DSL gains a stable coordinate that will not drift due to inserting or deleting nodes. This approach is intuitive and natural. In frontend frameworks like React and Vue, the virtual DOM diff algorithm requires list structures to have a key attribute to ensure diff stability.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;DeepSeek’s comment: This constraint aligns with the naming philosophy in computer science—just like DNS decouples IP addresses via domain names, and UUID decouples storage location via unique identifiers, XLang enforces unique identity to separate a tree node’s logical identity from its physical position, enabling a paradigm shift from “fragile positional coupling” to “stable identity abstraction.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  III. How does XLang achieve its ambitious goals?
&lt;/h2&gt;

&lt;p&gt;The overall technical roadmap of Reversible Computation is embodied in the following core formula:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;App = Delta x-extends Generator&amp;lt;DSL&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;XLang’s unique approach is essentially repeated applications of the formula above—continuously decomposing the problem space horizontally and vertically, projecting it into many DSL subspaces, and then using Delta to glue these subspaces back together. If you’ve studied differential manifolds, the intrinsic logic here becomes easy to grasp. For details, see &lt;a href="https://mp.weixin.qq.com/s/6TOVbqHFmiFIqoXxQrRkYg" rel="noopener noreferrer"&gt;How does Nop overcome the limitation that DSLs apply only to specific domains?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For example, XLang provides a standardized technical route for reuse based on dynamic similarity.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Traditional reuse leverages stable sameness and struggles to utilize dynamic similarity.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F73g49ngu1deai2ja419j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F73g49ngu1deai2ja419j.png" alt="delta pipeline" width="799" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;With embedded metaprogramming and code generation, you can establish an inference pipeline between any structures A and C.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Decompose the inference pipeline into multiple steps: A =&amp;gt; B =&amp;gt; C&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Further delta-ize the inference pipeline: A =&amp;gt; _B =&amp;gt; B =&amp;gt; _C =&amp;gt; C&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each stage allows buffering and pass-through of extension information not needed in that step.&lt;br&gt;
Specifically, Nop’s built-in model-driven production line can be decomposed into four primary models:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;XORM: storage-layer domain model&lt;/li&gt;
&lt;li&gt;XMeta: GraphQL interface-layer domain model; can directly generate GraphQL type definitions&lt;/li&gt;
&lt;li&gt;XView: business-layer understanding of frontend logic, using a small set of UI elements (forms, tables, buttons), independent of frontend frameworks&lt;/li&gt;
&lt;li&gt;XPage: page model targeting a specific frontend framework&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When deriving models, we only derive a candidate result (generally stored in model files prefixed with underscores), then choose to extend the candidate model, adding manual fixes and Delta inference relying on additional information (stored in models without underscore prefixes). Every step in the inference chain is optional: you can start from any step directly or discard all information inferred in prior steps entirely. For example, you can create an xview model manually without requiring it to have specific xmeta support; you can even create a page.yaml file directly and write JSON code per the AMIS component spec—the AMIS framework’s capabilities are not constrained by the inference pipeline. Through a deep-decomposition pattern akin to deep learning, we can fully unleash the power of model-driven development, while introducing extra information via Delta when necessary, so the final product’s capabilities aren’t bounded by the expressive power of the models. This frees us from chasing coverage of every detailed requirement during modeling; we focus on the most core, general needs.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;XORM = Generator&amp;lt;ExcelModel&amp;gt; + Delta&lt;/code&gt;&lt;br&gt;
&lt;code&gt;XMeta = Generator&amp;lt;XORM&amp;gt; + Delta&lt;/code&gt;&lt;br&gt;
&lt;code&gt;XView = Generator&amp;lt;XMeta&amp;gt; + Delta&lt;/code&gt;&lt;br&gt;
&lt;code&gt;XPage = Generator&amp;lt;XView&amp;gt; + Delta&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Mapped to the concepts of traditional computer science, XLang offers a form of multi-stage compilation. Traditionally, the rules of compile-time execution are hard-coded into the compiler, and the compilation process is a one-step black box. XLang, by contrast, opens up the compile-time space via compile-time metaprogramming, allowing domain-specific structural construction rules in a Turing-complete compile-time space, and then complements them with the Delta concept to form multi-stage layered inference.&lt;/p&gt;

&lt;p&gt;The Delta concept emphasized by XLang has some counterparts in traditional languages—e.g., GraphQL’s schema definition language supports type deltas via the &lt;code&gt;extend type&lt;/code&gt; syntax. But XLang’s fundamental innovation is that it provides a unified, general Delta definition and Delta operations mechanism, avoiding redundant definitions in every DSL subspace. Combined with the XDef metamodel, this ensures intrinsic consistency across all DSL subspaces and enables seamless gluing.&lt;/p&gt;

&lt;p&gt;Why can only XLang offer unified Delta definition and operations? Because it implements Delta operations at the structural layer rather than at the object layer! On this point, DeepSeek AI generated a fun analogy:&lt;/p&gt;
&lt;h3&gt;
  
  
  Structure-level operations: directly modifying the “design blueprint”
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Traditional approach: Code is like a built house; to change the window you must break walls (change source code) or hang curtains (&lt;a href="https://zhida.zhihu.com/search?content_id=710733231&amp;amp;content_type=Answer&amp;amp;match_order=1&amp;amp;q=AOP%E4%BB%A3%E7%90%86&amp;amp;zhida_source=entity" rel="noopener noreferrer"&gt;AOP proxy&lt;/a&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;XLang approach: Modify the architectural blueprint (XNode tree structure) directly, then rebuild from the blueprint. For example:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Original blueprint: &lt;code&gt;Main gate position = (10,20)&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Delta blueprint: &lt;code&gt;Main gate position = (15,20)&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The system automatically generates a new blueprint without worrying about how the wall is laid.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Technical core: XLang defines Delta at the structure layer (analogous to CAD blueprints), not at the object layer (already built house) where you patch things.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Reversible Computation emphasizes that, before transforming information into business objects, there exists a unified structural expression layer where many common operations can be done directly. There is no need to push processing to the object layer. At the object layer, each object has a different type and thus different handling rules.&lt;br&gt;
Just as the diversity of architectural works rests on unified engineering mechanics, at the structural layer, many things that differ at the business layer are essentially the same, obeying the same structural construction rules and amenable to the same tools and methods.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;DeepSeek AI’s comment: Differential manifold theory uses the framework of “local linearization + global smooth gluing” to convert complex geometric objects into computable structures. Abstracted into XLang, this becomes the engineering paradigm of “DSL subspaces + Delta gluing,” allowing software to retain the simplicity of modular development while achieving global consistency via mathematically rigorous Delta operations.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  IV. Are functions first-class citizens in XLang?
&lt;/h2&gt;

&lt;p&gt;In program spaces, the most basic units are values and functions, and functional programming even claims that everything is a function; all values and their operations (e.g., +, −, ×, ÷) can be simulated by functions. In modern languages, the importance of functions has continually increased and culminates in treating functions as first-class citizens that can participate in various operations and structural constructions without being forced to belong to a class. However, XLang’s conceptual framework differs significantly from existing languages; it doesn’t care about the traditional dichotomy of values and functions. In XLang, only Delta is truly a first-class citizen: A = 0 + A; a full value is a special case of Delta. Whether functions are first-class is secondary.&lt;/p&gt;

&lt;p&gt;If you’ve studied band theory in solid-state physics, this logic is easy to grasp. In solid-state physics, the fundamental building blocks are electrons, ions, and their interactions. Yet the first-class citizen in band theory is neither electrons nor ions, but phonons. Phonons are quantized lattice vibrations—quasiparticles describing collective oscillations of atoms or ions in a crystal. Put simply, a phonon is a collective motion mode that we can treat as an independent individual at the conceptual level, much like a particle. Similarly, Delta is a basic construction unit composed of myriad tiny disturbances whose aggregate is definable and manageable at a macroscopic level. It can be tiny—down to an attribute, a function, or an execution step inside a function; it can be large—across multiple objects as an AOP aspect; it can be even larger—a layered slice across the whole system.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;DeepSeek AI’s explanation: A phonon is a quantized energy packet of lattice vibration; it does not directly correspond to any physical particle, but describes the dynamic pattern of atomic collective motion. Just as Delta in XLang is the basic carrier of system evolution, phonons are not static units of matter but the basic language of internal dynamic interactions. When macroscopic properties (e.g., thermal conduction, electrical conductivity) need describing, physicists do not track each atom’s displacement but use phonon excitation and annihilation to characterize state transitions. Building a theory via dynamic deltas rather than static entities mirrors XLang’s design philosophy in computer science.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A function’s granularity is not the smallest composable granularity in XLang. Structures below functions, once given domain coordinates, also belong to XLang’s structural operations space.&lt;/p&gt;

&lt;p&gt;Because all sufficiently powerful languages are Turing-complete, their concepts can be transformed into one another. For example, Delta can be understood as a function: A = f(0) = 0 + A; any Delta can be seen as a function executed on the identity element! Generators in Reversible Computation also correspond logically to function mappings in mathematics. In this sense, saying functions are first-class citizens in XLang is fine. However, this understanding is purely mathematical; when reflected in concrete language implementations, subtle differences arise.&lt;/p&gt;

&lt;p&gt;First, while functions in programming languages satisfy associativity—combining f and g yields a new function h—composing f and g does not automatically produce a simplified implementation (only the compiler, through optimizations we don’t see, opens function boundaries to simplify the composite). Delta differs: combining Delta1 and Delta2 automatically triggers a merge operation, yielding a simplified Delta3.&lt;/p&gt;

&lt;p&gt;Second, a mathematical function may not correspond to a simple function implemented in a programming language at the concrete level. For example, a Generator may correspond to a complex code-generation tool or a sophisticated metaprogramming plugin.&lt;/p&gt;

&lt;p&gt;Computer science’s understanding of software-construction structure space remains rudimentary. The construction patterns of the physical world are rich and complex, whereas software structure seems to only have functions, values, and simple composition rules. I believe intelligent software development in the AI era must be built upon a new theory of software construction.&lt;/p&gt;
&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Linus Torvalds, king of hackers, said: talk is cheap, show me the code. XLang is not just a theoretical design; it is a key supporting technology of the open-source low-code Nop platform. Any questions about XLang can be answered by reading the implementation.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;gitee: &lt;a href="https://gitee.com/canonical-entropy/nop-entropy" rel="noopener noreferrer"&gt;https://gitee.com/canonical-entropy/nop-entropy&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;gitcode: &lt;a href="https://gitcode.com/canonical-entropy/nop-entropy" rel="noopener noreferrer"&gt;https://gitcode.com/canonical-entropy/nop-entropy&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;github: &lt;a href="https://github.com/entropy-cloud/nop-entropy" rel="noopener noreferrer"&gt;https://github.com/entropy-cloud/nop-entropy&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Documentation: &lt;a href="https://nop-platform.github.io/projects/nop-entropy/docs-en/dev-guide/xlang/" rel="noopener noreferrer"&gt;https://nop-platform.github.io/projects/nop-entropy/docs-en/dev-guide/xlang/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks to &lt;a href="https://www.ploc.org.cn/ploc/CNPL-2024-CHS.pdf" rel="noopener noreferrer"&gt;“Blue Book of Domestic Programming Languages 2024”&lt;/a&gt; for including XLang.&lt;/p&gt;
&lt;h2&gt;
  
  
  Appendix
&lt;/h2&gt;

&lt;p&gt;Below are DeepSeek AI-generated explanations of related mathematical and physical concepts.&lt;/p&gt;
&lt;h3&gt;
  
  
  A. What is the Moving Frame Method?
&lt;/h3&gt;

&lt;p&gt;The Moving Frame Method (also called the moving frame) is a powerful tool in differential geometry for studying the geometric properties of curves, surfaces, and higher-dimensional manifolds. Its core idea is to dynamically construct coordinate systems from the local characteristics of the geometric object itself, thus freeing us from reliance on a fixed global coordinate system. French mathematician Élie Cartan systematized this method in the early 20th century. It is widely used in geometry, physics, and engineering.&lt;/p&gt;


&lt;h4&gt;
  
  
  1. Core idea
&lt;/h4&gt;

&lt;p&gt;Traditional geometric analysis typically relies on fixed global coordinate systems (e.g., Cartesian), while the moving frame adheres to the geometric object, dynamically adjusting as the object moves or deforms. Such a coordinate system is called a moving frame, with characteristics including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Intrinsic: the frame is defined directly from the object’s local differential properties (e.g., tangent, normal, curvature).&lt;/li&gt;
&lt;li&gt;Dynamic: the frame automatically updates as the object extends or deforms.&lt;/li&gt;
&lt;li&gt;Adaptive: the frame’s dimension matches that of the object (e.g., 1D frame for curves, 2D for surfaces).&lt;/li&gt;
&lt;/ul&gt;


&lt;h4&gt;
  
  
  2. Key steps (taking a space curve as an example)
&lt;/h4&gt;

&lt;p&gt;For a smooth curve in three-dimensional space, the classic process is:&lt;/p&gt;
&lt;h5&gt;
  
  
  (1) Frame construction
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;Tangent vector (T): the unit vector along the curve’s tangent, given by normalized parameter derivative:
$\mathbf{T}(s) = \frac{d\mathbf{r}}{ds}$ (s is arc-length).&lt;/li&gt;
&lt;li&gt;Normal vector (N): the unit vector pointing toward the curve’s bending direction, given by normalized derivative of T:
$\mathbf{N}(s) = \frac{d\mathbf{T}/ds}{|d\mathbf{T}/ds|}$.&lt;/li&gt;
&lt;li&gt;Binormal (B): a unit vector orthogonal to T and N, defined by the cross product:
$\mathbf{B}(s) = \mathbf{T} \times \mathbf{N}$.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These three vectors form the Frenet frame ${ \mathbf{T}, \mathbf{N}, \mathbf{B} }$ at every point along the curve, fully determined by the curve’s own geometry.&lt;/p&gt;
&lt;h5&gt;
  
  
  (2) Structural equations (Frenet–Serret formulas)
&lt;/h5&gt;

&lt;p&gt;The frame’s differential change is characterized by curvature ($\kappa$) and torsion ($\tau$):&lt;/p&gt;

&lt;p&gt;$$&lt;br&gt;
\begin{cases}&lt;br&gt;
\frac{d\mathbf{T}}{ds} = \kappa \mathbf{N} \&lt;br&gt;
\frac{d\mathbf{N}}{ds} = -\kappa \mathbf{T} + \tau \mathbf{B} \&lt;br&gt;
\frac{d\mathbf{B}}{ds} = -\tau \mathbf{N}&lt;br&gt;
\end{cases}&lt;br&gt;
$$&lt;/p&gt;

&lt;p&gt;These equations show that the curve’s geometry is completely encoded by local changes of the frame (curvature and torsion), without depending on any external coordinate system.&lt;/p&gt;


&lt;h4&gt;
  
  
  3. Comparison with fixed coordinate systems
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Characteristic&lt;/th&gt;
&lt;th&gt;Fixed coordinate system&lt;/th&gt;
&lt;th&gt;Moving frame method&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Dependency&lt;/td&gt;
&lt;td&gt;Depends on external frame&lt;/td&gt;
&lt;td&gt;Defined entirely by the object’s intrinsic properties&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Adaptivity&lt;/td&gt;
&lt;td&gt;Does not change with the object&lt;/td&gt;
&lt;td&gt;Dynamically attached; updates with deformation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Information density&lt;/td&gt;
&lt;td&gt;Requires global coordinate parametrization&lt;/td&gt;
&lt;td&gt;Only needs local invariants (e.g., curvature, torsion)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Application&lt;/td&gt;
&lt;td&gt;Simple geometric analysis&lt;/td&gt;
&lt;td&gt;Complex manifolds, fiber bundles, gauge theory&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;


&lt;h4&gt;
  
  
  4. Extensions and deeper significance
&lt;/h4&gt;

&lt;p&gt;The moving frame applies not only to curves but also to surfaces and high-dimensional manifolds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Surface frames: use tangent plane basis vectors ($\mathbf{e}_1, \mathbf{e}_2$) and normal vector ($\mathbf{n}$), described via the first and second fundamental forms.&lt;/li&gt;
&lt;li&gt;Cartan connection: in fiber-bundle theory, moving frames combine with connections to describe rules for parallel transport of vector fields along a manifold.&lt;/li&gt;
&lt;li&gt;Gauge theories: physical gauge field theories (e.g., general relativity, Yang–Mills) extend the moving frame idea to higher-dimensional spaces.&lt;/li&gt;
&lt;/ul&gt;


&lt;h4&gt;
  
  
  5. Applications
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Computer graphics: surface deformation, animation skeleton binding (e.g., skinning).&lt;/li&gt;
&lt;li&gt;Robot kinematics: dynamic adjustment of local coordinate systems in manipulator trajectory planning.&lt;/li&gt;
&lt;li&gt;General relativity: local descriptions of spacetime curvature (frame-dragging effects).&lt;/li&gt;
&lt;li&gt;Materials science: local strain analysis in crystal dislocations and continuum mechanics.&lt;/li&gt;
&lt;/ol&gt;


&lt;h4&gt;
  
  
  6. Philosophical insight
&lt;/h4&gt;

&lt;p&gt;The essence of the moving frame method is to replace externally imposed coordinate systems with coordinate systems defined by the object’s intrinsic properties. This resonates with “background independence” in modern physics (e.g., general relativity) and with the design philosophy of DSLs in computer science—defining the descriptive framework via the object’s own structure rather than external abstraction. It builds a profound bridge between mathematics and engineering.&lt;/p&gt;
&lt;h3&gt;
  
  
  B. What is differential manifold theory?
&lt;/h3&gt;

&lt;p&gt;Differential manifold theory studies how “spaces that look flat locally but may be curved globally” can be decomposed, measured, and computed. (For example: the Earth’s surface is a sphere globally, but each city map looks flat.)&lt;/p&gt;



&lt;p&gt;Core ideas explained step by step&lt;/p&gt;
&lt;h4&gt;
  
  
  1. What is a manifold?
&lt;/h4&gt;

&lt;p&gt;Imagine studying a “weird-shaped object,” e.g.:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The surface of a balloon (2-sphere)&lt;/li&gt;
&lt;li&gt;The surface of a donut (torus)&lt;/li&gt;
&lt;li&gt;A crumpled sheet of paper&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A manifold is defined as: such objects look locally like a flat plane (or Euclidean space), but globally may be curved or knotted.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
Standing on Earth, the ground underfoot feels flat (locally planar), but the entire Earth is spherical (globally curved).&lt;/p&gt;


&lt;h4&gt;
  
  
  2. How to describe a manifold—using an “atlas”
&lt;/h4&gt;

&lt;p&gt;Suppose you want to map the entire Earth. One sheet cannot cover the whole sphere, so you:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Draw multiple local maps: Beijing, Shanghai, New York… Each map covers only a small region.&lt;/li&gt;
&lt;li&gt;Mark overlaps: the edges of Beijing and Shanghai maps overlap (e.g., Hebei Province).&lt;/li&gt;
&lt;li&gt;Define transformation rules: in the overlap, how Beijing’s “Tianjin” coordinates convert to Shanghai’s coordinates.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is the core method of manifolds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each local map = coordinate chart (describes a small portion of the manifold)&lt;/li&gt;
&lt;li&gt;All maps together = atlas (covers the entire manifold)&lt;/li&gt;
&lt;li&gt;Conversion rules = transition functions (ensuring seamless stitching between maps)&lt;/li&gt;
&lt;/ul&gt;


&lt;h4&gt;
  
  
  3. Why “smooth”—the differential structure
&lt;/h4&gt;

&lt;p&gt;Manifolds should be “map-stitchable,” but we also need to do calculus on them (e.g., compute velocity, acceleration). For that we require:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Smooth transition functions: adjacent chart conversions must be smoothly varying—no abrupt jumps or kinks.
(e.g., coordinate conversions between Beijing and Shanghai maps in overlapping regions must be continuous and differentiable)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Real-world analogy:&lt;br&gt;
When tiling a mosaic, not only must tile edges align, but color gradients must transition naturally—this is the smoothness requirement.&lt;/p&gt;


&lt;h4&gt;
  
  
  4. “Direction” and “change” on a manifold—tangent space
&lt;/h4&gt;

&lt;p&gt;On a plane, direction can be represented by arrows (east, north). On a curved manifold, how do we define direction?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tangent space: at every point on the manifold, define a “virtual flat plane” to represent directions at that point.
(e.g., standing at a point on Earth, the tangent space is the “imaginary flat plane” under your feet)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Practical meaning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Calculate a car’s driving direction on Earth’s surface → use arrows in the tangent space.&lt;/li&gt;
&lt;li&gt;Compute a satellite’s trajectory → use the tangent space of a four-dimensional spacetime manifold.&lt;/li&gt;
&lt;/ul&gt;


&lt;h4&gt;
  
  
  5. Why is manifold theory important?
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The physical world is inherently curved:&lt;br&gt;
In Einstein’s general relativity, spacetime is a four-dimensional manifold, and gravity is the manifestation of spacetime curvature.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Complex systems in engineering:&lt;br&gt;
Robot joint motion ranges, social-network connectivity, software modular architectures—all can be abstracted as manifolds.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h4&gt;
  
  
  Differential manifolds vs. software engineering (XLang’s DSL + Delta)
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Manifold&lt;/th&gt;
&lt;th&gt;Software system&lt;/th&gt;
&lt;th&gt;Correspondence&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Local maps (charts)&lt;/td&gt;
&lt;td&gt;Modular code (DSL subspaces)&lt;/td&gt;
&lt;td&gt;Local simplification; hides complexity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Transition functions&lt;/td&gt;
&lt;td&gt;Inter-module adaptation (Delta)&lt;/td&gt;
&lt;td&gt;Ensures cooperation between modules&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Smoothness requirement&lt;/td&gt;
&lt;td&gt;Interface compatibility; conflict-free changes&lt;/td&gt;
&lt;td&gt;Changes must transition smoothly; avoid system breakage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tangent-space direction&lt;/td&gt;
&lt;td&gt;Local impact analysis of code changes&lt;/td&gt;
&lt;td&gt;Predict how one change affects other modules&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;


&lt;h4&gt;
  
  
  Real-world analogy: a city traffic system
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Manifold = entire city’s road network
(Globally complex, but each intersection’s surroundings can be mapped on a plane)&lt;/li&gt;
&lt;li&gt;Chart = each neighborhood’s map&lt;/li&gt;
&lt;li&gt;Transition function = connection rules at neighborhood boundaries&lt;/li&gt;
&lt;li&gt;Smoothness = gentle slopes; vehicles can drive smoothly&lt;/li&gt;
&lt;li&gt;Tangent space = direction signs at a particular intersection&lt;/li&gt;
&lt;/ul&gt;


&lt;h4&gt;
  
  
  Summary
&lt;/h4&gt;

&lt;p&gt;Differential manifold theory teaches us:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Divide and conquer: break complex spaces into many simple locals (as with modular code).&lt;/li&gt;
&lt;li&gt;Define rules: specify how locals connect (like inter-module interface agreements).&lt;/li&gt;
&lt;li&gt;Maintain smoothness: ensure global changes are coherent (like upgrades that don’t break existing functionality).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This thinking guides the construction of flexible, maintainable complex systems—in both the physical and digital worlds.&lt;/p&gt;
&lt;h3&gt;
  
  
  C. What is a phonon?
&lt;/h3&gt;

&lt;p&gt;A phonon is a key concept in condensed matter physics—a quasiparticle describing the quantization of lattice vibration energy in a crystal. We can understand it on several levels:&lt;/p&gt;
&lt;h4&gt;
  
  
  I. Physical essence
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Quantization of collective vibration&lt;br&gt;
When atoms/ions in a crystal perform collective oscillations near equilibrium positions (like masses connected by springs), these vibrations are discretized into energy packets under quantum mechanics; each packet is a phonon.&lt;br&gt;
Mathematical description: via canonical coordinate transformations, the 3N-dimensional vibrations of N atoms are simplified to 3N independent harmonic oscillators, and each oscillator’s energy quantum is a phonon.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Quasiparticle properties&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Not a real particle—an abstract of collective motion&lt;/li&gt;
&lt;li&gt;Carries specific energy and momentum: $E = \hbar\omega$ ($\omega$ is the vibrational frequency)&lt;/li&gt;
&lt;li&gt;Obeys Bose–Einstein statistics; can be excited and annihilated&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  II. Core characteristics
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Characteristic&lt;/th&gt;
&lt;th&gt;Manifestation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Nonlocality&lt;/td&gt;
&lt;td&gt;Describes cooperative vibrations across the lattice; cannot be localized to a single atom&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Quantized propagation&lt;/td&gt;
&lt;td&gt;Vibrational energy propagates in discrete quantities (phonon number)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mode diversity&lt;/td&gt;
&lt;td&gt;Includes multiple modes, e.g., longitudinal (acoustic branch) and transverse (optical branch)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Interactions&lt;/td&gt;
&lt;td&gt;Phonon–phonon scattering affects heat conduction; phonon–electron interactions lead to phenomena such as superconductivity&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h4&gt;
  
  
  III. Analogy with XLang’s Delta
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;graph LR
    A[Crystal system] --&amp;gt; B[Phonon]
    C[Software system] --&amp;gt; D[Delta]

    B --&amp;gt; E[Describes dynamic vibration]
    D --&amp;gt; E
    B --&amp;gt; F[Non-entity primitive]
    D --&amp;gt; F
    B --&amp;gt; G[Explains macro behavior via composition]
    D --&amp;gt; G
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Dynamics first
Just as physicists describe thermal conduction using phonons rather than individual atomic displacements, XLang uses Delta (Δ) rather than complete states to describe system evolution. For example:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;   &lt;span class="c1"&gt;# Traditional way
&lt;/span&gt;   &lt;span class="n"&gt;system&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;temperature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="n"&gt;K&lt;/span&gt;  &lt;span class="c1"&gt;# directly set the absolute value
&lt;/span&gt;
   &lt;span class="c1"&gt;# Delta way
&lt;/span&gt;   &lt;span class="n"&gt;system&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;Δ_temperature&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="n"&gt;K&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# record the change process
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Principle of compositionality&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Phonons: the superposition of different vibrational modes forms actual lattice dynamics&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Delta: the combination of multiple incremental modifications constitutes the final system state&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt; &lt;span class="c1"&gt;// Phonon composition example&lt;/span&gt;
 &lt;span class="nx"&gt;thermal_conductivity&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;phonon_mode1&lt;/span&gt; &lt;span class="err"&gt;⊕&lt;/span&gt; &lt;span class="nx"&gt;phonon_mode2&lt;/span&gt;

 &lt;span class="c1"&gt;// Delta composition example&lt;/span&gt;
 &lt;span class="nx"&gt;final_system&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;base_system&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;Δ_security&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;Δ_logging&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  IV. Practical application domains
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Materials science&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Explain heat conduction: phonon mean free path determines thermal conductivity&lt;/li&gt;
&lt;li&gt;Predict phase transitions: softening of the phonon spectrum indicates structural instability&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Condensed matter theory&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Superconductivity mechanism: electron–phonon coupling forms Cooper pairs (BCS theory)&lt;/li&gt;
&lt;li&gt;Topological states: theoretical studies of the phonon Hall effect&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Engineering&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Thermoelectric materials: phonon engineering to reduce lattice thermal conductivity&lt;/li&gt;
&lt;li&gt;Quantum computing: phonons as quantum information carriers (e.g., ion-trap systems)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This method of simplifying complex systems into basic excitations (phonon/Delta) reflects a shift in human cognition—from static entities to dynamic relations. Just as phonons revolutionized our understanding of solids, the Delta concept is reshaping the construction philosophy of software engineering.&lt;/p&gt;

</description>
      <category>nop</category>
      <category>architecture</category>
      <category>programming</category>
      <category>lowcode</category>
    </item>
    <item>
      <title>Q&amp;A on "Why XLang Is an Innovative Programming Language"</title>
      <dc:creator>canonical</dc:creator>
      <pubDate>Mon, 12 Jan 2026 15:20:56 +0000</pubDate>
      <link>https://dev.to/canonical/qa-on-why-xlang-is-an-innovative-programming-language-3998</link>
      <guid>https://dev.to/canonical/qa-on-why-xlang-is-an-innovative-programming-language-3998</guid>
      <description>&lt;p&gt;In my previous article &lt;a href="https://dev.to/canonical/why-is-xlang-an-innovative-programming-language-5fja"&gt;Why XLang Is an Innovative Programming Language&lt;/a&gt;, I introduced the design philosophy of XLang and explained that XLang is innovative because it creates a new program structure space where it is convenient to implement the computation paradigm proposed by Reversible Computation theory: &lt;code&gt;Y = F(X) + Delta&lt;/code&gt;. This article provides further explanations addressing feedback and questions.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. How can Delta computation be compressed to compile-time execution based on XLang?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;To implement property inheritance, UIOTOS made a lot of special designs and introduced a significant amount of code related to property inheritance in its runtime engine. However, based on the XLang language, Delta computation can be completely compressed to compile-time; the runtime engine only needs to understand ordinary component structures and does not need any knowledge of Delta decomposition or merging.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqz05zrqfti8wqrp4m2qo.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqz05zrqfti8wqrp4m2qo.webp" alt="uiotos" width="799" height="548"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;UIOTOS is a no-code platform for the IoT domain. It introduces a container component that can embed an existing page and then use a property mechanism to override properties of objects within the page. This achieves flexible customization of the page content without reimplementing the page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;type:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"container"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;baseUrl:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"a.page.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;overrideProps:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"form/title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"sss"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"actions/0/label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"vvv"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The general approach is as shown above: essentially, the page object is brought in via baseUrl, and then multiple inherited properties are used to override content within the page object. With a syntax similar to JsonPath, you can modify any nested content within the page object, so it differs from conventional component frameworks where you call a component and pass parameters to it.&lt;/p&gt;

&lt;p&gt;UIOTOS writes considerable code in the frontend runtime framework specifically for property inheritance and needs to introduce a special container control. A limitation of the UIOTOS approach is that it can only override property values in existing pages and cannot change the structure of the inherited page. Another low-code platform uses a similar approach without introducing a special container component; it allows Delta customization for any component. Concretely, it introduces a special overwrite property within the component.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"component"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"MyComponent"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"properties"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"a"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;component&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;property&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;directly&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"overwrite"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Here we record the visual editor’s edit actions on the component"&lt;/span&gt;&lt;span class="w"&gt;
 &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The basic operation pattern is: after dragging a component in the editor, if some details need adjustment, you can enter a component customization mode to fine-tune the component in the visual designer. The adjustment steps are automatically recorded as overwrite and saved in the page file. This approach can arbitrarily adjust component structure and is more adaptable than UIOTOS’s approach. However, recording operation actions is verbose, and multiple actions are hard to compress into a concise final result (i.e., it does not leverage the associative law for simplification).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;According to Reversible Computation theory, A = 0 + A; full content is a special case of Delta. We can define full content and Delta in a unified form, so the Delta of a Delta is also just another normal Delta, enabling more complex logical reasoning. Using action-based overwrite to represent a Delta is not suitable.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Regardless of which approach is used above, the editor and frontend runtime framework both need to incorporate handling code related to the Delta concept. However, if XLang is used as the underlying model expression language, Delta computation can be completely compressed to compile-time; the runtime engine only needs to understand ordinary component structures with no knowledge of Delta decomposition or merging. The specific method uses &lt;code&gt;x:extends&lt;/code&gt; for component inheritance.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;component&lt;/span&gt; &lt;span class="na"&gt;x:schema=&lt;/span&gt;&lt;span class="s"&gt;"component.xdef"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;import&lt;/span&gt; &lt;span class="na"&gt;from=&lt;/span&gt;&lt;span class="s"&gt;"comp:MyComponent/1.0.0"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;component&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"MyComponentEx"&lt;/span&gt; &lt;span class="na"&gt;x:extends=&lt;/span&gt;&lt;span class="s"&gt;"comp:MyComponent/1.0.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;props&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;prop&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"a"&lt;/span&gt; &lt;span class="na"&gt;x:override=&lt;/span&gt;&lt;span class="s"&gt;"remove"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;prop&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"b"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/props&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;template&lt;/span&gt; &lt;span class="na"&gt;x:override=&lt;/span&gt;&lt;span class="s"&gt;"merge"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      Only show the Delta-corrected portion here

      &lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;x:extends=&lt;/span&gt;&lt;span class="s"&gt;"a.form.xml"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;actions&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;action&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"ss"&lt;/span&gt; &lt;span class="na"&gt;x:id=&lt;/span&gt;&lt;span class="s"&gt;"ss"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/actions&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/component&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;template&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;MyComponent/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;MyComponentEx/&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/component&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If no customization is needed, you can import the component directly. If customization is needed, enable local component definitions and use &lt;code&gt;x:extends&lt;/code&gt; to inherit existing components. XLang defines a Delta merge algorithm between Tree structures. Through the unified DslNodeLoader, the algorithm is automatically executed when loading model files. Pseudocode is as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;loadDeltaModel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="nx"&gt;rootNode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;VirtualFileSystem&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loadXml&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nx"&gt;each&lt;/span&gt; &lt;span class="nx"&gt;node&lt;/span&gt; &lt;span class="kd"&gt;with&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;attribute&lt;/span&gt;  &lt;span class="c1"&gt;// Recursively traverse rootNode and its children&lt;/span&gt;
        &lt;span class="nx"&gt;baseNode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;loadDeltaNode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;removeAttr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;x:extends&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
        &lt;span class="nx"&gt;genNodes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;processGenExtends&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nx"&gt;each&lt;/span&gt; &lt;span class="nx"&gt;genNode&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nx"&gt;genNodes&lt;/span&gt;
            &lt;span class="nx"&gt;baseNode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;DeltaMerger&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;merge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;baseNode&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;genNode&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nx"&gt;node&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;DeltaMerger&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;merge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;baseNode&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nf"&gt;processPostExtends&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;DslNodeLoader.loadDeltaModel("comp:MyComponent/1.0.0")&lt;/code&gt; returns an XNode representing the final merged node, which no longer contains any attributes or child nodes in the x namespace.&lt;/p&gt;

&lt;p&gt;Loader can be regarded as a kind of just-in-time compiler; the structural transformation performed while loading model files can be considered part of the compilation process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Delta operations defined at the structural layer rather than the object layer
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Wittgenstein said that the limits of my language mean the limits of my world. Reversible Computation theory further interprets this as: a programming language defines a software structural space, and various reuse mechanisms that produce new structures from existing ones are transformation rules within this structural space.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A truly practical DSL must consider extensibility and needs to embed decomposition, merging, and reuse mechanisms. However, most DSL designers habitually introduce these structural operations at the semantic object layer, which results in ad hoc designs lacking generality and internal consistency.&lt;/p&gt;

&lt;p&gt;XLang offers a standardized approach that once and for all solves extensibility for all DSLs. A DSL engine only needs to consider minimal runtime concerns. XLang operates entirely at compile time (model parsing and loading); there is no XLang-specific content at runtime. The key is that XLang performs Delta merging at the structural layer beneath objects—the XNode layer—akin to S-expressions in Lisp, which themselves have no semantics. Detaching from semantics is precisely what gives Delta merging its generality.&lt;/p&gt;

&lt;p&gt;For example, Spring’s &lt;code&gt;beans.xml&lt;/code&gt; can be regarded as a DSL in the component assembly domain. Spring 1.0 introduced the parent attribute to implement a kind of inheritance, and the import syntax for complex file decomposition and reuse. Spring 2.0 introduced custom elements to simplify configuration of complex structured beans. Spring Boot introduced the @ConditionalOnProperty annotation, allowing bean activation to be controlled via configuration switches. To implement these features, Spring’s core had to include specific handling code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;beans&lt;/span&gt; &lt;span class="na"&gt;xmlns=&lt;/span&gt;&lt;span class="s"&gt;"http://www.springframework.org/schema/beans"&lt;/span&gt;
       &lt;span class="na"&gt;xmlns:xsi=&lt;/span&gt;&lt;span class="s"&gt;"http://www.w3.org/2001/XMLSchema-instance"&lt;/span&gt;
       &lt;span class="na"&gt;xmlns:myns=&lt;/span&gt;&lt;span class="s"&gt;"http://www.example.com/schema/myns"&lt;/span&gt;
       &lt;span class="na"&gt;xsi:schemaLocation=&lt;/span&gt;&lt;span class="s"&gt;"http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans.xsd
           http://www.example.com/schema/myns
           http://www.example.com/schema/myns/myns.xsd"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;import&lt;/span&gt; &lt;span class="na"&gt;resource=&lt;/span&gt;&lt;span class="s"&gt;"classpath:config/services.beans.xml"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

    &lt;span class="c"&gt;&amp;lt;!-- Parent Bean --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;bean&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"parentBean"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"com.example.ParentClass"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;property&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"commonProperty"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"commonValue"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/bean&amp;gt;&lt;/span&gt;

    &lt;span class="c"&gt;&amp;lt;!-- Child Bean inheriting from the parent --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;bean&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"childBean"&lt;/span&gt; &lt;span class="na"&gt;parent=&lt;/span&gt;&lt;span class="s"&gt;"parentBean"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;property&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"extProp"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"extValue"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/bean&amp;gt;&lt;/span&gt;

     &lt;span class="c"&gt;&amp;lt;!-- Configure a Bean using a custom namespace --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;myns:customBean&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"customBean"&lt;/span&gt; &lt;span class="na"&gt;customProperty=&lt;/span&gt;&lt;span class="s"&gt;"customValue"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/beans&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@Component&lt;/span&gt;
&lt;span class="nd"&gt;@ConditionalOnProperty&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"mycomponent.enabled"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;havingValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;matchIfMissing&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MyComponent&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nf"&gt;MyComponent&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"MyComponent is initialized!"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;doSomething&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"MyComponent is doing something!"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With XLang, none of these features need to be implemented within the framework itself.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;beans&lt;/span&gt; &lt;span class="na"&gt;x:extends=&lt;/span&gt;&lt;span class="s"&gt;"config/base.beans.ml"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;x:gen-extends&amp;gt;&lt;/span&gt;
     &lt;span class="nt"&gt;&amp;lt;c:include&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"config/services.beans.xml"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

     &lt;span class="nt"&gt;&amp;lt;beans&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;myns:customBean&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"customBean"&lt;/span&gt; &lt;span class="na"&gt;customProperty=&lt;/span&gt;&lt;span class="s"&gt;"customValue"&lt;/span&gt;
                      &lt;span class="na"&gt;xpl:lib=&lt;/span&gt;&lt;span class="s"&gt;"/example/myns.xlib"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
     &lt;span class="nt"&gt;&amp;lt;/beans&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;/x:gen-extends&amp;gt;&lt;/span&gt;

   &lt;span class="nt"&gt;&amp;lt;bean&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"parentBean"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"com.example.ParentClass"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;property&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"commonProperty"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"commonValue"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;/bean&amp;gt;&lt;/span&gt;

   &lt;span class="nt"&gt;&amp;lt;bean&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"childBean"&lt;/span&gt; &lt;span class="na"&gt;x:prototype=&lt;/span&gt;&lt;span class="s"&gt;"parentBean"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;property&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"extProp"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"extValue"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;/bean&amp;gt;&lt;/span&gt;

   &lt;span class="nt"&gt;&amp;lt;bean&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"myComponent"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"com.example.MyComponent"&lt;/span&gt;
         &lt;span class="na"&gt;feature:on=&lt;/span&gt;&lt;span class="s"&gt;"mycomponent.enabled"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
       &lt;span class="nt"&gt;&amp;lt;property&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"propA"&lt;/span&gt; &lt;span class="na"&gt;ref=&lt;/span&gt;&lt;span class="s"&gt;"xxx"&lt;/span&gt; &lt;span class="na"&gt;feature:on=&lt;/span&gt;&lt;span class="s"&gt;"mycomponent.xxx.enabled"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;/bean&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/beans&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;First, notice that without any additional extensibility mechanisms, bean definitions in Spring 1.0 already constitute a complete component assembly model. That is, any bean that can be assembled via &lt;code&gt;get/set&lt;/code&gt; methods and constructors can be declaratively defined using the &lt;code&gt;beans.xml&lt;/code&gt; DSL. Mathematically, we can say Spring 1.0 defines a complete set of assembly operations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;XLang’s approach is to introduce a set of Delta operations atop the existing DSL, but the result of these Delta operations is to reduce &lt;code&gt;DSL + Delta&lt;/code&gt; back to the original DSL structure. Interestingly, the custom namespace approach introduced in Spring 2.0 cannot be reduced back to the 1.0 syntax. In other words, beans configured with Spring 2.0 syntax are not guaranteed to be configurable using Spring 1.0 syntax, even though Spring 1.0 provides a complete operation set. Spring 2.0’s custom namespaces, such as &lt;code&gt;&amp;lt;myns:customBean&amp;gt;&lt;/code&gt;, trigger a NamespaceHandler in Java whose execution logic can be arbitrarily complex and may implicitly introduce order dependencies (declaration order could affect assembly results), thereby undermining Spring 1.0’s POJO declarative assembly design.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;x:extends&lt;/code&gt; can inherit existing DSL files, similar in function to Spring 1.0’s import syntax.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;x:gen-extends&lt;/code&gt; executes the Xpl template language to dynamically generate bean definitions. The Xpl built-in &lt;code&gt;c:include&lt;/code&gt; can include external XNode nodes, again replacing Spring 1.0’s import syntax.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Xpl custom tag capability used within &lt;code&gt;x:gen-extends&lt;/code&gt; can emulate Spring 2.0’s custom namespace mechanism. However, Xpl tags perform code generation: no matter how complex the tag function’s logic is, as long as it produces the desired bean configuration definitions, that is sufficient. For example, the &lt;code&gt;&amp;lt;myns:customBean&amp;gt;&lt;/code&gt; above might actually generate multiple bean definitions. What matters at runtime is the generated result of the tag function. &lt;code&gt;x:gen-extends&lt;/code&gt; itself executes at compile time.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt; &lt;span class="nt"&gt;&amp;lt;myns:customBean&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"customBean"&lt;/span&gt; &lt;span class="na"&gt;customProperty=&lt;/span&gt;&lt;span class="s"&gt;"customValue"&lt;/span&gt;
                      &lt;span class="na"&gt;xpl:lib=&lt;/span&gt;&lt;span class="s"&gt;"/example/myns.xlib"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

Actually expands into the following two bean definitions:

&lt;span class="nt"&gt;&amp;lt;bean&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"customBean"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"com.example.CustomBean"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;property&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"customProperty"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"customValue"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;property&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"otherProperty"&lt;/span&gt; &lt;span class="na"&gt;ref=&lt;/span&gt;&lt;span class="s"&gt;"otherBean"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/bean&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;bean&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"otherBean"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"com.example.OtherBean"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In XLang, sibling nodes at the same level can specify inheritance via the &lt;code&gt;x:prototype&lt;/code&gt; attribute. This replaces the parent attribute’s role in Spring 1.0 syntax. Meanwhile, when nodes are merged in XLang, &lt;code&gt;x:override&lt;/code&gt; can precisely control the merging logic: whether to overwrite, merge, or delete, etc. Importantly, XLang’s mechanism applies to any node—e.g., you can also specify &lt;code&gt;x:prototype&lt;/code&gt; on a property to inherit another property’s configuration. In contrast, Spring’s parent attribute can only be used for bean definition inheritance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In XLang, every node can use feature switches like &lt;code&gt;feature:on&lt;/code&gt; and &lt;code&gt;feature:off&lt;/code&gt; to control conditional loading. When a feature switch does not match, the corresponding node is automatically removed and never enters runtime. This replaces Spring Boot’s conditional beans. Likewise, feature switches can be used on any node; for example, you can control whether to configure a particular &lt;code&gt;&amp;lt;property&amp;gt;&lt;/code&gt;. In Spring Boot, conditional switches only control bean creation; there is no declarative mechanism for conditionally configuring a property.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In summary, the Spring framework embeds many mechanisms to enhance extensibility, each specifically written for the component assembly domain and for the Spring framework itself. If you migrate to another runtime engine, these mechanisms all need to be re-implemented. For example, the Quarkus framework also supports bean assembly definitions and has to implement all these extensions on its own. Even after Spring implements them, frameworks like Hibernate cannot leverage these mechanisms for their own extensions.&lt;/p&gt;

&lt;p&gt;The key for XLang is that, after parsing XML or JSON into XNodes, it performs Delta operations at the XNode layer, rather than converting XNodes into strongly-typed BeanDefinitions and then doing Delta operations. Therefore, these capabilities can automatically apply to other DSLs, such as MyBatis mapper files, Hibernate hbm files, and more.&lt;/p&gt;

&lt;p&gt;Similar extensibility issues exist in many domains. For instance, Facebook’s GraphQL protocol introduced type extension syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="k"&gt;type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;User&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;ID&lt;/span&gt;&lt;span class="p"&gt;!&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;!&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;!&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="k"&gt;extend&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;User&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;Int&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="n"&gt;deprecated&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;"&lt;/span&gt;&lt;span class="n"&gt;Use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;contactEmail&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;instead&lt;/span&gt;&lt;span class="err"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;contactEmail&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;!&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the &lt;code&gt;graphql-java&lt;/code&gt; implementation, GraphQL definitions are first parsed into TypeDefinition and TypeExtensionDefinition, and type merging is implemented at the object layer.&lt;/p&gt;

&lt;p&gt;Within XLang’s technology stack, the NopGraphQL framework defines types using the XMeta metadata model, so it can directly use XLang’s built-in Delta mechanisms at the XNode layer to implement extensions, without designing a separate TypeExtension syntax. At runtime in NopGraphQL, there is no need to understand any type extension concept. For the runtime framework, a type is just a type—there is no “type + type extension”.&lt;/p&gt;

&lt;h3&gt;
  
  
  Loader as Generator
&lt;/h3&gt;

&lt;p&gt;Within XLang’s technology stack, the Loader abstraction has a special status. Since all content related to Reversible Computation is, in principle, implemented within the Loader abstraction, integrating XLang into third-party frameworks is very simple: directly replace the DSL’s Loader with XLang’s Delta Loader.&lt;/p&gt;

&lt;p&gt;A generic model loader can be seen as having the following type definition:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Loader :: Path -&amp;gt; Model
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a general design, we must recognize that coding is not only for current needs; it must also consider future changes and the system’s evolution across space and time. In other words, programming does not target a single, current world but all possible worlds. Formally, we can introduce a Possible operator to describe this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Loader :: Possible Path -&amp;gt; Possible Model
Possible Path = deltaPath + stdPath
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;stdPath refers to the standard path corresponding to the model file, while deltaPath refers to the path used for Delta customization of an existing model file. For example, in a base product we have a built-in business workflow main.wf.xml. When customizing for Customer A, we need a different workflow but do not want to modify the base product’s code. In this case, we can add a Delta model file &lt;code&gt;/_delta/a/main.wf.xml&lt;/code&gt;, which represents Customer A’s customized main.wf.xml. The Loader will automatically recognize the existence of this file and use it, without any changes to existing business code.&lt;/p&gt;

&lt;p&gt;If we only want to fine-tune the original model rather than completely replace it, we can use &lt;code&gt;x:extends&lt;/code&gt; inheritance. The execution logic of XLang’s DeltaLoader is described mathematically by:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Loader&amp;lt;Possible Path&amp;gt; = Loader&amp;lt;deltaPath + stdPath&amp;gt;
                      = Loader&amp;lt;deltaPath&amp;gt; x-extends Loader&amp;lt;stdPath&amp;gt;
                      = DeltaModel x-extends Model
                      = Possible Model
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is important to emphasize that the Loader abstraction has very broad application scenarios. Many functionalities related to extensibility can be pushed down to the Loader layer for unified implementation. For example, multi-tenant customization can be handled by a Loader that recognizes tenant parameters. For further details, see &lt;a href="https://dev.to/canonical/designing-low-code-platforms-through-the-lens-of-tensor-products-1o59"&gt;Designing Low-Code Platforms Through Tensor Product&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. How to understand the analogy between Delta superposition and waves in XLang?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;In the physical world, there is another way of construction: waves. Waves are continuously existing patterns that construct the world through interference and superposition. XLang’s distinctiveness lies in its support for continuous constructive superposition via Delta operations.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Traditionally, after constructing X, any modification must change X itself. In contrast, with a superpositional approach, you can obtain a new Y without directly changing X by adding an extra Delta.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;X = A + B + C
Y = A + B + D
  = X + (-C + D)
  = X + Delta
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In traditional software engineering, even if incremental development is achievable, many specialized extension points are often needed, and not all modifications can be done via Delta-style customization. In particular, traditional incremental approaches generally imply adding new features and rarely include a design for reducing existing features. Delta customization allows us to achieve reduction by addition.&lt;/p&gt;

&lt;p&gt;Systems developed with XLang require no extra work to automatically support Delta customization. This drastically reduces the development cost of productized software products. For example, after packaging a banking core system into a JAR, there is no need to modify the base product’s code. All user-specific customizations and secondary development can be stored separately as Deltas. By switching Deltas, multiple different customized versions can be realized. The same mechanism can be used for multi-tenant customization.&lt;/p&gt;

&lt;p&gt;Delta customization enables precise customization down to individual properties. Traditional software engineering offers only a few pre-defined extension points and finds it difficult to support fine-grained customization everywhere. For example, if you only want to define a single property of a button, you often have to add a new component or page. All business-level concepts of interest can be customized individually—this is a manifestation of continuity.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Can XLang be introduced into already developed standard systems?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;XLang is an innovative technology. Can it be applied to existing systems? This way, when customization needs arise, one can express the Delta using XLang and then generate a customized version based on the standard system plus the Delta.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;First, it must be clear that Deltas need to be expressed within a Delta-ized structural space. Traditional software uses general-purpose languages, and its structural space is defined by such languages. General-purpose languages like Java and C# are very limited in expressing Deltas and cannot achieve fine-grained Delta definitions.&lt;/p&gt;

&lt;p&gt;In object-oriented languages, the only Delta mechanism that can be directly leveraged is inheritance. The Nop platform uses a “sandwich” architecture, with code generation following the pattern:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;NopAuthUser&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;_NopAuthUser&lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="c1"&gt;// You can add extra methods here, inheriting code generated from the base class.&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;_NopAuthUser&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;OrmEntity&lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is, code-generated classes inherit from system-built base classes to automatically obtain built-in properties and methods, while an outermost class inherits from the generated class to isolate hand-written code from auto-generated code. During code generation, we follow this rule: files with an underscore prefix and all files under the &lt;code&gt;_gen&lt;/code&gt; directory are automatically overwritten; other files are only created if they do not exist. Thus, when the model changes, you can regenerate without losing manual changes, enabling model-driven incremental development.&lt;/p&gt;

&lt;p&gt;Although more Delta support cannot be obtained directly from object-oriented languages, more Delta mechanisms can be constructed at the architectural level. The most basic approach is to introduce XLang wherever XML/JSON/YAML configuration or model files are used.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm7h3m6szl0yw4i0zbe40.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm7h3m6szl0yw4i0zbe40.png" alt="solon-chain" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the example above, Chain is a model object that can be defined via a JSON file, and it can be parsed and loaded using the &lt;code&gt;Chain.parseByUrl&lt;/code&gt; function. If refactoring with XLang, you can replace &lt;code&gt;Chain.parseByUrl&lt;/code&gt; with &lt;code&gt;ResourceComponentManager.loadComponentModel(path)&lt;/code&gt; and then move the JSON file to the &lt;code&gt;resources/_vfs&lt;/code&gt; directory. In this JSON, you can use XLang’s Delta syntax such as &lt;code&gt;x:extends&lt;/code&gt;, &lt;code&gt;x:post-extends&lt;/code&gt;, and &lt;code&gt;x:override&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The Nop platform provides a &lt;code&gt;nop-spring-delta&lt;/code&gt; module that adds Delta customization support for Spring’s &lt;code&gt;beans.xml&lt;/code&gt; and MyBatis’s &lt;code&gt;mapper.xml&lt;/code&gt; files. You can place these XML files under &lt;code&gt;resources/_vfs&lt;/code&gt;. The specific approach is as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@Service&lt;/span&gt;
&lt;span class="nd"&gt;@ConditionalOnProperty&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"nop.spring.delta.mybatis.enabled"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;matchIfMissing&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;NopMybatisSessionFactoryCustomizer&lt;/span&gt; &lt;span class="kd"&gt;implements&lt;/span&gt; &lt;span class="nc"&gt;SqlSessionFactoryBeanCustomizer&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nd"&gt;@Override&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;customize&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;SqlSessionFactoryBean&lt;/span&gt; &lt;span class="n"&gt;factoryBean&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

        &lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;IResource&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;resources&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ModuleManager&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;instance&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;findModuleResources&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"/mapper"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;".mapper.xml"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(!&lt;/span&gt;&lt;span class="n"&gt;resources&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;isEmpty&lt;/span&gt;&lt;span class="o"&gt;())&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Resource&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;locations&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ArrayList&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;resources&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;size&lt;/span&gt;&lt;span class="o"&gt;());&lt;/span&gt;
            &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;IResource&lt;/span&gt; &lt;span class="n"&gt;resource&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;resources&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
                &lt;span class="c1"&gt;// Ignore auto-generated mapper files; they can only serve as base classes&lt;/span&gt;
                &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;resource&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getName&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;startsWith&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"_"&lt;/span&gt;&lt;span class="o"&gt;))&lt;/span&gt;
                    &lt;span class="k"&gt;continue&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

                &lt;span class="nc"&gt;XDslExtendResult&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;DslNodeLoader&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;INSTANCE&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;loadFromResource&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;resource&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
                &lt;span class="nc"&gt;XNode&lt;/span&gt; &lt;span class="n"&gt;node&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getNode&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
                &lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;removeAttr&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"xmlns:x"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

                &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;xml&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"&amp;lt;?xml version=\"1.0\" encoding=\"UTF-8\" ?&amp;gt;\n"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
                        &lt;span class="s"&gt;"&amp;lt;!DOCTYPE mapper\n"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
                        &lt;span class="s"&gt;"        PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\"\n"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
                        &lt;span class="s"&gt;"        \"http://mybatis.org/dtd/mybatis-3-mapper.dtd\"&amp;gt;\n"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;xml&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
                &lt;span class="n"&gt;locations&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;add&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ByteArrayResource&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;xml&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getBytes&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;StandardCharsets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;UTF_8&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt; &lt;span class="n"&gt;resource&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getPath&lt;/span&gt;&lt;span class="o"&gt;()));&lt;/span&gt;
            &lt;span class="o"&gt;}&lt;/span&gt;
            &lt;span class="n"&gt;factoryBean&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;addMapperLocations&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;locations&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;toArray&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Resource&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;]));&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;ModuleManager.instance().findModuleResources(false, "/mapper", ".mapper.xml")&lt;/code&gt; searches for &lt;code&gt;mapper.xml&lt;/code&gt; files under each module’s mapper directory. This process automatically considers files under Delta directories. If a file with the same name exists under &lt;code&gt;_vfs/_delta/{deltaId}/&lt;/code&gt;, the Delta version will be selected automatically. The Nop platform’s built-in VirtualFileSystem is similar to Docker’s layered filesystem: a file in an upper layer overrides the same-named file in a lower layer. Each Delta directory forms an independent layer, and multiple Delta layers can be specified via &lt;code&gt;nop.core.vfs.delta-layer-ids&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When loading XML files through XLang’s DslNodeLoader, the &lt;code&gt;x:schema&lt;/code&gt; attribute on the root node is used to read the corresponding XDef meta-model, and Delta merging is performed according to the meta-model specification.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After merging, you obtain an XNode, which can be converted to an XML DOM node; here we serialize it to XML and feed it into MyBatis’s factory bean. MyBatis itself requires no modifications; we simply add a new way for it to obtain mapper files.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Does XLang’s Delta computation and mechanism introduce extra performance overhead while improving extensibility and customization?
&lt;/h2&gt;

&lt;p&gt;Primarily, XLang performs DSL Delta merging and Delta customization at model load time via the unified &lt;code&gt;ResourceComponentManager.loadComponentModel&lt;/code&gt; function, implementing model caching and model compilation dependency tracking (automatically invalidating model caches when dependent files change).&lt;/p&gt;

&lt;p&gt;During development, technologies like lazy loading, just-in-time compilation, and parallel loading can reduce system initialization time.&lt;/p&gt;

&lt;p&gt;For releases, you can use Maven packaging to execute merges at compile time, generating the merged model files under the &lt;code&gt;_delta&lt;/code&gt; directory and marking the model root node with &lt;code&gt;x:validated="true"&lt;/code&gt;. At runtime, the system will prioritize loading the model files under &lt;code&gt;_delta&lt;/code&gt; (which are already the final merged results). Since they are marked as validated, the merge process is automatically skipped, so even complex Delta merges will not impact runtime performance.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Is XLang essentially a set of annotations that the underlying engine understands and, after parsing, performs Delta merging?
&lt;/h2&gt;

&lt;p&gt;You can think of it as introducing new Delta operation syntax rules on top of general XNode nodes (akin to a general AST), i.e., the &lt;code&gt;x:extends&lt;/code&gt;, &lt;code&gt;x:override&lt;/code&gt; annotations you mentioned.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If we package these annotations and the parsing engine into a general XML input/output system, can we achieve Delta-ization of everything? Regardless of whether it’s program logic, workflows, forms, or any other content, as long as it can be defined in XML, it can be Delta-merged; after merging, pass it to the execution engine, and how to parse that DSL is up to the engine and unrelated to XLang.&lt;br&gt;
Yes, but this understanding is partial and contains misunderstandings. For example, it ties the concept to XML specifically, whereas XLang is fundamentally agnostic to concrete forms; it is about operations on general Tree structures.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;So is XLang a standard set of attributes to describe additions, deletions, or modifications of node definitions, where Delta merging combines a main file and a delta according to XLang’s defined rules, producing a new DSL description (XML, JSON, or any tree structure), and then the execution engine takes over to parse it independently of XLang?&lt;br&gt;
Broadly yes. But you also need to understand the roles of &lt;code&gt;x:gen-extends&lt;/code&gt; and &lt;code&gt;x:post-extends&lt;/code&gt;, and ultimately recognize the complete computation pattern: &lt;code&gt;App = Delta x-extends Generator&amp;lt;DSL&amp;gt;&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. Does XLang’s model pose challenges for secondary development and an ISV ecosystem? If debugging bugs without access to others’ Deltas, how can we diagnose where a logic changed the data?
&lt;/h2&gt;

&lt;p&gt;First, all model files are managed under the unified &lt;code&gt;_vfs&lt;/code&gt; virtual file directory and all have XDef meta-model definitions. Generally, you only need to inspect the meta-model definition to understand the DSL’s specific syntax structure, and the IntelliJ IDEA plugin provides syntax hints and supports breakpoints, etc.&lt;/p&gt;

&lt;p&gt;At system startup, all Delta merge results are output to the dump directory, where you can see the final merged result of each model file and the origin of each property and node. To further trace the merge process, mark the root node with &lt;code&gt;x:dump="true"&lt;/code&gt;.&lt;br&gt;
For detailed debugging methods, see &lt;a href="https://gitee.com/canonical-entropy/nop-entropy/blob/master/docs-en/dev-guide/debug.md" rel="noopener noreferrer"&gt;debug.md&lt;/a&gt;&lt;/p&gt;

</description>
      <category>nop</category>
      <category>programming</category>
      <category>architecture</category>
      <category>java</category>
    </item>
  </channel>
</rss>
