# Coordination templates

> This section covers the two templates for coordination between parties, surface protocol] and [decision protocol].

Page: PAG · Templates
Canonical: https://banes-lab.com/pag/templates#templates-coordination

This section is stop 88 of 102 in the learning route. Previous: [01 - Core templates](https://banes-lab.com/pag/templates/templates-core.md). Next: [03 - Planning templates](https://banes-lab.com/pag/templates/templates-planning.md). It builds on [01 - Core templates](https://banes-lab.com/pag/templates/templates-core.md), [06 - Orchestration invariants](https://banes-lab.com/pag/orchestration/orchestration-invariants.md).

This section covers the two templates for coordination between parties, [B1·a surface protocol](https://banes-lab.com/pag/templates#templates-coordination-panel-a) and [B1·b decision protocol](https://banes-lab.com/pag/templates#templates-coordination-panel-b). They share one transport and have opposite lifetimes, as described in [the board and the venue](https://banes-lab.com/disciplined-methodology/collaborate/the-board-and-the-venue.md) and shown in [B1·d one transport](https://banes-lab.com/pag/templates#templates-coordination-panel-d). Each is a template record whose slots are drawn from closed sets, and it is raised into an instance by resolving them. [B1·c two lifetimes](https://banes-lab.com/pag/templates#templates-coordination-panel-c) shows why the fields of one never transfer to the other.

### Surface and decision

Each collaboration describes its [shared surfaces](https://banes-lab.com/pag/orchestration/shared-surfaces.md) in its own words. A surface is described as append-only, a mechanism implements the word faithfully, and a settled argument is deleted rather than archived because no removal axis was ever declared. A description in words has no closed set a mechanism can join on, so each party implements the words it read.

For this reason coordination is raised from templates whose slots are the surfaces, their lifetimes and their closures. The protocol is raised from a template whose values come from closed sets, rather than from a description each collaboration writes fresh. In practice, a surface protocol is raised by resolving its key and its three lifetime values from their closed sets, and its rules are kept as written, so every party reads the surface whole, writes inside its own record, derives every state and extracts before removal. A decision protocol is raised by stating the question and an exit condition the tree can decide, a successor is declared by name where one exists, and the closure is absorption rather than agreement. Where the adapter cannot resolve a named slot, the absence is declared rather than filled.

To check this, name for each shared surface its three lifetime values and the party that may remove from it. A surface with a one-word lifetime has an undeclared axis, and the mechanism that implements the word acts on the axis it never saw. A decision protocol needs more than one party, because a decision with one party is a choice.

The surface protocol puts the lifetime first, because every later rule depends on it, and its three axes are the ones described in shared surfaces. The rules that follow are one writer per record, a state that is a function over the edges, and a removal that refuses without a reference naming where the extraction landed. The check decides presence and never fidelity, because an extraction is a compression and a text comparison would fail every correct one.

The decision protocol declares its own exit condition, because without one the decision halts indefinitely. A position without evidence is an opinion, so every position carries evidence, and its author states what the proposal makes worse, because a position that cannot be attacked converges by exhaustion rather than by agreement. What convergence is, and why the archive follows absorption, is described in the board and the venue.

B1·a surface protocol

```text
template:
type:        PROTOCOL
title:       <how parties share one surface>
slots:
- name: {SURFACE_KEY}          required: true    kind: string
- name: {RETENTION}            required: true    enum: [<current-truth>, <accumulating>, <discharged>]
- name: {MUTABILITY}           required: true    enum: [<owner-rewritable>, <append-only>, <frozen>]
- name: {REMOVAL}              required: true    enum: [<handler>, <author>, <producer>, <none>]
constraints:
- declaration_required
- one_writer_per_record
- state_derived_never_written
- removal_declares_its_extraction
body: |
THIS PROTOCOL DEFINES how parties share {SURFACE_KEY}

DECLARE lifetime: object
SET lifetime = {retention: {RETENTION}, mutability: {MUTABILITY}, removal: {REMOVAL}}

# RULE 1: one writer per record
WHEN <party> writes {SURFACE_KEY}:
READ_RESOURCE {SURFACE_KEY} whole INTO <current>
EDIT {SURFACE_KEY} inside <party>.<record> only

# RULE 2: state is derived
WHEN a state is asked: RETURN state_of(<item>)     # a function over the edges, never a field

# RULE 3: removal declares its extraction
WHEN <item> is absorbed AND <party> IN <item>.<to>:
EXTRACT_FACTS <item>.<durable half> INTO <the one home history has>
REMOVE <item> BY <item>.<id>
```

B1·b decision protocol

```text
template:
type:        PROTOCOL
title:       <a decision that holds the build until it converges>
slots:
- name: {QUESTION}             required: true    kind: string
- name: {EXIT_CONDITION}       required: true    kind: string     # checkable against the tree, never judged
- name: {SUCCESSOR}            required: false   kind: string     # declared by name, never derived from a number
constraints:
- declaration_required
- exit_condition_stated
- positions_accumulate_until_convergence
- converged_is_absorbed_before_archived
body: |
THIS PROTOCOL DEFINES how {QUESTION} is decided

# a position carries evidence or it is an opinion · it stands until read and signed
DECLARE position: object
SET position = {claim: <one line>, axis: <the design question>, evidence: <an observation the other parties can reproduce>, proposes: <the mechanism>, costs: <what it makes harder, by its own author>, contradicts: <a position id, or nothing>, signed: <the author, or nothing>}

FUNCTION converged(venue):
RETURN every_party_stated_its_needs(venue) AND every_need_is_empty(venue) AND every_position_signed(venue) AND {EXIT_CONDITION}

# NODE 10 — TERMINATE   [evaluative · termination · set-theory · yields: ter-stop boolean]
CONTRACT:
input:        the venue + the distribution its outcome implies
transform:    converge → distribute the implied work as a plan with an owner per item → land it → move the venue whole into the archive
constraints:  convergence certifies agreement and nothing about the tree; leaving the active tree and leaving the repository are different operations
output:       the outcome in the surviving documents, the argument in the archive
handoff:      absorbed (yields: boolean)
```

B1·c two lifetimes

```pag
# the same transport, opposite lifetimes · the fields belong to the concern and never transfer
<a coordination surface>   carries STATE     who owns what, what is directed at whom      swept · a resolved item is deleted
<an argument>              carries POSITIONS where each party stands, what it still needs   accumulates · moved whole when absorbed

# a position written onto the coordination surface is accumulation on the surface built to be swept
# a state written into an argument is ownership described in a document about a decision
```

B1·d one transport

```mermaid
flowchart TB
surface["Surface protocol · one writer per record, derived state, lifetime on three axes, extraction before removal"]
venue["Decision protocol · positions with evidence, an exit condition, convergence then absorption then the archive"]
transport["One transport · fenced records, allocated ids, compare-and-swap"]
surface -.-> transport
venue -.-> transport
```

## Links to

- [The board and the venue](https://banes-lab.com/disciplined-methodology/collaborate/the-board-and-the-venue.md)
- [Shared surfaces](https://banes-lab.com/pag/orchestration/shared-surfaces.md)

## Linked from

- [The board and the venue](https://banes-lab.com/disciplined-methodology/collaborate/the-board-and-the-venue.md)
