feat(paper_reviewer): give arxiv-intake reviewers real visual + provenance context#196
Merged
Merged
Conversation
…nance context Per the user followup to #195: the reviewer must produce valid + useful reviews of arXiv-submitted papers, not just succeed. Two changes to deliver that: 1. New helper _collect_figures_from_arxiv_source(source_dir) scans paper/source/** recursively for .pdf/.png/.jpg/.eps/.svg/etc. and summarizes each with project-relative path + size. arXiv tarballs put figures under conventional subdirs (figures/, figs/, pics/, images/, plots/, logo/, etc.) instead of the home-grown pipeline's paper/figures/. Capped at 200 entries; skips top-level PDFs (typically compiled output, not figures). Used by build_messages when is_arxiv_intake is True OR when paper/figures/ is empty. Verified on PROJ-564: discovers 10 real figures across logo/ and pics/ that the prior helper missed entirely. 2. New 'Paper provenance' block prepended to the user prompt for arxiv-intake reviews. Explicitly tells the LLM: - the paper is third-party (ingested from arXiv, NOT generated) - the author list (so it credits correctly) - the arXiv URL (so it can cross-reference) - the submitter field is the intake agent, NOT an author - to focus on the paper itself, not on missing speckit artifacts This addresses past failure modes where reviewers confused the intake bot with the paper's authors. + 6 new unit tests (figure discovery + intake block presence). Existing 3 fallback tests still pass. Full local test: 9/9. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows up #195. The hard-fail fix wasn't enough — the reviewer must produce valid + useful reviews. Two improvements:
_collect_figures_from_arxiv_sourcescanspaper/source/**for figure-like files (since arXiv tarballs don't use the home-grownpaper/figures/convention). PROJ-564 went from 0 figures visible → 10.9/9 unit tests pass.
🤖 Generated with Claude Code