+This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
+
+## Project Overview
+
+libucl is a C library for parsing UCL (Universal Configuration Language) — an nginx-inspired config format that is a superset of JSON. It also reads/writes MessagePack, emits YAML, and reads S-expressions. Version 0.9.4.
+Tests use shell wrapper scripts (`tests/*.test`) that invoke compiled test binaries. Basic tests parse `.in` files and compare output against `.res` files in `tests/basic/`. Schema tests run JSON Schema v4 test suites from `tests/schema/*.json`.
+
+## Architecture
+
+**Core source files** (all in `src/`):
+
+- `ucl_parser.c` — State-machine parser handling UCL, JSON, and msgpack input. The main parsing loop, macro processing (`.include`, `.priority`), and variable expansion live here. This is the largest and most complex file.
+- `ucl_emitter.c` — Tree-walking emitter dispatching to format-specific handlers (JSON, YAML, config, msgpack). Uses a context/ops pattern where `ucl_emitter_context` holds state and `ucl_emitter_operations` is a vtable of format callbacks.
+- `ucl_emitter_streamline.c` — Streaming emitter API that builds output incrementally without requiring a complete object tree.
+- `ucl_hash.c` — Hash table wrapping uthash with optional case-insensitive keys. Each `ucl_object_t` of type `UCL_OBJECT` stores children in one of these.
+- `ucl_util.c` — Object manipulation API (creation, lookup, iteration, type conversion), file I/O, and the `.include` macro implementation.
+**Object model**: The central type is `ucl_object_t` (defined in `ucl.h`). Objects form a tree; each node has a type (int, float, string, boolean, object, array, null, userdata), a key, and a next pointer for implicit arrays (duplicate keys). Objects use reference counting (`ucl_object_ref`/`ucl_object_unref`).
+
+**Parser lifecycle**: Create with `ucl_parser_new()`, feed data with `ucl_parser_add_string()`/`ucl_parser_add_file()`/`ucl_parser_add_fd()`, retrieve result with `ucl_parser_get_object()`, free with `ucl_parser_free()`. The parser processes input in chunks and maintains a state stack.
+
+## Test Data Convention
+
+Basic parse tests: `tests/basic/N.in` (input) + `tests/basic/N.res` (expected output). To add a parse test, create a new `.in`/`.res` pair. The test harness also exercises FD-based parsing, JSON/YAML output modes, and comment/macro preservation modes on every input file.
+
+## Notable CMake Options
+
+| Option | Default | Purpose |
+|--------|---------|---------|
+| `ENABLE_SANITIZERS` | OFF | AddressSanitizer/UBSan/etc. |