OmniScript
OmniScript (OSF) is a typed, agent-native document format: one plain-text file holds a document, slides, spreadsheets, tables, charts and diagrams, plus the findings and decisions behind them. One Rust toolchain checks, queries and renders it, and serves it to agents.
2.0.0-alpha.3). The format and commands described here are implemented; details may still change before 2.0.0. See releases and roadmap.One file, every format
An OSF file is a sequence of typed blocks. Structure blocks hold the content people read: @doc (Markdown), @slide, @sheet (cells and live formulas), @table, @chart, @diagram and @code, with @meta for the title and theme and @include to compose files. The same source renders to PDF, DOCX, PPTX, XLSX, HTML, Markdown and JSON.
@meta { title: "Q3 review"; theme: corporate; }
@doc {
# Summary
Revenue grew **18%** quarter on quarter.
}
@sheet {
id: "budget";
name: "Budget";
formats: { "B": "#,##0"; };
A1 = "Region"; B1 = "Revenue";
A2 = "North"; B2 = 1520;
A3 = "South"; B3 = 1340;
A4 = "Total"; B4 = =SUM(B2:B3);
}Semantic blocks
Five block types carry the things knowledge work is made of. Each needs an id, has a closed set of status values that osf lint checks, and may have a Markdown body.
| Block | Holds | Key properties |
|---|---|---|
@finding | A claim supported by evidence | claim, confidence, evidence, status |
@decision | A question with options and an outcome | question, options, criteria, status, outcome |
@requirement | A MoSCoW requirement | level, statement, verify, status, depends_on |
@action | A unit of work | title, assignee, due, status, depends_on |
@hypothesis | A testable statement | statement, confidence, supports, contradicts |
Four agent blocks connect a document to the agent stack: @data_source (fill a sheet, table or chart from an MCP tool), @agent_card (serve the document as an A2A agent), @task and @artifact (A2A work and its outputs). Blocks named @x-… are extensions: kept by the parser and formatter, skipped by renderers. See the block reference.
References, the document graph and selectors
Any block can have an id, and @ref("id") is a value that points at another block. A document becomes a graph: evidence, criteria, depends_on and the other reference properties are its edges. A dangling reference is a lint error.
@finding {
id: "F-1";
claim: "The North region beat its target by 12%.";
confidence: 0.9;
evidence: [@ref("budget")];
}
@decision {
id: "D-1";
question: "Roll out to all regions in Q1?";
options: ["Roll out now", "Extend the pilot"];
criteria: [@ref("F-1")];
}OSF selectors query the graph from the CLI, the WebAssembly package and the MCP and A2A servers:
osf query report.osf 'finding[confidence>=0.8]'
osf query report.osf '#D-1 -> criteria'More in Selectors and the document graph.
Agent protocols: MCP, MCP Apps and A2A
osf serve mcpexposes a folder of documents to MCP clients (stdio, or streamable HTTP with--listen) with the toolsosf.parse,osf.lint,osf.format,osf.query,osf.get,osf.set,osf.render,osf.diffandosf.view.osf.viewis an MCP App: hosts that support MCP Apps show the rendered document in the chat.osf serve a2aruns a document that has an@agent_cardas an A2A agent, with built-in skills for querying, exporting, editing blocks and resolving decisions.- The
osfAgent Skill (osf skill install) teaches any SKILL.md-compatible agent to write and check OSF.
Details in Agents.
One toolchain
Everything is one Rust codebase: the parser, the model, formula evaluation, the renderers, the agent servers and the language server. It ships as one binary and one library:
| What | Install | |
|---|---|---|
| CLI | The osf binary: parse, lint, fmt, diff, render, query, graph, eval, serve, lsp | npm install -g omniscript-cli |
| Rust | The same binary from crates.io | cargo install osf-cli |
| JavaScript | omniscript-core: parse, lint, format, query and render (HTML, Markdown, JSON, Typst) in WebAssembly | npm install omniscript-core |
The browser playground runs on omniscript-core, so the preview there is the same HTML the CLI writes. osf lsp is a language server for VS Code and other editors.
Rendering
- PDF is typeset in-process by an embedded Typst compiler, with no browser or external tools.
--pdf-uawrites accessible PDF/UA-1. - DOCX, PPTX and XLSX are written natively. XLSX keeps formulas live, keeps number formats and gets native charts.
- Sheet formulas are evaluated with IronCalc, so every format shows computed values, formatted with the sheet's
formats. - Charts are drawn as SVG; Graphviz
dotdiagrams are laid out byosfitself. Text in any script renders, using installed fonts where the bundled ones end. - The same renderers run behind the HTTP API on this site.
What comes next
A desktop editor (2.1), live re-evaluation and collaborative editing (2.2), and DOCX and PPTX import. The roadmap has the milestones.