Repository navigation
Release v0.4.1 - #28
Merged
Merged
Conversation
## TL;DR - The library gains `document_reading`, a method that reads every page of a document with one model call per page and returns what each page states or shows, with exact quotations. - The build assistant will run it by address to read a file a user attaches, instead of taking the file whole into its context. - If it misbehaves, the build assistant's reading of attached files loses facts or costs more than quoted; nothing else in the library depends on it. ## Changes - **New package `methods/document_reading/`**: `read_document` extracts the pages with Azure Document Intelligence and a 100-dpi page view of each page, then `read_pages` sends each page to one Claude Sonnet call. Both pipes are exported, so a caller can read a single page again from an earlier run's output without extracting the document a second time. - **Output**: a `PageReading` per page, in page order, each with its findings (exact quote, kind, source as text, picture or both, an optional note), what could not be read, what was not looked at, and the printed page number when there is one. - **The prompt** lists everything a page holds rather than summarising it, keeps the OCR's reading of a figure and the picture's reading in the note when they disagree, lists a picture element by element, marks values read off a chart as approximate, and treats the page as untrusted data: instructions written on a page are listed as findings, never followed. - The library `README.md` table and the `CHANGELOG.md` `[Unreleased]` section list the package. ## How it was verified - `plxt fmt --check`, `plxt lint`, `pipelex validate bundle` (with 0.95.1 and 0.103.1) and `check-samples.sh` pass. - On the campaign's bench (`wip/build-assistant-reading-notes/method-reading/`, cells `shipped` and `shipped-2`), the package found every fact the phase-1 `views-100` variant found, on the brand guidelines, the flowchart, the poor scan, the rate card, a Word file and a PowerPoint deck, at the same cost per page and with no false finding. A page from an earlier run's output was read again through `read_pages` on the hosted dev runner. - `/rev` round 1 (cubic, Codex, the official code-review): Codex's one finding, the prompt-injection guard, is fixed in this branch. ## Left out - The release tag, cut by a `release/` pull request after this merges. - Reading a range of pages within the method waits on a PipeExtract page range in pipelex. Closes L-261115-b6776f Advances L-261115-b2b931 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds the `document_reading` package, which reads a document page by page for a caller who will never see it, listing every rule, value, threshold, name and constraint each page states or shows in its exact words. - New `methods/document_reading/` package with two exported pipes: `read_document` extracts each page (Azure Document Intelligence OCR plus a 100-dpi picture) and reads it in one `claude-5.5-sonnet` call; `read_pages` re-reads pages from an earlier run's output without extracting the document again. - Returns one `PageReading` per page in page order, each with its findings (exact quote, kind, source, optional note), `unreadable`, `not_looked_at`, and the printed page number when present. - Treats the page as untrusted data: instructions written on a page are listed as findings, never followed. - Updates the library `README.md` table and the `CHANGELOG.md` `[Unreleased]` entry. Reading a page range within the method is left out; it waits on a PipeExtract page range in `pipelex`. <sup>Written for commit 89f3588. Summary will update on new commits.</sup> <a href="https://cubic.dev/pr/Pipelex/methods/pull/27?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="View guided diff" src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a> <!-- End of auto-generated description by cubic. --> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <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.
Release v0.4.1
Bumps every package manifest from
0.4.0to0.4.1. Promotesdev→main.Changelog
Added
document_reading: reads a document page by page for a caller who will not see it, a person or an agent, and lists every rule, value, threshold, name and constraint each page states or shows, in its exact words, from both the page's OCR text and a picture of the whole page at 100 dpi, one model call a page. Its entry pipe,read_document, takes adocument(a PDF, an image, or a Word or PowerPoint file on a runtime with a document converter) and returns a list ofPageReading, one per page in page order, each holding itsfindings(quote,kind,source,note), what wasunreadable, what wasnot_looked_atand theprinted_page_number. The exportedread_pagestakes thepagesan earlier run extracted and reads them again with no second extraction.🤖 Generated with Claude Code
Summary by cubic
Releases v0.4.1: bumps every method package from
0.4.0to0.4.1and promotesdevtomain.document_readingpackage, which reads a document page by page into exact-word findings, from both OCR text and a 100-dpi page picture, one model call per page.Written for commit 10294ff. Summary will update on new commits.