Skip to content

Commit b59ea18

Browse files
committed
Merge branch 'main' into pyush/refactor/settings-4
2 parents c3d1266 + 4a48d7c commit b59ea18

File tree

461 files changed

+29918
-8474
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

461 files changed

+29918
-8474
lines changed

.gemini/commands/review-frontend-and-fix.toml renamed to .gemini/commands/review-and-fix.toml

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
description = "Reviews a frontend PR or staged changes and automatically initiates a Pickle Fix loop for findings."
1+
description = "Reviews a PR or staged changes and automatically initiates a Pickle Fix loop for findings."
22
prompt = """
3-
You are an expert Frontend Reviewer and Pickle Rick Worker.
3+
You are an expert Reviewer and Pickle Rick Worker.
44
55
Target: {{args}}
66
@@ -56,8 +56,6 @@ Follow these steps to conduct a thorough review:
5656
pollution.
5757
* Use `vi.useFakeTimers()` for tests involving time-based logic to avoid
5858
flakiness.
59-
* Avoid using `any` in tests; prefer proper types or `unknown` with
60-
narrowing.
6159
* When creating parameterized tests, give the parameters types to ensure
6260
that the tests are type-safe.
6361
8. Evaluate all react logic carefully keeping in mind that the author of the
@@ -105,7 +103,20 @@ Follow these steps to conduct a thorough review:
105103
to include the new property or propose a new provider to add if the
106104
property drilling is excessive. Only use providers for properties that are
107105
consistent for the entire application.
108-
9. General Gemini CLI design principles:
106+
9. Evaluate `packages/core` (Services, Tools, Utilities):
107+
* Ensure services are implemented as classes with clear lifecycle management (e.g., `initialize()` methods).
108+
* Verify that `debugLogger` from `packages/core/src/utils/debugLogger.ts` is used for internal logging instead of `console`.
109+
* Ensure all shell operations use `spawnAsync` from `packages/core/src/utils/shell-utils.ts` for consistent error handling and promise management.
110+
* Check that filesystem errors are handled gracefully using `isNodeError` from `packages/core/src/utils/errors.ts`.
111+
* Verify that new tools are added to `packages/core/src/tools/` and registered in `packages/core/src/tools/tool-registry.ts`.
112+
* Ensure all new public services, utilities, and types are exported from `packages/core/src/index.ts`.
113+
* Check that services are stateless where possible, or use the centralized `Storage` service for persistence.
114+
* **Cross-Service Communication**: Prefer using the `coreEvents` bus (from `packages/core/src/utils/events.ts`) for asynchronous communication between services or to notify the UI of state changes. Avoid tight coupling between services.
115+
10. Architectural Audit (Package Boundaries):
116+
* **Logic Placement**: Non-UI logic (e.g., model orchestration, tool implementation, git/filesystem operations) MUST reside in `packages/core`. `packages/cli` should only contain UI/Ink components, command-line argument parsing, and user interaction logic.
117+
* **Environment Isolation**: Core logic should not assume a TUI environment. Use the `ConfirmationBus` or `Output` abstractions for communicating with the user from Core.
118+
* **Decoupling**: Actively look for opportunities to decouple services by using `coreEvents`. If a service is importing another service just to notify it of a change, it should probably be using an event instead.
119+
11. General Gemini CLI design principles:
109120
* Make sure that settings are only used for options that a user might
110121
consider changing.
111122
* Do not add new command line arguments and suggest settings instead.
@@ -125,17 +136,23 @@ Follow these steps to conduct a thorough review:
125136
meta key shortcuts are supported on Mac.
126137
* Be skeptical of function keys and keyboard shortcuts that are commonly
127138
bound in VSCode as they may conflict.
128-
10. TypeScript Best Practices:
139+
12. TypeScript Best Practices:
129140
* Use 'checkExhaustive' in the 'default' clause of 'switch' statements to
130141
ensure all cases are handled.
131142
* Avoid using the non-null assertion operator ('!') unless absolutely
132143
necessary and you are confident the value is not null.
133-
11. Summarize all actionable findings into a concise but comprehensive directive output this to frontend_review.md and advance to phase 2.
144+
* **STRICT TYPING**: Strictly forbid 'any' and 'unknown' in both CLI and Core
145+
packages. 'unknown' is only allowed if it is immediately narrowed using
146+
type guards or Zod validation. Reject any code that uses 'any' or
147+
'unknown' without narrowing.
148+
13. **Ruthless Cleanup**:
149+
* If you identify significant code duplication, technical debt, or "AI Slop" (boilerplate, redundant comments), explicitly suggest initiating a `ruthless-refactorer` loop to clean it up.
150+
14. Summarize all actionable findings into a concise but comprehensive directive output this to review_findings.md and advance to phase 2.
134151
135152
Remember to use the GitHub CLI (`gh`) for all GitHub-related tasks, and local `git` commands if the target is 'staged'.
136153
137154
Phase 2:
138-
You are initiating Pickle Rick - the ultimate coding agent.
155+
You are initiating Pickle Rick - the ultimate engineering agent.
139156
140157
**Step 0: Persona Injection**
141158
First, you **MUST** activate your persona.
@@ -160,7 +177,7 @@ bash "${extensionPath}/scripts/setup.sh" $ARGUMENTS
160177
pwsh -File "${extensionPath}/scripts/setup.ps1" $ARGUMENTS
161178
```
162179
163-
**CRITICAL**: Your request is to fix all findings in frontend_review.md
180+
**CRITICAL**: Your request is to fix all findings in review_findings.md
164181
165182
**Step 2: Execution (Management)**
166183
After setup, read the output to find the path to `state.json`.
@@ -188,11 +205,14 @@ Between each step, you **MUST** explicitly state what you are doing (e.g., "Movi
188205
* **Validation**: IGNORE worker logs. DIRECTLY verify:
189206
1. `git status` (Check for file changes)
190207
2. `git diff` (Check code quality)
191-
3. Run tests/build (Check functionality)
208+
3. `npm run build` (Ensure the project still builds)
209+
4. `npm run test` (Ensure no regressions)
210+
5. `npm run lint` (Ensure code style is maintained)
211+
6. `npm run typecheck` (Ensure type safety)
192212
* **Cleanup**: If validation fails, REVERT changes (`git reset --hard`). If it passes, COMMIT changes.
193213
* **Next Ticket**: Pick the next ticket and repeat.
194214
4. **Cleanup**:
195-
* **Action**: After all tickets are completed delete `frontend_review.md`.
215+
* **Action**: After all tickets are completed delete `review_findings.md`.
196216
197217
**Loop Constraints:**
198218
- **Iteration Count**: Monitor `"iteration"` in `state.json`. If `"max_iterations"` (if > 0) is reached, you must stop.

.gemini/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"experimental": {
3+
"toolOutputMasking": {
4+
"enabled": true
5+
}
6+
}
7+
}
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
---
2+
name: docs-changelog
3+
description: Provides a step-by-step procedure for generating Gemini CLI changelog files based on github release information.
4+
---
5+
6+
# Procedure: Updating Changelog for New Releases
7+
8+
The following instructions are run by Gemini CLI when processing new releases.
9+
10+
## Objective
11+
12+
To standardize the process of updating the Gemini CLI changelog files for a new
13+
release, ensuring accuracy, consistency, and adherence to project style
14+
guidelines.
15+
16+
## Release Types
17+
18+
This skill covers two types of releases:
19+
20+
* **Standard Releases:** Regular, versioned releases that are announced to all
21+
users. These updates modify `docs/changelogs/latest.md` and
22+
`docs/changelogs/index.md`.
23+
* **Preview Releases:** Pre-release versions for testing and feedback. These
24+
updates only modify `docs/changelogs/preview.md`.
25+
26+
Ignore all other releases, such as nightly releases.
27+
28+
### Expected Inputs
29+
30+
Regardless of the type of release, the following information is expected:
31+
32+
* **New version number:** The version number for the new release
33+
(e.g., `v0.27.0`).
34+
* **Release date:** The date of the new release (e.g., `2026-02-03`).
35+
* **Raw changelog data:** A list of all pull requests and changes
36+
included in the release, in the format `description by @author in
37+
#pr_number`.
38+
* **Previous version number:** The version number of the last release can be
39+
calculated by decreasing the minor version number by one and setting the
40+
patch or bug fix version number.
41+
42+
## Procedure
43+
44+
### Initial Setup
45+
46+
1. Identify the files to be modified:
47+
48+
For standard releases, update `docs/changelogs/latest.md` and
49+
`docs/changelogs/index.md`. For preview releases, update
50+
`docs/changelogs/preview.md`.
51+
52+
2. Activate the `docs-writer` skill.
53+
54+
### Analyze Raw Changelog Data
55+
56+
1. Review the complete list of changes. If it is a patch or a bug fix with few
57+
changes, skip to the "Update `docs/changelogs/latest.md` or
58+
`docs/changelogs/preview.md`" section.
59+
60+
2. Group related changes into high-level categories such as
61+
important features, "UI/UX Improvements", and "Bug Fixes". Use the existing
62+
announcements in `docs/changelogs/index.md` as an example.
63+
64+
### Create Highlight Summaries
65+
66+
Create two distinct versions of the release highlights.
67+
68+
**Important:** Carefully inspect highlights for "experimental" or
69+
"preview" features before public announcement, and do not include them.
70+
71+
#### Version 1: Comprehensive Highlights (for `latest.md` or `preview.md`)
72+
73+
Write a detailed summary for each category focusing on user-facing
74+
impact.
75+
76+
#### Version 2: Concise Highlights (for `index.md`)
77+
78+
Skip this step for preview releases.
79+
80+
Write concise summaries including the primary PR and author
81+
(e.g., `([#12345](link) by @author)`).
82+
83+
### Update `docs/changelogs/latest.md` or `docs/changelogs/preview.md`
84+
85+
1. Read current content and use `write_file` to replace it with the new
86+
version number, and date.
87+
88+
If it is a patch or bug fix with few changes, simply add these
89+
changes to the "What's Changed" list. Otherwise, replace comprehensive
90+
highlights, and the full "What's Changed" list.
91+
92+
2. For each item in the "What's Changed" list, keep usernames in plaintext, and
93+
add github links for each issue number. Example:
94+
95+
"- feat: implement /rewind command by @username in
96+
[#12345](https://github.com/google-gemini/gemini-cli/pull/12345)"
97+
98+
3. Skip entries by @gemini-cli-robot.
99+
100+
4. Do not add the "New Contributors" section.
101+
102+
5. Update the "Full changelog:" link by doing one of following:
103+
104+
If it is a patch or bug fix with few changes, retain the original link
105+
but replace the latter version with the new version. For example, if the
106+
patch is version is "v0.28.1", replace the latter version:
107+
"https://github.com/google-gemini/gemini-cli/compare/v0.27.0...v0.28.0" with
108+
"https://github.com/google-gemini/gemini-cli/compare/v0.27.0...v0.28.1".
109+
110+
Otherwise, for minor and major version changes, replace the link with the
111+
one included at the end of the changelog data.
112+
113+
6. Ensure lines are wrapped to 80 characters.
114+
115+
### Update `docs/changelogs/index.md`
116+
117+
Skip this step for patches, bug fixes, or preview releases.
118+
119+
Insert a new "Announcements" section for the new version directly
120+
above the previous version's section. Ensure lines are wrapped to
121+
80 characters.
122+
123+
### Finalize
124+
125+
Run `npm run format` to ensure consistency.

0 commit comments

Comments
 (0)