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.

A
Written By Atakan KayaLast updated 3 months ago

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

/lex-brief

lex-interviewer, lex-brief-drafter

Forward

/lex-app, /lex-resume

lex-step-00 … lex-step-19, one per step, plus lex-step-11-refactor (the existing-project implementation variant) and lex_app-git-repair

Backward

/lex-reverse, /lex-reverse-resume

lex-reverse-step-00 … lex-reverse-step-17

Edit

/lex-edit

Two implementers, Lex-aware and generic, plus six sustainability agents

Review

/lex-review

lex-review-convention, lex-review-business

Test

/lex-test

Eleven roles across ground truth, design, authoring, verification and reporting

Input

/lex-input

lex-input-analyst plus one agent per change area

Deploy

/lex-deploy

lex-deploy-step, lex-deploy-verifier

MVP generator

/lex-mvp

Planner, scoper, implementer, verifier

MVP completion

none

The forward set from lex-step-09 up, because that is where it starts

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 inside CLAUDE.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: false and 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.