foliole: Instructions file for Codex

AGENTS.md

foliole AGENTS.md is an instructions file for Codex, OpenCode from campfirium/foliole. It costs 2,604 tokens per session, scanned A, original, Apache-2.0.

Repository-specific instructions for the Foliole codebase, including its structure, decision rules, and editing workflow. AGENTS.md is a file that tells coding agents how to work safely in a project.

In plain words
What is it for?
Use it when planning or making changes in the Foliole repository, especially when choosing files, branches, worktrees, and validation steps.
Why use it?
It reduces the risk of an agent changing the wrong files, ignoring project boundaries, or treating temporary conditions as permanent rules.

Instructions file for CodexOpenCode

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

This is campfirium/foliole's own configuration. It tells Codex and OpenCode how to work on foliole 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 foliole configures →

Reuse

Borrowing it

Nothing to install: this file belongs to campfirium/foliole. 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/campfirium/foliole/dev/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/campfirium/foliole

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 foliole AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/campfirium/foliole/agents-md/github.svg)](https://agentmods.dev/instructions/campfirium/foliole/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/campfirium/foliole/agents-md"><img src="https://agentmods.dev/badge/instructions/campfirium/foliole/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 foliole AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/campfirium/foliole/agents-md"><img src="https://agentmods.dev/badge/instructions/campfirium/foliole/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,604 This file is loaded in full into every session.
When invoked 2,604 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.02604 $0.02604
Opus 5.5 $0.01042 $0.01042
Sonnet 5.5 $0.00521 $0.00521
Haiku 4.5 $0.00260 $0.00260

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

Security

Grade A, and why

foliole 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 2d 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 · 70 lines

How it starts

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

AGENTS

Read any same-directory AGENTS.local.md alongside this file; it contains private, untracked local rules. Apply the same rule in subdirectories.

Decision Order

  • The user's latest instructions define the outcome. An approved plan only supplements stable goals already authorized by the user; it cannot expand authorization. Code, tests, fixtures, and controllers must not redefine the goal around the current implementation. If observed evidence disproves the formal contract, stop and refer it to the user.
  • Protect user data, security, source-of-truth code, and truthful results first, then choose a route using verified current conditions. Conditional protections override implementation preferences only when their triggers are evidenced. Within these constraints, choose the fastest, shortest, mature, reproducible route.
  • Root rules define hard repository-wide boundaries and mechanical entry points; directory rules refine them and apply according to the current task and observed conditions. Plans define intended semantics, not current facts.
  • Preserve conditional wording. Do not enforce a protection as a permanent prohibition when its trigger is absent or its invalidation condition is met. Plans, handoffs, and execution must not turn “when” or “only under” into unconditional “must” or “must not.” A shorter, equally reliable mature route may replace an implementation preference.

Repository And Work Unit

  • This is an Electron + React + TypeScript + Vite + Capacitor multiplatform monorepo. electron/, android/, and ios/ contain thin hosts; src/app/ and src/companion/ contain renderer shells; cross-host business logic, state, and stable interfaces belong in src/features/, src/store/, and src/shared/.
  • Deliver one runnable, verifiable, reversible capability increment at a time. Divide increments by user outcome, data semantics, or migration semantics, not by files, tests, platforms, commit count, or elapsed time. Exclude unrelated refactoring.
  • Product tasks do not implicitly authorize control-plane work. The control plane includes validators, controllers, orchestrators, gates, monitors, protocols, scanners, and general workflows that manage development, verification, acceptance, or agent execution; it excludes input validation, business controllers, and bridges required by the product. Additions or extensions require an explicit current user request or an approved plan naming them as independent deliverables with benefits and acceptance criteria. Generic requests to improve verification or complete an increment do not authorize them.
  • Product increments may run existing entry points, add minimal behavior tests and necessary fixtures, and repair tool regressions introduced in the current work to restore the existing contract; repairs must not expand tool responsibilities. If removing a proposed control mechanism leaves product goals and data/security invariants intact, describe its benefit independently rather than treating it as necessary implementation. Each change must directly serve the user outcome, necessary implementation, or minimal behavior verification; no separate attribution ledger is needed. Record unauthorized control-plane gaps as separate follow-ups, continue unblocked product work, and report pending acceptance with the concrete gap when blocked. Do not build unauthorized controls or claim a pass.
  • Use a shared core with thin host adapters. Put platform differences in src/shared/platform/** or the relevant host; do not duplicate platform branches in feature/store/editor business logic. Production icons, menus, and commands must share their source and names.

Read the full file on GitHub · 70 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. 2d ago Changed · +1 lines · +102 tokens per session 168c2fa58aba
  2. 3d ago Changed · +80 tokens per session bc75cfb399ff
  3. 8d ago Changed · -389 tokens per session 0d6a10a3785a
  4. 13d ago Changed · -36 lines · -3,727 tokens per session 4e3b4cc6d874
  5. 14d ago Changed · +10 lines · +1,089 tokens per session 8291013262d7
  6. 15d ago Changed · +2 lines · +741 tokens per session 669e18ec48a3
  7. 22d ago Changed · -24 tokens per session debdee23e53e
  8. 26d ago Changed · +1 lines · +228 tokens per session f12e2143ec1f
  9. 1mo ago Changed · +2 lines · +441 tokens per session 7fef601da6b2
  10. 1mo ago First seen · 90 lines · 4,063 tokens per session scan A d2afdd8b8f4a

Subscribe to this mod's changes

foliole AGENTS.md is an instructions file published in the GitHub repository campfirium/foliole (145 stars, last pushed yesterday), licensed Apache-2.0. It adds 2,604 tokens to every session, about $0.0104 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-09-06.

Related

foliole AGENTS.md compared with instructions from other repositories

foliole AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
foliole AGENTS.mdcampfirium/folioleInstructions file145yesterdayApache-2.0A2,604Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode