Skip to content

feat(advisor): preference memory — learned material shaping from room feedback (#67, RFC-0007) - #86

Merged
danielPoloWork merged 1 commit into
mainfrom
feat/preference-memory
Jul 3, 2026
Merged

danielPoloWork merged 1 commit into
mainfrom
feat/preference-memory

Conversation

@danielPoloWork

Copy link
Copy Markdown
Owner

Implements the ratified RFC-0007 (#67)

EAMOS remembered facts (series store) and precedents (advisor repository) — but nothing captured how the audience wants material shaped. Now the Q2 "too long" reaction shapes the Q3 deck — deterministically, with provenance, and always through a human.

The four stations, as designed

  • Capture — the outcomes YAML gains an optional material_feedback: block (verdict + tags). The vocabulary and the compile table are one data file, os/advisor/feedback-tags.yaml; followup validates loudly — a typo'd tag never becomes a silent non-preference.

  • Storeseries.fold_feedback folds tags into store["preferences"], keyed altitude × deliverable × tag with instance provenance; replace-by-instance (fix(series): re-closing the same instance duplicates decisions/actions in the store (also followup, advisor record) #56 semantics: followup ×2 is byte-identical); verdict: accepted with no tags clears the deliverable's memory (§10-2).

  • Compile & proposeseries open compiles tags → deltas (group + recency conflict resolution) and prints the ready-to-paste block. Live output from the reference series:

    ## Learned preferences (from Q3-2026)
    Paste into the manifest and confirm it — the memory never applies itself (RFC-0007):
    
    preferences_applied:
      from_instances: [Q3-2026]
      presentation: { max_slides: 9, order_lead: kpi_table }
    
  • Applyrender.apply_preferences: one more overlay after altitude (base → function → altitude → preferences), reading only the manifestmanifest-confirmed covers the adaptation. Tighten-only; the shared _cap_sections helper never drops a required section.

  • Gatepreferences-valid: deliverable keys registered; max_slides tightens-only vs the altitude budget; order_lead names a composed-structure kind; declared drops honored; adds registered.

RFC bookkeeping

Status flipped to Accepted; §11 Implementation notes records three in-design refinements: integer max_slides_pct (yamlmini keeps unquoted decimals as strings), add_preread advisory-only until a doc registry type exists, and §5's drop check clarified as drop-honored (fails when a declared drop is still in the bundle).

Drive-by fix

The new end-to-end test surfaced a latent KeyError: series._print_digest assumed a context field on every open action, but followup-captured actions don't carry one — open crashed on any store fed by followup. Fixed with a guarded field.

Tests — 108/108 green

Fold provenance + idempotency; loud unknown tag; group/recency conflict resolution + accepted-clears + compile determinism; the ready-to-paste proposal (12 → 9 slides); the overlay end-to-end (KPI section fronted, required sections uncuttable); the four gate paths (loosen / unknown kind / unhonored drop red; a valid block passes every gate). All 11 reference manifests stay green; check_docs green.

Closes #67

🤖 Generated with Claude Code

… feedback (#67, RFC-0007)

Implements the ratified RFC-0007. EAMOS remembered facts (series
store) and precedents (advisor repository) but nothing captured how
the audience wants material SHAPED — the Q2 'too long' rejection did
not inform the Q3 deck. Deterministic throughout, no ML:

- Capture: the outcomes YAML gains an optional material_feedback block
  (verdict: accepted|edited|rejected + tags). The vocabulary AND the
  compile table are one data file (os/advisor/feedback-tags.yaml);
  followup validates loudly — a typo'd tag never becomes a silent
  non-preference.
- Store: series.fold_feedback folds tags into store['preferences'],
  keyed altitude × deliverable × tag with instance provenance;
  replace-by-instance (#56 semantics) so re-runs are byte-identical;
  verdict accepted with no tags clears the deliverable's memory
  (RFC-0007 §10-2).
- Compile & propose: series open compiles tags to deltas (group +
  recency conflict resolution; max_slides_pct concretized against the
  altitude budget) and prints the ready-to-paste preferences_applied
  block + a preferences_proposal digest key. The memory never applies
  itself: the maintainer pastes and confirms (manifest-confirmed).
- Apply: render.apply_preferences — one more overlay AFTER altitude
  (base → function → altitude → preferences), reading only the
  manifest. Tighten-only; the shared _cap_sections helper never drops
  a required section.
- Gate: preferences-valid — deliverable keys registered, max_slides
  tightens-only, order_lead names a composed-structure kind, declared
  drops honored, adds registered.
- Schemas: manifest top_level += preferences_applied; series
  _schema.md documents the preferences section and the
  proposed-never-self-applied invariant; the reference outcomes file
  gains a feedback block. RFC-0007 flipped to Accepted with three
  implementation notes (int pct for yamlmini typing; add_preread
  advisory until a doc registry type exists; drop-honored gate
  semantics).
- Drive-by fix the new tests surfaced: series._print_digest assumed a
  'context' field on every open action; followup-captured actions
  don't carry one (KeyError on open after followup).

Tests (108/108): fold provenance + idempotency, loud unknown tag,
group/recency conflict resolution + accepted-clears + compile
determinism, the ready-to-paste proposal (12→9 slides), the overlay
end-to-end (kpi_table fronted, required sections uncuttable), and the
four gate paths (loosen/unknown-kind/unhonored-drop red; valid green).

Closes #67

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@danielPoloWork danielPoloWork added the enhancement New feature or request label Jul 3, 2026
@danielPoloWork danielPoloWork self-assigned this Jul 3, 2026
@danielPoloWork
danielPoloWork marked this pull request as ready for review July 3, 2026 05:19
@danielPoloWork
danielPoloWork merged commit d7895b1 into main Jul 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(advisor): preference memory — learn material-shaping preferences from room feedback (RFC first)

1 participant