Skip to content

Commit ee12b1f

Browse files
committed
chore: standardize agent guidance
1 parent a02ed11 commit ee12b1f

14 files changed

Lines changed: 239 additions & 216 deletions

.agents/memory/MEMORY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- [Architecture](architecture.md) — Native AOT, source-generated JSON, conditional OpenTelemetry, Npgsql multiplexing, build flag matrix.
2+
- [Workflow](workflow.md) — Branch+PR strategy required; PRs are rebase-only.
3+
- [GitHub Conventions](github.md) — Repo-wide community health files live in `jonathanperis/.github`; use `gh` CLI.
4+
- [User Profile](user_profile.md) — Maintainer context for sibling Rinha implementations and shared infrastructure patterns.
5+
- [GitHub Pages & Docs](github_pages.md) — Astro docs site, documentation source, deploy workflow, GHCR image, stress-test reports.

.agents/memory/architecture.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: .NET Rinha Architecture
3+
description: Native AOT Minimal APIs, source-generated JSON, conditional OpenTelemetry compilation, Npgsql multiplexing
4+
type: project
5+
---
6+
7+
## Design Decisions
8+
9+
**Single Program.cs with Minimal APIs:**
10+
- No controllers or MVC layers; route handlers are direct and compact.
11+
- The minimal shape is intentional for challenge performance.
12+
13+
**Why:** Challenge constraints (1.5 CPU, 550MB RAM) favor zero-JIT startup and minimal allocations.
14+
15+
**How to apply:** Keep all challenge routes in `Program.cs`. Do not add controllers or service layers unless a measured change justifies the extra overhead.
16+
17+
## Key Technical Choices
18+
19+
- **Native AOT** (`AOT=true`): eliminates JIT warmup in release images.
20+
- **Source generators**: `SourceGenerationContext` and `[JsonSerializable(...)]` metadata keep JSON compatible with AOT.
21+
- **Conditional compilation**: `#if !EXTRAOPTIMIZE` wraps OpenTelemetry code. Release builds set `EXTRA_OPTIMIZE=true` so observability support is compiled out.
22+
- **Npgsql multiplexing**: `Multiplexing=true` with a bounded pool in the compose connection string.
23+
- **Snake_case JSON**: `JsonNamingPolicy.SnakeCaseLower` matches the challenge API shape.
24+
25+
## Build Flag Matrix
26+
27+
| Flag | Development compose | Release workflow |
28+
|------|---------------------|------------------|
29+
| `AOT` | `true` | `true` |
30+
| `TRIM` | `false` | `false` |
31+
| `EXTRA_OPTIMIZE` | `false` | `true` |
32+
| `BUILD_CONFIGURATION` | `Release` | `Release` |
33+
34+
## Shared Infrastructure
35+
36+
This implementation follows the same broad Rinha2 infrastructure pattern as the sibling Rust, Go, and Python implementations: PostgreSQL stored procedures, NGINX on `9999`, and the shared `rinha2-back-end-k6` load-test image.

.agents/memory/github.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: GitHub Conventions & Shared .github Repo
3+
description: Repo-wide community health files live in jonathanperis/.github; use gh CLI for GitHub operations
4+
type: feedback
5+
---
6+
7+
Repo-wide community health files (`CODE_OF_CONDUCT.md`, `CONTRIBUTING.md`, `SECURITY.md`, `FUNDING.yml`, issue/PR templates, and related files) are managed centrally in the `jonathanperis/.github` repository. Do not create these files in individual project repos.
8+
9+
**Why:** GitHub automatically inherits community health files from the owner's `.github` repository. Duplicating them causes maintenance drift.
10+
11+
**How to apply:**
12+
- Do not create community health files in this repo.
13+
- Use `gh` for repository, PR, issue, check, release, and merge operations.
14+
- If a community health file is needed, add it to `jonathanperis/.github` instead.

.agents/memory/github_pages.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
name: GitHub Pages & Documentation
3+
description: Astro docs site at jonathanperis.github.io/rinha2-back-end-dotnet served from docs/ and sourced from docs/wiki/
4+
type: reference
5+
---
6+
7+
- **GitHub Pages:** https://jonathanperis.github.io/rinha2-back-end-dotnet/ — deployed by `.github/workflows/deploy.yml`.
8+
- **Documentation source:** Markdown files under `docs/wiki/` render into the Astro docs routes.
9+
- **Docs package:** `docs/package.json`; use Bun for install/build/lint.
10+
- **Deploy workflow:** `.github/workflows/deploy.yml` delegates to the shared Pages workflow and passes `package-manager: bun`.
11+
- **Stress-test reports:** k6 HTML reports are published under `docs/reports/` when release/report artifacts are present.
12+
- **Docker image:** `ghcr.io/jonathanperis/rinha2-back-end-dotnet:latest` — multi-platform manifest after the main release workflow completes.

.agents/memory/user_profile.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: Jonathan Peris - Developer Profile
3+
description: Maintainer context for multiple backend challenge implementations across .NET, Rust, Go, and Python
4+
type: user
5+
---
6+
7+
- Maintains multiple implementations of the Rinha de Backend challenge, including .NET, Rust, Go, and Python variants.
8+
- Uses a shared infrastructure pattern across sibling Rinha2 implementations: PostgreSQL stored procedures, NGINX, and shared k6 test image.
9+
- Values clean linear git history, PR-based changes, CI/CD, and GitHub best practices.
10+
- Uses a centralized `jonathanperis/.github` repository for community health files across repos.
11+
- Prefers `gh` CLI over raw HTTP API calls for GitHub operations.

.agents/memory/workflow.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: Branch + PR Workflow & Rebase Strategy
3+
description: All changes must use branch+PR strategy; PRs are rebase-only
4+
type: feedback
5+
---
6+
7+
All changes to this repository must follow a branch + PR workflow. Do not commit directly to `main`.
8+
9+
**Why:** The repository keeps linear history on `main`.
10+
11+
**How to apply:**
12+
- Create a feature/fix/docs/chore branch before making changes.
13+
- Create a PR with `gh pr create` targeting `main`.
14+
- Merge using rebase strategy only; do not use merge commits or squash merges.
15+
- Use conventional branch prefixes such as `docs/`, `fix/`, `feat/`, `chore/`, `refactor/`, and `ci/`.

.claude/memory/MEMORY.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.claude/memory/architecture.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

.claude/memory/feedback_github.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

.claude/memory/feedback_workflow.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)