paper-trail-resolve-textbooks

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

A command for resolving incomplete textbook references in a research-paper registry.

In plain words
What is it for?
Use it after importing references to clean up incomplete textbook records automatically.
Why use it?
It checks entries missing an author year or title, compares related entries, and assigns an automated outcome—merge, complete, or block—so these records do not remain unfinished.

Command for Claude Code

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

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

Good fit Use it after importing references to clean up incomplete textbook records automatically.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/roomi-fields/paper-trail/paper-trail-resolve-textbooks"><img src="https://agentmods.dev/badge/commands/roomi-fields/paper-trail/paper-trail-resolve-textbooks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 660 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.00062 $0.00660
Opus 5 $0.00031 $0.00330
Sonnet 5 $0.00012 $0.00132
Haiku 4.5 $0.00006 $0.00066

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

Security

Grade A, and why

paper-trail-resolve-textbooks 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 11d 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-resolve-textbooks.md · 68 lines

How it starts

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

/paper-trail:resolve-textbooks — Automated IA pass on incomplete refs

Nettoie les refs ingérées avec year/title manquant. Process 100% automatisé, pas de décision humaine ad-hoc.

Usage

/paper-trail:resolve-textbooks                  # dry-run : montre les décisions
/paper-trail:resolve-textbooks --apply          # applique

Ce que fait Claude (workflow strict)

  1. Liste les candidates :

    python3 -m pipeline resolve-textbooks --list > /tmp/textbook_candidates.json
    

    Le JSON contient : slug, author, year, title, state, ingest_source, pdf_path, et siblings (autres refs du registre avec même lastname, pour aider à la fusion).

  2. Invoque le sub-agent textbook-resolver avec le JSON en input :

    Agent(subagent_type="textbook-resolver",
          prompt="<contenu de /tmp/textbook_candidates.json>")
    

    Le sub-agent applique les règles définies dans son contrat (cf. agents/textbook-resolver.md) :

    • Préfère merge_into si un sibling avec PDF correspond
    • Sinon complete si textbook canonique reconnu (Sipser, Carton, etc.)
    • Sinon blocked (humain tranche)
  3. Sauve le JSON de décisions retourné par le sub-agent dans /tmp/textbook_decisions.json.

  4. Mode dry-run (par défaut) : affiche le résumé des décisions (nb par action), demande confirmation avant --apply.

  5. Mode --apply :

    python3 -m pipeline resolve-textbooks \
        --apply-from /tmp/textbook_decisions.json
    
  6. Récap final : N merged, N completed, N blocked.

Garde-fous

  • Sub-agent ne fabrique JAMAIS une année ou un titre incertain. Confidence < 80% → blocked (l'utilisateur tranchera via /paper-trail:decide <slug>).
  • Fusions traçables : la ref source passe en retracted avec retracted_reason: merged_into:<target>. Réversible via git.
  • Pas de bricolage manuel : Claude ne construit pas les décisions lui-même, il délègue au sub-agent. Process reproductible.

Read the full file on GitHub · 68 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. 11d ago First seen · 68 lines · 62 tokens per session scan A b16d92f5650c

Subscribe to this mod's changes

paper-trail-resolve-textbooks is a command published in the GitHub repository roomi-fields/paper-trail (5 stars, last pushed 7d ago), licensed MIT. It adds 62 tokens to every session and 660 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-31.