BLOCK3 v0.1.0 · live 2026.05.07
Statement Problem Principles Protocol Hierarchy Patterns Modules Security Roadmap Start GitHub →
Alpha · For Builders & Architects

Block3

Architecture for terminal-based AI coding agents.

Terminal-based AI coding agents are changing how software gets built. What's still missing is a shared architecture for how repositories, capabilities, knowledge, workflows and coding agents should evolve together. Block3 is an exploration of that architecture.

Stage
Alpha
early · exploratory · evolving
Audience
Builders & Architects
for people who build
Agents
Terminal-Based
coding agents in the terminal
Repositories
Any
not tied to one host

The tools are powerful. The structure around them isn't given.

Terminal-based coding agents are making it possible to build in a different way. Each new tool is useful on its own — the open question is how the work around them should be structured.

A repository can be modified from a terminal. A workflow can automate part of a process. A dashboard can expose a capability. A document can preserve context. And there are so many brilliant repositories a builder would want to understand and bring into a research project, an MVP, or even production — each one a way to add real value.

Block3 explores how builders and architects can more easily integrate modules — like a repository — into their projects. It doesn't replace those repositories, and it doesn't absorb them natively — it gives them a place inside the architecture itself. It isn't trying to define a universal way of building; it is an Alpha exploration of a practical architecture where repositories, capabilities, knowledge, workflows and coding agents can evolve together.

The work stays close to the project: visible in files, versioned with the repository, understandable by coding agents, and kept under human authority.

Five structural failures.

Building this way breaks down in five concrete ways. Every one of them is a failure of structure, not of tooling.

F-01
Ephemeral memory
The agent has no file of its own. Every session starts cold. Context built up over hours evaporates the moment the terminal closes.
"Yesterday I walked the agent through the architecture for an hour. This morning it's a stranger again."
F-02
Every integration is improvised
Each brilliant repo or tool you want to bring in gets wired by hand, a little differently every time. There's no shared way to make it a real part of the project.
"This repo is exactly what I need. Three days later I'm still gluing it into my setup."
F-03
No reuse
Every new project rebuilds the same scaffolding from scratch. Folder layouts, conventions, the way work is organized around the repo. Nothing transfers.
"New project, same scaffolding, rebuilt from zero. I keep reinventing the same wheel."
F-04
Coordination overhead
Two specialists in two terminals cannot see each other. The operator manually relays state, duplicates context, and frequently forgets which agent owns what.
"Did data tell research about the schema change? Did anyone tell devops the URL moved? Hard to say without re-asking everyone."
F-05
No audit
Decisions made by agents leave no trace outside the chat scrollback. There is no ledger of why a change happened, who approved it, what was reviewed.
"Why did we decide that? Who reviewed it? When? The terminal closed two months ago — the trail closed with it."
Common cause
Five symptoms, one cause — and none of them is about tooling.
Read together, these aren't five problems to solve one by one. They're one, and it's structural. What follows is how Block3 explores an answer.

Four ideas, older than the tooling.

The system rests on four principles. They predate Block3 by centuries — they are how anything coherent gets built, from buildings to contracts to institutions.

Principle I
Architecture
defines possibility
The architecture is what a project openly declares itself to be made of — its repositories, its capabilities, its agents. What the system can do is exactly what the architecture names: nothing hidden, nothing implicit. Growing the project means extending that declaration, in the open.
Artifact · block3.yaml
Principle II
Constraints
define safety
A few shared shapes hold everything together. Messages have one form, tasks have one form, a capability declares what it may touch. Because every piece follows the same conventions, the system stays predictable — and drift has nowhere to creep in. A constraint isn't friction; it is the surface that keeps the whole coherent.
Artifact parser rules + file shapes
Principle III
Roles
define behavior
Every actor has a declared place and scope — not just the agents, but the modules and repositories they bring in. Each is defined in the open: what it's for, what it may do, where it belongs. Nothing acts from the shadows.
Artifact · agents/<name>.md
Principle IV
Validation
defines trust
Trust is what makes an output count. Nothing reaches reality on its own: work is reviewed, and only a human decision moves it across the line. The discipline is simple — nothing self-merges. Authority stays with the person, not the tooling.
Artifact master closes every comm

Small enough to read in one sitting.

The contract isn't an API or a platform — it's a handful of plain files in the repo. Each shape covers one concern: what the project is made of, how an agent is defined, how agents coordinate, how work and context are preserved, and how a capability is declared. The point isn't the files themselves; it's that the whole thing stays legible, versioned, and under your eyes.

block3.yaml

What the project is made of — every agent, named and given a level.

project: <your-project>
workspace: ..
agents:
  master:
    level: platform
    description: "Orchestrates all agents, assigns tasks, reviews work"
  root:
    level: system
    description: "Manages the cockpit infrastructure — server, skills, UI"
  data:
    level: product
    description: "Owns the data layer — ingest, validation, snapshots"
  infra:
    level: platform
    description: "Owns the deploy chain and infrastructure"
    owns: [infra/cloud]

How an agent is defined — its role, scope and rules, in plain markdown. The registry lists them; each one is a file.

# Master Agent

## Role

The orchestrator. Manages agents, assigns tasks, reviews work.

## Rules

- Read sessions/master/tasks.md at the start of each session.
- Every active comm has someone who must act next.
- Only master can close a communication.
# Root Agent

## Role

Tends the cockpit itself — server, skills, UI — not the project it orchestrates.

## Rules

- Operate inside the cockpit only; never touch project code.
- Keep the server backward-compatible when possible.
- Read the relevant files before modifying them.
# Data Agent

## Role

Owns the data layer — ingest, validation, snapshots.

## Rules

- Validation runs before any data is published.
- Snapshots are immutable — never edit a past snapshot in place.
- Outputs go to artifacts/{slug}_{date}.html.
# Infra Agent

## Role

Owns the deploy chain and infrastructure.

## Rules

- No change reaches production without master's review.
- Infrastructure is described in code, never configured by hand.
- Read agents/infra.md before touching the deploy chain.
# <name>

Name it in block3.yaml, drop a role file in
agents/. The cockpit picks it up — that's it.

How agents coordinate — every message is a file; the name says who's writing to whom, the frontmatter who owes the next move.

---
from: master
to: data
status: closed
---

# Kickoff — Agent assignment

Your role is defined in agents/data.md. Outputs go to
artifacts/{slug}_{date}.html.

## Initial tasks

1. Read agents/data.md end-to-end first.
2. Stand up workstream A.
---
from: master
to: root
status: waiting:root
---

# Cockpit — preview auto-refresh

The embedded preview pane doesn't refresh on save.
Can you wire a file-watcher reload?
---
from: data
to: master
status: closed
---

# Snapshot ready

Weekly snapshot validated and published.
artifacts/report_2026-06-18.html — ready for review.

How work is tracked — each agent keeps its own list. Checkbox lines are the entire format.

# Master — Tasks

## In Progress

- [ ] M-013 — Auto-refresh for embedded preview pane

## Backlog

- [ ] M-014 — Per-skill icons in cockpit

## Completed

- [x] M-006 — Cron schedule for periodic agent runs
# Root — Tasks

## In Progress

- [ ] R-021 — Kept-alive iframe workspaces in the shell

## Backlog

- [ ] R-022 — Per-skill icons in the cockpit UI

## Completed

- [x] R-018 — WebSocket file watcher for live reload
# Data — Tasks

## In Progress

- [ ] D-007 — Nightly ingest + validation pass

## Backlog

- [ ] D-008 — Snapshot diff viewer

## Completed

- [x] D-004 — Schema validation on publish
# Infra — Tasks

## In Progress

- [ ] I-012 — Blue/green deploy for the cockpit

## Backlog

- [ ] I-013 — Rotate secrets via the vault

## Completed

- [x] I-009 — Caddy → cockpit reverse proxy
# <name> — Tasks

Same shape as the rest — checkbox lines under In Progress,
Backlog and Completed. Its own list, tracked like everyone else's.

How context survives — each agent leaves a log, so the next session starts warm instead of cold.

# Master — Session 2026-06-25 #1

## Context entering the session

Entered clean: working tree clean, main at 154b1ed, no open comms.

## Work delivered

Reviewed and merged feat/multi-workspace-shell — top tab bar,
kept-alive iframe workspaces.

## Open threads

- Modules concept (Streamlit / n8n as config-driven modules) — deferred.
# Root — Session 2026-06-20 #1

## Context entering the session

Shell branch pushed from the VM; asked to review before merge.

## Work delivered

Reviewed the workspace shell: lazy iframes, localStorage tabs. Verdict: safe.

## Open threads

- Per-skill icons still in the backlog.
# Data — Session 2026-06-18 #1

## Context entering the session

New snapshot requested for the weekly report.

## Work delivered

Ran ingest + validation; published artifacts/report_2026-06-18.html.

## Open threads

- Snapshot diff viewer not started.
# Infra — Session 2026-06-15 #1

## Context entering the session

Cockpit moved behind Caddy on the new VM.

## Work delivered

Wired Caddy → cockpit:3001; only 443 exposed on the NSG.

## Open threads

- Blue/green deploy still manual.
# <name> — Session

Its own log, written by save-session.
Next time, this agent starts warm too.

A capability, declared — where a tool or a repo becomes something the cockpit can use.

---
name: publish
description: Build dist/ and report status
user-invocable: true
allowed-tools: [Bash, Read]
icon: P
agent: data
group: publish
---

You are running a publish pass.
Today is {{today}}.

# ... prompt body ...

master and root ship with every cockpit — Block3's word for a project's installation: these files, the agents they define, and the web dashboard that drives them. data and infra are examples — you define the rest.

And because the contract is just files, it travels. Clone the structure into any repository and the conventions arrive with it — the folder layout, the file shapes, the foundational pair. Starting a new project stops meaning starting over: the scaffolding you kept rebuilding becomes the part you inherit.

Coordination is a role, not an overhead.

Five agents shouldn't mean five conversations. Without structure, every update routes through you — the operator becomes the message bus. Here you talk to master, and master runs the rest: one owner per task, one reviewer per output, one status line naming who moves next. No diagram enforces it; the files do. Watch one loop run.

delegation reports 1 Intent you — one conversation 2 Delegate master writes the comm 3 Spawn devops session starts 4 Work devops owns it · hands back 5 Close master reviews · closes one loop · one owner you hand the problem to master
cockpit · chat with master

One conversation. You talk to master — not to five terminals.

you     The staging deploy has been failing since this morning.
         Can someone own it?

master  On it. That's devops territory — I'll open a thread,
         queue the task, and come back to you once the fix
         is reviewed.

master delegates by writing a file. The status line names who must act next — that line is the hierarchy.

---
from: master
to: devops
status: waiting:devops   ← who owes the next move
---

# Staging deploy — failing since 09:00

deploy.sh exits 1 on staging. Own it end-to-end.
Report in this thread when a fix is ready.

# queued → sessions/devops/tasks.md · - [ ] D-021

master doesn't do the work — it spawns a specialist in its own session, hands it the thread, then stands by.

master  Thread open, task queued. Spawning the owner.

$ block3 spawn devops
 devops session started — own terminal, own context
 kickoff delivered: comms/master-to-devops_..._001.md

$ block3 ps
  SESSION   PTY   STATUS          THREAD
  master    #1    ○ standing by   watching comms/
  devops    #2     running       master-to-devops_..._001

master  I coordinate — I don't code. I wake up when this
         thread returns waiting:master.

Meanwhile, in its own terminal: devops works, replies in the same thread — and hands the loop back. It cannot write closed.

session devops · pty #2 ·  running · master is standing by

$ bash scripts/deploy.sh --target staging
 exit 1 — STAGING_TOKEN missing at env switch

$ git commit -m "fix(deploy): source staging env before token check"

# appends to comms/master-to-devops_2026-07-02_001.md
status: waiting:master   ← a specialist can only hand back

## Fix ready
Root cause: token read before env switch.
Patch on fix/staging-token — over to you.

Only master closes a thread. Review first, then the one word a specialist may never write.

---
from: master
to: devops
status: closed   ← only master writes this
---

## Review — approved

Patch read, tested against staging, merged after
your sign-off. Thread closed.

# sessions/devops/tasks.md
- [x] D-021 — Fix staging deploy failure

What remains when the loop ends — the hierarchy leaves a paper trail by construction.

comms/master-to-devops_2026-07-02_001.md   closed
sessions/devops/tasks.md                   D-021 · [x]
sessions/devops/session_2026-07-02_1.md    written

# who asked, who acted, who approved, when —
# answered by files, not by memory.

This is why the coordination overhead dissolves. The state of the project stops living in the operator's head: who owns what is in the registry, what each agent is doing is in its task file, who owes the next move is a status line on disk. Two specialists never need to see each other — they need the same files.

Authority, here, is a write permission. A specialist can only hand the loop back; the word closed belongs to master, and the merge belongs to you. The relay work is a role, and the role has an owner.

When one project becomes several, the same idea repeats one level up: an optional oversight tier can watch many cockpits at once. A single-project setup never needs to know it exists.

Agents are ephemeral. Files are not.

An agent is born in five files, works in loops, remembers between sessions, and retires when its job is done. Everything it learns outlives it — because none of it lives in the terminal.

01
Born
Five files and a yaml line. master's own role file carries the creation conventions; you supply the intent. The cockpit discovers the newcomer on the next poll — no restart, no registration server.
agents/<name>.md · block3.yaml
02
Works
From its kickoff on, the agent lives inside the loop of § 05: receive a thread, own the work, hand it back — never close it yourself. That is the whole job description.
comms/ · sessions/<name>/tasks.md
03
Remembers
A session ends, the terminal closes, the model forgets — the file doesn't. A session log means the next run starts warm: the context you built stops evaporating at midnight.
sessions/<name>/session_*.md
04
Retires
One line removed from the registry, and the cockpit stops offering the agent. Its role file, threads and logs stay in history — the trail outlives the agent.
block3.yaml · −1 line

Born, replayed — devops at day zero

cockpit · chat with master

      

It fits the project you already have.

No rewrite, no migration, no scaffolding around your code. The cockpit sits in one folder, its agents work on your project, and everything else stays where it was.

You already have a project
your-project/
├── src/                 your code — agents work here
├── package.json
└── block3/              ← the cockpit, in its corner
    ├── block3.yaml      aims the agents at your code
    ├── agents/ · comms/ · sessions/
    └── server/          the dashboard
You're starting from scratch
your-new-project/     ← born from the template
├── src/                 your code grows here
├── README.md
└── block3/              ← the cockpit, same corner
    ├── block3.yaml      aims the agents at your code
    ├── agents/ · comms/ · sessions/
    └── server/          the dashboard

Same structure either way — the agents can't tell the difference.

↓  then choose your crew — three example compositions  ↓
Publishing pipeline
Editorial · scheduled
A content agent writes, devops ships, docs keeps the public references honest.
Composes
+ content + devops + docs + data?
Research pipeline
Data lab · exploratory
data curates, research explores and proposes, a reviewer keeps the bar.
Composes
+ data + research + reviewer + docs?
Ops console
Infrastructure · privileged
infra acts on the topology, a reviewer checks every change — nothing off the record.
Composes
+ infra + reviewer + oversight?

Terminal agents. Web interface.

Everything you've seen so far runs in terminals — but you drive it from the browser. The cockpit is a web interface: one URL, one tab bar, and any tool can become a tab — declared, not glued. Watch our favourite one at work.

block3.local/streamlit
Instances
app-explorer :8501 ○ starting…
test1 :8502 ○ stopped
+ spawn instance
own port · own process · own env
start · stop · restart — per instance
Deploy Explorer localhost:8501
bound agent · terminal · streamlit-live
you
agent edited app.py — Streamlit hot-reloads
Workflows
deploy-alerts active
weekly-report ○ paused
+ new workflow
driven by agents — through n8n's MCP & REST API
deploy-alerts n8n · workflow editor
Webhookdeploy failed
Filterprod only
Retry×3 · backoff
Notifycomms/ · slack
bound agent · terminal · n8n mcp
you
n8n MCP · workflows.update — Retry node inserted docs/workflows/deploy-alerts.md written
Open slots
grafana :3300 ○ declare
jupyter :8888 ○ declare
+ mount anything
a command · a port · a tab — that's the whole ask
Anything that serves, mounts open slot
a repobrowse · review
a web UIany local app
a monitorgrafana · uptime
a notebookjupyter · marimo
a docs siteliving reference
your service
bound agent · terminal
you
installed · configured for the proxy · registered — tab on the next poll

Declared in the registry like any module — a command, a port, an env. Streamlit is pair-programmed live; n8n is driven through its MCP and API; and anything that serves a page can take the next tab. All of it in the browser, behind one URL you own.

Architecture is yours.

Block3 coordinates agents that write code; the discipline of architecture stays with you. The protocol is a coordination contract, not a security model. Endpoints, authentication, network exposure, and data handling stay the operator's responsibility.

Posture · today

The cockpit runs wherever you put it — a laptop, a VM, a sandboxed cloud box. What it ships is open endpoints and no auth layer of its own: the perimeter is the environment you wrap around it. Going public is deliberate work.

Given · by the protocol

What the protocol gives you

  • every decision is a file · every file is in git
  • comms timestamped and routed by convention
  • skills declare their allowed-tools whitelist
  • master closes every thread · nothing dangles
Owned · by you

What you own

  • where the cockpit runs · laptop · VM · cloud sandbox
  • what's exposed · port · hostname · DNS
  • the auth layer · none · basic · mTLS · IdP
  • secret handling · vault · env · never in git
  • data classification · logs vs commits
  • network policy · firewall · reverse proxy · NSG

Going public has a sane shape: one exposed port, a reverse proxy in front, auth at the door — everything else stays internal.

The protocol amplifies discipline. It does not replace it.

Three families of solution.

Block3 is one of three approaches to the multi-agent problem. The other two are SaaS agent platforms and ad-hoc improvisation. The choice is structural, not technical.

Concern Block3 SaaS platforms Ad-hoc agent sessions
State files in your repo vendor servers terminal scrollback
Memory persistent · markdown session or paid tier lost on close
Audit git diff · git log proprietary logs none
Authority human via architecture platform policy implicit
Coordination named protocol orchestrator UI manual relay
Lock-in none · MIT · files high none, but no continuity
Onboarding git clone · run account · billing open terminal
Failure mode cockpit dies, work survives vendor outage = halt closed tab = data loss

The git parallel

Block3 is the git philosophy applied to agent state. Git refused centralized servers; the repository itself was the source of truth, and every clone was complete. Block3 refuses centralized agent platforms; the repo itself is the source of truth, and every cockpit is complete.

From discipline to generative platform.

Block3 today is a discipline you configure — agent files, skill files, comm files, all hand-shaped. The trajectory is toward a platform that extends itself: a clickable skill library, natural-language skill generation, composable workflows that stay legible as files. Items marked drive the generative axis.

Horizon · Now
In flight
The contract solidifies.
  • PROTOCOL.md
    Lift the contract out of server.js into an explicit specification. Today it lives implicitly in the parser; lifting it makes drift visible.
  • /check-contract
    A skill that walks any cockpit and verifies block3.yaml, comms format, tasks parser, skill frontmatter. A health check for any cockpit.
  • Starter skills
    Canonical seeds shipped with every clone: /save-session, /scaffold-agent, /check-contract. A fresh clone is useful out of the box.
  • Module-tabs — live
    The cockpit mounts services as tabs. n8n and Streamlit ship today; see §08 Modules. The contract stays files; the surface grew tabs.
Horizon · Soon
The platform activates
Extension via natural language.
  • /scaffold-skill
    Describe a skill in plain language; master generates the full SKILL.md — frontmatter, prompt body, allowed-tools whitelist. The spawn loop extended from agents to skills.
  • Skill library
    Clickable catalogue inside the dashboard. Browse by agent, tag, or use case. One-click install adds the skill file and registers the button.
  • MCP transport
    Comms via MCP in addition to filesystem — typed, async, pluggable. Files stay the audit trail; MCP becomes the live channel.
  • Auth surface
    Pluggable authentication for cockpits that go public. Direct lever on §09 Security: open endpoints become a deliberate choice, not the only option.
Horizon · Later
The ecosystem emerges
Self-extending, federated, audited.
  • Workflow composition
    The n8n engine is mounted (§08); the open work is wiring skills through it — "when /deploy finishes, trigger /audit on reviewer" — expressed as files inside the contract.
  • Skill marketplace
    Community catalogue with provenance. Every install carries its lineage — author, reviewer, cockpits running it. Files-over-databases makes the supply chain auditable natively.
  • Decision provenance
    Click any artifact, see the comm that asked for it and the prompt that sparked it. Archeology by design — something no SaaS platform exposes.
  • Cross-cockpit comms
    Cross-cockpit messaging via MCP. Multiple Block3 systems coordinate through the same protocol without a central broker.
  • Holding + n8n bridge
    With n8n mounted per cockpit, the remaining work is the bridge — triggers, schedules, and webhooks routed across cockpits on the same VM from the optional Holding tier.

The contract changes when a clone discovers something the protocol should have specified. Items move left to right as they ship; their column is a calendar, not a queue.

→ Begin

Clone it. Make it yours.

The framework is the contract. Everything else is your voice. One command brings up a working cockpit inside your project.

terminal$ git clone git@github.com:sonixz/block3-cockpit.git block3
$ cd block3/server && npm install
$ node server.js --port 3000