Lemma app design

From lemma-work/lemma-platform · View interactive version

Lemma app design is an AI agent skill from the GitHub repository lemma-work/lemma-platform. Design, redesign, and visually refine Lemma pod apps into production-quality interfaces (dense working tools for daily work, distinctive pages for one-off or showcase use) grounded in the pod's real users, domain, data, files, agents, workflows, and assets. Use when defining information architecture

How to use this skill

Skill file

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

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.

visual direction, content, accessibility, responsiveness, and visual iteration.

and lemma-app-qa for systematic functional and regression testing.

conversation result rather than a durable app.

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:

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.

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.

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:

redesigning it.

previews, agents, workflows and wait states, members, connectors, and existing

domain or brand assets that the app may expose.

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:

work, such as an agent recommendation beside its evidence and the next human

decision.

the default screen; do not open with a marketing introduction.

outcome in the pod.

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:

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

CODE0. Include the evidence,

resource map, experience thesis, page map, scenarios, wireframes, tokens, copy

canon, state matrix, responsive transformations, accessibility requirements, and

acceptance criteria.

Keep routes and labels in the user's language. Expose words such as “agent,”

“workflow,” or “function” only when the intended user understands and needs those

primitives. Make one primary action obvious in each context. Keep irreversible

actions explicit and separated from routine actions. Use progressive disclosure

for secondary metadata and controls without hiding essential context.

Write interface copy as design material:

a Lemma owns is said as its own sentence (“Every customer hears back within a

day”), never “the outcome” or “the goal.” Keep “pod,” “channel,” “surface,”

and “teammate” out of interface text.

wording where a human term exists.

6. Design Every State And Viewport

Specify loading, populated, empty, partial, error, permission, disabled, pending,

success, and destructive-confirmation states wherever they can occur. Match

skeletons to the final geometry; reserve spinners for short, local actions. Keep

agent and workflow progress legible without presenting unfinished output as final.

Design responsive transformations rather than a scaled-down desktop:

Meet an accessible quality floor:

focus treatment.

44px in touch target size.

updates without stealing focus.

7. Implement One Real Vertical Slice First

When implementation is authorized, use lemma-builder for the build mechanics.

Connect the primary scenario to real pod data through LemmaClient immediately;

do not polish a static mock and postpone the actual contract. Reuse native Lemma

blocks for proven data wiring, then restyle them through the chosen tokens instead

of forking their behavior.

Implement one complete slice—load real work, inspect it, take the primary action,

and show its result—before filling secondary pages. Keep the implementation aligned

with DESIGN.md; update the specification when a verified constraint changes the

design.

8. Review The Rendered Pixels

Use the browser skill for the full render-and-critique loop:

  1. Open the authenticated local or deployed app and walk the primary scenario.
  2. Capture screenshots at desktop and 375px, plus important intermediate states.
  3. Inspect each screenshot with view_image; do not infer visual quality from the

DOM, CSS, or browser snapshot alone.

  1. Critique with CODE0.
  2. Fix the highest-impact issue, recapture the same state, and compare.
  3. Repeat until no unresolved issue compromises comprehension, task completion,

accessibility, or the intended direction.

Inspect text wrapping, truncation, alignment, density, hierarchy, focus, contrast,

real data variation, empty/error/permission states, and breakpoint transitions.

Treat screenshots as evidence, not decoration. Never call an app polished without

viewing both a representative desktop render and the 375px experience.

9. Make The Cover

Every app ships a 1200×630 cover: what its links unfurl with in Slack, iMessage

and X, and what its card shows in Lemma. Render the first screen **with sample

rows you write, never real data**, into one of the fixed templates, and ship it

in the build at .lemma/cover.png. Follow

CODE0 exactly — it is the only safe way to

make one. An app without a cover gets a plain lettered one from the host.

Finish With Evidence

Before handing off, confirm:

working tool.

When implementation is in scope, also confirm:

lemma-app-qa and deployment verification through lemma-builder.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.