Lemma App Design
Own the product-design layer of a Lemma app. Turn the pod's operating loop into an
interface people can understand, trust, and use repeatedly. Make the result
specific to its subject; do not ship a generic dashboard wearing the pod's name.
Keep The Boundary Clear
- Read
lemma-builder'sreferences/apps.mdbefore changing an app — load it
with load_skill(name="lemma-builder", resource_path="references/apps.md").
A relative ../ path is refused: resource_path may only name a file inside
the skill you are loading. Treat it as authoritative for HTML versus Vite,
LemmaClient, SDK hooks, auth, RLS, realtime, scaffolding, components, bundles,
deployment, and technical testing.
- Use this skill for experience strategy, information architecture, interaction,
visual direction, content, accessibility, responsiveness, and visual iteration.
- Use
lemma-userto inspect a live pod,browserto see the rendered result,
and lemma-app-qa for systematic functional and regression testing.
- Use
lemma-widgetinstead when the requested surface is a compact inline
conversation result rather than a durable app.
- Preserve the user's requested mode. For a design discussion or audit, stop at
findings and a design specification. Implement only when the request includes
building or changing the app.
Build The Apps A Lemma Needs
A Lemma's agent works on shared tables; its apps are where people see,
review, approve, and correct that work. Three apps carry most of it:
- Where the work stands. Counts read from the work table itself -- what
came in, what is done, what is waiting -- with datastore.query, each one
opening to its rows with the matching records.list filter. A count over a
table with row security counts only what the viewer can read, so say so.
- A review queue. Rows waiting on a person — drafts to approve, items to
correct — from records.list filtered on the work table's status, oldest
first, with the action on the row through records.update. Build it to
shrink: empty is the finished state.
- What needs you. Three sources, all the viewer's own, never the team's:
conversations.pendingInteractions() for questions and approvals in a chat
with an agent (answer in place with
conversations.approvals.resolve(conversation_id, tool_call_id, …));
channels.inbox(podId) for questions an agent or a scheduled run asked them
in their own chat; and workflows.runs.waitingAssignedToMe() for workflow
forms parked on them. Showing only the first misses what scheduled runs
ask.
Follow The Design Loop
1. Start From Pod Truth
Inspect before proposing:
- Read the app's existing
DESIGN.md, source, and bundle definition. - Inspect the current rendered app and capture baseline screenshots when
redesigning it.
- Inspect named tables and schemas, representative records, files and derived
previews, agents, workflows and wait states, members, connectors, and existing
domain or brand assets that the app may expose.
- Identify the primary person, their recurring job, the decision they make, the
action they take, the cadence, and the cost of error or delay.
Use real field names, values, documents, images, vocabulary, and edge cases in the
design. If live content is unavailable, use schema-faithful representative content,
label it as sample data, and avoid fabricated business claims. Never use lorem
ipsum, arbitrary metrics, decorative charts, or controls with no real action.
2. Map Every Surface To The Lemma Model
Record the contract for each visible module and action:
| UI element | Human purpose | Named pod resource | LemmaClient/hook surface | Read/write/live behavior | Access state |
| --- | --- | --- | --- | --- | --- |
Require every prominent number, status, list, preview, agent result, form, and
button to have a truthful source or action. Respect delegated identity, RLS, and
resource grants in the experience: distinguish a genuinely empty result from
missing access, and never imply that a user's RLS-scoped rows are team-wide data.
Every read is capped, so a count is only ever a count of what came back.
records.list serves one page — 1000 rows at most — beside a total that is the
exact scoped count of matching rows; an ad-hoc datastore.query reports total
as the rows returned and raises truncated when the cap cut the answer short.
Design the label for the number you actually hold: “12 of 480”, or an aggregate
computed in the query. A page size rendered as a total is a wrong number in the
one place the person is trusting the app most.
Choose HTML or Vite with lemma-builder based on application complexity, not
appearance. Keep a one-page HTML app when it is sufficient; use Vite for genuine
routing, reused components, or substantial client state. Do not switch stacks just
to achieve polish. In either path, keep pod context portable through
LemmaClient; never design around a hard-coded pod or API host.
3. Define The Experience Thesis
Write one sentence:
For [person], this app turns [input/work] into [decision/action] by
[specific mechanism].
Then define:
- Hero moment: name the one screenshottable moment where the pod does valuable
work, such as an agent recommendation beside its evidence and the next human
decision.
- First 30 seconds: show active work, context, and a credible next action on
the default screen; do not open with a marketing introduction.
- Primary scenario: trace one complete journey from arrival through a durable
outcome in the pod.
- Information spine: choose the domain object or operating sequence that
organizes the app—case, document, account, run, decision, timeline, queue, or
another subject-specific unit.
When the user names a reference product, inspect the real experience or supplied
reference material. Extract useful interaction mechanics and hierarchy; do not
copy its surface styling or answer from a vague recollection.
4. Choose A Subject-Specific Direction
Working apps look like working tools. An app people open every day to do
work gets dense product UI: tables and lists over cards, compact type,
keyboard shortcuts for the main actions, one accent colour on a neutral base,
and no hero art, illustration, or decorative motion. Its distinctiveness comes from the domain's
real data and actions, not decoration; one that reads like a poster or an
editorial spread has failed, however well made. Use the rest of this step in
full for one-off, public, or showcase pages; for a working app, use it only to
choose the accent, type roles, and density.
Derive the visual language from the subject's own world: its artifacts, materials,
instruments, notation, rhythms, constraints, and vocabulary. Privately explore two
or three credible directions, then select one with a clear rationale.
Specify:
- a 4–6 color role palette with exact values and contrast-safe pairings;
- deliberate display, body, and utility/data type roles;
- a layout principle and density appropriate to the work;
- one memorable signature element tied to the subject;
- one justified aesthetic risk, with the rest of the interface kept disciplined;
- restrained motion that clarifies change, sequence, or causality.
Apply the subject-swap test: if the same layout, palette, copy, and signature
could be relabeled for an unrelated pod, revise it. A working app passes on its
content (columns, statuses, actions) and may share its shell. Avoid habitual
AI-design defaults: interchangeable KPI cards, gratuitous bento grids, gradient blobs,
glass panels, pill-shaped everything, random charts, oversized greetings, and
decoration that encodes nothing. Treat “premium” as precision, coherence, and
restraint—not as a fixed palette or luxury aesthetic.
5. Write The Design Specification
Create or update DESIGN.md before implementation. Use