@cordfuse/politik 0.5.0 → 0.6.1

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.
Files changed (82) hide show
  1. package/EXECUTION.md +86 -83
  2. package/POLITIK-ARCHITECTURE.md +111 -176
  3. package/PROTOCOLS.md +120 -325
  4. package/README.md +135 -188
  5. package/RESEARCH.md +142 -438
  6. package/RUNTIME.md +254 -262
  7. package/docs/adr/0001-chamber-transport.md +2 -0
  8. package/docs/adr/0002-charter-schema.md +2 -0
  9. package/docs/adr/0003-state-json-schema.md +2 -0
  10. package/docs/adr/0004-motion-enactment.md +2 -0
  11. package/docs/adr/0005-hansard-format.md +2 -0
  12. package/docs/adr/0006-protocol-behavioral-enforcement.md +2 -0
  13. package/docs/adr/0007-protocol-mechanics.md +2 -0
  14. package/docs/adr/0008-session-storage.md +2 -0
  15. package/docs/adr/0009-match-primitive.md +2 -0
  16. package/docs/adr/0010-operator-interface.md +2 -0
  17. package/docs/adr/0011-shared-sessions.md +2 -0
  18. package/docs/adr/0012-plain-vocabulary.md +68 -0
  19. package/docs/adr/0013-rule-defined-protocols.md +90 -0
  20. package/package.json +1 -1
  21. package/protocols/CONTRIBUTING.md +47 -87
  22. package/protocols/adversarial-review.yml +19 -0
  23. package/protocols/elimination-rounds.yml +18 -0
  24. package/protocols/majority-vote.yml +18 -0
  25. package/protocols/panel-review.yml +19 -0
  26. package/protocols/single-decider.yml +18 -0
  27. package/protocols/unanimous-vote.yml +17 -0
  28. package/src/actors.ts +127 -103
  29. package/src/agents.ts +39 -27
  30. package/src/ballot.ts +747 -0
  31. package/src/canon.ts +23 -10
  32. package/src/capability.ts +16 -99
  33. package/src/charter.ts +41 -34
  34. package/src/cli.ts +535 -480
  35. package/src/{prorogation.ts → closing.ts} +43 -43
  36. package/src/conflict.ts +14 -14
  37. package/src/containment.ts +11 -11
  38. package/src/doctor.ts +1 -1
  39. package/src/election.ts +4 -4
  40. package/src/envelope.ts +3 -3
  41. package/src/escalation.ts +45 -45
  42. package/src/fault.ts +8 -8
  43. package/src/federation.ts +14 -14
  44. package/src/git.ts +17 -17
  45. package/src/heartbeat.ts +32 -32
  46. package/src/index.ts +5 -5
  47. package/src/init.ts +66 -65
  48. package/src/integrity.ts +30 -30
  49. package/src/ledger.ts +3 -3
  50. package/src/{hansard.ts → log.ts} +20 -20
  51. package/src/{crisis.ts → misconduct.ts} +70 -70
  52. package/src/operator.ts +5 -5
  53. package/src/pending.ts +9 -9
  54. package/src/projection.ts +30 -30
  55. package/src/protocol-sdk.ts +12 -121
  56. package/src/protocol.ts +8 -78
  57. package/src/providers/github.ts +12 -12
  58. package/src/quorum.ts +7 -7
  59. package/src/remote.ts +1 -1
  60. package/src/runner.ts +73 -56
  61. package/src/scm.ts +14 -14
  62. package/src/spawn.ts +4 -4
  63. package/src/standings.ts +13 -13
  64. package/src/state.ts +6 -6
  65. package/src/templates/session.ts +448 -0
  66. package/src/tournament.ts +20 -20
  67. package/src/transport.ts +4 -4
  68. package/src/tree.ts +16 -16
  69. package/protocols/adversarial-collaboration.yml +0 -28
  70. package/protocols/corporate.yml +0 -35
  71. package/protocols/elimination-tournament.yml +0 -41
  72. package/protocols/emergency-response-ics.yml +0 -27
  73. package/protocols/jury-deliberation.yml +0 -32
  74. package/protocols/monarchy.yml +0 -31
  75. package/protocols/parliamentary.yml +0 -66
  76. package/protocols/peer-review.yml +0 -44
  77. package/protocols/republic.yml +0 -36
  78. package/protocols/scrum.yml +0 -87
  79. package/protocols/socialism-collective.yml +0 -31
  80. package/protocols/solo.yml +0 -32
  81. package/src/division.ts +0 -609
  82. package/src/templates/parliamentary.ts +0 -581
package/README.md CHANGED
@@ -5,58 +5,50 @@
5
5
 
6
6
  **A governed multi-agent framework built on git.**
7
7
 
8
- Pluggable governance protocols. Stateless agent workers. Git as the session substrate. Immutable Hansard. Append-only LEDGER. Human constitutional authority. Bring your own AI harness.
8
+ Teams of AI agents — and the people working with them — make decisions under a
9
+ written rulebook. Every decision is recorded, attributed and costed. A human owner
10
+ has the final say. The git repository is the session.
9
11
 
10
12
  ---
11
13
 
12
- ## The Problem
14
+ ## The problem
13
15
 
14
16
  Multi-agent AI coordination today is:
15
17
 
16
- - **Ungoverned** — agents act without rules, quorum, or accountability
17
- - **Unrecorded** — no immutable audit trail of who decided what and why
18
- - **Uncosted** — no per-decision attribution of time, tokens, or dollars
19
- - **Single-machine** — no framework for agents across machines, orgs, or human teams
20
- - **Human-absent** — humans monitor, not govern
21
-
22
- The result: agents that produce outputs nobody can fully trust, audit, or reproduce.
23
-
24
- ---
25
-
26
- ## What Politik Solves
27
-
28
- Politik is a **governed multi-agent operating system** where:
29
-
30
- - A **human** is the constitutional authority — present but not operational
31
- - The human governs through **whichever AI harness they already use** — Claude Code, Codex, agy, opencode — and still confirms every permanent act themselves
32
- - **Agents** are stateless CLI workers that spawn, do work, and dispose
33
- - A **git repository IS the session** — charter, record, state, and invite in one
34
- - **Pluggable governance protocols** translate the framework to any industry vocabulary
35
- - **A governed tree** — sessions nest into an Org → Team → Ticket hierarchy in one repository; `politik registry` reports the state of every node
36
- - **Not a single machine** — a session is shared through any git remote; people and agents on different machines act on it, every act syncs, and the Hansard never needs a manual merge
37
- - **No new infrastructure required** — git already built it
38
-
39
- Nobody connected these pieces this way before.
18
+ - **Ungoverned** — agents act without rules, quorum or accountability
19
+ - **Unrecorded** — no permanent record of who decided what, and why
20
+ - **Uncosted** — no per-decision account of time, tokens or dollars
21
+ - **Single-machine** — no way for agents and people on different machines to share a session
22
+ - **Human-absent** — humans watch; they do not decide
23
+
24
+ ## What Politik does
25
+
26
+ - A **human owner** sets the rules and makes the final calls, working through
27
+ whichever AI harness they already use — Claude Code, Codex, agy, opencode — and
28
+ confirming every permanent act themselves.
29
+ - **Agents** are stateless CLI workers: seated for one turn, then disposed.
30
+ - A **git repository is the session** — rules, log, state and history in one.
31
+ - **Six protocols**, each a different decision rule the engine enforces (below).
32
+ - **A permanent log** of every act, and a **ledger** of what each act cost.
33
+ - **Shared sessions** through any git remote, with no manual merging.
34
+ - **Nested sessions** — an Org → Team → Ticket tree in one repository.
35
+ - **No new infrastructure** — git already built it.
40
36
 
41
37
  ---
42
38
 
43
39
  ## Install
44
40
 
45
- Politik runs on Node with **no build step** — the source is TypeScript, executed
46
- directly via `tsx`. Requires Node 20+ and git.
41
+ Politik runs on Node 20+ with no build step (TypeScript, run directly via `tsx`).
42
+ Requires git.
47
43
 
48
44
  ```sh
49
45
  npm install -g @cordfuse/politik
50
- politik doctor # probe this host: can it run a session, with which agents?
46
+ politik doctor # can this host run a session, and with which agents?
51
47
  ```
52
48
 
53
- Or run without installing:
49
+ Or run without installing: `npx @cordfuse/politik doctor`.
54
50
 
55
- ```sh
56
- npx @cordfuse/politik doctor
57
- ```
58
-
59
- From source, if you want to hack on it:
51
+ From source:
60
52
 
61
53
  ```sh
62
54
  git clone git@github.com:cordfuse/politik.git
@@ -66,8 +58,8 @@ node bin/politik.js doctor
66
58
 
67
59
  ## A first session
68
60
 
69
- **Bring your own AI harness** (ADR-0010). Create the folder, open whichever harness
70
- you already use there, and talk to it in plain language:
61
+ **Bring your own AI harness** (ADR-0010). Create the folder, open your harness in
62
+ it, and talk to it in plain language:
71
63
 
72
64
  ```sh
73
65
  politik new q4-planning
@@ -75,205 +67,160 @@ cd q4-planning
75
67
  claude # or codex, agy, opencode…
76
68
  ```
77
69
 
78
- The harness walks you through choosing a protocol, writing the Charter and
79
- convening the session, then turns your requests into `politik` commands. Reading
80
- is free; permanent acts are not. `assent`, `rule` and `prorogue` requested by a
81
- harness or a script are **staged**, and only you can enact them, in your own
82
- terminal:
70
+ The harness walks you through choosing a protocol, editing the Charter (the
71
+ session's rules) and opening the session, then turns your requests into `politik`
72
+ commands. Reading is free; permanent acts are not. `enact`, `rule` and `close`
73
+ requested by a harness or a script are **staged**, and only you can carry them
74
+ out, in your own terminal:
83
75
 
84
76
  ```sh
85
77
  politik pending # what is waiting for you
86
- politik confirm assent-3f9a2c # shows the act, asks you to type its id, then records it
87
- politik reject assent-3f9a2c # or discard it
78
+ politik confirm enact-3f9a2c # shows the act, asks you to type its id, then records it
79
+ politik reject enact-3f9a2c # or discard it
88
80
  ```
89
81
 
90
- Every commit records how it was requested (`Politik-Requested-Via: claude-code_…`)
91
- and, for a confirmed act, that the Speaker confirmed it. The session's instruction
92
- files are sealed at Writ Drop: if an agent rewrites them, governance stops until
93
- they are restored.
82
+ Every commit records how it was requested, and for a confirmed act, that the owner
83
+ confirmed it. The session's instruction files are sealed when it opens: if an agent
84
+ rewrites them, governance stops until they are restored.
94
85
 
95
86
  ### Sharing a session across machines
96
87
 
97
88
  A session can be shared through any git remote — GitHub, a NAS, anything git can
98
- reach (ADR-0011). Several people, each with their own harness, and agents on other
99
- machines can all act on it:
89
+ reach (ADR-0011):
100
90
 
101
91
  ```sh
102
- politik remote git@github.com:acme/q4-planning.git # the Speaker shares it
103
- politik join git@github.com:acme/q4-planning.git q4 --as ada # someone else joins
92
+ politik remote git@github.com:acme/q4-planning.git # the owner shares it
93
+ politik join git@github.com:acme/q4-planning.git q4 --as ada # someone else joins
104
94
  ```
105
95
 
106
- Every act fetches the latest record first and pushes after; if someone else acted
107
- in between, Politik recomputes the act on top of theirs, so the Hansard never needs a
108
- manual merge. Offline, governance refuses and reads still work. Acts staged for the
109
- Speaker are shared too, and only the seat an act names can confirm it. For proof
110
- rather than names, set `signed_confirmations: required` in the Charter and each
111
- confirmed act is signed with the confirming person's git key.
96
+ Every act fetches the latest log first and pushes after; if someone else acted in
97
+ between, Politik replays the act on top of theirs, so the log never needs a manual
98
+ merge. Offline, governance refuses and reads still work. Staged acts are shared
99
+ too, and only the seat an act names can confirm it. For proof rather than names,
100
+ set `signed_confirmations: required` in the Charter.
112
101
 
113
102
  ### By hand, or from a script
114
103
 
115
- Every command below is a git commit. `git log` in the session directory is the
116
- Hansard — the immutable record.
104
+ Every command is a git commit; `git log` in the session directory is the history.
117
105
 
118
106
  ```sh
119
- politik scaffold --dir ./session --quorum 2 # write a Charter to edit
120
- politik init --dir ./session --charter ./session/CHARTER.md --speaker you
121
- politik division call --dir ./session --motion adopt-standard --actor you --role AUTHORITY
122
- politik division vote --dir ./session --motion adopt-standard --actor ada --role MEMBER --vote AYE
123
- politik division vote --dir ./session --motion adopt-standard --actor bo --role MEMBER --vote AYE
124
- politik division tally --dir ./session --motion adopt-standard # → Motion CARRIED
125
- politik assent --dir ./session --motion adopt-standard --actor you --role AUTHORITY
107
+ politik scaffold --dir ./s --quorum 2 # write a Charter to edit
108
+ politik init --dir ./s --charter ./s/CHARTER.md --owner you
109
+ politik vote open --dir ./s --motion adopt-standard --actor you --role AUTHORITY
110
+ politik vote cast --dir ./s --motion adopt-standard --actor member-1 --role MEMBER --vote YES
111
+ politik vote cast --dir ./s --motion adopt-standard --actor member-2 --role MEMBER --vote YES
112
+ politik vote tally --dir ./s --motion adopt-standard # → Motion CARRIED
113
+ politik enact --dir ./s --motion adopt-standard --actor you --role AUTHORITY
114
+ politik log --dir ./s # every act so far
115
+ politik close --dir ./s --actor you --role AUTHORITY
126
116
  ```
127
117
 
128
- Run at your own terminal, `assent` asks you to type `assent` to confirm. For a
129
- fully scripted session (CI, tests), scaffold with `--speaker-confirmation off` —
130
- the setting lives in the Charter, which is sealed at Writ Drop, so it cannot be
131
- switched off later.
118
+ Run at your own terminal, `enact` asks you to type `enact` to confirm. For a fully
119
+ scripted session (CI, tests), scaffold with `--owner-confirmation off` — the
120
+ setting lives in the Charter, which is sealed when the session opens, so it cannot
121
+ be switched off later.
132
122
 
133
- Seat a real agent to do the work instead of a human vote:
123
+ Seat a real agent to do the work:
134
124
 
135
125
  ```sh
136
- politik run --dir ./session --agent claude-code --actor ada --role OPERATOR \
137
- --task "Draft and commit a Motion to adopt trunk-based development."
138
- ```
139
-
140
- The agent's turn is captured, its cost measured, and the result recorded — see
141
- `politik ledger --dir ./session`. An agent may also act through the CLI during its
142
- turn — review a Motion and cast its own vote — and those acts stay on the record,
143
- noted on the turn's entry. Editing `HANSARD.md` or `STATE.json` by hand is not
144
- acting: it is recorded as a Standing Orders violation and the record is restored.
145
- A harness that sandboxes its own shell (agy) is granted, for that turn only, write
146
- access to the session's `.git` and read access to the `politik` CLI — nothing else.
147
-
148
- ---
149
-
150
- ## Technical
151
-
152
- ### CANON — The Primitive Layer
153
-
154
- The engine speaks in canonical terms. Protocols translate them to domain vocabulary.
155
-
156
- **Roles:** `AUTHORITY` (human only) · `DELEGATE` · `OPERATOR` · `MEMBER` · `OBSERVER`
157
-
158
- **Primitives:** `SESSION` · `PROCEEDING` · `CHARTER` · `RECORD` · `MOTION` · `DIVISION` · `MATCH` · `ESCALATION` · `SUSPENSION` · `QUORUM` · `CONFLICT` · `DEADLOCK`
159
-
160
- **Verbs:** `READ` · `WRITE` · `VOTE` · `ASSENT` · `ESCALATE` · `PROMOTE` · `DEMOTE` · `HIRE` · `FIRE` · `SUSPEND` · `EXPEL` · `VETO` · `SPAWN` · `DISSOLVE` · `EXIT`
161
-
162
- **States:** `CONVENED` · `SUSPENDED` · `PROROGUED` · `STALE` · `INVALID`
163
-
164
- ### The Session Repo
165
-
166
- The git repository IS the Politik session. That much is always true — Charter,
167
- Hansard, state and audit trail all live there.
168
-
169
- An **SCM provider is optional**. Configure one and governance acts are
170
- additionally projected onto the platform; without one a session runs complete
171
- and correct on git alone. *Run local, run free.*
172
-
173
- | GitHub feature (when hosted) | Politik primitive |
174
- |---|---|
175
- | Repository | Session |
176
- | CHARTER.md | Standing Orders |
177
- | Pull Request | Motion |
178
- | PR Review | Division (vote) |
179
- | Issue | Escalation |
180
- | GitHub Actions | Clerk automation |
181
- | Repo access | Taking a Seat (`politik join --as <handle>`) |
182
- | git history | Hansard (immutable record) |
183
-
184
- ### The Politik Tree
185
-
186
- A session is either a standalone repository or a **node in a tree** — an
187
- organisation's Org → Team → Sprint → Ticket hierarchy as nested directories in
188
- one repository, each node inheriting its parent's Charter. Federation is **local
189
- traversal over that one working tree**, not cross-repository orchestration: no new
190
- service, no registry server. `politik registry` walks the tree and reports every
191
- session's state and cost with a roll-up; `politik cascade` flags a fault repeating
192
- across sibling sessions. `politik init --standalone` opts a node out into its own
193
- repository when it needs per-session pull requests or a hard permission boundary.
194
-
195
- ### Agent Model
196
-
197
- Agents are stateless. No persistent processes. State lives in git.
198
-
126
+ politik run --dir ./s --agent claude-code --actor op-1 --role OPERATOR \
127
+ --task "Draft and commit a motion to adopt trunk-based development."
199
128
  ```
200
- Broadcast received → Agent spawned → Prompt executed → Result committed to Hansard → Agent disposed
201
- ```
202
-
203
- ### The Human Role
204
129
 
205
- The Speaker (human) is constitutionally present, not operationally present. Drops the Writ, defines Standing Orders, rules on escalations. The session governs itself.
130
+ The agent is told its role, its verbs and its handle (`op-1`), so the votes it
131
+ casts from inside its turn are recorded under that handle. Use neutral handles for
132
+ agents: a human-sounding name can change how a model behaves, and that would show
133
+ up in the results as if the protocol caused it.
206
134
 
207
- The Speaker works through **their own AI harness**, opened in the session folder, in plain language. The harness reads freely and drafts freely, but the constitutional acts — assent, rulings, prorogation — are staged for the Speaker, who enacts them by typing the act's id at a real terminal. Every commit records who asked and how (ADR-0010). In a shared session, only the seat an act names can confirm it (ADR-0011).
135
+ The turn is captured, its cost measured and the result recorded (`politik ledger`).
136
+ An agent acts through the CLI during its turn — casting a vote, vetoing, raising an
137
+ escalation — and is told exactly which verbs its role holds. Editing `LOG.md` or
138
+ `STATE.json` by hand is not acting: it is recorded as a Charter violation and the
139
+ log is restored. Harnesses that sandbox their own shell (agy, Codex) are granted,
140
+ for that turn only, write access to the session's `.git` — nothing else.
208
141
 
209
- ### Governance Protocols
210
-
211
- **Twelve reference protocols ship** — Parliamentary, Republic, Monarchy, Socialism (political archetypes), Jury Deliberation, Elimination Tournament, Emergency Response (ICS), Corporate, Scrum / Agile, Peer Review, Adversarial Collaboration, and Solo (single-lead) — spanning constitutional, authoritarian and darwinist modes. Each is a vocabulary translation **plus** a composition of behavioral mechanics — how a decision resolves (majority · supermajority · unanimity), how an actor exits (voted out · elimination · none), and when a session ends (objective · last-standing · verdict) — on top of CANON. You compose your own for anything else; the framework is the product, these are exemplars. Parliamentary is protocol #1, not a privileged mode, and stays the default. **Scrum / Agile** ships as the baseline the others are measured against — the process most software teams already run, available with `--protocol scrum`: the Product Owner accepts, Developers table work and review it in a Sprint Review, and the Working Agreement is fixed for the Sprint. Each protocol's vocabulary and mechanics are documented in [PROTOCOLS.md](PROTOCOLS.md).
212
-
213
- Competitive protocols run on the `MATCH` primitive — a real 1v1 contest that a Motion-and-vote Division cannot model. `politik pair` generates a round (Swiss, round-robin, or single-elimination), `politik match report` settles a result, and `politik standings` scores the field from the record.
214
-
215
- ### Hansard and LEDGER
216
-
217
- **Hansard** — append-only session record. Every motion, vote, escalation, and commit. Attributed, timestamped, immutable. Cannot be edited. Cannot be gamed.
142
+ ---
218
143
 
219
- Because the record is the defence against bad faith, `politik integrity` reads the Hansard for the signatures of coercion — a coerced exit, a serial "voluntold" — and surfaces them to the Speaker. Detect and report; it never auto-punishes. The record catches what a naive log would hide.
144
+ ## Protocols
220
145
 
221
- **LEDGER** — cost accounting per act: elapsed time, token count, dollar cost, model. Every governance act writes a row; agent turns carry measured spend, and the human-driven acts (division, assent, escalation, ruling) carry `unmeasured` cost, so the ledger is a complete account of a session. No story points.
146
+ A protocol is a set of rules: how a vote decides, who can remove an actor, and when
147
+ the session ends. Every protocol uses the same plain words (ADR-0012), so the rules
148
+ are the only difference between them (ADR-0013).
222
149
 
223
- Measured, never estimated — and the distinction is enforced. An agent that reports usage produces exact figures; one that does not is recorded as `unmeasured`, never as `$0.00`, and totals report unmeasured rows separately rather than folding them in. Five CLI agents report usage today — Claude Code, Codex, Gemini, OpenCode and Qwen; the rest record elapsed time and mark cost `unmeasured`.
150
+ | Protocol | How it decides | Real-world equivalents |
151
+ |---|---|---|
152
+ | `majority-vote` (default) | A simple majority carries; members are removed only by vote | Committees, boards, open-source maintainers merging what the team approves |
153
+ | `unanimous-vote` | Everyone must agree; nobody can be removed; the session ends at its verdict | Criminal juries, consensus decision-making |
154
+ | `single-decider` | No vote: the owner decides and removes people alone; no appeals | Scrum's Product Owner, a "benevolent dictator" maintainer, an incident commander |
155
+ | `elimination-rounds` | The losing side of each vote is knocked out; last one standing; rules locked; no appeals | Single-elimination tournaments, exhaustive ballots |
156
+ | `panel-review` | Panel majority; panel members hold a veto; members can be voted off; ends at its verdict | Peer review, grant panels, required code reviewers |
157
+ | `adversarial-review` | Proposing (OPERATOR) and opposing (DELEGATE) sides must each accept; rules locked | Adversarial collaboration in science, bilateral negotiation |
158
+
159
+ A test runs the same scenario under every protocol and fails if any two behave
160
+ alike. Details: [PROTOCOLS.md](PROTOCOLS.md). Competitive sessions can also use
161
+ 1v1 matches: `politik pair` (Swiss, round-robin, single-elimination),
162
+ `politik match report`, `politik standings`.
224
163
 
225
164
  ---
226
165
 
227
- ## Game Theory
228
-
229
- Game theory is not a protocol in Politik. It is the analytical layer that **observes and describes** what emerges from sessions that are already running.
166
+ ## The log and the ledger
230
167
 
231
- > Game theory is to Politik what physics is to the universe. Physics doesn't run the universe — it describes it. Game theory doesn't run Politik sessions — it describes the equilibria that emerge from them.
168
+ **The log** (`LOG.md`) is the append-only record of the session: every motion,
169
+ vote, escalation and ruling, attributed and timestamped. Nobody edits it — every
170
+ entry is written by a `politik` command and committed.
232
171
 
233
- Every protocol in Politik instantiates a formal game structure:
172
+ Because the log is the defence against bad faith, `politik integrity` reads it for
173
+ signs of coercion — a coerced exit, a member pushed out again and again — and
174
+ reports them to the owner. It reports; it never punishes.
234
175
 
235
- | Protocol | Game Structure | Nash Equilibrium Prediction |
236
- |---|---|---|
237
- | Parliamentary | Cooperative with veto players | Stable coalition at quorum threshold |
238
- | Emergency Response (ICS) | Stackelberg leader-follower | Full compliance, zero deviation |
239
- | Jury Deliberation | Unanimity / holdout game | Convergence to consensus, or a hung result |
240
- | Elimination Tournament | All-pay elimination | Aggressive early, conservative late |
241
- | Peer Review | Multi-player review, information asymmetry | Honest assessment when anonymity is credible |
242
- | Adversarial Collaboration | Two-player, pre-committed | Maximum honest disclosure |
243
- | Scrum / Agile | Cooperative, shared payoff, single acceptor | Consensus-seeking, slow convergence |
244
-
245
- **The research question** (not yet a built feature — see [RESEARCH.md](RESEARCH.md)): do AI agents converge on Nash Equilibrium predictions when governed by protocols that formally instantiate known game structures? If yes — protocol selection becomes a mechanism design problem. If no — why do agents deviate? Either result is publishable.
176
+ **The ledger** (`LEDGER.md`) records what each act cost: elapsed time, tokens,
177
+ dollars, model. Measured, never estimated: an agent that reports usage gives exact
178
+ figures; one that does not is recorded as `unmeasured`, never as `$0.00`. Claude
179
+ Code, Codex, Gemini, OpenCode and Qwen report usage today.
246
180
 
247
181
  ---
248
182
 
249
- ## Business Disruption
183
+ ## How it fits together
250
184
 
251
- ### Jira is a database humans are required to keep updated. Hansard is a database that is impossible to not keep updated.
185
+ **The session repository.** The git repository is the session: Charter, log, state
186
+ and history. An SCM provider is optional — point Politik at a GitHub repository
187
+ and acts are also projected onto it (a motion becomes a pull request, a vote a
188
+ review request, an escalation an issue, enactment a merge). Without one, a session
189
+ is complete and correct on git alone.
252
190
 
253
- That is not a feature comparison. It is a category difference.
191
+ **The tree.** A session is a standalone repository or a node in a tree — an Org →
192
+ Team → Ticket hierarchy as nested directories in one repository, each inheriting
193
+ its parent's Charter. `politik registry` reports every session's state and cost;
194
+ `politik cascade` flags a fault repeating across sibling sessions.
254
195
 
255
- | Jira | Politik |
256
- |---|---|
257
- | Developer types ticket title | Motion title in Hansard |
258
- | Developer estimates story points | LEDGER — exact elapsed, tokens, dollars |
259
- | Someone manually assigns reviewer | Division record — attributed votes |
260
- | Developer links commits manually | Every governance act is its own commit — the git history is the audit trail |
261
- | Developer manually closes ticket | Prorogation — one command, with the terminating trigger recorded |
262
- | Cost tracking is finance's estimate | LEDGER — actual cost per decision |
196
+ **Agents** are stateless: spawned for a turn, given the Charter and the recent log,
197
+ recorded, disposed. State lives in git.
263
198
 
264
- Politik produces a superior project record as a **zero-overhead side effect** of running governed sessions. Nobody updates it. Nobody logs time. It is all there because it cannot be otherwise.
199
+ **Roles:** `AUTHORITY` (the owner, always human) · `DELEGATE` · `OPERATOR` · `MEMBER` · `OBSERVER`.
200
+ Architecture: [POLITIK-ARCHITECTURE.md](POLITIK-ARCHITECTURE.md) and [RUNTIME.md](RUNTIME.md).
265
201
 
266
- ### GitHub Alignment
202
+ ---
267
203
 
268
- A session is a git repository, so Politik runs anywhere git does. Point it at a GitHub repo and governance acts additionally project onto the platform — a Motion becomes a pull request, a Division a review request, an Escalation an issue, Assent a merge — and a shipped Actions workflow emails the Speaker when an escalation is filed. Agents run in GitHub Actions like any other CLI. The projection is optional; without it a session is complete and correct on git alone.
204
+ ## Research
269
205
 
270
- ### Open Source
206
+ Politik is also a research instrument. The question: **does the decision rule a
207
+ team of AI agents works under change how well it does?** — tested as specific
208
+ hypotheses, led by one from social choice theory: Condorcet's jury theorem says a
209
+ majority gets more accurate as voters are added, *if* they vote independently. AI
210
+ agents on the same model share training and blind spots. Does adding agents still
211
+ help, and does mixing vendors restore the gain? See [RESEARCH.md](RESEARCH.md).
271
212
 
272
- MIT licensed. The entire framework — CANON, protocol library, session engine, Hansard substrate, CLI tooling, reference implementation — is open source.
213
+ **The thesis changed in v0.6.0.** Earlier versions argued that machine actors are
214
+ free of human vices (the "Human Flaw" thesis), compared twelve protocols with their
215
+ own vocabularies, and framed the analysis around Nash equilibria. That framing was
216
+ dropped: it assumed what should be tested, the protocols mostly behaved alike, and
217
+ agents with no payoffs have no equilibria to find. Earlier versions remain archived
218
+ under their own Zenodo version DOIs (v0.4.0, v0.5.0); they are not the current
219
+ thesis. The concept DOI below always resolves to the latest version.
273
220
 
274
221
  ---
275
222
 
276
- **Attribution:** Steve Krisjanovs, Cordfuse
277
- **Architecture:** [POLITIK-ARCHITECTURE.md](POLITIK-ARCHITECTURE.md) · [PROTOCOLS.md](PROTOCOLS.md) · [RUNTIME.md](RUNTIME.md) · [RESEARCH.md](RESEARCH.md) · [EXECUTION.md](EXECUTION.md)
278
- **DOI:** [10.5281/zenodo.19490358](https://doi.org/10.5281/zenodo.19490358) (concept DOI — always resolves to the latest version)
223
+ **Attribution:** Steve Krisjanovs, Cordfuse
224
+ **Docs:** [POLITIK-ARCHITECTURE.md](POLITIK-ARCHITECTURE.md) · [PROTOCOLS.md](PROTOCOLS.md) · [RUNTIME.md](RUNTIME.md) · [RESEARCH.md](RESEARCH.md) · [EXECUTION.md](EXECUTION.md) · [docs/adr/](docs/adr/)
225
+ **DOI:** [10.5281/zenodo.19490358](https://doi.org/10.5281/zenodo.19490358) (concept DOI — always resolves to the latest version)
279
226
  **License:** MIT