/lamina-design
Turn a domain into a build-ready contract. Lamina models product behavior at the intersection of UX, product rules, and systems thinking — then writes implement.md for your coding agent.
Quick path
- Confirm
/lamina-inithas run (init gate) - Run
/lamina-designwith a specific flow or feature - Check
run.jsonstatus isready_to_build - Hand
implement.mdto your coding agent
Prerequisites
Valid .lamina/business-context.md from /lamina-init. Without it, design is blocked.
When to use
- After
/lamina-initon a new or brownfield project - When starting a new feature or flow
- When you need states, roles, dependencies, and edge cases specified before coding
- When verify finds
fix_target: contractgaps
Examples
/lamina-design Guest checkout with inventory hold, payment, and cancellation/lamina-design Hotel onboarding with property review and admin approval gate/lamina-design Hall ticket download with payment gate and venue assignmentWhat Lamina does
- Models the domain — entities, states, invariants, dependencies (reachability graph)
- Defines actors — roles, goals, permissions (references
personas.json) - Maps workflows — primary paths, alternate paths, operations over states
- Enumerates scenarios — permission denials, unmet dependencies, invariant violations
- Specifies screens — structural UX surfaces tied to workflows (no styling)
- Writes
implement.md— stack-agnostic build brief atready_to_build
Advanced: Design uses audit profiles to route sections to capability skills — invariants, dependencies, error handling, accessibility, and more. See Orchestrator.
What it writes
Output lands in .lamina/runs/<id>/:
| File | Content |
|---|---|
run.json | Machine contract (status: draft → ready_to_build) |
run.md | Generated readable graph |
implement.md | Full build handoff for your coding agent |
Brownfield design
On existing codebases, Lamina performs a bounded repo scan to ground the contract in what already exists. Existing screens are marked status: existing with repo source paths in surfaces[].
What to do next
Hand implement.md to your coding agent:
Implement from .lamina/runs/<id>/implement.mdLamina never writes app source. Your agent builds using your stack, framework, and UI library.
After implementation, run /lamina-verify guest checkout at http://localhost:3000 (or the flow you designed).
Tips
- Scope one flow per design call — “guest checkout” not “the entire app”
- Include constraints in natural language: “hold expires after 15 minutes”
- Check
run.jsonstatus isready_to_buildbefore implementing - Reference dependency ids in workflows, not free-text preconditions
Next steps
- run.json schema — full contract reference
- /lamina-verify — verify after implementation
- Per-run artifacts — file-by-file reference