# Project instructions ## ctx — use before reading files This project has `ctx` available in PATH. Use it to understand the codebase **before** reading files directly. It produces compact markdown summaries that cost far fewer tokens than raw file content. ### When to use **Always use `ctx` first** when you need to: - Understand project structure → `ctx csharp project` - Understand a file's structure → `ctx csharp outline ` - Check build errors → `ctx csharp errors` - Understand git state → `ctx git` - Detect what stack this project uses → `ctx auto detect` ### Workflow 1. **Start of session:** run `ctx auto detect` to see what's here, then `ctx csharp project` for an overview. 2. **Before reading a file:** run `ctx csharp outline ` first. Only read the full file if the outline isn't enough (e.g., you need to see method body logic). 3. **After making changes:** run `ctx csharp errors` instead of `dotnet build` — the output is pre-filtered to only relevant diagnostics. 4. **Before committing:** run `ctx git` for a compact diff summary. ### Available commands ``` ctx auto detect # detect stack(s) in current directory ctx auto project # run project summary for all detected stacks ctx csharp project # .NET solution overview (projects, refs, packages) ctx csharp outline # file structure without method bodies ctx csharp errors # filtered dotnet build output (errors + top warnings) ctx git # branch, status, recent commits, diff summary ``` ### Important - `ctx` output is a **summary**, not the full picture. If you need implementation details (method bodies, exact logic, specific lines), read the file directly. - Do not run `ctx` commands that don't match the project stack. Use `ctx auto detect` if unsure. - `ctx csharp errors` assumes `dotnet restore` was already run. If you get restore errors, run `dotnet restore` first, then `ctx csharp errors`.