Repository navigation
feat(core): skill draft gate, store, taint and dedup bands (#592 part 1) - #656
Merged
Merged
Conversation
Adds tole_core::skill_draft: the gate (shape lint, secret scan, injection patterns), provenance, a taint tracker, dedup bands and a draft store kept outside every skills directory, so nothing can load a draft.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This was referenced Nov 13, 2026
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 #592: the core of skill growth. A
skill_draftmodule intole-corewith the gate, the draft store, provenance, a taint tracker and the dedup bands. No tool or command yet (part 2).Why
The owner decided that skills grow only by proposal plus approval (design
skills-registry-design.md§4.4, §6.3). A draft must never be loadable, must record where it came from, and must be refused when it carries a secret, an instruction override or the wrong shape. Doing the pure logic first keeps part 2 (theskill_proposetool andtole skills drafts) small enough for Cora Review.Changes
crates/tole-core/src/skill_draft.rs(new):gaterefuses a proposal on a blocking finding: frontmatter or name, empty description, size cap, more than one top-level heading, more than 3 module files, an incident-log shape (3+ dated lines), a known secret value or token shape (never quoted back), an instruction-override phrase, invisible or bidi characters. Risky shapes are stored as warnings.DraftStorekeeps drafts in$CODECORA_HOME/tole/skill-drafts/<id>/outside every skills directory. A draft is never overwritten and is decided once.Provenance(sessions, trigger, model),TaintTracker(untrusted tools:web_fetch,web_search,mcp_*) andBand(0.92 patch, 0.80 reference, else new). Only a reviewer'sVerdictcan sayconflict.sanitize::is_unsafeispub(crate)so the gate reuses the invisible-character rule.CHANGELOG.mdanddocs/epics.md(E3 status) updated in this PR.Testing
cargo fmt --all,cargo clippy --workspace --lib --binsandcargo clippy -p tole-core --all-targets -- -D warnings(also--no-default-features): clean.cargo test -p tole-core: all pass.developon macOS:tui_e2edoes not compile (libc::openptysignature), 3delegate::tests andcompaction_e2e::doctor_warns_non_fatally_about_a_missing_windowfail. CI runs on Linux.review_prepare0 deterministic findings, own review found and fixed ask-false positive inside hyphenated words,review_finalizeshould_block: false).