From c9340a9c6f39e782d784a44b46fc27b10d302a45 Mon Sep 17 00:00:00 2001 From: Jacob Richman Date: Tue, 27 Jan 2026 13:13:11 -0800 Subject: [PATCH] GEMINI.md polish (#17680) --- packages/cli/GEMINI.md | 15 +++++++++++ .../extensions/examples/context/.gitignore | 26 ------------------- .../extensions/examples/context/GEMINI.md | 14 ---------- .../examples/context/gemini-extension.json | 4 --- 4 files changed, 15 insertions(+), 44 deletions(-) create mode 100644 packages/cli/GEMINI.md delete mode 100644 packages/cli/src/commands/extensions/examples/context/.gitignore delete mode 100644 packages/cli/src/commands/extensions/examples/context/GEMINI.md delete mode 100644 packages/cli/src/commands/extensions/examples/context/gemini-extension.json diff --git a/packages/cli/GEMINI.md b/packages/cli/GEMINI.md new file mode 100644 index 0000000000..50bc038b42 --- /dev/null +++ b/packages/cli/GEMINI.md @@ -0,0 +1,15 @@ +## React & Ink (CLI UI) + +- **Side Effects**: Use reducers for complex state transitions; avoid `setState` + triggers in callbacks. +- Always fix react-hooks/exhaustive-deps lint errors by adding the missing + dependencies. +- **Shortcuts**: only define keyboard shortcuts in + `packages/cli/src/config/keyBindings.ts + +## Testing + +- **Utilities**: Use `renderWithProviders` and `waitFor` from + `packages/cli/src/test-utils/`. +- **Snapshots**: Use `toMatchSnapshot()` to verify Ink output. +- **Mocks**: Use mocks as sparingly as possilble. diff --git a/packages/cli/src/commands/extensions/examples/context/.gitignore b/packages/cli/src/commands/extensions/examples/context/.gitignore deleted file mode 100644 index b2a70da46e..0000000000 --- a/packages/cli/src/commands/extensions/examples/context/.gitignore +++ /dev/null @@ -1,26 +0,0 @@ -# Dependencies -node_modules/ -npm-debug.log* -yarn-error.log -yarn-debug.log - -# Build output -dist/ - -# OS metadata -.DS_Store -Thumbs.db - -# TypeScript -*.tsbuildinfo - -# Environment variables -.env -.env.local -.env.development.local -.env.test.local -.env.production.local - -# IDEs -.vscode/ -.idea/ diff --git a/packages/cli/src/commands/extensions/examples/context/GEMINI.md b/packages/cli/src/commands/extensions/examples/context/GEMINI.md deleted file mode 100644 index 0e8179625e..0000000000 --- a/packages/cli/src/commands/extensions/examples/context/GEMINI.md +++ /dev/null @@ -1,14 +0,0 @@ -# Ink Library Screen Reader Guidance - -When building custom components, it's important to keep accessibility in mind. -While Ink provides the building blocks, ensuring your components are accessible -will make your CLIs usable by a wider audience. - -## General Principles - -Provide screen reader-friendly output: Use the useIsScreenReaderEnabled hook to -detect if a screen reader is active. You can then render a more descriptive -output for screen reader users. Leverage ARIA props: For components that have a -specific role (e.g., a checkbox or a button), use the aria-role, aria-state, and -aria-label props on and to provide semantic meaning to screen -readers. diff --git a/packages/cli/src/commands/extensions/examples/context/gemini-extension.json b/packages/cli/src/commands/extensions/examples/context/gemini-extension.json deleted file mode 100644 index 64f3f535ac..0000000000 --- a/packages/cli/src/commands/extensions/examples/context/gemini-extension.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "context-example", - "version": "1.0.0" -}