feat: add configurable agent guidance filename with smart merge#783
feat: add configurable agent guidance filename with smart merge#783eliasecchig merged 1 commit intomainfrom
Conversation
Summary of ChangesHello @eliasecchig, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the flexibility and user experience of the Agent Starter Pack by allowing users to customize the filename for agent guidance documentation. Previously, this was fixed to Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a valuable feature for configurable agent guidance filenames and a smart merge capability to preserve user customizations during enhance. The changes are well-implemented across templates, CLI commands, and utility functions. The inclusion of comprehensive tests for the new merge logic is commendable. I have one suggestion to further improve the robustness of the merge function. Overall, this is a great enhancement to the tool.
Add --agent-guidance-filename parameter to create and enhance commands,
allowing users to customize the guidance file name (e.g., CLAUDE.md,
AGENTS.md instead of the default GEMINI.md).
- Add --agent-guidance-filename CLI option (default: GEMINI.md)
- Rename GEMINI.md to {{cookiecutter.agent_guidance_filename}} in all
base templates (Python, Go, Java, TypeScript)
- Persist agent_guidance_filename in project config for enhance flow
- Pass agent_guidance_filename through cookiecutter context
The smart-merge in enhance handles preservation of user changes to the
guidance file, so no custom merge logic is needed.
aab871d to
a9378bc
Compare
Summary
--agent-guidance-filenameCLI flag tocreateandenhancecommands (default:GEMINI.md)CLAUDE.mdorAGENTS.mdfor agent guidance filesenhance: ASP-managed sections are updated while user content is preservedagent_guidance_filenamein project config (only when non-default) across all templates (Python, Go, TypeScript, Java)Problem
Agent guidance files were hardcoded to
GEMINI.md. Users of other coding agents (Claude Code, Cursor, etc.) had no way to generate guidance asCLAUDE.mdorAGENTS.md. Additionally,enhancewould overwrite the entire guidance file, losing any user-added content.Solution
{{cookiecutter.agent_guidance_filename}}instead of hardcodedGEMINI.md<!-- ASP-MANAGED-START/END: agent-guidance -->markersmerge_guidance_file()replaces only the ASP-managed section, preserving user notes outside markerscreate_paramssoenhanceauto-detects it from saved configagent_guidance_filenameto the subprocess re-invocation in enhance