Skip to content

[Behavior Mgmt] Gemini CLI should prefer using automated linting and formatting tools vs. manually making changes #15032

@gundermanc

Description

@gundermanc

What would you like to be added?

Gemini CLI should prefer utilizing automated refactorings, when possible, to accomplish its goal.

This means, for example, that it should utilize eslint --fix prior to trying to fix linter errors itself and prettier instead of formatting files manually, if applicable.

Why is this needed?

  • Completion time -- automated compiler-based tools are much faster and more effective at performing automated refactors and reformatting than an agent because they are deterministic, parallelizable, and require significantly less wall clock time due to the lack of an LLM call.

  • Limited Context Window -- As described in Gemini CLI often performs badly when the context window gets large #9791, asking GCLI to fix a linter error in a moderately large project commonly causes it to run into context rot, confusion, and/or looping. I experienced this first hand with Disallow redundant typecasts. #15030. It was significantly faster doing it "manually" with eslint . --fix.

Additional context

I think this is something fixable via prompt changes. I'd scope it to include:

  • Creation and initialization of projects -- should ideally be guided to use ecosystem relevant tools.
  • Linting, reformatting -- should utilize --fix and --write or the equivalent.

Metadata

Metadata

Assignees

Labels

area/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Qualitystatus/need-triageIssues that need to be triaged by the triage automation.workstream-rollupLabel used to tag epics and features that are associated with one of the three primary workstreams🔒 maintainer only⛔ Do not contribute. Internal roadmap item.

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions