Repository navigation
feat(agent): add recursive reflector - #101
Merged
Pepps233 merged 2 commits intoAug 23, 2026
Merged
Conversation
- Preserves materialized evidence as immutable semantic-unit slices with audited read-only access - Checkpoints validated reflection nodes so interrupted jobs resume without repeating completed work
- Enforces immutable registry inputs, hard budgets, and Curator-fit completion before checkpointing - Preserves retry semantics and provenance across interrupted model calls and refined slices
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
Implements the bounded recursive Reflector over immutable, cursor-addressed evidence slices without enabling later Curator, Validator, Writer, or Counter behavior.
The Reflector now analyzes large evidence corpora through isolated read-only tools, synthesizes validated lesson trees within explicit budgets, records complete evidence coverage, and resumes from durable node checkpoints without repeating completed work.
Reasoning
Reliable reflection requires evidence boundaries that remain stable after materialization and cannot be changed or widened by model tool calls.
Treating each materialized evidence record as the smallest indivisible semantic unit allows slices to shrink, split, and request adjacent context without breaking tool-call, tool-result, or turn boundaries.
A dedicated job-scoped tool registry prevents Reflector capabilities from leaking into foreground sessions or later model stages, while request and result digests make every authorized read auditable.
Persisting each validated node and its lessons before appending a ledger checkpoint gives interrupted jobs a durable resume point and preserves model and tool accounting across retries.
Explicit depth, round, model-call, tool-call, and Curator-fit limits keep recursion bounded and fail closed when the Reflector cannot produce a valid result.
Changes
Testing
node ../../node_modules/vitest/dist/cli.js --run test/reflector.test.ts test/control-plane.test.tsnpm run check./test.sh