From typdd
Use when modifying typdd library source code, adding operators or styles, fixing layout or rendering, writing tests, or debugging BDD construction.
How this skill is triggered — by the user, by Claude, or both
Slash command
/typdd:typdd-devThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Develop the typdd Typst library — a BDD visualization package built on fletcher.
Develop the typdd Typst library — a BDD visualization package built on fletcher.
Pipeline: parse → build → reduce → layout → render
| File | Role | Key functions |
|---|---|---|
lib.typ | Public API, adaptive spacing | bdd(), bdd-from-json() |
src/parse.typ | Tokenizer + recursive descent parser | tokenize(), parse(), collect-vars() |
src/bdd.typ | Shannon expansion, unique table, reduction | build-bdd(), build(), reduce(), substitute() |
src/layout.typ | Sugiyama-inspired layered layout | assign-positions() |
src/render.typ | Fletcher diagram generation | render-bdd() (uses node(), edge()) |
src/styles.typ | Visual presets + shared layout constants | get-style(), merge-style(), _shared-layout |
src/order.typ | Variable ordering heuristics | dfs-order(), weight-order(), force-order() |
src/abstract.typ | Subtree collapsing, stats | collapse-subtrees(), bdd-stats() |
src/import.typ | JSON interchange import | import-json() |
MCP server (typdd-mcp/): TypeScript mirror of parser/BDD engine with tools/prompts.
| Task | Files to touch |
|---|---|
| New operator | src/parse.typ (tokenizer + grammar) → src/bdd.typ (evaluate + substitute) → tests/parse/test.typ + tests/bdd/test.typ |
| New style | src/styles.typ (spread _shared-layout, colors/strokes only) → get-style() match → examples/styles.typ |
| Layout fix | src/layout.typ (barycenter, overlap resolution, centering) |
| Render change | src/render.typ (fletcher node()/edge(), stroke/fill/bend) |
| New API param | lib.typ (add to bdd() sig + _render-pipeline()) |
| JSON import | src/import.typ → tests/integration/test.typ |
AST nodes (from parser):
(kind: "var", name: "x1")
(kind: "const", value: true/false)
(kind: "not", child: ast)
(kind: "binop", op: "&"|"|"|"^"|"=>"|"~&"|"~|"|"~^", left: ast, right: ast)
(kind: "ite", cond: ast, then-branch: ast, else-branch: ast)
BDD structure: (nodes: array, root: int, order: array) where each node is (id: int, kind: "terminal", value: bool) or (id: int, kind: "variable", var: str, low: int, high: int).
Unique table key: "var:low-id:high-id" — ensures canonical BDD nodes.
make test # 4 Typst (tytanic) + MCP (bun test)
make typst # Typst tests only: tt run
make mcp # MCP tests only: cd typdd-mcp && bun test
make examples # Rebuild PNGs
Tests are compile-time asserts — if any #assert.eq(...) fails, compilation exits non-zero. BDD correctness is verified via truth-table oracle (enumerate all 2^n assignments).
_shared-layout)/// doc comments, absolute imports (/src/...)then-branch/else-branch (not then/else)(result: ..., pos: ...) / (node-id: ..., nodes: ..., next-id: ..., unique-table: ...)_parse(tokens, pos, level) with level parameter to select grammar rule=> → |/~| → ^/~^ → &/~& → !npx claudepluginhub hmyuuu/typddGuides TypeScript library authoring: project setup, dual CJS/ESM package exports, tsdown/unbuild config, type-safe API design, advanced type patterns, vitest testing, and npm release workflows.
Guides Python type hints, mypy static checking with configs, modern syntax, and advanced features like Protocol, TypedDict, Generics for type-safe code.
Generates Typst source code for documents, reports, papers, and presentations. Covers markup, math, scripting, and layout syntax.