@cordfuse/politik 0.3.0 → 0.4.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 +59 -58
- package/POLITIK-ARCHITECTURE.md +6 -5
- package/PROTOCOLS.md +130 -911
- package/README.md +85 -10
- package/RESEARCH.md +3 -3
- package/RUNTIME.md +52 -31
- package/docs/adr/0004-motion-enactment.md +1 -1
- package/docs/adr/0006-protocol-behavioral-enforcement.md +14 -7
- package/docs/adr/0007-protocol-mechanics.md +3 -3
- package/docs/adr/0009-match-primitive.md +17 -6
- package/docs/adr/0010-operator-interface.md +145 -0
- package/docs/adr/0011-shared-sessions.md +129 -0
- package/package.json +1 -1
- package/src/charter.ts +44 -0
- package/src/cli.ts +786 -43
- package/src/containment.ts +5 -2
- package/src/git.ts +8 -4
- package/src/init.ts +13 -0
- package/src/operator.ts +82 -0
- package/src/pending.ts +165 -0
- package/src/remote.ts +274 -0
- package/src/standings.ts +21 -1
- package/src/templates/parliamentary.ts +249 -28
- package/src/tournament.ts +124 -12
package/EXECUTION.md
CHANGED
|
@@ -44,7 +44,7 @@ recorded **and** nothing blocks it.
|
|
|
44
44
|
[x] Finalize CHARTER.md spec — ADR-0002 (Accepted)
|
|
45
45
|
[x] Finalize STATE.json schema — ADR-0003 (Accepted)
|
|
46
46
|
[x] Finalize SCM provider interface spec — return types settled in src/scm.ts
|
|
47
|
-
[x] Document all decisions in ADRs — 0001
|
|
47
|
+
[x] Document all decisions in ADRs — 0001–0009 Accepted
|
|
48
48
|
[ ] Draft arXiv preprint — unified paper (framework + experiment)
|
|
49
49
|
```
|
|
50
50
|
|
|
@@ -263,70 +263,50 @@ unread template.
|
|
|
263
263
|
**Framing note:** Parliamentary is protocol #1, not a privileged mode.
|
|
264
264
|
All protocols are equal. The framework is protocol-agnostic.
|
|
265
265
|
|
|
266
|
-
**Shipped with framework (reference protocols):** all
|
|
266
|
+
**Shipped with framework (reference protocols):** all eleven in `protocols/`,
|
|
267
267
|
every one lint-clean.
|
|
268
268
|
|
|
269
269
|
```
|
|
270
270
|
[x] Parliamentary Democracy (reference protocol — ships first) parliamentary.yml
|
|
271
|
-
[x]
|
|
272
|
-
[x]
|
|
273
|
-
[x]
|
|
271
|
+
[x] Republic (US-style) republic.yml
|
|
272
|
+
[x] Monarchy monarchy.yml
|
|
273
|
+
[x] Socialism / Collective socialism-collective.yml
|
|
274
|
+
[x] Jury Deliberation jury-deliberation.yml
|
|
275
|
+
[x] Elimination Tournament elimination-tournament.yml
|
|
276
|
+
[x] Emergency Response / ICS emergency-response-ics.yml
|
|
274
277
|
[x] Corporate / Board corporate.yml
|
|
275
|
-
[x] Battle Royale battle-royale.yml
|
|
276
|
-
[x] League Season (sports) league-season.yml
|
|
277
|
-
[x] Elimination Tournament — Single elimination-tournament.yml
|
|
278
278
|
[x] Peer Review (scientific research) peer-review.yml
|
|
279
|
-
[x]
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
All five modes are represented: constitutional (parliamentary, agile, legal,
|
|
283
|
-
corporate, league-season, peer-review), authoritarian (military,
|
|
284
|
-
red-blue-team), and darwinist (battle-royale, elimination-tournament). Ephemeral
|
|
285
|
-
and immutable have no reference protocol yet — they appear in the community
|
|
286
|
-
list.
|
|
287
|
-
|
|
288
|
-
**Power inversions are declared, never inferred.** `legal.yml` gives the Jury
|
|
289
|
-
(OBSERVER) a domain veto over the final Division; `peer-review.yml` lets a
|
|
290
|
-
reviewer reject on methodology alone. Both contradict the trust hierarchy, which
|
|
291
|
-
is exactly why CANON models them as `domain_veto` rather than deriving them.
|
|
292
|
-
|
|
293
|
-
**One mapping conflict found in PROTOCOLS.md.** Red Team / Blue Team lists
|
|
294
|
-
OPERATOR and MEMBER twice each, once per side (Red Team Lead / Blue Team Lead).
|
|
295
|
-
A CANON role cannot map to two terms. Resolved by rendering both side-neutrally
|
|
296
|
-
("Team Lead", "Team Agent") and carrying the side in each actor's
|
|
297
|
-
`mandate_alignment` — mandate is an actor property, vocabulary is protocol-wide.
|
|
298
|
-
|
|
299
|
-
**Ship shortly after (community-ready protocols):**
|
|
300
|
-
```
|
|
301
|
-
[ ] Republic (US-style)
|
|
302
|
-
[ ] Open Source / RFC
|
|
303
|
-
[ ] DevOps / Incident Response
|
|
304
|
-
[ ] Film / TV Production
|
|
305
|
-
[ ] Clinical / Hospital
|
|
306
|
-
[ ] Emergency Response / ICS
|
|
307
|
-
[ ] MMO Raid / Guild
|
|
308
|
-
[ ] Startup
|
|
309
|
-
[ ] Hackathon
|
|
310
|
-
[ ] Adversarial Collaboration (scientific research)
|
|
311
|
-
[ ] Replication Crisis (scientific research)
|
|
312
|
-
[ ] Pre-registration / Open Science (scientific research)
|
|
313
|
-
[ ] Grand Challenge (scientific research)
|
|
279
|
+
[x] Adversarial Collaboration (scientific research) adversarial-collaboration.yml
|
|
280
|
+
[x] Solo (single-lead) solo.yml
|
|
314
281
|
```
|
|
315
282
|
|
|
283
|
+
The eleven were curated from a much wider design exploration — 52 shapes down to
|
|
284
|
+
eleven professional exemplars, with fascism and organized-crime cut as liabilities
|
|
285
|
+
and games and toys trimmed. Modes represented: constitutional (parliamentary,
|
|
286
|
+
republic, corporate, peer-review), a unanimity Jury, a darwinist elimination
|
|
287
|
+
Tournament, and an authoritarian ICS incident command. PROTOCOLS.md documents the
|
|
288
|
+
eleven.
|
|
289
|
+
|
|
290
|
+
**Power inversions are declared, never inferred.** `jury-deliberation.yml` and
|
|
291
|
+
`peer-review.yml` let a lower-trust role — a juror, a reviewer — override the
|
|
292
|
+
final Division on domain grounds. Both contradict the trust hierarchy, which is
|
|
293
|
+
exactly why CANON models them as `domain_veto` rather than deriving them.
|
|
294
|
+
|
|
295
|
+
**Compose your own.** The eleven are exemplars, not a fixed set: CANON plus a
|
|
296
|
+
vocabulary and a mechanics triple (resolution / exit / termination) expresses any
|
|
297
|
+
governance shape. The framework is the product; a new protocol is a Charter away.
|
|
298
|
+
|
|
316
299
|
**Community contribution protocols (documented, PRs welcome):**
|
|
317
300
|
```
|
|
318
|
-
Politics: Socialism,
|
|
319
|
-
Sports: Double Elimination, Round Robin, Swiss System
|
|
320
|
-
|
|
321
|
-
eSports Match
|
|
322
|
-
Military: Intelligence/Espionage (ephemeral), Cybersecurity/Red Team
|
|
301
|
+
Politics: Socialism, Monarchy
|
|
302
|
+
Sports: Double Elimination, Round Robin, Swiss System
|
|
303
|
+
Security: Cybersecurity/Red Team
|
|
323
304
|
Legal: Arbitration, Jury Deliberation (ephemeral record)
|
|
324
305
|
Healthcare: Clinical Trial/Research
|
|
325
306
|
Business: Investment/Trading, Auction House
|
|
326
307
|
Education: Academic/University, Debate Competition
|
|
327
308
|
Creative: Theatre, Music Recording, Game Development
|
|
328
|
-
Community:
|
|
329
|
-
Neighbourhood/HOA, Pirate Crew
|
|
309
|
+
Community: Religion (immutable), Neighbourhood/HOA
|
|
330
310
|
Novel: Improv Theatre (ephemeral), Archaeological Dig,
|
|
331
311
|
Antarctic Expedition
|
|
332
312
|
Game Theory: Formal analytical structures (Zero-Sum, Cooperative,
|
|
@@ -352,11 +332,10 @@ errors (unusable — a term CANON does not have, two roles sharing one label, an
|
|
|
352
332
|
ephemeral record mode that still claims to record) from warnings (likely
|
|
353
333
|
mistakes — non-semver version, unmapped role, flags inconsistent with the mode).
|
|
354
334
|
|
|
355
|
-
**Warnings are not silently suppressed.** `
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
warning is expected. The linter found this in the framework's own library.
|
|
335
|
+
**Warnings are not silently suppressed.** `politik protocol lint` surfaces every
|
|
336
|
+
issue it finds — a non-semver version, an unmapped role, a domain veto redundant
|
|
337
|
+
given the declared mode — and it does so for the framework's own shipped
|
|
338
|
+
manifests, not just user ones. Nothing is hidden.
|
|
360
339
|
|
|
361
340
|
**New CLI surface:**
|
|
362
341
|
```
|
|
@@ -543,11 +522,31 @@ meaningless `quorum.present`, and three unreachable suspension causes —
|
|
|
543
522
|
One audit finding was **rejected**: rule 3 counting declared slots rather than
|
|
544
523
|
seated actors is correct, because Writ Drop runs before any actor is seated.
|
|
545
524
|
|
|
525
|
+
### Shipped since — 0.3.0 (2026-08-10)
|
|
526
|
+
|
|
527
|
+
Much has landed since that audit, and the phase plan above predates it:
|
|
528
|
+
|
|
529
|
+
- **Protocols behave, not just read** (ADR-0006, ADR-0007). `session.escalation` is
|
|
530
|
+
enforced, and each protocol composes resolution / exit / termination mechanics —
|
|
531
|
+
a Jury needs unanimity and seals on a verdict; an elimination protocol culls.
|
|
532
|
+
- **The MATCH primitive + tournaments** (ADR-0009). A 12th CANON primitive; `politik
|
|
533
|
+
pair` / `match` / `standings` run Swiss / round-robin / single-elimination.
|
|
534
|
+
- **Federation — the GLOBAL layer built** (ADR-0008). `politik registry` and
|
|
535
|
+
`politik cascade` as local traversal over a monorepo tree; `init --standalone`
|
|
536
|
+
for the per-repo mode.
|
|
537
|
+
- **Constitutional depth wired.** DEADLOCK now auto-suspends and is broken by a
|
|
538
|
+
casting vote (`division break`); the disputed-exit flow (`actor dispute` /
|
|
539
|
+
`reinstate`), the DELEGATE challenge (`politik challenge`), and bad-faith
|
|
540
|
+
detection (`politik integrity`) all ship.
|
|
541
|
+
- **Published.** `@cordfuse/politik@0.3.0` is live on npm.
|
|
542
|
+
|
|
543
|
+
The full source-vs-docs reconciliation is in [`docs/AUDIT.md`](docs/AUDIT.md).
|
|
544
|
+
|
|
546
545
|
**Provider is optional, not mandatory.** The spec pulls both ways — "Run local,
|
|
547
546
|
run free" against "the motion system (Pull Requests)". Resolved as: git is the
|
|
548
547
|
mandatory substrate, the platform is an optional projection over it.
|
|
549
548
|
|
|
550
|
-
Phase 8
|
|
549
|
+
Phase 8 is not meaningfully started — the npm package is published (`@cordfuse/politik@0.3.0`, with a tag-to-npm release workflow), but the rest of the launch surface (README hero, Docker/Homebrew distribution, the announcement, the arXiv preprint) is not.
|
|
551
550
|
|
|
552
551
|
---
|
|
553
552
|
|
|
@@ -560,7 +559,7 @@ Phase 8 remains unstarted.
|
|
|
560
559
|
[ ] At least 5 agents tested
|
|
561
560
|
[ ] GitHub template repo configured
|
|
562
561
|
[ ] Docker images published
|
|
563
|
-
[
|
|
562
|
+
[x] npm package published — @cordfuse/politik@0.3.0 live (2026-08-10); tag-to-npm via release.yml
|
|
564
563
|
[ ] Homebrew tap (macOS/Linux)
|
|
565
564
|
[ ] Announcement — TBD channel
|
|
566
565
|
```
|
|
@@ -687,7 +686,9 @@ org/politik-root ← constitutional layer
|
|
|
687
686
|
└── org/politik-PROJ-112a ← sub-ticket (if scope expands)
|
|
688
687
|
```
|
|
689
688
|
|
|
690
|
-
Every node has a Charter (inheriting from parent), a Hansard (scoped to its level), a STATE.json, and a LEDGER. The moment a leaf gains a child it becomes a parent — no special migration, no architectural change, just a new
|
|
689
|
+
Every node has a Charter (inheriting from parent), a Hansard (scoped to its level), a STATE.json, and a LEDGER. The moment a leaf gains a child it becomes a parent — no special migration, no architectural change, just a new node with `inherits_from` pointing at its parent.
|
|
690
|
+
|
|
691
|
+
> **Storage model (ADR-0008, shipped).** The example above draws each node as its own repository, but that is now the *opt-in* mode. The **default is a monorepo tree**: nodes are nested directories in one repository, `inherits_from` is a relative path to the parent directory, and the whole hierarchy shares one clone, one CI, one history. A node opts out into its own repository with `politik init --standalone` when it needs per-session pull requests or a hard permission boundary. And the GLOBAL / federation layer below is **built, not roadmap** — `politik registry` is the "session open/close registry" and state-of-everything roll-up; `politik cascade` records the `CASCADE_ALERT`. Federation is local traversal over the one tree (`src/federation.ts`), not cross-repo orchestration.
|
|
691
692
|
|
|
692
693
|
### Actors Are Mobile Across the Tree
|
|
693
694
|
|
package/POLITIK-ARCHITECTURE.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
## STATUS
|
|
19
|
-
- **Visibility:** Public · DOI: 10.5281/zenodo.
|
|
19
|
+
- **Visibility:** Public · DOI: 10.5281/zenodo.19490358 (concept DOI — always resolves to the latest version)
|
|
20
20
|
- **Stage:** Architecture locked — reference implementation in progress
|
|
21
21
|
|
|
22
22
|
---
|
|
@@ -141,6 +141,7 @@ This design enables the Human Flaw research thesis: the same protocol can be run
|
|
|
141
141
|
| `RECORD` | Hansard — append-only attributed log |
|
|
142
142
|
| `MOTION` | Tabled business — a PR |
|
|
143
143
|
| `DIVISION` | Vote — PR review |
|
|
144
|
+
| `MATCH` | A contest between two contestants that resolves to a single winner — what a Division (an N-actor vote on a Motion) cannot model. Pairs the 1v1 tournament formats: Swiss, round-robin, single-elimination. ADR-0009. |
|
|
144
145
|
| `ESCALATION` | Point of Order — an Issue |
|
|
145
146
|
| `SUSPENSION` | Session pause — proceeding open, agents stopped, resumable |
|
|
146
147
|
| `QUORUM` | Minimum actors for valid session |
|
|
@@ -283,7 +284,7 @@ Model pinning is per-constituency because different seats have different cogniti
|
|
|
283
284
|
|
|
284
285
|
- Does complementary personality composition outperform homogeneous composition?
|
|
285
286
|
- Does model pinning to domain-specialist fine-tunes reduce fault rate?
|
|
286
|
-
- What is the optimal personality mix for Parliamentary vs
|
|
287
|
+
- What is the optimal personality mix for Parliamentary vs Elimination Tournament protocols?
|
|
287
288
|
- Can Hansard performance history predict future actor quality better than declared profiles?
|
|
288
289
|
- Does a CREATIVE OPERATOR in an ANALYST-heavy session improve output or introduce noise?
|
|
289
290
|
|
|
@@ -466,9 +467,9 @@ protocol:
|
|
|
466
467
|
| Mode | Description | Example protocols |
|
|
467
468
|
|---|---|---|
|
|
468
469
|
| Constitutional | Checks and balances, escalation paths, human override | Parliamentary, Legal, Corporate, Academic |
|
|
469
|
-
| Authoritarian | Single authority, no Division, escalation routes back to top |
|
|
470
|
-
| Darwinist | No AUTHORITY during session, pure statute, no appeals |
|
|
471
|
-
| Ephemeral | No RECORD by design, session evaporates on close |
|
|
470
|
+
| Authoritarian | Single authority, no Division, escalation routes back to top | Startup, Film |
|
|
471
|
+
| Darwinist | No AUTHORITY during session, pure statute, no appeals | Elimination Tournament, Hackathon, Auction |
|
|
472
|
+
| Ephemeral | No RECORD by design, session evaporates on close | Whistleblower, short-lived ops |
|
|
472
473
|
| Immutable | Standing Orders cannot be amended mid-session | Religion, Emergency Services, Aviation |
|
|
473
474
|
|
|
474
475
|
---
|