feat(advisor): preference memory — learned material shaping from room feedback (#67, RFC-0007) - #86
Merged
Merged
Conversation
… 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>
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.
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;followupvalidates loudly — a typo'd tag never becomes a silent non-preference.Store —
series.fold_feedbackfolds tags intostore["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 ×2is byte-identical);verdict: acceptedwith no tags clears the deliverable's memory (§10-2).Compile & propose —
series opencompiles tags → deltas (group + recency conflict resolution) and prints the ready-to-paste block. Live output from the reference series:Apply —
render.apply_preferences: one more overlay after altitude (base → function → altitude → preferences), reading only the manifest —manifest-confirmedcovers the adaptation. Tighten-only; the shared_cap_sectionshelper never drops arequiredsection.Gate —
preferences-valid: deliverable keys registered;max_slidestightens-only vs the altitude budget;order_leadnames 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_prereadadvisory-only until adocregistry 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_digestassumed acontextfield on every open action, but followup-captured actions don't carry one —opencrashed on any store fed byfollowup. 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_docsgreen.Closes #67
🤖 Generated with Claude Code