@damonjw/rubric
v0.1.22
Published
A front end for Codex optimized for working with maths, using a browser with MathJax as the UI.
Maintainers
Readme
RUBRIC
RUBRIC is a browser front end for AI agents (Codex and Claude Code), made for working with mathematics. It treats the conversation as a manuscript, rather than a flow: it is a record of what you and the agent have said to each other, with noisy tool output kept to the console, and it lets you scroll back and edit your previous messages. It uses MathJax to show LaTeX, and it also supports TikZ graphics. RUBRIC is merely a front end driver for the agent; it doesn't implement any AI agent logic of its own.
When working with Codex, you have full control from the browser. You can type in your message and submit it, edit your previous messages, and interrupt its thinking. Under the hood it uses
codex app-serverto support this.When working with Claude, the browser is just a viewer that gives you nicer maths display, and you still have to use the terminal for interaction, e.g.
/rewindto go back and edit earlier messages. Anthropic discourages theclaude -pusage we would need for a proper in-browser experience by charging it as credit usage rather than subscription.No support yet for Gemini/Antigravity, because we're still waiting for /rewind support in the SDK.
Why the name? Rubric means instructions, such as in an exam or a church order of service.
In RUBRIC, you write the instructions that the AI agent follows.
The word comes from the colour that is traditionally used — rubric is Latin for red.
Your instructions are shown in red as ⊢ <text>,
using syntax from mathematical logic for statements that are to be treated as given.
Installation and usage
To install,
npm install -g @damonjw/rubricRun rubric from the directory you want to work in:
rubric # start a new session
rubric --agent claude # start a new Claude session; browser opens on first input
rubric resume # resume a previous session (pick from sessions in current directory)
rubric resume ID # resume a specific previous sessionWhile using Codex, you can use /model, /status, and /plan as with regular Codex.
Other slash-commands are not supported. See rubric --help for further help.
You may like to add instructions in your AGENTS.md to tell Codex what it can output:
In your output, use LaTeX for all maths output. It should be raw LaTeX, not in a code block.
(The user is using a Markdown viewer that renders LaTeX.)
For figures, you can use `\begin{tikzpicture} ... \end{tikzpicture}` within LaTeX.Configuration
rubric config # run a wizard to set the configuration
rubric config --help # describe all configuration options
rubric verify # test if there is a working LaTeX command for TikZ graphicsWhen you run rubric config it lets you specify a .sty file
which will be included before rendering any mathematics in the browser;
this is useful for defining custom commands like \newcommand{\KL}{\operatorname{KL}}.
It also lets you customize the CSS.
The configuration generated by rubric config is stored in a file .rubric in the current directory.
For more information, see rubric config --help.
Run rubric verify to verify that you have a working LaTeX installation that can render TikZ graphics.
It uses the preamble specified by rubric config.
You can choose a custom LaTeX command using rubric config.
If you don't have a working LaTeX installation, RUBRIC will still work but it won't
be able to show TikZ graphics.
Prerequisites
- Node.js ≥ 18.
- Codex — Install Codex first, and log in. RUBRIC will install Codex as a dependency if you haven't installed it yourself, but you still need to run Codex to log in before using RUBRIC.
- Claude Code (optional)
- LaTeX (optional) — TikZ figures are rendered server-side using
latexanddvisvgm. Everything else works without LaTeX; only TikZ rendering needs it.
License
GNU AGPL-3.0-or-later © Damon Wischik
RUBRIC is free software under the GNU Affero General Public License. You are free to use, run, and modify it. If you distribute it, or offer a modified version to others over a network, you must make your full source available under the same license. This is deliberate: anyone — including individuals at companies — may use RUBRIC freely, but it cannot be folded into a closed-source product or service.
RUBRIC invokes the separately-licensed Codex CLI (Apache-2.0); that license applies to Codex itself, not to this project. The AGPL is compatible with RUBRIC's permissively-licensed dependencies.
Bundled third-party code
This package vendors markdown-it
(src/web/markdown-it.min.js), which is distributed under the MIT License,
Copyright (c) 2014 Vitaly Puzrin, Alex Kocharin. Its license text is included at
src/web/markdown-it.LICENSE.
MathJax is loaded from a CDN (Apache-2.0) and is not bundled.
