From asi
Guides syntax, escaping, verbatim blocks, math notation, commands, tables, images, and config for Jon Sterling's Forester tool to build hypertext forests from .tree files, plus skill2tree conversion tips.
npx claudepluginhub plurigrid/asi --plugin asiThis skill uses the workspace's default tool permissions.
Jon Sterling's ocaml-forester builds hypertext forests from .tree files. LaTeX-like but NOT LaTeX.
Generates self-contained, branded HTML pages for diagrams, architecture overviews, diff reviews, plans, project recaps, comparisons, and data tables. Proactively replaces complex ASCII tables (4+ rows or 3+ columns) with browser visuals.
Generates standalone HTML files with inline SVG for 13 diagram types: architecture, flowcharts, sequences, state machines, ERDs, timelines, swimlanes, quadrants, trees, and more. Customizable style guide with first-run onboarding.
Teaches AI coding agents to interact with Obsidian vaults using Flavored Markdown, Bases, JSON Canvas, and CLI. Covers wikilinks, embeds, properties, notes creation, and vault management.
Share bugs, ideas, or general feedback.
Jon Sterling's ocaml-forester builds hypertext forests from .tree files. LaTeX-like but NOT LaTeX.
Everything is a command: backslash-name-braces. Example: backslash p brace-open text brace-close.
Forester requires balanced braces AND balanced parentheses. All of these are parse errors:
The verbatim mechanism uses a start-keyword and stop-keyword pair. Everything between them is literal — no parsing.
CRITICAL: The stop-keyword inside a verbatim block terminates it. There is no escape. You cannot represent the literal stop-keyword inside a verbatim block without splitting.
Workaround for content containing the stop-keyword: split into multiple verbatim spans, emitting the backslash separately via its own span, then "stopverb" as regular text. This is what skill2tree.hy's safe-verbatim function does.
The start-keyword must be followed by whitespace. Otherwise forester parses start-keyword-plus-text as a single unknown command name.
Forester uses hash-brace for math, NOT dollar-sign. Example: hash-brace-open x + y brace-close.
LaTeX math like dollar-sign-backslash-triangleleft-dollar-sign does NOT work in forester. If source markdown has LaTeX math, emit as verbatim.
p, em, strong, code, pre, ul, ol, li, blockquote, subtree, title, taxon, meta, tag, import, transclude, def, author, date.
Double-bracket addr links to another tree.
NOT built-in. Use HTML namespace macros from macros.tree: import macros, then use table, tr, th, td.
Via macro: image command with source argument. Put images in assets directory.
Uses tikzcd via LaTeX. Requires latex binary. If missing, build crashes on those trees but all non-quiver trees parse fine.
forest.toml with trees (list of directories), assets, theme, root, base_url fields.
Build: forester build forest.toml (positional arg, not --config flag).
Bugs fixed during the session that converted 2053 skills to .tree files for bci.horse:
plurigrid/horse on GitHub. CI via nix build with texliveFull. Deploy to Cloudflare Pages.
Tree prefixes: bcf- for BCI Factory content, skill-trees/ for converted skills.
The duplicate captp tree (exists in both trees/ and skill-trees/) is a non-fatal warning.
Transclude new devices in both bcf-0003.tree (The Stack) and bcf-0009.tree (Modalities Index).
The Nix forester build (used for CI/deploy) scopes \import to the subtree it appears in. Sibling subtrees CANNOT see imports from other subtrees.
ALWAYS put \import{macros} at the TOP LEVEL of any tree that uses \table, \image, or other macro-defined commands. Never nest it inside a \subtree{}.
This is the #1 cause of Nix build failures that pass local forester build — the local binary may be more lenient about scoping than the Nix derivation's version.
In forester, import is scoped to the subtree it appears in. If you import macros inside one subtree, sibling subtrees in the same file cannot use those macros. Always put import macros at the file's top level, not inside a subtree, unless you intentionally want to limit scope. The bcf-0036.tree CI failure was caused by import macros being inside one subtree while a sibling subtree used table.
If two .tree files resolve to the same address (filename without .tree), forester logs "skipping duplicate tree at address X". This is a warning, not fatal. In bci.horse, the captp tree exists in both trees/ and skill-trees/. Rename one or remove the duplicate if it matters.
The nix build runs forester with texliveFull. Any parse error or resolution error is fatal and fails the build. The localcharts sub-build has continue-on-error: true due to pre-existing missing-macros issues. The main bci-horse-forest build does NOT have continue-on-error. Deploy goes to Cloudflare Pages.
A 237-line Hy script at ~/worlds/skill2tree.hy that converts SKILL.md files to forester .tree files. Run as: hy skill2tree.hy ~/.claude/skills ./horse/skill-trees
Key functions: parse-frontmatter, convert-body, cvt-inline, escape-forester, has-dangerous-chars?, has-unbalanced?, safe-verbatim, eat-fence, eat-heading, eat-table, eat-list, eat-bquote, eat-para.
The dispatch table uses predicate dispatch (SDF pattern) to select the right block handler for each line type.