|
| 1 | +# CLAUDE.md |
| 2 | + |
| 3 | +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. |
| 4 | + |
| 5 | +## General Guidelines |
| 6 | + |
| 7 | +- Exploit `Revise` to amortize the cost of compilation time, which for Julia is |
| 8 | + quite high. This *requires* that you use the MCP server to avoid starting a |
| 9 | + new Julia session each time. |
| 10 | + |
| 11 | +- Exploit Julia packages and macros for evaluating performance issues: |
| 12 | + `BenchmarkTools.jl` for micro-benchmarks, `Profile` for CPU profiling, and |
| 13 | + `Cthulhu.jl` for method analysis (or `@code_warntype`). These tools are in |
| 14 | + my global (fallback) environment. |
| 15 | + |
| 16 | +- Use `Pkg.test()` for a final run only when ready to submit a pull request. |
| 17 | + |
| 18 | +- Use the local `Project.toml` environment when available. Revise, TestEnv, |
| 19 | + Cthulhu, and some other developer-oriented tools are in my global (fallback) |
| 20 | + environment |
| 21 | + |
| 22 | +- When adding new packages to a local project, also update the `[compat]` |
| 23 | + section of `Project.toml` to bound the version of the new dependency. |
| 24 | + After making edits to `Project.toml`, run `Pkg.resolve()`. |
| 25 | + Resolver errors sometimes indicate package conflict. `Pkg.update()` can fix such errors. |
| 26 | + |
| 27 | +- Avoid being unnecessarily restrictive about method arguments. `f(A::Float64)` |
| 28 | + silently excludes `Float32`, dual numbers, and anything else that would work fine — |
| 29 | + the caller gets a confusing `MethodError` instead. Annotate only as specifically as |
| 30 | + the implementation requires. |
0 commit comments