Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
- **Dedicated Modular AI Wizard System Instructions & Few-Shot Exemplars (`mnemolink/wizard_prompts.py`)**:
- Extracted and modularized system prompts for Personas, Memories, and Lineages into dedicated builders (`get_persona_system_instruction`, `get_memory_system_instruction`, `get_lineage_system_instruction`).
- Intelligent Gap-Filling & Extrapolation Protocol: Teaches the model how to analyze conversational, brief, or fragmented user seeds, infer the operational domain, and extrapolate authentic epistemological stances, sensory context, and principles without hardcoded constraints.
- Multi-Archetype Few-Shot Demonstrations: Embedded transformation exemplars covering artisan craft (master baker), operational sentinels (SRE commander), and scholarly mentors (admiralty jurist).
- Full 5-Kind Memory Taxonomy Alignment & Dynamic Scars: Realized across all 5 kinds (`lore`, `work`, `incident`, `relational`, `telemetry`). Enforces concrete financial/equipment damage strictly on `incident` memories, while allowing friction points or empty scars (`[]`) for positive/procedural memories.
- Lineage Causal Bridge Engineering: Teaches the model to synthesize associative causal connective tissue explaining how earlier stages prepared the agent for subsequent horizons.
- **Unit Tests for AI Wizard System Prompts (`tests/test_wizard_prompts.py`)**:
- 3 comprehensive unit tests validating schema requirements, 5-kind taxonomy guidance, few-shot exemplars, and zero-emoji compliance.

## [0.2.3] - 2026-09-13

### Added
Expand Down
9 changes: 5 additions & 4 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,12 @@ mnemolink author --dir ./my_catalog
```

Features:
- **Three Creation Paths**: Choose between conversational AI scar elicitation, guided manual interview, or fast template scaffolding.
- **Conversational Scar Elicitation**: Extracts genuine, non-obvious failure modes, cognitive boundaries, sensory cues, and teleological drives.
- **5-Kind Memory Taxonomy**: Generates memories strictly conforming to `lore`, `work`, `incident`, `relational`, or `telemetry`.
- **Three Creation Paths**: Choose between conversational AI authoring studio, guided manual interview, or fast template scaffolding.
- **Dedicated Modular System Instructions**: Discrete, specialized prompts for Personas, Memories (across all 5 kinds), and Lineages that teach the model how to extrapolate missing operational axioms, sensory cues, and causal bridges from arbitrary conversational user prompts.
- **Multi-Archetype Few-Shot Demonstrations**: Embedded transformation exemplars spanning artisan crafts, operational engineering sentinels, and scholarly mentors.
- **5-Kind Memory Taxonomy & Dynamic Scars**: Generates memories conforming strictly to `lore`, `work`, `incident`, `relational`, or `telemetry`. Tangible damages are reserved for `incident` memories, while positive and procedural memories record friction points or empty scars (`[]`).
- **Dual Manifest Output**: Emits both the schema YAML (`persona.yaml`, `memory.yaml`, or `lineage.yaml`) and companion discovery card (`card.json`).
- **Self-Healing LLM Engine**: Automatically validates JSON structures and retries with targeted error feedback up to 3 times.
- **Self-Healing LLM Engine**: Automatically validates JSON structures against Pydantic schemas and retries with targeted error feedback up to 3 times.

### 5. `new` (Quick Scaffold)

Expand Down
2 changes: 1 addition & 1 deletion docs/usage_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ mnemolink wizard
```

The authoring hub presents three modes:
1. **AI Elicitation Wizard**: Guides you through conversational prompts to elicit operational scars, failure modes, and boundaries, then synthesizes fully compliant schemas using your chosen LLM.
1. **AI Authoring Wizard**: Uses dedicated, modular system instructions with few-shot exemplars across archetypes (artisan, sentinel, scholar) and memory kinds (`lore`, `work`, `incident`, `relational`, `telemetry`). Extrapolates missing operational context, principles, and causal bridges from conversational user seeds.
2. **Guided Manual Authoring**: Prompts you for each schema field step-by-step with real-time field tooltips and validation, auto-generating both the YAML manifest and the `card.json`.
3. **Quick File Scaffolding**: Emits standard template files directly into your workspace.

Expand Down
13 changes: 7 additions & 6 deletions mnemolink/bench/evaluators.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from __future__ import annotations

import re
from typing import Any, Dict, List
from typing import Any, Dict, List, Optional

# Disclaimers and academic hedges that penalize Epistemic Calibration (Pillar 5)
DISCLAIMER_PATTERNS = [
Expand Down Expand Up @@ -199,7 +199,7 @@


def evaluate_response(
response: str,
response: Optional[str],
scenario: Dict[str, Any],
latency_seconds: float = 0.0,
) -> Dict[str, Any]:
Expand All @@ -213,8 +213,9 @@ def evaluate_response(
Pillar 6: Surgical Actionability & Deliverable Form (0.0 - 1.0) [15% weight]
Causal/Precedent Grounding: (0.0 - 1.0) [10% weight]
"""
resp_lower = response.lower()
words = response.split()
safe_response = (response or "").strip() if isinstance(response, str) else ""
resp_lower = safe_response.lower()
words = safe_response.split()
word_count = len(words)
scenario_id = scenario.get("id", "")

Expand Down Expand Up @@ -324,7 +325,7 @@ def evaluate_response(
matched_sycophancy.append(match.group(0))

# Penalize excessive exclamation marks
if response.count("!") >= 3:
if safe_response.count("!") >= 3:
sycophancy_count += 1
matched_sycophancy.append("excessive exclamation marks")

Expand All @@ -347,7 +348,7 @@ def evaluate_response(
):
actionability_signals += 1

if "\n- " in response or "\n* " in response or "\n1. " in response:
if "\n- " in safe_response or "\n* " in safe_response or "\n1. " in safe_response:
actionability_signals += 1

# Imperative command signals
Expand Down
Loading
Loading