Skip to content

feat(skills,memory): skill evaluator, proactive exploration, compression spectrum#3350

Merged
bug-ops merged 4 commits intomainfrom
skills-compression-spectrum
Apr 24, 2026
Merged

feat(skills,memory): skill evaluator, proactive exploration, compression spectrum#3350
bug-ops merged 4 commits intomainfrom
skills-compression-spectrum

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Apr 24, 2026

Summary

All three features are disabled by default (enabled = false); existing configs parse unchanged (#[serde(default)] on every new field).

Architecture

  • crates/zeph-skills/src/evaluator.rsSkillEvaluator, SkillQualityScore, SkillVerdict
  • crates/zeph-skills/src/proactive.rsProactiveExplorer, DomainLabel
  • crates/zeph-memory/src/compression/mod.rsCompressionLevel, RetrievalPolicy
  • crates/zeph-memory/src/compression/promotion.rsPromotionEngine, PromotionInput
  • crates/zeph-config/src/features.rsSkillEvaluationConfig, ProactiveExplorationConfig, CompressionSpectrumConfig

Test plan

  • cargo nextest run --workspace --lib --bins — 8326 tests pass
  • cargo clippy --workspace -- -D warnings — clean
  • cargo +nightly fmt --check — clean
  • Live testing playbook: .local/testing/playbooks/skills-compression.md
  • Coverage status rows added: skill-eval, proactive-explore, compression-spectrum (status: Untested)

Notable design decisions

  • Proactive skill is visible next turn only — synchronous matcher rebuild on hot path would add an unbounded embed .await; next-turn rebuild is triggered by matcher_dirty flag.
  • Evaluator defaults to fail-open: a critic error should not block skill generation; operators can set fail_open_on_error = false for strict enforcement.
  • PromotionEngine::scan takes PromotionInput (not MemoryMatch) because MemoryMatch lacks session_id required for the min_sessions heuristic.
  • MemoryError::Promotion with thiserror — no anyhow in library crates.

Closes #3319, #3320, #3305

…compression spectrum

Feature B (#3319): SkillEvaluator — external critic LLM scores generated skills on
correctness/reusability/specificity before writing to disk. Weights and threshold are
configurable; defaults to fail-open on evaluator error. Gate wired into
SkillGenerator::approve_and_save and shared by proactive/promotion paths.

Feature C (#3320): ProactiveExplorer — classifies query domain (keyword-based) and
generates a world-knowledge-{domain} SKILL.md when none exists. Runs before context
assembly; new skill visible from the next turn (intentional MVP bound to keep turn
latency predictable).

Feature A (#3305): CompressionLevel enum (Episodic/Procedural/Declarative),
RetrievalPolicy that skips episodic recall below configurable token-budget thresholds,
and PromotionEngine that scans episodic memory in a background JoinSet and promotes
repeated patterns to skills. MemoryError::Promotion variant added; anyhow replaced
with thiserror throughout new library code.

All three features are disabled by default ([skills.evaluation], [skills.proactive_exploration],
[memory.compression_spectrum]) and require no migration for existing configs.

Closes #3319, #3320, #3305
@bug-ops bug-ops merged commit 459ad1b into main Apr 24, 2026
32 checks passed
@bug-ops bug-ops deleted the skills-compression-spectrum branch April 24, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate documentation Improvements or additions to documentation enhancement New feature or request memory zeph-memory crate (SQLite) rust Rust code changes size/XL Extra large PR (500+ lines) skills zeph-skills crate

Projects

None yet

1 participant