WardleyToGo

A Go library and tools for creating and rendering Wardley Maps.
A map is a directed graph of components, each with a position on a 100x100 coordinate system representing visibility (Y) and evolution (X). The entry point of this API is the Map structure.

The project maps itself using WTG2 — read the full strategic analysis or see the source.
Quickstart
WTG2 is a human-friendly DSL for describing Wardley Maps. wtg2svg reads WTG2 from stdin and writes SVG to stdout. See the full grammar for details.
Get wtg2svg
Download a binary from GitHub Releases, or install with Go:
go install github.com/owulveryck/wardleyToGo/cmd/wtg2svg@latest
Usage
Create a file hello.wtg2:
title: My First Map
anchor User : III.5
Platform : II.5
Data : III.8 (buy)
User -> Platform -> Data
Then render it:
wtg2svg < hello.wtg2 > map.svg
Try it without installing
Use the online playground to write and render WTG2 maps directly in your browser.
Generate maps with AI
The file wtg2/skill.md is a ready-to-use prompt that teaches any LLM (ChatGPT, Claude, Gemini, etc.) to generate valid WTG2 maps. Copy-paste it as a system prompt or into a conversation, then ask the model to create a Wardley Map for your domain — it will output WTG2 that you can render with wtg2svg or the playground.
WTG2: the Wardley Map DSL
WTG2 is a human-friendly domain-specific language for designing Wardley Maps. The full grammar is in wtg2/grammar.bnf.
Example
title: Plateforme de Navigation -- Strategie 2026
stages: Genesis, Custom, Product, Commodity
anchor User
anchor Partner
Application : III.5
Routing Engine : II.7 !! >> III.5 {
type: build
color: #3498DB
note: "Key differentiator"
}
Map Data : III.1 (buy)
Cloud Infra : IV.3 (buy)
pipeline Routing Engine {
Classic Algo : III.5
Predictive AI : II.3
}
User -> Application -> Routing Engine -> Map Data
Application -> Cloud Infra
Routing Engine -> Cloud Infra
note "Outsource candidate Q4" on Cloud Infra
warning "Single vendor dependency" on Map Data
signal accelerating on Predictive AI
Language features
| Feature | Syntax |
|---|
| Metadata | title:, date:, author:, scope:, question: |
| Custom stages | stages: Genesis, Custom, Product, Commodity |
| Anchors | anchor Name |
| Components | Name : III.5 or component Name : III.5 |
| Types | (build), (buy), (outsource) |
| Block config | Name : II.7 { type: build, color: #3498DB, note: "..." } |
| Evolution | II.7 >> III.5 (with optional inertia !!) |
| Pipelines | pipeline Name { Member1 : III.5 } |
| Edges | A -> B -> C (chains supported) |
| Annotated edges | A -[label text]-> B |
| Submaps | submap Name : III.6 |
| Groups | group Name { ... } (visual only) |
| Annotations | note "text" on Name, warning "text" on Name |
| Signals | signal accelerating|stagnating|declining on Name |
| Comments | // line or /* block */ |
Position notation
Positions use roman numerals (I-IV) for evolution phases, with a decimal for sub-positioning:
I.0 = far left (genesis), IV.9 = far right (commodity)
- Each phase spans 25% of the axis
- Without decimal (e.g.
III), the center of the phase is used
Using the library
Creating a map programmatically
First, create a component type:
type dummyComponent struct {
id int64
position image.Point
}
func (d *dummyComponent) GetPosition() image.Point { return d.position }
func (d *dummyComponent) String() string { return strconv.FormatInt(d.id, 10) }
func (d *dummyComponent) ID() int64 { return d.id }
Then a collaboration structure (an edge):
type dummyCollaboration struct{ simple.Edge }
func (d *dummyCollaboration) GetType() wardleyToGo.EdgeType { return 0 }
func (d *dummyCollaboration) Draw(dst draw.Image, r image.Rectangle, src image.Image, sp image.Point) {
coordsF := utils.CalcCoords(d.F.(wardleyToGo.Component).GetPosition(), r)
coordsT := utils.CalcCoords(d.T.(wardleyToGo.Component).GetPosition(), r)
drawing.Line(dst, coordsF.X, coordsF.Y, coordsT.X, coordsT.Y, color.Gray{Y: 128}, [2]int{})
}
And finally create the map: