RSI agent redesign: Phase 1 (JIT context, budget/scheduling, model routing) - #55
Merged
Merged
Conversation
Context-provisioning, budget/scheduling, and review-surface redesign addressing real issues found in live runs (context wandering, no spend pacing, no review gate). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
4 tasks
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
RSIAgentRedesignPlan.md, a redesign of the RSI content-agent architecture informed by PR RSI Phase 2: agentic Rashi/Tosafot translation task type #54's real-run retrospective (context wandering costing $0.73/call, uncontrolled model selection, no budget pacing, no review gate).rashi_tosafot_translation.ts,headless_claude.ts, etc.) as a foundation, since this branch previously only had Phase 1.context_fetch.ts/context_fetch_cli.tsreplace rawRead/Grep/Globaccess to the full cached page file with a narrow, ref-addressed, size-capped tool;page_skeleton.tsprovides a compact page structure for the prompt instead of the raw 400KB+ JSON; worked examples are now inlined in the generation prompt.dependsOnis now auto-populated from whatcontext_fetchactually served (viaextractRequestedRefs), not always[]— this is what lets Tier 3 staleness hits cascade to dependent artifacts.model_routing_config.json(read viamodel_routing.ts) replaces the hardcoded model constant.budget_config.json(hand-edited, ships fully disabled) +schedule_runner.ts(bounded per-tick runner) +status_cli.ts(call-count/cost visibility) — a human-driven schedule rather than a blind cron or a dollar-cap that may not mean anything under subscription billing.Test plan
npx jest— all 85 suites / 823 tests passnpx tsc(project's pre-commit check) — cleannpx eslinton all changed files — no errors (only pre-existingno-consolewarnings on CLI scripts, matching existing convention)context_fetch_cli.ts,status_cli.ts, andschedule_runner.tsviats-nodeagainst real local state🤖 Generated with Claude Code