Skip to content

Update CLAUDE.md with project guidance#2358

Merged
alexeyzimarev merged 2 commits intodevfrom
update-claude-md
Feb 26, 2026
Merged

Update CLAUDE.md with project guidance#2358
alexeyzimarev merged 2 commits intodevfrom
update-claude-md

Conversation

@alexeyzimarev
Copy link
Member

@alexeyzimarev alexeyzimarev commented Feb 26, 2026

Summary

  • Replace minimal CLAUDE.md with comprehensive developer guidance for Claude Code
  • Document build/test commands using .slnx solution format
  • Cover architecture, code conventions, multi-targeting strategy, and testing stack
  • Note that dotnet test with .slnx does not work with net8.0 (use project files instead)

Fixes #2359

🤖 Generated with Claude Code

Replace minimal MCP server note with full developer guidance including
build/test commands, architecture overview, code conventions, and
multi-targeting notes. Uses .slnx solution format with a note about
net8.0 incompatibility requiring project-level test runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@qodo-free-for-open-source-projects
Copy link
Contributor

Review Summary by Qodo

Add comprehensive developer guidance to CLAUDE.md

📝 Documentation

Grey Divider

Walkthroughs

Description
• Replace minimal MCP note with comprehensive developer guidance
• Document build, test, and pack commands using .slnx format
• Add detailed architecture overview and core class descriptions
• Include multi-targeting strategy, code conventions, and testing stack
Diagram
flowchart LR
  A["Minimal CLAUDE.md<br/>MCP note only"] -->|Replace with| B["Comprehensive CLAUDE.md"]
  B --> C["Build & Test<br/>Commands"]
  B --> D["Project Overview<br/>& Architecture"]
  B --> E["Code Conventions<br/>& Testing Stack"]
  C --> F["dotnet build/test<br/>with .slnx"]
  D --> G["Core classes &<br/>Request pipeline"]
  E --> H["Multi-targeting &<br/>Code style"]
Loading

Grey Divider

File Changes

1. CLAUDE.md 📝 Documentation +104/-2

Comprehensive developer guidance for Claude Code

• Replaced minimal MCP server note with comprehensive developer guidance
• Added build, test, and pack command examples using .slnx solution format
• Documented project structure with repository layout and core classes
• Included architecture details covering request pipeline, parameters, serialization, and
 authentication
• Added multi-targeting strategy, code conventions, and testing stack information
• Noted net8.0 incompatibility with .slnx test command requiring project-level runs

CLAUDE.md


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects
Copy link
Contributor

qodo-free-for-open-source-projects bot commented Feb 26, 2026

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. RestResponse not immutable🐞 Bug ✓ Correctness
Description
CLAUDE.md claims RestResponse/RestResponse<T> are “immutable”, but the actual types expose public
setters (including Data). This is misleading guidance and can lead to incorrect assumptions in new
code/tests (e.g., treating responses as safe to share or as value objects).
Code

CLAUDE.md[48]

+- **RestResponse / RestResponse\<T\>** (`Response/RestResponse*.cs`) — Immutable response containers generated by `[GenerateClone]` source generator.
Evidence
The documentation explicitly states immutability, but the implementation shows RestResponseBase and
RestResponse<T> have multiple set accessors, so they are mutable containers; [GenerateClone]
provides a clone/factory method, not immutability.

CLAUDE.md[46-49]
src/RestSharp/Response/RestResponseBase.cs[35-72]
src/RestSharp/Response/RestResponse.cs[20-33]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`CLAUDE.md` states that `RestResponse`/`RestResponse&amp;lt;T&amp;gt;` are immutable, but the implementation has public setters (including `Data`). This is incorrect guidance and can mislead contributors/agents.
### Issue Context
`[GenerateClone]` generates clone/factory helpers; it does not enforce immutability.
### Fix Focus Areas
- CLAUDE.md[46-49]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Slnx/net8 test guidance conflict 🐞 Bug ⛯ Reliability
Description
CLAUDE.md recommends dotnet test RestSharp.slnx -c Debug (“Run all tests”), but also states
dotnet test with .slnx does not work with net8.0. Since the .slnx includes test projects
that multi-target net8.0, the guidance is internally inconsistent/ambiguous and likely to confuse
or send users into a failing workflow.
Code

CLAUDE.md[R11-24]

+# Run all tests
+dotnet test RestSharp.slnx -c Debug
+
+# Run tests for a specific TFM
+dotnet test RestSharp.slnx -f net9.0
+
+# Run a single test by fully-qualified name
+dotnet test test/RestSharp.Tests/RestSharp.Tests.csproj --filter "FullyQualifiedName=RestSharp.Tests.ObjectParserTests.ShouldUseRequestProperty" -f net8.0
+
+# Pack
+dotnet pack src/RestSharp/RestSharp.csproj -c Release -o nuget -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
+```
+
+**Note:** `dotnet test` with `.slnx` does not work with `net8.0`. To run tests targeting `net8.0`, use individual project files: `dotnet test test/RestSharp.Tests/RestSharp.Tests.csproj -f net8.0`
Evidence
The solution file explicitly includes test projects, and the test build props multi-target net8.0.
Therefore, a “run all tests” invocation against the solution will necessarily involve projects
configured for net8.0, which conflicts with the subsequent note claiming .slnx + net8.0 doesn’t
work.

CLAUDE.md[11-25]
RestSharp.slnx[33-57]
test/Directory.Build.props[1-8]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`CLAUDE.md` currently recommends running all tests via `dotnet test RestSharp.slnx -c Debug` while also stating `.slnx` tests don’t work with `net8.0`. Because test projects in the `.slnx` multi-target `net8.0`, this is contradictory/ambiguous guidance.
### Issue Context
The `.slnx` includes test projects and the shared test props multi-target `net8.0`, so the doc should clearly communicate a working set of commands (and precisely what combination is known to fail).
### Fix Focus Areas
- CLAUDE.md[7-25]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 26, 2026

Deploying restsharp with  Cloudflare Pages  Cloudflare Pages

Latest commit: a57c1ec
Status: ✅  Deploy successful!
Preview URL: https://4c3e0e17.restsharp.pages.dev
Branch Preview URL: https://update-claude-md.restsharp.pages.dev

View logs

Comment on lines +11 to +24
# Run all tests
dotnet test RestSharp.slnx -c Debug

# Run tests for a specific TFM
dotnet test RestSharp.slnx -f net9.0

# Run a single test by fully-qualified name
dotnet test test/RestSharp.Tests/RestSharp.Tests.csproj --filter "FullyQualifiedName=RestSharp.Tests.ObjectParserTests.ShouldUseRequestProperty" -f net8.0

# Pack
dotnet pack src/RestSharp/RestSharp.csproj -c Release -o nuget -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
```

**Note:** `dotnet test` with `.slnx` does not work with `net8.0`. To run tests targeting `net8.0`, use individual project files: `dotnet test test/RestSharp.Tests/RestSharp.Tests.csproj -f net8.0`

Choose a reason for hiding this comment

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

Action required

2. Slnx/net8 test guidance conflict 🐞 Bug ⛯ Reliability

CLAUDE.md recommends dotnet test RestSharp.slnx -c Debug (“Run all tests”), but also states
dotnet test with .slnx does not work with net8.0. Since the .slnx includes test projects
that multi-target net8.0, the guidance is internally inconsistent/ambiguous and likely to confuse
or send users into a failing workflow.
Agent Prompt
### Issue description
`CLAUDE.md` currently recommends running all tests via `dotnet test RestSharp.slnx -c Debug` while also stating `.slnx` tests don’t work with `net8.0`. Because test projects in the `.slnx` multi-target `net8.0`, this is contradictory/ambiguous guidance.

### Issue Context
The `.slnx` includes test projects and the shared test props multi-target `net8.0`, so the doc should clearly communicate a working set of commands (and precisely what combination is known to fail).

### Fix Focus Areas
- CLAUDE.md[7-25]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@github-actions
Copy link

Test Results

   42 files     42 suites   17m 48s ⏱️
  514 tests   514 ✅ 0 💤 0 ❌
3 593 runs  3 593 ✅ 0 💤 0 ❌

Results for commit d7820fc.

RestResponse types have public setters on all properties. Remove
the incorrect "immutable" label and clarify what [GenerateClone]
actually does.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link

@alexeyzimarev alexeyzimarev merged commit 91dfd97 into dev Feb 26, 2026
11 checks passed
@alexeyzimarev alexeyzimarev deleted the update-claude-md branch February 26, 2026 20:04
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.

Create comprehensive developer guidance documentation for Claude Code

1 participant