Sanitism

Built for autists to communicate their work, sanely.

Autistic on the inside: one manifest, and every number traced to the script that made it. Sanitistic on the outside: a paper, a deck or a Word file your co-authors can simply read.

One number in manifest.yaml, six outputs. Edit it once and every output follows, because none of them holds a copy.

Two ways in

Keep a whole project area in one repo, or just get a folder. Either way you end up with the same project: pinned to a release, ready to build, with an agent skill that already knows the conventions.

A template repo leads two ways. Use this template on GitHub gives the project a repo with history, branches and pull requests. Running uvx init in a terminal gives a plain folder with no git. Both arrive at the same project: pyproject.toml pinned to a release, src/manuscript with manifest.yaml and docs, templates, and the agent skill in .claude/skills.

Scroll the figure sideways to see all of it.

Keep it in git

A repo per project area keeps every proposal, paper and talk about it together, reusing the same figures and numbers. Open a template, click Use this template, and name your repo.

The document-sanity-template repository on GitHub, marked Public template, with its folders: .github/workflows, scripts, src, styles and templates, and files including AGENTS.md, Makefile, README.md, init.py and pyproject.toml.
The document template on GitHub. There is one for presentations too.

Just give me a folder

No repo, no history, nothing to fork. One command copies the template into a new folder, so you can start writing. Add --git if you change your mind. It needs uv.

$ uvx document-sanity init my-paper

  → my-paper  (from document-sanity-template@be2c124)
    58 files written
    documents: src/manuscript/, src/proposal/
    agent skill: .claude/skills/document-sanity/

  next:
    cd my-paper
    uv sync                        # commit the uv.lock it writes
    uv run document-sanity check   # every target, before you share

That run wrote files. For a set of talks, run the same command with presentation-sanity in place of document-sanity.

The paper and its talks, in one repo

When a paper, its proposal, the talks and the posts are about the same work, they quote the same numbers, figures and tables. sanitism init sets up one repository for all of it: a document project in docs/, a presentation project in present/, and a shared/ folder whose manifest both import from. A number declared there is {{cohort_size}} in the paper and <DataValue var="cohort_size" /> in the deck, with one provenance record behind both.

$ uvx sanitism init my-project

  → my-project  (document-sanity 0.3.0, presentation-sanity 0.5.0)
    docs/      src/manuscript/, src/proposal/
    present/   presentations/kickoff/
    shared/    manifest.yaml, imported by every manifest above

  next:
    cd my-project
    make install                   # one environment for the whole repo
    make check                     # both sides, before you share

One pyproject.toml at the root gives the paper and the talks the same Python environment, and one command keeps an existing project current: uvx sanitism@latest update (or uvx document-sanity@latest update and uvx presentation-sanity@latest update for a project of one tool).

What goes in, what comes out

You write plain text that diffs well. The tools print it, and the prose and the numbers never drift apart, because there is only one copy of each.

document-sanity

For papers, proposals and reports. Markdown and one manifest.yaml become LaTeX, a PDF, a Word document from your own template, and an interactive HTML page where every number opens its provenance.

What you write: manifest.yaml, docs/*.md, figures, tables and refs.bib, and templates. One document-sanity check builds every target. What your readers get: LaTeX, PDF, Word, and interactive HTML where 12,453 traces back to data/qc.csv and scripts/qc.py.

Scroll the figure sideways to see all of it.

The starter manuscript in the interactive HTML viewer: a contents sidebar, the title and authors, and an abstract whose numbers 1,247 and 0.87 are marked as clickable.
The starter manuscript as interactive HTML. Each marked value opens the file, command and date it came from.

presentation-sanity

For talks, and the blog post that goes with each one. A project holds every talk you give about it; a new version of a talk is a new folder, and all of them share the same numbers, figures and manim scenes.

What you write: manifest.yaml, presentations/kickoff/v2 with slides.md and blog.md, scenes/*.py for manim, and shared components. presentation-sanity build renders scenes and figures once. What your audience gets: a Slidev deck, a blog post, and PowerPoint with the manim videos still playing.

Scroll the figure sideways to see all of it.

The example deck's title slide: Every number in this talk knows where it came from. This deck reports 12,453 participants. Click that number.
The deck, presented from the browser.
The example blog post: Every number should know where it came from, with the same 12,453 participants marked as a clickable value.
Its blog post, reading the same numbers.

House rules

Written the way everything else is: once, in YAML.

# sanitism.yaml
principles:
  one_manifest: everything else is generated, never hand-edited
  every_number_has_a_source: the file, command and date travel with the value
  versions_are_folders: not branches, and not final_v3_REAL.docx
  one_repo_per_obsession: papers, proposals and talks share figures and numbers
  same_input_same_output: a rebuild never surprises your co-authors

Your agent knows the rules too

init installs a skill for Claude Code and other coding agents, so you can ask for the work instead of looking up flags.

  • /document-sanity onboardTurn a folder of Word files, PDFs and CSVs into a new document.
  • /document-sanity checkBuild every output and catch broken references before you share.
  • /presentation-sanity newStart the next version of a talk as a new folder.
  • /presentation-sanity deployPublish to GitHub Pages, after confirming the work is meant to be public.