LEX AI Behavior Map
The routes a LEX AI session actually takes, from starting with a rough idea through new builds, edits, documentation, tests, input changes, and deployment.
A
Written By Atakan KayaLast updated 3 months ago
LEX AI Behavior Map
This article captures the core LEX AI workflow shapes — the routes a session actually takes, rather than the list of tools it has available.
1) Starting from a rough idea
- Start in Brief mode. It puts one question at a time to the user, refuses filler answers such as "standard" or "you decide", and records who authored each answer.
- Finalizing writes
.lex/contract.mdand.lex/prompt.md, then names the build mode to switch into. - Forward mode reads the contract automatically at kickstart and treats its statements as requirements rather than assumptions, because the user agreed to them.
2) New project
- Start in Forward mode and initialize with
kickstart_workflow. - Run the steps in order from planning through sync.
- Finalize in two stages: the audit report first, then the merge flow.
3) New feature in an existing project
- If the system context is unclear, start in Backward mode to document it first.
- Switch to Forward and enter with
kickstart_run; existing projects are routed to the refactor implementation agent automatically, so the coordinator never chooses. - For a single contained change, Edit mode is the shorter route.
4) Planning document revisions
- User changes to planning docs trigger re-execution from the earliest impacted step, with the edits committed first.
- A newly added data file —
.csv,.tsv,.xlsx,.xlsm,.xls,.pdf— forces a rerun from the input/output schema step. - The redirect is reported as a success, because it is a redirect and not a failure.
5) Reverse documentation
- Backward mode scans the code, builds the technical map, collects questionnaire answers from the user, and produces business docs.
- It is documentation-focused and delivers no implementation changes.
6) Tests for an app that has none
- Test mode 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.
- When stories are missing it hands the project to Backward mode and records the pending return, so the test session resumes on the way back.
- Coverage in the final report is computed from scenarios proven effective, not from tests existing.
7) The input file changed shape
- Input mode registers the new format from a sample file read server-side, or from an interview when only a verbal description exists.
- It then walks the change areas that a rename or a new column breaks silently — the parser, the data model, migrations, the calculation fan-out, reports, serializers, and test data.
8) Getting it running
- Deploy mode scans what the project already says about how it deploys, then works through the remote deployment handbook step by step and verifies that the application actually works.
- A blocked step keeps the cursor where it is, so the coordinator is walked back to the blocker rather than past it. Secret values are never written into any artifact.
See Choose the right path for intent-to-mode routing, and Brief, Test, Input, and Deploy for the shapes added most recently.
Was this helpful?
Your feedback shapes what we write next.
