- C11 only — no extensions, no POSIX, no platform headers beyond
<stdint.h>,<stddef.h>,<string.h> - No dynamic allocation — all state lives in the
InstinctEnginestruct passed by the caller - No
-lm— only integer arithmetic and simple float comparisons; nopow,sin,cos, etc. - Deterministic — same inputs always produce same outputs (no randomness)
- Bare-metal safe — no syscall dependencies, no floating-point exceptions expected in normal operation
- Add new instincts by appending to the
InstinctTypeenum (beforeINSTINCT_COUNT) - Update
instinct_name()andinstinct_priority()switch statements - Add evaluation logic in
instinct_evaluate()ininstinct.c last_reflexes[8]limits simultaneous reflexes; increase if more instincts can fire at onceINSTINCT_HISTORY_SIZE 32limits ring buffer; adjust for longer memory
make testruns 15 tests covering all instincts, priority ordering, history, and simultaneous firing- Add tests to
test_instinct.cusing theTEST/CHECK/PASS/FAILmacros