eat(wizard): modularize prompts, unbias taxonomy & add exemplars - #5
Merged
rosspeili merged 1 commit intoSep 13, 2026
Conversation
- Modularize system instructions into dedicated mnemolink/wizard_prompts.py module - Implement intelligent gap-filling protocol for conversational user seeds - Add multi-archetype few-shot demonstrations across personas, memories, and lineages - Unbias 5-kind memory taxonomy: concrete damages for incidents, friction/empty scars for lore/work - Adapt inspect panels and lineage headers dynamically to memory kind - Add dual pluralization discovery fallback for memories/ and legacy memorys/ - Harden live benchmark runner with exponential backoff, inter-query pacing, and fallback - Add 9 new unit tests in tests/test_wizard_prompts.py and tests/test_wizard.py (102 passing)
rosspeili
force-pushed
the
feat/modular-wizard-prompts-and-taxonomy-unbiasing
branch
from
September 13, 2026 15:31
a2a6485 to
7bcbb6f
Compare
rosspeili
deleted the
feat/modular-wizard-prompts-and-taxonomy-unbiasing
branch
September 13, 2026 15:44
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 & Architectural Context
This PR modularizes the AI Mnemonic Wizard's system instructions into dedicated, testable builders, unbiases the memory taxonomy to support the full spectrum of experiences (from joyful craft lore and procedural SOPs to crisis incident post-mortems), and embeds concrete few-shot demonstrations across diverse character archetypes and memory kinds.
Additionally, this PR hardens catalog resolution (adding dual pluralization discovery fallbacks for
memories/and legacymemorys/) and introduces exponential backoff, request pacing, and golden-mock fallbacks to the live benchmark runner.Key Changes
1. Dedicated Modular System Instructions (
mnemolink/wizard_prompts.py)mnemolink/wizard.pyinto standalone prompt builders:get_persona_system_instruction() -> strget_memory_system_instruction() -> strget_lineage_system_instruction() -> str2. Multi-Archetype Few-Shot Demonstrations
lore: Bougatsa aerial phyllo heritage in Ano Poli (empty scars[], semolina/butter aromas).work: Zero-downtime PostgreSQL connection pool reload under 45k req/s (SIGUSR1 drain, latency friction).incident: Subsea ROV ghost net entanglement ($64,000 damage, 18h downtime, sonar buffer lessons).relational: Enterprise security audit contract renewal (interpersonal consensus, shared risk reduction).telemetry: Mach 0.82 composite wing spar resonance calibration (piezoelectric flutter, acoustic dampening).3. Full 5-Kind Memory Taxonomy Unbiasing & Dynamic Scars
incident: Concrete quantifiable damages ($ USD lost, downtime) remain strictly required.lore,work,relational,telemetry: Scars represent friction points/hurdles surmounted, or remain an empty list ([]) for positive/procedural memories.mnemolink inspect: Dynamically titles panels (Episodic Debrief & Operational Scarsvs.Episodic Debrief & Core Insights) and only renders the scars section when scars exist.LineageBuilder: Generates adaptive epoch titles based on memory kind (The Crucible & Crisis,Tradecraft & Operational Practice,Formative Experience & Heritage,Relational Milestone & Partnership,Telemetry Benchmark & Empirical Run) and concludes withCumulative Experiential Reflexes & Wisdom.[1] loreinstead of forcingincident.4. Catalog Resolution & Dual Pluralization Compatibility
MnemonicResolverchecking both canonicalmemories/and legacymemorys/across./mnemonics,~/.mnemolink, and~/mnemonics.register_catalog_root()inmnemolink/config.pyto auto-persist newly created catalog directories to~/.mnemolink/config.yaml._kind_dir_name()(memory->memories).5. Benchmark Live Rate-Limiting & Pacing
base_delay * 2^attempt + jitter), HTTPRetry-Afterheader parsing, and up to 5 retries across Gemini, Claude, Mistral, and OpenAI live runners.Verification & Standards Compliance
tests/test_wizard_prompts.pyvalidating schema rules, 5-kind taxonomy guidance, exemplars, and zero emojis.tests/test_wizard.pyverifying positive lore memory creation and empty scars handling.flake8 mnemolink tests— 0 errors, 0 warnings (all lines <= 100 chars).black --check mnemolink tests— 100% clean across all 25 files.python scripts/verify_repo.py— PASSED (zero emojis, link integrity clean, catalog schemas verified).docs/cli.md,docs/usage_guide.md,CHANGELOG.md,0_local_drafts/ROADMAP_AND_EVALUATION.md, and.agents/skills/mnemonic-wizard/SKILL.md.Breaking Changes
None. Fully backwards-compatible with all existing catalog assets, schemas, and CLI workflows.