Borrowing it
Nothing to install: this file belongs to 1A7432/loreweaver. 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/1A7432/loreweaver/main/AGENTS.mdgit clone --depth 1 https://github.com/1A7432/loreweaverWrote 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/1a7432/loreweaver/agents-md)<a href="https://agentmods.dev/instructions/1a7432/loreweaver/agents-md"><img src="https://agentmods.dev/badge/instructions/1a7432/loreweaver/agents-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.
<a href="https://agentmods.dev/instructions/1a7432/loreweaver/agents-md"><img src="https://agentmods.dev/badge/instructions/1a7432/loreweaver/agents-md.svg" alt="Reviewed on agentmods" width="80" 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.04419 | $0.04419 |
| Opus 5.5 | $0.01768 | $0.01768 |
| Sonnet 5.5 | $0.00884 | $0.00884 |
| Haiku 4.5 | $0.00442 | $0.00442 |
Grade A, and why
loreweaver 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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — contributor & AI-agent guide
Loreweaver is a self-hosted AI Game Master / Keeper for tabletop RPGs: a world/story-first engine (structured world + module + rules + persistent state), not a persona-chat frontend. Terminal-first over Iroh p2p, system-agnostic (D&D 5e SRD + CoC 7e), English-first with runtime en/zh i18n, MIT. This file orients humans and AI coding agents working in the repo — it is the single source of truth (CLAUDE.md just imports it). User-facing docs live in README.md; the open client protocol in docs/protocol.md; the extensibility contract in docs/plugins.md. The formats themselves are specified in docs/lwf/ (LWF, CC BY 4.0): a change to a pack/card/rulepack/hook/panel format updates the matching docs/lwf/formats/*.md in the same commit.
Architecture (layers, each with one job)
core/— deterministic engine (never AI-generated), rule-AGNOSTIC since M16: dice,resolution(pack-compiled check ladders + the QuickJSrules_scriptlane),sheets(pack-declared sheet shapes: canonical-name bridges, derived DAG — derived values are NEVER persisted — vitals, wire resources),character_rules(pack-constraint validation on every stat write path), clock,rulepacks(data-driven rule systems: resolution/sheet/subsystems/commands/expertise all pack data;tests/architecture/pins agent/ to zero system tokens),skills(SKILL.md loader), deterministic relationship tracks,modvars(deterministic module-variable trackers), worldbook,charcard(SillyTavern-card parser),table_habits— the M20 E procedural-memory type (how THIS table plays; keeper-side only, player projection returns None, index-only residency),chronicle— the M18 campaign-history types (chronicle/campaign_summary/thread: projections keep keeper annotations out of every player-grade view) plus the deterministic fold policy (0.60 trigger / 0.40 floor / 0.85 emergency, 4-turn no-future lag window), anddocuments— the M17 meta-type: ALL room content (lore/NPCs/sheets/pregens/modvars/MVU tree/notes/pools) is aDocumentin one table, and every type'sproject(doc, viewer)is THE single wire chokepoint for iron rule #3.infra/— plumbing: SQLite store (documents+room_state+ kv tables — content documents, room-scoped runtime state, non-room leftovers), pydantic-settings config + hot runtime overrides/credential book, i18n,llm/embeddings(each with aFake*offline double), vector,providers(multi-vendor LLM factory).agent/— the AI-KP brain:AgentCtx,tools(@toolschema-gen + gating),kp_tools*(the Keeper tools),forge(self-extension generators: skill/rulepack/module from a description),prompt_builder,loop(function-calling loop),services(the wiring bundle),chronicle(the M18 fold flow: batch-fold old chronicle records into the rollingcampaign_summarywhen the usage meter crosses the trigger; folded records join the embedding index for topical recall — records themselves are AUTO-WRITTEN since M21 by the Scribe, one player-grade line per material turn at zero extra model calls, so durable memory and the history trim that rides on it never depend on the Keeper rememberingrecord_chronicle; the keeper spoiler margin stays exclusive to that voluntary tool), knowledge-scopednpc/companionactors, and the three model-driven prep lanes that used to sit in core/ —module_initializer(full-text module analysis into the keeper/player pools),document_manager(chunking + RAG answers),char_from_persona(persona → rule-legal sheet; the validation half stays incore.character_rules).gateway/— platform-independent: session/events/turn/member/room state,commands/(dual-dialect + slash — a package:routerowns the spec table and dispatch, each domain is a mixin modulechecks/sheet/rules/rooms/cast/world/panels/media/llm/forge; a new command lands in its domain module plus one spec row, never in the turn pipeline),ops(rate-limit/censor/permissions),hub(the cross-transport RoomHub),director.net/—session(transport-agnostic SessionCore),iroh_server(p2p QUIC, the DEFAULT carrier),tui_server(WebSocket, offline-test/loopback only),keystore,admin,room_backup.adapters/—clionly (the local operator REPL). The five chat-platform adapters (Discord/QQ/Telegram/Feishu/OneBot) were REMOVED 2026-07-30: the UI direction is protocol clients with a deeply customizable UI extension layer (uiframes, panels), which text-chat platforms structurally cannot render. Don't re-add platform adapters; build againstdocs/protocol.mdinstead. The QQ path is a protocol client, the terminal client's bridge mode (official Bot API first, OneBot second).clients/— TypeScript:protocol(shared types +WsClient; published to npm asloreweaver-protocol, whosemajor.minortracks the wire-protocol version),tui(OpenTUI terminal client;IrohClientand the one-click host live here). Both speakdocs/protocol.md. The DESKTOP client — Loreweaver Studio, Tauri (Rust transport + React UI), play mode with tier-1/tier-2 panels and the keeper screens plus the card/pack studio — lives in the separateloreweaver-studiorepo and is the recommended player client; it consumesloreweaver-protocolfrom npm and pins itself to the engine with a cross-repo round-trip gate (bun run roundtripthere). Changing the protocol or a pack format here means that gate must be rerun there. Bumping the protocol means bumping it in all five places at once —net/session.py(the authority),protocol/src/types.ts, the npm manifest's version + description,protocol/README.md,docs/protocol.md— pinned bytests/architecture/test_protocol_version_sync.py.
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.
- 9d ago Changed · +54 tokens per session 6dfc429b2e63
- 1mo ago Changed · +52 tokens per session eb1dd18508b0
- 1mo ago Changed · +9 tokens per session c684da1cdf60
- 1mo ago Changed · +7 tokens per session 79252eced512
- 1mo ago Changed · +18 tokens per session 23992e0227d6
- 1mo ago First seen · 52 lines · 4,279 tokens per session scan A 19d3fb5920d1
loreweaver AGENTS.md is an instructions file published in the GitHub repository 1A7432/loreweaver (67 stars, last pushed 4d ago), licensed MIT. It adds 4,419 tokens to every session, about $0.0177 per session on Opus 5.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
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).
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.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
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.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deno copilot-instructions.md
Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.