Using Petri nets as a formal language for LLM-assisted development(github.com)
github.com
Using Petri nets as a formal language for LLM-assisted development
https://github.com/pflow-xyz/go-pflow
2 comments
What this actually do?:
You define a Petri net, simulate it with ODEs, and the structure becomes a scaffold for LLM-generated code. The net is the spec that both humans and LLMs can reason about.
I use Claude Code with a skill file that enforces: sketch topology → validate with simulation → extend monotonically → never delete, only grow. The discipline works with how LLMs operate.
You define a Petri net, simulate it with ODEs, and the structure becomes a scaffold for LLM-generated code. The net is the spec that both humans and LLMs can reason about.
I use Claude Code with a skill file that enforces: sketch topology → validate with simulation → extend monotonically → never delete, only grow. The discipline works with how LLMs operate.
Why Petri nets? Visual (humans can reason about them), mathematical (ODEs, invariants), executable, and compositional. LLMs can manipulate the structure without losing semantic meaning.