@cordfuse/politik 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/EXECUTION.md +90 -85
- package/POLITIK-ARCHITECTURE.md +111 -176
- package/PROTOCOLS.md +120 -289
- package/README.md +130 -177
- package/RESEARCH.md +142 -436
- package/RUNTIME.md +253 -261
- package/docs/adr/0001-chamber-transport.md +2 -0
- package/docs/adr/0002-charter-schema.md +2 -0
- package/docs/adr/0003-state-json-schema.md +2 -0
- package/docs/adr/0004-motion-enactment.md +2 -0
- package/docs/adr/0005-hansard-format.md +2 -0
- package/docs/adr/0006-protocol-behavioral-enforcement.md +2 -0
- package/docs/adr/0007-protocol-mechanics.md +2 -0
- package/docs/adr/0008-session-storage.md +2 -0
- package/docs/adr/0009-match-primitive.md +2 -0
- package/docs/adr/0010-operator-interface.md +2 -0
- package/docs/adr/0011-shared-sessions.md +2 -0
- package/docs/adr/0012-plain-vocabulary.md +68 -0
- package/docs/adr/0013-rule-defined-protocols.md +89 -0
- package/package.json +1 -1
- package/protocols/CONTRIBUTING.md +47 -87
- package/protocols/adversarial-review.yml +19 -0
- package/protocols/elimination-rounds.yml +18 -0
- package/protocols/majority-vote.yml +18 -0
- package/protocols/panel-review.yml +19 -0
- package/protocols/single-decider.yml +18 -0
- package/protocols/unanimous-vote.yml +17 -0
- package/src/actors.ts +124 -100
- package/src/agents.ts +64 -23
- package/src/ballot.ts +747 -0
- package/src/canon.ts +23 -10
- package/src/capability.ts +16 -99
- package/src/charter.ts +41 -34
- package/src/cli.ts +541 -480
- package/src/{prorogation.ts → closing.ts} +43 -43
- package/src/conflict.ts +14 -14
- package/src/containment.ts +11 -11
- package/src/doctor.ts +1 -1
- package/src/election.ts +4 -4
- package/src/envelope.ts +3 -3
- package/src/escalation.ts +44 -44
- package/src/fault.ts +8 -8
- package/src/federation.ts +14 -14
- package/src/git.ts +21 -18
- package/src/heartbeat.ts +32 -32
- package/src/index.ts +5 -5
- package/src/init.ts +66 -65
- package/src/integrity.ts +30 -30
- package/src/ledger.ts +3 -3
- package/src/{hansard.ts → log.ts} +20 -20
- package/src/{crisis.ts → misconduct.ts} +70 -70
- package/src/operator.ts +5 -5
- package/src/pending.ts +9 -9
- package/src/projection.ts +30 -30
- package/src/protocol-sdk.ts +12 -121
- package/src/protocol.ts +8 -78
- package/src/providers/github.ts +12 -12
- package/src/quorum.ts +7 -7
- package/src/remote.ts +1 -1
- package/src/runner.ts +134 -55
- package/src/scm.ts +14 -14
- package/src/spawn.ts +4 -4
- package/src/standings.ts +13 -13
- package/src/state.ts +6 -6
- package/src/templates/session.ts +448 -0
- package/src/tournament.ts +20 -20
- package/src/transport.ts +4 -4
- package/src/tree.ts +16 -16
- package/protocols/adversarial-collaboration.yml +0 -28
- package/protocols/corporate.yml +0 -35
- package/protocols/elimination-tournament.yml +0 -41
- package/protocols/emergency-response-ics.yml +0 -27
- package/protocols/jury-deliberation.yml +0 -32
- package/protocols/monarchy.yml +0 -31
- package/protocols/parliamentary.yml +0 -66
- package/protocols/peer-review.yml +0 -44
- package/protocols/republic.yml +0 -36
- package/protocols/socialism-collective.yml +0 -31
- package/protocols/solo.yml +0 -32
- package/src/division.ts +0 -609
- package/src/templates/parliamentary.ts +0 -580
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
**Status:** Accepted — ruled by Steve Krisjanovs. CANON amended.
|
|
6
6
|
|
|
7
|
+
> **v0.6.0:** terminology superseded by [ADR-0012](0012-plain-vocabulary.md) — this record keeps its original wording (Hansard, Division, Assent, Speaker, Writ Drop and so on) as history.
|
|
8
|
+
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
## Context
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
**Status:** Accepted
|
|
6
6
|
|
|
7
|
+
> **v0.6.0:** terminology superseded by [ADR-0012](0012-plain-vocabulary.md) — this record keeps its original wording (Hansard, Division, Assent, Speaker, Writ Drop and so on) as history. Its `mode` field and protocol library are superseded by ADR-0013.
|
|
8
|
+
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
## Context
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
**Status:** Accepted
|
|
6
6
|
|
|
7
|
+
> **v0.6.0:** terminology superseded by [ADR-0012](0012-plain-vocabulary.md) — this record keeps its original wording (Hansard, Division, Assent, Speaker, Writ Drop and so on) as history. The exit and resolution rules are extended by ADR-0013 (`exit: owner`, `resolution: owner | both-sides`, removal votes).
|
|
8
|
+
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
## Context
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
**Attribution:** Steve Krisjanovs, Cordfuse
|
|
4
4
|
|
|
5
5
|
**Status:** Accepted — **fully built.** Phase 1 (monorepo placement, auto-detected),
|
|
6
|
+
|
|
7
|
+
> **v0.6.0:** terminology superseded by [ADR-0012](0012-plain-vocabulary.md) — this record keeps its original wording (Hansard, Division, Assent, Speaker, Writ Drop and so on) as history.
|
|
6
8
|
phase 2 (federation as local traversal — `politik registry`/`cascade`), and phase 3
|
|
7
9
|
(explicit mode: `init --standalone` overrides the default) all implemented.
|
|
8
10
|
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
**Status:** Accepted — built (`src/tournament.ts`, `src/standings.ts`, `politik pair` / `politik match`).
|
|
6
6
|
|
|
7
|
+
> **v0.6.0:** terminology superseded by [ADR-0012](0012-plain-vocabulary.md) — this record keeps its original wording (Hansard, Division, Assent, Speaker, Writ Drop and so on) as history.
|
|
8
|
+
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
## Context
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
**Status:** Accepted — built (`src/operator.ts`, `src/pending.ts`; `politik new`, `pending` / `confirm` / `reject`, `protocol list`, `status --json`; provenance trailers; sealed instruction files).
|
|
6
6
|
|
|
7
|
+
> **v0.6.0:** terminology superseded by [ADR-0012](0012-plain-vocabulary.md) — this record keeps its original wording (Hansard, Division, Assent, Speaker, Writ Drop and so on) as history.
|
|
8
|
+
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
## Context
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
**Status:** Accepted — built (`src/remote.ts`; `politik remote` / `join` / `sync`, `init --remote`; sync-and-retry around acts; shared pending refs; `Politik-Operator` trailer; `signed_confirmations`). Stacked on ADR-0010.
|
|
6
6
|
|
|
7
|
+
> **v0.6.0:** terminology superseded by [ADR-0012](0012-plain-vocabulary.md) — this record keeps its original wording (Hansard, Division, Assent, Speaker, Writ Drop and so on) as history.
|
|
8
|
+
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
## Context
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# ADR-0012 — One Plain Vocabulary
|
|
2
|
+
|
|
3
|
+
**Attribution:** Steve Krisjanovs, Cordfuse
|
|
4
|
+
|
|
5
|
+
**Status:** Accepted — built (v0.6.0). Supersedes the vocabulary-translation half of
|
|
6
|
+
POLITIK-ARCHITECTURE.md § Protocols and every ADR that names a parliamentary term.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Context
|
|
11
|
+
|
|
12
|
+
Politik's engine, CLI, help text and documents spoke parliamentary English —
|
|
13
|
+
Hansard, Division, Assent, Prorogue, Speaker, Writ Drop, Standing Orders, Point of
|
|
14
|
+
Order, Order Paper — whichever protocol a session ran, and parliamentary was the
|
|
15
|
+
default protocol. A developer could not read it. POLITIK-ARCHITECTURE.md claimed
|
|
16
|
+
the opposite: that every CANON term was "immediately readable by a developer with
|
|
17
|
+
no political science background".
|
|
18
|
+
|
|
19
|
+
Protocols translated part of that vocabulary into their own industry words through
|
|
20
|
+
`roles:` and `primitives:` maps. Two problems followed:
|
|
21
|
+
|
|
22
|
+
1. **The translation was partial.** Any term a protocol left unmapped fell back to
|
|
23
|
+
the CANON term, which was itself parliamentary.
|
|
24
|
+
2. **Vocabulary contaminates the research.** Protocol words reach the agents'
|
|
25
|
+
prompts. An agent told to grant "Royal Assent" may behave differently from one
|
|
26
|
+
told to mark work "Accepted as Done". A cross-protocol comparison would then
|
|
27
|
+
measure wording as well as governance.
|
|
28
|
+
|
|
29
|
+
Nobody uses Politik yet, so a breaking change costs nothing.
|
|
30
|
+
|
|
31
|
+
## Decision
|
|
32
|
+
|
|
33
|
+
**Every protocol speaks one plain vocabulary. A protocol is its rules, nothing else.**
|
|
34
|
+
|
|
35
|
+
| Was | Now |
|
|
36
|
+
|---|---|
|
|
37
|
+
| Hansard, `HANSARD.md`, `politik hansard` | session log, `LOG.md`, `politik log` |
|
|
38
|
+
| Division, `DIVISION_CALLED`, `division call/vote/tally/break` | ballot, `BALLOT_OPENED`, `vote open/cast/tally/break` |
|
|
39
|
+
| AYE | YES |
|
|
40
|
+
| Assent, `ASSENT_GRANTED`, `session.assent` | enact, `MOTION_ENACTED`, `session.enact`, `politik enact` |
|
|
41
|
+
| Prorogue, `PROROGUED`, `politik prorogue` | close, `CLOSED`, `politik close` |
|
|
42
|
+
| `SESSION_TIMEOUT` (written on every close) | `SESSION_CLOSED` |
|
|
43
|
+
| Speaker, `--speaker`, `speaker_confirmation` | owner, `--owner`, `owner_confirmation` |
|
|
44
|
+
| Writ Drop, `WRIT_DROP`, `WRIT.md`, `writ drop:` commits | session opening, `SESSION_OPENED`, `OPENING.md`, `open:` commits |
|
|
45
|
+
| Constitutional crisis, `crisis file/check/review` | misconduct, `misconduct report/status/rule` |
|
|
46
|
+
| Point of Order, `POINT_OF_ORDER` | escalation, `ESCALATION` |
|
|
47
|
+
| Standing Orders | Charter |
|
|
48
|
+
| sitting | session |
|
|
49
|
+
| Order Paper, `ORDER-PAPER.md` | agenda, `AGENDA.md` |
|
|
50
|
+
|
|
51
|
+
- Protocol manifests lose `roles:` and `primitives:`; `roleTerm` and `term` are gone.
|
|
52
|
+
Roles are AUTHORITY, DELEGATE, OPERATOR, MEMBER and OBSERVER everywhere.
|
|
53
|
+
- `misconduct report` takes no `--against`: the accused is always the owner, read
|
|
54
|
+
from the session opening.
|
|
55
|
+
- The scaffold templates (`src/templates/session.ts`) are plain prose.
|
|
56
|
+
- `politik integrity` findings are `bad-faith` / `good-faith`, not vice / virtue.
|
|
57
|
+
|
|
58
|
+
**No backwards compatibility.** The old commands, flags, record types, state values
|
|
59
|
+
and file names are removed outright, with no aliases.
|
|
60
|
+
|
|
61
|
+
## Consequences
|
|
62
|
+
|
|
63
|
+
- A developer reads every command, file and log entry without a glossary.
|
|
64
|
+
- Cross-protocol studies vary the rules and nothing else.
|
|
65
|
+
- Earlier ADRs are history: they keep their parliamentary terms and carry a
|
|
66
|
+
"terminology superseded by ADR-0012" note.
|
|
67
|
+
- POLITIK-ARCHITECTURE.md is amended in place, by this ADR, for CANON terms and the
|
|
68
|
+
false readability claim.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# ADR-0013 — Rule-Defined Protocols
|
|
2
|
+
|
|
3
|
+
**Attribution:** Steve Krisjanovs, Cordfuse
|
|
4
|
+
|
|
5
|
+
**Status:** Accepted — built (v0.6.0). Supersedes the protocol library in
|
|
6
|
+
PROTOCOLS.md, the `mode` field of ADR-0006, and the capability dimensions in
|
|
7
|
+
POLITIK-ARCHITECTURE.md § Actor Capability Profile.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Context
|
|
12
|
+
|
|
13
|
+
With vocabulary gone (ADR-0012), a protocol is only its rule settings. Compared on
|
|
14
|
+
those, the twelve shipped protocols collapsed: parliamentary, republic and solo
|
|
15
|
+
were identical; monarchy, socialism-collective, emergency-response-ics and
|
|
16
|
+
corporate were the default plus squash merges. An engine audit found more:
|
|
17
|
+
|
|
18
|
+
- `mode` (constitutional / authoritarian / darwinist) had no runtime effect — only
|
|
19
|
+
the SDK linter read it. "Authoritarian" protocols still voted.
|
|
20
|
+
- `exit: division` and `exit: none` did nothing.
|
|
21
|
+
- `domain_veto` never reached the Charter: the template hardcoded `[]`.
|
|
22
|
+
- `immutable_charter` was looked up from the installed protocol file by name, so
|
|
23
|
+
renaming a protocol file silently unlocked every session using it.
|
|
24
|
+
- No test proved any protocol behaved differently from the default.
|
|
25
|
+
- Scrum is a work process (sprints, backlog, estimation), not a decision rule; a
|
|
26
|
+
thin version would be a strawman in the research.
|
|
27
|
+
|
|
28
|
+
## Decision
|
|
29
|
+
|
|
30
|
+
**A protocol ships only if its rules are enforced and a test proves it behaves
|
|
31
|
+
differently from every other protocol.**
|
|
32
|
+
|
|
33
|
+
### The protocol set
|
|
34
|
+
|
|
35
|
+
| Protocol | resolution | exit | termination | appeals | Charter locked | domain veto |
|
|
36
|
+
|---|---|---|---|---|---|---|
|
|
37
|
+
| `majority-vote` (default) | majority | vote | objective | yes | no | — |
|
|
38
|
+
| `unanimous-vote` | unanimity | none | verdict | yes | no | — |
|
|
39
|
+
| `single-decider` | owner | owner | objective | no | no | — |
|
|
40
|
+
| `elimination-rounds` | majority | elimination | last-standing | no | yes | — |
|
|
41
|
+
| `panel-review` | majority | vote | verdict | yes | no | OPERATOR |
|
|
42
|
+
| `adversarial-review` | both-sides | vote | objective | yes | yes | — |
|
|
43
|
+
|
|
44
|
+
Cut: parliamentary, republic, solo, monarchy, socialism-collective,
|
|
45
|
+
emergency-response-ics, corporate, scrum. "One human" is `--quorum 1`.
|
|
46
|
+
|
|
47
|
+
### Rules
|
|
48
|
+
|
|
49
|
+
- **Resolution** (how a vote decides): `majority`, `supermajority`, `unanimity`,
|
|
50
|
+
and two new rules. `owner`: no vote can be opened; the owner decides by enacting
|
|
51
|
+
a motion directly. `both-sides`: OPERATOR actors propose and DELEGATE actors
|
|
52
|
+
oppose; a motion carries only if each side votes and carries it by a majority of
|
|
53
|
+
its own votes.
|
|
54
|
+
- **Exit** (who can remove an actor): `owner` — the owner alone; `vote` — only a
|
|
55
|
+
carried removal vote (`politik vote open --removes <handle>`), executed by the
|
|
56
|
+
engine on the carry and never counted as a verdict; `elimination` — only the cull
|
|
57
|
+
after each vote; `none` — nobody. Leaving voluntarily is always allowed.
|
|
58
|
+
- **A standing veto rejects the motion** at tally. A vetoed tie is not a deadlock.
|
|
59
|
+
- **A tie deadlocks only under majority or supermajority.**
|
|
60
|
+
- **Breaking a tie** triggers the same effects as a tally: cull, removal vote,
|
|
61
|
+
termination.
|
|
62
|
+
- **The Charter lock and domain veto live in the Charter**
|
|
63
|
+
(`session.immutable_charter`, `domain_veto`), copied from the protocol at
|
|
64
|
+
scaffold. The lock is recorded on the SESSION_OPENED entry and enforced from the
|
|
65
|
+
log, so editing CHARTER.md cannot unlock it.
|
|
66
|
+
- **`mode` and `no_record` are removed** from the protocol format, with the
|
|
67
|
+
`ephemeral` record mode.
|
|
68
|
+
- **Distinctness test:** `tests/protocol-rules.test.ts` runs one scenario under
|
|
69
|
+
every file in `protocols/` and fails if any two produce the same result.
|
|
70
|
+
|
|
71
|
+
### Actor capability
|
|
72
|
+
|
|
73
|
+
Archetypes and soft skills are removed: neither gated seating nor reached an agent.
|
|
74
|
+
Three dimensions remain — role tier, hard skills, model and knowledge cutoff —
|
|
75
|
+
plus mandate.
|
|
76
|
+
|
|
77
|
+
### Agent turns
|
|
78
|
+
|
|
79
|
+
- An agent is told its role's verbs (`ROLE_VERBS`), plus VETO where the Charter
|
|
80
|
+
gives its role a domain veto, minus ESCALATE where appeals are off.
|
|
81
|
+
- A turn that touched only the record is `AGENT_TURN`, not `MOTION_TABLED`.
|
|
82
|
+
|
|
83
|
+
## Consequences
|
|
84
|
+
|
|
85
|
+
- Every shipped protocol behaves differently, verified with real agents
|
|
86
|
+
(claude-code, codex-cli) and by the distinctness test.
|
|
87
|
+
- Under the default protocol the owner can no longer remove an actor without a
|
|
88
|
+
vote. `elimination-rounds` no longer allows appeals.
|
|
89
|
+
- Adding a protocol means adding rules the engine enforces, not words.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cordfuse/politik",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Politik — a governed multi-agent framework built on git. The SCM repository is the session: charter, record, state, and invite in one.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -2,129 +2,89 @@
|
|
|
2
2
|
|
|
3
3
|
**Attribution:** Steve Krisjanovs, Cordfuse
|
|
4
4
|
|
|
5
|
-
A protocol is a
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
A protocol is a set of rules the engine enforces (ADR-0013). It has no vocabulary
|
|
6
|
+
of its own — every protocol speaks CANON (ADR-0012). So a new protocol is not a new
|
|
7
|
+
name for an existing rule set: it must decide, remove actors, or end sessions in a
|
|
8
|
+
way no shipped protocol does.
|
|
8
9
|
|
|
9
10
|
---
|
|
10
11
|
|
|
11
|
-
##
|
|
12
|
+
## The bar
|
|
12
13
|
|
|
13
|
-
**
|
|
14
|
-
|
|
14
|
+
**A new protocol must behave differently from every shipped protocol.**
|
|
15
|
+
`tests/protocol-rules.test.ts` runs one scenario under every file in `protocols/`
|
|
16
|
+
and fails if any two produce the same result. A protocol that only renames an
|
|
17
|
+
existing one fails CI.
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
next reader. The linter treats it as an error for that reason.
|
|
21
|
-
|
|
22
|
-
Parliamentary is protocol #1, not a privileged mode. Every domain is equally a
|
|
23
|
-
protocol.
|
|
19
|
+
If the behaviour you want needs a rule the engine does not have yet — a sealed
|
|
20
|
+
ballot, a rotating chair, a quorum that changes mid-session — that is an engine
|
|
21
|
+
change: open an issue, then add the rule with its enforcement and tests before the
|
|
22
|
+
protocol that uses it.
|
|
24
23
|
|
|
25
24
|
---
|
|
26
25
|
|
|
27
26
|
## Quick start
|
|
28
27
|
|
|
29
28
|
```bash
|
|
30
|
-
politik protocol new my-protocol --
|
|
31
|
-
# edit protocols/my-protocol.yml
|
|
29
|
+
politik protocol new my-protocol --out protocols
|
|
32
30
|
politik protocol lint protocols/my-protocol.yml
|
|
33
31
|
```
|
|
34
32
|
|
|
35
|
-
The
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
| `immutable_charter` | Standing Orders cannot be amended mid-session. |
|
|
51
|
-
| `record_mode` | `distributed` guarantees per-commit attribution, which forbids `merge_strategy: squash` in any Charter using this protocol (ADR-0002 rule 5). |
|
|
52
|
-
|
|
53
|
-
Set them from how your domain actually behaves, not from what sounds
|
|
54
|
-
authoritative. A Darwinist tournament genuinely has no appeals; a corporate
|
|
55
|
-
board genuinely does.
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## Modes
|
|
60
|
-
|
|
61
|
-
| Mode | Description | Examples |
|
|
62
|
-
|---|---|---|
|
|
63
|
-
| `constitutional` | Checks and balances, escalation paths, human override | Parliamentary, Legal, Corporate, Peer Review |
|
|
64
|
-
| `authoritarian` | Single authority, no Division, escalation routes back to the top | Military, Red/Blue Team |
|
|
65
|
-
| `darwinist` | No AUTHORITY during the session, pure statute, no appeals | Battle Royale, Elimination Tournament |
|
|
66
|
-
| `ephemeral` | No RECORD by design | Intelligence, Jury Deliberation |
|
|
67
|
-
| `immutable` | Standing Orders cannot be amended mid-session | Religion, Aviation, Emergency Services |
|
|
33
|
+
The skeleton:
|
|
34
|
+
|
|
35
|
+
```yaml
|
|
36
|
+
protocol:
|
|
37
|
+
name: my-protocol
|
|
38
|
+
version: 0.1.0
|
|
39
|
+
record_mode: anchored # distributed | anchored — distributed forbids squash
|
|
40
|
+
domain_veto: [] # roles that may veto a motion
|
|
41
|
+
no_escalation: false # true = no appeals
|
|
42
|
+
immutable_charter: false # true = Charter locked when the session opens
|
|
43
|
+
mechanics:
|
|
44
|
+
resolution: majority # majority | supermajority | unanimity | owner | both-sides
|
|
45
|
+
exit: vote # owner | vote | elimination | none
|
|
46
|
+
termination: objective # objective | last-standing | verdict
|
|
47
|
+
```
|
|
68
48
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
49
|
+
What each setting does: [PROTOCOLS.md](../PROTOCOLS.md) § The rules a protocol
|
|
50
|
+
sets. `politik scaffold --protocol <name>` copies these into the Charter, and the
|
|
51
|
+
engine enforces the Charter's copy.
|
|
72
52
|
|
|
73
53
|
---
|
|
74
54
|
|
|
75
|
-
##
|
|
55
|
+
## What the linter and parser check
|
|
76
56
|
|
|
77
57
|
**Errors** — the protocol will not load:
|
|
78
58
|
|
|
79
|
-
- `name` must be lower-kebab-case
|
|
80
|
-
-
|
|
81
|
-
- every
|
|
82
|
-
- two roles may not share one term — a human could not tell which acted
|
|
83
|
-
- `record_mode: ephemeral` requires `no_record: true`
|
|
59
|
+
- `name` is required and must be lower-kebab-case (it is a filename and a Charter key)
|
|
60
|
+
- `record_mode` must be `distributed` or `anchored`
|
|
61
|
+
- every `domain_veto` entry must be a CANON role
|
|
84
62
|
|
|
85
63
|
**Warnings** — likely mistakes, not fatal:
|
|
86
64
|
|
|
87
65
|
- a non-semver `version`
|
|
88
|
-
-
|
|
89
|
-
- flags inconsistent with the declared mode
|
|
90
|
-
- `AUTHORITY` in `domain_veto` — AUTHORITY already holds VETO, so this adds
|
|
91
|
-
nothing mechanically. Kept in `red-blue-team.yml` anyway, where it documents
|
|
92
|
-
*what* the Referee vetoes.
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## Power inversions
|
|
97
|
-
|
|
98
|
-
Some protocols give a lower-trust role authority over a specific domain: the
|
|
99
|
-
Jury (OBSERVER) holds the final Division in a Criminal Trial; a Statistical
|
|
100
|
-
Reviewer can reject on methodology alone. Declare these in `domain_veto`. They
|
|
101
|
-
are never inferred from the role hierarchy — the whole point is that they
|
|
102
|
-
contradict it.
|
|
66
|
+
- `AUTHORITY` in `domain_veto` — the owner already holds VETO, so it adds nothing
|
|
103
67
|
|
|
104
68
|
---
|
|
105
69
|
|
|
106
70
|
## Two constraints that are not yours to change
|
|
107
71
|
|
|
108
|
-
**AUTHORITY is always human.** No protocol may change this. A Charter declaring
|
|
109
|
-
|
|
110
|
-
nominal — a Battle Royale host who pre-bakes rules and then leaves — map the
|
|
111
|
-
role and say so in the term (`Host — pre-session only`).
|
|
72
|
+
**AUTHORITY is always human.** No protocol may change this. A Charter declaring a
|
|
73
|
+
machine as AUTHORITY fails when the session opens.
|
|
112
74
|
|
|
113
|
-
**Record types
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
which is what makes cross-protocol research possible at all.
|
|
75
|
+
**One vocabulary.** Record types, commands and role names are the same under every
|
|
76
|
+
protocol. That is what makes cross-protocol research possible: the rules are the
|
|
77
|
+
only variable.
|
|
117
78
|
|
|
118
79
|
---
|
|
119
80
|
|
|
120
81
|
## Checklist
|
|
121
82
|
|
|
122
83
|
- [ ] `politik protocol lint` passes with no errors
|
|
123
|
-
- [ ] every CANON role is mapped
|
|
124
|
-
- [ ] the four flags match how the domain actually behaves
|
|
125
|
-
- [ ] any warning you chose to keep is explained in a comment
|
|
126
84
|
- [ ] the file is named `<name>.yml` and `name:` matches it
|
|
127
|
-
- [ ]
|
|
85
|
+
- [ ] the distinctness test passes with your protocol added
|
|
86
|
+
- [ ] the header comment says how the protocol decides, in plain words, and what
|
|
87
|
+
real-world process it resembles
|
|
88
|
+
- [ ] `PROTOCOLS.md` and the exact-set test in `tests/protocol-sdk.test.ts` list it
|
|
128
89
|
|
|
129
|
-
Open a PR against `protocols/`.
|
|
130
|
-
recognisably to someone from that domain is the bar.
|
|
90
|
+
Open a PR against `protocols/`.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# adversarial-review — two opposing sides.
|
|
2
|
+
#
|
|
3
|
+
# OPERATOR actors propose; DELEGATE actors oppose. A motion carries only when
|
|
4
|
+
# both sides vote and each side carries it by a majority of its own votes —
|
|
5
|
+
# neither side can win by outnumbering the other. The Charter is locked once the
|
|
6
|
+
# session opens, so neither side can change the rules after seeing a result.
|
|
7
|
+
#
|
|
8
|
+
# Attribution: Steve Krisjanovs, Cordfuse
|
|
9
|
+
protocol:
|
|
10
|
+
name: adversarial-review
|
|
11
|
+
version: 1.0.0
|
|
12
|
+
record_mode: distributed
|
|
13
|
+
domain_veto: []
|
|
14
|
+
no_escalation: false
|
|
15
|
+
immutable_charter: true
|
|
16
|
+
mechanics:
|
|
17
|
+
resolution: both-sides
|
|
18
|
+
exit: vote
|
|
19
|
+
termination: objective
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# elimination-rounds — knocked out each round, last one standing.
|
|
2
|
+
#
|
|
3
|
+
# The losing side of every vote is eliminated. The session closes when one
|
|
4
|
+
# actor remains. The Charter is locked once the session opens, and there are no
|
|
5
|
+
# appeals: a result stands.
|
|
6
|
+
#
|
|
7
|
+
# Attribution: Steve Krisjanovs, Cordfuse
|
|
8
|
+
protocol:
|
|
9
|
+
name: elimination-rounds
|
|
10
|
+
version: 1.0.0
|
|
11
|
+
record_mode: anchored
|
|
12
|
+
domain_veto: []
|
|
13
|
+
no_escalation: true
|
|
14
|
+
immutable_charter: true
|
|
15
|
+
mechanics:
|
|
16
|
+
resolution: majority
|
|
17
|
+
exit: elimination
|
|
18
|
+
termination: last-standing
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# majority-vote — the default protocol.
|
|
2
|
+
#
|
|
3
|
+
# A simple majority carries a motion; the owner enacts it. Escalations are
|
|
4
|
+
# allowed and the Charter can be amended. Every other protocol is described by
|
|
5
|
+
# how it differs from this one.
|
|
6
|
+
#
|
|
7
|
+
# Attribution: Steve Krisjanovs, Cordfuse
|
|
8
|
+
protocol:
|
|
9
|
+
name: majority-vote
|
|
10
|
+
version: 1.0.0
|
|
11
|
+
record_mode: distributed
|
|
12
|
+
domain_veto: []
|
|
13
|
+
no_escalation: false
|
|
14
|
+
immutable_charter: false
|
|
15
|
+
mechanics:
|
|
16
|
+
resolution: majority
|
|
17
|
+
exit: vote
|
|
18
|
+
termination: objective
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# panel-review — a panel judges the work.
|
|
2
|
+
#
|
|
3
|
+
# A majority of the panel carries a motion. Panel members (OPERATOR) hold a
|
|
4
|
+
# veto, members can be voted off, and the session closes at the first carried
|
|
5
|
+
# motion: the panel has reached its verdict.
|
|
6
|
+
#
|
|
7
|
+
# Attribution: Steve Krisjanovs, Cordfuse
|
|
8
|
+
protocol:
|
|
9
|
+
name: panel-review
|
|
10
|
+
version: 1.0.0
|
|
11
|
+
record_mode: anchored
|
|
12
|
+
domain_veto:
|
|
13
|
+
- OPERATOR
|
|
14
|
+
no_escalation: false
|
|
15
|
+
immutable_charter: false
|
|
16
|
+
mechanics:
|
|
17
|
+
resolution: majority
|
|
18
|
+
exit: vote
|
|
19
|
+
termination: verdict
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# single-decider — the owner decides.
|
|
2
|
+
#
|
|
3
|
+
# No vote is held: the owner decides by enacting a motion directly, removes
|
|
4
|
+
# actors alone, and there are no appeals. This is the Product Owner model: one
|
|
5
|
+
# person decides what ships.
|
|
6
|
+
#
|
|
7
|
+
# Attribution: Steve Krisjanovs, Cordfuse
|
|
8
|
+
protocol:
|
|
9
|
+
name: single-decider
|
|
10
|
+
version: 1.0.0
|
|
11
|
+
record_mode: anchored
|
|
12
|
+
domain_veto: []
|
|
13
|
+
no_escalation: true
|
|
14
|
+
immutable_charter: false
|
|
15
|
+
mechanics:
|
|
16
|
+
resolution: owner
|
|
17
|
+
exit: owner
|
|
18
|
+
termination: objective
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# unanimous-vote — everyone must agree.
|
|
2
|
+
#
|
|
3
|
+
# A motion carries only if every vote cast is YES. No actor can be removed, and
|
|
4
|
+
# the session closes as soon as a motion carries: a verdict has been reached.
|
|
5
|
+
#
|
|
6
|
+
# Attribution: Steve Krisjanovs, Cordfuse
|
|
7
|
+
protocol:
|
|
8
|
+
name: unanimous-vote
|
|
9
|
+
version: 1.0.0
|
|
10
|
+
record_mode: distributed
|
|
11
|
+
domain_veto: []
|
|
12
|
+
no_escalation: false
|
|
13
|
+
immutable_charter: false
|
|
14
|
+
mechanics:
|
|
15
|
+
resolution: unanimity
|
|
16
|
+
exit: none
|
|
17
|
+
termination: verdict
|