feat(simulate): save generated scenarios, generate from sessions, default to ./scenarios.yaml - #969
Open
u9g wants to merge 4 commits into
Open
feat(simulate): save generated scenarios, generate from sessions, default to ./scenarios.yaml#969u9g wants to merge 4 commits into
u9g wants to merge 4 commits into
Conversation
analyticsGET takes a ProjectConfig so other commands can read the project's sessions without going through the analytics command's package-level project.
…/scenarios.yaml `lk agent simulate` now picks up ./scenarios.yaml without --scenarios. `lk agent simulate generate [SESSION_ID...]` derives one scenario per recorded session via CreateScenarioFromSession and appends them to the scenarios file without running anything. Without IDs it offers the project's recent sessions to pick from.
u9g
force-pushed
the
jason/simulate-scenarios-from-sessions
branch
from
September 8, 2026 19:01
9843393 to
74d0709
Compare
When a source-generated run's scenarios arrive, the TUI asks once whether to write them to scenarios.yaml in the project. Accepting when that name is taken opens the existing file-name dialog instead of overwriting. The s key still saves later.
u9g
force-pushed
the
jason/simulate-scenarios-from-sessions
branch
from
September 8, 2026 19:07
74d0709 to
3e9ca4d
Compare
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
Follows the CLI DX discussion with Ben and Nic's first-run feedback in #project-simulations.
scenarios.yamlin the project. Accepting when that name is already taken opens the existing file-name dialog instead of overwriting. Theskey still saves later. The generate → simulate flow is otherwise unchanged../scenarios.yamlis the default.lk agent simulate(andsimulate audio) picks it up without--scenarios;--agent-nameis satisfied by it too. So the second run in a project uses what the first run saved.lk agent simulate generate [SESSION_ID...]derives one scenario per recorded session viaCreateScenarioFromSessionand appends to the scenarios file without running anything. Without IDs it offers the project's recent sessions to pick from; explicit IDs are the non-interactive path.Notes
generatewithout IDs reports "Scale plan or higher is required" and users pass session IDs from the dashboard. Lifting that needs a non-gated session list on the simulation service.web(CLI agent reference,agents/start/testing/simulations) should mention the default file, the save prompt, andgenerate; follow-up.Test plan
go test ./cmd/lkpasses; new VRT framesimulate_save_offerlk agent simulate generate RM_xreaches the cloud and reports the per-session error--agent-namewithout a scenarios file prints the new error🤖 Generated with Claude Code