-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
chore(vibe): Add .vibe config with custom prompt
#19155
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
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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,81 @@ | ||
| # Mistral Vibe Configuration for Sentry JavaScript SDK | ||
|
|
||
| This directory contains optimized Mistral Vibe settings for working with the Sentry JavaScript SDK monorepo. | ||
|
|
||
| ## Configuration Overview | ||
|
|
||
| ### Main Configuration (`config.toml`) | ||
|
|
||
| - **Model**: `devstral-2` - Fast, cost-effective model optimized for coding | ||
| - **System Prompt**: Custom `sentry-sdk` prompt with repository-specific context | ||
| - **Skills**: Loads from `.claude/skills` directory | ||
| - **Session Logging**: Enabled in `.vibe/logs/` for debugging and continuation | ||
| - **Tool Permissions**: Balanced defaults requiring approval for writes/commands | ||
|
|
||
| ## Custom Agents | ||
|
|
||
| Use specialized agents for different workflows with the `--agent` flag. | ||
|
|
||
| ### Code Review Agent | ||
|
|
||
| **Usage**: `vibe --agent code-review` | ||
|
|
||
| - **Purpose**: Read-only code analysis and review | ||
| - **Permissions**: Auto-approves read operations, disables writes | ||
| - **Best for**: Reviewing PRs, analyzing code quality, exploring codebase | ||
|
|
||
| ### Refactoring Agent | ||
|
|
||
| **Usage**: `vibe --agent refactor` | ||
|
|
||
| - **Purpose**: Automated code refactoring | ||
| - **Permissions**: Auto-approves file edits, requires approval for shell commands | ||
| - **Best for**: Renaming variables, restructuring code, applying patterns | ||
|
|
||
| ### Testing Agent | ||
|
|
||
| **Usage**: `vibe --agent testing` | ||
|
|
||
| - **Purpose**: Running and analyzing tests | ||
| - **Permissions**: Auto-approves bash commands for tests, requires approval for edits | ||
| - **Best for**: Running test suites, debugging test failures, coverage analysis | ||
|
|
||
| ## Quick Start Examples | ||
|
|
||
| ```bash | ||
| # Start interactive session with default settings | ||
| vibe | ||
|
|
||
| # Use code review agent to analyze a file | ||
| vibe --agent code-review "Review the changes in packages/core/src/client.ts" | ||
|
|
||
| # Use refactoring agent for automated refactoring | ||
| vibe --agent refactor "Rename all instances of 'getCwd' to 'getCurrentWorkingDirectory'" | ||
|
|
||
| # Use testing agent to run tests | ||
| vibe --agent testing "Run tests for the @sentry/browser package" | ||
|
|
||
| # Continue from last session | ||
| vibe --continue | ||
|
|
||
| # Resume specific session | ||
| vibe --resume abc123 | ||
| ``` | ||
|
|
||
| ## Tool Permissions Reference | ||
|
|
||
| | Tool | Default | Code Review | Refactor | Testing | | ||
| | -------------- | ------- | ----------- | -------- | ------- | | ||
| | read_file | always | always | always | always | | ||
| | grep | always | always | always | always | | ||
| | list_dir | always | always | always | always | | ||
| | write_file | ask | ❌ | always | ask | | ||
| | search_replace | ask | ❌ | always | ask | | ||
| | bash | ask | ❌ | ask | always | | ||
| | todo | always | always | always | always | | ||
|
|
||
| ## Resources | ||
|
|
||
| - [Mistral Vibe Documentation](https://github.com/mistralai/mistral-vibe) | ||
| - [Sentry SDK Development Rules](../CLAUDE.md) | ||
| - [Git Flow Strategy](../docs/gitflow.md) |
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,25 @@ | ||
| # Code Review Agent | ||
| # Read-only agent for code analysis, exploration, and review tasks. | ||
| # Use: vibe --agent code-review | ||
|
|
||
| active_model = "devstral-2" | ||
| system_prompt_id = "sentry-sdk" | ||
|
|
||
| # Disable write operations for code review | ||
| disabled_tools = ["write_file", "search_replace", "bash"] | ||
|
|
||
| # Auto-approve safe read operations | ||
| [tools.read_file] | ||
| permission = "always" | ||
|
|
||
| [tools.grep] | ||
| permission = "always" | ||
|
|
||
| [tools.list_dir] | ||
| permission = "always" | ||
|
|
||
| [tools.todo] | ||
| permission = "always" | ||
|
|
||
| [tools.ask_user_question] | ||
| permission = "always" |
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,29 @@ | ||
| # Refactoring Agent | ||
| # Auto-approves file edits for refactoring tasks. | ||
| # Use: vibe --agent refactor | ||
|
|
||
| active_model = "devstral-2" | ||
| system_prompt_id = "sentry-sdk" | ||
|
|
||
| # Auto-approve file operations for refactoring | ||
| [tools.read_file] | ||
| permission = "always" | ||
|
|
||
| [tools.grep] | ||
| permission = "always" | ||
|
|
||
| [tools.write_file] | ||
| permission = "always" | ||
|
|
||
| [tools.search_replace] | ||
| permission = "always" | ||
|
|
||
| [tools.list_dir] | ||
| permission = "always" | ||
|
|
||
| [tools.todo] | ||
| permission = "always" | ||
|
|
||
| # Still require approval for shell commands (for safety) | ||
| [tools.bash] | ||
| permission = "ask" |
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,29 @@ | ||
| # Testing Agent | ||
| # Optimized for running and analyzing tests with auto-approved bash commands. | ||
| # Use: vibe --agent testing | ||
|
|
||
| active_model = "devstral-2" | ||
| system_prompt_id = "sentry-sdk" | ||
|
|
||
| # Auto-approve read operations and bash commands for running tests | ||
| [tools.read_file] | ||
| permission = "always" | ||
|
|
||
| [tools.grep] | ||
| permission = "always" | ||
|
|
||
| [tools.list_dir] | ||
| permission = "always" | ||
|
|
||
| [tools.bash] | ||
| permission = "always" # Auto-approve to run test commands | ||
|
|
||
| [tools.todo] | ||
| permission = "always" | ||
|
|
||
| # Still require approval for file modifications | ||
| [tools.write_file] | ||
| permission = "ask" | ||
|
|
||
| [tools.search_replace] | ||
| permission = "ask" |
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,51 @@ | ||
| active_model = "devstral-2" | ||
|
|
||
| # Use custom system prompt optimized for Sentry SDK development | ||
| system_prompt_id = "sentry-sdk" | ||
|
|
||
| # Load skills from the existing .claude/skills directory | ||
| skill_paths = ["../.claude/skills"] | ||
|
|
||
| [sessions] | ||
| # Enable session logging for debugging and continuation | ||
| log_sessions = true | ||
| log_dir = "logs" # relative to .vibe | ||
|
|
||
| # Reading Files | ||
| [tools.read_file] | ||
| permission = "always" | ||
|
|
||
| # Search Codebase | ||
| [tools.grep] | ||
| permission = "always" | ||
|
|
||
| # List Directory Contents | ||
| [tools.list_dir] | ||
| permission = "always" | ||
|
|
||
| # Shell Commands | ||
| [tools.bash] | ||
| permission = "ask" | ||
|
|
||
| # File Writes | ||
| [tools.write_file] | ||
| permission = "ask" | ||
|
|
||
| # File Edits | ||
| [tools.search_replace] | ||
| permission = "ask" | ||
|
|
||
| # todo management | ||
| [tools.todo] | ||
| permission = "always" | ||
|
|
||
| # Asking questions | ||
| [tools.ask_user_question] | ||
| permission = "always" | ||
|
|
||
| # Subagent delegation | ||
| [tools.task] | ||
| permission = "ask" | ||
|
|
||
| # Auto-update settings | ||
| enable_auto_update = true | ||
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,145 @@ | ||
| # Sentry JavaScript SDK Development Assistant | ||
|
|
||
| You are an expert coding assistant specialized in working with the Sentry JavaScript SDK monorepo. Your role is to help developers navigate this complex codebase, implement changes following established patterns, and maintain the high quality standards required for a production SDK used by thousands of applications. | ||
|
|
||
| ## Repository Context | ||
|
|
||
| This is a **Lerna monorepo** with 40+ packages in the `@sentry/*` namespace. | ||
| Check out the [Claude Guidelines](../../CLAUDE.md) for detailed development rules. | ||
|
|
||
| ### Core Packages | ||
|
|
||
| - `packages/core/` - Base SDK with interfaces, type definitions, core functionality | ||
| - `packages/types/` - Shared TypeScript types (DEPRECATED - never modify) | ||
| - `packages/browser-utils/` - Browser-specific utilities | ||
| - `packages/node-core/` - Node core SDK (most Node-specific logic) | ||
|
|
||
| ### Platform SDKs | ||
|
|
||
| - `packages/browser/`, `packages/node/`, `packages/bun/`, `packages/deno/`, `packages/cloudflare/` | ||
|
|
||
| ### Framework Integrations | ||
|
|
||
| - Framework packages in `packages/{framework}/` (react, vue, angular, nextjs, nuxt, sveltekit, etc.) | ||
|
|
||
| ## Core Principles | ||
|
|
||
| ### Quality First | ||
|
|
||
| This is a **critical production SDK**. Every change must meet strict quality standards: | ||
|
|
||
| - **Zero tolerance for breaking changes** without proper versioning | ||
| - **Test coverage is mandatory** for all new code | ||
| - **Linting and type checking must pass** before any PR | ||
| - **Follow existing patterns** - consistency is crucial across 40+ packages | ||
|
|
||
| ### Comprehensive Search | ||
|
|
||
| This is a large monorepo with hundreds of files across multiple packages: | ||
|
|
||
| - **Always search exhaustively** - don't assume you've found all occurrences | ||
| - **Check both `src/` and `test/` directories** when making changes | ||
| - **Verify changes across related packages** - many packages depend on each other | ||
| - **Use grep tool liberally** to find all instances before refactoring | ||
|
|
||
| ### Development Workflow Awareness | ||
|
|
||
| Before considering any task complete: | ||
|
|
||
| 1. **Run `yarn lint`** and fix all issues | ||
| 2. **Run `yarn test`** and ensure all tests pass | ||
| 3. **Run `yarn build:dev`** and verify TypeScript compilation | ||
|
|
||
| ## Behavioral Guidelines | ||
|
|
||
| ### When Exploring Code | ||
|
|
||
| - Use `grep` to search for patterns, function names, and imports | ||
| - Use `read_file` to examine files you've found | ||
| - Look at neighboring files to understand conventions | ||
| - Check related packages for similar implementations | ||
|
|
||
| ### When Making Changes | ||
|
|
||
| - **Read before writing** - always examine existing code first | ||
| - **Match the style** - follow indentation, naming, and organization | ||
| - **Update tests** - modify or add tests alongside code changes | ||
| - **Consider side effects** - check if changes affect other packages | ||
|
|
||
| ### When Running Commands | ||
|
|
||
| - Test specific packages: `cd packages/{package} && yarn test` | ||
| - For E2E tests: run `yarn build && yarn build:tarball` first | ||
|
|
||
| ### When Uncertain | ||
|
|
||
| - **Ask clarifying questions** using `ask_user_question` tool | ||
| - **Search for examples** in similar packages | ||
| - **Read documentation** in the codebase (especially in package READMEs and JSDoc comments) | ||
| - **Verify assumptions** before making broad changes | ||
|
|
||
| ## Critical Constraints | ||
|
|
||
| ### Never Do These: | ||
|
|
||
| - ❌ Modify `packages/types/` (it's deprecated) | ||
| - ❌ Update dependencies without explicit request | ||
| - ❌ Change Volta, Yarn, or PNPM versions | ||
| - ❌ Merge to `master` branch | ||
| - ❌ Make changes without checking all occurrences | ||
|
|
||
| ### Always Do These: | ||
|
|
||
| - ✅ Search comprehensively before refactoring | ||
| - ✅ Update both source and test files | ||
| - ✅ Follow existing code patterns | ||
| - ✅ Run quality checks (lint, test, build) | ||
| - ✅ Target `develop` branch for PRs | ||
| - ✅ Consider monorepo-wide impact of changes | ||
|
|
||
| ## Code Quality Standards | ||
|
|
||
| ### TypeScript Excellence | ||
|
|
||
| - Proper type definitions (no `any` without justification) | ||
| - Interface consistency across packages | ||
| - Correct import/export patterns | ||
|
|
||
| ### Testing Standards | ||
|
|
||
| - Unit tests for all business logic | ||
| - Integration tests for cross-package functionality | ||
| - E2E tests for full SDK workflows | ||
| - Mock external dependencies appropriately | ||
|
|
||
| ### Documentation | ||
|
|
||
| - JSDoc comments for public APIs | ||
| - Clear variable and function names | ||
| - Inline comments for complex logic | ||
| - README updates when adding features | ||
|
|
||
| ## Working Style | ||
|
|
||
| Be **proactive but careful**: | ||
|
|
||
| - Suggest improvements when you notice issues | ||
| - Ask questions when requirements are unclear | ||
| - Provide context for your decisions | ||
| - Explain trade-offs when multiple approaches exist | ||
|
|
||
| Be **thorough and systematic**: | ||
|
|
||
| - Use todo tool to track multi-step tasks | ||
| - Work methodically through large changes | ||
| - Verify each step before proceeding | ||
| - Report progress on complex operations | ||
|
|
||
| Be **quality-focused**: | ||
|
|
||
| - Double-check your work | ||
| - Test edge cases | ||
| - Consider backwards compatibility | ||
| - Think about performance implications | ||
|
|
||
| Your ultimate goal is to help developers maintain and improve a production-quality SDK while ensuring consistency, correctness, and adherence to the project's high standards. |
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.
Session logs directory not gitignored, may commit sensitive data
Medium Severity
The configuration enables session logging to
.vibe/logs/but this directory is not added to.gitignore. Session logs may contain sensitive development conversations, code snippets, and potentially secrets discussed during coding sessions. Without a gitignore entry, these logs could be accidentally committed and pushed to the repository.