# AGENTS.md — detz (taicpp) workflow Source of truth: `../tai.py` (untouched) + `../test_tai.py`, `../tai_test.py`. Reuse: moloapp (`/home/retoor/projects/moloapp`) — clients/SSE, llm providers, app patterns. Vendor/link only, never modify. ## Workflow (per milestone, in order) 1. Spec delta: update `docs/.md` + parity table vs tai.py symbols. 2. Code: headers `.h` + impl `.cpp`, one class per file pair, `-std=c++23 -Wall -Wextra`, warning-free. 3. Tests: `tests/*_test.cpp` mirroring python cases; `make test` green. 4. Changelog: prepend `CHANGELOG.md` entry. ## Commands - `make` — build `build/detz` - `make test` — build + run all tests - `make lint` — warnings + clang-format check - `make version-bump PART=patch|minor|major` - `make changelog MSG="..."` - `make tag` — annotated tag `detz-v$(cat VERSION)` - `make release PART=x MSG="..."` — bump+changelog+commit+tag (never push unless asked) ## Rules - No outputs outside `build/`. - `src/cli/version.hpp` generated from `VERSION` at build. - Max depth/layering, maximally OO. argparse tree must stay molo-subcommand-ready. - Safe C++ is mandatory, per [docs/cpp-safety.md](docs/cpp-safety.md): any code that parses untrusted bytes uses overflow-safe size checks (`len <= size - pos`, never `pos + len`), reads lengths unsigned and range-checked before any allocation or slice, guards every shift/loop bound, and lets no exception escape a top-level dispatch loop. A new parser is unfinished without a hostile-input test and a sanitizer run (`tools/san-whatsapp.sh` is the pattern). We do not accept regressions here.