Inspiration

Writing a research paper is not just writing prose. A real LaTeX manuscript is a connected system of source files, sections, citations, labels, figures, macros, comments, and revisions.

Yet review feedback usually arrives through PDFs, chat messages, email threads, or disconnected AI conversations. As the manuscript changes, comments lose their connection to the source. AI-generated suggestions may sound convincing, but authors often cannot see exactly what evidence they came from, what source they would modify, or whether the change is safe.

LaTeXpert was inspired by the rigor of compilers, linters, and code review. We asked: what if reviewing a research paper were as traceable and reversible as reviewing code?

What it does

LaTeXpert is a local-first, source-backed manuscript review control plane for LaTeX projects.

It opens an existing LaTeX repository, reconstructs its multi-file manuscript structure, and turns review concerns into actionable issues tied to exact source files, objects, and spans.

Issues are organized into three decision-oriented planes:

  • Fix Now — concrete problems that can be addressed directly
  • Clarify Logic — reasoning, terminology, or structural concerns that require author judgment
  • Reviewer Attention — unresolved questions and risks that should remain visible before submission

For every issue, LaTeXpert can provide bounded manuscript context, supporting evidence, an anchor trace, and—when appropriate—an exact patch preview. Authors remain in control: they can preview, accept, reject, defer, or undo changes instead of allowing an agent to rewrite the manuscript silently.

LaTeXpert also produces reproducible readiness artifacts that combine compilation status, unresolved review debt, structural and reference checks, revision history, and evaluation evidence. This helps a research team answer a difficult question with more than intuition: “Is this manuscript actually ready to submit?”

The system works through a CLI, a local daemon and MCP interface, a VS Code extension, a Codex workflow bundle, and a web workbench for deep visual review.

How we built it

LaTeXpert is built as a modular Python application with FastAPI, a local persistence layer, a LaTeX discovery and expansion runtime, source-backed diagnostics, a review-state engine, submission-readiness checks, and an evaluation framework.

Its daemon exposes narrow MCP operations for opening a project, listing issues, retrieving bounded context, previewing or applying one scoped edit, validating the manuscript, inspecting revision state, undoing changes, and exporting a reviewer bundle.

We used Codex with GPT-5.6 as an engineering collaborator across the project: exploring a large multi-surface codebase, translating product requirements into implementation plans, refining MCP tool contracts, identifying architectural boundaries, generating focused tests, and challenging claims that were not supported by runtime evidence. The human remained responsible for the product direction, trust model, and final engineering decisions.

This collaboration also shaped the product itself. Instead of giving an agent the entire manuscript and asking it to “improve everything,” LaTeXpert gives Codex bounded, source-backed workflows: understand one issue, inspect its evidence, make one explicit change, validate it, and return a trace.

Challenges we ran into

The first challenge was that LaTeX is not a flat document. Includes, macros, environments, bibliography keys, labels, references, and generated structure all affect what a source fragment means. We needed to reconstruct enough of that structure without pretending to emulate every possible TeX package.

The second challenge was trust. A fluent suggestion is not necessarily a correct suggestion. We had to separate deterministic findings from semantic judgments, preserve uncertainty, and keep higher-risk concerns visible for human review.

The third challenge was maintaining provenance through edits. Issue identities, source anchors, patches, validation results, and revision history must remain connected even as the manuscript changes.

Finally, we had to keep the experience coherent across CLI, MCP, VS Code, and the web workbench without creating multiple conflicting sources of truth.

Accomplishments that we're proud of

We built an end-to-end review loop rather than a prompt wrapped in a text box.

LaTeXpert can move from a real local LaTeX project to source-backed issues, bounded context, patch previews, explicit author decisions, validation, undoable revisions, and exportable readiness evidence.

We are especially proud that agent actions use the same manuscript runtime and trace model as human-facing tools. Codex does not operate through an invisible side channel: its actions remain inspectable, bounded, and replayable.

We also built fail-closed evaluation and readiness boundaries. When the system lacks sufficient evidence, it reports that limitation instead of converting uncertainty into a confident “ready” verdict.

What we learned

We learned that the most valuable role for AI in high-stakes writing is not unlimited generation—it is structured collaboration.

An agent becomes more useful when it receives less but better context, works through explicit tools, and returns evidence that a human can inspect. We also learned that product trust cannot be added as a final UI label; it must be designed into source identity, patch semantics, validation, revision history, and evaluation from the beginning.

Most importantly, we learned that a manuscript should not be treated as a block of text. It is a living technical artifact with structure, dependencies, decisions, and history.

What's next for LaTeXpert

Next, we want to deepen GPT-5.6-powered manuscript reasoning while preserving LaTeXpert's source-backed trust model. Semantic review hypotheses will cite exact manuscript evidence, distinguish facts from inference, and remain separate from automatically applicable fixes.

We also plan to expand evaluation across more real research papers, improve support for complex LaTeX packages, make the VS Code review experience more visual, and introduce team policy packs for labs, conferences, and publication workflows.

Our long-term goal is to make LaTeXpert the trusted review layer between a LaTeX source repository and submission: a place where authors, reviewers, and agents can improve a paper without losing control of how or why it changed.

Built With

  • codex
Share this project:

Updates

Submission history