# Record Manager — starter template Clean, best-practice starting point for the CS 2060 cumulative project. Pick a flavor (contacts / gradebook / expense tracker) and extend it milestone by milestone; do not delete the verification targets. **Before your first commit:** read [`SETUP.md`](SETUP.md) (toolchain) and [`AGENTS.md`](AGENTS.md) (the rules every coding agent reads), copy [`MILESTONE.md`](MILESTONE.md) per milestone as your write-up. ## Layout ```text include/record.h the record_t struct + record_new/record_free + status codes src/record.c record implementation src/main.c CLI menu (Milestone 1) tests/smoke.sh dependency-free smoke tests for the CLI Makefile build + test + sanitizer targets .clang-format enforced formatting (clang-format -i src/*.c include/*.h) ``` ## Targets | Command | What it does | | :--- | :--- | | `make` | build `build/recman` (`-std=c17 -Wall -Wextra -Wpedantic -Werror -g`) | | `make test` | run the smoke tests | | `make sanitize` | rebuild with ASan+UBSan and run the smoke tests | | `make valgrind` | run under Valgrind Memcheck (leaks → non-zero exit) | | `make clean` | remove `build/` | ## Style & best-practice references - **Formatting** — `.clang-format` (LLVM base, 4-space, 100 cols). Reference: - **Readable C** — Linux kernel coding style: - **Robust error handling** — return `status_t`, check it at the call site. Reference: SEI CERT C, API04-C / ERR33-C () - **Build hygiene** — automatic header deps via `-MMD -MP`. Reference: GNU Make, Automatic Prerequisites () - **Memory safety** — sanitizers + Valgrind. Reference: GCC Instrumentation Options () - **Course textbook** — Beej's Guide to C: ## Milestones The five-milestone spec (M1 CLI → M2 buffer → M3 list → M4 file → M5 refactor) lives in `../README.md` (the `assignments/projects/` folder). ## AI use (optional) AI assistance is **not required**. If you use it, the standard `AGENTS.md` in this repo tells the agent exactly what Tier 2 permits; state "AI used: none | Tier 2" at the top of each milestone write-up and let the verification gates (`make test` / `make sanitize` / `make valgrind` + the CI report) be the record. retest 1787710392