Skip to content

feat(core): skill draft gate, store, taint and dedup bands (#592 part 1) - #656

Merged
ajianaz merged 2 commits into
developfrom
feat/skill-propose-core
Nov 13, 2026
Merged

ajianaz merged 2 commits into
developfrom
feat/skill-propose-core

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

What

Part 1 of #592: the core of skill growth. A skill_draft module in tole-core with 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 (the skill_propose tool and tole skills drafts) small enough for Cora Review.

Changes

  • crates/tole-core/src/skill_draft.rs (new):
    • gate refuses 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.
    • DraftStore keeps 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_*) and Band (0.92 patch, 0.80 reference, else new). Only a reviewer's Verdict can say conflict.
  • sanitize::is_unsafe is pub(crate) so the gate reuses the invisible-character rule.
  • CHANGELOG.md and docs/epics.md (E3 status) updated in this PR.

Testing

  • cargo fmt --all, cargo clippy --workspace --lib --bins and cargo clippy -p tole-core --all-targets -- -D warnings (also --no-default-features): clean.
  • 9 new unit tests (gate rules, no secret quoted, token-shape word boundary regression, bands, taint, store lifecycle). cargo test -p tole-core: all pass.
  • Not caused by this PR, reproduced on clean develop on macOS: tui_e2e does not compile (libc::openpty signature), 3 delegate:: tests and compaction_e2e::doctor_warns_non_fatally_about_a_missing_window fail. CI runs on Linux.
  • Cora agent review (review_prepare 0 deterministic findings, own review found and fixed a sk- false positive inside hyphenated words, review_finalize should_block: false).

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.
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit d151fd9 into develop Nov 13, 2026
15 checks passed
@ajianaz
ajianaz deleted the feat/skill-propose-core branch November 13, 2026 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant