Skip to content

feat(reflection): split inherit/derive memories and weight derive focus#72

Closed
furedericca-lab wants to merge 1 commit intowin4r:mainfrom
furedericca-lab:feat/reflection-inherit-derive-logistic
Closed

feat(reflection): split inherit/derive memories and weight derive focus#72
furedericca-lab wants to merge 1 commit intowin4r:mainfrom
furedericca-lab:feat/reflection-inherit-derive-logistic

Conversation

@furedericca-lab
Copy link
Collaborator

Summary

  • split reflection persistence into separate Inherit and Derive entries while keeping category=reflection
  • add logistic weighting for Derive injection instead of relying on only the latest reflection row
  • keep legacy combined reflection rows readable/injectable without a required migration
  • extract part of the reflection metadata/slice/store logic out of index.ts

Why

  • stable carry-over rules and short-lived next-run deltas should not live in the same reflection memory shape
  • the previous derive path was too dependent on the latest reflection row
  • reflection injection needs a decay-aware way to surface recent execution deltas without changing global retriever scoring
  • the reflection path in index.ts had grown enough to justify a focused structural cleanup

Changes

  • store split reflection rows with metadata.reflectionKind = "inherit" | "derive"
  • display new rows as reflection:Inherit and reflection:Derive
  • preserve a legacy-safe read/display path for old combined reflection rows
  • apply logistic derive weighting during reflection loading/injection only
  • use defaults:
    • midpointDays = 3
    • k = 1.2
    • fallback derive base weight = 0.35
  • keep <inherited-rules> sourced from inherit memories only
  • keep <derived-focus> sourced from derive memories only
  • add focused tests for split persistence, legacy compatibility, subtype display tags, and derive weighting

Verification

  • npm test

Risks / Compatibility

  • compatibility is preserved by keeping category=reflection and continuing to read legacy combined reflection metadata
  • derive injection behavior now aggregates multiple recent derive rows with decay instead of only using the latest row
  • no global retriever scoring behavior was changed

@furedericca-lab furedericca-lab force-pushed the feat/reflection-inherit-derive-logistic branch from 2b3cab2 to 055a586 Compare March 7, 2026 04:32
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