Skip to content

Gemini CLI should periodically reflect on the trajectory and recommend the creation or update of skills #21421

@gundermanc

Description

@gundermanc

Closely related to #20062

This item specifically tracks a scoped down version of this feature for just skills. We should consider whether the same pattern can be used for memory updates as well, but the memory effort is a bit broader.

Initial framing:

I want to create a new Gemini CLI feature that periodically reflects on the session history and
   then prompts the user to ask if we want to remember new skills that the agent has learned
   during the session. The goal of this feature is to enable the agent to self-improve, with some
   user supervision.

   Effectively, the flow should be:
   - User is working with the agent.
   - As they guide the agent, it is implicitly learning how to accomplish a specific task.
   - If the agent thinks that it has acquired some high value knowledge, it should call the
   ask_user tool to present its learnings briefly "During this task I learned how to ___. Would
   you like me to [create/update] [skill-name] so I can do it again in the future?"
   - If the user selects "yes", it should call the reflect subagent.
   - The reflect subagent should be a built in subagent that accepts the entire chat history and
   then uses to it record any new findings as either memory or skill improvements.
   - Skills -- these should be non-trivial collections of preferences, scripts, and learnings that
   enable the agent to do something it was previously unable to do without a lot of instruction.
   These are task or area specific and lazily loaded. In some cases this may contain detailed
   information about the structure of a part of the codebase, particularly if doing so helps the
   agent work more productively.
   - Memory -- these are preferences and details about how to work effectively in the codebase
   that are not task or area specific.

   The reflect subagent should have the basic tools required to read, search, and edit Gemini.md
   files, and files in the repo's .gemini folder.

   Only skills and memory in the repo should be updated during reflection loops.

Metadata

Metadata

Assignees

Labels

area/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Qualitykind/customer-issueIssues that were reported by customerspriority/p2Important but can be addressed in a future release.priority/p3Backlog - a good idea but not currently a priority.status/bot-triagedworkstream-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 Epic.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions