Skip to content

How the Maru app works ​

We built the Maru app, a desktop app, for our UIST paper. It uses the SDK for everything about IA rules and adds the rest: model calls, layouts, and storage. It has two parts: an IA Rule Module that builds and keeps your rules, and a generation pipeline that uses them to make each interface.

The Maru pipeline. A user query goes to the Extractor, which writes rules to Rule Storage. The Rule Retriever selects rules for the Layout Engine, which plans and fills a layout. The UI Renderer builds the generated UI. User interactions go to the Edit Analyzer, which updates Rule Storage.
The Maru pipeline.

IA Rule Module ​

ComponentWhat it does
ExtractorReads each query and saves the IA rules it states, such as "affordable means under $1,800".
Edit AnalyzerTurns UI interactions into rule changes. Dragging a card, sorting, or removing a field updates the layout and its rules right away, without a new generation.
Rule StorageKeeps user-initiated rules and system-scaffolded rules (the starting Partition and Hierarchy taken from the first interface). You see and edit them in the IA panel; removing a rule archives it.
Rule RetrieverBefore each generation, picks the rules that apply to this request. See Persistence and its boundaries.

Generation pipeline ​

ComponentWhat it does
Data ManagerCollects items from open tabs and web search, and gives each a stable ID so rules still point to the right item after renames.
Layout EnginePlans the layout from the query and the Partition and Hierarchy rules, then fills it using all four rule types. Design patterns from the research codebook serve as examples.
UI RendererTurns the plan into interactive components. Because the plan is data, the same answer can be shown as another layout without calling the model again.

After each response, Maru records which rules shaped it. This history drives how rules are ranked over time.

Where it lives in the code ​

PartCode
Extractorsrc/main/ia/extraction.ts (extractIAFromMessage)
Edit Analyzerstores/iaStore.ts (applyLayoutIAEvent) → SDK applyLayoutEvent
Scaffolded rulesstores/send/rule-scaffold.ts, stores/send/plan-persistence.ts
Rule StorageSDK IAPersistence
Rule Retrieversrc/main/ia/retrieval.ts (retrieveRules) with SDK rule-retrieval
Data Managerstores/send/data-acquire.ts with SDK DataStorePersistence
Layout Enginestores/send/layout-plan.ts (planLayout), codebook in data/codebook/codebook.csv
UI RendererDynamicBlock and components/blocks/
Recording applied rulesstores/send/attribution.ts (fireAttribution)

Renderer paths are under src/renderer/src/; the SDK is packages/maru-sdk/. The whole pipeline runs from executeChatLLM in stores/send/chat-mode.ts. Layouts only emit events; all IA logic stays in the SDK or the IA modules.

CC BY 4.0 · 마루