feat(cli): add intent-based command search - #40982
Conversation
Signed-off-by: samzong <samzong.lu@gmail.com>
Four-model agent workflow A/B reportRecommendationKeep the The evaluation covered four models, six command-discovery tasks, and two workflows for 48 isolated Cursor Agent runs. Both workflows selected the expected command path in every run. The measurable benefit is lower context and discovery overhead rather than higher accuracy on this already-saturated task set. Aggregate results
Per-model results
Luna's median duration improved by 6.9% despite its average increasing by 3.1%. With one sample per model/task/workflow combination, latency is not statistically significant; CLI bytes and token footprint are the stronger signals. Agent-workflow test casesEach case was run once per model against both the help-only baseline and the search loop. Agents were required to return the command path, effect, required arguments, and relevant flags without reading source code or executing the business command.
The final search-loop matrix used Automated test cases and verification
Fresh verification on the committed diff:
Interpretation limitsThese tasks are correctly solvable from the existing sitemap, so the evaluation demonstrates that search preserves command-selection accuracy while reducing context cost. It does not establish an accuracy improvement for ambiguous, synonym-heavy, no-match, or noun-collision intents. Those require a larger blind ranking set with top-1, top-3, and MRR measurements. |
Summary
difyctl search "<intent>"over live command help metadataIssue: none; this draft is opened for maintainer discussion.
Screenshots
Not applicable — CLI-only change.
Checklist
cli/README.md.pnpm tree:check,pnpm test, local agent-workflow E2E,pnpm build, and staged-pathvp checkpassed.From Cursor