Skip to content

feat(agent): add structured delta curator - #102

Merged
Pepps233 merged 2 commits into
feat/recursive-reflectorfrom
feat/structured-delta-curator
Aug 23, 2026
Merged

Pepps233 merged 2 commits into
feat/recursive-reflectorfrom
feat/structured-delta-curator

Conversation

@Pepps233

@Pepps233 Pepps233 commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Implements a target-neutral Curator over the final verified lessons emitted by the recursive Reflector in #101 without enabling later deterministic validation, scoring, persistence, Writer, activation, or Counter behavior.

The Curator now evaluates provenance-rich lessons against frozen evolution-memory and instruction snapshots, requests strict tool-free decisions, suppresses duplicate and conflicting overlaps, and emits evidence-closed ADD, REMOVE, and atomic REPLACE proposals or non-executable deferred findings for unsupported targets.

Reasoning

Curating exact deltas instead of regenerating the full evolution memory preserves unrelated content and keeps every proposed change independently reviewable, validatable, and reversible.

Deriving proposal IDs, base versions, content digests, evidence closure, trace references, and execution scope from frozen inputs prevents the model from inventing immutable provenance or integrity fields.

Classifying each decision as novel, strengthening, duplicate, or conflicting allows the Curator to suppress known redundancy and instruction conflicts before proposals reach later deterministic stages.

Requiring concrete precision, enforcement, condition, or boundary changes for strengthening decisions ensures that cited existing guidance is materially improved instead of merely restated.

A strict response schema, exact-key parsing, no tool access, and bounded retries keep Curator execution isolated and fail closed when the model returns malformed or unsupported output.

Deferring skill and orchestration-source findings without executable deltas preserves useful lessons while avoiding writer routes that are intentionally outside this change.

Changes

  • Define proposal contracts for target, scope, action, expected base state, supporting and contradicting evidence, trace provenance, benefits, acceptance criteria, risk, rollback, confidence, uncertainty, counterexamples, conflicts, and instruction relationships.
  • Add exact evolution-memory ADD and REMOVE deltas plus atomic REPLACE deltas that combine one removal with one addition.
  • Carry typed exact deltas into mutation planning without adding persistence or activation behavior.
  • Provide the Curator with only final verified lessons, the frozen memory catalog, active memory-item metadata, and ordered applicable instruction snapshots with paths, precedence, digests, and content.
  • Add a tool-free StructuredDeltaCurator with a strict structured-output schema, exact-key response parsing, stable idempotency, and bounded invalid-response retries.
  • Derive proposal identity, memory and instruction digests, evidence closure, trace references, repository and runtime scope, source revisions, session lineage, and harness versions from trusted inputs.
  • Resolve overlap references against known instruction documents and active memory items, require concrete strengthening semantics, and suppress duplicate or conflicting decisions.
  • Preserve skill and orchestration-source lessons as deferred findings with no executable operation.
  • Reject unknown lesson, evidence, trace, instruction, and memory-item references before emitting proposals.
  • Add focused coverage for provenance-rich additions, removals, atomic replacements, deferred targets, overlap suppression, conflict references, stable metadata, invalid references, unsupported writer routes, and bounded retry behavior.

Testing

  • npm run check
  • node ../../node_modules/vitest/dist/cli.js --run test/curator.test.ts test/control-plane.test.ts from packages/evolution
  • ./test.sh passed all affected evolution tests; one unrelated coding-agent FIFO-order assertion failed once.
  • node ../../node_modules/vitest/dist/cli.js --run test/suite/subagent-startup.test.ts from packages/coding-agent passed on isolated rerun.

- Preserves lesson provenance and execution scope across proposal aggregation
- Limits executable memory changes to atomic add, remove, and replace deltas
- Converts verified lessons into evidence-closed atomic deltas
- Suppresses known overlaps and keeps unsupported targets non-executable
@Pepps233 Pepps233 self-assigned this Aug 20, 2026
@Pepps233
Pepps233 requested a review from Issacboy123 August 20, 2026 01:42
@Pepps233
Pepps233 marked this pull request as ready for review August 23, 2026 16:37
@Pepps233
Pepps233 merged commit 39c3b38 into main Aug 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant