Agents and prompts
The eleven slash commands, the agents each of the ten modes ships, and how the one canonical .github payload is translated for every supported coding tool.
Agents and prompts
LEX AI ships two kinds of assistant assets into your project: slash-command prompts that start a workflow, and agents that do the focused work inside it. Both are workspace files your coding tool loads automatically, so a run starts from the same written instructions every time rather than from whatever the model recalls.
What each mode ships
Mode | Command | Agents |
|---|---|---|
Brief |
|
|
Forward |
|
|
Backward |
|
|
Edit |
| Two implementers, Lex-aware and generic, plus six sustainability agents |
Review |
|
|
Test |
| Eleven roles across ground truth, design, authoring, verification and reporting |
Input |
|
|
Deploy |
|
|
MVP generator |
| Planner, scoper, implementer, verifier |
MVP completion | none | The forward set from |
MVP completion has no prompt of its own — enter it with switch_to_mode(target_mode="mvp_completion").
Three agents are worth knowing by name. lex-brief-drafter returns labelled proposals for you to confirm and never a settled answer, so a drafted field stays visibly drafted. lex-test-story-auditor turns prose user stories into numbered acceptance criteria that every later test traces back to. lex-deploy-verifier treats step notes as claims to be tested, and never repairs what it verifies.
Four shared sub-agents recur across modes: lex-docs-reader for lookups in docs/lex_topics/, lex-validator for rule-by-rule conformance, and lex-document-reader and lex-spreadsheet-reader, which call read_input_file and render_pdf_pages so a customer PDF or workbook is read server-side instead of through a throwaway script. See Files and questions.
How prompts and agents work together
You type a slash command; the coordinator makes the mandatory first tool call; the server returns a brief plus the name of the agent to run; the coordinator delegates and reports completion. The coordinator never does agent work itself when an agent is named — that is what keeps runs consistent and each step's context lean.
Where these files live
Each mode ships one canonical .github/ payload: prompts/, agents/, copilot-instructions.md, and an instructions/ folder of scoped rules — every mode carries the shared questions rule, and forward adds two more. Setup translates that single source into each tool's own dialect, so one edit reaches all seven at once.
- The three Copilot surfaces — the tree verbatim under
.github/, file for file. - Claude Code — native subagents in
.claude/agents/, commands in.claude/commands/, workspace rules in a managed block insideCLAUDE.md. - Cursor, Codex and Windsurf — no named subagents, so step agents ship to a neutral
.lex/agents/tree and the workspace rules gain a delegation protocol: read the agent file in full, run it as one focused sub-task, drop the detail, report the summary. The no-skip, halt-on-ok: falseand hands-off-git rules are restated verbatim; only the spawning mechanism differs.
See Supported coding tools and Execution model next.
Was this helpful?
Your feedback shapes what we write next.
