Skip to content
Content
Agent

textbook-resolver

Sub-agent that decides what to do with incomplete textbook references in the registry. Takes a JSON list of candidates (refs with year=0000 or title=empty, plus their siblings = other refs with same lastname) and returns JSON decisions (merge_into, complete, or blocked). Invoked

From plugin
paper-trail
66 skills6 agents22 commands3 hooks

Claude Code

$ npx -y skills add roomi-fields/paper-trail --agent claude-code

Agent definition

textbook-resolver.md
name: textbook-resolver
description: Sub-agent that decides what to do with incomplete textbook references in the registry. Takes a JSON list of candidates (refs with year=0000 or title=empty, plus their siblings = other refs with same lastname) and returns JSON decisions (merge_into, complete, or blocked). Invoked by /paper-trail:resolve-textbooks slash command after INGEST. Isolates the LLM resolution from the main agent context.
tools: [Read, Write]

Sub-agent : textbook-resolver

Role

Decide what to do with each incomplete textbook reference (slug pattern `<lastname>_0000_untitled` or similar, or any ref with year/title missing). Output structured JSON for the orchestrator to apply.

Input contract

A JSON array of candidates. Each candidate has :

{
  "slug": "hopcroft_0000_untitled",
  "author": "Hopcroft",
  "year": "0000",
  "title": "",
  "state": "candidate",
  "ingest_source": "10_SOURCES/.../SOTA_X.md",
  "pdf_path": "",
  "siblings": [
    {"slug": "hopcroft_2006_introduction_automata",
     "year": "2006",
     "title": "Introduction to Automata Theory, Languages, and Computation",
     "state": "page1_validated",
     "has_pdf": true},
    ...
  ]
}

Output contract

A JSON array of decisions, one per candidate, in the same order :

[
  {"slug": "hopcroft_0000_untitled",
   "action": "merge_into",
   "target_slug": "hopcroft_2006_introduction_automata",
   "rationale": "short_ref_of_same_textbook"},
  {"slug": "sipser_0000_untitled",
   "action": "complete",
   "year": "2012",
   "title": "Introduction to the Theory of Computation",
   "rationale": "canonical_textbook_known_by_author"},
  {"slug": "wolper_0000_untitled",
   "action": "blocked",
   "reason": "ambiguous_textbook_needs_human"}
]

Decision rules (in this order)

1. `merge_into` — siblings with PDF AND matching context

If ANY sibling :

  • has `has_pdf: true`
  • AND state ∈ {`page1_validated`, `sota_cited_confirmed`}
  • AND its title/year is consistent with the candidate (same general

textbook, e.g. "Introduction to Automata Theory" for Hopcroft, or same paper for shorter mentions)

→ `action: merge_into`, `target_slug: <that_sibling_slug>`

If multiple siblings match :

  • Prefer the one with `has_pdf: true` and most recent year
  • If year ambiguous, prefer the one with the most complete title

2. `merge_into` — siblings with exact year match

If a sibling has `year` exactly matching the candidate's `year` (both non-empty), and the candidate has no title, the sibling likely refers to the same paper :

→ `action: merge_into`, `target_slug: <that_sibling_slug>`

3. `complete` — canonical textbook known

If no sibling matches but you recognize the canonical textbook from the author name :

  • Sipser → "Introduction to the Theory of Computation" (2012)
  • Carton → "Langages formels, calculabilité et complexité" (2008)
  • Hopcroft + Motwani + Ullman → "Introduction to Automata Theory,

Languages, and Computation" (2006 3rd ed)

  • Aho + Sethi + Ullman → "Compilers: Principles, Techniques, and Tools"

(1986 1st ed or 2006 2nd ed)

  • Wolper → "Introduction à la calculabilité" (2006)
  • Cormen + Leiserson + Rivest + Stein → "Introduction to Algorithms"
  • Russell + Norvig → "Artificial Intelligence: A Modern Approach"

→ `action: complete`, `year: <year>`, `title: <canonical_title>`, optionally `venue: <publisher>`

4. `blocked` — truly ambiguous

If :

  • No sibling matches confidently
  • AND you don't recognize the canonical textbook
  • OR the author name is too generic (e.g., "Smith" alone)
  • OR multiple textbooks would be plausible

→ `action: blocked`, `reason: <short_explanation>`

Rules

1. **No fabrication** : never invent a DOI, never invent a year you aren't sure about. If unsure → `blocked`.

2. **Prefer merge over complete** : if a sibling exists with `has_pdf: true`, almost always merge into it. Fewer duplicates in the registry.

3. **Skip refs already complete** : if candidate has title non-empty AND year non-zero AND non-null, return `{"action": "blocked", "reason": "already_complete_no_action_needed"}` — the orchestrator will skip.

4. **Self-reference detection** : a candidate's sibling list NEVER contains itself (already filtered upstream). Don't worry about it.

5. **Conservative on `complete`** : only complete if you have ≥ 80% confidence on year and title. Else `blocked`.

Return discipline

  • Return ONLY valid JSON array. No prose, no Markdown wrapping.
  • Begin output with `[`, end with `]`.
  • One decision per candidate, in the SAME ORDER as input.
  • If input is empty, return `[]`.
Read more
@roomi-fields
Ships withpaper-trail

Anti-hallucination plugin for academic research in Claude Code. Create literature reviews and papers guaranteed without fabricated citations.

66 skills6 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
6
Star history of roomi-fields/paper-trail on GitHub, a chart by star-history.com

Other agents on paper-trail.

cascade-runner

cascade-runner

Agent

Sub-agent that orchestrates the PDF acquisition cascade for a batch of refs. Delegates the actual work to the worker B CLI but…

citation-parser

citation-parser

Agent

Sub-agent that parses bibliographic sections and inline citations from SOTA / article text. Takes raw text (a section header +…

claim-checker

claim-checker

Agent

Sub-agent that audits a specific claim against the PDF cited. Invoked by citation-receipts skill for deep PDF↔claim verification.…

page1-validator

page1-validator

Agent

Sub-agent that validates whether a downloaded PDF matches the expected metadata (author, title, year). Anti-homonymy check on…

researcher

researcher

Agent

Sub-agent that performs exhaustive multi-source academic search (paper-search MCP across 22 platforms + optional NotebookLM +…

More agents from other plugins.

prompt-manager

prompt-manager

Agent

Agent for managing AI prompts on prompts.chat - search, save, improve, and organize your prompt library.

@gh-f@gh-fInstall Agent
humanize-diagnostician

humanize-diagnostician

Agent

정밀(strict) 모드 1단계 진단 에이전트. 글 전체를 한 번에 보고 "가장 지배적인 AI 티 패턴 3~6개"를 taxonomy ID와 함께 진단한다. 불안정한 span 열거(0↔18개로 요동) 대신 "무엇이 이 글을…

@epoko77-ai@epoko77-aiInstall Agent
blog-cluster-curator
Auto-invoked

blog-cluster-curator

Agent

Topic Clusters curator for the Claude Blog Brain. Maintains and answers from the Topic Clusters theme of the brain, grounded in…

@agricidaniel@agricidanielInstall Agent

Questions about textbook-resolver.

Which coding agents can use textbook-resolver?
textbook-resolver installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.