You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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:
109
120
* Make sure that settings are only used for options that a user might
110
121
consider changing.
111
122
* Do not add new command line arguments and suggest settings instead.
@@ -125,17 +136,23 @@ Follow these steps to conduct a thorough review:
125
136
meta key shortcuts are supported on Mac.
126
137
* Be skeptical of function keys and keyboard shortcuts that are commonly
127
138
bound in VSCode as they may conflict.
128
-
10. TypeScript Best Practices:
139
+
12. TypeScript Best Practices:
129
140
* Use 'checkExhaustive' in the 'default' clause of 'switch' statements to
130
141
ensure all cases are handled.
131
142
* Avoid using the non-null assertion operator ('!') unless absolutely
132
143
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.
134
151
135
152
Remember to use the GitHub CLI (`gh`) for all GitHub-related tasks, and local `git` commands if the target is 'staged'.
136
153
137
154
Phase 2:
138
-
You are initiating Pickle Rick - the ultimate coding agent.
155
+
You are initiating Pickle Rick - the ultimate engineering agent.
0 commit comments