Skip to content

Codebase Investigator: Separate initial query from system prompt and apply templateStrings in query and initialMessages#10282

Merged
silviojr merged 3 commits into
mainfrom
separate_prompt_instruction
Oct 1, 2025
Merged

Codebase Investigator: Separate initial query from system prompt and apply templateStrings in query and initialMessages#10282
silviojr merged 3 commits into
mainfrom
separate_prompt_instruction

Conversation

@silviojr
Copy link
Copy Markdown
Contributor

@silviojr silviojr commented Oct 1, 2025

TLDR

The main goal of this PR is to separate the query from the system instruction.

In this PR:

  1. Add a new option in promptConfig: query. This should be the message to start the loop, coming after the initialMessages that may contain other content.
  2. Use templateString in both query and initialMessages using the values of the input parameters.
  3. Update the Codebase Investigator subagent to use the new query field. Also update its description and the description of its inputs to match what we have been testing offline.

Dive Deeper

Reviewer Test Plan

Added new unit tests.

Testing Matrix

🍏 🪟 🐧
npm run x x
npx
Docker
Podman - -
Seatbelt - -

Linked issues / bugs

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 1, 2025

Size Change: -2 B (0%)

Total Size: 17.5 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 17.4 MB -2 B (0%)
./bundle/sandbox-macos-permissive-closed.sb 1.03 kB 0 B
./bundle/sandbox-macos-permissive-open.sb 830 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-closed.sb 3.29 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B

compressed-size-action

@silviojr silviojr requested a review from abhipatel12 October 1, 2025 02:21
@silviojr silviojr changed the title Use string templates for initial messages. Codebase Investigator: Separate initial query from system prompt and apply templateStrings in query and initialMessages Oct 1, 2025
@silviojr silviojr marked this pull request as ready for review October 1, 2025 02:22
@silviojr silviojr requested a review from a team as a code owner October 1, 2025 02:22
@silviojr silviojr requested a review from anj-s October 1, 2025 02:34
Copy link
Copy Markdown
Contributor

@abhipatel12 abhipatel12 left a comment

Choose a reason for hiding this comment

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

LGTM!

just one comment

Comment thread packages/core/src/agents/types.ts Outdated
@silviojr silviojr enabled auto-merge October 1, 2025 18:46
@silviojr silviojr added this pull request to the merge queue Oct 1, 2025
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 1, 2025
@silviojr silviojr added this pull request to the merge queue Oct 1, 2025
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 1, 2025
Add option to add initial query to the subagent
Update codebase investigator with new query option.
@silviojr silviojr force-pushed the separate_prompt_instruction branch from 1675e03 to 5b6bbc1 Compare October 1, 2025 20:08
@silviojr silviojr enabled auto-merge October 1, 2025 20:08
@silviojr silviojr added this pull request to the merge queue Oct 1, 2025
Merged via the queue into main with commit 7e493f4 Oct 1, 2025
20 checks passed
@silviojr silviojr deleted the separate_prompt_instruction branch October 1, 2025 20:30
thacio added a commit to thacio/auditaria that referenced this pull request Oct 6, 2025
… from system prompt and apply templateStrings in query and initialMessages (google-gemini#10282)
giraffe-tree pushed a commit to giraffe-tree/gemini-cli that referenced this pull request Oct 10, 2025
cocosheng-g pushed a commit that referenced this pull request May 6, 2026
…apply templateStrings in query and initialMessages (#10282)
@sripasg sripasg added the size/l A large sized PR label Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/l A large sized PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants