This document proposes a lightweight runtime layer for the rebar methodology.
It is intentionally:
- optional
- incrementally adoptable
- local-first
- tool-agnostic
You do NOT need to adopt this to use the methodology.
However, if adopted, this turns the system from:
contract-driven documentation
into:
contract-driven multi-agent execution
Agents are not just prompts.
They are:
long-lived processes with scoped memory, filesystem boundaries, and a query interface
We introduce a single, universal interface for agent-to-agent and human-to-agent interaction:
ask <agent> "<question>"Examples:
ask product "do we require offline access?"
ask architect "what contract governs sync retries?"
ask englead "what is the current blocker?"
askis to agents whatgrepis to code.
- Simple
- Ubiquitous
- Abstracts the implementation
- Stable over time
Agents SHOULD use ask instead of:
- direct file inspection of other agents
- implicit assumptions about other roles
- free-form chat
See ASK-SHELL.md for the full shell interface specification.
Each agent runs as a local process.
Example:
./start-agents.shLaunches:
- product agent
- architect agent
- eng lead agent
- engineer agent(s)
Each agent:
- Cold Start Quad
- its own memory files
- relevant shared artifacts
- memory updates
- artifacts
- decisions
- responses to
ask
- exclusively via
ask
agents/
product/
AGENT.md # role definition, context loading order, permissions
memory.md # distilled current state
memory.log.md # append-only history
inbox/ # incoming questions
outbox/ # outgoing responses
run.sh # agent loop entrypoint
architect/
AGENT.md
memory.md
memory.log.md
inbox/
outbox/
run.sh
englead/
AGENT.md
memory.md
memory.log.md
inbox/
outbox/
run.sh
engineer/
AGENT.md
memory.md
memory.log.md
inbox/
outbox/
run.sh
shared/
artifacts/ # shared documents, briefs, summaries
decisions/ # recorded architectural decisions
messages/ # event logAgents and humans ONLY interact via:
ask <agent> "<question>"
ask up <agent>ask— synchronous queryask up— bring agent online to process requests
The system MAY use:
- filesystem (v1)
- NATS / Redis (future)
- other transports
This is hidden from agents.
Internally, messages use JSON. This is NOT exposed to agents.
Example:
{
"id": "ask-20260317-142211-001",
"from": "englead",
"to": "architect",
"type": "question",
"timestamp": "2026-03-17T14:22:11Z",
"body": "Do we have a requirement for offline access?",
"context": {
"artifacts": ["README.md"]
}
}Response:
{
"id": "ask-20260317-142211-001",
"type": "answer",
"answer": "yes",
"rationale": "...",
"refs": ["bdd/offline.feature"],
"followup": null,
"actions": ["created TODO in agents/product/TODO.md"]
}Important: JSON is an implementation detail. The ask interface MUST
remain stable regardless of format.
Each agent runs:
loop:
check for new questions
if question:
load relevant context
invoke reasoning (Claude / other)
update memory
produce answer
emit response
Each agent maintains:
memory.md # distilled current state
memory.log.md # append-only historyAgents:
- append to log
- periodically summarize into memory.md
This prevents context explosion.
| Resource | Product | Architect | Eng Lead | Engineer |
|---|---|---|---|---|
| BDD | R/W | R | R | R |
| Contracts | R | R/W | R | R |
| Code | — | R | R/W | R/W |
| Tests | — | R | R/W | R/W |
| Memory | own | own | own | own |
Agents SHOULD prefer:
updating artifacts + emitting events
over:
conversational coordination
BAD:
- "hey engineer change retry logic"
GOOD:
- update contract
- emit artifact update
- engineer reacts
.snapshots/
2026-03-17/
agents/
shared/Enables:
- replay
- branching
- debugging
Append-only:
shared/messages/events.jsonlEvery message:
- recorded
- never mutated
- introduce
askCLI - filesystem-based messaging
- per-agent directories
- simple agent loops
- structured memory updates
- action tracking (
actionsfield) - better routing / escalation
- replace transport (NATS / Redis)
- add async
ask - add retries, timeouts
- snapshotting / branching
- DAG-based artifact graph
- voting / arbitration
They persist and evolve.
Not the model context.
Everything else is implementation detail.
Not free-form chat.
Agents rebuild context each loop.
Never delete history.
- role-based reasoning
- explicit knowledge boundaries
- inspectable agent decisions
- reproducible workflows
- scalable multi-agent systems
This proposal does NOT replace:
- contracts
- BDD
- Cold Start Quad
It extends them into:
runtime behavior
This system is intentionally:
- simple at the edges (
ask) - flexible under the hood
- inspectable at every layer
Start small. Evolve as needed. Do not overbuild upfront.