Protocol for Composable Computation
LEGO isn't about bricks. It's about the interface.
The Problem
Software is disposable.
Every library breaks. Every API versions. Every framework dies. The code you wrote five years ago doesn't run anymore. The app you built last year needs seventeen patches to boot.
Meanwhile, a plastic brick manufactured in Denmark in 1958 still connects to one made in Shenzhen this morning.
Same click. Same fit. Same result.
That's not a toy. That's a protocol.
What LEGO Actually Is
LEGO isn't about bricks. It's about the interface.
8mm stud spacing.
9.6mm tube diameter.
3.2mm plate height.
Unchanged for 65 years.
This is a 65-year-old API with perfect backward compatibility. Nothing in software comes close.
When two bricks connect, physics enforces the contract:
- I am compatible with you
- Our interface matches
- We now share state
- Separating us requires intentional force
No handshake. No negotiation. No version mismatch. The geometry is the protocol.
The Log Already Exists
Every LEGO set ever made is a replayable event log.
Set #8880 from 1994: 1,343 steps, 1,453 parts. Fully reconstructable by anyone, anywhere, 30 years later. That instruction booklet isn't documentation. It's source code.
Official sets since 1958: ~18,000+ logs
Fan designs on Rebrickable: ~50,000+ logs
BrickLink custom models: Hundreds of thousands
All using:
- Same part vocabulary (content-addressed by part number)
- Same connection protocol (stud geometry)
- Same instruction format (step → brick → position → connect)
The infrastructure for reconstructable, composable systems was solved before computers were in homes.
The Vibe Coding Problem
Today's generative coding works like this:
Prompt → LLM → Complete Artifact → Save to file → Forget
New prompt → New Artifact → New file → Garage fills up → Entropy wins
Every generation is a birth from nothing. No lineage. No parts. No reconstruction path.
Ask an LLM to "make it more blue" — it doesn't modify, it regenerates. The old version and new version share no connective tissue. There's no diff. There's no history. There's no way back.
You either save everything (you need a bigger garage) or lose everything (amnesia).
Flock
Flock is a protocol for composable computation.
It has two primitives:
BRICKS (immutable, content-addressed functions)
LOG (append-only history of everything)
That's it.
Bricks
A brick is a function with a hash.
brick_FETCH = hash("url → response")
brick_PARSE = hash("text → object")
brick_FILTER = hash("list, predicate → list")
These hashes are eternal. Like LEGO molds.
The 2x4 mold from the sixties still produces the same brick. The FETCH function hash from 202x will still produce the same behavior.
There are two types:
Core bricks transform data.
in → [TRANSFORM] → out
Context bricks color meaning. They attach to the side of core bricks without interrupting flow.
[FETCH]──[PARSE]──[FILTER]──[SEND]
│ │
[user:alice] [target:lamp]
Context bricks are like decorative LEGO pieces. The slopes, the tiles, the printed parts. They don't bear load. They make it yours.
Same core sequence, different context, different outcome:
Alice: [source: her_api] [target: her_lamp]
Bob: [source: his_api] [target: his_speaker]
Same bricks. Same logic. Different meaning.
Log
The log records everything.
PLACE brick enters sequence
CONNECT brick links to another
ATTACH context brick attaches
REMOVE brick leaves
The log isn't documentation. The log is the program.
Replay the log, get the same result. Every time. Anyone. Anywhere.
No save files. The log is the source of truth. No versioning hell. History is append-only. No "works on my machine." The log is complete.
Sequencing is External
Who decides the order of bricks?
Flock doesn't care.
Could be:
- Human hands arranging
- LLM reasoning
- Another Flock bundle emitting events
- Sensor input
- Random
Doesn't matter. Flock just logs what happened.
The sequencer is outside the protocol. The log is inside.
This means any agent — human, AI, machine, another program — speaks the same language. They all emit composition events. The log treats them identically.
Context is Separable
Context attaches. Context doesn't interrupt.
This matters because:
Context can be ephemeral. This run, this user, this moment.
Context can be persistent. Always this database, always this output target.
Context can be swapped. Same program, different personality.
Separating context from logic means you can change who it's for without changing what it does.
Bundles
A bundle is just a log.
flock bundle
└── log[] (bricks, connections, context, everything)
Bricks are referenced by hash. Sequence is implicit in order. Context is events like everything else.
Bundles can message other bundles. Output is just another event.
Bundle A runs → output → message to Bundle B
Bundle B runs → output → message to Bundle C
Programs talking to programs. Sets building sets. Logs all the way down.
What This Solves
| Problem | Flock |
|---|---|
| LLM forgets what it built | Log remembers everything |
| Can't reuse parts of generations | Bricks are atomic, referenceable |
| Versioning is a nightmare | History is append-only |
| Collaboration conflicts | Events are ordered, merge is replay |
| "Where did I put that?" | Content-addressed, searchable |
| Agent lock-in | Any agent can compose |
| Context explosion | Context is separate, swappable |
What Flock Doesn't Care About
Output format. Could be a website. Could be IoT. Could be a message to another bundle. Could be nothing. Output is just context.
Who's building. Human, LLM, robot, script. Sequencing is external. Flock just logs.
What it means. Same bricks, different context, different narrative. Meaning is projection.
The Principle
A child in 1975 and a child in 2025
can both build Set #928 (Galaxy Explorer)
from the same instructions
and get the same result.
50 years apart.
Different continents.
No software updates.
No breaking changes.
No "works on my machine."
That's the protocol we want for computation.
Flock in One Sentence
Bricks are functions. Log is memory. Sequencing is external. Context is attachable.
Everything else is emergent.
What Needs Building
1. Brick spec
Core: in[] → out[]
Context: key → value (attaches, doesn't transform)
Both: hash, type, schema
2. Log event schema
PLACE: {brick_hash, position}
CONNECT: {from, to}
ATTACH: {context_hash, to}
REMOVE: {position}
3. Bundle format
Portable, shareable, replayable
Just the log
4. Starter vocabulary
~20-30 core bricks (FETCH, PARSE, FILTER, MAP, SEND...)
~10-15 context bricks (USER, TARGET, SOURCE, ENV...)
5. Runtime
Something that replays logs and executes bricks
The Bet
LEGO proved that a simple, stable interface creates infinite possibility.
Same studs. Same tubes. Infinite builds.
Flock bets that computation wants the same thing:
Same bricks. Same log format. Infinite programs.
No frameworks. No dependencies. No breaking changes.
Just bricks, connected, logged, replayable, forever.