Repository navigation
feat: optional AI explanations and agent hand-off - #6
Merged
Merged
Conversation
AI is off by default and changes no layout. With a provider (a detected agent CLI or any stdin-to-stdout command), a failed step's card shows a model-written explanation beside its deterministic headline, and the menu offers Open in agent, which starts the user's own agent CLI in the project with the failure's context. The CLI adds `lest explain`, `lest context`, `lest docs agent` and `lest config show|set`; calls are cached and capped per day.
Member
Author
|
A review found 12 issues. Dispositions:
|
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.
Summary
Optional AI, described in
docs/ai.mdand following the rules indocs/design.md. AI is off by default, nothing is sent anywhere until a provider is chosen, and turning it on changes no layout.crates/lest-core/src/ai.rs): one headless call. The prompt goes on stdin with no tools, no MCP servers and no user customizations, in an empty temporary directory, killed after 90s. Choices arenone,auto, a supported agent CLI, orcommand(any program that reads stdin and prints text). Answers are cached by input, calls are counted per day, anddailyLimitcaps them.lest explain <run>,lest context <run>,lest docs agent(the authoring guide plus the format, browser and demo references, as installed), andlest config show|set.Evidence
make checkpasses, including 37 UI tests (8 new ones cover each state of the explanation slot) and 5 provider tests: the deterministic fallback, a command provider with caching, a failing provider, the context contents, and the agent command. I dogfooded the CLI against the failing example with a real agent CLI. The explanation came back and was cached: a second call took 17ms. Screenshots use a custom command provider (local-model), so no vendor appears.AI on: a model explanation in the slot, the headline beside it, and Open in agent in the menu.
AI off: the same card, for comparison.
Settings, AI section