Mercurial
comparison .claude/skills/zenbu-bazel-c/SKILL.md @ 248:b8b6e726964a
[style] Use Dowa type aliases in C
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Tue, 04 Aug 2026 02:44:06 -0700 |
| parents | |
| children | 117c4d53c9a4 |
comparison
equal
deleted
inserted
replaced
| 247:70f2a3dafc1c | 248:b8b6e726964a |
|---|---|
| 1 --- | |
| 2 name: zenbu-bazel-c | |
| 3 description: Use this skill when working anywhere in the Zenbu monorepo, especially C/C++ libraries, Bazel targets, Mercurial workflow, shared assets, or cross-project dependencies. | |
| 4 --- | |
| 5 | |
| 6 # Zenbu Bazel/C Monorepo | |
| 7 | |
| 8 Use this skill to orient yourself before changing first-party code in this workspace. | |
| 9 | |
| 10 ## What this repo is | |
| 11 | |
| 12 Zenbu is a Mercurial/Bazel monorepo for reusable C libraries, web servers, frontend bundles, and experiments. Prefer first-party libraries over adding new external dependencies. | |
| 13 | |
| 14 Important first-party packages: | |
| 15 | |
| 16 - `dowa`: core C utilities, arena allocation, strings, math, dynamic arrays/hash maps. | |
| 17 - `seobeo`: HTTP/TCP/WebSocket/networking library. | |
| 18 - `mrjunejune`: personal website and production server. | |
| 19 - `hg-web`: Mercurial repository browser served by a C backend. | |
| 20 - `markdown_converter`: markdown-to-HTML C/WASM converter. | |
| 21 - `deita`: SQLite wrapper library. | |
| 22 - `s3`: S3 presigned upload helper. | |
| 23 - `gui_ze`: Bazel macros for bundling/copying web assets. | |
| 24 | |
| 25 Avoid broad searches in `third_party/`, Bazel output directories, virtualenvs, `node_modules`, and generated bundles unless the task specifically requires them. | |
| 26 | |
| 27 ## Build and test commands | |
| 28 | |
| 29 Use Bazel targets from the repository root: | |
| 30 | |
| 31 ```bash | |
| 32 bazel build //seobeo:seobeo | |
| 33 bazel test //seobeo:seobeo_client_test | |
| 34 bazel test //seobeo:seobeo_websocket_test | |
| 35 bazel test //seobeo:seobeo_websocket_server_test | |
| 36 | |
| 37 bazel build //mrjunejune:mrjunejune_server | |
| 38 bazel test //mrjunejune/test:integration_test | |
| 39 | |
| 40 bazel build //hg-web:hg_web_server | |
| 41 ``` | |
| 42 | |
| 43 For debug builds, prefer existing debug targets where present: | |
| 44 | |
| 45 ```bash | |
| 46 bazel build //mrjunejune:mrjunejune_server_debug -c dbg | |
| 47 bazel build //seobeo:seobeo_debug -c dbg | |
| 48 ``` | |
| 49 | |
| 50 If a change only touches docs or assistant skill files, Bazel verification is not required. | |
| 51 | |
| 52 ## Coding conventions to preserve | |
| 53 | |
| 54 - Prefer Dowa's integer and boolean aliases (`uint8`, `uint16`, `uint32`, | |
| 55 `uint64`, `int8`, `int16`, `int32`, `int64`, and `boolean`) plus | |
| 56 `TRUE`/`FALSE` in first-party C. Do not introduce `<stdint.h>` `_t` aliases | |
| 57 or `<stdbool.h>` `bool` when a Dowa type already expresses the value. | |
| 58 - C code generally uses `Dowa_Arena` for request-scoped allocations. | |
| 59 - HTTP responses are usually `Seobeo_Request_Entry *resp = NULL` maps filled with `Dowa_HashMap_Push_Arena`. | |
| 60 - Route handlers return response maps; streaming handlers receive `Seobeo_Handle *` directly. | |
| 61 - Existing code favors explicit status/content-type/body response fields. | |
| 62 - Use `Seobeo_Log` for seobeo-aware logging instead of introducing another logger. | |
| 63 - Keep Bazel dependencies precise. Add deps to the smallest target that needs them. | |
| 64 - Preserve platform-aware `select()` aliases for macOS/Linux targets. | |
| 65 | |
| 66 ## Mercurial workflow | |
| 67 | |
| 68 This repo is not a Git repository. Use Mercurial commands if you need VCS status: | |
| 69 | |
| 70 ```bash | |
| 71 hg status | |
| 72 hg diff | |
| 73 ``` | |
| 74 | |
| 75 Do not create Git-specific metadata or workflows unless explicitly asked. |