Repository navigation
feat(core): skill curator usage ledger, lifecycle and package-aware archive (#593 part 1) - #659
Merged
Merged
Conversation
…rchive (#593 part 1) Adds tole_core::skill_curator: an append-only usage ledger, a derived active/stale/archived lifecycle with grace, pin and cron protection, underperformer detection against a skill-less baseline, and archive and restore of whole skill packages recorded in a mutation ledger.
| before_hash: before.hash, | ||
| after_hash: after.hash, | ||
| reason: reason.chars().take(200).collect(), | ||
| }; |
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
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.
What
Part 1 of #593: the deterministic core of the skill curator,
tole_core::skill_curator. No command or config key yet (part 2).Why
A growing library fills with narrow near-duplicates and skills nobody uses, which waste tokens and pollute recall (design
skills-registry-design.md§4.5, §6.4; owner: on by default, can be switched off or paused). The lifecycle, the ledgers and the package moves are all LLM-free, so they come first and can be tested without a model.Changes
crates/tole-core/src/skill_curator.rs(new):skill-usage.jsonl, append-only: recalled, loaded, success and failure per skill, and a baseline for runs that loaded no skill. A recall alone is not use. Malformed lines are skipped; past 8 MiB only the newest lines are read.archive_daysmust exceedstale_days.references/,scripts/andassets/stay withSKILL.md. Restore refuses a taken place and an archived copy that changed since. A symlink, a missing directory and a bad name are refused.skill-curator.json, written atomically.skill_approval::read_dir_packagereads a package by directory.CHANGELOG.mdanddocs/epics.mdare updated in this PR.Testing
cargo fmt --all; clippy-D warningsontole-core(also--no-default-features) and the workspace lib and bins: clean.cargo test -p tole-core: all pass.review_prepare0 deterministic findings,review_finalizeshould_block: falsewith one info note (mutation ids assume one sweep at a time; part 2 takes a lock).