docs/cpp-safety.md (the four-layer safe-C++ playbook and design decisions) and the AGENTS.md standing rule were skipped by taicpp/.gitignore's *.md pattern in 79ae6f2; force-add them so the policy is actually in the tree, matching how the other docs are tracked. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1.6 KiB
1.6 KiB
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)
- Spec delta: update
docs/<module>.md+ parity table vs tai.py symbols. - Code: headers
.h+ impl.cpp, one class per file pair,-std=c++23 -Wall -Wextra, warning-free. - Tests:
tests/*_test.cppmirroring python cases;make testgreen. - Changelog: prepend
CHANGELOG.mdentry.
Commands
make— buildbuild/detzmake test— build + run all testsmake lint— warnings + clang-format checkmake version-bump PART=patch|minor|majormake changelog MSG="..."make tag— annotated tagdetz-v$(cat VERSION)make release PART=x MSG="..."— bump+changelog+commit+tag (never push unless asked)
Rules
- No outputs outside
build/. src/cli/version.hppgenerated fromVERSIONat build.- Max depth/layering, maximally OO. argparse tree must stay molo-subcommand-ready.
- Safe C++ is mandatory, per docs/cpp-safety.md: any code that
parses untrusted bytes uses overflow-safe size checks (
len <= size - pos, neverpos + 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.shis the pattern). We do not accept regressions here.