llm-nursery: Instructions file for Codex

AGENTS.md

llm-nursery AGENTS.md is an instructions file for Codex, OpenCode from tsuru0805/llm-nursery. It costs 4,881 tokens per session, scanned A, original, MIT.

A project guide for AI coding agents working on llm-nursery, a program that models caregiving and child development with SQLite data and scheduled events. It records the project’s modules, data rules, environment settings, and changes that must not be made.

In plain words
What is it for?
Reading the repository architecture, understanding its SQLite records and runtime flow, and checking which interfaces and rules code changes must preserve.
Why use it?
It gives an agent the project facts and safety rules it needs before changing code. This helps prevent broken data models, violated invariants, and changes in protected areas.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 llm-nursery AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/tsuru0805/llm-nursery/agents-md.svg)](https://agentmods.dev/instructions/tsuru0805/llm-nursery/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/tsuru0805/llm-nursery/agents-md"><img src="https://agentmods.dev/badge/instructions/tsuru0805/llm-nursery/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 4,881 This file is loaded in full into every session.
When invoked 4,881 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.04881 $0.04881
Opus 5 $0.02440 $0.02440
Sonnet 5 $0.00976 $0.00976
Haiku 4.5 $0.00488 $0.00488

Measured 4d ago against content hash 50dd917893fe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

llm-nursery 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 4d 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 · 机看版(给 AI 编码代理 / 二次开发者)

人看版(概念/玩法/快速开始)在 README.md。本文件只放结构化工程事实: 模块职责、数据模型、不变量、env、扩展点、禁改红线。改代码前先读「不变量」与「禁改」两节。

一句话架构

driver(短命子进程 CLI)→ child(生命周期+事务)→ model/decoder/guard(大脑三层) → db(SQLite 单库/caregiver)→ scheduler(tick:夜奶/偷学/睡眠整理/观察/outbox)→ events(里程碑/结局) → psyche(可选 LLM 心理层,fail-open)+ chunks/bond/observer/portrait(v0.2 养成取舍面) → asks/choices/chains/friction/magic/sickness/visible_growth(v0.3 中后期玩法面,全部幂等 fail-open 挂 tick) → letters/letter_prompts(v0.4 成年书信:毕业后 tick 只走信箱)。接入面:toolface(白名单,纯标准库)/ server.py(MCP 壳)。 平台:文件锁用 fcntl,POSIX only(macOS/Linux);本地时区口径,无 DST 处理(已知欠账)。

模块表

文件 职责 关键入口
nursery/model.py 插值式可变阶字符 Markov(0..5 阶同时计数);快照 zlib+json+sha256 VariableOrderMarkov.feed/sample_next/to_blob/from_blob
nursery/decoder.py 阶段化解码;唯一说话出口 speak(model, guard, stage, rng, ...) -> SpeakResult
nursery/guard.py 反复读护栏(LCS 6-gram 倒排预筛 + 4-gram shingle 比率)+ PII 遮盖 OverlapGuard.add_source/check, scrub_pii
nursery/child.py 出生/孵化/命名/阶段推导/状态机(惰性结算)/喂语料/说话/找回;全部事务纪律在此 create_child/hatch_child/pick_name/name_babble/feed_corpus/child_speak/apply_action/ChildBrain
nursery/db.py schema v12 + 事务化迁移(旧档打开即升级;v9 起同时钉 per-child rules_v3_since 戳;v12=letters 表);连接 PRAGMA(WAL/FK/busy_timeout) connect(db_path)(db_path 必填,无默认)
nursery/events.py 里程碑(含首次四连)/每日确定性抽签(送礼藏品卡)/语出惊人(滚动 7 天配额+锚滤渣)/夜哭忽视/出走/毕业过渡弧+告别窗+五结局(v0.4:预告→他提出离开→3 天窗→窗满自告别)/阶段装订/生日/逐夜账 tick_events / tick_farewell_arc / farewell_window / in_departure_window / judge_ending / closed_cry_nights
nursery/asks.py 需求事件:当日确定性排班/到点真开口/窗关记账(接住=响应者进账,漏窗不惩罚)+告状稿派生(action_log 真账) plan_asks/fire_due_asks/settle_asks
nursery/choices.py 选择题两难:swear 触发+抽签模板(每模板一生一次)/choose 拍板(谁先拍算谁的)/超时自决;词块偏置+拍板语料 plan_choices/fire_due_choices/resolve_choice/settle_choices
nursery/chains.py 连续剧事件链:3 天一条,集间「照护人是否介入」(actor != system)定末集分支;断更废弃 plan_chains/fire_due_chain_eps
nursery/friction.py 摩擦轴:被晾(observer 公共口径)/摔门/深夜彩蛋/顶嘴取词;唠叨/台阶账在 child 侧同事务 tick_friction/annoy_stage/recent_direct_anchors
nursery/magic.py 真实语料魔法:时空穿越(真日期)/误译/故事复述/送礼说话——全部真语料派生,查不出不发 tick_magic
nursery/sickness.py 生病 arc:低频开窗/病中夜叫(夜哭同形)/痊愈;病窗解码扰动挂 child_speak 热路径(indexed 查询) tick_sickness/open_sickness_date
nursery/visible_growth.py 可见成长:宝贝盒(词块 top 派生)/小本子(心理决策锚词,绝不贴原文)/生日 set-piece tick_growth/treasure_list
nursery/chunks.py 家庭词块索引:提取(子串吸收)/场景加权抽选/睡眠整理重建(派生数据,可随时全量重建) consolidate_daily/pick_chunk/rebuild_index
nursery/observer.py 观察日志:晚间从真实统计派生旁观行,查不出=不发 daily_observe
nursery/bond.py 双照护人关系四维(亲近/安心/踏实/委屈)分账;历史半额估底 apply_locked/read_bond/bond_trends
nursery/portrait.py 成长画像:全量纯派生 JSON(零写入,不打标签) build_portrait
nursery/scheduler.py tick 编排:夜奶排班→到期触发→events(含开窗)→窗口静默闸→asks/choices/chains→偷学→魔法/生病→outbox 投递;graduated 分支只走信箱(letters+settle 悬窗);心理层挂尾 tick_all()/tick_one(db_path, viewer)
nursery/psyche.py 三轴规则表(程序层)+ LLM 结构化决策(fail-open)+ 锚词接力 apply_rules_locked/maybe_decide/latest_anchor_words
nursery/letters.py v0.4 成年书信:来信排程(结局基调+回信提前钳未来)/信体生成(LLM 骨架或无 key 本地模板,失败顺延+降频)/写信/探望两段/信箱读口(未读/读某封/分页) tick_letters_fast/deliver_due_letters/write_letter/tick_visit/in_visit/mailbox_summary/read_one_letter/graduation_portrait
nursery/letter_prompts.py 五结局信件骨架+通用生成模板(文案层,可整体替换;占位符名不能改) 常量
nursery/sampler.py 偷学抽样;外部存档只读硬闸;schema 约定见文件头注 connect_archive/sample_fragments
nursery/driver.py CLI:persona 指令/mama 通道(JSON)/--tick/--init-birth;flock run/dispatch/init_birth/main
nursery/toolface.py 工具面白名单(玩法指令 only,运维入口不放行),零 mcp 依赖 nursery(player, command)
nursery/texts.py / psyche_prompt.py 文案层(全部玩家文案:出生/命名/照料/事件/夜哭/出走)/ 心理 prompt——可整体替换,逻辑零改动 常量
nursery/config.py 大部分数值:阶段表/解码参数/动作效果/黑暗值/心理轴/预算闸(调度窗口在 scheduler,护栏阈值在 guard,试错上限在 decoder) 常量

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. 4d ago Changed · +6 lines · +664 tokens per session 50dd917893fe
  2. 8d ago First seen · 122 lines · 4,217 tokens per session scan A 11543beb3712

Subscribe to this mod's changes

llm-nursery AGENTS.md is an instructions file published in the GitHub repository tsuru0805/llm-nursery (34 stars, last pushed 6d ago), licensed MIT. It adds 4,881 tokens to every session, about $0.0244 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.

Related

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.

vercel/next.js · 7,296 tokens

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.

openai/codex · 5,153 tokens

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).

microsoft/vscode · 6,785 tokens

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).

microsoft/vscode · 5,001 tokens

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.

langchain-ai/langchain · 4,469 tokens

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.

github/spec-kit · 7,104 tokens