VisiMark logo

VisiMark

the numbers in your Markdown, checked on every commit

…and catches AI arithmetic hallucinations, too! …and gives you spreadsheet mechanics, too! …fat fingers no more! …so stale values are impossible!

Author

Write Net = Price * Qty instead of 50.00. The document computes itself and still renders on GitHub, in previews, through pandoc — no plugin.

| Item  | Price | Qty |   Net |
|-------|------:|----:|------:|
| pen   |  2.00 |  10 | 20.00 |
| paper |  0.15 | 100 | 15.00 |
```vmark #order
Net   = Price * Qty
total = SUM(Net)
```
Total: **35.00**<!--vmark=order.total-->
$

Use formulas to recompute easily.

| Item  | Price | Qty |   Net |
|-------|------:|----:|------:|
| pen   |  2.20 |  10 | 20.00 |
| paper |  0.15 | 150 | 15.00 |
```vmark #order
Net   = Price * Qty
total = SUM(Net)
```
Total: **35.00**<!--vmark=order.total-->
$ visimark fmt figures.md

Edit inputs and run fmt.

| Item  | Price | Qty |   Net |
|-------|------:|----:|------:|
| pen   |  2.20 |  10 | 22.00 |
| paper |  0.15 | 150 | 22.50 |
```vmark #order
Net   = Price * Qty
total = SUM(Net)
```
Total: **44.50**<!--vmark=order.total-->
$

VisiMark only recomputes what it owns.

Adopt

Already have a table full of numbers? visimark infer derives the rules that reproduce them, so you don't retype anything.

| Item  | Price | Qty |   Net |
|-------|------:|----:|------:|
| pen   |  2.00 |  10 | 20.00 |
| paper |  0.15 | 100 | 15.00 |
Total: **35.00**




$ visimark infer figures.md

An ordinary table you already have. No formulas.

| Item  | Price | Qty |   Net |
|-------|------:|----:|------:|
| pen   |  2.00 |  10 | 20.00 |
| paper |  0.15 | 100 | 15.00 |
Total: **35.00**
$ visimark infer figures.md
  column rules
    Net = Price * Qty    2/2 ok

  1 rule, 1 scalar written.

infer finds the meaning in the data.

| Item  | Price | Qty |   Net |
|-------|------:|----:|------:|
| pen   |  2.00 |  10 | 20.00 |
| paper |  0.15 | 100 | 15.00 |
```vmark #order
Net   = Price * Qty
total = SUM(Net)
```
Total: **35.00**<!--vmark=order.total-->
$

Now self-computing and ready for check.

Enforce

visimark check fails CI the moment a number and its formula disagree. This is the one that matters — Author and Adopt exist to get you here. VisiMark catches:

  • human errors
  • stale values
  • AI arithmetic hallucinations
$ visimark check figures.md
 figures.md — 4 values agree
$ echo $?
0

Non-zero exit on the first disagreement. Build failed.

Install VisiMark  Try in Playground

Five documents, five differentiators

Not just a spreadsheet for Markdown — a build tool, an agent harness, a human error verifier, executable documentation and a safety net for stale artifacts.

1. Build tool — test-suite sharding

CI needs to split a test suite across parallel runners so no single shard drags. Most teams keep that split in a hand-maintained matrix that quietly drifts from the suite's real shape. Here the sharding policy is the document, and visimark eval is the thing CI itself reads to build the matrix.

Find out: why a build tool reads a Markdown file

2. AI agent harness — a spending ledger

An autonomous coding agent needs a spending cap it can't talk itself out of. Here the cap and the running spend live in a document a harness checks before the next tool call is allowed to fire — the enforcement point sits outside the agent entirely.

Find out: why this is a harness artifact, not a spreadsheet

3. Human error verifier — a deck joist calc

A structural calc gets retyped by hand between engineer, permit office and contractor, and every retyping risks a transposed digit — a failure mode with no compile error. This calculation sheet is built to catch exactly that before anyone builds the deck.

Find out: why this is a verifier, not a calculator

4. Executable documentation — a pricing policy

Pricing pages, sales decks and billing configs usually restate the same numbers independently until one of them lags behind a tier change. Here the pricing policy's prose and the exact values the billing engine reads at deploy time are the same file.

Find out: why this is knowledge extraction, not documentation-as-code

5. Safety net for stale artifacts — an onboarding dashboard

A funnel chart pasted into a quarterly slide looks current forever, even after the numbers behind it move. Here the chart is a generated artifact of the document, and check refuses to let it disagree with the table beside it.

Find out: why this is the safety net, not the feature

Try it out, learn on the go

No install required — play with VisiMark right now.

Playground

  • Edit formulas with live preivew
  • Learn with tutorial scenarios
  • Watch inference, reasoning and knowledge extraction live for your AI workflow
Open the Playground →

VS Code extension

  • Defeat stale values and ambiguous dates
  • Conquer formulas with Inlay hints, CodeLens and quick fixes
  • Format on save that repairs only computed cells and anchors
Install in VS Code →

Explore

See VisiMark in action, from the first formula to a red build.

VisiMark turns numbers in Markdown from claims into auditable derivations. Ten ways that shows up, from the first formula to a red build.

Markdown that computes itself

Keep the document. Add the mechanics.

VisiMark brings formulas, derived values, totals and verification to Markdown — without turning your document into a proprietary spreadsheet. The table below is ordinary GFM. The vmark block next to it is the only new thing: one rule per column, one aggregate, one anchor. Source on the left, what a reader actually sees on the right.

figures.md


            

Rendered preview

→ Still Markdown. Now verifiable.

A document can look right and still be wrong

Someone changes an input. The document still renders normally. The numbers still look plausible. But the calculation is now wrong. VisiMark can tell you.

Below is a real invoice, live: someone raised on-call hours from 12 to 20 and nothing else changed. Read it the way a reviewer would.

invoice.md


            

Rendered preview

Nothing looks wrong. That's the point — on-call hours went from 12 to 20, and every figure derived from it stayed behind.

Trimmed — the full run is docs/example-invoice-drift.md.

→ It rendered clean. It was not correct.

Discover rules in existing tables

Don't rewrite an existing table by hand. VisiMark can inspect the values and infer rules that explain how they were calculated.

quote.md below is ordinary Markdown — someone typed every cell by hand, and the numbers agree only because they were careful. Run infer and watch the rule appear.

quote.md — before


            

Rendered preview

The full report also lists near-misses and detected constants: docs/example-quote-plain.md.

When the numbers admit more than one explanation, infer says so instead of guessing: a rule that fits every row but one is reported as a near-miss and never written, even with --write.

Change one input, follow every consequence

Change an input once. VisiMark follows its dependencies and recalculates the values that depend on it.

invoice.md

| Item            | Qty |   Rate |     Net |     VAT |   Gross |
|-----------------|----:|-------:|--------:|--------:|--------:|
| On-call support |  12 | 260.00 | 3120.00 |  717.60 | 3837.60 |

```vmark #lines
Net   = Qty * Rate
VAT   = Net * vat
Gross = Net + VAT
Amount = SUM(lines.Gross)
```

Due on delivery: **3837.60**<!--vmark=lines.Amount--> PLN.

What it recalculates

graph TD
    Qty --> Net
    Rate --> Net
    Net --> VAT
    Net --> Gross
    Gross --> Amount["lines.Amount"]
              

→ One source of truth. Predictable downstream changes.

Review calculations like code

Calculated values live in your Markdown. Changes remain normal text changes. Review them in Git, in a pull request, or in a code review.

fmt locates each value it owns by byte position and splices the original text — it never round-trips through a Markdown printer, which would reformat every paragraph and list in the file. Hypothetically, if it did:

$ git diff --stat
 invoice.md | 272 ++++++++++++++++++++++++++++++++++++++++------------------
 1 file changed, 136 insertions(+), 136 deletions(-)

What fmt actually produces for the same change:

- Gross total: 28,659.00
+ Gross total: 31,217.40

→ The document stays a first-class version-controlled artifact.

Green means verified

A clean document is not necessarily a verified document. VisiMark also checks whether your tables are actually covered by rules.

A checker that only compares numbers to rules would call a table with no rules clean — the most misleading answer it could give. check reports it as a problem in its own right:

$ visimark check quote.md
quote.md

  COVERAGE a table with no `vmark` rules — nothing in this document is checked
           run `visimark infer` to derive them, or mark it <!--vmark:no-formulas-->

  1 problem (0 stale, 1 error)
$ visimark check quote.md
 quote.md — every value agrees
$ echo $?
0

→ The checkmark is a claim: these numbers were actually checked.

Put verification in CI

Don't just check the document. Check every change. Every pull request can verify that calculated values still agree with their rules before the change merges.

graph LR
    PR["PR #184"] --> Check["check"]
    Check --> Pass[PASS] --> Merge
    Check --> Fail[FAIL] --> Fix["fmt"]
    class Pass pass
    class Fail fail
    classDef pass fill:#eafaf0,stroke:#1a7f37,color:#1a7f37,font-weight:bold;
    classDef fail fill:#fdecea,stroke:#c0392b,color:#c0392b,font-weight:bold;
          
- uses: michal-niedzwiedzki/visimark@v0.1.0
  with:
    files: "docs/**/*.md"

Pass

 visimark check
  0 problems
Process completed with exit code 0

Every calculated value still agrees with its rule. The change merges.

Fail

 visimark check
  26 problems (21 stale, 5 errors)
Process completed with exit code 1

The on-call-hours edit left 21 values behind. Run fmt, push, re-run.

Any document under the glob with a table and no rules is a failure too — there is no strictness dial to find. The one way out is <!--vmark:no-formulas-->, written in the file, so the decision is about the document and not the CI run.

Works wherever Markdown works

GitHub, VS Code, pandoc

VisiMark adds computational semantics without taking Markdown away from the tools that already understand it. Readers don't need VisiMark to read the document — verified against GitHub, VS Code, pandoc and four other renderers.

GitHub

✓ pass — anchors stripped from output

VS Code preview

✓ pass — anchors pass through as a comment

pandoc → html5

✓ pass — anchors pass through as a comment

Charts and imports

Generated artifacts and external data, both verified

A chart statement draws an SVG straight from a sheet's own columns, kept honest by fmt and check the same way any other derived value is. A from clause does the reverse: a sheet's rows come from an external CSV instead of a GFM table, pinned by hash so a change outside VisiMark's view is never silent.

example-charts.md


            

Rendered preview

The SVG is drawn by fmt and checked byte-for-byte by check — change a cell and the picture goes STALE until it's regenerated.

from replaces the table entirely — the rows live in a CSV, and the fence line pins its exact bytes:

invoice.md


            

invoice.csv

Item,Unit,Qty,Rate,Net,VAT,Gross
Discovery workshop,day,2,1800.00,3600.00,828.00,4428.00
Backend implementation,hour,64,220.00,14080.00,3238.40,17318.40
Code review retainer,month,1,2500.00,2500.00,575.00,3075.00
On-call support,hour,12,260.00,3120.00,717.60,3837.60

Rendered preview

No column rules here — Net, VAT and Gross are read-only inputs from the CSV; only the SUM aggregates run in the document. A changed byte in invoice.csv fails check with STALE, or IMPORT if the hash clause is missing entirely.

Power tools

Eight ways in, one engine

More to explore — each is one command, documented in full in the CLI reference.

check

Verify calculations and fail on the first disagreement.

→ For your CI build.

fmt

Update stale calculated values while preserving the rest of the document.

→ To refresh calculations.

infer

Discover formulas from existing tables.

→ To power up your MDs.

eval

Inspect calculated values programmatically, including as JSON.

→ For your AI agent.

explain

Understand a sheet's inputs, rules and evaluation order.

→ As a cheat sheet.

chart

Generate a verified SVG from a sheet's own columns.

→ To manage artifacts.

Assertions

assert states an invariant a stray formula could still satisfy.

→ For your CI build.

VS Code extension

The same engine, as live diagnostics, quick fixes and hover.

→ Power up your editor.

Demonstration

Two documents from the repository, beside what they render to — scrolling in lockstep, not screenshots.

Guarantee of artifact integrity

A picture derived from the data, and proven to match it

A chart statement names columns the sheet already has. fmt draws the SVG and check proves the bytes on disk are still what the current table renders to — so the picture cannot quietly drift away from the numbers underneath it.

docs/example-charts.md


            

Rendered preview

docs/example-charts.md as committed, rendered client-side with marked.

Executable documentation

The document is the source; tooling reads it directly

An operating budget where the worker-node count is derived rather than typed. The prose is the specification, the tables are its inputs, and eval hands the results to whatever needs them next — documentation to computation to machine-readable output, not code to generated documentation.

docs/example-executable-documentation.md


            

Rendered preview

The same document, read by the CLI instead of a browser:

$ visimark eval infrastructure-budget.md --json
{
  "budget": {
    "WorkerBudget": 12000,
    "WorkerBudgetPercentage": 50
  },
  "kubernetes": {
    "MaxNodes": 48,
    "TotalCPU": 384,
    "UsableCPU": 307,
    "TotalMemory": 1536,
    "UsableMemory": 1228
  }
}

Installation

Two ways to bring VisiMark into a project.

As an npm package

Install the visimark command globally, or run it without installing at all — either way it runs under whichever of Bun or Node is on your PATH.

$ npm i -g visimark
# or
$ bun add -g visimark
# or, with no install at all
$ npx visimark check invoice.md

As an agent skill

VisiMark ships an agent skill — copy it in, and an agent picks up authoring and verification discipline automatically, no prompting required.

$ cp -r skills/visimark ~/.claude/skills/visimark

Its central warning is worth stating here too: a green check is evidence of agreement, not of derivation. Change an input and confirm the checker starts complaining before trusting a document is wired up.

See skills/visimark/SKILL.md for the full skill.

Numbers should be derived, not trusted.

VisiMark makes calculations explicit, changes reviewable, and numerical correctness enforceable — while keeping the document as plain Markdown.