RSI Phase 2: segmentation-boundary audit task type - #57
Open
ronshapiro wants to merge 1 commit into
Open
Conversation
Detects poorly-split Gemara segments and Rashi/Tosafot comments, reports findings for human review — deliberately an audit, not a mutation, since nothing here is auto-applied. No self-critique pass (the human reviewer is the judgment gate); a cheap local check drops suggestions referencing refs that don't actually exist on the page. Staleness keys on an ordered ref-list "boundary fingerprint" rather than full text, so unrelated text edits don't invalidate a finding. Wired into model_routing_config.json, budget_config.json (disabled by default, higher priority than translation per the plan's "upstream" ordering), and schedule_runner.ts. Co-Authored-By: Claude Sonnet 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.
Summary
Phase 2 of
RSIAgentRedesignPlan.md: the second content-generation task type, and the first genuinely new one under the redesigned architecture (Phase 1, #56, only re-platformed the existing translation task).segmentation_audit.ts: for a given page, asks Claude to review Gemara segment and Rashi/Tosafot comment boundaries for coherence issues (e.g. "this Rashi comment is really two comments merged together") using the page skeleton +context_fetch_clifor anything it needs to actually read. Deliberately an audit, not a mutation — it never changes segment boundaries itself; findings are written toprecomputed/rsi_state/segmentation_suggestions/<Book Page>.jsonfor a human to review and act on manually (no in-page review UI yet — that's Phase 3).model_routing_config.json,budget_config.json(disabled by default, given priority ahead of translation per the plan's "this task type is upstream of the others" reasoning), andschedule_runner.ts.segmentation_audit_cli.tsfor manual runs, matchingrashi_tosafot_translation_cli.ts's conventions.Test plan
npx jest— 86 suites / 838 tests passnpx tsc(pre-commit check) — cleannpx eslinton all changed files — no errors (only pre-existingno-consolewarnings on CLI/scheduler scripts)segmentation_audit_cli.ts,schedule_runner.ts, andstatus_cli.tsviats-nodeagainst real local state (new task type shows up correctly, disabled by default, no-ops safely)🤖 Generated with Claude Code