Choose the right path

How to pick one of the ten LEX AI modes from your intent, with disambiguation rules, worked examples, and the two cases where a mode redirects you.

A
Written By Atakan KayaLast updated 3 months ago

Choose the right path

Pick the mode from what you are trying to do, not from tool names. This one decision determines the whole workflow, the guardrails, and the tools your assistant can see. There are ten modes and exactly one is visible at a time.

Intent → mode

What you want to do

Use

Turn a rough idea into a written, agreed project contract

brief

Build a new Lex app from scratch

forward

Build only a small MVP quickly

mvp_generator

Finish, expand, or complete an existing MVP to full product

mvp_completion

Modify or add a feature to an existing app

edit

Review or audit an existing project

review

Write the test suite for an existing app and prove it catches regressions

test

Adapt an existing app to a changed input-data format

input

Get an existing app running in a target environment

deploy

Document or reverse-document existing code

backward

Start in brief when nothing is written down

brief is not an alternative to building — it is the mode that makes this decision for you. It interviews you topic by topic, writes .lex/contract.md, and finalize_brief names the next mode and its first tool. Ten build scenarios map onto the other nine modes, so the handoff comes out of the interview instead of being a second guess. Forward then reads the contract automatically and treats its statements as requirements, not assumptions.

Disambiguation rules

  1. "MVP" plus "complete / finish / expand / full product" → mvp_completion.
  2. "MVP" plus "just build the first version" → mvp_generator.
  3. Implementation changes on an existing repo without MVP-completion wording → edit.
  4. A changed data format — renamed columns, new delimiter, new encoding, a different row grain → input, not edit. Lex ships no input parser: column names are string literals in hand-written parsing code, so a rename can import wrong data under a SUCCESS status without raising anything.
  5. Configuring and running the app somewhere → deploy. It changes configuration, not application code.
  6. Never use edit for MVP completion — that is what mvp_completion exists for.
  7. If intent genuinely matches two rows, ask exactly one clarifying question, then proceed.

Fast examples

  • "I know roughly what I want but nothing is written down" → brief
  • "Build a full new product from this contract" → forward
  • "Generate an MVP for this idea" → mvp_generator
  • "Please complete this MVP to production quality" → mvp_completion
  • "Refactor this existing app and add OAuth" → edit
  • "Run a code-quality or compliance audit" → review
  • "Write tests and show me they catch a regression" → test
  • "The supplier changed the CSV header row" → input
  • "Get this running on the staging box" → deploy
  • "Create business and technical docs from existing code" → backward

When a mode redirects you

test will not open a session without a user-story document: an assertion derived from the implementation pins current behaviour, bugs included, and can never fail. It hands the project to backward and records the pending return so the test run resumes on the way back. Treat that, and the brief handoff, as the workflow working rather than as an error.

Important discipline

Never switch modes to get around an error. If a tool fails, resolve the underlying problem and retry the same tool. Switch only when the actual intent changes. See Mode chooser and Mode switching next.

Was this helpful?

Your feedback shapes what we write next.