Repository navigation
feat: default tool-discipline prompt + honest --allow semantics (#103) - #105
Merged
Merged
Conversation
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
Contributor
Author
Acceptance evidence (post-merge, develop
|
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
Default system prompt for fresh CLI sessions + honest
--allowhelp:default_system_prompt()(tole-cli host, applied only when neither--systemnorTOLE_SYSTEM_PROMPTis set): a short tool-discipline block — prefer the dedicated file tools (read_file/write_file/edit_file) overrun_commandfor file operations;run_commandonly for what those cannot do. Twocfgvariants: withshell-toolsthe guidance mentionsrun_commandas the guarded fallback; without it (mobile/embedder profile) the prompt never advertises the unregistered tool.--allowhelp now states the real semantics: patterns match tool names only — an equivalent-effect tool such asrun_commandstays separately gated, and Destructive is never auto-allowed.run,chat) resolve: explicit flag → env → built-in default. Resumed sessions re-apply their header-pinned prompt exactly as before (no behavior change on resume).Why
Issue #103, from a live E2E in the 2026-09-19 UX audit: asked to
write_file, glm-5.3-flash bypassed torun_commandwith abash -cheredoc. The bypass (a) dodges the file tools' workspace jail + hash-anchored editing, and (b) makes--allow 'write_*'a false promise — the user pre-approved writes yet still gets a second prompt (or believes writes are gated when they run through the generic lane). Core stays prompt-agnostic: this changes only the CLI host's default, and the evals Tier-1 golden wire (which pins an explicit prompt) is untouched.Changes
tole-cli/src/main.rs:default_system_prompt()(2 cfg variants) +.or_elsefallback at both fresh-session sites + expanded--allowdoc-comment +default_prompt_tests(content + length guard)Testing
cargo fmt --all/cargo clippy --workspace --all-targets -- -D warnings✅cargo test --workspace✅ (exit 0, 12 suites ok) ANDcargo test -p tole-core --no-default-features✅ (exit 0, 7 suites ok — both feature profiles per repo rule)cora review --staged✅ No issues foundrun_command bash -c— the new default prompt instructs the dedicated lane; full acceptance check runs with the release binary after mergeCloses #103