bab-ilu: Instructions file for Claude Code

CLAUDE.md

bab-ilu CLAUDE.md is an instructions file for Claude Code from P1-103n1x/bab-ilu. It costs 2,094 tokens per session, scanned A, original, MIT.

A project guide for AI coding agents, stored in an AGENTS.md file. It describes the Bab-ilu project's principles, required practices, and design direction.

In plain words
What is it for?
Use it to guide agents working on Bab-ilu, especially when designing its learning process, feedback loops, and lens system.
Why use it?
It gives agents the project context and rules they need before changing code, including which decisions are treated as non-negotiable.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions Claude Code.

This is P1-103n1x/bab-ilu's own configuration. It tells Claude Code how to work on bab-ilu 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 bab-ilu configures →

Reuse

Borrowing it

Nothing to install: this file belongs to P1-103n1x/bab-ilu. 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/P1-103n1x/bab-ilu/v2.2-oss-public/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/P1-103n1x/bab-ilu

Made for: Claude Code.

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 bab-ilu CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/p1-103n1x/bab-ilu/claude-md/github.svg)](https://agentmods.dev/instructions/p1-103n1x/bab-ilu/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/p1-103n1x/bab-ilu/claude-md"><img src="https://agentmods.dev/badge/instructions/p1-103n1x/bab-ilu/claude-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 bab-ilu CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/p1-103n1x/bab-ilu/claude-md"><img src="https://agentmods.dev/badge/instructions/p1-103n1x/bab-ilu/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,094 This file is loaded in full into every session.
When invoked 2,094 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.02094 $0.02094
Opus 5 $0.01047 $0.01047
Sonnet 5 $0.00419 $0.00419
Haiku 4.5 $0.00209 $0.00209

Measured 10d ago against content hash 0d9ee8042f94, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

bab-ilu CLAUDE.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 10d 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.

CLAUDE.md · 127 lines

How it starts

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

Bab-ilu — Agent Project Guide (v2.1)

This file is read by Claude Code and other AI agents at session start. It tells agents how the project is organized and what conventions are non-negotiable. Authority source: PRD-v2.1-zh.md (especially §0.5 theoretical foundation, locked).


0. 理论基础(硬约束 · 每次会话前置词)

本节同步自 PRD-v2.1-zh.md §0.5.2 + §0.5.3。PRD 为权威源;若此处与 PRD 漂移,以 PRD 为准。修订本节需要重新对齐控制论与晚期维特根斯坦的理论基础。

核心价值命题(写死)

Bab-ilu 不是一个"知道规则"的系统,是一个"从实践中长出规则"的系统。

  • 控制论(Wiener / Ashby / Beer)给"如何从实践中长"的工程实现——闭环、自适应、变异度匹配、晚绑定。
  • 晚期维特根斯坦(《哲学研究》——语言游戏 / 家族相似性 / 生活形式 / 规则跟随悖论)给"为什么必须从实践中长"的哲学依据。

这两者不是并列的两个参考,是同一世界观的工程侧和哲学侧。 所有与此核心命题冲突的设计决策都被拒绝,不论它在局部是否"更方便"。原则之间若产生冲突,回溯此命题决裁。

五条可操作原则

# 原则 具体含义
1 晚绑定(late binding) 任何能延迟的全局决策都延迟;优先收集 variety,再归纳
2 反本质 Lens schema 松散,允许每个 lens 有独特字段;不强制共享结构(家族相似性)
3 闭环优先 工程上先保证真实闭环(accept/reject 持久化 / 自适应阈值 / 反向提示词 / 跨会话学习),再考虑功能扩展
4 Variety 匹配(Ashby) Lens 必须能随用户 variety 成长。LENS EVOLUTION 是 Ashby 定律的工程实现
5 实践优于规则 不做"什么是好 lens"的教条;展示美学作为范例 + 邀请社区贡献,标准在实践中涌现

对 Karpathy 原教旨的必守点

这两处是 Karpathy 原文明示、但 Bab-ilu v2.1 尚未落地的核心机制。任何未来 PR 触碰 /ask/lint 时,必须朝这两个方向推进而非偏离:

  • /ask 回存——"good answers can be filed back into the wiki as new pages... your explorations compound in the knowledge base just like ingested sources do." 每次 /ask 应询问归档为 wiki/syntheses/<slug>.md
  • /lint 主动建议——"the LLM is good at suggesting new questions to investigate and new sources to look for." /lint 不只做局部合规检查,还要给出矛盾检测、过时检测、素材请求。

会话启动顺序(加入此节后更新)

每次会话启动时,agent 必须按以下顺序加载上下文:

  1. 本节 §0(理论基础) —— 绝不跳过。所有后续决策都须回溯这五条原则。
  2. PRD-v2.1-zh.md §0.5 —— 本节的权威来源与扩展说明。
  3. schema.md —— 数据契约。
  4. 下文项目特定约定(## What Bab-ilu Is 及之后)。

What Bab-ilu Is

Bab-ilu is a self-growing LLM-Wiki with pre-installed discipline-specific lenses. It extends Karpathy's LLM-Wiki with two structural additions: a pre-installed lens slot (currently occupied by the aesthetic-warburg lens as the stress-test reference implementation) and a user-space evolving lens layer (Zettelkasten fallback + LENS EVOLUTION that grows action-lenses from user behavior). See PRD-v2.1-zh.md §0.5 for the theoretical foundation locked as hard constraint.

Read the full file on GitHub · 127 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. 10d ago First seen · 127 lines · 2,094 tokens per session scan A 0d9ee8042f94

Subscribe to this mod's changes

bab-ilu CLAUDE.md is an instructions file published in the GitHub repository P1-103n1x/bab-ilu (11 stars, last pushed 4mo ago), licensed MIT. It adds 2,094 tokens to every session, about $0.0105 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

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 3,735 tokens