|
| 1 | +# Agent Notes (MathCAT) |
| 2 | + |
| 3 | +Purpose: fast orientation for coding agents. try to keep low overlap with README.md etc., |
| 4 | +but add common mistakes of AI agents here instead. |
| 5 | + |
| 6 | +## Project Scope |
| 7 | +- MathCAT converts MathML to speech, braille, and navigation output. |
| 8 | +- Core flow: `set_mathml()` -> `canonicalize.rs` -> optional `infer_intent.rs` -> `speech.rs` / `braille.rs`. |
| 9 | + |
| 10 | +## Rules System (`Rules/`) |
| 11 | +- YAML rules are loaded at runtime by domain: |
| 12 | +- Common per-language files: |
| 13 | + - `ClearSpeak_Rules.yaml`, `SimpleSpeak_Rules.yaml` |
| 14 | + - `SharedRules/`, `unicode.yaml`, `unicode-full.yaml`, `definitions.yaml`, `navigate.yaml` |
| 15 | +- `build.rs` can bundle rules into `rules.zip` when `include-zip` is enabled. |
| 16 | + |
| 17 | +## Translation Conventions |
| 18 | +- `t:` means untranslated or unverified. |
| 19 | +- `T:` means translated and verified. |
| 20 | +- tool for comparing rules across languages: `uv run --project PythonScripts audit-translations <language-code>` |
| 21 | + |
| 22 | +## Python Tooling (`uv`) |
| 23 | +- `uv` is the Python dependency and project manager for repo tooling. Use `uv run <command-name>` |
| 24 | +- discuss new packages before adding them. use `uv add <package-name>` and `uv sync` on confirmation |
| 25 | +- In sandboxed runs, if needed: |
| 26 | + - set `UV_CACHE_DIR=/tmp/uv-cache` |
| 27 | + - rerun with escalated permissions if macOS `system-configuration` panics occur. |
| 28 | +- *always* self-validate: `ùv run pytest` |
| 29 | + |
| 30 | +## Agent Instructions |
| 31 | +- Do not mirror README content here; keep guidance agent-specific. |
| 32 | +- Avoid broad formatting sweeps; do not run `cargo fmt` in this repo. |
| 33 | +- Keep code/rule changes focused and validate with targeted tests first: `cargo test <relevant-tests>` |
| 34 | +- do not do any git commands unless explicitly asked for |
| 35 | +- Rust coverage is in `target/coverage/`. |
0 commit comments