Starter prompts

How to open a LEX AI run: the eleven slash commands, what a good outcome-focused description contains, and worked examples per mode.

A
Written By Atakan KayaLast updated 3 months ago

Starter prompts

The fastest way to begin is a slash command plus a clear, outcome-focused description. The mode's first-action rules and agents take it from there — you describe what you want, not how to do it.

If you are not sure what to write, open with /lex-brief. Brief mode interviews you one question at a time and writes .lex/contract.md, then hands off to the build mode that matches what you described. That is usually worth more than a longer prompt, because forward mode reads the contract as requirements you agreed to, not as suggestions.

By mode

Goal

Start with

Work out what to build

/lex-brief "Rough idea: track supplier invoices and flag late ones"

Build a new app

/lex-app "A timesheet app that imports CSV exports, calculates overtime, and produces a monthly report"

Resume a forward run

/lex-resume

Document existing code

/lex-reverse "https://github.com/acme/legacy-lex-app"

Resume documentation

/lex-reverse-resume

Make a targeted change

/lex-edit then: "Add an email field to Customer and show it in the report"

Audit a project

/lex-review "." then: "Run a convention review"

Write and prove tests

/lex-test "." then name a focus, e.g. "only the approval journey"

Adapt to a changed input format

/lex-input "." plus the path to a new-format sample file

Get an app running somewhere

/lex-deploy "." then name the target, e.g. "staging"

Scaffold an MVP

/lex-mvp then describe the smallest useful first version

MVP Completion ships no slash command; enter it by switching modes. See Mode switching.

Write a good description

  • State the outcome, not the steps. "Import invoices and flag overdue ones" beats "create a model, then a loader, then a filter."
  • Point at a real file instead of describing one. Give a path to a sample .csv, .tsv, .xlsx or .pdf. read_input_file reads it server-side and returns the real column names verbatim, so nothing rests on your recollection of the header row.
  • Give the key rules. Business constraints, thresholds, and calculations the app must honour.
  • Scope it honestly. For MVP Generator, keep within the caps (10 requirements, 5 entities, 8 fields each). If it is bigger, plan for MVP Completion.

Examples that work well

  • Forward: "Build a LEX app for expense reimbursement. Input: employee expense CSVs in Uploads/. Rules: per-category monthly caps, receipts required over 50. Output: a per-employee approval report and a finance summary."
  • Edit: "The overtime calculation rounds down; it should round to the nearest 15 minutes. Update the calculation and its tests."
  • Review: "Run a business review — does the code match the requirements in plans/technical_docs/step-02-requirements.md?"
  • Test: "Write the test suite. User stories are in plans/business_docs/business/03-user-journeys.md." Test mode will not open a session without a user-story document, because assertions derived from the implementation only pin current behaviour, bugs included.
  • Input: "The supplier feed moved from comma to semicolon and renamed amount to net_amount. Sample: samples/feed-2026-03.csv."
  • Deploy: "Get this running on staging. Compose files exist; the database is managed and must not be recreated."

Compose it first, if you prefer

lex ai-faq opens at the Contract-Driven Prompt Builder: five guided steps, a completeness score out of 24, and drafts kept in your browser only. It offers ten build scenarios across nine modes.

After you send it

Let the assistant make its mandatory first tool call and delegate to the right agent. If it asks a single clarifying question, answer it — that is the disambiguation rule working as intended.

Was this helpful?

Your feedback shapes what we write next.