- Remove commands block from CLAUDE.md (standard tool usage Claude knows) - Remove dead @AGENTS.md reference - Add optimization pipeline overview with module pointers - Add domain glossary (optimization candidate, addressable time, candidate forest, replay test, tracer, worktree mode) - Extract mypy workflow to .claude/skills/fix-mypy.md (on-demand) - Create .claude/skills/fix-prek.md for prek workflow (on-demand) - Add key entry points table to architecture.md - Create path-scoped rules: optimization-patterns.md, language-patterns.md - Remove redundancy from source-code.md and across rules files - Move "never use pip" convention to code-style.md
1 KiB
1 KiB
| paths | ||
|---|---|---|
|
Testing Conventions
- Code context extraction and replacement tests must always assert for full string equality, no substring matching.
- Use pytest's
tmp_pathfixture for temp directories (it's aPathobject). - Write temp files inside
tmp_path, never useNamedTemporaryFile(causes Windows file contention). - Always call
.resolve()on Path objects to ensure absolute paths and resolve symlinks. - Use
.as_posix()when converting resolved paths to strings (normalizes to forward slashes). - Any new feature or bug fix that can be tested automatically must have test cases.
- If changes affect existing test expectations, update the tests accordingly. Tests must always pass after changes.
- The pytest plugin patches
time,random,uuid, anddatetimefor deterministic test execution — never assume real randomness or real time in verification tests. conftest.pyuses an autouse fixture that callsreset_current_language()— tests always start with Python as the default language.