## Semantic Rewriter

**This system belongs to the family of source-to-source compilers.**

Like Babel, TypeScript, JSX transforms, and SQL query planners, it does not execute user code directly. Instead, it **rewrites code at build time**, preserving intent while changing execution strategy.

What makes this system distinct is **composition**:

* Users compose *what* data they want in plain JavaScript.
* A **semantic rewriter** transforms that composition into safe, executable runtime code.
* Framework-specific mechanics (Vue, React) are supplied by the compiler, not the author.

Writing SQL directly in client code is traditionally taboo because it exposes query logic, invites injection risks, and tightly couples clients to execution details. This model removes those risks by compiling and encrypting SQL at build time, ensuring no executable queries exist in client runtime code while preserving declarative authoring.

**The result** is a declarative, dataflow-style programming model where:

* intent is written once,
* semantics are preserved,
* and execution is generated.

---

## TLDR; Semantic Rewriter

### Write compositionally → Re-compile to executable runtime code

> Declarative compositions are rewritten at build time into framework-specific executable runtime code. This process is similar to other semantic transformers such as Babel, TypeScript, and SQL query planners.
