-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Build: Add Serena MCP server configuration #34063
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| /cache | ||
| /project.local.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # Storybook - Project Overview | ||
|
|
||
| ## Purpose | ||
| Storybook is an open-source UI development tool for building, testing, and documenting UI components in isolation. | ||
| It supports multiple frontend frameworks (React, Vue, Angular, Svelte, Web Components, Preact, Ember, HTML, etc.) | ||
| and integrates with various build tools (Vite, Webpack5). | ||
|
|
||
| ## Version | ||
| Current version: 10.2.x (as of March 2026) | ||
|
|
||
| ## Tech Stack | ||
| - **Language**: TypeScript (strict mode), targeting ES2020 | ||
| - **Package Manager**: Yarn 4.10.3 (with workspaces) | ||
| - **Node.js**: 22.21.1 (specified in `.nvmrc`) | ||
| - **Monorepo Tool**: NX (with `--no-cloud` flag required to avoid NX Cloud login issues) | ||
| - **Test Runner**: Vitest (primary), Playwright (E2E) | ||
| - **Linting**: ESLint 8 | ||
| - **Formatting**: Prettier 3.7+ | ||
| - **Bundlers**: Vite 7, Webpack 5, esbuild | ||
| - **UI Libraries**: React 18, react-aria (use specific submodules, not root imports) | ||
| - **Build System**: Custom build via `jiti ./scripts/build/build-package.ts` | ||
|
|
||
| ## Repository Structure | ||
| ``` | ||
| storybook/ | ||
| ├── code/ # Main codebase | ||
| │ ├── core/ # Core package (UI, API, manager, preview, server, etc.) | ||
| │ ├── addons/ # Official addons (docs, controls, a11y, interactions, vitest, etc.) | ||
| │ ├── builders/ # Build integrations (vite, webpack5, manager) | ||
| │ ├── frameworks/ # Framework integrations (react-vite, nextjs, angular, vue3-vite, etc.) | ||
| │ ├── renderers/ # Framework renderers (react, vue3, svelte, html, etc.) | ||
| │ ├── lib/ # Shared libraries (cli, codemod, csf-tools, etc.) | ||
| │ ├── presets/ # Preset packages | ||
| │ ├── e2e-tests/ # Playwright E2E tests | ||
| │ └── .storybook/ # Internal Storybook config (dogfooding) | ||
| ├── scripts/ # Build/CI/task scripts | ||
| ├── docs/ # Documentation | ||
| ├── sandbox/ # Generated sandbox environments for testing | ||
| └── test-storybooks/ # Test storybook configurations | ||
| ``` | ||
|
|
||
| ## Key Packages | ||
| - `@storybook/core` - Core functionality (UI, API, server, preview, channels, etc.) | ||
| - `@storybook/react`, `@storybook/vue3`, etc. - Framework renderers | ||
| - `@storybook/react-vite`, `@storybook/nextjs`, etc. - Framework integrations | ||
| - `@storybook/addon-docs`, `@storybook/addon-a11y`, etc. - Official addons | ||
| - `storybook` - CLI package | ||
| - `create-storybook` - Project scaffolding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # Code Style & Conventions | ||
|
|
||
| ## TypeScript | ||
| - **Strict mode** enabled (`strict: true` in tsconfig) | ||
| - Target: ES2020, Module: Preserve, ModuleResolution: bundler | ||
| - `noImplicitAny: true` | ||
| - JSX: preserve | ||
| - No emit (handled by build tools, not tsc) | ||
|
|
||
| ## Prettier Configuration | ||
| - Print width: 100 | ||
| - Tab width: 2 | ||
| - Single quotes: yes | ||
| - Trailing commas: es5 | ||
| - Arrow parens: always | ||
| - Brace style: 1tbs (one true brace style) | ||
| - Import order (via @trivago/prettier-plugin-sort-imports): | ||
| 1. `node:` builtins | ||
| 2. `vitest`, `@testing-library` | ||
| 3. `react`, `react-dom` | ||
| 4. `storybook/internal` | ||
| 5. `@storybook/[non-addon]` | ||
| 6. `@storybook/addon-*` | ||
| 7. Third-party modules | ||
| 8. Relative imports (`./`, `../`) | ||
| - Import order separation: yes (blank lines between groups) | ||
| - Import specifiers sorted: yes | ||
|
|
||
| ## ESLint Rules (Notable) | ||
| - `react-aria` and `react-stately`: must import from specific submodules (e.g., `@react-aria/overlays`), NOT root | ||
| - `react-aria-components`: must use `react-aria-components/patched-dist/ComponentX` entrypoints for tree-shaking | ||
| - `es-toolkit`: must use sub-exports (e.g., `es-toolkit/array`), NOT root import | ||
| - `import-x/no-extraneous-dependencies`: off | ||
| - `react/react-in-jsx-scope`: off | ||
| - TypeScript `dot-notation` with `allowIndexSignaturePropertyAccess` | ||
| - Custom local rules: `no-uncategorized-errors`, `storybook-monorepo-imports`, `no-duplicated-error-codes` | ||
|
|
||
| ## Naming Conventions | ||
| - Files: kebab-case for most files (e.g., `my-component.ts`) | ||
| - Components: PascalCase for React components | ||
| - Types/Interfaces: PascalCase | ||
| - Variables/functions: camelCase | ||
| - Constants: UPPER_SNAKE_CASE for true constants, camelCase otherwise | ||
|
|
||
| ## Test Files | ||
| - Pattern: `*.test.ts`, `*.test.tsx`, `*.spec.ts`, `*.spec.tsx` | ||
| - Stories: `*.stories.ts`, `*.stories.tsx` | ||
| - Test fixtures in `__testfixtures__/` directories | ||
| - Tests in `__tests__/` directories or alongside source files | ||
|
|
||
| ## Monorepo Import Rules | ||
| - Internal packages use `workspace:*` for dependencies | ||
| - Custom ESLint rule `storybook-monorepo-imports` enforces correct import patterns within the monorepo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| # Suggested Commands | ||
|
|
||
| ## Installation | ||
| ```bash | ||
| yarn install # Install all dependencies (from repo root) | ||
| ``` | ||
|
|
||
| ## Building | ||
| ```bash | ||
| # Compile a single package (always use --no-cloud to avoid NX Cloud issues) | ||
| yarn nx compile core --no-cloud | ||
| yarn nx compile @storybook/react --no-cloud | ||
|
|
||
| # Compile all packages | ||
| yarn nx run-many -t compile --no-cloud | ||
|
|
||
| # Production build of a package | ||
| cd code && yarn build | ||
| ``` | ||
|
|
||
| ## Testing | ||
| ```bash | ||
| # Run all unit tests (from repo root or code/) | ||
| cd code && yarn test | ||
| # or from root: | ||
| yarn test | ||
|
|
||
| # Run tests in watch mode | ||
| cd code && yarn test:watch | ||
|
|
||
| # Run specific test file | ||
| cd code && yarn test:watch -- --project <project> <test-pattern> | ||
|
|
||
| # E2E tests (Playwright) | ||
| cd code && npx playwright test | ||
| ``` | ||
|
|
||
| ## Linting & Formatting | ||
| ```bash | ||
| # Run all linting | ||
| cd code && yarn lint | ||
|
|
||
| # Lint JS/TS only | ||
| cd code && yarn lint:js | ||
|
|
||
| # Format with Prettier | ||
| cd code && yarn lint:prettier '**/*.{css,html,json,md,yml}' | ||
|
|
||
| # Run knip (unused code detection) | ||
| cd code && yarn knip | ||
| ``` | ||
|
|
||
| ## Running the Internal Dev Storybook | ||
| ```bash | ||
| # Must compile core first! | ||
| yarn nx compile core --no-cloud | ||
|
|
||
| # Then start the dev server (from code/ dir) | ||
| cd code && yarn storybook:ui | ||
|
|
||
| # Or with --ci flag (no interactive): | ||
| cd code && yarn storybook:ui --ci | ||
|
|
||
| # Build static storybook | ||
| cd code && yarn storybook:ui:build | ||
| ``` | ||
|
|
||
| ## Sandbox / Task System | ||
| ```bash | ||
| # Start a sandbox with a specific template | ||
| yarn start # defaults to react-vite/default-ts | ||
|
|
||
| # Run a task with a specific template | ||
| yarn task --task dev --template react-vite/default-ts --start-from=install | ||
| ``` | ||
|
|
||
| ## NX Commands | ||
| ```bash | ||
| # Always use --no-cloud flag! | ||
| yarn nx compile <package> --no-cloud | ||
| yarn nx run-many -t compile --no-cloud | ||
| yarn nx show projects --affected | ||
| ``` | ||
|
|
||
| ## Git | ||
| ```bash | ||
| git status | ||
| git diff | ||
| git log --oneline -10 | ||
| git checkout next # main branch is "next" | ||
| ``` | ||
|
|
||
| ## System Utilities (macOS/Darwin) | ||
| ```bash | ||
| ls, cd, pwd, cat, head, tail | ||
| grep, find, xargs | ||
| curl, wget | ||
| python3, node | ||
| open <file> # open in default app | ||
| pbcopy, pbpaste # clipboard | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # Task Completion Checklist | ||
|
|
||
| After completing a coding task, run through these steps: | ||
|
|
||
| ## 1. TypeScript Compilation | ||
| Ensure the modified package(s) compile without errors: | ||
| ```bash | ||
| yarn nx compile <package-name> --no-cloud | ||
| ``` | ||
|
|
||
| ## 2. Linting | ||
| Run lint on the changed files or the whole codebase: | ||
| ```bash | ||
| cd code && yarn lint:js | ||
| ``` | ||
|
|
||
| ## 3. Formatting | ||
| Ensure code is properly formatted: | ||
| ```bash | ||
| cd code && yarn lint:prettier '<changed-files>' | ||
| ``` | ||
|
|
||
| ## 4. Unit Tests | ||
| Run relevant tests: | ||
| ```bash | ||
| cd code && yarn test <test-pattern> | ||
| ``` | ||
|
|
||
| ## 5. Pre-commit Checks | ||
| The project uses husky + lint-staged for pre-commit hooks: | ||
| - JS/TS files: ESLint with `--fix` | ||
| - EJS files: ejslint | ||
| - CSS/HTML/JSON/MD/YML: Prettier | ||
| - package.json: lint:package | ||
|
|
||
| ## Notes | ||
| - The main branch is `next` (not `main` or `master`) | ||
| - Always use `--no-cloud` with NX commands | ||
| - Before starting the dev server, ensure core is compiled: `yarn nx compile core --no-cloud` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| project_name: "storybook" | ||
|
|
||
| languages: | ||
| - typescript | ||
|
|
||
| encoding: "utf-8" | ||
|
|
||
| ignore_all_files_in_gitignore: true | ||
| ignored_paths: [] | ||
|
|
||
| read_only: false | ||
|
|
||
| excluded_tools: [] | ||
| included_optional_tools: [] | ||
| fixed_tools: [] | ||
|
|
||
| read_only_memory_patterns: [] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Require a full test pass before marking the task done.
For a completion checklist, “Run relevant tests” is too weak. The repo guidance says to finish with
yarn testoryarn vitest runbefore committing.Based on learnings: Ensure all tests pass with
yarn testoryarn vitest runbefore committing.🤖 Prompt for AI Agents