Conversation
- New examples/read.ts entrypoint: demo mode generates 3 Acme Corp fixtures (PDF/DOCX/PPTX), custom mode accepts user files + question - New skills/read-source/SKILL.md teaching the agent witan read usage - New examples/lib/acme-fixtures.ts with deterministic fixture generators and ACME_QUESTION cross-document question - Fix format.ts to pair parallel tool calls with their results instead of printing results orphaned from their commands - Update AGENTS.md, README.md, package.json with read example docs - Clean up cross-skill references in xlsx-code-mode and xlsx-verify Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hershaw
left a comment
There was a problem hiding this comment.
tested and added an example, lgtm
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2cf5e797a2
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const basename = path.basename(resolved); | ||
| fs.copyFileSync(resolved, path.join(workDir, basename)); |
There was a problem hiding this comment.
Avoid clobbering files with duplicate basenames
In custom mode, each input is copied into the temp workspace under path.basename(...), so two different paths like dirA/report.pdf and dirB/report.pdf will silently overwrite each other and only one document will actually be available to the agent. This can produce incorrect cross-document answers while appearing to process all files, so the staging step should ensure unique destination names.
Useful? React with 👍 / 👎.
| ext := extFromContentType(resp.Header.Get("Content-Type")) | ||
| if ext == "" { | ||
| ext = filepath.Ext(urlPath(input)) |
There was a problem hiding this comment.
Fall back to URL suffix for generic text content types
The URL path suffix is only used when extFromContentType(...) returns empty, but extFromContentType returns .txt for any unrecognized text/* value; that means URLs like .../notes.md served as text/plain are forced to .txt, so downstream upload uses text/plain instead of markdown-specific handling (notably affecting --outline). Treating generic text types as "unknown" (or checking the URL suffix first in that case) avoids this misclassification.
Useful? React with 👍 / 👎.
Summary
examples/read.tsentrypoint for multi-document QnA usingwitan readto extract text from PDF, DOCX, PPTX, HTML, and 10 other formatsskills/read-source/SKILL.mdskill teaching the agentwitan readusage (formats, flags, strategy)format.tsto pair parallel tool calls with their results — previously parallel results printed orphaned from their commandsTest plan
pnpm read --helpprints usagepnpm readruns demo mode end-to-end (generates fixtures, agent reads all 3 docs, synthesizes correct answer)pnpm read --verboseshows full message stream with correct tool call/result pairingpnpm read report.pdf minutes.docx "question"custom mode with user filespnpm qnaandpnpm verify(non-read examples)🤖 Generated with Claude Code