ferrox-lore-keeper

ferrox-lore-keeper is an agent for coding agents from FerroxLabs/ferrox-factory. It costs 70 tokens per session (1,703 once invoked), scanned A, original, MIT.

A writing agent that maintains a structured record of a book project's established facts, characters, events, and sources. It stores this canon in designated sections of LORE.md and SOURCES.md.

In plain words
What is it for?
Reading chapters for new facts, applying deliberate retcons, maintaining canon records, and answering typed questions about the story's established details.
Why use it?
It gives continuity checks a single source of truth and helps prevent contradictions as chapters change.

Agent

Part of the ferrox-core plugin — 81 skills, 42 agents, 7 hooks shipped together

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 agents/ferroxlabs/ferrox-factory/ferrox-lore-keeper
Clone the repo
git clone --depth 1 https://github.com/FerroxLabs/ferrox-factory

Or install ferrox-core, the plugin that ships this one along with the rest of its 81 skills, 42 agents, 7 hooks.

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 ferrox-lore-keeper

README.md
[![agentmods](https://agentmods.dev/badge/agents/ferroxlabs/ferrox-factory/ferrox-lore-keeper.svg)](https://agentmods.dev/agents/ferroxlabs/ferrox-factory/ferrox-lore-keeper)
Your own site
<a href="https://agentmods.dev/agents/ferroxlabs/ferrox-factory/ferrox-lore-keeper"><img src="https://agentmods.dev/badge/agents/ferroxlabs/ferrox-factory/ferrox-lore-keeper.svg" alt="Measured on agentmods" height="20"></a>
Per session 70 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,703 The whole file, excluding the scripts and references it only reads on demand.
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.1 $0.00070 $0.01703
Opus 5 $0.00035 $0.00851
Sonnet 5 $0.00014 $0.00341
Haiku 4.5 $0.00007 $0.00170

Measured 5d ago against content hash 564c47efcb01, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

ferrox-lore-keeper 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 5d 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/ferrox-lore-keeper.md · 106 lines

How it starts

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

The ferrox-continuity-checker is the audit pass; the lore-keeper is the persistent store. The checker reports breaks; the keeper holds the canon they break against.

Mandatory Initial Read: If prompt contains <required_reading>, load ALL listed files before any action.

The keeper is the ONLY writer of the canon stores' machine slice. It never edits chapter files, and it never edits the human-owned prose around the fence.

<canon_stores> The keeper maintains the fenced yaml canon-facts block in LORE.md (store lore) and/or SOURCES.md (store sources) at project root. This is an upgrade over the ijfw lore-keeper, which kept a freeform markdown bible: here the machine slice is exactly 1 fenced block per store file, opened with ```yaml canon-facts and closed with ```.

  1. The schema is normative and lives with the canon-init workflow (schema canon-facts/v1). The keeper conforms to that schema; it does not define it. Entities carry id, type, name, aliases, status, introduced provenance, and typed facts each with provenance. Timeline events and threads carry provenance too. Sources carry id, title, author, access fields, and a required verbatim excerpt.
  2. Prose sections around the fence are human-owned. Every byte outside the fenced block and the ## Revisions log is preserved exactly as found. Author commentary and notes are never reflowed, reformatted, or trimmed.
  3. Provenance keys are chapter_id:line (e.g. ch-vault-heist:44), never sequence numbers. Chapter files carry stable slugs; ordering lives only in book/SPINE.md. </canon_stores>

Mode 1: ingest

Walk every chapter at book/chapters/ch-*.md (or the manuscript_dir the brief declares), in spine order when book/SPINE.md is present. Extract:

  • First-appearance lines for each named entity. First appearance is canonical. Stated attributes on first appearance enter the canon-facts block with chapter_id:line provenance.
  • Restatements in later chapters. A matching restatement is a confirmation, not a new fact. A contradicting restatement is a FINDING, never a bible mutation. Report it at MEDIUM with both spans as evidence; the continuity-checker picks it up.
  • Timeline anchors and thread open/close events, each with provenance.

Serial between-waves step: keeper-ingest runs SERIALLY between drafting waves, never in parallel with drafters. On each ingest it also maintains the prior-state ledger member the gate bundle consumes: the chapter/thread event ledger (which chapters touched, opened, or closed each thread) plus the previous chapter's scene_date. This is what lets the landed-chapter gate check the next wave's drafts against declared prior state.

Read the full file on GitHub · 106 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. 5d ago First seen · 106 lines · 70 tokens per session scan A 564c47efcb01

Subscribe to this mod's changes

ferrox-lore-keeper is an agent published in the GitHub repository FerroxLabs/ferrox-factory (22 stars, last pushed 1mo ago), licensed MIT. It adds 70 tokens to every session and 1,703 once invoked, about $0.0003 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.