Skip to content

feat(cli): owner-only tole discuss command for multi-round discussions - #697

Merged
ajianaz merged 2 commits into
developfrom
feat/discuss-cli
Nov 14, 2026
Merged

ajianaz merged 2 commits into
developfrom
feat/discuss-cli

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

What

tole discuss start|resume|list|show: the owner-only entry point of the multi-round discussion (#588), step 1 of the owner's decision (c) in docs/automation-design.md "Entry point".

Why

The discussion library (discussion_host) works end to end but nothing could start one. Starting from a shell needs no new trust decision: the owner types the contract, so there is no injection path. It also shows the owner what a discussion costs and exercises the library for real. The model-facing tool follows in a separate PR.

Changes

  • tole discuss start --question Q --criterion C... --participant P... --budget N [--max-rounds R] [--id ID] [--dry-run]: the contract is exactly what was typed. Participants are user-config profiles voiced inline and read-only (no tools, no process), depth 0. The budget is the hard cap the ledger already enforces; a stop at the budget or --max-rounds is an escalation printed to the owner.
  • Cost: --dry-run validates and prints participants, rounds, most model calls and the cap, with no provider call and no write. A real run prints the same plan first and the tokens used at the end.
  • tole discuss resume <ID>: continues from the ledger after a crash or a failed call (finished turns are not rerun, the contract's own budget applies); a finished discussion prints its outcome again.
  • tole discuss list|show [--json]: the tole audit --discussions view; they skip config loading and need no provider.
  • Errors are redacted and name the resume command. New module tole_cli::discuss; the Discuss command is wired in main.rs (config gate: start/resume may prompt like run, list/show skip it).
  • CHANGELOG, docs/epics.md and docs/automation-design.md (decision recorded) updated.

Testing

  • 10 unit tests (discuss_tests.rs) and 4 end-to-end tests (tests/discuss_cli.rs, real binary against a mock provider): owner-typed contract stored verbatim, budget hard cap with escalation, bad contract or participant (unknown profile, built-in role) refused with nothing written and no provider call, duplicate id refused, dry run runs nothing, crash then resume without rerunning finished turns and within the same budget, a tool call from a participant runs nothing, redaction, list/show without config or provider.
  • Mutation checks: dropping the owner-escalation line fails the cap test; doubling the contract budget fails 3 tests.
  • cargo fmt, clippy --workspace --all-targets --all-features -D warnings, cargo test --workspace, tole-core --no-default-features pass, except agents::parent_spawns_child_polls_until_settled and compaction_e2e::doctor_warns_non_fatally_about_a_missing_window, which also fail on clean develop in this environment.

Refs #588

#588 part 3a)

start, resume, list and show a discussion from a shell. The contract is typed by the owner, participants are read-only inline voices at depth 0, the budget is a hard cap, and --dry-run shows what a discussion may cost.
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

/// (kept under its old name) overrides it. A missing uteke binary degrades to a warning + no-op
/// (the same probe contract as the uteke tools).
#[cfg(feature = "shell-tools")]
/// `tole discuss` (#588): the owner-only entry point.
discuss_command was inserted between the cfg attribute and the function it gates, which broke the build without shell-tools.
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.

3 participants