Lightning Jar - Web Studio Lightning Jar Wordmark
Skip to main content
Technologies

barkup

LLM Data Format & Editing Toolkit · Open Source (MIT)

barkup is a config-driven grammar codec that lets humans and LLM agents author the same typed tree as HTML instead of JSON. You declare a grammar of node types and typed attributes and get build, parse, format, and validate with hard guarantees: byte-for-byte id preservation, declared-only attribute coercion, property-tested round-trip identity, and structured errors at the boundary.

Since its first release the codec has grown into a full LLM editing toolkit, and every addition was gated on a pre-registered study in our open benchmark series before it shipped: id-anchored patches that address nodes by id and never by position (0.2), focused views that show the model only the part of the tree an edit concerns (0.3), content search that grounds a plain-language request to exact target nodes (0.4), and selectNodes, a deterministic structural selector that hands fan-out edits to code instead of the model (0.5).

We built barkup at Lightning Jar and extracted it from Replicator, our AI document platform, where it powers the way an assistant reads and writes template layouts. It has zero runtime dependencies and is published on npm as @kevinpeckham/barkup under the MIT license. We reach for it whenever a model needs to author or edit structured data reliably, because HTML is a format the model has deep pre-trained fluency in.

Visit barkup →

How We Use It

  • Handing structured tree data to an LLM as HTML instead of JSON
  • Reliable id-anchored edits from an agent, at a fraction of whole-tree cost
  • Grounding plain-language edit requests to exact target nodes with one search call
  • Splitting fan-out edits so code enumerates the targets and the model edits one node at a time

Related reading: Stable IDs Are All You Need: Seven Studies on Letting LLMs Edit Trees

AI / LLM

Why this matters: Controversial, misunderstood, and overhyped though they may be, AI and LLMs are transforming industries and society. Used carefully and responsibly, they are still a valuable tool for innovation and progress. We design and deploy LLM-powered features with a focus on safety, performance, and maintainability, leveraging managed model providers and an SDK-first approach for rapid iteration. Preferred defaults: Vercel AI SDK + AI Gateway for multi-model orchestration; Anthropic and OpenAI as primary model providers.