Create Glyph
Make R-based pictogram glyphs for skill, agent, or team icons in viz/ visualization layer. Each glyph is pure-ggplot2 function. Draws recognizable shape on 100x100 canvas. Rendered with neon glow to transparent-background WebP.
When Use
- New skill, agent, or team added. Needs visual icon
- Existing glyph needs replacement or redesign
- Batch-creating glyphs for new skills domain
- Prototyping visual metaphors for entity concepts
Inputs
- Required: Entity type —
skill, agent, or team
- Required: Entity ID (e.g.,
create-glyph, mystic, r-package-review) and domain (for skills)
- Required: Visual concept — what glyph should depict
- Optional: Reference glyph to study for complexity level
- Optional: Custom
--glow-sigma value (default: 4)
Steps
Step 1: Concept — Design the Visual Metaphor
Identify entity being iconified. Pick visual metaphor.
- Read entity's source file. Understand core concept:
- Skills:
skills/<id>/SKILL.md
- Agents:
agents/<id>.md
- Teams:
teams/<id>.md
- Pick metaphor type:
- Literal object: flask for experiments, shield for security
- Abstract symbol: arrows for merging, spirals for iteration
- Composite: combine 2-3 simple shapes (e.g., document + pen)
- Reference existing glyphs for complexity calibration:
Complexity Tiers:
+----------+--------+-------------------------------------------+
| Tier | Layers | Examples |
+----------+--------+-------------------------------------------+
| Simple | 2 | glyph_flame, glyph_heartbeat |
| Moderate | 3-5 | glyph_document, glyph_experiment_flask |
| Complex | 6+ | glyph_ship_wheel, glyph_bridge_cpp |
+----------+--------+-------------------------------------------+
- Pick function name:
glyph_<descriptive_name> (snake_case, unique)
Got: Clear mental sketch of shape with 2-6 planned layers.
If fail: Concept too abstract? Fall back to related concrete object. Review existing glyphs in same domain for inspiration.
Step 2: Compose — Write the Glyph Function
Write R function producing ggplot2 layers.
Function signature (immutable contract):
glyph_<name> <- function(cx, cy, s, col, bright) {
# cx, cy = center coordinates (50, 50 on 100x100 canvas)
# s = scale factor (1.0 = fill ~70% of canvas)
# col = domain color hex (e.g., "#ff88dd" for design)
# bright = brightened variant of col (auto-computed by renderer)
# Returns: list() of ggplot2 layers
}
Apply scale factor * s to ALL dimensions for consistent scaling:
r <- 20 * s # radius
hw <- 15 * s # half-width
lw <- .lw(s) # line width (default base 2.5)
lw_thin <- .lw(s, 1.2) # thinner line width
Build geometry using available primitives:
| Geometry |
Usage |
ggplot2::geom_polygon(data, .aes(x, y), ...) |
Filled shapes |
ggplot2::geom_path(data, .aes(x, y), ...) |
Open lines/curves |
ggplot2::geom_segment(data, .aes(x, xend, y, yend), ...) |
Line segments, arrows |
ggplot2::geom_rect(data, .aes(xmin, xmax, ymin, ymax), ...) |
Rectangles |
ggforce::geom_circle(data, .aes(x0, y0, r), ...) |
Circles |
Apply color strategy:
Alpha Guide:
+----------------------+------------+--------------------------+
| Purpose | Alpha | Example |
+----------------------+------------+--------------------------+
| Large fill (body) | 0.08-0.15 | hex_with_alpha(col, 0.1) |
| Medium fill (accent) | 0.15-0.25 | hex_with_alpha(col, 0.2) |
| Small fill (detail) | 0.25-0.35 | hex_with_alpha(bright, 0.3) |
| Outline stroke | 1.0 | color = bright |
| Secondary stroke | 1.0 | color = col |
| No fill | --- | fill = NA |
+----------------------+------------+--------------------------+
Return flat list() of layers. Renderer iterates and wraps each with glow.
Place function in right primitives file by entity type:
- Skills: domain-grouped across 19 primitives files:
primitives.R — bushcraft, compliance, containerization, data-serialization, defensive
primitives_2.R — devops, general, git, mcp-integration
primitives_3.R — mlops, observability, PM, r-packages, reporting, review, web-dev, esoteric, design
- More
primitives_4.R through primitives_19.R for newer domains
- Agents:
viz/R/agent_primitives.R
- Teams:
viz/R/team_primitives.R
Got: Working R function returning list of 2-6 ggplot2 layers.
If fail: ggforce::geom_circle errors? Confirm ggforce installed. Coords off? Canvas is 100x100 with (0,0) at bottom-left. Test function interactively:
source("viz/R/utils.R"); source("viz/R/primitives.R") # etc.
layers <- glyph_<name>(50, 50, 1.0, "#ff88dd", "#ffa8f0")
p <- ggplot2::ggplot() + ggplot2::coord_fixed(xlim=c(0,100), ylim=c(0,100)) +
ggplot2::theme_void()
for (l in layers) p <- p + l
print(p)
Step 3: Register — Map Entity to Glyph
Add entity-to-glyph mapping in right glyph mapping file.
For skills:
- Open
viz/R/glyphs.R
- Find comment section for target domain (e.g.,
# -- design (3))
- Add entry in alphabetical order within domain block:
"skill-id" = "glyph_function_name",
- Update domain count in comment if applicable
For agents:
- Open
viz/R/agent_glyphs.R
- Find alphabetical position in
AGENT_GLYPHS
- Add entry:
"agent-id" = "glyph_function_name",
For teams:
Open viz/R/team_glyphs.R
Find alphabetical position in TEAM_GLYPHS
Add entry:
"team-id" = "glyph_function_name",
Verify no duplicate ID exists in target list
Got: Right *_GLYPHS list has new mapping.
If fail: Build later reports "No glyph mapped"? Double-check entity ID exactly matches one in manifest and registry.
Step 4: Manifest — Add Icon Entry
Register icon in right manifest file.
For skills: viz/data/icon-manifest.json
{
"skillId": "skill-id",
"domain": "domain-name",
"prompt": "<domain basePrompt>, <descriptors>, dark background, vector art",
"seed": <next_seed>,
"path": "public/icons/cyberpunk/<domain>/<skill-id>.webp",
"status": "pending"
}
For agents: viz/data/agent-icon-manifest.json
{
"agentId": "agent-id",
"prompt": "<agent-specific descriptors>, dark background, vector art",
"seed": <next_seed>,
"path": "public/icons/cyberpunk/agents/<agent-id>.webp",
"status": "pending"
}
For teams: viz/data/team-icon-manifest.json
{
"teamId": "team-id",
"prompt": "<team-specific descriptors>, dark background, vector art",
"seed": <next_seed>,
"path": "public/icons/cyberpunk/teams/<team-id>.webp",
"status": "pending"
}
Got: Valid JSON with new entry placed among type siblings.
If fail: Validate JSON syntax. Common mistakes: trailing comma after last array element, missing quotes.
Step 5: Render — Generate the Icon
Run icon pipeline to render new glyph. Always use build.sh as entry point — it handles platform detection and R binary selection. See render-icon-pipeline for full flag reference and pipeline architecture.
# From project root — renders all palettes, standard + HD, skips existing icons
bash viz/build.sh --only <domain> --skip-existing # skills
bash viz/build.sh --type agent --only <id> --skip-existing # agents
bash viz/build.sh --type team --only <id> --skip-existing # teams
# Dry run first:
bash viz/build.sh --only <domain> --dry-run
build.sh runs full pipeline (palette → data → manifest → render → terminal glyphs). Non-render steps add ~10 seconds but keep all data current.
Output locations:
- Skills:
viz/public/icons/<palette>/<domain>/<skill-id>.webp
- Agents:
viz/public/icons/<palette>/agents/<agent-id>.webp
- Teams:
viz/public/icons/<palette>/teams/<team-id>.webp
Got: Log shows OK: <entity> (seed=XXXXX, XX.XKB). WebP file exists.
If fail:
"No glyph mapped" — Step 3 mapping missing or typo
"Unknown domain" — Domain not in get_palette_colors() in palettes.R
- R package errors — Run
install.packages(c("ggplot2", "ggforce", "ggfx", "ragg", "magick")) first
- Rendering crashes? Test glyph function interactively (see Step 2 fallback)
Step 6: Verify — Visual Inspection
Check rendered output meets quality standards.
Verify file exists and has reasonable size:
ls -la viz/public/icons/cyberpunk/<type-path>/<entity-id>.webp
# Expected: 15-80 KB typical range
Open WebP in image viewer. Check:
- Shape reads clearly at full size (1024x1024)
- Neon glow present but not overpowering
- Background transparent (no black/white rectangle)
- No clipping at canvas edges
Check at small sizes (icon renders at ~40-160px in force graph):
- Shape stays recognizable
- Detail does not turn to noise
- Glow does not overwhelm shape
Got: Clear, recognizable pictogram with even neon glow on transparent background.
If fail:
- Glow too strong: re-render with
--glow-sigma 2 (default is 4)
- Glow too weak: re-render with
--glow-sigma 8
- Shape unreadable small? Simplify glyph (fewer layers, bolder strokes, bump
.lw(s, base) base value)
- Clipping at edges? Shrink shape dimensions or shift center
Step 7: Iterate — Refine if Needed
Adjust and re-render.
Common adjustments:
- Bolder strokes: bump
.lw(s, base) — try base = 3.0 or 3.5
- More visible fill: bump alpha from 0.10 to 0.15-0.20
- Shape proportions: tune multipliers on
s (e.g., 20 * s -> 24 * s)
- Add/remove detail layers: keep total layers 2-6 for best results
Re-render after changes:
# Delete the existing icon first, then re-render
rm viz/public/icons/cyberpunk/<type-path>/<entity-id>.webp
# Use the appropriate build command from Step 5
Satisfied? Verify manifest status shows "done". Build script updates it on success.
Got: Final icon passes all verification checks from Step 6.
If fail: After 3+ iterations glyph still reads poorly? Consider completely different visual metaphor (back to Step 1).
Reference
Domain and Entity Color Palettes
All domain colors (for skills) in viz/R/palettes.R (single source of truth). Agent and team colors also in palettes.R. Cyberpunk palette (hand-tuned neon colors) in get_cyberpunk_colors(). Viridis-family palettes auto-generated via viridisLite.
Look up color:
source("viz/R/palettes.R")
get_palette_colors("cyberpunk")$domains[["design"]] # skill domain
get_palette_colors("cyberpunk")$agents[["mystic"]] # agent
get_palette_colors("cyberpunk")$teams[["tending"]] # team
Adding new domain? Add to three places in palettes.R:
PALETTE_DOMAIN_ORDER (alphabetical)
get_cyberpunk_colors() domains list
- Run
bash viz/build.sh to regenerate palettes, data, manifests
Glyph Function Catalog
See full catalog of available glyph functions in primitives source files:
- Skills:
viz/R/primitives.R through viz/R/primitives_19.R (domain-grouped)
- Agents:
viz/R/agent_primitives.R
- Teams:
viz/R/team_primitives.R
Helper Functions
| Function |
Signature |
Purpose |
.lw(s, base) |
(scale, base=2.5) |
Scale-aware line width |
.aes(...) |
alias for ggplot2::aes |
Shorthand aesthetic mapping |
hex_with_alpha(hex, alpha) |
(string, 0-1) |
Add alpha to hex color |
brighten_hex(hex, factor) |
(string, factor=1.3) |
Brighten a hex color |
dim_hex(hex, factor) |
(string, factor=0.4) |
Dim a hex color |
Checks
Pitfalls
- Forgetting
* s: Hard-coded pixel values break when scale changes. Always multiply by s.
- Canvas origin confusion: (0,0) is bottom-left, not top-left. Higher
y values move UP.
- Double glow: Renderer already applies
ggfx::with_outer_glow() to every layer. Do NOT add glow inside glyph function.
- Too many layers: Each layer gets individual glow wrapping. More than 8 layers → slow rendering, noisy visuals.
- Mismatched IDs: Entity ID in glyph mapping, manifest, registry must all match exactly.
- JSON trailing commas: Manifest is strict JSON. No trailing comma after last array element.
- Missing domain color: Domain not in
get_cyberpunk_colors() in palettes.R? Rendering errors. Add color first, then regenerate.
- Wrong primitives file: Skills in domain-grouped
primitives*.R, agents in agent_primitives.R, teams in team_primitives.R.
See Also
enhance-glyph — improve existing glyph's visual quality, fix rendering issues, add detail layers
audit-icon-pipeline — detect missing glyphs and icons, know what needs creating
render-icon-pipeline — run full rendering pipeline end-to-end
ornament-style-mono — complementary AI-based image generation (Z-Image vs R-coded glyphs)
ornament-style-color — color theory for glyph accent fill decisions
create-skill — parent workflow triggering glyph creation when adding new skills
1---2name: create-glyph-63description: Create R-based pictogram glyphs for skill, agent, or team icons in the visualization layer. Covers concept sketching, ggplot2 layer composition using the primitives library, color strategy, registration in the appropriate glyph mapping file and manifest, rendering via the build pipeline, and visual verification of the neon-glow output. Use when a new entity has been added and needs a visual icon for the force-graph visualization, an existing glyph needs replacement, or when batch-creating glyphs for a new domain.4license: MIT5---67# Create Glyph89Make R-based pictogram glyphs for skill, agent, or team icons in `viz/` visualization layer. Each glyph is pure-ggplot2 function. Draws recognizable shape on 100x100 canvas. Rendered with neon glow to transparent-background WebP.1011## When Use1213- New skill, agent, or team added. Needs visual icon14- Existing glyph needs replacement or redesign15- Batch-creating glyphs for new skills domain16- Prototyping visual metaphors for entity concepts1718## Inputs1920- **Required**: Entity type — `skill`, `agent`, or `team`21- **Required**: Entity ID (e.g., `create-glyph`, `mystic`, `r-package-review`) and domain (for skills)22- **Required**: Visual concept — what glyph should depict23- **Optional**: Reference glyph to study for complexity level24- **Optional**: Custom `--glow-sigma` value (default: 4)2526## Steps2728### Step 1: Concept — Design the Visual Metaphor2930Identify entity being iconified. Pick visual metaphor.31321. Read entity's source file. Understand core concept:33 - Skills: `skills/<id>/SKILL.md`34 - Agents: `agents/<id>.md`35 - Teams: `teams/<id>.md`362. Pick metaphor type:37 - **Literal object**: flask for experiments, shield for security38 - **Abstract symbol**: arrows for merging, spirals for iteration39 - **Composite**: combine 2-3 simple shapes (e.g., document + pen)403. Reference existing glyphs for complexity calibration:4142```text43Complexity Tiers:44+----------+--------+-------------------------------------------+45| Tier | Layers | Examples |46+----------+--------+-------------------------------------------+47| Simple | 2 | glyph_flame, glyph_heartbeat |48| Moderate | 3-5 | glyph_document, glyph_experiment_flask |49| Complex | 6+ | glyph_ship_wheel, glyph_bridge_cpp |50+----------+--------+-------------------------------------------+51```52534. Pick function name: `glyph_<descriptive_name>` (snake_case, unique)5455**Got:** Clear mental sketch of shape with 2-6 planned layers.5657**If fail:** Concept too abstract? Fall back to related concrete object. Review existing glyphs in same domain for inspiration.5859### Step 2: Compose — Write the Glyph Function6061Write R function producing ggplot2 layers.62631. Function signature (immutable contract):64 ```r65 glyph_<name> <- function(cx, cy, s, col, bright) {66 # cx, cy = center coordinates (50, 50 on 100x100 canvas)67 # s = scale factor (1.0 = fill ~70% of canvas)68 # col = domain color hex (e.g., "#ff88dd" for design)69 # bright = brightened variant of col (auto-computed by renderer)70 # Returns: list() of ggplot2 layers71 }72 ```73742. Apply scale factor `* s` to ALL dimensions for consistent scaling:75 ```r76 r <- 20 * s # radius77 hw <- 15 * s # half-width78 lw <- .lw(s) # line width (default base 2.5)79 lw_thin <- .lw(s, 1.2) # thinner line width80 ```81823. Build geometry using available primitives:8384 | Geometry | Usage |85 |---|---|86 | `ggplot2::geom_polygon(data, .aes(x, y), ...)` | Filled shapes |87 | `ggplot2::geom_path(data, .aes(x, y), ...)` | Open lines/curves |88 | `ggplot2::geom_segment(data, .aes(x, xend, y, yend), ...)` | Line segments, arrows |89 | `ggplot2::geom_rect(data, .aes(xmin, xmax, ymin, ymax), ...)` | Rectangles |90 | `ggforce::geom_circle(data, .aes(x0, y0, r), ...)` | Circles |91924. Apply color strategy:9394 ```text95 Alpha Guide:96 +----------------------+------------+--------------------------+97 | Purpose | Alpha | Example |98 +----------------------+------------+--------------------------+99 | Large fill (body) | 0.08-0.15 | hex_with_alpha(col, 0.1) |100 | Medium fill (accent) | 0.15-0.25 | hex_with_alpha(col, 0.2) |101 | Small fill (detail) | 0.25-0.35 | hex_with_alpha(bright, 0.3) |102 | Outline stroke | 1.0 | color = bright |103 | Secondary stroke | 1.0 | color = col |104 | No fill | --- | fill = NA |105 +----------------------+------------+--------------------------+106 ```1071085. Return flat `list()` of layers. Renderer iterates and wraps each with glow.1091106. Place function in right primitives file by entity type:111 - **Skills**: domain-grouped across 19 primitives files:112 - `primitives.R` — bushcraft, compliance, containerization, data-serialization, defensive113 - `primitives_2.R` — devops, general, git, mcp-integration114 - `primitives_3.R` — mlops, observability, PM, r-packages, reporting, review, web-dev, esoteric, design115 - More `primitives_4.R` through `primitives_19.R` for newer domains116 - **Agents**: `viz/R/agent_primitives.R`117 - **Teams**: `viz/R/team_primitives.R`118119**Got:** Working R function returning list of 2-6 ggplot2 layers.120121**If fail:** `ggforce::geom_circle` errors? Confirm ggforce installed. Coords off? Canvas is 100x100 with (0,0) at bottom-left. Test function interactively:122```r123source("viz/R/utils.R"); source("viz/R/primitives.R") # etc.124layers <- glyph_<name>(50, 50, 1.0, "#ff88dd", "#ffa8f0")125p <- ggplot2::ggplot() + ggplot2::coord_fixed(xlim=c(0,100), ylim=c(0,100)) +126 ggplot2::theme_void()127for (l in layers) p <- p + l128print(p)129```130131### Step 3: Register — Map Entity to Glyph132133Add entity-to-glyph mapping in right glyph mapping file.134135**For skills:**1361. Open `viz/R/glyphs.R`1372. Find comment section for target domain (e.g., `# -- design (3)`)1383. Add entry in alphabetical order within domain block:139 ```r140 "skill-id" = "glyph_function_name",141 ```1424. Update domain count in comment if applicable143144**For agents:**1451. Open `viz/R/agent_glyphs.R`1462. Find alphabetical position in `AGENT_GLYPHS`1473. Add entry:148 ```r149 "agent-id" = "glyph_function_name",150 ```151152**For teams:**1531. Open `viz/R/team_glyphs.R`1542. Find alphabetical position in `TEAM_GLYPHS`1553. Add entry:156 ```r157 "team-id" = "glyph_function_name",158 ```1591605. Verify no duplicate ID exists in target list161162**Got:** Right `*_GLYPHS` list has new mapping.163164**If fail:** Build later reports "No glyph mapped"? Double-check entity ID exactly matches one in manifest and registry.165166### Step 4: Manifest — Add Icon Entry167168Register icon in right manifest file.169170**For skills:** `viz/data/icon-manifest.json`171```json172{173 "skillId": "skill-id",174 "domain": "domain-name",175 "prompt": "<domain basePrompt>, <descriptors>, dark background, vector art",176 "seed": <next_seed>,177 "path": "public/icons/cyberpunk/<domain>/<skill-id>.webp",178 "status": "pending"179}180```181182**For agents:** `viz/data/agent-icon-manifest.json`183```json184{185 "agentId": "agent-id",186 "prompt": "<agent-specific descriptors>, dark background, vector art",187 "seed": <next_seed>,188 "path": "public/icons/cyberpunk/agents/<agent-id>.webp",189 "status": "pending"190}191```192193**For teams:** `viz/data/team-icon-manifest.json`194```json195{196 "teamId": "team-id",197 "prompt": "<team-specific descriptors>, dark background, vector art",198 "seed": <next_seed>,199 "path": "public/icons/cyberpunk/teams/<team-id>.webp",200 "status": "pending"201}202```203204**Got:** Valid JSON with new entry placed among type siblings.205206**If fail:** Validate JSON syntax. Common mistakes: trailing comma after last array element, missing quotes.207208### Step 5: Render — Generate the Icon209210Run icon pipeline to render new glyph. Always use `build.sh` as entry point — it handles platform detection and R binary selection. See [render-icon-pipeline](../render-icon-pipeline/SKILL.md) for full flag reference and pipeline architecture.211212```bash213# From project root — renders all palettes, standard + HD, skips existing icons214bash viz/build.sh --only <domain> --skip-existing # skills215bash viz/build.sh --type agent --only <id> --skip-existing # agents216bash viz/build.sh --type team --only <id> --skip-existing # teams217218# Dry run first:219bash viz/build.sh --only <domain> --dry-run220```221222`build.sh` runs full pipeline (palette → data → manifest → render → terminal glyphs). Non-render steps add ~10 seconds but keep all data current.223224Output locations:225 - Skills: `viz/public/icons/<palette>/<domain>/<skill-id>.webp`226 - Agents: `viz/public/icons/<palette>/agents/<agent-id>.webp`227 - Teams: `viz/public/icons/<palette>/teams/<team-id>.webp`228229**Got:** Log shows `OK: <entity> (seed=XXXXX, XX.XKB)`. WebP file exists.230231**If fail:**232- `"No glyph mapped"` — Step 3 mapping missing or typo233- `"Unknown domain"` — Domain not in `get_palette_colors()` in `palettes.R`234- R package errors — Run `install.packages(c("ggplot2", "ggforce", "ggfx", "ragg", "magick"))` first235- Rendering crashes? Test glyph function interactively (see Step 2 fallback)236237### Step 6: Verify — Visual Inspection238239Check rendered output meets quality standards.2402411. Verify file exists and has reasonable size:242 ```bash243 ls -la viz/public/icons/cyberpunk/<type-path>/<entity-id>.webp244 # Expected: 15-80 KB typical range245 ```2462472. Open WebP in image viewer. Check:248 - Shape reads clearly at full size (1024x1024)249 - Neon glow present but not overpowering250 - Background transparent (no black/white rectangle)251 - No clipping at canvas edges2522533. Check at small sizes (icon renders at ~40-160px in force graph):254 - Shape stays recognizable255 - Detail does not turn to noise256 - Glow does not overwhelm shape257258**Got:** Clear, recognizable pictogram with even neon glow on transparent background.259260**If fail:**261- Glow too strong: re-render with `--glow-sigma 2` (default is 4)262- Glow too weak: re-render with `--glow-sigma 8`263- Shape unreadable small? Simplify glyph (fewer layers, bolder strokes, bump `.lw(s, base)` base value)264- Clipping at edges? Shrink shape dimensions or shift center265266### Step 7: Iterate — Refine if Needed267268Adjust and re-render.2692701. Common adjustments:271 - **Bolder strokes**: bump `.lw(s, base)` — try `base = 3.0` or `3.5`272 - **More visible fill**: bump alpha from 0.10 to 0.15-0.20273 - **Shape proportions**: tune multipliers on `s` (e.g., `20 * s` -> `24 * s`)274 - **Add/remove detail layers**: keep total layers 2-6 for best results2752762. Re-render after changes:277 ```bash278 # Delete the existing icon first, then re-render279 rm viz/public/icons/cyberpunk/<type-path>/<entity-id>.webp280 # Use the appropriate build command from Step 5281 ```2822833. Satisfied? Verify manifest status shows `"done"`. Build script updates it on success.284285**Got:** Final icon passes all verification checks from Step 6.286287**If fail:** After 3+ iterations glyph still reads poorly? Consider completely different visual metaphor (back to Step 1).288289## Reference290291### Domain and Entity Color Palettes292293All domain colors (for skills) in `viz/R/palettes.R` (single source of truth). Agent and team colors also in `palettes.R`. Cyberpunk palette (hand-tuned neon colors) in `get_cyberpunk_colors()`. Viridis-family palettes auto-generated via `viridisLite`.294295Look up color:296```r297source("viz/R/palettes.R")298get_palette_colors("cyberpunk")$domains[["design"]] # skill domain299get_palette_colors("cyberpunk")$agents[["mystic"]] # agent300get_palette_colors("cyberpunk")$teams[["tending"]] # team301```302303Adding new domain? Add to three places in `palettes.R`:3041. `PALETTE_DOMAIN_ORDER` (alphabetical)3052. `get_cyberpunk_colors()` domains list3063. Run `bash viz/build.sh` to regenerate palettes, data, manifests307308### Glyph Function Catalog309310See full catalog of available glyph functions in primitives source files:311- **Skills**: `viz/R/primitives.R` through `viz/R/primitives_19.R` (domain-grouped)312- **Agents**: `viz/R/agent_primitives.R`313- **Teams**: `viz/R/team_primitives.R`314315### Helper Functions316317| Function | Signature | Purpose |318|---|---|---|319| `.lw(s, base)` | `(scale, base=2.5)` | Scale-aware line width |320| `.aes(...)` | alias for `ggplot2::aes` | Shorthand aesthetic mapping |321| `hex_with_alpha(hex, alpha)` | `(string, 0-1)` | Add alpha to hex color |322| `brighten_hex(hex, factor)` | `(string, factor=1.3)` | Brighten a hex color |323| `dim_hex(hex, factor)` | `(string, factor=0.4)` | Dim a hex color |324325## Checks326327- [ ] Glyph function follows `glyph_<name>(cx, cy, s, col, bright) -> list()` signature328- [ ] All dimensions use `* s` scaling factor329- [ ] Color strategy uses `col` for fills, `bright` for outlines, `hex_with_alpha()` for transparency330- [ ] Function placed in right primitives file for entity type and domain331- [ ] Glyph mapping entry added in right `*_glyphs.R` file332- [ ] Manifest entry added with right entity ID, path, `"status": "pending"`333- [ ] Build command runs without error (dry-run first)334- [ ] Rendered WebP exists at expected path335- [ ] File size in expected range (15-80 KB)336- [ ] Icon reads clearly at both 1024px and ~40px display sizes337- [ ] Transparent background (no solid rectangle behind glyph)338- [ ] Manifest status updated to `"done"` after successful render339340## Pitfalls341342- **Forgetting `* s`**: Hard-coded pixel values break when scale changes. Always multiply by `s`.343- **Canvas origin confusion**: (0,0) is bottom-left, not top-left. Higher `y` values move UP.344- **Double glow**: Renderer already applies `ggfx::with_outer_glow()` to every layer. Do NOT add glow inside glyph function.345- **Too many layers**: Each layer gets individual glow wrapping. More than 8 layers → slow rendering, noisy visuals.346- **Mismatched IDs**: Entity ID in glyph mapping, manifest, registry must all match exactly.347- **JSON trailing commas**: Manifest is strict JSON. No trailing comma after last array element.348- **Missing domain color**: Domain not in `get_cyberpunk_colors()` in `palettes.R`? Rendering errors. Add color first, then regenerate.349- **Wrong primitives file**: Skills in domain-grouped `primitives*.R`, agents in `agent_primitives.R`, teams in `team_primitives.R`.350351## See Also352353- `enhance-glyph` — improve existing glyph's visual quality, fix rendering issues, add detail layers354- `audit-icon-pipeline` — detect missing glyphs and icons, know what needs creating355- `render-icon-pipeline` — run full rendering pipeline end-to-end356- `ornament-style-mono` — complementary AI-based image generation (Z-Image vs R-coded glyphs)357- `ornament-style-color` — color theory for glyph accent fill decisions358- `create-skill` — parent workflow triggering glyph creation when adding new skills