fix bug

Engineering Community

Skill notes

Input Parsing

The user provides one of: #123 — GitHub issue in jetbrains/exposed EXPOSED-1234 — YouTrack issue ID https://youtrack.jetbrains.com/issue/EXPOSED-5678 or https://youtrack.jetbrains.com/issue/EXPOSED-9012/some-slug — YouTrack URL Parse the input to determine the source:

Fetching YouTrack Issues

Use the YouTrack MCP tools to fetch issue details. Call mcp__youtrack__get_issue with the issue ID (e.g., EXPOSED-1234). If the YouTrack MCP server is not configured (tool calls fail), instruct the user to set it up: The permanent token can be created in JetBrains Hub account security settings (linked from YouTrack profile). From the issue, extract: Title and description of the bug

Step 1: Assign Issue and Set In Progress

For YouTrack issues only, update the issue status to reflect that work is starting: Call mcp__youtrack__get_current_user to get the current user's login. Call mcp__youtrack__change_issue_assignee to assign the issue to the current user. Call mcp__youtrack__update_issue with customFields: {"State": "In Progress"} to mark work as started. If any of these calls fail because the YouTrack MCP is not configured, inform the user how to set it up (see "Fetching YouTrack Issues" section above) and continue

Step 1.1: Save the information about the issue to file

Save the issue as a json file under issues directory. Github issues should be saved in the /issues/github/ directory. The json file of the issue should be named as the issue number github-<id>.json Youtrack issues should be saved in the /issues/youtrack/ directory. The json file of the issue should be named as the issue number youtrack-<id>.json

Step 2: Understand the Codebase Context

Before creating a branch, understand the affected area: Check the CLAUDE.md file in the root of the project to get basic information about the project. Identify the Gradle module from the issue description or affected APIs Read existing tests in that module to understand test patterns and conventions Identify whether this needs a unit test or integration test based on the bug nature

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
Engineering
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
94 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@JetBrains · Apache-2.0
Token usage
Lean
Setup complexity
Guided setup
External API key
Not required
Operating systems
Unspecified (assume cross-platform)
Runtime requirements
No explicit requirements detected
Detected file/system behavior
  • Read-only
  • Write / modify
Network behavior
External requests
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

01
Step 1: Assign Issue and Set In Progress

For YouTrack issues only, update the issue status to reflect that work is starting: Call `mcp__youtrack__get_current_user` to get the current user's login. Call `mcp__youtrack__change_issue_assignee` to assign the issue to the current user. Call `mcp__youtrack__update_issue` with `customFields: {"State": "In Progress"}` to mark work as started. If any of these calls fail because the YouTrack MCP is not configured, inform the user how to set it up (see "Fetching YouTrack Issues" section above) and continue

02
Step 1.1: Save the information about the issue to file

Save the issue as a json file under `issues` directory. Github issues should be saved in the `/issues/github/` directory. The json file of the issue should be named as the issue number `github-<id>.json` Youtrack issues should be saved in the `/issues/youtrack/` directory. The json file of the issue should be named as the issue number `youtrack-<id>.json`

03
Step 2: Understand the Codebase Context

Before creating a branch, understand the affected area: Check the CLAUDE.md file in the root of the project to get basic information about the project. Identify the Gradle module from the issue description or affected APIs Read existing tests in that module to understand test patterns and conventions Identify whether this needs a unit test or integration test based on the bug nature

04
Step 3: Create branch

Determine the base branch: Use `main` branch for creating new branch that will be used for the PR with the fix Branch naming rules: For YouTrack issues: `claude/EXPOSED-1234-short-description` For GitHub issues: `claude/123-short-description`

05
Step 4: Write a Failing Reproducer Test

Write a test that demonstrates the bug as described in the issue. The goal is: Minimal: Only test the specific buggy behavior, nothing extra Clear: Test name in backticks should describe what it checks (e.g., `` `requestWithEmptyBodyDoesntCausesNPE` ``) Comment of the test should say what is the issues that caused necessity in this test (e.g., `/* EXPOSED-9352 request with empty body causes NPE */`)

06
Step 5: Commit the Reproducer

Stage and commit the failing test. All the commit message should follow the Conventional Commits format: For GitHub issues, use `#NUMBER` in the commit message. For YouTrack, use `EXPOSED-XXXX`.

07
Step 6: Plan the Fix

Analyze the bug based on what you learned from the issue and the reproducer test: Trace the code path that leads to the failure Identify the root cause Plan the minimal fix Present your analysis and plan to the user for review. Include:

08
Step 7: Implement the Fix

After receiving user approval, implement the planned fix. Keep changes minimal and focused: Fix only the bug, do not refactor surrounding code Do not add features beyond what's needed Preserve existing comments and code style

09
Step 8: Validate the Fix

Run the reproducer test to confirm it now passes. Use the same test commands from Step 4: After confirming the reproducer passes, optionally run the broader test suite for the affected module: Refer to Step 4 for the full list of available test commands and database-specific test tasks. If any tests fail, investigate and fix. Do not skip or disable tests.

10
Step 9: Code Style Validation

Exposed uses Detekt for code style validation. Run the linter to check for any issues: This validates code style across all modules according to the rules defined in `detekt/detekt-config.yml`. If Detekt reports any issues, fix them before proceeding. The build requires zero issues (max issues: 0).

11
Step 10: API Documentation Update

If the fix changed any `public` or `protected` API (new methods, changed signatures, etc.), update the API documentation: This command updates the Dokka API documentation files to reflect the public API changes. Stage any updated API files (`.api` files) along with the fix: If no public API changed, skip this step.

12
Step 11: Update Documentation Website

If the PR introduces a new feature or changes existing public API behavior, update the documentation website to reflect these changes.

13
Step 12: Commit the Fix

Exposed uses Conventional Commits for commit messages. If the fix has no breaking changes the prefix is `fix:`. If it introduces a breaking change, use `fix!:`. Be aware that the commit message will be validated on CI by the following regex: `"^(build|chore|ci|deprecate|docs|feat|fix|perf|refactor|revert|style|test)(!)?(\([^\)]*\))?:\s?(EXPOSED-[0-9]+\s?)?.+$"` (it's defined in `.github/workflows/commit-message-validation.yml` file)

14
Step 13: Push and Create PR

Push the branch and create a PR: Create the PR targeting the base branch chosen in Step 3. The title should follow the Conventional Commits format and the the commit message should have the following structure: The `Closes` line auto-closes the issue when the PR is merged for GitHub issues only: For GitHub issues: `Closes #NUMBER`

15
Step 14: Documentation Issue (if needed)

Assess whether the fix changes behavior that users rely on or that is described in the Exposed documentation. A documentation update is needed when: A public API signature changed (new parameter, changed default, new overload) Behavior that users observe changed (different error message, different default, different timing) A workaround that users might have adopted is no longer necessary A new feature or configuration option was added as part of the fix

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.