papyrus: Instructions file for Codex

AGENTS.md

papyrus AGENTS.md is an instructions file for Codex, OpenCode from abhichat85/papyrus. It costs 1,444 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for coding agents working on Papyrus, a document-ingestion engine that turns files into Markdown and JSON Lines chunks. They define its architecture and rules for handling messy input.

In plain words
What is it for?
Use them when changing Papyrus, especially when adding parsers, renderers, or conversion behavior.
Why use it?
They help an agent avoid breaking the boundary between file parsers and output renderers, and require recoverable input problems to produce warnings where possible.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

This is abhichat85/papyrus's own configuration. It tells Codex and OpenCode how to work on papyrus itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything papyrus configures →

Reuse

Borrowing it

Nothing to install: this file belongs to abhichat85/papyrus. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/abhichat85/papyrus/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/abhichat85/papyrus

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for papyrus AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/abhichat85/papyrus/agents-md/github.svg)](https://agentmods.dev/instructions/abhichat85/papyrus/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/abhichat85/papyrus/agents-md"><img src="https://agentmods.dev/badge/instructions/abhichat85/papyrus/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for papyrus AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/abhichat85/papyrus/agents-md"><img src="https://agentmods.dev/badge/instructions/abhichat85/papyrus/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,444 This file is loaded in full into every session.
When invoked 1,444 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01444 $0.01444
Opus 5.5 $0.00578 $0.00578
Sonnet 5.5 $0.00289 $0.00289
Haiku 4.5 $0.00144 $0.00144

Measured 2mo ago against content hash 3efb643aa1ac, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

papyrus AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 128 lines

How it starts

The opening of the file, as written. The whole thing — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

Instructions for AI coding agents working on Papyrus. Read this before changing anything. CLAUDE.md points here; this file is the source of truth.

What Papyrus is

A universal document ingestion engine. Any file in, agent-ready Markdown out. It is a deterministic library first, with a CLI, an HTTP API and a demo web app layered on top.

The one rule

bytes → detect → parser → Document IR → renderer → markdown
                              ↓
                          chunks.jsonl

Parsers never emit Markdown. Renderers never parse files. Everything meets at the Document IR (src/papyrus/ir.py). If you find yourself writing a # or a | inside src/papyrus/parsers/, stop — that string belongs in src/papyrus/renderers/markdown.py.

This is what makes a new format a single self-contained file. Breaking it costs the project its main property, so it is not a stylistic preference.

Core principles

  1. Degrade, don't crash. Messy input produces a Document with a warning appended. Only genuinely unreadable input raises ParseError. A parser that raises something unexpected is wrapped by Converter and surfaces as ParseError — never a bare traceback.
  2. Never trust a filename. detect() reads magic bytes first. A PDF named invoice.docx is a PDF.
  3. No LLM in the conversion path. Conversion is deterministic and free. Same bytes in, same Markdown out. An AI cleanup pass may exist later, but it is opt-in and it sits after the IR, never inside a parser.
  4. Use the format's own signal before a heuristic. Word marks header rows with w:tblHeader; HTML has <th>; PyMuPDF reports the header it detected; csv.Sniffer exists. Guessing from cell contents is the fallback, not the first move — see split_header(rows, hint).
  5. Preserve document order. python-docx hands you paragraphs and tables as separate collections; python-pptx hands you shapes in z-order; PDF text and tables come from two different passes. All three are reconstructed. A table rendered under the wrong heading is a correctness bug, not a formatting nit.
  6. Every uploaded file is hostile. Never execute input, never shell out, never write it outside a temp directory, always sanitise the filename with safe_name(). Every ceiling lives in Limits.
  7. Preserve provenance. sha256, source format, page anchors. A converted document must be traceable to the bytes it came from.

Read the full file on GitHub · 128 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 128 lines · 1,444 tokens per session scan A 3efb643aa1ac

Subscribe to this mod's changes

papyrus AGENTS.md is an instructions file published in the GitHub repository abhichat85/papyrus (0 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 1,444 tokens to every session, about $0.0058 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

papyrus AGENTS.md compared with instructions from other repositories

papyrus AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
papyrus AGENTS.mdabhichat85/papyrusInstructions file02mo agoApache-2.0A1,444Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot