Model-driven software development

Model once, run anywhere

Describe your application and business logic once as a model — independent of technology and platform. The platform may change; the model stays. HiveVM provides the tools and projects to run it wherever it needs to go.

$ git clone https://github.com/hivevm/waggle

Calc.waggle
// LL(k) grammar — generates a parser + AST
grammar Calc;

expr   : term (('+' | '-') term)* ;
term   : factor (('*' | '/') factor)* ;
factor : NUMBER | '(' expr ')' ;

NUMBER : [0-9]+ ('.' [0-9]+)? ;
WS     : [ \t\r\n]+ -> skip ;
terminal

$ waggle generate Calc.waggle --target java,cpp

Parsing grammar Calc.waggle…

✓ LL(k) analysis complete (k=2)

✓ Parser → java/CalcParser.java

✓ AST    → cpp/CalcNode.hpp

→ 2 targets built in 0.4s

  watching grammar for changes

Generates and builds across your stack

  • Java
  • C++
  • Rust
  • Dev Container
  • VSCode
  • CommonMark

Toolkit

From model to solution

Each tool turns a model into something concrete — a grammar into a parser, Markdown into a manual, a specification into a project — so your repository stays focused on intent, not on one architecture, technology or deployment.

01 — Parser Generator (Waggle)

LL(k) parser generator for context-free grammars. Generates a parser and a full AST (Abstract Syntax Tree) for Java, C++ & Rust from a single .waggle grammar.

exprtermtermNUMBER'+'factor'*'GitHub

02 — Manual Generator

Manual generator for collections of Markdown documents. Supports the CommonMark syntax to turn a folder of files into one coherent manual.

intro.mdrendered config.mdrendered draft.mdskipped
GitHub

03 — Agent Template (NUC)

A starting point for building software with coding agents inside a ready-to-use Dev Container. Work is driven by a written specification and ADRs, with AGENTS.md as the single source of truth for every agent.

GitHub

Multiple targets, one model

The same grammar emits idiomatic Java, C++ and Rust — keep one source of truth and let HiveVM project it onto each language.

VSCode server launchers

Server launchers wire your generated tooling straight into VSCode, so language features light up as soon as the model changes.

Developer experience

Definitions that read like the thing they describe

Grammars, documents and specifications are plain declarative files. Describe the intent once and let HiveVM generate the parser, the manual — and let coding agents grow the project from it.

  • One LL(k) grammar generates a parser and AST for Java, C++ and Rust
  • Plain CommonMark files compile into a single navigable manual
  • One AGENTS.md governs every coding agent, spec- and ADR-driven
HiveVM
grammar Calc;

expr   : term (('+' | '-') term)* ;
term   : factor (('*' | '/') factor)* ;
factor : NUMBER | '(' expr ')' ;

NUMBER : [0-9]+ ;

Parser generation

One grammar the whole hive can read

Waggle is an LL(k) parser generator for context-free grammars. From a single .waggle grammar it generates a recursive-descent parser and a full AST for Java, C++ and Rust — and the generated parsers carry no Waggle runtime dependency.

Waggle started as a fork of JavaCC 7.0.13 and keeps its proven model: LL(k) recursive descent, a token manager with lexical states, and syntactic and semantic lookahead. What changed is the surface — a simplified, EBNF-like syntax, and tree building written right in the grammar with #Node annotations, so there is no separate JJTree step.

Why “Waggle”? Honeybees talk in the waggle dance: a forager encodes the direction and distance of a food source in a figure-eight run, and the other bees in the hive parse the dance to find it. A grammar that others read — which is exactly what a parser generator is about.

waggle Calc.waggle generating
lextokens
TOKEN · SKIP · lexical states
parseLL(k)
LL(1) by default · LL(k) where needed
treeAST
#Node annotations · same grammar
emittargets
Java · C++ · Rust
INFO  grammar.read Calc.waggle
INFO  lexer.ok 6 tokens · 1 lexical state
WARN  choice.conflict Statement · resolved with k=2
INFO  tree.ok 5 node classes + visitor
INFO  emit.ok java · cpp · rust

Agentic development

A nucleus every project grows from

NUC is a starting point for building software with coding agents inside a ready-to-use Dev Container. Work is driven by a written specification and Architecture Decision Records — with AGENTS.md as the single source of truth every agent reads.

Why “NUC”? In beekeeping, a nucleus colony — a NUC — is the small starter colony a full hive grows from. Same idea here: a compact, ready-made nucleus that a complete project grows out of.

agent :nuc:run running
specread
docs/SPECIFICATION.md
decideADR
docs/adr/ · proposed → accepted
buildagent
Claude Code · Mistral Vibe · Copilot
reviewhuman
small, reviewable changes
INFO  devcontainer.up image=ready
INFO  agent.read AGENTS.md + SPECIFICATION.md
WARN  adr.required architecture-relevant change
INFO  adr.proposed 0007-... awaiting review
INFO  commit.ok Implements ADR-0007

Open source

Built in the open, on GitHub

Every HiveVM tool lives in its own public repository. Read the source, file issues or build from it — the whole toolkit is open.

hivevm/waggle

LL(k) parser generator for context-free grammars. Generates parser and AST for Java, C++ & Rust from .waggle grammars.

Java BSD-3-Clause
Open repository
hivevm/doc

Manual generator for collections of Markdown documents. Supports the CommonMark syntax.

Java BSD-3-Clause
Open repository
hivevm/nuc

A starting point for building software with coding agents inside a ready-to-use Dev Container. Specification & ADR driven.

Shell MIT
Open repository

About the name

Why “HiveVM”

HiveVM is a cross-platform, model-driven application platform in Rust — applications are described as models, and the platform runs them. The name captures both halves of that idea.

Hive

A tribute to the hexagonal architecture at the platform's core. Hexagons are among the most stable, efficient structures in nature — the same property that makes the design resilient and composable. And like a hive, the system is built from many small parts working together toward one coherent whole.

VM

A virtual machine: the runtime that executes applications described as models. Just as a classic VM runs bytecode, HiveVM runs models — the model is what gets executed.

Model your next solution

Start from a grammar, a folder of Markdown or a project specification. HiveVM turns the model into a parser, a manual or a running application — whatever the architecture, technology or deployment.