Skip to content

feat(cli): skill_propose tool and tole skills drafts (#592 part 2) - #657

Merged
ajianaz merged 3 commits into
developfrom
feat/skill-propose-tool
Nov 13, 2026
Merged

ajianaz merged 3 commits into
developfrom
feat/skill-propose-tool

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

What

Part 2 of #592: the skill_propose tool and tole skills drafts. An agent can now propose a skill, and only as a draft; the owner lists, reads, rejects or records a reviewer's verdict on it. Promotion is part 3.

Why

The owner decided that skills grow only by proposal plus approval (design skills-registry-design.md §4.4). Part 1 (#656) added the gate and the store; this wires them to the agent and to the owner. Nothing here makes a skill loadable.

Changes

  • skill_propose (new, Write tier, so each call is approved): input is name, skill_md, trigger and optional sources; any other field is refused. The host adds the session id, model, taint and meaning dedup, none settable from the input. A blocking finding stores nothing and the refusal never quotes a secret. Registered for session faces only (not a child, not plan mode, not cron runs).
  • Taint: ToolRegistry::set_taint_tracker and a record at the turn loop's single execute funnel (gate::Authorized::execute), so web_fetch, web_search and mcp_* runs mark later drafts, failed calls included.
  • Taint hardening (from an automated security review of this PR): the registry recomputes the tool taint from the session's own entries at the start of every turn, so a resumed session keeps the taint of what it fetched before and a registry reused for another session never carries the wrong one (regression tests in tests/skill_taint.rs); the untrusted set also holds gh, gitea, child-agent and session tools and uteke_recall/uteke_document. read_file and run_command are deliberately not counted (every coding session uses them; --accept-taint would become a reflex), so a page curled inside run_command does not taint. This tradeoff is in the CHANGELOG.
  • Dedup asks the uteke skill index for the nearest skill (patch >= 0.92, reference >= 0.80, else new); without that index the result says dedup did not run.
  • tole skills drafts [list|show|reject|verdict]. Everything a model wrote is printed with control and invisible characters escaped. skill_draft::is_hidden is now public for that.
  • Server faces (tole serve, ACP) pass their session id into the roster. CLI faces build tools before the session exists, so their drafts have no session id yet (documented in the CHANGELOG).
  • CHANGELOG.md, docs/epics.md and the README status are updated in this PR.

Testing

  • cargo fmt --all; cargo clippy on tole-core (also --no-default-features), and on tole-cli lib, bins and every test target except tui_e2e, plus tole-cli --no-default-features --lib: clean with -D warnings.
  • New: 5 tool tests (host stamping, dedup absent or failing, refusal without the secret, closed input, Write risk), 4 formatter and action tests, a gate test for taint recording at the execute funnel, and skill_drafts_e2e driving the real binary (list, show, reject, never loadable).
  • tole-core tests all pass. In tole-cli, not caused by this PR and reproduced on clean develop on macOS: 3 delegate:: tests, compaction_e2e::doctor_warns_non_fatally_about_a_missing_window, and tui_e2e does not compile (libc::openpty signature). setup_cora_e2e is flaky locally (different test fails run to run, also on a stashed baseline). CI runs on Linux.
  • Cora agent review: review_prepare 0 deterministic findings; review_finalize should_block: false with 2 info notes (every mcp_* tool taints, including cora; CLI faces record no session id).

skill_propose writes a draft only: the host stamps the session, model, taint
and meaning dedup, and a blocking finding stores nothing. tole skills drafts
lists, shows, rejects and records a reviewer verdict. The turn loop records
untrusted tool runs for the taint.
The registry folds its taint tracker over the session's existing entries on
the first turn. The untrusted set now also holds gh, gitea, child-agent and
session tools and the shared-memory tools.
@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 f1d40fe into develop Nov 13, 2026
19 checks passed
@ajianaz
ajianaz deleted the feat/skill-propose-tool branch November 13, 2026 05:23
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