@damonjw/rubric
v0.1.15
Published
A front end for Codex optimized for working with maths, using a browser with MathJax as the UI.
Downloads
2,379
Maintainers
Readme
RUBRIC
RUBRIC is a browser front end for OpenAI's Codex, 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.
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.
Note that RUBRIC is just a front end driver for the codex binary
(codex app-server). It doesn't implement any AI agent logic of its own.
It doesn't support Claude Code, since Anthropic discourages the claude -p usage
we would need by charging it as credit usage
rather than subscription. It doesn't support Gemini/Antigravity, because
we're still waiting for /rewind support
in the SDK.
Installation and usage
To install,
npm install -g @damonjw/rubricRun rubric from the directory you want to work in:
rubric # start a new session and open the browser
rubric resume # pick a previous session to resume (in current directory)
rubric resume <ID> # resume a specific sessionWhile using it, you can use /model, /status, and /plan as with regular Codex.
Other slash-commands are not supported. See rubric --help for further help.
It also has a view-only mode, so that you can at least get the benefit of nice maths display when using Claude Code.
rubric view # pick a previous session to view (in current directory)
rubric view --next # view the next session that has any activity (global)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.
- 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.
