Skip to content

fix(pdf): read PDFs directly (1M context) instead of mandatory chunking#127

Merged
pedrohcgs merged 1 commit into
mainfrom
fix/pdf-handling-1m-context
Jun 1, 2026
Merged

fix(pdf): read PDFs directly (1M context) instead of mandatory chunking#127
pedrohcgs merged 1 commit into
mainfrom
fix/pdf-handling-1m-context

Conversation

@pedrohcgs

Copy link
Copy Markdown
Owner

Summary

A model-staleness audit of all skills + hooks (6-agent review) found the only genuinely outdated logic was in PDF handling — capacity workarounds calibrated to the old ~200k context window. Now that 1M context is the default and the Read tool reads PDFs natively, these are obsolete.

Fixed

  • pdf-processing.md — direct Read is now the default (pages param, up to 20/request; 1M window holds a full paper). Dropped "Claude DOES NOT read directly", the mandatory 5-page Ghostscript split, "don't hold all chunks in working memory", and the 2-3-chunks-per-session cap. Ghostscript/pdftk page-range splitting is kept as a fallback for genuinely oversized/corrupt PDFs.
  • review-paper/SKILL.md — read directly + page via pages; the ~200k "budget escape" is now a configurable spend cap (~500k), decoupled from the context window (each round already re-audits in fresh context).

Audited and confirmed current/intentional (unchanged): all 6 hooks, the effort: high pins (correct default, not escalated to xhigh), and forked-context verification + max-round caps (quality designs, not capacity workarounds).

Verification

All three pre-commit gates pass (surface-sync · skill-integrity · model-versions). No count changes.

Audit of all skills + hooks for model-staleness found 3 items, all in PDF
handling — workarounds calibrated to the old ~200k context window:

- pdf-processing.md: drop "Claude DOES NOT read directly", the mandatory
  5-page Ghostscript split, "don't hold all chunks in working memory", and the
  2-3-chunks-per-session cap. Default is now a direct Read (pages param, up to
  20/request; a 1M-token window holds a full paper); Ghostscript page-range
  splitting is kept as a fallback for genuinely oversized/corrupt PDFs.
- review-paper/SKILL.md: read directly and page via `pages`; the ~200k
  "budget escape" is now a configurable spend cap (~500k), decoupled from the
  context window (each review round already re-audits in fresh context).

Everything else (hooks, effort:high pins, forked-context verification,
max-round caps) was audited and confirmed current/intentional.
Copilot AI review requested due to automatic review settings June 1, 2026 00:46
@pedrohcgs
pedrohcgs merged commit 275040d into main Jun 1, 2026
1 check failed
@pedrohcgs
pedrohcgs deleted the fix/pdf-handling-1m-context branch June 1, 2026 00:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants