Review

How review mode runs flat, idempotent audits of an existing project: the convention and business review types, what is recorded, and where the reports land.

A
Written By Atakan KayaLast updated 3 months ago

Review

Review mode runs short, on-demand audits of an existing project. It is not a build or documentation workflow — there is no step loop and no mandatory ordering. You run zero, one or many reviews and finalize whenever you are satisfied. It reads, it never changes anything, it runs no code or tests, and it never commits. Slash command: /lex-review.

The flow

/lex-review "<path or GitHub URL>"
  ↓
kickstart_review(project_path=... OR github_url=...)   # mandatory first call
list_review_types()                                    # optional discovery
  ↓ for each review you want:
get_review_brief(review_type="convention"|"business", focus=..., business_addenda=...)
run the named review agent — it reads code and writes the report
notify_review_complete(review_type, summary, artifacts, findings_count, severity)
  ↓
finalize_review()                      # writes reviews/REVIEW-REPORT.md

Pass project_path or github_url, never both; a GitHub URL is cloned into a working copy.

Built-in review types

Review type

What it checks

Agent

convention

Lex App Framework compliance — module boundaries, a FileField on every report model, direct foreign-key references, no disallowed Django scaffold files, consistent imports, LexLogger rather than a Django internal logger, no model-service-model cycles, plus cross-doc reconciliation when both forward and backward planning docs exist

lex-review-convention

business

Implemented code against captured business requirements, from plans/technical_docs/step-02-requirements.md and plans/business_docs/business/, plus any compliance addenda supplied for the run

lex-review-business

Call list_review_types() for the canonical catalogue — the registry can grow. The business review gives every requirement a MET / PARTIAL / MISSING / OUT-OF-SCOPE verdict with a file-and-line citation; an uncited row is marked NEEDS-EVIDENCE and put to the user rather than guessed.

You coordinate; the agent audits

The coordinator routes the request and records the result. It should not read source files to compute findings or write the report itself — it invokes the named agent and passes the brief verbatim. That separation is why a review of a large project does not exhaust the coordinator's context.

notify_review_complete takes a severity of info, warning or critical, and refuses if a declared artifact is not on disk, because an agent that claims success without writing a report leaves nothing to read.

Evidence that is not code

read_input_file and render_pdf_pages are on the review tool surface, as they are on every mode. A requirements spreadsheet or a compliance PDF is read server-side and returned as markdown, so the lex-spreadsheet-reader and lex-document-reader agents can supply evidence to a business review without anyone writing a throwaway parsing script.

Where output lands

Everything is written under <project_root>/reviews/:

  • reviews/<type>-<run-id>.md — one file per run
  • reviews/_index.md — auto-maintained index, one row per run
  • reviews/REVIEW-REPORT.md — the consolidated report

finalize_review is idempotent: it rewrites the consolidated report from the runs recorded so far, so you can run another review and call it again. Nothing is committed or pushed; commit reviews/ yourself when you are happy.

What review is not

Review reports, it does not repair. To act on the findings, switch to Edit for a targeted fix, or Test to write and prove the suite that would have caught the defect. Whether the app actually runs in a target environment is answered by the verifier in Deploy. The review scenario in Brief hands off here. See Mode chooser.

Was this helpful?

Your feedback shapes what we write next.