bento AGENTS.md

A repository guide for developers and AI coding agents working on bento, a project that stores office documents as single self-contained HTML files. It describes the project, naming rules, tools, and rules to read before changing code.

In plain words
What is it for?
Use it when working in the bento repository, especially before writing code. It helps explain the slides, spaces, dash, and vault applications and points to deeper project guidance.
Why use it?
It gives contributors the project-specific context and constraints they need before editing files. This helps avoid incorrect names, broken architecture assumptions, and changes that violate the repository’s rules.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/nyblnet/bento/agents-md
Clone the repo
git clone --depth 1 https://github.com/nyblnet/bento

Made for: Codex, OpenCode.

Per session 1,566 This file is loaded in full into every session.
When invoked 1,566 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.01566 $0.01566
Opus 5 $0.00783 $0.00783
Sonnet 5 $0.00313 $0.00313
Haiku 4.5 $0.00157 $0.00157

Measured today against content hash 483e9ab9e85c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

bento 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 today.

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 · 111 lines

How it starts

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

Working in this repo — agents & tools

Guidance for AI coding agents (Claude Code, Codex, Antigravity, …) and human contributors. This file is the tool-agnostic contract; Claude Code also reads CLAUDE.md (the deep architecture guide for slides/). If your tool only reads one file, read this one, then follow the pointers.

What this project is

bento — office documents as single self-contained HTML files. One file = the document + viewer + editor; it saves itself, updates itself over a signed channel, and optionally syncs E2EE through a blind relay. slides/ is the shipped app. Starting now: bento/spaces (Notion/notes-like), bento/dash (spreadsheet + tables), bento/vault (document library).

Naming and casing — lowercase everywhere. The platform is bento, the wordmark is bento/., and apps are bento/slides, bento/spaces, bento/dash, bento/vault. This applies to UI strings and prose as well as format constants — do not write "Bento Slides" in new copy. The / in the wordmark is decorative: anywhere a name is stored or typed (filenames, URLs, package names) it is plain bento. Full reasoning and the rejected candidates are in docs/DECISIONS.md — don't reopen them.

Read before writing code

  • docs/PLATFORM.md — invariants every Bento app must honor. Breaking these bricks files already shipped to users.
  • docs/PARALLEL-WORK.md — branch/merge discipline when many agents work at once (you are probably one of them).
  • docs/DECISIONS.md — settled decisions. Don't relitigate them in code; append new ones.
  • CLAUDE.md — deep architecture + hard-won gotchas, authoritative for slides/ internals.
  • docs/collab-design.md — the sync/collab spec + threat model.

Hard rules (each one has broken something before)

  1. Never let a literal </script> into a bundle or document block. JSON in the doc block escapes < as <; builders concatenate around it.
  2. The #bento-doc block stays plaintext, same id, regex-extractable. That's the splice contract (docs/PLATFORM.md) — updaters already shipped in old files are frozen code that depends on it.
  3. Never regenerate a document's docId. It's the document's identity for recovery, sync, and future merge.
  4. After any change to slides/src/sync/crdt.ts, run node scripts/test-sync.ts. The convergence rig has caught 15+ ordering bugs; a green typecheck means nothing for CRDT correctness.
  5. A password-protected deck never carries a plaintext preview of page one. Saves write a static first-page render into the shell for file-manager thumbnails (kernel/src/save.ts, slides/src/preview.ts); bento/enc decks are vetoed and any existing preview is stripped. Run node scripts/test-preview.ts after touching that path.
  6. New UI strings go into ALL i18n catalogs. English-string-as-key; never call t() in module-level consts. Never take the locale list from prose — including this file. It is LOCALES in that app's scripts/build-*-i18n.mjs, and ls <app>/src/i18n/ is the check. This rule said seven for a month after Portuguese made it eight, and #394 shipped an app one language short because it believed the sentence you are reading.
    • Adding a locale touches three places, not one: the catalogue file, the app's LOCALES, and any rig with its own copy of the list. Only build-i18n.mjs (slides) errors on a catalogue missing from LOCALES; the others exit 0 and silently never pack it.
    • A rig must derive the list, never restate it. scripts/test-i18n-coverage.mjs reads PACKED_LOCALES out of the generated packed.ts — copy that, and a fourth copy can never go stale. It covers slides ONLY (coreDir is hardcoded to slides/src/i18n), so spaces and type have no coverage rig at all. Do not assume your app's catalogues are checked by anything.
    • A locale code is not always a language. pt is Brazilian in slides/ and drifted European in spaces/; no check can see this, because both files are correctly named pt.ts. See docs/DECISIONS.md, 2026-08-29, before writing or reusing a catalogue for a language with regional variants.
  7. Never edit site/ — it's generated. Sources are site-src/ and the scripts/build-*.mjs tooling. Same for dist-single/.
  8. No AI co-author trailers on commits (no Co-Authored-By: Claude or similar), and no bot identities in git history.
  9. Releases are cut locally by the maintainer only. Never touch signing keys (~/.bento/release-key.json), never attempt to release, publish, or deploy from an agent session unless the maintainer explicitly asks.
  10. External PRs get provenance checks before merge (gh api users/<login>) — AI-agent/bot contributions are not merged.
  11. Verify before claiming done: typecheck, build, and exercise the change in a browser when it's user-visible. Report failures honestly.

Read the full file on GitHub · 111 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. today Changed · +19 lines · +340 tokens per session 483e9ab9e85c
  2. 3d ago First seen · 92 lines · 1,226 tokens per session scan A 59776bae22e8

Subscribe to this mod's changes

bento AGENTS.md is an instructions file published in the GitHub repository nyblnet/bento (4,651 stars, last pushed yesterday), licensed MIT. It adds 1,566 tokens to every session, about $0.0078 per session on Opus 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-30.