You are an expert technical analyst. Your task is to generate a comprehensive, accurate CLAUDE.md file for this project by thoroughly exploring the codebase and any available documentation before writing a single line.
Explore the repository structure completely:
- Run
find . -maxdepth 4 -not -path '*/obj/*' -not -path '*/.git/*' -not -path '*/bin/*' -not -path '*/node_modules/*'to map the full file tree - Read every file in the root directory (*.md, *.txt, *.json, *.xml, *.yml, *.yaml, .gitignore, .editorconfig, .globalconfig, Directory.Build.props, global.json)
- Read every *.csproj and *.sln file to understand project structure, dependencies, and SDK targets
- Read Program.cs, Startup.cs (if present), and any WebApplication builder files
- Read all appsettings*.json files EXCEPT appsettings.Production.json
- Read all files under Controllers/, Models/, DTOs/, Services/, Repositories/, Middleware/, Filters/, Extensions/
- Read all files under Data/ or Infrastructure/ for DbContext, entity configs, and repository patterns
- Read all files in the tests project(s)
- Check for any existing docs/ or documentation/ folder and read everything inside
- Run
dotnet --versionanddotnet list package(or read *.csproj) to capture all NuGet dependencies - Run
git log --oneline -20to understand recent development history - Run
git branch -ato understand branching strategy - Check for any Makefile, justfile, scripts/ folder, or .vscode/tasks.json for common dev commands
- Check for Dockerfile, docker-compose.yml, or any .github/workflows/ CI configuration
- Check for any .http or .rest files used for API testing
After exploration, derive and confirm:
- The precise .NET SDK version and target framework (e.g. net10.0)
- The architectural pattern (Clean Architecture, MVC, Minimal API, layered, etc.)
- The ORM and database (EF Core version, provider, migration strategy)
- The authentication/authorization strategy (JWT, cookies, OAuth, API keys, etc.)
- All third-party NuGet packages and their purpose
- The full
dotnetcommand set needed for build, run, test, watch, and migration - Any environment variables or user secrets required to run locally
- The API surface — base routes, versioning strategy, any Swagger/OpenAPI setup
- Code style conventions (nullable settings, global usings, file-scoped namespaces, etc.)
- Test framework and patterns (xUnit/NUnit/MSTest, mocking library, test naming conventions)
Now write the CLAUDE.md file. Follow these rules strictly:
- Be factual and specific — every command must actually work on this codebase
- Use exact paths, exact package names, exact CLI commands you verified in Phase 1
- Do NOT include placeholder text like "your connection string here" — reference the actual config key name
- Do NOT invent features or patterns you did not observe in the code
- Keep it skimmable — Claude Code reads this at the start of every session, so front-load the most critical facts
Structure the file exactly as follows:
[One paragraph: what this API does, the domain it operates in, and its current development state]
[Describe the architectural pattern with actual folder names. List each project in the solution and its responsibility.]
[.NET version, ASP.NET Core version, EF Core version + provider, auth mechanism, key NuGet packages with version and purpose]
[Every command a developer needs — build, run, watch, test, migration commands — with actual flags used in this project]
[Annotated directory tree of the important folders only — what lives where and why]
[Base URL pattern, versioning approach, auth headers required, link to Swagger UI if configured]
[DbContext name(s), migration folder, how to apply migrations locally, seeding approach if any]
[All required appsettings keys, which ones are environment-specific, how user secrets are used locally — never include actual values]
[Nullable settings, global usings, file-scoped namespaces, naming patterns for controllers/services/DTOs, any custom base classes]
[Test project name(s), framework, how to run a single test, naming convention, mocking approach]
[Git branching strategy, PR process if evident from config, any pre-commit hooks or CI steps to be aware of]
[Anything non-obvious discovered in Phase 1 — unusual middleware order, custom model binding, quirky config, etc.]
Save the completed file as CLAUDE.md in the project root.
After saving, print a one-paragraph summary of the most important things you learned about this codebase that weren't obvious from the folder structure alone.