annotate .claude/skills/zenbu-bazel-c/SKILL.md @ 251:117c4d53c9a4

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