lorekit AGENTS.md

Project instructions for Lorekit’s AGENTS.md file, which guides AI agents working on the source code. Lorekit is a toolkit for letting AI build and maintain a personal knowledge base.

In plain words
What is it for?
Use them when changing Lorekit’s code, documentation, or project context, especially when handing work to a new AI session.
Why use it?
They separate coding rules from installation and usage help, while pointing the agent to current project status, architecture, and verification steps.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/gyf0311/lorekit/agents-md
Clone the repo
git clone --depth 1 https://github.com/GYF0311/lorekit

Made for: Codex, OpenCode.

Per session 2,123 This file is loaded in full into every session.
When invoked 2,123 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.02123 $0.02123
Opus 5 $0.01061 $0.01061
Sonnet 5 $0.00425 $0.00425
Haiku 4.5 $0.00212 $0.00212

Measured 2d ago against content hash dc7b8cee084a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

lorekit 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 · 169 lines

How it starts

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

AGENTS.md — lorekit

本文件是 lorekit 源码仓库的 AI coding 入口,只服务于开发、维护和交接。 如果用户要安装或使用 lorekit,请转到 README.mddocs/INSTALLATION.mddocs/QUICKSTART.md,不要把安装支持误当成源码改动任务。

Project Status

  • 当前版本:以 VERSIONpackage.json 为准,本文件不重复记版本号。
  • 产品边界:AI 负责语义判断;lorekit CLI 负责确定性、安全、可重复的文件、状态、索引、检索动作。
  • 当前任务、近期进展、剩余收尾:一律以 .context/CHECKPOINT.md.context/STATUS.md 为准。本文件只承载恒定规则,不维护会过期的状态快照。
  • 历史日志在 docs/history/,默认不读。

入口边界

读者 / 任务 先读
人类或用户评估 lorekit README.md
用户或 AI 安装 lorekit docs/INSTALLATION.md,再读 docs/QUICKSTART.md
AI 修改 lorekit 源码 本文件,再按下方 CMAP route
贡献者理解架构 docs/CONVENTIONS.mddocs/ARCHITECTURE.mddocs/CODEBASE-MAP.mddocs/DESIGN-NOTES.md

不要把长安装教程放进本文件。安装文档漂移时,改 README.md / docs/INSTALLATION.md / docs/QUICKSTART.md

CMAP 项目地图(接手时必读)

本仓库已接入 CMAP,.context 是 repo-local 项目地图,用来帮助 AI 新会话快速续接上下文;它不替代本文的项目规则。

接手顺序:

  1. 先读本文,确认数据安全、文档同步和验证规则。
  2. .context/CHECKPOINT.md 看当前任务和最近验证。
  3. .context/MAP.md 看模块地图、数据流和路由规则。
  4. 运行 cmap route "<task>",只读取命中的 .context/modules/<module>.md,不要默认全量读取 .context
  5. 修改代码、docs 或 .context 后,按 .context/VERIFY.md 跑验证;收尾至少跑 cmap verify --changedgit diff --check

可信事实源:.context/MAP.md.context/CHECKPOINT.md.context/STATUS.md.context/DECISIONS.md.context/VERIFY.md.context/modules/*.md

辅助层:.context/out/.context/inbox/.context/generated/.context/logs/.context/ideas/_cmap/lorekit/_cmap-view/。这些只做候选、日志或展示,不直接当项目事实。

正文约定:.context 的人读正文默认中文;frontmatter key、module id、命令、路径和代码标识符保留英文,保证 cmap CLI 可解析。

AI 编码 12 条准则

These rules apply to every task in this project unless explicitly overridden. Bias: caution over speed on non-trivial work. Use judgment on trivial tasks.

Rule 1 — Think Before Coding

State assumptions explicitly. If uncertain, ask rather than guess. Present multiple interpretations when ambiguity exists. Push back when a simpler approach exists. Stop when confused. Name what's unclear.

Read the full file on GitHub · 169 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 First seen · 169 lines · 2,123 tokens per session scan A dc7b8cee084a

Subscribe to this mod's changes

lorekit AGENTS.md is an instructions file published in the GitHub repository GYF0311/lorekit (5 stars, last pushed 1mo ago), licensed MIT. It adds 2,123 tokens to every session, about $0.0106 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-31.