Skip to content

feat(skills): SAGE RL reward signal, trust governance, SkillsBench constraints#2348

Merged
bug-ops merged 3 commits intomainfrom
sage-skill-library-rl
Mar 28, 2026
Merged

feat(skills): SAGE RL reward signal, trust governance, SkillsBench constraints#2348
bug-ops merged 3 commits intomainfrom
sage-skill-library-rl

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 28, 2026

Summary

Implements three research-driven improvements to zeph-skills (#2232, #2233, #2261).

Test plan

  • 6442 unit tests pass (cargo nextest run --workspace --lib --bins)
  • cargo +nightly fmt --check passes
  • Clippy clean on changed crates
  • 26 new tests covering all new code paths (session count queries, escalation checks, section validation, provenance parsing, serde roundtrips)
  • Migrations 047 + 048 apply cleanly to existing DB schema
  • All new config fields have serde defaults and appear in --init wizard and default.toml

Closes #2232, #2233, #2261

…nstraints (#2232, #2233, #2261)

Issue #2232 — cross-session rollout tracking for skill promotion/demotion:
- Add `cross_session_rollout` and `min_sessions_before_promote` config fields
- Add separate `min_sessions_before_demote` (default 1) to prevent symmetric misuse
- Add `distinct_session_count` SQL query on skill_outcomes using existing conversation_id
- Migration 048: composite index on skill_outcomes(skill_name, conversation_id)
- Guard both promotion and demotion in check_trust_transition when enabled

Issue #2233 — skill trust governance and security scanning:
- Add `ScannerConfig` nested under TrustConfig with `injection_patterns` and
  `capability_escalation_check` fields
- Add `check_capability_escalation` in scanner.rs: validates allowed_tools against
  QUARANTINE_DENIED list for Quarantined/Blocked trust levels
- Add `EscalationResult` type and `check_escalations` registry method
- Wire escalation check into bootstrap when capability_escalation_check is enabled
- Add provenance fields `source_url` and `git_hash` to SkillMeta (x-source-url,
  x-git-hash frontmatter keys)
- Migration 047: git_hash column in skill_trust table

Issue #2261 — SkillsBench section cap and domain evaluation gate:
- Add `max_auto_sections` config field (default 3): caps auto-generated skill bodies
  at 3 H2 sections via validate_body_sections()
- Add `domain_success_gate` config field (default false): LLM-based domain relevance
  check before activating auto-generated skill versions
- Add DOMAIN_GATE_PROMPT_TEMPLATE, DomainGateResult type, build_domain_gate_prompt()
- Add section limit instruction to IMPROVEMENT_PROMPT_TEMPLATE

All new config fields wired into --init wizard and auto-migrated via default.toml.
26 new unit tests across zeph-config, zeph-skills, zeph-memory, zeph-core.

Closes #2232, #2233, #2261
@github-actions github-actions bot added enhancement New feature or request documentation Improvements or additions to documentation skills zeph-skills crate memory zeph-memory crate (SQLite) rust Rust code changes core zeph-core crate dependencies Dependency updates config Configuration file changes size/XL Extra large PR (500+ lines) and removed enhancement New feature or request labels Mar 28, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 28, 2026 11:35
@github-actions github-actions bot added the enhancement New feature or request label Mar 28, 2026
@bug-ops bug-ops merged commit 766d525 into main Mar 28, 2026
25 checks passed
@bug-ops bug-ops deleted the sage-skill-library-rl branch March 28, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Configuration file changes core zeph-core crate dependencies Dependency updates 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