Skip to content

RSI agent redesign: Phase 1 (JIT context, budget/scheduling, model routing) - #55

Merged
ronshapiro merged 1 commit into
basefrom
worktree-bridge-cse_01EXbnB1D7iWkMuu4FEEXjvC
Aug 11, 2026
Merged

RSI agent redesign: Phase 1 (JIT context, budget/scheduling, model routing)#55
ronshapiro merged 1 commit into
basefrom
worktree-bridge-cse_01EXbnB1D7iWkMuu4FEEXjvC

Conversation

@ronshapiro

@ronshapiro ronshapiro commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds 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).
  • Also merges in PR RSI Phase 2: agentic Rashi/Tosafot translation task type #54's Phase 2 code (rashi_tosafot_translation.ts, headless_claude.ts, etc.) as a foundation, since this branch previously only had Phase 1.
  • Implements Phase 1 of the redesign plan on top of that:
    • JIT context: context_fetch.ts/context_fetch_cli.ts replace raw Read/Grep/Glob access to the full cached page file with a narrow, ref-addressed, size-capped tool; page_skeleton.ts provides a compact page structure for the prompt instead of the raw 400KB+ JSON; worked examples are now inlined in the generation prompt.
    • Dependency tracking: generation records' dependsOn is now auto-populated from what context_fetch actually served (via extractRequestedRefs), not always [] — this is what lets Tier 3 staleness hits cascade to dependent artifacts.
    • Model routing: model_routing_config.json (read via model_routing.ts) replaces the hardcoded model constant.
    • Budget/scheduling: 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.
  • Not yet implemented: the in-page review UI (Phase 3) and the segmentation-boundary audit task type (Phase 2) — see the plan doc for phasing.

Test plan

  • npx jest — all 85 suites / 823 tests pass
  • npx tsc (project's pre-commit check) — clean
  • npx eslint on all changed files — no errors (only pre-existing no-console warnings on CLI scripts, matching existing convention)
  • Smoke-tested context_fetch_cli.ts, status_cli.ts, and schedule_runner.ts via ts-node against real local state

🤖 Generated with Claude Code

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>
@ronshapiro
ronshapiro merged commit b457ba7 into base Aug 11, 2026
1 check passed
@ronshapiro
ronshapiro deleted the worktree-bridge-cse_01EXbnB1D7iWkMuu4FEEXjvC branch August 11, 2026 19:45
@ronshapiro ronshapiro changed the title Add RSI agent redesign plan RSI agent redesign: Phase 1 (JIT context, budget/scheduling, model routing) Aug 11, 2026
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.

1 participant