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.
npx agentmods add instructions/ciao1019/petrichor/agents-mdgit clone --depth 1 https://github.com/Ciao1019/PetrichorWrote 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/ciao1019/petrichor/agents-md)<a href="https://agentmods.dev/instructions/ciao1019/petrichor/agents-md"><img src="https://agentmods.dev/badge/instructions/ciao1019/petrichor/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.02384 | $0.02384 |
| Opus 5 | $0.01192 | $0.01192 |
| Sonnet 5 | $0.00477 | $0.00477 |
| Haiku 4.5 | $0.00238 | $0.00238 |
Grade A, and why
Petrichor 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 — 159 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Codex 项目级说明(petrichor / dosphere)
本文件适用于当前 Petrichor 仓库及其子目录。它用于补充全局规则; 若与更深层目录的
AGENTS.md冲突,优先遵循更具体的规则。
语言与协作
- 默认使用中文沟通、解释和记录关键决策。
- 新增代码注释和文档优先使用中文;仅在库 API、协议字段或既有英文命名要求下使用英文。
- 修改前先理解现有实现和调用链,保持变更范围小而完整。
- 不提交密钥、连接串、Cookie、Token、私有 API Key 或
.env.local内容。
项目概览
- 仓库根目录提供统一命令;
apps/web是独立 Bun package,依赖、锁文件和补丁均保存在 Web 目录;apps/api是独立 Go module。 apps/web是 Bun + React + Vite + TypeScript 客户端 SPA,入口为apps/web/src/main.tsx,页面路由由react-router-dom管理。apps/api是 Go + Gin API 服务,接管/api/*和/healthz。- 生产环境由
apps/web/Caddyfile托管 Vite 静态资源并反代 Go API;apps/web/server.ts仅用于本地 Bun 运行。 - 数据层使用启用
pg_trgm与vector扩展的 PostgreSQL 16+,完整结构由apps/api/migrations/202608270002_init.sql定义,并由 Go 服务启动时自动执行。 - 认证使用 Sa-Token-Go 的 Gin 集成,token 状态由
sa_token_storage持久化到 PostgreSQL; 业务用户只保存在petrichor_user。 - 上传和公开文件访问使用 S3 兼容对象存储。
- 生产部署统一使用根目录
compose.yaml:Caddy、Go API、统一 Asynq Worker、本地 Redis 与仅回环地址开放的 asynqmon;Redis 使用go-redis/v9,通过 Asynq 承载知识构建和视觉导入队列,并保存视觉导入任务、页进度和死信状态。
常用命令
在仓库根目录执行:
bun install --cwd apps/web
bun dev
cd apps/api && go run ./cmd/server
bun run build
bun run test
bun run typecheck
bun run lint
docker compose up -d --build
只针对 Web 应用执行时使用:
bun run --cwd apps/web dev
bun run --cwd apps/web test
bun run --cwd apps/web typecheck
bun run --cwd apps/web lint
bun run --cwd apps/web build
查看数据库迁移状态使用纯 Go 命令:
cd apps/api && go run ./cmd/migrate status
目录约定
apps/api/cmd/server/:Go API 生产入口。apps/api/cmd/migrate/:Goose 数据库迁移命令入口。apps/api/cmd/worker/:统一 Asynq Worker 入口,分别消费知识构建与视觉文档导入队列。apps/api/internal/:Go 鉴权、业务、数据库、存储、缓存和 Agent 实现。apps/api/migrations/:随 Go 二进制内嵌的 Goose 初始化 SQL。apps/api/config.example.toml:Go 运行配置模板;本地真实配置为忽略提交的config.toml。apps/web/src/main.tsx:Vite 客户端入口。apps/web/server.ts:本地 Bun Web 静态服务与 Go API 同源反代入口。apps/web/Caddyfile:生产静态资源服务、压缩、缓存与 Go API 同源反代。apps/web/src/client-app.tsx:客户端路由总入口。apps/web/src/features/pages/:业务页面组件。apps/web/src/components/:通用组件、编辑器组件、shadcn/ui、第三方 UI 迁移组件。apps/web/src/lib/:浏览器侧工具、API client、路由工具。apps/web/bun.lock、apps/web/patches/:Web 依赖锁文件与本地依赖补丁。docs/:数据库、Agent、模型配置和设计说明。
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 Changed · +20 lines · +550 tokens per session a7208ba7205c
- 6d ago First seen · 139 lines · 1,834 tokens per session scan A 608f71ff4e27
Petrichor AGENTS.md is an instructions file published in the GitHub repository Ciao1019/Petrichor (127 stars, last pushed yesterday), licensed Apache-2.0. It adds 2,384 tokens to every session, about $0.0119 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.
Other instructions, from other repositories
kaas CLAUDE.md
Claude Code instructions for bybit-exchange/kaas, covering claude.md, behavioral guidelines, 1. think before coding, 2. simplicity first and 3. surgical changes.
ollama AGENTS.md
AGENTS.md instructions for ollama/ollama, covering agents.md and building.
ollama CLAUDE.md
Claude Code instructions for ollama/ollama: See AGENTS.md for the shared agent instructions for this repository.
llm-wiki-agent GEMINI.md
Gemini CLI instructions for SamurAIGPT/llm-wiki-agent, covering llm wiki agent — schema & workflow instructions, how to use, directory layout, page format and ingest workflow.
OpenKB AGENTS.md
AGENTS.md instructions for VectifyAI/OpenKB, covering agents.md — openkb map for coding agents, read next, dev commands, module map (openkb/) and hard invariants.
abap_wiki AGENTS.md
AGENTS.md instructions for Gixsy95/abap_wiki, covering agents.md - abapwiki operating contract, 1. identity and mission, 2. language, 3. architecture: the two planes and 4. inviolable rules.