devv-guru/devv-guru-first-assistant icon
public
Published on 6/2/2025
My First Assistant

This is an example custom assistant that will help you complete the Java onboarding in JetBrains. After trying it out, feel free to experiment with other blocks or create your own custom assistant.

Rules
Prompts
Models
Context
relace Relace Instant Apply model icon

Relace Instant Apply

relace

40kinput·32koutput
anthropic Claude 3.7 Sonnet model icon

Claude 3.7 Sonnet

anthropic

200kinput·8.192koutput
anthropic Claude 3.5 Haiku model icon

Claude 3.5 Haiku

anthropic

200kinput·8.192koutput
mistral Codestral model icon

Codestral

mistral

voyage Voyage AI rerank-2 model icon

Voyage AI rerank-2

voyage

voyage voyage-code-3 model icon

voyage-code-3

voyage

# C# Coding Style Rules

These rules define the coding style and conventions I want all my assistants and tools to follow across all projects, not specific to a single solution.

## ✨ General Principles
- Prefer **readability over brevity**.
- Follow **Clean Architecture** and **SOLID principles**.
- Prioritize **maintainability** and **testability** in every layer.

## 🧱 Project Structure
- Organize by **feature/domain**, not by type (e.g., `InvoiceModule` instead of `Controllers/Models/Services`).
- Keep **application logic** separate from **infrastructure**.
- Shared abstractions belong in `Abstractions` or `Contracts`.

## 📐 Code Style
- Use `record` types for immutable data structures (DTOs, Results).
- Use `readonly struct` only where performance is critical and justified.
- Do not abbreviate variable or method names (`userRepository`, not `usrRepo`).
- Use `var` only when the type is obvious from the right-hand side.
- Public members must include XML doc comments.
- Use expression-bodied members only for **simple logic**.

## 🛠 Tooling & Libraries
- Use `Mediator` by @martinothamar for CQRS (no MediatR).
- Use `FluentResults` for error/success handling instead of exceptions.
- Logging via `Serilog`, with all output directed to **Seq**.
- Testing with `NUnit` and `Moq`. Avoid FluentAssertions — use standard NUnit assertions.

## 🔁 Method Conventions
- Keep methods small — ideally under 30 lines.
- Each method should do **one thing only**.
- Favor async/await with `ConfigureAwait(false)` in library code.
- Avoid returning `null`; prefer `Result<T>` or `Option<T>`-like patterns.

## 🔒 Security & Auth
- Auth must flow with the request (e.g., bearer token forwarded).
- Always validate tokens using Microsoft.Identity.Web.
- Do not trust client input — validate all parameters explicitly.

## 🎯 API Design
- Minimal APIs preferred over MVC unless complexity demands otherwise.
- Route by intent or use-case, not controller grouping.
- Return `Results` or `TypedResults<T>` — avoid raw `IActionResult` when not needed.

## 🚀 CI/CD & Build
- All code must build with `dotnet build` and pass `dotnet test`.
- Log enrichment (e.g. userId, correlationId) should be consistent across all logs.
- Every module should have test coverage for both happy and edge cases.
Java docshttps://docs.oracle.com/javase/8/docs/api/

Prompts

Learn more
Write Cargo test
Write unit test with Cargo
Use Cargo to write a comprehensive suite of unit tests for this function

Context

Learn more
@code
Reference specific functions or classes from throughout your project
@docs
Reference the contents from any documentation site
@diff
Reference all of the changes you've made to your current branch
@terminal
Reference the last command you ran in your IDE's terminal and its output
@problems
Get Problems from the current file
@folder
Uses the same retrieval mechanism as @Codebase, but only on a single folder
@codebase
Reference the most relevant snippets from your codebase

No Data configured

MCP Servers

Learn more

No MCP Servers configured