agentleFS
mfelisberto90mfelisberto90/msfPDF/AGENTS.md

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.

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
  1. Distinctive:

    Run all gates from the repository root before opening or updating any pull request:

    line 13

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md — Instructions for AI Coding Assistants & Autonomous Agents

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 #9 BiDi visual reordering) with searchable /ToUnicode CMaps.

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:showcase

Hardened release binary build (strips local host paths via --remap-path-prefix):

./scripts/build-release.sh -p msfpdf-cli

Non-Negotiable Architectural & Security Invariants

  1. Zero Runtime Dependencies in TypeScript: package.json "dependencies" must remain {}. scripts/security-lint.py fails CI if any runtime dependency is added.
  2. Exact Integer Monetary Arithmetic: crates/msfpdf-core/src/money.rs and formatMoneyMinor accept integer minor units (pence, cents, centavos, kopecks, fils, halalas, yen) across GBP, EUR, USD, BRL, JPY, RUB, AED, and SAR. Never introduce f32/f64 inside money.rs or pass floats for currency values.
  3. 100% 7-Bit ASCII %PDF-1.4 Output (0 xref Drift): Every byte emitted by assemble_pdf14 / assemblePdf14 must be \n (0x0A) or printable 7-bit ASCII (0x20..=0x7E). Latin-1/CP1252 glyphs use /WinAnsiEncoding octal escapes; Cyrillic and shaped Arabic glyphs emit <HEX> Tj against dynamically subsetted 2048-UPM Type 3 vector fonts (/MsfVectorRegular*, /MsfVectorBold*) with /ToUnicode CMaps.
  4. 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-core must be mirrored identically in packages/ts/src and regenerated into docs/msfpdf-browser.js via npm run build:showcase.
  5. No Active PDF Actions or Remote Fetch Surface: Tokens /JavaScript, /JS, /Launch, /OpenAction, /RichMedia, and /SubmitForm are banned across the codebase to eliminate SSRF, LFI, and reader-exploit vectors.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.