msfPDF
AGENTS.md1 starsChanged 10 days agoMITView on GitHub
Quick Context: msfPDF is a sub-millisecond (0.16–0.52 ms), zero-rendering-dependency ISO 32000-1 (%PDF-1.4) vector document engine with 1:1 byte-identical parity across Rust (crates/msfpdf-core), Web-Standard TypeScript (packages/ts, 0 runtime npm dependencies — runs in Node 22+, Bun, Deno, Cloudflare Workers, and browsers), and a standalone < 1 MB CLI (crates/msfpdf-cli). It supports Latin / Western European (/WinAnsiEncoding octal escapes), Russian & Slavic Cyrillic (А-Я, а-я, Ё, ё, ₽, №), and Connected Arabic RTL (العربية contextual Isolated/Initial/Medial/Final shaping, mandatory لا/لأ/لإ/لآ ligatures, and UAX…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository5 other files it gives its agents.
- docs/llms-full.txtllms.txt
- docs/llms.txtllms.txt
- llms-full.txtllms.txt
- llms.txtllms.txt
- msfpdfSkill
The file
We split this AGENTS.md into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Run all gates from the repository root before opening or updating any pull request:
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md — Instructions for AI Coding Assistants & Autonomous Agents
Quick Context:
msfPDFis a sub-millisecond (0.16–0.52 ms), zero-rendering-dependency ISO 32000-1 (%PDF-1.4) vector document engine with 1:1 byte-identical parity across Rust (crates/msfpdf-core), Web-Standard TypeScript (packages/ts,0runtimenpmdependencies — runs in Node 22+, Bun, Deno, Cloudflare Workers, and browsers), and a standalone< 1 MBCLI (crates/msfpdf-cli). It supports Latin / Western European (/WinAnsiEncodingoctal escapes), Russian & Slavic Cyrillic (А-Я,а-я,Ё,ё,₽,№), and Connected Arabic RTL (العربيةcontextual Isolated/Initial/Medial/Final shaping, mandatoryلا/لأ/لإ/لآligatures, and UAX #9 BiDi visual reordering) with searchable/ToUnicodeCMaps.
Machine-Readable Context & Schemas
- Concise LLM Index:
llms.txt - Single-Fetch Full Documentation:
llms-full.txt - JSON Schema (Structured Outputs):
schemas/document-spec.schema.json - Installable Agent Skill:
skills/msfpdf/SKILL.md
Build, Test & Security Gate Commands
Run all gates from the repository root before opening or updating any pull request:
python3 scripts/security-lint.py
cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test --workspace
npm run typecheck
npm run test:ts
npm run build:showcaseHardened release binary build (strips local host paths via --remap-path-prefix):
./scripts/build-release.sh -p msfpdf-cliNon-Negotiable Architectural & Security Invariants
- Zero Runtime Dependencies in TypeScript:
package.json"dependencies"must remain{}.scripts/security-lint.pyfails CI if any runtime dependency is added. - Exact Integer Monetary Arithmetic:
crates/msfpdf-core/src/money.rsandformatMoneyMinoraccept integer minor units (pence,cents,centavos,kopecks,fils,halalas,yen) acrossGBP,EUR,USD,BRL,JPY,RUB,AED, andSAR. Never introducef32/f64insidemoney.rsor pass floats for currency values. - 100% 7-Bit ASCII
%PDF-1.4Output (0xrefDrift): Every byte emitted byassemble_pdf14/assemblePdf14must be\n(0x0A) or printable 7-bit ASCII (0x20..=0x7E). Latin-1/CP1252 glyphs use/WinAnsiEncodingoctal escapes; Cyrillic and shaped Arabic glyphs emit<HEX> Tjagainst dynamically subsetted2048-UPMType 3 vector fonts (/MsfVectorRegular*,/MsfVectorBold*) with/ToUnicodeCMaps. - Rust ↔ TypeScript Byte Parity: Any change to layout coordinates, AFM widths, QR mask scoring, Arabic shaping, BiDi ordering, or PDF object numbering in
crates/msfpdf-coremust be mirrored identically inpackages/ts/srcand regenerated intodocs/msfpdf-browser.jsvianpm run build:showcase. - No Active PDF Actions or Remote Fetch Surface: Tokens
/JavaScript,/JS,/Launch,/OpenAction,/RichMedia, and/SubmitFormare banned across the codebase to eliminate SSRF, LFI, and reader-exploit vectors.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

