Skip to content

Agents commit#437

Merged
ucswift merged 1 commit into
masterfrom
develop
Jul 24, 2026
Merged

Agents commit#437
ucswift merged 1 commit into
masterfrom
develop

Conversation

@ucswift

@ucswift ucswift commented Jul 24, 2026

Copy link
Copy Markdown
Member

PR Description

This pull request adds a comprehensive set of AI agent skills (prompt-based guidance documents) to the repository under the .agents/skills/ directory. These are structured markdown files that provide specialized, context-aware instructions for an AI coding assistant working within the Resgrid/Core codebase.

Changes Summary

47 new skill files were added, each defining a specific area of expertise:

Architecture & Design:

  • architecture-advisor, vertical-slice, clean-architecture, ddd, project-structure, minimal-api, api-versioning

Development Patterns:

  • ef-core, dependency-injection, caching, messaging, error-handling, logging, serilog, resilience, httpclient-factory, authentication, configuration, modern-csharp, scaffolding, migration-workflow

Infrastructure & Deployment:

  • docker, container-publish, ci-cd, aspire, openapi, scalar, opentelemetry

Quality & Review:

  • code-review-workflow, 80-20-review, verification-loop, de-sloppify, security-scan, health-check, testing

Agent Workflow & Session Management:

  • session-management, wrap-up-ritual, autonomous-loops, workflow-mastery, context-discipline, model-selection
  • self-correction-loop, instinct-system, convention-learner, learning-log, split-memory
  • project-setup

Each skill file follows a consistent structure with core principles, patterns, anti-patterns, and decision guides tailored for .NET 10 / C# 14 development.

Functional Impact

No application code was modified. This commit exclusively introduces documentation/configuration for an AI development assistant, establishing standardized guidance for code generation, review, testing, and project maintenance workflows within the Resgrid/Core repository.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (47)
  • .agents/skills/80-20-review/SKILL.md is excluded by !**/*.md
  • .agents/skills/api-versioning/SKILL.md is excluded by !**/*.md
  • .agents/skills/architecture-advisor/SKILL.md is excluded by !**/*.md
  • .agents/skills/aspire/SKILL.md is excluded by !**/*.md
  • .agents/skills/authentication/SKILL.md is excluded by !**/*.md
  • .agents/skills/autonomous-loops/SKILL.md is excluded by !**/*.md
  • .agents/skills/caching/SKILL.md is excluded by !**/*.md
  • .agents/skills/ci-cd/SKILL.md is excluded by !**/*.md
  • .agents/skills/clean-architecture/SKILL.md is excluded by !**/*.md
  • .agents/skills/code-review-workflow/SKILL.md is excluded by !**/*.md
  • .agents/skills/configuration/SKILL.md is excluded by !**/*.md
  • .agents/skills/container-publish/SKILL.md is excluded by !**/*.md
  • .agents/skills/context-discipline/SKILL.md is excluded by !**/*.md
  • .agents/skills/convention-learner/SKILL.md is excluded by !**/*.md
  • .agents/skills/ddd/SKILL.md is excluded by !**/*.md
  • .agents/skills/de-sloppify/SKILL.md is excluded by !**/*.md
  • .agents/skills/dependency-injection/SKILL.md is excluded by !**/*.md
  • .agents/skills/docker/SKILL.md is excluded by !**/*.md
  • .agents/skills/ef-core/SKILL.md is excluded by !**/*.md
  • .agents/skills/error-handling/SKILL.md is excluded by !**/*.md
  • .agents/skills/health-check/SKILL.md is excluded by !**/*.md
  • .agents/skills/httpclient-factory/SKILL.md is excluded by !**/*.md
  • .agents/skills/instinct-system/SKILL.md is excluded by !**/*.md
  • .agents/skills/learning-log/SKILL.md is excluded by !**/*.md
  • .agents/skills/logging/SKILL.md is excluded by !**/*.md
  • .agents/skills/messaging/SKILL.md is excluded by !**/*.md
  • .agents/skills/migration-workflow/SKILL.md is excluded by !**/*.md
  • .agents/skills/minimal-api/SKILL.md is excluded by !**/*.md
  • .agents/skills/model-selection/SKILL.md is excluded by !**/*.md
  • .agents/skills/modern-csharp/SKILL.md is excluded by !**/*.md
  • .agents/skills/openapi/SKILL.md is excluded by !**/*.md
  • .agents/skills/opentelemetry/SKILL.md is excluded by !**/*.md
  • .agents/skills/project-setup/SKILL.md is excluded by !**/*.md
  • .agents/skills/project-structure/SKILL.md is excluded by !**/*.md
  • .agents/skills/resilience/SKILL.md is excluded by !**/*.md
  • .agents/skills/scaffolding/SKILL.md is excluded by !**/*.md
  • .agents/skills/scalar/SKILL.md is excluded by !**/*.md
  • .agents/skills/security-scan/SKILL.md is excluded by !**/*.md
  • .agents/skills/self-correction-loop/SKILL.md is excluded by !**/*.md
  • .agents/skills/serilog/SKILL.md is excluded by !**/*.md
  • .agents/skills/session-management/SKILL.md is excluded by !**/*.md
  • .agents/skills/split-memory/SKILL.md is excluded by !**/*.md
  • .agents/skills/testing/SKILL.md is excluded by !**/*.md
  • .agents/skills/verification-loop/SKILL.md is excluded by !**/*.md
  • .agents/skills/vertical-slice/SKILL.md is excluded by !**/*.md
  • .agents/skills/workflow-mastery/SKILL.md is excluded by !**/*.md
  • .agents/skills/wrap-up-ritual/SKILL.md is excluded by !**/*.md

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 006d41b4-5d7e-4e1a-a2c3-546d63fcf8f7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Resgrid-Bot

Resgrid-Bot commented Jul 24, 2026

Copy link
Copy Markdown

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug
Performance
Security
Business Logic

Access your configuration settings here.

@request-info

request-info Bot commented Jul 24, 2026

Copy link
Copy Markdown

Thanks for opening this, but we'd appreciate a little more information. Could you update it with more details?

6. EXCEPTION SWALLOWING — Catch blocks that silently discard errors?
→ Empty catch, catch with only a log, catch(Exception) without rethrow

7. ASYNC DEADLOCKS — .Result, .Wait(), .GetAwaiter().GetResult()?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Kody Rules critical

Async deadlock risk identified because blocking async methods using .Result or .Wait() prevents efficient asynchronous execution. Use await instead of blocking calls to ensure proper async behavior.

Kody rule violation: Avoid Blocking Calls to Async Methods

Prompt for LLM

File .agents/skills/80-20-review/SKILL.md:

Line 175:

Async deadlock risk identified because blocking async methods using `.Result` or `.Wait()` prevents efficient asynchronous execution. Use `await` instead of blocking calls to ensure proper async behavior.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

6. EXCEPTION SWALLOWING — Catch blocks that silently discard errors?
→ Empty catch, catch with only a log, catch(Exception) without rethrow

7. ASYNC DEADLOCKS — .Result, .Wait(), .GetAwaiter().GetResult()?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Kody Rules high

Async deadlock risk identified due to blocking calls using .Result, .Wait(), and .GetAwaiter().GetResult(). Await Tasks properly end-to-end and configure awaits appropriately to prevent thread starvation.

Kody rule violation: Await async operations properly

Prompt for LLM

File .agents/skills/80-20-review/SKILL.md:

Line 175:

Async deadlock risk identified due to blocking calls using `.Result`, `.Wait()`, and `.GetAwaiter().GetResult()`. Await Tasks properly end-to-end and configure awaits appropriately to prevent thread starvation.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.


internal class Handler(AppDbContext db, HybridCache cache)
{
public async Task<Response?> Handle(Query query, CancellationToken ct)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Kody Rules low

Missing documentation violation identified on the async method Handle. Add XML doc comments to describe the return type, cancellation behavior, and possible exceptions.

Kody rule violation: Document async/Promise behavior and errors

Prompt for LLM

File .agents/skills/caching/SKILL.md:

Line 52:

Missing documentation violation identified on the async method `Handle`. Add XML doc comments to describe the return type, cancellation behavior, and possible exceptions.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.


services:
postgres:
image: postgres:17

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Kody Rules high

Container image drift risk identified because the configuration uses mutable tags like postgres:17. Pin production workloads using immutable image digests such as repo@sha256:... to prevent unexpected breaking changes.

Kody rule violation: Pin container images by digest in Helm/K8s

Prompt for LLM

File .agents/skills/ci-cd/SKILL.md:

Line 46:

Container image drift risk identified because the configuration uses mutable tags like `postgres:17`. Pin production workloads using immutable image digests such as `repo@sha256:...` to prevent unexpected breaking changes.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

{
var order = Order.Create(request, clock.GetUtcNow());
db.Orders.Add(order);
await db.SaveChangesAsync(ct);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Kody Rules high

Unhandled database exception risk identified because the external call await db.SaveChangesAsync(ct) lacks a try/catch block. Wrap the call in a try/catch(DbUpdateException) to log structured context and map the error to a domain Result.

Kody rule violation: Add try-catch blocks for external calls

Prompt for LLM

File .agents/skills/dependency-injection/SKILL.md:

Line 68:

Unhandled database exception risk identified because the external call `await db.SaveChangesAsync(ct)` lacks a try/catch block. Wrap the call in a `try/catch(DbUpdateException)` to log structured context and map the error to a domain Result.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

```csharp
// BAD — silently swallowing
try { await ProcessOrder(order); }
catch (Exception) { /* ignore */ }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Kody Rules high

Silent exception swallowing violation identified in the catch block. Log the exception with context using logger.LogError(ex, "ProcessOrder failed for {OrderId}", order.Id) and rethrow it, or handle it meaningfully.

Kody rule violation: Avoid empty catch blocks

Prompt for LLM

File .agents/skills/error-handling/SKILL.md:

Line 233:

Silent exception swallowing violation identified in the catch block. Log the exception with context using `logger.LogError(ex, "ProcessOrder failed for {OrderId}", order.Id)` and rethrow it, or handle it meaningfully.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.


```csharp
// BAD — logging credentials
logger.LogInformation("User logged in: {Email} with password {Password}", email, password);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Kody Rules high

Credential logging violation identified because the statement outputs full passwords. Remove the password parameter or replace it with a hashed or tokenized representation to protect secrets.

Kody rule violation: Mask PII and secrets in logs

Prompt for LLM

File .agents/skills/logging/SKILL.md:

Line 137:

Credential logging violation identified because the statement outputs full passwords. Remove the password parameter or replace it with a hashed or tokenized representation to protect secrets.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

.WithSummary("Create a new order")
.Produces<OrderResponse>(StatusCodes.Status201Created)
.ProducesValidationProblem()
.RequireAuthorization();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Kody Rules high

Broken access control risk identified because the bare .RequireAuthorization() only enforces authentication and not role- or scope-based access control. Pass a specific deny-by-default policy name such as .RequireAuthorization("OrderWrite") to enforce proper RBAC.

Kody rule violation: Implement RBAC with least privilege and deny-by-default

Prompt for LLM

File .agents/skills/minimal-api/SKILL.md:

Line 76:

Broken access control risk identified because the bare `.RequireAuthorization()` only enforces authentication and not role- or scope-based access control. Pass a specific deny-by-default policy name such as `.RequireAuthorization("OrderWrite")` to enforce proper RBAC.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

if (order is { Customer: { Address: { Country: { Code: "US" } } } })

// GOOD — extract to a clear method or use sequential checks
if (order.Customer.Address.Country.Code == "US")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Kody Rules high

NullReferenceException risk identified due to deep dereferencing of order.Customer.Address.Country.Code without null guards. Use null-conditional access (order?.Customer?.Address?.Country?.Code == "US") or a pattern matching statement to satisfy the null-check requirement.

Kody rule violation: Add null checks to prevent NullReferenceException

Prompt for LLM

File .agents/skills/modern-csharp/SKILL.md:

Line 153:

NullReferenceException risk identified due to deep dereferencing of `order.Customer.Address.Country.Code` without null guards. Use null-conditional access (`order?.Customer?.Address?.Country?.Code == "US"`) or a pattern matching statement to satisfy the null-check requirement.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

// GOOD — extension members (C# 14)
public extension OrderExtensions for Order
{
public decimal TotalWithTax => Total * 1.2m;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Kody Rules low

Magic number violation identified where the tax rate 1.2m is buried inline in the TotalWithTax calculation. Extract the multiplier to a named constant like private const decimal TaxMultiplier = 1.2m; to improve maintainability.

Kody rule violation: Replace magic numbers with named constants

Prompt for LLM

File .agents/skills/modern-csharp/SKILL.md:

Line 116:

Magic number violation identified where the tax rate `1.2m` is buried inline in the `TotalWithTax` calculation. Extract the multiplier to a named constant like `private const decimal TaxMultiplier = 1.2m;` to improve maintainability.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

if (order is { Customer: { Address: { Country: { Code: "US" } } } })

// GOOD — extract to a clear method or use sequential checks
if (order.Customer.Address.Country.Code == "US")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Kody Rules low

Magic string violation identified in the comparison against the raw string literal "US". Replace the literal with a centralized enum or named constant like CountryCode.US to prevent typos.

Kody rule violation: Use enums instead of magic strings

Prompt for LLM

File .agents/skills/modern-csharp/SKILL.md:

Line 153:

Magic string violation identified in the comparison against the raw string literal `"US"`. Replace the literal with a centralized enum or named constant like `CountryCode.US` to prevent typos.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

logger.LogInformation("Login: {Email} with password {Password}", email, password);

// GOOD — never log secrets, passwords, tokens, or PII
logger.LogInformation("Login: {Email}", email);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Kody Rules high

GDPR compliance violation identified because raw email personal data is logged without lawful-basis or purpose metadata. Emit a hashed identifier instead and attach GDPR context to the diagnostic log.

Kody rule violation: Redact PII in logs and metrics by default

Prompt for LLM

File .agents/skills/serilog/SKILL.md:

Line 236:

GDPR compliance violation identified because raw email personal data is logged without lawful-basis or purpose metadata. Emit a hashed identifier instead and attach GDPR context to the diagnostic log.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.


public new async Task DisposeAsync()
{
await _postgres.DisposeAsync();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Kody Rules high

Resource leak risk identified because an unhandled rejection in _postgres.DisposeAsync() skips base.DisposeAsync() on line 100. Wrap the awaited operation in a try/finally block to guarantee base-class cleanup executes during container teardown.

Kody rule violation: Handle async operations with proper error handling

Prompt for LLM

File .agents/skills/testing/SKILL.md:

Line 99:

Resource leak risk identified because an unhandled rejection in `_postgres.DisposeAsync()` skips `base.DisposeAsync()` on line 100. Wrap the awaited operation in a try/finally block to guarantee base-class cleanup executes during container teardown.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

Comment on lines +227 to +231
var failures = validators
.Select(v => v.Validate(context))
.SelectMany(r => r.Errors)
.Where(f => f is not null)
.ToList();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Kody Rules high

Readability violation identified because the single-expression LINQ chain combines four operations (Select, SelectMany, Where, ToList). Split the operations into intermediate variables to improve debugging and code clarity.

Kody rule violation: Limit Lengthy LINQ Chains

Prompt for LLM

File .agents/skills/vertical-slice/SKILL.md:

Line 227 to 231:

Readability violation identified because the single-expression LINQ chain combines four operations (`Select`, `SelectMany`, `Where`, `ToList`). Split the operations into intermediate variables to improve debugging and code clarity.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

{
public void Map(IEndpointRouteBuilder app)
{
var group = app.MapGroup("/api/orders").WithTags("Orders");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Kody Rules low

Route drift risk identified due to duplicating the inline string literal "/api/orders" across multiple locations (lines 99, 105, 178). Extract the route path to a constant such as const string OrdersRoute = "/api/orders"; to centralize the configuration.

Kody rule violation: Centralize string constants

Prompt for LLM

File .agents/skills/vertical-slice/SKILL.md:

Line 99:

Route drift risk identified due to duplicating the inline string literal `"/api/orders"` across multiple locations (lines 99, 105, 178). Extract the route path to a constant such as `const string OrdersRoute = "/api/orders";` to centralize the configuration.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

@ucswift

ucswift commented Jul 24, 2026

Copy link
Copy Markdown
Member Author

Approve

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is approved.

@ucswift
ucswift merged commit b8c2c54 into master Jul 24, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants