paper-trail-ingest

paper-trail-ingest is a command for Claude Code from roomi-fields/paper-trail. It costs 75 tokens per session (852 once invoked), scanned A, original, MIT.

A command that imports the citations from one SOTA document into a reference registry. It identifies citations, finds matching publication details, removes duplicates, and can replace plain-text citations with links.

In plain words
What is it for?
Use it to process one research document, create missing reference records, and link its citations to registry entries.
Why use it?
It turns scattered citation text into consistent, trackable references and lets you preview changes before applying them.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the paper-trail plugin — 6 skills, 22 commands, 6 agents, 3 hooks shipped together

Good fit Use it to process one research document, create missing reference records, and link its citations to registry entries.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/roomi-fields/paper-trail/paper-trail-ingest
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.

Clone the repo
git clone --depth 1 https://github.com/roomi-fields/paper-trail

Made for: Claude Code.

Or install paper-trail, the plugin that ships this one along with the rest of its 6 skills, 22 commands, 6 agents, 3 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 paper-trail-ingest

README.md
[![agentmods](https://agentmods.dev/badge/commands/roomi-fields/paper-trail/paper-trail-ingest/github.svg)](https://agentmods.dev/commands/roomi-fields/paper-trail/paper-trail-ingest)
Your own site
<a href="https://agentmods.dev/commands/roomi-fields/paper-trail/paper-trail-ingest"><img src="https://agentmods.dev/badge/commands/roomi-fields/paper-trail/paper-trail-ingest/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 paper-trail-ingest

Your own site · 80×15
<a href="https://agentmods.dev/commands/roomi-fields/paper-trail/paper-trail-ingest"><img src="https://agentmods.dev/badge/commands/roomi-fields/paper-trail/paper-trail-ingest.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 852 The whole file, excluding the scripts and references it only reads on demand.
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.00075 $0.00852
Opus 5 $0.00037 $0.00426
Sonnet 5 $0.00015 $0.00170
Haiku 4.5 $0.00007 $0.00085

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

Security

Grade A, and why

paper-trail-ingest 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.

commands/paper-trail-ingest.md · 84 lines

How it starts

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

/paper-trail:ingest <SOTA-path> — Ingest one SOTA

Étape 1 du pipeline cible : convertit un SOTA écrit en texte libre en un SOTA conforme (wikilinks vers refs registre).

Usage

/paper-trail:ingest <SOTA-path>                  # dry-run par défaut
/paper-trail:ingest <SOTA-path> --apply          # applique

Ce que fait Claude

  1. Vérifie git initialisé dans le vault (sinon refuse — propose pipeline ingest --init-git la première fois).

  2. Extrait les sections bibliographiques :

    python3 -m pipeline ingest <SOTA-path> --extract-only
    

    Retourne sur stdout un JSON [{header, is_excluded, raw_text, ...}].

  3. Pour chaque section non exclue, invoque le sub-agent citation-parser :

    Agent(subagent_type="citation-parser", prompt=<contenu_section_brut>)
    

    Le sub-agent retourne un JSON [{author, year, title, doi?, raw, ...}].

  4. Consolide tous les JSON de citations en un seul fichier /tmp/citations_<sota_stem>.json.

  5. Lance l'ingestion :

    python3 -m pipeline ingest <SOTA-path> \
        --citations-json /tmp/citations_<sota_stem>.json [--apply]
    

    Sans --apply : montre ce qui serait ingéré (dry-run). Avec --apply : commit git auto, crée refs candidates, substitue le texte par [[wikilinks]].

  6. Présente le récap intermédiaire : N nouvelles refs créées, N réutilisées, N substitutions, N skipped (low confidence), N erreurs.

  7. Sweep automatique des textbooks incomplets (uniquement si --apply) :

    • Liste les candidates :
      python3 -m pipeline resolve-textbooks --list > /tmp/textbook_candidates_<sota_stem>.json
      
    • Si le JSON est non-vide, invoque le sub-agent textbook-resolver :
      Agent(subagent_type="textbook-resolver",
            prompt=<contenu de /tmp/textbook_candidates_<sota_stem>.json>)
      
    • Sauve le JSON retourné dans /tmp/textbook_decisions_<sota_stem>.json, applique :
      python3 -m pipeline resolve-textbooks \
          --apply-from /tmp/textbook_decisions_<sota_stem>.json
      
    • Aucune décision humaine intermédiaire : le sub-agent applique ses règles documentées (agents/textbook-resolver.md) — merge / complete / blocked. Les blocked restent visibles via pipeline doctor.

Read the full file on GitHub · 84 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. 9d ago First seen · 84 lines · 75 tokens per session scan A 94b526703113

Subscribe to this mod's changes

paper-trail-ingest is a command published in the GitHub repository roomi-fields/paper-trail (5 stars, last pushed 6d ago), licensed MIT. It adds 75 tokens to every session and 852 once invoked, about $0.0004 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.