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.
curl -O https://raw.githubusercontent.com/campfirium/foliole/dev/AGENTS.mdgit clone --depth 1 https://github.com/campfirium/folioleWrote 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.
[](https://agentmods.dev/instructions/campfirium/foliole/agents-md)<a href="https://agentmods.dev/instructions/campfirium/foliole/agents-md"><img src="https://agentmods.dev/badge/instructions/campfirium/foliole/agents-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.03427 | $0.03427 |
| Opus 5 | $0.01714 | $0.01714 |
| Sonnet 5 | $0.00685 | $0.00685 |
| Haiku 4.5 | $0.00343 | $0.00343 |
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 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.
How it starts
The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS
Decision Order
- 结果由用户当次最新指令定义;已有审定方案只补充用户已批准的稳定目标,不得扩张授权。代码、测试、fixture 或 controller 不能借当前实现改写目标;现场证据若证伪正式合同,停下交用户并由
/2修订。 - 执行路线先保护用户数据、安全、Mac
dev源码真相和结果真实性,再以已核实的当前现场事实选择路径;条件保护只有触发证据成立时高于实现偏好。在这些约束内,默认选择最快、最短、成熟且可复验的路线。 - 规则适用顺序是:根的跨仓硬边界与机械入口由局部规则细化,局部规则由当前任务和现场条件触发;计划只定义目标语义,不能反向定义当前事实。
- 条件保护必须保留条件语气;触发证据不存在或失效证据成立时,不得继续按永久禁令执行。计划、交接与执行不得把“当……时 / 仅在……下”加强成无条件“必须 / 不得”。实现偏好可被更短且同样可靠的成熟路线替换。
- 新增非显然绝对禁令前,必须明确单一 owner、来源、触发条件、失效证据和主要成本;无法说明时,只能写成条件保护或实现偏好。修规则优先删除、压缩、下沉和归一 owner,不另造治理体系。
Repository And Work Unit
- 当前仓库是
Electron + React + TypeScript + Vite + Capacitor多平台单仓;electron/、android/、ios/只承载薄宿主,src/app/与src/companion/承载 renderer shell,跨宿主业务、状态与稳定调用面归src/features/、src/store/、src/shared/。 - 默认直接在
dev连续小步推进,不创建 feature branch / worktree,除非用户明确要求。Windows 与 LAN Git 日常只消费 Macdev的精确镜像;用户明确建立的长期专项 branch 只能使用隔离 checkout,不得占用或决定日常源码现场。Windows 不向 Mac 提供、合并或决定源码候选。 - 临时 PR、冻结候选或验收 worktree 必须由
node scripts/diagnostics/transient-worktree-lifecycle.mjs create --path <path> --kind <development|acceptance> --target <branch>创建并登记;development 同时传--branch <branch>。结果进入目标分支或证据收口后,同一流程调用finish --path <path>。异常遗留由正常生产维护触发该入口的 7 天sweep,不得直接删除目录或让 lock 永久保留。 - 正式发布只使用短期
release分支,并按foliole-releaseskill 执行;禁止版本化 release 分支、cherry-pick、rebase、force-push 和人类 SHA 编排。每个 release 只由一个 pinned 发布主任务持有,公开必须由用户确认。 - 人工创建或交接 Foliole Codex 任务时,使用 saved project 的 local environment;有正式编号时,标题必须原样使用当前工作单元的编号并按实际结果命名,不得退化为 owning plan 总标题;没有正式编号时不得编造编号,直接按实际工作内容命名。同一编号与阶段已有未归档任务时继续原任务,不重复创建。完整提示可读且活动回合已建立后才算交付。自动 monitor 的 paused handoff 只按
codex-desktop-handoffskill 执行,根不复述其传输协议。 - 单次交付一个可运行、可验证、可回退的能力闭环;闭环按用户结果、数据语义或迁移语义划分,不按文件、测试、平台、提交数或耗时拆分,也不混入无关重构。
- 共享目标是“共享核心 + 薄宿主适配”;平台差异进入
src/shared/platform/**或对应宿主,不在 feature/store/editor 业务逻辑中复制平台分支。正式图标、菜单与命令必须同源、同名。
AGENTS Routing
- 启动时先读根
AGENTS.md;触及下列范围时再读最近的局部规则。局部规则只细化其路径,不得覆盖根的跨仓硬边界;同层冲突先停下确认 owner。
| 触及范围 | 局部规则 |
|---|---|
electron/**、scripts/desktop/**、scripts/macos/**、scripts/windows/**、playwright.desktop.config.ts、桌面数据库或运行链路 |
electron/AGENTS.md |
android/**、scripts/android/**、capacitor.config.ts |
android/AGENTS.md |
ios/**、scripts/ios/** |
ios/AGENTS.md |
src/companion/** |
src/companion/AGENTS.md |
src/features/editor/** |
src/features/editor/AGENTS.md |
src/app/components/** |
src/app/components/AGENTS.md |
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.
- today First seen · 87 lines · 3,427 tokens per session scan A 6d9dc71c61cd
foliole AGENTS.md is an instructions file published in the GitHub repository campfirium/foliole (119 stars, last pushed today), licensed Apache-2.0. It adds 3,427 tokens to every session, about $0.0171 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-09-06.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.