Repository navigation
docs: agent-safe CLI fallback guidance + review rule - #1596
Merged
Merged
Conversation
Document that CLI features must expose their useful output through a non-interactive path (JSON, list+show, selector flag, or a non-TTY text fallback), not only through a TUI, picker, confirmation, or stdin prompt. The guidance lives under Code Patterns in CLAUDE.md (AGENTS.md symlinks to it). Entire-Checkpoint: 9587f9abf6b3
Teach the trail-review and trail-review-focus runners to flag commands whose useful result is reachable only interactively (TUI, picker, confirmation, or stdin prompt) with no non-interactive path. Framed as a functional gap / missing guard rather than a style preference so the finding survives the review runner's no-style/no-refactor filters. Entire-Checkpoint: 0c366988bc4b
Contributor
There was a problem hiding this comment.
Pull request overview
Adds repository guidance and automated-review prompting to ensure new/changed CLI features don’t gate “useful output” behind interactive-only flows that non-interactive agents can’t access.
Changes:
- Documents an “Agent-Safe CLI Fallbacks” pattern in
CLAUDE.md(and thusAGENTS.md) with concrete acceptable non-interactive shapes and review/test guidance. - Updates
.entire/runners/trail-review.jsonto flag interactive-only output paths as a functional gap / missing guard. - Updates
.entire/runners/trail-review-focus.jsonto include “interactive-only with no fallback” as a human-review focus area.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
CLAUDE.md |
Adds a new “Agent-Safe CLI Fallbacks” section with requirements, review checklist, and examples. |
.entire/runners/trail-review.json |
Extends the trail review prompt to detect interactive-only output paths lacking non-interactive fallbacks. |
.entire/runners/trail-review-focus.json |
Extends the focus prompt to highlight TUI/picker-gated commands without non-interactive paths. |
Contributor
Author
|
Bugbot run |
pfleidi
marked this pull request as ready for review
July 1, 2026 21:32
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 061777b. Configure here.
computermode
approved these changes
Jul 1, 2026
This was referenced Jul 2, 2026
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.
https://entire.io/gh/entireio/cli/trails/722
Why
Non-interactive agents can't reach output that is gated behind a TUI, picker,
wizard, confirmation dialog, or stdin question — they see a menu they can't
answer or a preview they can't expand. The repo had no written guidance for
building or reviewing CLI features against this failure mode, and the trail
review runners weren't looking for it. Several existing commands already exhibit
the problem (e.g. bare
rewind,sessions stop,clean).What changed
CLAUDE.md(AGENTS.mdsymlinks to it) under Code Patterns: what non-interactive shapes are
acceptable (
--json, list + show, a selector flag/arg, or a non-TTY textfallback), what reviewers should inspect, and the existing good patterns to
copy.
trail-reviewandtrail-review-focusrunner prompts so automated review flags commands whoseuseful result is only reachable interactively.
Decisions made during development
(truncated fallback in
review/fix.go; missing non-TTY guards inrewind.go,sessions.go,clean.go) are deferred as follow-up, not bundled here..entire/runners/*.json, not the embedded defaults incmd/entire/cli/runnerdefaults/runners/. Those are this repo's tunedconfigs; the generic defaults ship to arbitrary scaffolded repos where the
bullet's CLI-specific tells (
huh,execx.NonInteractive,entire investigate) don't apply.finding survives the
trail-reviewprompt's own no-style/no-refactor filter.Reviewer notes
The new review rule only inspects the branch diff, so it will not flag the
pre-existing interactive commands already on
main; it fires when a future diffintroduces or changes an interactive-only path.
Rendered Markdown
CLAUDE.mdNote
Low Risk
Documentation and prompt-template text only; no runtime CLI or review pipeline code changes.
Overview
Documents agent-safe CLI fallbacks in
CLAUDE.md(under Code Patterns): non-interactive agents must reach the same useful output via--json, list+show, selector flags/args, or non-TTY text fallbacks—not only TUIs, pickers, or stdin prompts. The section lists what to inspect when reviewing CLI changes (CanPromptInteractively, Bubble Tea,huh, etc.), points atexecx.NonInteractivefor tests, and cites existing commands as patterns.Trail automation picks up the same theme:
trail-review-focusadds a focus bullet for commands with no non-interactive path;trail-reviewadds a high-risk-surface bullet for interactive-only output paths (framed as a functional gap, with concrete code smells). Only.entire/runners/*.jsonis updated—not embeddedrunnerdefaultsshipped to other repos.Reviewed by Cursor Bugbot for commit 061777b. Configure here.