Build: Add Serena MCP server configuration#34063
Conversation
Introduces Serena, a semantic coding MCP server, to the monorepo. Serena provides language-server-powered tools for symbol navigation, semantic search, and structured code editing — enabling AI agents to explore and modify the codebase more efficiently. Includes project configuration and onboarding memories covering project overview, code style/conventions, suggested commands, and task completion checklist. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
View your CI Pipeline Execution ↗ for commit 23471d3
☁️ Nx Cloud last updated this comment at |
📝 WalkthroughWalkthroughIntroduces a new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (4)
.serena/memories/suggested_commands.md (1)
38-50: Keep the lint/format commands aligned with repo guidance for changed files.This section currently points agents at
yarn lint:jsandyarn lint:prettier .... The repo guidance for edited files isyarn lint:js:cmd <file>plusyarn prettier --write <file>, which is both more targeted and able to fix formatting in place.Based on learnings: Run ESLint and Prettier formatting and linting checks after making file changes using
yarn prettier --write <file>andyarn lint:js:cmd <file>.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.serena/memories/suggested_commands.md around lines 38 - 50, Update the linting & formatting commands to use the repo's file-targeted workflow: replace references to "yarn lint:js" and "yarn lint:prettier" with the targeted commands "yarn lint:js:cmd <file>" and "yarn prettier --write <file>" respectively so agents run ESLint and Prettier on changed files only; ensure the section (the block listing lint commands) clearly instructs to run "yarn prettier --write <file>" followed by "yarn lint:js:cmd <file>" after editing files..serena/memories/task_completion_checklist.md (1)
11-21: Use the repo's per-file lint/format commands here.Lines 14 and 20 currently suggest a full lint run plus a Prettier check. The repo guidance for changed files is
yarn lint:js:cmd <file>together withyarn prettier --write <file>, which is faster and actually fixes formatting.Based on learnings: Run ESLint and Prettier formatting and linting checks after making file changes using
yarn prettier --write <file>andyarn lint:js:cmd <file>.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.serena/memories/task_completion_checklist.md around lines 11 - 21, Update the "## 2. Linting" and "## 3. Formatting" sections to use the repo's per-file lint/format commands instead of full-run examples: replace the `yarn lint:js` example with `yarn lint:js:cmd <file>` under "## 2. Linting" and replace the `yarn lint:prettier '<changed-files>'` example under "## 3. Formatting" with `yarn prettier --write <file>` (and mention running `yarn lint:js:cmd <file>` after formatting) so instructions show the faster per-file fix-and-lint workflow..serena/memories/project_overview.md (1)
8-21: Avoid pinning fast-moving tool versions in this memory.This file is meant to stay useful over time, but Lines 9-20 hardcode versions that will drift.
Yarn 4.10.3is already more specific than the repo guidance, which is simply Yarn 4.x. Prefer pointing agents to source-of-truth files likepackage.jsonand.nvmrcinstead of duplicating exact versions here.Based on learnings: The Storybook repository uses Yarn v^4 (any 4.x version) as the package manager, configured via .yarnrc.yml and package.json packageManager field. Specific patch versions within v4 can be upgraded as needed.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.serena/memories/project_overview.md around lines 8 - 21, The Version/Tech Stack block pins fast-moving tool versions (e.g., "Yarn 4.10.3", "Node.js: 22.21.1") which will drift; update the text in the "Version" and "Tech Stack" sections so it uses looser ranges or references the source-of-truth files instead (e.g., change "Yarn 4.10.3" to "Yarn 4.x" or "see package.json/.yarnrc.yml", and replace the exact Node patch with a reference to .nvmrc), and remove or generalize any other exact patch pins (like in "Current version: 10.2.x") while keeping the documented stack items (TypeScript, NX, Vitest, etc.) intact..serena/memories/style_and_conventions.md (1)
45-53: Add the repo's Vitest-specific conventions to this memory.This covers test file naming, but it skips two repo-specific rules agents are expected to follow: workspace config lives in
code/vitest.workspace.ts, and test mocking should follow.cursor/rules/spy-mocking.mdc. Including them here would make the onboarding guidance more complete.Based on learnings: Applies to code/vitest.workspace.ts : Vitest configuration is centralized in
code/vitest.workspace.tsfor workspace setup; Applies to **/*.{test,spec}.{ts,tsx} : Follow the spy mocking rules defined in.cursor/rules/spy-mocking.mdcfor consistent mocking patterns with Vitest.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.serena/memories/style_and_conventions.md around lines 45 - 53, Add Vitest-specific conventions to the memory: state that workspace Vitest config is centralized in vitest.workspace.ts (workspace-level setup) and that all tests matching *.{test,spec}.{ts,tsx} must follow the repo's spy-mocking rules defined in spy-mocking.mdc; update the Test Files / Monorepo Import Rules section to mention these two items so agents know where the Vitest workspace config lives and which mocking guideline to follow.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.serena/memories/task_completion_checklist.md:
- Around line 23-27: Update the "## 4. Unit Tests" checklist item to require a
full test pass before marking the task done: replace "Run relevant tests" with
an explicit instruction to run the full test suite (e.g., `yarn test` or `yarn
vitest run`) and confirm all tests pass; reference the "## 4. Unit Tests"
heading so reviewers know where to change the checklist.
---
Nitpick comments:
In @.serena/memories/project_overview.md:
- Around line 8-21: The Version/Tech Stack block pins fast-moving tool versions
(e.g., "Yarn 4.10.3", "Node.js: 22.21.1") which will drift; update the text in
the "Version" and "Tech Stack" sections so it uses looser ranges or references
the source-of-truth files instead (e.g., change "Yarn 4.10.3" to "Yarn 4.x" or
"see package.json/.yarnrc.yml", and replace the exact Node patch with a
reference to .nvmrc), and remove or generalize any other exact patch pins (like
in "Current version: 10.2.x") while keeping the documented stack items
(TypeScript, NX, Vitest, etc.) intact.
In @.serena/memories/style_and_conventions.md:
- Around line 45-53: Add Vitest-specific conventions to the memory: state that
workspace Vitest config is centralized in vitest.workspace.ts (workspace-level
setup) and that all tests matching *.{test,spec}.{ts,tsx} must follow the repo's
spy-mocking rules defined in spy-mocking.mdc; update the Test Files / Monorepo
Import Rules section to mention these two items so agents know where the Vitest
workspace config lives and which mocking guideline to follow.
In @.serena/memories/suggested_commands.md:
- Around line 38-50: Update the linting & formatting commands to use the repo's
file-targeted workflow: replace references to "yarn lint:js" and "yarn
lint:prettier" with the targeted commands "yarn lint:js:cmd <file>" and "yarn
prettier --write <file>" respectively so agents run ESLint and Prettier on
changed files only; ensure the section (the block listing lint commands) clearly
instructs to run "yarn prettier --write <file>" followed by "yarn lint:js:cmd
<file>" after editing files.
In @.serena/memories/task_completion_checklist.md:
- Around line 11-21: Update the "## 2. Linting" and "## 3. Formatting" sections
to use the repo's per-file lint/format commands instead of full-run examples:
replace the `yarn lint:js` example with `yarn lint:js:cmd <file>` under "## 2.
Linting" and replace the `yarn lint:prettier '<changed-files>'` example under
"## 3. Formatting" with `yarn prettier --write <file>` (and mention running
`yarn lint:js:cmd <file>` after formatting) so instructions show the faster
per-file fix-and-lint workflow.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: bacc6d54-1bb2-4d4f-9bf9-95c86983ccae
📒 Files selected for processing (6)
.serena/.gitignore.serena/memories/project_overview.md.serena/memories/style_and_conventions.md.serena/memories/suggested_commands.md.serena/memories/task_completion_checklist.md.serena/project.yml
| ## 4. Unit Tests | ||
| Run relevant tests: | ||
| ```bash | ||
| cd code && yarn test <test-pattern> | ||
| ``` |
There was a problem hiding this comment.
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 test or yarn vitest run before committing.
Based on learnings: Ensure all tests pass with yarn test or yarn vitest run before committing.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.serena/memories/task_completion_checklist.md around lines 23 - 27, Update
the "## 4. Unit Tests" checklist item to require a full test pass before marking
the task done: replace "Run relevant tests" with an explicit instruction to run
the full test suite (e.g., `yarn test` or `yarn vitest run`) and confirm all
tests pass; reference the "## 4. Unit Tests" heading so reviewers know where to
change the checklist.
Summary
.serena/.gitignoreto exclude local cache and config overridesWhat is Serena?
Serena is an MCP (Model Context Protocol) server that provides language-server-powered tools for AI agents. Instead of reading entire files, agents can use semantic operations like symbol lookup, reference finding, and structured code editing — making AI-assisted development more efficient and token-aware.
Files added
.serena/project.yml.serena/.gitignore.serena/memories/project_overview.md.serena/memories/style_and_conventions.md.serena/memories/suggested_commands.md.serena/memories/task_completion_checklist.mdTest plan
project.ymlconfiglist_memories🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Chores