Skip to content

feat(tracker): support extension-contributed tracker directory and ensure project precedence#23836

Closed
moisgobg wants to merge 1 commit intofeat/builtin-conductorfrom
feat/sdd-tracker-integration
Closed

feat(tracker): support extension-contributed tracker directory and ensure project precedence#23836
moisgobg wants to merge 1 commit intofeat/builtin-conductorfrom
feat/sdd-tracker-integration

Conversation

@moisgobg
Copy link
Copy Markdown

Summary

This PR enables extensions to contribute their own task tracking directory via their gemini-extension.json configuration, while ensuring that user-defined project-level settings always take absolute precedence.

This core capability is a prerequisite for the upcoming sdd extension integration, allowing it to default its tracker directory to .gemini/tracker automatically.

Details

  • Added tracker property to ExtensionConfig: Properly types the configuration so extensions can declare their task tracking directory.
  • Fixed Extension Loading: Updated _buildExtension in the ExtensionManager to actually parse and pass the tracker configuration object from the extension up to the CLI.
  • Precedence Logic & Tests: Verified that settings.general.tracker.directory correctly overrides the extensionTrackerSettings default, and added comprehensive test coverage for these precedence rules in config.test.ts.

Related Issues

Fixes #23724

How to Validate

  1. Check out this branch and run npm run build:all.
  2. Configure an extension (like sdd) to use a custom tracker directory (e.g., .gemini/tracker) and verify that tasks are created there.
  3. Add a project-level .gemini/settings.json with a different custom directory for the tracker.
  4. Verify that the CLI immediately begins writing new tasks to the project-level directory instead of the extension's default directory, proving precedence.
  5. Run the config tests to verify the new test cases pass: npm test -w @google/gemini-cli -- src/config/config.test.ts.

Pre-Merge Checklist

  • Added/updated tests (if needed)
  • Validated on required platforms/methods:
  • Linux
    • npm run
    • npx
    • Docker

…sure project precedence

- Add 'tracker' property to ExtensionConfig to allow extensions to specify task tracking directories.
- Fix extension loading to pass tracker configuration from extensions.
- Implement project-level precedence for tracker directory over extension defaults.
- Add comprehensive tests for tracker directory resolution and precedence.
@moisgobg moisgobg self-assigned this Mar 25, 2026
@moisgobg moisgobg requested a review from a team as a code owner March 25, 2026 23:19
@moisgobg moisgobg added area/core Issues related to User Interface, OS Support, Core Functionality area/extensions Issues related to Gemini CLI extensions capability 🔒 maintainer only ⛔ Do not contribute. Internal roadmap item. labels Mar 25, 2026
@gemini-cli
Copy link
Copy Markdown
Contributor

gemini-cli bot commented Mar 25, 2026

Hi @moisgobg, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this.

We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines.

Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed.

Thank you for your understanding and for being a part of our community!

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 introduces a significant enhancement to the configuration system, allowing extensions to specify their preferred task tracking directories. Crucially, it establishes a clear precedence rule where any user-defined project-level tracker directory will always override an extension's default, ensuring user control. This foundational change paves the way for future integrations, such as the sdd extension, to seamlessly define their tracker paths.

Highlights

  • Extension-Contributed Tracker Directory: Enabled extensions to contribute their own task tracking directory via their gemini-extension.json configuration.
  • Project Precedence: Ensured that user-defined project-level tracker directory settings always take absolute precedence over any extension-contributed defaults.
  • Comprehensive Testing: Implemented comprehensive test coverage for the new precedence rules and tracker directory handling, including scenarios for active/inactive extensions and various path configurations.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces configurable task tracker directories for the CLI. It adds new settings for both user and extension-defined tracker directories, with user settings taking precedence. The Storage class now includes logic to resolve and validate these custom directories, ensuring they remain within the project root for security. The Config class and TrackerService have been updated to utilize this new directory resolution. Comprehensive unit and integration tests have been added to cover various path scenarios and the interaction between user and extension settings. I have no feedback to provide on the review comments, as none were supplied.

Note: Security Review did not run due to the size of the PR.

@gemini-cli gemini-cli bot added the area/agent Issues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality label Mar 25, 2026
@jerop jerop deleted the branch feat/builtin-conductor April 1, 2026 16:18
@jerop jerop closed this Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/agent Issues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality area/core Issues related to User Interface, OS Support, Core Functionality area/extensions Issues related to Gemini CLI extensions capability 🔒 maintainer only ⛔ Do not contribute. Internal roadmap item.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants