Public: anyone can read this; the crew can change it.

Chosen rule-set: Sworn & Said — write the rules of record as RULES.md #17

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

mason/parley:mason/5-chosen-rule-set-sworn-said-write-the-rul → main 1 commit fork

  • Merged. mason/5-chosen-rule-set-sworn-said-write-the-rul was merged into main as ab302ff.

Review

Sign in to review this change.
2 files changed +431 −0
README.md +4
@@ -2,6 +2,10 @@
22
33 A negotiation game played over hours: secret goals, public offers, a deal that binds; agents can sit at the table.
44
5 The game is *Sworn & Said*, and its rules of record — charter, charges,
6 scoring, the sworn and the said, quorum and the clock — are written once in
7 [RULES.md](RULES.md).
8
59 This is an app: the forge runs it. Production follows the default branch;
610 every open pull gets a preview at its own address with its own copy of the
711 data. Everything the app keeps lives under `FORGE_APP_DATA`, which is what
RULES.md added +427
@@ -0,0 +1,427 @@
1 # Sworn & Said — the rules of record
2
3 This is the game **parley** builds. It is the one document that says what a
4 rule *is*; every issue and every module points at a section here instead of
5 restating it. Where the code and this file disagree, one of them is a bug —
6 say which in the pull.
7
8 A rule in this document is **decidable from stored state alone**: the seed,
9 the seat count, the act ledger, the clock settings and the current time. No
10 rule needs a memory of a conversation, a judge, or a player's word.
11
12 ---
13
14 ## 1. Vocabulary
15
16 Every noun below is the name the code uses. One concept, one word.
17
18 | word | what it is |
19 | ------------------ | ----------------------------------------------------------------------------- |
20 | **table** | one game: 4–6 seats, one charter, one act ledger, one clock |
21 | **seat** | one player's place at a table, fixed order by `ordinal` (0-based) |
22 | **charter** | the 7 clauses this table is arguing over |
23 | **clause** | one question on the charter, with exactly 3 **settings** |
24 | **setting** | one of the 3 answers a clause can take |
25 | **accord** | one setting for every clause of the charter — all 7, never a fragment |
26 | **charge** | a seat's secret hand: 4 **aims** |
27 | **aim** | (clause, setting, weight) — what a seat wants, and what it is worth |
28 | **dread** | the one aim of weight −3: the setting a seat is paid to prevent |
29 | **act** | one entry in the ledger: an `offer`, an `accept` or a `pass` |
30 | **standing offer** | the accord of the most recent `offer` act |
31 | **acceptance** | an `accept` act made after the standing offer was made |
32 | **quorum** | ⌈n/2⌉+1 acceptances of one standing offer |
33 | **sworn claim** | a true, engine-verified aim of your own, published as the price of accepting |
34 | **said claim** | an unverified statement about your own charge, judged in public at the reveal |
35 | **binding** | the moment quorum is reached: the standing offer becomes the accord of record |
36 | **settlement** | the end of the table: every seat scored, every charge and verdict revealed |
37 | **impound** | the other end: the deadline passed with no binding, and every seat scores 0 |
38
39 Table states, in order: `open` → `playing` → `settled` | `impounded`.
40 A table is `open` while seats are empty, `playing` from the moment the last
41 seat is taken, and ends exactly once, either `settled` or `impounded`.
42
43 ---
44
45 ## 2. The fixed numbers
46
47 Every number the code needs, named once.
48
49 | number | value |
50 | --------------------- | ---------------------------------------- |
51 | seats per table | **4, 5 or 6** — nothing else |
52 | clauses per charter | **7**, drawn from the pool in §3 |
53 | settings per clause | **exactly 3** |
54 | aims per charge | **4**, on 4 **distinct** clauses |
55 | positive aims | **3**, weights **3 distinct values from {1, 2, 3, 5}** |
56 | dread | **1**, weight **−3** |
57 | score range | **−3 … 10** (best charge is 2+3+5) |
58 | quorum | **⌈n/2⌉+1** → 3 of 4, 4 of 5, 4 of 6 |
59 | sworn claims per seat | at most **3** in a whole game (one per positive aim, ever) |
60 | said claims per act | at most **3** |
61 | turn window (default) | **6 hours** (`turn_seconds = 21600`) |
62 | deadline (default) | **24 hours** (`deadline_seconds = 86400`) |
63 | turn window (range) | 15 minutes … 48 hours |
64 | deadline (range) | 1 hour … 14 days, and **≥ 2 × turn window** |
65 | impounded score | **0** for every seat |
66
67 The three positive weights of a charge are **distinct**: a seat's positive
68 aims are worth 1+2+3 = 6, 1+2+5 = 8, 1+3+5 = 9 or 2+3+5 = 10 in total.
69 Distinct weights mean a sworn weight is information — "she signed for a 5"
70 says something a table can use.
71
72 ---
73
74 ## 3. The charter and the clause pool
75
76 A table's charter is **7 clauses drawn from a fixed pool of 12**, each with
77 exactly 3 settings. The pool is flavour; the mechanics are symmetric across
78 every clause and every setting. No clause is worth more than another, no
79 setting is a default, and no setting is good or bad except to the seat whose
80 charge says so.
81
82 The ids are the ids the code stores.
83
84 | clause id | clause | settings |
85 | ----------- | --------------- | --------------------------------------------------- |
86 | `beacon` | The Beacon | `kept` · `sold` · `scuttled` |
87 | `hold` | The Hold | `opened` · `sealed` · `flooded` |
88 | `ledger` | The Ledger | `published` · `redacted` · `burned` |
89 | `pilot` | The Pilot | `reinstated` · `paid_off` · `put_ashore` |
90 | `name` | The Name | `kept` · `changed` · `struck` |
91 | `chart` | The Chart | `shared` · `sold` · `locked` |
92 | `salvage` | The Salvage | `split_evenly` · `to_the_finders` · `to_the_crown` |
93 | `wreck` | The Wreck | `raised` · `stripped` · `left` |
94 | `crew` | The Crew | `signed_on` · `paid_out` · `turned_loose` |
95 | `bond` | The Bond | `honoured` · `renegotiated` · `broken` |
96 | `anchorage` | The Anchorage | `held` · `leased` · `abandoned` |
97 | `sounding` | The Sounding | `filed` · `amended` · `lost` |
98
99 The charter and the charges are dealt together from the table's **seed** and
100 its seat count, and nothing else: the same seed and the same count always
101 give the same table. The deal must produce a table worth arguing over, and
102 the code asserts it:
103
104 - at least two seats hold aims that cannot both be satisfied — same clause,
105 different settings;
106 - no single accord satisfies every seat's positive aims;
107 - no two seats are dealt the same charge.
108
109 An **accord** names one setting for each of the 7 clauses. An accord missing
110 a clause, naming a clause outside this charter, naming a setting outside that
111 clause, or naming a clause twice is not an accord and is refused at the
112 boundary.
113
114 ---
115
116 ## 4. The charge, and what an accord pays
117
118 Each seat is dealt a secret **charge**: 4 aims on 4 distinct clauses — three
119 positive (weights 1/2/3/5, three distinct values) and one **dread** of −3.
120
121 An aim is **satisfied** by an accord when the accord sets that aim's clause
122 to that aim's setting. A dread is **triggered** on the same test.
123
124 ```
125 score(charge, accord) = Σ { weight of each satisfied positive aim }
126 − 3 if the dread is triggered
127 ```
128
129 That is the whole of scoring. There is no bonus for signing, no penalty for
130 holding out, and no score for anything said or sworn along the way. A seat
131 that never acts is scored by the accord exactly like the seat that offered it.
132
133 Nobody sees any part of any charge until the table ends — not the host, not
134 the table, not a guest — except the parts their holders publish themselves as
135 sworn claims (§6) while the game runs.
136
137 ---
138
139 ## 5. The turn
140
141 Seats act in a fixed order: **ordinal 0, 1, … n−1, then round again**. After
142 `k` acts the seat to act is `ordinal = k mod n`. The order never changes and
143 no seat is ever skipped; a seat that will not play is passed for it by the
144 clock (§8).
145
146 On your turn you take **exactly one act**:
147
148 - **offer** an accord. It becomes the **standing offer**, and it **clears
149 every acceptance** — including the offerer's own. Sworn claims already made
150 are *not* cleared; they are public forever.
151 - **accept** the standing offer. This costs a truth (§6) and is refused
152 outright when you cannot pay it.
153 - **pass**. Always legal.
154
155 Further rules of the turn, each checkable from the ledger:
156
157 - There is nothing to accept before the first offer. An acceptance is bound
158 to the offer that stands when it is made; an acceptance made before an
159 offer never counts for it.
160 - A seat may accept the standing offer **once**. The offerer may spend a
161 later turn of their own accepting their own offer.
162 - Acts are only legal while the table is `playing`. After settlement or
163 impound no act is accepted at any door.
164
165 **Any act may carry said claims** (§7) — an offer, an acceptance or a pass.
166
167 ---
168
169 ## 6. The sworn: accepting costs a truth
170
171 To accept the standing offer you must **cite one of your own positive aims
172 that this accord satisfies**. The citation is (clause, setting); the engine
173 checks it against the charge it already holds, and on acceptance the clause,
174 the setting, its **weight** and your seat become public forever, recorded as
175 a **sworn claim**.
176
177 A sworn claim can never be false: the engine will not write one it cannot
178 verify.
179
180 The three rules that make a signature expensive:
181
182 1. **It must be true and satisfied.** The cited aim is a positive aim of your
183 own charge, and the standing accord sets that clause to that setting.
184 Otherwise the acceptance is refused.
185 2. **It must be fresh.** A positive aim can be sworn **once in a game**. A
186 citation you have already sworn is refused, whatever the accord.
187 3. **Secrets first.** If the accord satisfies a positive aim of yours that is
188 not yet sworn, you must cite one of those. You may choose which, when more
189 than one is secret — the cheap truth or the expensive one, and that choice
190 is itself a move.
191
192 Two consequences, both intended:
193
194 - **An accord that satisfies none of your positive aims cannot be accepted by
195 you at all.** Not for a favour, not for a promise. The page does not offer
196 the button; every other door refuses by name.
197 - **You have at most three signatures in a game**, one per positive aim. A
198 seat whose satisfied aims are all already sworn cannot accept that accord
199 either. Honesty is the currency and the purse is finite.
200
201 Sworn claims arise *only* from acceptances. There is no way to swear
202 voluntarily; if you want to tell the table something for free, you say it.
203
204 A refusal never leaks. "That is not one of your aims" and "you have a secret
205 aim this accord satisfies — cite that one" say nothing about any other seat,
206 and no failure message names an aim the caller does not already hold.
207
208 ---
209
210 ## 7. The said: cheap claims, audited in public
211
212 Any act may carry up to **3 said claims**. A said claim is structured and
213 unverified:
214
215 ```
216 (clause, setting, worth) worth ∈ none | small | large | dread
217 ```
218
219 The engine validates only its *shape*: the clause is on this charter, the
220 setting belongs to that clause, the worth is one of the four words, and the
221 same (clause, setting) appears at most once within one act. It **never**
222 rejects a said claim for being false. Lying is a legal move, it is cheap, and
223 it is recorded with your seat's name on it.
224
225 Said claims are shown as *said* while the game runs — believed or not as the
226 table likes — and at settlement **every one of them is marked true or false
227 in public**, judged against the charge that made it. Nothing else about a
228 said claim changes anything: it does not score, it does not bind, it does not
229 substitute for a sworn claim, and saying "large" about an aim does not make
230 it sworn or make it secret.
231
232 The verdict, computed once at settlement. For the stated (clause, setting),
233 the claiming seat's **true worth** is:
234
235 | true worth | when |
236 | ---------- | ----------------------------------------------------------- |
237 | `dread` | the seat's dread aim is exactly that clause and setting |
238 | `large` | a positive aim of weight **3 or 5** is exactly that pair |
239 | `small` | a positive aim of weight **1 or 2** is exactly that pair |
240 | `none` | the seat holds no aim on that clause *at that setting* |
241
242 A said claim is **true** when its declared worth equals the true worth, and
243 **false** otherwise. Note the last row: an aim on that clause at a *different*
244 setting is worth `none` at the setting stated, so "the Ledger redacted is
245 nothing to me" is true for a seat whose Ledger aim is `published`.
246
247 The same said claim may be repeated on later acts. Each is recorded and each
248 is judged.
249
250 ---
251
252 ## 8. The clock
253
254 A table plays asynchronously, and the clock is arithmetic on timestamps — no
255 timer, no background job. Everything below is derived at read time from the
256 ledger and `now`, and written down when it is derived.
257
258 - **The turn window** (default 6h, range 15m–48h) is how long the seat to act
259 has. A window that passes unplayed is an **automatic pass**: the engine
260 writes a real `pass` act for that seat, marked `lapsed`, and the turn moves
261 on. Several windows may lapse at once; each becomes one pass, exactly once.
262 - **The deadline** (default 24h, range 1h–14d, and never less than two turn
263 windows) runs from the moment the table starts playing.
264 - **The impound.** If the deadline passes with no binding, the table is
265 **impounded**: nothing is set, and **every seat scores 0**. Charges, sworn
266 claims and the verdict on every said claim are revealed exactly as a binding
267 reveals them.
268
269 The impound is not a draw. Zero is a fine result for the seat whose dread was
270 about to be triggered, and a disaster for the seat holding a satisfied 5. The
271 clock is therefore a bargaining position: running it down is a move that
272 nobody has to announce.
273
274 The game always ends. Every lapsed window produces a pass, and the deadline
275 ends the table whether or not anyone is still playing.
276
277 ---
278
279 ## 9. The binding, the settlement and the reveal
280
281 The standing offer **binds the moment acceptances of it reach the quorum** —
282 ⌈n/2⌉+1 seats: 3 of 4, 4 of 5, 4 of 6. Binding is not a vote to be closed and
283 not a step anyone takes; it happens inside the acceptance that reaches it.
284
285 At settlement, in one transaction:
286
287 1. The standing offer is stored as the **accord of record**.
288 2. **Every seat** is scored against it by §4 — accepting or not, present or
289 lapsed — and the score is written down. It is a record, not a calculation
290 redone on every read.
291 3. The table becomes `settled`, with the time it settled.
292 4. No further act is accepted, at any door.
293
294 Then **the reveal**, which is the same for a settled table and an impounded
295 one: every charge in full, every seat's score, the ranking, and every said
296 claim marked true or false. Sworn claims were already public.
297
298 Ranking is by score, highest first. Seats tied on score share the rank and
299 are shown in seat order. There is no tie-break; a shared win is a shared win.
300
301 A settled table keeps this record permanently, readable by anyone who can see
302 the app — the accord, the scores, who swore what and when, and every claim
303 with its verdict.
304
305 ---
306
307 ## 10. A worked example
308
309 A four-seat table. Seed `tidewater`, seats Ash (0), Brail (1), Cleat (2),
310 Dunnage (3). Quorum is ⌈4/2⌉+1 = **3**.
311
312 **The charter** (7 of the 12):
313
314 | clause | settings |
315 | ----------- | -------------------------------------------------- |
316 | `beacon` | kept · sold · scuttled |
317 | `hold` | opened · sealed · flooded |
318 | `ledger` | published · redacted · burned |
319 | `pilot` | reinstated · paid_off · put_ashore |
320 | `name` | kept · changed · struck |
321 | `chart` | shared · sold · locked |
322 | `salvage` | split_evenly · to_the_finders · to_the_crown |
323
324 **The charges** — secret until the reveal. Shown here so the arithmetic can
325 be checked by hand.
326
327 | seat | +5 | +3 | +2 | +1 | dread −3 |
328 | ----------- | ------------------------- | --------------------- | ------------------- | ------------------------- | ------------------------- |
329 | Ash (0) | `salvage=to_the_finders` | `beacon=kept` | — | `ledger=redacted` | `pilot=put_ashore` |
330 | Brail (1) | `ledger=published` | — | `hold=opened` | `name=changed` | `salvage=to_the_crown` |
331 | Cleat (2) | — | `pilot=reinstated` | `chart=shared` | `salvage=to_the_finders` | `beacon=scuttled` |
332 | Dunnage (3) | `beacon=kept` | `hold=sealed` | `name=kept` | — | `ledger=redacted` |
333
334 Each charge is 4 aims on 4 distinct clauses, with three distinct positive
335 weights. Brail wants the Ledger `published`; Ash is paid a little for
336 `redacted` and Dunnage dreads it. Brail wants the Hold `opened`, Dunnage
337 `sealed`. No accord satisfies everyone.
338
339 **The ledger.**
340
341 | # | seat | act | what |
342 | - | ------- | ------ | ------------------------------------------------------------------------------------------------------ |
343 | 1 | Ash | offer | **A₁** = beacon kept · hold sealed · **ledger redacted** · pilot reinstated · **name kept** · chart locked · salvage to_the_finders. Says *(ledger, redacted, small)*. |
344 | 2 | Brail | pass | Says *(ledger, published, large)*. |
345 | 3 | Cleat | accept | A₁ satisfies his `pilot=reinstated` (3) and `salvage=to_the_finders` (1); both secret, he picks the loud one. **Swears `pilot=reinstated`, weight 3.** |
346 | 4 | Dunnage | pass | A₁ would pay him 5+3+2−3 = 7, but he wants the Ledger published. Says *(ledger, redacted, **none**)*. |
347 | 5 | Ash | offer | **A₂** = beacon kept · hold sealed · **ledger published** · pilot reinstated · **name changed** · chart locked · salvage to_the_finders. She spends her own +1 to buy Brail. This **clears Cleat's acceptance**; his sworn claim stands. |
348 | 6 | Brail | accept | A₂ satisfies `ledger=published` (5) and `name=changed` (1), both still secret — *said* is not *sworn*. He cites the cheap one: **swears `name=changed`, weight 1.** |
349 | 7 | Cleat | accept | A₂ satisfies `pilot=reinstated` — already sworn, so not citable — and `salvage=to_the_finders`, still secret. Secrets first: **swears `salvage=to_the_finders`, weight 1.** |
350 | 8 | Dunnage | pass | A₂ pays him 8 and triggers nothing. He holds out for `name=kept` anyway. |
351 | 9 | Ash | accept | Her own offer. It satisfies `salvage=to_the_finders` (5) and `beacon=kept` (3), both secret; she cites the cheaper truth: **swears `beacon=kept`, weight 3.** Third acceptance — **quorum. A₂ binds.** |
352
353 **The scores**, every seat against A₂:
354
355 | seat | satisfied | dread triggered? | score |
356 | ----------- | ---------------------------------------------------- | ------------------------------------- | ----: |
357 | Ash (0) | `salvage=to_the_finders` +5, `beacon=kept` +3; `ledger=redacted` missed | `pilot=put_ashore` — no (reinstated) | **8** |
358 | Brail (1) | `ledger=published` +5, `name=changed` +1; `hold=opened` missed | `salvage=to_the_crown` — no | **6** |
359 | Cleat (2) | `pilot=reinstated` +3, `salvage=to_the_finders` +1; `chart=shared` missed | `beacon=scuttled` — no | **4** |
360 | Dunnage (3) | `beacon=kept` +5, `hold=sealed` +3; `name=kept` missed | `ledger=redacted` — no (published) | **8** |
361
362 Ranking: **Ash and Dunnage tied at 8**, Brail 6, Cleat 4. Dunnage never
363 signed a thing, published nothing about himself, and tied for first — the
364 accord scores every seat, and holding out is a real strategy that a quorum
365 can nevertheless settle over.
366
367 **The said claims at the reveal:**
368
369 | act | seat | said | true worth | verdict |
370 | --- | ------- | ----------------------------- | --------------------------------------------- | --------- |
371 | 1 | Ash | *(ledger, redacted, small)* | +1 → `small` | **true** |
372 | 2 | Brail | *(ledger, published, large)* | +5 → `large` | **true** |
373 | 4 | Dunnage | *(ledger, redacted, none)* | his dread sits exactly there → `dread` | **false** |
374
375 Dunnage's lie worked: it helped move the Ledger to `published`, which is what
376 his charge needed. It also went on the record, and the table read it, in
377 public, at the end.
378
379 ---
380
381 ## 11. Why this is not a board game you know
382
383 The skeleton is borrowed, and honestly: hidden individual agendas settled by
384 one binding multi-clause vote is the shape of *Junta*'s budget and *The
385 Republic of Rome*'s senate; negotiating by post over hours with no board
386 between turns is *Diplomacy*'s; structured lies audited at the end is the
387 family *Sheriff of Nottingham* and the social-deduction games belong to.
388
389 What is not borrowed is the price of a signature. In every game above, talk is
390 free and a promise is worth whatever the table thinks of you. Here the engine
391 holds your charge and checks your citation, so **accepting an accord forces
392 you to publish one true, fresh, specific fact about what you want and what it
393 is worth to you** — and you only have three such facts to spend. You cannot
394 buy a seat's signature without making them pay the room in information the
395 room will use against them in the next offer. Holding out keeps you opaque,
396 but the quorum can settle without you and the accord scores you anyway, so
397 silence is not safety. Lying is still available, in the *said* register, cheap
398 and plentiful — and read out true-or-false in front of everyone at the end.
399
400 There is no board, no map, no units, no resources, no rounds and no
401 turn-by-turn economy. There is a document, a seat order, a clock, and one
402 moment where the document becomes binding.
403
404 ---
405
406 ## 12. What every rule reads
407
408 Each rule here is a function of stored state. For implementers, and for the
409 next issue that wants to add one:
410
411 | rule | reads |
412 | ------------------------ | ------------------------------------------------------------ |
413 | charter, charges | seed + seat count (dealt once, stored) |
414 | whose turn | seat count + count of acts |
415 | standing offer | the latest `offer` act |
416 | acceptances | `accept` acts after the latest `offer` act |
417 | is this accord legal | the accord + this table's charter |
418 | may I accept, and citing what | caller's charge + standing offer + caller's sworn claims |
419 | said claim legal | the claim's shape + this table's charter |
420 | quorum reached | seat count + acceptances of the standing offer |
421 | score | a charge + the accord of record |
422 | said verdict | a charge + the claim |
423 | whose window has lapsed | acts + `turn_seconds` + `now` |
424 | impound | `started_at` + `deadline_seconds` + `now` + no binding |
425
426 Nothing here reads a player's intent, a chat log or a human judgement, and
427 nothing here needs a random number after the deal.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs