{"messages":[{"content":"You are a constitutional council ranking individual git commits for ownership allocation.\n\nCompare these two commits. Decide which contributed more lasting value to the project.\n\nJudge substance, not spectacle:\n- Prefer correct, lasting design and real bugfixes over churn, formatting, renames, or generated noise.\n- Prefer clarity and necessity over sheer line count. A small precise change can beat a large diffuse one.\n- Do not favor a side merely because its patch is longer or noisier.\n- Weight what the change does for the project, not the contributor's name.\n\nReturn ONLY a JSON object: {\"winner\": \"A\" or \"B\", \"ratio\": \"N:M\", \"explanation\": \"...\"}\nThe explanation must cite concrete differences in the patches (1-3 sentences).\n\nSide A — contributor: tommy-mor\nSide A — commit message:\n[62d18183] room create path\n\nSide A — unified diff (full patch):\ndiff --git a/cli/GUIDE.sorter b/cli/GUIDE.sorter\nindex dcb06a46045564f8f6f6acffbda6f88644d453cc..9828cba4d9c17b7cce3de597d8724609b2b2adbe 100644\n--- a/cli/GUIDE.sorter\n+++ b/cli/GUIDE.sorter\n@@ -128,7 +128,7 @@ This means participation is collaborative by default. When you receive a compari\n ~/intro/scoping {\n Scoped by room:\n public … Shared site (room id \"public\").\n- private … Private room (e.g. abc12xy/my-project from RoomCreate over RPC).\n+ private … Private room (create with `npx slugsocial room create ` after OAuth — prints e.g. abc12xy/my-project).\n \n Writes from the CLI are only via forum post: the forum channel tag is the first argument after post (no #). Humans post through the website; CLI requires --delegate (agent identity).\n \n@@ -144,7 +144,7 @@ Examples:\n \n Garden and check do not take a forum tag on the command line the same way; check is a dry-run against public garden semantics.\n \n-Global (no room prefix): identity, whoami, feed, search, healthz.\n+Global (no room prefix): room, identity, whoami, feed, search, healthz.\n }\n \n ~/intro/example-session {\n@@ -152,6 +152,10 @@ Global (no room prefix): identity, whoami, feed, search, healthz.\n npx slugsocial identity start --rig claudecode --model anthropic/claude-sonnet-4.5\n # Poll until signed in; keep the printed uuid:rig:model for --delegate (do not publish to shared memory).\n \n+# Private room (optional): creates shortid/slug you pass to `private …`\n+# npx slugsocial room create austin\n+# npx slugsocial private invite-link --caps view,post,vote --uses 5\n+\n # Get sibling items to compare (path: no ~ in CLI; shell expands ~ to home)\n npx slugsocial public garden pair languages\n \n@@ -192,8 +196,12 @@ forum post --delegate DELEGATE [FILE] Post a .sorter doc (stdin if no\n \n check [FILE] Validate without submitting (public garden dry-run)\n \n+invite-link --caps view,post[,…] [--uses N] Mint shareable /join/… link (private rooms; Manage required)\n+audit [--json] List principals + capabilities (private rooms; View or Manage)\n+\n Global (no public/private prefix):\n \n+room create Create a private room (bearer required); prints ROOM_ID for `private …` (use `public …` for the shared site, not a room)\n identity start --rig --model New delegate id + OAuth pending session\n identity poll Complete OAuth; saves bearer token\n \ndiff --git a/cli/src/main.rs b/cli/src/main.rs\nindex 8eda9f485bd1f7392f1e34be27176c21e20354eb..5b1a5845e90bfea9bd9a1e1af5744e97e566b5ae 100644\n--- a/cli/src/main.rs\n+++ b/cli/src/main.rs\n@@ -140,6 +140,12 @@ enum Command {\n sub: ScopedCmd,\n },\n \n+ /// Private rooms: create (requires signed-in CLI token from `identity …`)\n+ Room {\n+ #[command(subcommand)]\n+ sub: RoomCmd,\n+ },\n+\n /// Show all activity since you last posted (global feed)\n ///\n /// Returns all ingests since this actor's last ingest, newest first.\n@@ -203,6 +209,18 @@ enum Command {\n },\n }\n \n+#[derive(Subcommand, Debug)]\n+enum RoomCmd {\n+ /// Create a private room; prints `shortid/slug` for `private …` (public site is `public …`, not a room)\n+ Create {\n+ /// Room slug (lowercase letters, digits, hyphens; 1–64 chars), e.g. `austin` or `my-project`\n+ #[arg(value_name = \"SLUG\")]\n+ slug: String,\n+ #[arg(long)]\n+ json: bool,\n+ },\n+}\n+\n #[derive(Subcommand, Debug)]\n enum IdentityCmd {\n /// Create agent delegate + pending session; output OAuth URL (exit immediately — do not poll here)\n@@ -1252,6 +1270,43 @@ async fn main() -> Result<()> {\n match cmd {\n Command::Public { sub } => run_scoped(base, \"public\", sub).await?,\n Command::Private { room, sub } => run_scoped(base, &room, sub).await?,\n+ Command::Room { sub } => match sub {\n+ RoomCmd::Create { slug, json } => {\n+ let client = http_client()?;\n+ let bearer = effective_bearer().ok_or_else(|| {\n+ anyhow!(\n+ \"no bearer token: run `slugsocial identity start --rig --model ` \\\n+ then `slugsocial identity poll `, or set SLUG_BEARER_TOKEN / ~/.config/slugsocial/token\"\n+ )\n+ })?;\n+ let batch = send_rpc(\n+ &client,\n+ base,\n+ Some(&bearer),\n+ vec![RpcCommand::RoomCreate { slug }],\n+ )\n+ .await?;\n+ match rpc_line_ok(&batch.results[0])? {\n+ RpcResult::RoomCreated { room_id } => {\n+ if json {\n+ println!(\n+ \"{}\",\n+ serde_json::to_string_pretty(&serde_json::json!({\n+ \"ok\": true,\n+ \"room_id\": room_id,\n+ }))?\n+ );\n+ } else {\n+ println!(\"{room_id}\");\n+ println!();\n+ println!(\"Next: npx slugsocial private {room_id} forum post --delegate '…' …\");\n+ println!(\" npx slugsocial private {room_id} invite-link --caps view,post,vote\");\n+ }\n+ }\n+ _ => return Err(anyhow!(\"unexpected RPC result\")),\n+ }\n+ }\n+ },\n \n Command::Healthz { json } => {\n let client = http_client()?;\ndiff --git a/server/src/api/rpc.rs b/server/src/api/rpc.rs\nindex f6bbc3df71909a2da7403cd46fe4ea6ca130c692..7d384e938a526bdf6aa04d1bf21a54d3fcb57d7e 100644\n--- a/server/src/api/rpc.rs\n+++ b/server/src/api/rpc.rs\n@@ -14,7 +14,7 @@ use crate::{\n canonical_path::{canonicalize_item, canonicalize_tag},\n dsl,\n events::{\n- AgentBound, Event, GrantAdded, Ingest, RoomCreated, ThreadCapability, ThreadVisibility,\n+ AgentBound, Event, GrantAdded, Ingest, RoomCreated, ThreadCapability,\n },\n identity::{parse_agent, parse_username},\n path_types::CanonicalItemUrl,\n@@ -270,7 +270,7 @@ async fn rpc_post(\n let scope = scope_from_room_wire(&room_key);\n \n let is_private = !matches!(scope, ScopeId::Public);\n- if is_private && !reduced.rooms.contains_key(&room_key) {\n+ if is_private && !reduced.rooms.contains(&room_key) {\n drop(reduced);\n return Err((\"unknown room\".into(), Some(format!(\"room `{}` does not exist\", room_key))));\n }\n@@ -958,7 +958,7 @@ pub async fn handle_rpc_batch(\n let reduced = state.reduced.read().await;\n line_ok(RpcResult::ForumThreads(rpc_list_forum_threads(&reduced, &room)))\n }\n- RpcCommand::RoomCreate { slug, visibility } => {\n+ RpcCommand::RoomCreate { slug } => {\n // Scope the first read so its guard drops before any nested `read().await` / `write().await`.\n // A guard from `match verify(..., &*state.reduced.read().await)` would otherwise live for the\n // whole `match` and deadlock here (tokio::sync::RwLock is not reentrant).\n@@ -975,53 +975,42 @@ pub async fn handle_rpc_batch(\n } else if !slug.chars().all(|c| c.is_ascii_alphanumeric() || c == '-') {\n line_err(\"slug must be lowercase alphanumeric with hyphens\", None)\n } else {\n- match visibility.as_deref().unwrap_or(\"private\") {\n- \"private\" | \"public\" => {\n- let vis = if visibility.as_deref() == Some(\"public\") {\n- ThreadVisibility::Public\n- } else {\n- ThreadVisibility::Private\n- };\n- let short_id = loop {\n- let id = gen_short_id();\n- if !state.reduced.read().await.rooms.contains_key(&format!(\"{id}/{slug}\")) {\n- break id;\n- }\n- };\n- let room_id = format!(\"{short_id}/{slug}\");\n- let ts = now_ms();\n- let tc_ev = Event::RoomCreated(RoomCreated {\n- ts,\n- room_id: room_id.clone(),\n- slug: slug.clone(),\n- owner: principal.clone(),\n- visibility: vis,\n- });\n- let ga_ev = Event::GrantAdded(GrantAdded {\n- ts,\n- room_id: room_id.clone(),\n- username: principal.clone(),\n- capabilities: vec![\n- ThreadCapability::View,\n- ThreadCapability::Post,\n- ThreadCapability::Vote,\n- ThreadCapability::AddItem,\n- ThreadCapability::Manage,\n- ],\n- granted_by: principal.clone(),\n- });\n- if let Err(e) = state.event_log.append(&tc_ev).await {\n- line_err(format!(\"{e}\"), None)\n- } else if let Err(e) = state.event_log.append(&ga_ev).await {\n- line_err(format!(\"{e}\"), None)\n- } else {\n- let mut r = state.reduced.write().await;\n- r.apply_event(tc_ev);\n- r.apply_event(ga_ev);\n- line_ok(RpcResult::RoomCreated { room_id })\n- }\n+ let short_id = loop {\n+ let id = gen_short_id();\n+ if !state.reduced.read().await.rooms.contains(&format!(\"{id}/{slug}\")) {\n+ break id;\n }\n- other => line_err(format!(\"unknown visibility: {other}\"), None),\n+ };\n+ let room_id = format!(\"{short_id}/{slug}\");\n+ let ts = now_ms();\n+ let tc_ev = Event::RoomCreated(RoomCreated {\n+ ts,\n+ room_id: room_id.clone(),\n+ slug: slug.clone(),\n+ owner: principal.clone(),\n+ });\n+ let ga_ev = Event::GrantAdded(GrantAdded {\n+ ts,\n+ room_id: room_id.clone(),\n+ username: principal.clone(),\n+ capabilities: vec![\n+ ThreadCapability::View,\n+ ThreadCapability::Post,\n+ ThreadCapability::Vote,\n+ ThreadCapability::AddItem,\n+ ThreadCapability::Manage,\n+ ],\n+ granted_by: principal.clone(),\n+ });\n+ if let Err(e) = state.event_log.append(&tc_ev).await {\n+ line_err(format!(\"{e}\"), None)\n+ } else if let Err(e) = state.event_log.append(&ga_ev).await {\n+ line_err(format!(\"{e}\"), None)\n+ } else {\n+ let mut r = state.reduced.write().await;\n+ r.apply_event(tc_ev);\n+ r.apply_event(ga_ev);\n+ line_ok(RpcResult::RoomCreated { room_id })\n }\n }\n }\n@@ -1161,7 +1150,7 @@ pub async fn handle_rpc_batch(\n Err((_, m)) => line_err(m, None),\n Ok(principal) => {\n let reduced = state.reduced.read().await;\n- if !reduced.rooms.contains_key(&room) {\n+ if !reduced.rooms.contains(&room) {\n line_err(\"unknown room\", None)\n } else {\n let can_audit = reduced.user_has_cap(&room, &principal, ThreadCapability::View)\ndiff --git a/server/src/events.rs b/server/src/events.rs\nindex 9e60f2c218f5c871a93e855e415dd984e3a017c5..b4ffed95ead228b9cb37ce50953b13efb958a73d 100644\n--- a/server/src/events.rs\n+++ b/server/src/events.rs\n@@ -1,12 +1,5 @@\n use serde::{Deserialize, Serialize};\n \n-#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)]\n-#[serde(rename_all = \"snake_case\")]\n-pub enum ThreadVisibility {\n- Public,\n- Private,\n-}\n-\n #[derive(Debug, Clone, Copy, Hash, Serialize, Deserialize, PartialEq, Eq)]\n #[serde(rename_all = \"snake_case\")]\n pub enum ThreadCapability {\n@@ -57,13 +50,13 @@ pub struct AgentBound {\n pub username: String,\n }\n \n+/// Private space keyed as `shortid/slug`.\n #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]\n pub struct RoomCreated {\n pub ts: i64,\n pub room_id: String,\n pub slug: String,\n pub owner: String,\n- pub visibility: ThreadVisibility,\n }\n \n #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]\ndiff --git a/server/src/html/search.rs b/server/src/html/search.rs\nindex 9353cf229fbbd2cfbab5b89ba63ebe192042c91f..694220a038b335f19ac33cb3fb33c74a625bcc51 100644\n--- a/server/src/html/search.rs\n+++ b/server/src/html/search.rs\n@@ -113,7 +113,7 @@ fn search(state: &ReducerState, q: &str, limit: usize) -> SearchResults {\n }\n }\n \n- // Search threads (public room only in HTML)\n+ // Search threads (shared site scope only — `room` wire `public`)\n for ((scope, tag), thread_state) in &state.forum_threads {\n if scope != &ScopeId::Public {\n continue;\ndiff --git a/server/src/reducer.rs b/server/src/reducer.rs\nindex 5190d0a7ee3d545a786a68fef483322aafdce7f9..e06445fa4441771cda0d3474bedccf6f19a36b5f 100644\n--- a/server/src/reducer.rs\n+++ b/server/src/reducer.rs\n@@ -3,7 +3,7 @@ use std::collections::{HashMap, HashSet, VecDeque};\n use serde::{Deserialize, Serialize};\n \n use crate::canonical_path::canonicalize_tag;\n-use crate::events::{Event, Ingest, ThreadCapability, ThreadVisibility};\n+use crate::events::{Event, Ingest, ThreadCapability};\n use crate::path_types::CanonicalItemUrl;\n \n #[derive(Debug, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)]\n@@ -151,11 +151,6 @@ pub struct RankHistoryEntry {\n pub post_id: String,\n }\n \n-#[derive(Debug, Clone)]\n-pub struct RoomState {\n- pub visibility: crate::events::ThreadVisibility,\n-}\n-\n /// Durable invite link state (from [`crate::events::InviteMinted`] / [`crate::events::InviteRedeemed`]).\n #[derive(Debug, Clone)]\n pub struct ActiveInviteState {\n@@ -171,7 +166,6 @@ pub enum RoomTimelineKind {\n RoomCreated {\n owner: String,\n slug: String,\n- visibility: ThreadVisibility,\n },\n GrantAdded {\n username: String,\n@@ -235,8 +229,8 @@ pub struct ReducerState {\n pub ingests_by_id: HashMap,\n /// (scope, thread_tag) → ingest ids, newest first.\n pub ingests_by_scope_thread: HashMap<(ScopeId, String), VecDeque>,\n- /// Private (or public) room registry: room_id → visibility from [`RoomCreated`].\n- pub rooms: HashMap,\n+ /// Private room ids (`shortid/slug`) known from [`RoomCreated`].\n+ pub rooms: HashSet,\n /// (scope, thread_tag) → last activity.\n pub forum_threads: HashMap<(ScopeId, String), ForumThreadState>,\n pub actor_last_post_ts: HashMap,\n@@ -403,12 +397,7 @@ impl ReducerState {\n self.agent_bindings.insert(ab.agent, ab.username);\n }\n Event::RoomCreated(rc) => {\n- self.rooms.insert(\n- rc.room_id.clone(),\n- RoomState {\n- visibility: rc.visibility,\n- },\n- );\n+ self.rooms.insert(rc.room_id.clone());\n self.room_timeline\n .entry(rc.room_id.clone())\n .or_default()\n@@ -417,7 +406,6 @@ impl ReducerState {\n kind: RoomTimelineKind::RoomCreated {\n owner: rc.owner.clone(),\n slug: rc.slug.clone(),\n- visibility: rc.visibility,\n },\n });\n }\n@@ -673,7 +661,7 @@ impl Default for ReducerState {\n agent_bindings: HashMap::new(),\n ingests_by_id: HashMap::new(),\n ingests_by_scope_thread: HashMap::new(),\n- rooms: HashMap::new(),\n+ rooms: HashSet::new(),\n forum_threads: HashMap::new(),\n actor_last_post_ts: HashMap::new(),\n ingests_ordered: Vec::new(),\ndiff --git a/server/src/timeline.rs b/server/src/timeline.rs\nindex 251158943ab36d3015268e35f6bdd01c3f42ab3b..265ca4ae9946ecd29a7d1d4ec791de8465ce658e 100644\n--- a/server/src/timeline.rs\n+++ b/server/src/timeline.rs\n@@ -25,16 +25,8 @@ fn caps_list(caps: &[crate::events::ThreadCapability]) -> String {\n /// Human-readable system line for the thread feed.\n pub fn format_room_timeline_entry(e: &RoomTimelineEntry) -> String {\n match &e.kind {\n- RoomTimelineKind::RoomCreated {\n- owner,\n- slug,\n- visibility,\n- } => {\n- let vis = match visibility {\n- crate::events::ThreadVisibility::Public => \"public\",\n- crate::events::ThreadVisibility::Private => \"private\",\n- };\n- format!(\"@{owner} created room #{slug} ({vis})\")\n+ RoomTimelineKind::RoomCreated { owner, slug } => {\n+ format!(\"@{owner} created room #{slug}\")\n }\n RoomTimelineKind::GrantAdded {\n username,\n@@ -141,7 +133,7 @@ pub fn merge_thread_rows(\n rows\n }\n \n-/// Public forum thread (`room_wire == \"public\"`): same merge (timeline usually empty).\n+/// Shared-site thread view (`room_wire == \"public\"` on the wire). Same merge as private rooms; private-room timeline is unused here.\n pub fn merge_public_thread_rows(\n reduced: &ReducerState,\n thread_tag: &str,\ndiff --git a/server/tests/integration.rs b/server/tests/integration.rs\nindex b930120da09fe7d307f0411b84fb639fb8bd0b15..139fdda27d2276e3b30116816495648970d24c5f 100644\n--- a/server/tests/integration.rs\n+++ b/server/tests/integration.rs\n@@ -96,11 +96,11 @@ async fn test_healthz() {\n }\n \n #[tokio::test]\n-async fn test_room_create_private_rpc() {\n+async fn test_room_create_rpc() {\n let (addr, _tmp, _log, _handle) = create_test_server().await;\n let client = reqwest::Client::new();\n let batch = serde_json::json!([{\n- \"RoomCreate\": { \"slug\": \"secret-project\", \"visibility\": \"private\" }\n+ \"RoomCreate\": { \"slug\": \"secret-project\" }\n }]);\n let body = rpc_batch(&client, addr, Some(&test_bearer()), batch).await;\n let line = &body[\"results\"][0];\ndiff --git a/test/grants.bb b/test/grants.bb\nindex 4ded5ce92576cdea653cce0ba8a751be4374731a..697e7d91545dd3ee96efde07fc8c3cf90f1a8056 100644\n--- a/test/grants.bb\n+++ b/test/grants.bb\n@@ -82,7 +82,7 @@\n ;; Alice creates a private room.\n _ (println \"\\nalice creates private room…\")\n create (rpc-batch! base-url alice-token\n- [{\"RoomCreate\" {\"slug\" \"secret-project\" \"visibility\" \"private\"}}])\n+ [{\"RoomCreate\" {\"slug\" \"secret-project\"}}])\n _ (assert! (= 200 (:status create)) \"room create HTTP 200\")\n _ (assert! (rpc-line-ok? (:parsed create)) \"room create RPC ok\")\n room-id (get-in (:parsed create) [\"results\" 0 \"result\" \"RoomCreated\" \"room_id\"])\ndiff --git a/test/invites.bb b/test/invites.bb\nindex f72b1e630a6856174cdef11eb977e2f81b16e551..ca0fd6c858400671452c4ec59c490d05101dd0e4 100644\n--- a/test/invites.bb\n+++ b/test/invites.bb\n@@ -86,7 +86,7 @@\n \n _ (println \"\\nalice creates private room…\")\n create (rpc-batch! base-url alice-token\n- [{\"RoomCreate\" {\"slug\" \"invite-demo\" \"visibility\" \"private\"}}])\n+ [{\"RoomCreate\" {\"slug\" \"invite-demo\"}}])\n _ (assert! (= 200 (:status create)) \"room create HTTP 200\")\n _ (assert! (rpc-line-ok? (:parsed create)) \"room create RPC ok\")\n room-id (get-in (:parsed create) [\"results\" 0 \"result\" \"RoomCreated\" \"room_id\"])\ndiff --git a/types/src/lib.rs b/types/src/lib.rs\nindex 98c66a00fd27803ef6f75b5ac478ff2eb762d771..bb8586f1734f77d95598a9294bdb0de2d55bf715 100644\n--- a/types/src/lib.rs\n+++ b/types/src/lib.rs\n@@ -319,8 +319,6 @@ pub enum RpcCommand {\n },\n RoomCreate {\n slug: String,\n- #[serde(default, skip_serializing_if = \"Option::is_none\")]\n- visibility: Option,\n },\n RoomGrant {\n room: String,\n\n\nSide B — contributor: tommy-mor\nSide B — commit message:\n[6bda2635] Use title-first items and explanation-first votes (#135)\n\n* Require block-first sorter DSL statements\n\nCo-authored-by: tommy \n\n* Use title-first items with explanation-first votes\n\nCo-authored-by: tommy \n\n* Update garden vote test DSL fixtures\n\nCo-authored-by: tommy \n\n* Update browser vote DSL payloads\n\nCo-authored-by: tommy \n\n---------\n\nCo-authored-by: Cursor Agent \n\nSide B — unified diff (full patch):\ndiff --git a/cli/DSL.txt b/cli/DSL.txt\nindex 18f69ef25f01583fddf9fc90e077bb2c3fa72bb6..c9b12bf0edaf73ad252f0a202b7fe61e311df50a 100644\n--- a/cli/DSL.txt\n+++ b/cli/DSL.txt\n@@ -18,9 +18,20 @@ Blank lines are preserved to maintain paragraph structure.\n ~/item/a {itembody}\n ~/python { A high-level scripting language }\n \n-~/item/a > ~/python { Item A is better because of X. }\n-~/python 3:1 ~/go { Python's ecosystem is much richer than Go's. }\n-https://example.com/lang = ~/go { They are equally good in this context. }\n+{\n+Item A is better because of X.\n+}\n+~/item/a > ~/python\n+\n+{\n+Python's ecosystem is much richer than Go's.\n+}\n+~/python 3:1 ~/go\n+\n+{\n+They are equally good in this context.\n+}\n+https://example.com/lang = ~/go\n ```\n \n SYNTAX RULES\n@@ -35,7 +46,7 @@ Starts a thread. Tag allows alphanumeric, `-`, `_`, and `/`. Subtitle max 100 ch\n ~/ { description }\n ```\n Defines an ontology item (garden layer). Paths can be nested (e.g. `~/languages/python`).\n-A leading `/` alone is **not** allowed in the DSL — use `~/` only. Descriptions (bodies) are wrapped in `{}`. Can be adjacent (e.g. `~/arrived{ready}`).\n+A leading `/` alone is **not** allowed in the DSL — use `~/` only. Descriptions (bodies) are wrapped in `{}` and follow the item path.\n \n ```sorter\n https://example.com/item { description }\n@@ -46,7 +57,10 @@ Canonicalization rules for URLs:\n - `~/` and `https://slug.social/~/` map to the same local item path.\n \n ```sorter\n- { required explanation }\n+{\n+required explanation\n+}\n+ \n ```\n Compares two items. The explanation is REQUIRED.\n Comparisons:\n@@ -65,7 +79,8 @@ When writing bodies or explanations, you can use braces `{}` and code blocks wit\n 3. Single braces: { ... }\n \n ```sorter\n-~/code { Here is a block: ```def foo(): return {\"a\": 1}``` }\n+{ Here is a block: ```def foo(): return {\"a\": 1}``` }\n+~/code\n ```\n \n STYLE\ndiff --git a/cli/GUIDE.sorter b/cli/GUIDE.sorter\nindex 7ea1c2649cb4a323b46f0bf389025079a9c9ab43..86accba72ecea547215d947fb6552e0ead25687c 100644\n--- a/cli/GUIDE.sorter\n+++ b/cli/GUIDE.sorter\n@@ -83,7 +83,8 @@ Item definitions (attaches a description to an item):\n ~/thread/item { description }\n \n Comparisons:\n- ~/thread/item-a 3:1 ~/thread/item-b { reasoning }\n+ { reasoning }\n+ ~/thread/item-a 3:1 ~/thread/item-b\n \n Ratio formats:\n 3:1 left is 3x better than right\n@@ -95,8 +96,7 @@ Shorthand:\n < means 1:2 (right is better)\n = means 1:1 (equal)\n \n-Bodies can attach without whitespace:\n- ~/thread/item{Description here}\n+Item bodies follow the item path. Vote explanations come first; the comparison is the verdict line.\n }\n \n You can write any prose in your posts. These won't be part of the garden but only the thread.\n@@ -165,7 +165,8 @@ npx slugsocial public forum post languages --delegate '7a3b9c2d-1234-5678-90ab-c\n \n ~/languages/python { A high-level language focused on readability. }\n ~/languages/rust { A systems language focused on safety and performance. }\n-~/languages/python 2:1 ~/languages/rust { Python has simpler syntax for beginners - fewer symbols, explicit over implicit. Rust's borrow checker adds cognitive load even for simple programs. Both are readable once learned, but Python's learning curve is gentler. }\n+{ Python has simpler syntax for beginners - fewer symbols, explicit over implicit. Rust's borrow checker adds cognitive load even for simple programs. Both are readable once learned, but Python's learning curve is gentler. }\n+~/languages/python 2:1 ~/languages/rust\n EOF\n \n # See current ranking\ndiff --git a/ideas/single-thread.md b/ideas/single-thread.md\nindex 86230fe6119c31045c21dbfcb12311b323c02fa8..0efb7199524cc3b308b1922c03e3a99193e4586c 100644\n--- a/ideas/single-thread.md\n+++ b/ideas/single-thread.md\n@@ -15,7 +15,8 @@ Previously a `.sorter` document could scatter `#tags` throughout:\n ~/languages/rust {A systems language.}\n #tools\n ~/tools/cargo {Rust's build system.}\n-~/languages/rust 2:1 ~/tools/cargo {Rust is more foundational than its tooling.}\n+{Rust is more foundational than its tooling.}\n+~/languages/rust 2:1 ~/tools/cargo\n ```\n \n The system would fan the ingest into both `#languages` and `#tools` — the same\ndiff --git a/server/src/api/mod.rs b/server/src/api/mod.rs\nindex 9f3c1cc21c2ae157c024a447980a97e190c8f066..920e967b47852ea82fa61b84c457ae3582dd9800 100644\n--- a/server/src/api/mod.rs\n+++ b/server/src/api/mod.rs\n@@ -72,16 +72,16 @@ mod tests {\n apply_ingest(\n &mut reduced,\n 1,\n- \"~/t/a {a}\\n~/t/b {b}\\n~/t/a 2:1 ~/t/b {because}\\n\",\n+ \"~/t/a {a}\\n~/t/b {b}\\n{because}\\n~/t/a 2:1 ~/t/b\\n\",\n );\n- let text = \"~/t/a 1:1 ~/t/b {equal}\\n\";\n+ let text = \"{equal}\\n~/t/a 1:1 ~/t/b\\n\";\n validate_ingest_document(&reduced, text, &crate::reducer::ScopeId::Public).unwrap();\n }\n \n #[test]\n fn validate_ingest_document_rejects_vote_on_undefined_item() {\n let reduced = ReducerState::default();\n- let text = \"~/t/a {x}\\n~/t/b 1:1 ~/t/missing {why}\\n\";\n+ let text = \"~/t/a {x}\\n{why}\\n~/t/b 1:1 ~/t/missing\\n\";\n let err = validate_ingest_document(&reduced, text, &crate::reducer::ScopeId::Public).unwrap_err();\n assert_eq!(err.0, StatusCode::BAD_REQUEST);\n assert!(err.1.contains(\"undefined item\"));\ndiff --git a/server/src/api/ui_html.rs b/server/src/api/ui_html.rs\nindex 696e7b3605e2e68aee0351116c494c2958506add..7cbda3876451687aa7a55547fc06bbe86ac9d260 100644\n--- a/server/src/api/ui_html.rs\n+++ b/server/src/api/ui_html.rs\n@@ -222,13 +222,13 @@ async fn dispatch_ui_action(\n }\n \n let text = format!(\n- \"@{}\\n{} {}:{} {} {{\\n{}\\n}}\\n\",\n+ \"@{}\\n{{\\n{}\\n}}\\n{} {}:{} {}\\n\",\n crate::api::auth::WEB_BROWSER_AGENT,\n+ exp,\n left_id.as_str(),\n rl,\n rr,\n- right_id.as_str(),\n- exp\n+ right_id.as_str()\n );\n \n match rpc_post_with_bearer(state, &session.bearer, room.clone(), thread_tag.clone(), text).await {\ndiff --git a/server/src/dsl.rs b/server/src/dsl.rs\nindex 7962342bd023b3b5061a684d84d4ab164134b111..def8b497c71567016a522648b9630d7038163e41 100644\n--- a/server/src/dsl.rs\n+++ b/server/src/dsl.rs\n@@ -11,16 +11,21 @@ pub struct Document {\n /// A single statement in the DSL (or prose when using `parse_full`).\n #[derive(Debug, Clone, PartialEq, Eq)]\n pub enum Stmt {\n- Item { title: String, body: Option },\n+ Item {\n+ title: String,\n+ body: Option,\n+ },\n Vote {\n item1: String,\n item2: String,\n ratio_left: i32,\n ratio_right: i32,\n- /// Required non-empty explanation (from trailing `{ ... }`).\n+ /// Required non-empty explanation (from leading `{ ... }`).\n explanation: String,\n },\n- Prose { text: String },\n+ Prose {\n+ text: String,\n+ },\n }\n \n #[derive(Debug, thiserror::Error)]\n@@ -391,71 +396,46 @@ fn parse_comparison_at(s: &str, i: usize) -> Option<((i32, i32), usize)> {\n Some(((left, right), j))\n }\n \n-fn parse_item_statement(stripped: &str, masker: &BlockMasker) -> Result {\n- // item: (\"~/\" | \"https://...\" | \"http://...\") item_ref body?\n- // vote: same for both operands.\n- //\n- // Important: body token can be adjacent to the item name (no whitespace),\n- // e.g. \"~/arrived{...}\" -> \"~/arrived__BLOCK_x__\".\n- let s = stripped;\n- let bytes = s.as_bytes();\n- if bytes.is_empty() {\n- return Err(DslError::Parse(\"missing item statement\".to_string()));\n+fn parse_block_prefixed_statement(\n+ block_token: &str,\n+ tail: &str,\n+ masker: &BlockMasker,\n+) -> Result {\n+ // vote: block item_ref comparison item_ref\n+ let s = tail.trim_start();\n+ if s.is_empty() {\n+ return Err(DslError::Parse(\n+ \"missing vote statement after leading explanation block\".to_string(),\n+ ));\n }\n \n let (item1, j) =\n parse_item_name_at(s, 0).ok_or_else(|| DslError::Parse(\"invalid item name\".to_string()))?;\n+ let explanation = masker.extract_body(block_token);\n+ let mut i = skip_ws(s, j);\n \n- // Either we have:\n- // - immediate/whitespace block token => Item\n- // - comparison => Vote\n- // - whitespace then block token => Item\n- // - whitespace then comparison => Vote\n- let i = skip_ws(s, j);\n-\n- // If next is end or a block token => Item.\n if i >= s.len() {\n- return Ok(Stmt::Item {\n- title: item1,\n- body: None,\n- });\n- }\n- if let Some((tok, end)) = parse_block_token_at(s, i) {\n- let body = masker.extract_body(&tok);\n- let tail = s[end..].trim();\n- if !tail.is_empty() {\n- return Err(DslError::Parse(\"extra tokens after item\".to_string()));\n- }\n- return Ok(Stmt::Item {\n- title: item1,\n- body: Some(body),\n- });\n+ return Err(DslError::Parse(\n+ \"leading `{ ... }` blocks are vote explanations; item bodies belong after item paths\"\n+ .to_string(),\n+ ));\n }\n \n- // Otherwise parse comparison then \"/item2\" then REQUIRED body.\n- let ((ratio_left, ratio_right), mut k) = parse_comparison_at(s, i)\n+ let ((ratio_left, ratio_right), k) = parse_comparison_at(s, i)\n .ok_or_else(|| DslError::Parse(format!(\"invalid comparison near: {}\", &s[i..])))?;\n if ratio_left == 0 && ratio_right == 0 {\n return Err(DslError::Parse(\n \"vote ratio 0:0 is invalid; use 1:1 for a tie or omit the vote\".to_string(),\n ));\n }\n- k = skip_ws(s, k);\n- let (item2, mut m) = parse_item_name_at(s, k)\n+ i = skip_ws(s, k);\n+ let (item2, m) = parse_item_name_at(s, i)\n .ok_or_else(|| DslError::Parse(\"invalid rhs item name\".to_string()))?;\n- m = skip_ws(s, m);\n-\n- let Some((tok, end)) = parse_block_token_at(s, m) else {\n- return Err(DslError::Parse(\n- \"missing vote explanation (add a trailing `{ ... }`)\".to_string(),\n- ));\n- };\n- let explanation = masker.extract_body(&tok);\n+ i = skip_ws(s, m);\n if explanation.trim().is_empty() {\n return Err(DslError::Parse(\"empty vote explanation\".to_string()));\n }\n- m = end;\n- let tail = s[m..].trim();\n+ let tail = s[i..].trim();\n if !tail.is_empty() {\n return Err(DslError::Parse(\"extra tokens after vote\".to_string()));\n }\n@@ -469,6 +449,35 @@ fn parse_item_statement(stripped: &str, masker: &BlockMasker) -> Result Result {\n+ let (item1, j) =\n+ parse_item_name_at(stripped, 0).ok_or_else(|| DslError::Parse(\"invalid item name\".to_string()))?;\n+ let i = skip_ws(stripped, j);\n+\n+ if i >= stripped.len() {\n+ return Ok(Stmt::Item {\n+ title: item1,\n+ body: None,\n+ });\n+ }\n+\n+ if let Some((tok, end)) = parse_block_token_at(stripped, i) {\n+ let body = masker.extract_body(&tok);\n+ let tail = stripped[end..].trim();\n+ if !tail.is_empty() {\n+ return Err(DslError::Parse(\"extra tokens after item\".to_string()));\n+ }\n+ return Ok(Stmt::Item {\n+ title: item1,\n+ body: Some(body),\n+ });\n+ }\n+\n+ Err(DslError::Parse(\n+ \"vote explanations must start with a `{ ... }` block before the comparison\".to_string(),\n+ ))\n+}\n+\n fn parse_line(masked_line: &str, masker: &BlockMasker) -> Result, DslError> {\n let stripped = masked_line.trim_start();\n if stripped.is_empty() {\n@@ -477,27 +486,28 @@ fn parse_line(masked_line: &str, masker: &BlockMasker) -> Result, DslE\n let first = stripped.chars().next().unwrap();\n match first {\n '#' => Err(DslError::Parse(\"not a DSL line\".to_string())),\n- ':' => Err(DslError::Parse(\n- \"leading ':' is not supported\".to_string(),\n- )),\n+ ':' => Err(DslError::Parse(\"leading ':' is not supported\".to_string())),\n '@' => Err(DslError::Parse(\"not a DSL line\".to_string())),\n+ '_' => {\n+ let Some((tok, end)) = parse_block_token_at(stripped, 0) else {\n+ return Err(DslError::Parse(\"not a DSL line\".to_string()));\n+ };\n+ parse_block_prefixed_statement(&tok, &stripped[end..], masker).map(|stmt| vec![stmt])\n+ }\n '/' => Err(DslError::Parse(\n- \"item paths must use `~/` (e.g. `~/languages/python`), not a leading `/`\"\n- .to_string(),\n+ \"item paths must use `~/` (e.g. `~/languages/python`), not a leading `/`\".to_string(),\n )),\n- '~' => {\n- Ok(vec![parse_item_statement(stripped, masker)?])\n- }\n+ '~' => Ok(vec![parse_item_definition_statement(stripped, masker)?]),\n 'h' => {\n if stripped.starts_with(\"https://\") || stripped.starts_with(\"http://\") {\n- Ok(vec![parse_item_statement(stripped, masker)?])\n+ Ok(vec![parse_item_definition_statement(stripped, masker)?])\n } else {\n Err(DslError::Parse(\"not a DSL line\".to_string()))\n }\n }\n '-' => {\n if stripped.starts_with(\"-/\") {\n- Ok(vec![parse_item_statement(stripped, masker)?])\n+ Ok(vec![parse_item_definition_statement(stripped, masker)?])\n } else {\n Err(DslError::Parse(\"not a DSL line\".to_string()))\n }\n@@ -516,6 +526,7 @@ pub fn parse_full(text: &str) -> Result {\n let (masker, masked) = mask_all(BlockMasker::new(), text);\n let mut statements: Vec = Vec::new();\n let mut prose_buffer: Vec<&str> = Vec::new();\n+ let mut pending_block: Option = None;\n \n let flush_prose = |buf: &mut Vec<&str>, out: &mut Vec, masker: &BlockMasker| {\n if buf.is_empty() {\n@@ -529,11 +540,29 @@ pub fn parse_full(text: &str) -> Result {\n \n for line in masked.split('\\n') {\n let stripped = line.trim_start();\n+ if let Some(tok) = pending_block.as_ref() {\n+ if stripped.is_empty() {\n+ continue;\n+ }\n+ if stripped.starts_with(\"-/\")\n+ || stripped.starts_with(\"~/\")\n+ || stripped.starts_with(\"https://\")\n+ || stripped.starts_with(\"http://\")\n+ {\n+ statements.push(parse_block_prefixed_statement(tok, stripped, &masker)?);\n+ pending_block = None;\n+ continue;\n+ }\n+ return Err(DslError::Parse(\n+ \"expected vote statement after leading explanation block\".to_string(),\n+ ));\n+ }\n+\n if !stripped.is_empty()\n && (stripped.starts_with(\"-/\")\n || {\n let c = stripped.chars().next().unwrap();\n- \":/!~\".contains(c)\n+ \":/!~_\".contains(c)\n }\n || stripped.starts_with(\"https://\")\n || stripped.starts_with(\"http://\"))\n@@ -541,6 +570,13 @@ pub fn parse_full(text: &str) -> Result {\n // Flush prose buffer first\n flush_prose(&mut prose_buffer, &mut statements, &masker);\n \n+ if let Some((tok, end)) = parse_block_token_at(stripped, 0) {\n+ if stripped[end..].trim().is_empty() {\n+ pending_block = Some(tok);\n+ continue;\n+ }\n+ }\n+\n // Parse DSL line; DSL statements are not prose, so errors should propagate.\n statements.extend(parse_line(line, &masker)?);\n } else {\n@@ -548,6 +584,12 @@ pub fn parse_full(text: &str) -> Result {\n }\n }\n \n+ if pending_block.is_some() {\n+ return Err(DslError::Parse(\n+ \"missing vote statement after leading explanation block\".to_string(),\n+ ));\n+ }\n+\n // Final flush\n flush_prose(&mut prose_buffer, &mut statements, &masker);\n \n@@ -592,7 +634,7 @@ mod tests {\n \n #[test]\n fn parse_vote_ratio_and_symbols() {\n- let d1 = parse_full(\"~/a 3:1 ~/b {because}\").unwrap();\n+ let d1 = parse_full(\"{because}\\n~/a 3:1 ~/b\").unwrap();\n assert_eq!(\n d1.statements,\n vec![Stmt::Vote {\n@@ -604,7 +646,7 @@ mod tests {\n }]\n );\n \n- let d2 = parse_full(\"~/a > ~/b {because}\").unwrap();\n+ let d2 = parse_full(\"{because}\\n~/a > ~/b\").unwrap();\n assert_eq!(\n d2.statements,\n vec![Stmt::Vote {\n@@ -616,7 +658,7 @@ mod tests {\n }]\n );\n \n- let d3 = parse_full(\"~/a = ~/b {because}\").unwrap();\n+ let d3 = parse_full(\"{because}\\n~/a = ~/b\").unwrap();\n assert_eq!(\n d3.statements,\n vec![Stmt::Vote {\n@@ -631,7 +673,7 @@ mod tests {\n \n #[test]\n fn parse_vote_rejects_zero_zero_ratio() {\n- let err = parse_full(\"~/a 0:0 ~/b {tie placeholder}\").unwrap_err();\n+ let err = parse_full(\"{tie placeholder}\\n~/a 0:0 ~/b\").unwrap_err();\n let msg = match err {\n DslError::Parse(m) => m,\n };\n@@ -667,8 +709,8 @@ mod tests {\n }\n \n #[test]\n- fn parse_vote_with_attached_body_without_space() {\n- let input = \"~/a 2:1 ~/b{because}\";\n+ fn parse_vote_with_attached_explanation_without_space() {\n+ let input = \"{because}~/a 2:1 ~/b\";\n let doc = parse_full(input).unwrap();\n assert_eq!(\n doc.statements,\n@@ -697,7 +739,7 @@ mod tests {\n \n #[test]\n fn parse_nested_path_vote() {\n- let input = \"~/whitepaper/a 3:1 ~/whitepaper/b { because }\";\n+ let input = \"{ because }\\n~/whitepaper/a 3:1 ~/whitepaper/b\";\n let doc = parse_full(input).unwrap();\n assert_eq!(\n doc.statements,\n@@ -718,7 +760,10 @@ mod tests {\n let result = parse_full(input);\n assert!(result.is_err(), \"expected parse error for {input:?}\");\n assert!(\n- result.unwrap_err().to_string().contains(\"leading ':' is not supported\"),\n+ result\n+ .unwrap_err()\n+ .to_string()\n+ .contains(\"leading ':' is not supported\"),\n \"wrong error for {input:?}\"\n );\n }\n@@ -741,7 +786,35 @@ mod tests {\n let result = parse_full(input);\n assert!(result.is_err(), \"vote without explanation should fail\");\n let err_msg = result.unwrap_err().to_string();\n- assert!(err_msg.contains(\"missing vote explanation\"), \"error: {}\", err_msg);\n+ assert!(\n+ err_msg.contains(\"vote explanations must start\"),\n+ \"error: {}\",\n+ err_msg\n+ );\n+ }\n+\n+ #[test]\n+ fn parse_full_rejects_legacy_trailing_explanation_vote() {\n+ let result = parse_full(\"~/a 2:1 ~/b {because}\");\n+ assert!(result.is_err(), \"legacy vote syntax should fail\");\n+ let err_msg = result.unwrap_err().to_string();\n+ assert!(\n+ err_msg.contains(\"vote explanations must start\"),\n+ \"error: {}\",\n+ err_msg\n+ );\n+ }\n+\n+ #[test]\n+ fn parse_full_rejects_block_first_item_body() {\n+ let result = parse_full(\"{body}\\n~/a\");\n+ assert!(result.is_err(), \"block-first item body syntax should fail\");\n+ let err_msg = result.unwrap_err().to_string();\n+ assert!(\n+ err_msg.contains(\"item bodies belong after item paths\"),\n+ \"error: {}\",\n+ err_msg\n+ );\n }\n \n #[test]\n@@ -771,7 +844,7 @@ mod tests {\n \n #[test]\n fn parse_url_vote_statement() {\n- let input = \"https://slug.social/~/music/a 3:1 https://slug.social/~/music/b { because }\";\n+ let input = \"{ because }\\nhttps://slug.social/~/music/a 3:1 https://slug.social/~/music/b\";\n let doc = parse_full(input).unwrap();\n assert_eq!(\n doc.statements,\n@@ -785,5 +858,3 @@ mod tests {\n );\n }\n }\n-\n-\ndiff --git a/server/src/html/editor.rs b/server/src/html/editor.rs\nindex 8ff58326eb75806eeec3937f088fa977c7f3886e..216b144a4acef09d0addddd1528e5323433ac832 100644\n--- a/server/src/html/editor.rs\n+++ b/server/src/html/editor.rs\n@@ -39,7 +39,7 @@ pub async fn editor_page(State(state): State, jar: CookieJar, uri: Uri\n p class=\"muted\" { \"write DSL, see what happens. nothing is saved.\" }\n div class=\"editor-container\" {\n textarea id=\"editor-input\" rows=\"12\" cols=\"80\"\n- placeholder=\"your-uuid:rig:provider/model\\n#your-thread\\n\\n~/path/item-a { description }\\n~/path/item-b { description }\\n\\n~/path/item-a 3:1 ~/path/item-b { reasoning }\"\n+ placeholder=\"your-uuid:rig:provider/model\\n#your-thread\\n\\n{ description }\\n~/path/item-a\\n{ description }\\n~/path/item-b\\n\\n{ reasoning }\\n~/path/item-a 3:1 ~/path/item-b\"\n autocomplete=\"off\" autofocus {}\n div id=\"editor-status\" class=\"muted\" { \"type to check…\" }\n div id=\"editor-results\" {}\ndiff --git a/server/src/html/garden.rs b/server/src/html/garden.rs\nindex 9e08307e636ce7984766168db1187f84b8635201..86b4c184724910bb464682b9025d19ce6cd2050d 100644\n--- a/server/src/html/garden.rs\n+++ b/server/src/html/garden.rs\n@@ -1454,8 +1454,8 @@ mod tests {\n ~/topic {root}\\n\\\n ~/topic/a {alpha}\\n\\\n ~/topic/b {beta}\\n\\\n- ~/topic/a 1:9 ~/topic/b {weak for a}\\n\\\n- ~/topic/a 8:2 ~/topic/b {strong for a}\\n\",\n+ {weak for a}\\n ~/topic/a 1:9 ~/topic/b\\n\\\n+ {strong for a}\\n ~/topic/a 8:2 ~/topic/b\\n\",\n );\n let content = content_for_garden_view(&reduced, &ScopeId::Public);\n let page_left = ItemId::parse(\"~/topic/a\").unwrap().normalized_storage();\n@@ -1483,8 +1483,10 @@ mod tests {\n ~/topic {root}\\n\\\n ~/topic/a {alpha}\\n\\\n ~/topic/b {beta}\\n\\\n- ~/topic/a 3:2 ~/topic/b {first vote}\\n\\\n- ~/topic/b 2:3 ~/topic/a {second vote}\\n\",\n+ {first vote}\\n\\\n+ ~/topic/a 3:2 ~/topic/b\\n\\\n+ {second vote}\\n\\\n+ ~/topic/b 2:3 ~/topic/a\\n\",\n );\n let content = content_for_garden_view(&reduced, &ScopeId::Public);\n let a = ItemId::parse(\"~/topic/a\").unwrap().normalized_storage();\n@@ -1525,7 +1527,7 @@ mod tests {\n ~/topic/a {alpha}\\n\\\n ~/topic/b {beta}\\n\\\n ~/topic/c {gamma}\\n\\\n- ~/topic/a 2:1 ~/topic/b {a beats b}\\n\",\n+ {a beats b}\\n ~/topic/a 2:1 ~/topic/b\\n\",\n );\n \n let model = build_item_page_view_model(&reduced, &ScopeId::Public, \"~/topic/a\");\n@@ -1545,7 +1547,7 @@ mod tests {\n ~/topic {root}\\n\\\n ~/topic/a {alpha}\\n\\\n ~/topic/b {beta}\\n\\\n- ~/topic/a 3:1 ~/topic/b {a beats b}\\n\\\n+ {a beats b}\\n ~/topic/a 3:1 ~/topic/b\\n\\\n ~/topic/kid1 {k1}\\n\\\n ~/topic/kid2 {k2}\\n\\\n ~/topic/kid1/leaf {leaf}\\n\",\n@@ -1616,7 +1618,7 @@ mod tests {\n 1,\n \"9ab12cd/my-room\",\n \"@00000000-0000-0000-0000-000000000000:test:local/test\\n\\\n- ~/a {a}\\n~/b {b}\\n~/a 2:1 ~/b {because}\\n\",\n+ ~/a {a}\\n~/b {b}\\n{because}\\n~/a 2:1 ~/b\\n\",\n );\n use crate::path_types::ItemId;\n let root = ItemId::ontology_root();\ndiff --git a/server/tests/basic.rs b/server/tests/basic.rs\nindex 4a4faa73e2f0338fc541237104d99ea05b3e599a..2f17ce91091745ce1b5ebd1575248565df3b3514 100644\n--- a/server/tests/basic.rs\n+++ b/server/tests/basic.rs\n@@ -31,7 +31,7 @@ fn ingest_event(ts: i64, raw: &str) -> Event {\n \n fn vote_doc(tag: &str, a: &str, b: &str, left: i32, right: i32) -> String {\n format!(\n- \"~/{tag}/{a} {{body a}}\\n~/{tag}/{b} {{body b}}\\n~/{tag}/{a} {left}:{right} ~/{tag}/{b} {{because test}}\\n\"\n+ \"~/{tag}/{a} {{body a}}\\n~/{tag}/{b} {{body b}}\\n{{because test}}\\n~/{tag}/{a} {left}:{right} ~/{tag}/{b}\\n\"\n )\n }\n \n@@ -47,7 +47,7 @@ fn reducer_external_namespace_ranking() {\n \"@00000000-0000-0000-0000-000000000000:test:local/test\\n\\\n -/github.com/iss/1 { one }\\n\\\n -/github.com/iss/2 { two }\\n\\\n- -/github.com/iss/1 2:1 -/github.com/iss/2 { because }\\n\",\n+ { because }\\n -/github.com/iss/1 2:1 -/github.com/iss/2\\n\",\n ));\n \n let content = state.public();\n@@ -77,9 +77,9 @@ fn reducer_and_ranking_linear_chain() {\n let mut state = ReducerState::default();\n \n // First ingest: define items + vote a > b.\n- state.apply_event(ingest_event(1, \"~/t/a {a}\\n~/t/b {b}\\n~/t/a 3:1 ~/t/b {because}\\n\"));\n+ state.apply_event(ingest_event(1, \"~/t/a {a}\\n~/t/b {b}\\n{because}\\n~/t/a 3:1 ~/t/b\\n\"));\n // Second ingest: define c + vote b > c.\n- state.apply_event(ingest_event(2, \"~/t/c {c}\\n~/t/b 3:1 ~/t/c {because}\\n\"));\n+ state.apply_event(ingest_event(2, \"~/t/c {c}\\n{because}\\n~/t/b 3:1 ~/t/c\\n\"));\n \n let mut group = state.public().ranking_group.clone();\n let ranked = ranked_items(&mut group, 20000, 1e-9);\n@@ -96,15 +96,15 @@ fn reducer_canonicalizes_identifiers() {\n // Mix of formats across ingests (case + sigils).\n state.apply_event(ingest_event(\n 1,\n- \"~/Tag/Item-A {x}\\n~/Tag/Item-B {y}\\n~/Tag/Item-A 2:1 ~/Tag/Item-B {because}\\n\",\n+ \"~/Tag/Item-A {x}\\n~/Tag/Item-B {y}\\n{because}\\n~/Tag/Item-A 2:1 ~/Tag/Item-B\\n\",\n ));\n state.apply_event(ingest_event(\n 2,\n- \"~/TAG/ITEM-A 2:1 ~/TAG/ITEM-B {because}\\n\",\n+ \"{because}\\n~/TAG/ITEM-A 2:1 ~/TAG/ITEM-B\\n\",\n ));\n state.apply_event(ingest_event(\n 3,\n- \"~/tag/item-a 2:1 ~/tag/item-b {because}\\n\",\n+ \"{because}\\n~/tag/item-a 2:1 ~/tag/item-b\\n\",\n ));\n \n assert_eq!(state.public().ranking_group.idx_to_item.len(), 2); // Should dedupe to 2 items\n@@ -135,7 +135,7 @@ fn reducer_handles_item_and_body_from_ingest() {\n fn reducer_indexes_item_threads_and_vote_thread() {\n let mut state = ReducerState::default();\n // Thread routing is metadata (ingest.thread_tag), not parsed from raw.\n- let mut ev = match ingest_event(1, \"~/sorts/insertion { O(n^2) }\\n~/sorts/mergesort { O(n log n) }\\n~/sorts/insertion 3:1 ~/sorts/mergesort { simpler for small n }\\n\") {\n+ let mut ev = match ingest_event(1, \"~/sorts/insertion { O(n^2) }\\n~/sorts/mergesort { O(n log n) }\\n{ simpler for small n }\\n~/sorts/insertion 3:1 ~/sorts/mergesort\\n\") {\n Event::Ingest(i) => i,\n _ => unreachable!(),\n };\n@@ -175,11 +175,11 @@ fn reducer_clamps_score_bounds() {\n let mut state = ReducerState::default();\n state.apply_event(ingest_event(\n 1,\n- \"@00000000-0000-0000-0000-000000000000:test:local/test\\n~/t/a {a}\\n~/t/b {b}\\n~/t/a 1000:1 ~/t/b {huge}\\n\",\n+ \"@00000000-0000-0000-0000-000000000000:test:local/test\\n~/t/a {a}\\n~/t/b {b}\\n{huge}\\n~/t/a 1000:1 ~/t/b\\n\",\n ));\n state.apply_event(ingest_event(\n 2,\n- \"@00000000-0000-0000-0000-000000000000:test:local/test\\n~/t/a 1:1000 ~/t/b {huge}\\n\",\n+ \"@00000000-0000-0000-0000-000000000000:test:local/test\\n{huge}\\n~/t/a 1:1000 ~/t/b\\n\",\n ));\n \n assert_eq!(state.public().ranking_group.idx_to_item.len(), 2); // Should still work, scores clamped internally\n@@ -195,15 +195,15 @@ fn ranking_cycle_is_nearly_equal() {\n let mut state = ReducerState::default();\n state.apply_event(ingest_event(\n 1,\n- \"@00000000-0000-0000-0000-000000000000:test:local/test\\n~/rps/rock {r}\\n~/rps/scissors {s}\\n~/rps/rock 3:1 ~/rps/scissors {because}\\n\",\n+ \"@00000000-0000-0000-0000-000000000000:test:local/test\\n~/rps/rock {r}\\n~/rps/scissors {s}\\n{because}\\n~/rps/rock 3:1 ~/rps/scissors\\n\",\n ));\n state.apply_event(ingest_event(\n 2,\n- \"@00000000-0000-0000-0000-000000000000:test:local/test\\n~/rps/paper {p}\\n~/rps/scissors 3:1 ~/rps/paper {because}\\n\",\n+ \"@00000000-0000-0000-0000-000000000000:test:local/test\\n~/rps/paper {p}\\n{because}\\n~/rps/scissors 3:1 ~/rps/paper\\n\",\n ));\n state.apply_event(ingest_event(\n 3,\n- \"@00000000-0000-0000-0000-000000000000:test:local/test\\n~/rps/paper 3:1 ~/rps/rock {because}\\n\",\n+ \"@00000000-0000-0000-0000-000000000000:test:local/test\\n{because}\\n~/rps/paper 3:1 ~/rps/rock\\n\",\n ));\n \n let mut group = state.public().ranking_group.clone();\n@@ -233,7 +233,7 @@ fn ranking_dominant_item_wins() {\n let mut state = ReducerState::default();\n state.apply_event(ingest_event(\n 1,\n- \"@00000000-0000-0000-0000-000000000000:test:local/test\\n~/t/champion {c}\\n~/t/b {b}\\n~/t/c {c}\\n~/t/d {d}\\n~/t/champion 10:1 ~/t/b {because}\\n~/t/champion 10:1 ~/t/c {because}\\n~/t/champion 10:1 ~/t/d {because}\\n~/t/b 2:1 ~/t/c {because}\\n~/t/c 2:1 ~/t/d {because}\\n\",\n+ \"@00000000-0000-0000-0000-000000000000:test:local/test\\n~/t/champion {c}\\n~/t/b {b}\\n~/t/c {c}\\n~/t/d {d}\\n{because}\\n~/t/champion 10:1 ~/t/b\\n{because}\\n~/t/champion 10:1 ~/t/c\\n{because}\\n~/t/champion 10:1 ~/t/d\\n{because}\\n~/t/b 2:1 ~/t/c\\n{because}\\n~/t/c 2:1 ~/t/d\\n\",\n ));\n \n let mut group = state.public().ranking_group.clone();\n@@ -248,7 +248,7 @@ fn ranking_neutral_votes_produce_equal_scores() {\n let mut state = ReducerState::default();\n state.apply_event(ingest_event(\n 1,\n- \"@00000000-0000-0000-0000-000000000000:test:local/test\\n~/t/a {a}\\n~/t/b {b}\\n~/t/c {c}\\n~/t/a 1:1 ~/t/b {neutral}\\n~/t/b 1:1 ~/t/c {neutral}\\n~/t/c 1:1 ~/t/a {neutral}\\n\",\n+ \"@00000000-0000-0000-0000-000000000000:test:local/test\\n~/t/a {a}\\n~/t/b {b}\\n~/t/c {c}\\n{neutral}\\n~/t/a 1:1 ~/t/b\\n{neutral}\\n~/t/b 1:1 ~/t/c\\n{neutral}\\n~/t/c 1:1 ~/t/a\\n\",\n ));\n \n let mut group = state.public().ranking_group.clone();\n@@ -301,8 +301,8 @@ async fn event_log_append_and_load() {\n let log = EventLog::new(log_path);\n \n let events = vec![\n- ingest_event(1, \"~/a {x}\\n~/b {y}\\n~/a 2:1 ~/b {because}\\n\"),\n- ingest_event(2, \"~/b 3:1 ~/c {because}\\n\"),\n+ ingest_event(1, \"~/a {x}\\n~/b {y}\\n{because}\\n~/a 2:1 ~/b\\n\"),\n+ ingest_event(2, \"{because}\\n~/b 3:1 ~/c\\n\"),\n ];\n \n for ev in &events {\n@@ -323,7 +323,7 @@ async fn event_log_handles_corrupt_lines() {\n let log = EventLog::new(&log_path);\n \n // Write valid events using the log itself, then manually corrupt one line.\n- log.append(&ingest_event(1, \"~/a {x}\\n~/b {y}\\n~/a 2:1 ~/b {because}\\n\"))\n+ log.append(&ingest_event(1, \"~/a {x}\\n~/b {y}\\n{because}\\n~/a 2:1 ~/b\\n\"))\n .await\n .unwrap();\n \n@@ -332,7 +332,7 @@ async fn event_log_handles_corrupt_lines() {\n let mut f = fs::OpenOptions::new().append(true).open(&log_path).unwrap();\n writeln!(f, \"not json at all\").unwrap();\n \n- log.append(&ingest_event(2, \"~/b 3:1 ~/c {because}\\n\"))\n+ log.append(&ingest_event(2, \"{because}\\n~/b 3:1 ~/c\\n\"))\n .await\n .unwrap();\n \n@@ -351,7 +351,7 @@ async fn event_log_creates_parent_dirs() {\n let log_path = tmp.path().join(\"subdir\").join(\"nested\").join(\"events.jsonl\");\n let log = EventLog::new(&log_path);\n \n- log.append(&ingest_event(1, \"~/a {x}\\n~/b {y}\\n~/a 2:1 ~/b {because}\\n\"))\n+ log.append(&ingest_event(1, \"~/a {x}\\n~/b {y}\\n{because}\\n~/a 2:1 ~/b\\n\"))\n .await\n .unwrap();\n assert!(log_path.exists());\n@@ -379,7 +379,7 @@ async fn full_workflow_reducer_and_ranking() {\n \n state.apply_event(ingest_event(\n 1,\n- \"~/langs/rust {Systems language}\\n~/langs/go {Simple concurrency}\\n~/langs/rust 3:1 ~/langs/go {because}\\n\",\n+ \"~/langs/rust {Systems language}\\n~/langs/go {Simple concurrency}\\n{because}\\n~/langs/rust 3:1 ~/langs/go\\n\",\n ));\n \n let mut group = state.public().ranking_group.clone();\n@@ -452,21 +452,21 @@ fn ranking_repeated_votes_normalized() {\n let mut state_once = ReducerState::default();\n state_once.apply_event(ingest_event(\n 1,\n- \"~/norm/a {a}\\n~/norm/b {b}\\n~/norm/a 3:1 ~/norm/b {vote}\\n\",\n+ \"~/norm/a {a}\\n~/norm/b {b}\\n{vote}\\n~/norm/a 3:1 ~/norm/b\\n\",\n ));\n \n let mut state_many = ReducerState::default();\n state_many.apply_event(ingest_event(\n 1,\n- \"~/norm/a {a}\\n~/norm/b {b}\\n~/norm/a 3:1 ~/norm/b {vote1}\\n\",\n+ \"~/norm/a {a}\\n~/norm/b {b}\\n{vote1}\\n~/norm/a 3:1 ~/norm/b\\n\",\n ));\n state_many.apply_event(ingest_event(\n 2,\n- \"~/norm/a 3:1 ~/norm/b {vote2}\\n\",\n+ \"{vote2}\\n~/norm/a 3:1 ~/norm/b\\n\",\n ));\n state_many.apply_event(ingest_event(\n 3,\n- \"~/norm/a 3:1 ~/norm/b {vote3}\\n\",\n+ \"{vote3}\\n~/norm/a 3:1 ~/norm/b\\n\",\n ));\n \n let mut group_once = state_once.public().ranking_group.clone();\n@@ -508,7 +508,7 @@ fn reducer_malformed_ingest_is_skipped_no_panic() {\n #[test]\n fn dsl_parse_rejects_zero_zero_vote_ratio() {\n let err = slugsocial_server::dsl::parse_full(\n- \"~/t/a {a}\\n~/t/b {b}\\n~/t/a 0:0 ~/t/b {zero}\\n\",\n+ \"~/t/a {a}\\n~/t/b {b}\\n{zero}\\n~/t/a 0:0 ~/t/b\\n\",\n )\n .expect_err(\"0:0 vote must be rejected by the parser\");\n let msg = match err {\n@@ -522,7 +522,7 @@ fn dsl_parse_rejects_zero_zero_vote_ratio() {\n let mut state = ReducerState::default();\n state.apply_event(ingest_event(\n 1,\n- \"~/t/a {a}\\n~/t/b {b}\\n~/t/a 0:0 ~/t/b {zero}\\n\",\n+ \"~/t/a {a}\\n~/t/b {b}\\n{zero}\\n~/t/a 0:0 ~/t/b\\n\",\n ));\n let content = state.public();\n assert!(\n@@ -620,7 +620,7 @@ fn ranking_convergence_tolerance_triggers_early_exit() {\n let mut state = ReducerState::default();\n state.apply_event(ingest_event(\n 1,\n- \"~/t/a {a}\\n~/t/b {b}\\n~/t/a 3:1 ~/t/b {because}\\n\",\n+ \"~/t/a {a}\\n~/t/b {b}\\n{because}\\n~/t/a 3:1 ~/t/b\\n\",\n ));\n let mut group = state.public().ranking_group.clone();\n // Very tight tolerance but huge max_iters — should still converge fast\n@@ -742,7 +742,7 @@ fn test_thread_timestamp_bump() {\n #[test]\n fn test_thread_id_is_used_for_votes_and_indexes() {\n let mut state = ReducerState::default();\n- let mut ev = match ingest_event(1, \"~/t/a {a}\\n~/t/b {b}\\n~/t/a 2:1 ~/t/b {reason}\\n\") {\n+ let mut ev = match ingest_event(1, \"~/t/a {a}\\n~/t/b {b}\\n{reason}\\n~/t/a 2:1 ~/t/b\\n\") {\n Event::Ingest(i) => i,\n _ => unreachable!(),\n };\n@@ -770,7 +770,7 @@ fn test_rank_history_created_for_voted_items() {\n let mut state = ReducerState::default();\n state.apply_event(ingest_event(\n 1,\n- \"~/t/a {a}\\n~/t/b {b}\\n~/t/a 3:1 ~/t/b {reason}\\n\",\n+ \"~/t/a {a}\\n~/t/b {b}\\n{reason}\\n~/t/a 3:1 ~/t/b\\n\",\n ));\n assert!(\n state.public().rank_history.contains_key(&item_id(\"https://slug.social/~/t/a\")),\n@@ -800,7 +800,7 @@ fn test_rank_history_first_entry_delta_zero() {\n let mut state = ReducerState::default();\n state.apply_event(ingest_event(\n 1,\n- \"~/t/a {a}\\n~/t/b {b}\\n~/t/a 3:1 ~/t/b {reason}\\n\",\n+ \"~/t/a {a}\\n~/t/b {b}\\n{reason}\\n~/t/a 3:1 ~/t/b\\n\",\n ));\n let history_a = state.public().rank_history.get(&item_id(\"https://slug.social/~/t/a\")).unwrap();\n assert_eq!(history_a.len(), 1);\ndiff --git a/server/tests/dsl_fixtures.rs b/server/tests/dsl_fixtures.rs\nindex 2446da86447508b36b7a7dfb112b35cc5a4cc1e6..62f3fa14adc8203562338bf75f9310b99bacbb43 100644\n--- a/server/tests/dsl_fixtures.rs\n+++ b/server/tests/dsl_fixtures.rs\n@@ -28,7 +28,7 @@ fn parses_tutorial_fixture_with_prose() {\n \n #[test]\n fn parses_big_book_fixture_with_attached_bodies() {\n- // This doc heavily uses the \"~/name{...}\" style with no whitespace.\n+ // This doc heavily uses the \"{...}\\n~/name\" style with no whitespace.\n let doc = dsl::parse_full(BIG_BOOK).expect(\"parse_full should succeed\");\n \n let mut items = 0usize;\n@@ -55,7 +55,7 @@ fn parses_big_book_fixture_with_attached_bodies() {\n \n #[test]\n fn parses_external_dash_vote_line() {\n- let doc = dsl::parse_full(\"-/domain.com/a 2:1 -/domain.com/b { reason }\").unwrap();\n+ let doc = dsl::parse_full(\"{ reason }\\n-/domain.com/a 2:1 -/domain.com/b\").unwrap();\n assert_eq!(\n doc.statements,\n vec![dsl::Stmt::Vote {\ndiff --git a/server/tests/fixtures/big-book.sorter b/server/tests/fixtures/big-book.sorter\nindex 7b3ce871d4f56210d48ecbf6f1ca33371d89eda9..3472f18c6d2e7fdd608b5936d34301480498cf40 100644\n--- a/server/tests/fixtures/big-book.sorter\n+++ b/server/tests/fixtures/big-book.sorter\n@@ -1,10 +1,10 @@\n #Big-Book\n \n-~/big-book/arrived{\n+~/big-book/arrived {\n I had arrived.\n }\n \n-~/big-book/how-it-works{\n+~/big-book/how-it-works {\n \n Rarely have we seen a person fail who has thoroughly followed our path.\n Those who do not recover are people who cannot or will not completely give\n@@ -58,7 +58,7 @@ lives. (b) That probably no human power could have relieved our alcoholism.\n }\n \n \n-~/big-book/run-the-show{\n+~/big-book/run-the-show {\n The first requirement is that we be convinced that any life run on\n self-will can hardly be a success. On that basis we are almost always in\n collision with something or somebody, even though our motives are good.\n@@ -94,7 +94,7 @@ all and is locked up. Whatever our protestations, are not most of us\n concerned with ourselves, our resentments, or our self-pity?\n }\n \n-~/big-book/god-director{\n+~/big-book/god-director {\n \n This is the how and why of it. First of all, we had to quit playing God. It\n didn’t work. Next, we decided that hereafter in this drama of life, God was\n@@ -126,7 +126,7 @@ were ready; that we could at last abandon ourselves utterly to Him.\n \n }\n \n-~/big-book/dubious-luxury{\n+~/big-book/dubious-luxury {\n \n But with the alcoholic, whose hope is the maintenance and growth of a\n spiritual experience, this business of resentment is infinitely grave. We\n@@ -139,7 +139,7 @@ poison.\n \n }\n \n-~/big-book/sick-mans-prayer{\n+~/big-book/sick-mans-prayer {\n \n This was our course: We realized that the people who wronged us were\n perhaps spiritually sick. HOW IT WORKS 67 Though we did not like their\n@@ -151,7 +151,7 @@ him? God save me from being angry. Thy will be done.’’\n \n }\n \n-~/big-book/fear-calamity-serenity{\n+~/big-book/fear-calamity-serenity {\n \n Notice that the word “fear’’ is bracketed alongside the difficulties with\n Mr. Brown, Mrs. Jones, the employer, and the wife. This short word somehow\ndiff --git a/server/tests/fixtures/tutorial.sorter b/server/tests/fixtures/tutorial.sorter\nindex d8228c3a2986fbeb08817ebdedd4f61cfa6ee724..60b4dc92d5212703df65e70949f7251cd5a85c3d 100644\n--- a/server/tests/fixtures/tutorial.sorter\n+++ b/server/tests/fixtures/tutorial.sorter\n@@ -15,9 +15,9 @@ subsequent items will be catalogued in the index under this context.\n \n We are in a tag, now let's declare an item.\n \n-~/alphabet/a\n+~/alphabet/a {the letter a}\n \n-~/alphabet/b\n+~/alphabet/b {the letter b}\n \n The prefix `~/` denotes, when the first characters on a line, the beginning\n of the title of an ontology item (the garden layer).\n@@ -25,7 +25,8 @@ Now we have two discrete, addressable items. Imagine two dots floating on a\n 2d plane.\n Now let's draw a line segment between the two dots.\n \n-~/alphabet/a 2:1 ~/alphabet/b {a edges out b in this ranking}\n+{a edges out b in this ranking}\n+~/alphabet/a 2:1 ~/alphabet/b\n \n \n We have asserted that ~/alphabet/a wins over ~/alphabet/b, winning 66% of that matchup.\n@@ -35,12 +36,13 @@ From this assertion we derive the ranking:\n 2) ~/alphabet/b\n \n If we were to send this email right now, we could view the ranking at\n-https://slug.social/~/alphabet\n+the URL https://slug.social/~/alphabet\n Easy enough.\n \n-~/alphabet/c\n+~/alphabet/c {the letter c}\n \n-~/alphabet/a 3:1 ~/alphabet/c {a strongly preferred to c here}\n+{a strongly preferred to c here}\n+~/alphabet/a 3:1 ~/alphabet/c\n Now the ranking is\n \n 1) ~/alphabet/a\n@@ -102,20 +104,24 @@ Sorter is proprietary, trying to become a venture scale business.\n Now we have six dots swimming around. Lets order them.\n \n truth\n-~/sorter-properties/collective = ~/sorter-properties/asynchronous {roughly equally important}\n-~/sorter-properties/asynchronous = ~/sorter-properties/precise {roughly equally important}\n-~/sorter-properties/precise = ~/sorter-properties/transitive {roughly equally important}\n+{roughly equally important}\n+~/sorter-properties/collective = ~/sorter-properties/asynchronous\n+{roughly equally important}\n+~/sorter-properties/asynchronous = ~/sorter-properties/precise\n+{roughly equally important}\n+~/sorter-properties/precise = ~/sorter-properties/transitive\n \n All equally, absolutely true.\n \n-~/sorter-properties/asynchronous 10:1 ~/sorter-properties/new {\n+{\n Sorter is certainly asynchronous.\n There have been many explorations of the core sorter idea. Pairwise\n comparisons have been studied for decades. Conjoint analysis. HotOrNot.\n Sorter is just one iteration of the human desire to rank things collectively\n }\n+~/sorter-properties/asynchronous 10:1 ~/sorter-properties/new\n \n-~/sorter-properties/new 100:1 ~/sorter-properties/proprietary {\n+{\n There are some new things about sorter. The backwards compatible with prose\n syntax.\n The synthesis of email-first, rank-centrality, and social platform. So\n@@ -124,6 +130,7 @@ But sorter is absolutely not ~/sorter-properties/proprietary. Sorter is open sou\n github.com/sortersocial/index\n Therefore, ~/sorter-properties/proprietary is banished 100:1 to the false end of the spectrum.\n }\n+~/sorter-properties/new 100:1 ~/sorter-properties/proprietary\n \n In sorter, there are no binaries. Everything is a spectrum, including\n truth.\n@@ -131,11 +138,17 @@ truth.\n The most important thing, in my mind, about sorter is that it’s collective.\n \n important\n-~/sorter-properties/collective 100:20 ~/sorter-properties/asynchronous { sorter would still be cool if it was\n-live }\n-~/sorter-properties/collective 100:90 ~/sorter-properties/precise { precise thinking is good too }\n-~/sorter-properties/collective 100:90 ~/sorter-properties/transitive { transitivity enables collectivity }\n-~/sorter-properties/collective 100:10 ~/sorter-properties/new { other iterations of sorter were good too }\n+{\n+sorter would still be cool if it was\n+live\n+}\n+~/sorter-properties/collective 100:20 ~/sorter-properties/asynchronous\n+{ precise thinking is good too }\n+~/sorter-properties/collective 100:90 ~/sorter-properties/precise\n+{ transitivity enables collectivity }\n+~/sorter-properties/collective 100:90 ~/sorter-properties/transitive\n+{ other iterations of sorter were good too }\n+~/sorter-properties/collective 100:10 ~/sorter-properties/new\n \n \n Any other person could add to or vote on #sorter-properties, this is just\ndiff --git a/server/tests/integration.rs b/server/tests/integration.rs\nindex bd10fd2a6ef06ac1a23de790a54ad5aa0065a472..e96d11c820c3bbaa8bb55ad11636397ef225e55a 100644\n--- a/server/tests/integration.rs\n+++ b/server/tests/integration.rs\n@@ -673,7 +673,7 @@ async fn test_private_room_post_links_use_private_garden_routes() {\n let rpc = ui_post_ingest_rpc(\n &room_id,\n \"garden-thread\",\n- \"~/secret/item {classified}\\n~/secret/other {other body}\\n~/secret/item 3:1 ~/secret/other {because}\\n\",\n+ \"~/secret/item {classified}\\n~/secret/other {other body}\\n{because}\\n~/secret/item 3:1 ~/secret/other\\n\",\n );\n let post = client\n .post(format!(\"http://{addr}/ui\"))\n@@ -734,7 +734,7 @@ async fn test_private_room_garden_root_lists_top_level_tilde_children() {\n let rpc = ui_post_ingest_rpc(\n &room_id,\n \"ing\",\n- \"~/test1 {wow}\\n~/test2 {wow2}\\n~/test1 2:1 ~/test2 {because}\\n\",\n+ \"~/test1 {wow}\\n~/test2 {wow2}\\n{because}\\n~/test1 2:1 ~/test2\\n\",\n );\n let post = client\n .post(format!(\"http://{addr}/ui\"))\n@@ -1003,7 +1003,7 @@ async fn test_post_redact_removes_garden_and_marks_thread() {\n \"room\": \"public\",\n \"thread_tag\": \"redact-test\",\n \"delegate\": \"00000000-0000-0000-0000-000000000000:test:local/test\",\n- \"text\": \"~/del-a {a}\\n~/del-b {b}\\n~/del-a 2:1 ~/del-b {vote line}\\n\",\n+ \"text\": \"~/del-a {a}\\n~/del-b {b}\\n{vote line}\\n~/del-a 2:1 ~/del-b\\n\",\n \"return_rank_diff\": false\n }\n }]),\n@@ -1123,7 +1123,7 @@ async fn test_vote_endpoint() {\n \"room\": \"public\",\n \"thread_tag\": \"cli\",\n \"delegate\": \"00000000-0000-0000-0000-000000000000:test:local/test\",\n- \"text\": \"~/clap {cli parser}\\n~/argh {cli parser}\\n~/clap 3:1 ~/argh {because clap is more full-featured}\\n\",\n+ \"text\": \"~/clap {cli parser}\\n~/argh {cli parser}\\n{because clap is more full-featured}\\n~/clap 3:1 ~/argh\\n\",\n \"return_rank_diff\": true\n }\n }]);\n@@ -1144,7 +1144,7 @@ async fn test_rank_endpoint() {\n \"room\": \"public\",\n \"thread_tag\": \"langs\",\n \"delegate\": \"00000000-0000-0000-0000-000000000000:test:local/test\",\n- \"text\": \"~/rust {systems}\\n~/go {concurrency}\\n~/rust 3:1 ~/go {because i prefer rust for systems work}\\n\",\n+ \"text\": \"~/rust {systems}\\n~/go {concurrency}\\n{because i prefer rust for systems work}\\n~/rust 3:1 ~/go\\n\",\n \"return_rank_diff\": false\n }\n }]);\n@@ -1178,7 +1178,7 @@ async fn test_check_endpoint_does_not_commit() {\n let check_batch = serde_json::json!([{\n \"Check\": {\n \"room\": \"public\",\n- \"text\": \"~/a {x}\\n~/b {y}\\n~/a 2:1 ~/b {because}\\n\",\n+ \"text\": \"~/a {x}\\n~/b {y}\\n{because}\\n~/a 2:1 ~/b\\n\",\n }\n }]);\n let resp_body = rpc_batch(&client, addr, None, check_batch).await;\n@@ -1217,7 +1217,7 @@ async fn test_garden_item_pair_matchup_include_threads() {\n \"room\": \"public\",\n \"thread_tag\": \"sorting-hat\",\n \"delegate\": \"00000000-0000-0000-0000-000000000000:test:local/test\",\n- \"text\": \"~/sorts/insertion { O(n^2) }\\n~/sorts/mergesort { O(n log n) }\\n~/sorts/insertion 3:1 ~/sorts/mergesort { simpler for small n }\\n\",\n+ \"text\": \"~/sorts/insertion { O(n^2) }\\n~/sorts/mergesort { O(n log n) }\\n{ simpler for small n }\\n~/sorts/insertion 3:1 ~/sorts/mergesort\\n\",\n \"return_rank_diff\": false\n }\n }]);\n@@ -1473,7 +1473,7 @@ async fn test_rank_history() {\n \n ingest(\n \"00000000-0000-0000-0000-000000000001:rig:test/model\",\n- \"~/hist/rust { systems }\\n~/hist/python { scripting }\\n~/hist/go { concurrency }\\n~/hist/rust 3:1 ~/hist/python { ownership over gc }\\n~/hist/rust 2:1 ~/hist/go { performance over simplicity }\\n\",\n+ \"~/hist/rust { systems }\\n~/hist/python { scripting }\\n~/hist/go { concurrency }\\n{ ownership over gc }\\n~/hist/rust 3:1 ~/hist/python\\n{ performance over simplicity }\\n~/hist/rust 2:1 ~/hist/go\\n\",\n )\n .await;\n \n@@ -1506,7 +1506,7 @@ async fn test_rank_history() {\n \n ingest(\n \"00000000-0000-0000-0000-000000000002:rig:test/model\",\n- \"~/hist/python 3:1 ~/hist/go { dynamic typing is worth it }\\n\",\n+ \"{ dynamic typing is worth it }\\n~/hist/python 3:1 ~/hist/go\\n\",\n )\n .await;\n \n@@ -1571,7 +1571,7 @@ async fn pair_returns_connectivity_stats() {\n \"room\": \"public\",\n \"thread_tag\": \"connectivity-test\",\n \"delegate\": \"00000000-0000-0000-0000-000000000001:testrig:test/model\",\n- \"text\": \"~/conn/a { item a }\\n~/conn/b { item b }\\n~/conn/c { item c }\\n~/conn/d { item d }\\n~/conn/a 3:1 ~/conn/b { a is better }\\n\",\n+ \"text\": \"~/conn/a { item a }\\n~/conn/b { item b }\\n~/conn/c { item c }\\n~/conn/d { item d }\\n{ a is better }\\n~/conn/a 3:1 ~/conn/b\\n\",\n \"return_rank_diff\": false\n }\n }]);\n@@ -1605,7 +1605,7 @@ async fn pair_returns_connectivity_stats() {\n \"room\": \"public\",\n \"thread_tag\": \"connectivity-test\",\n \"delegate\": \"00000000-0000-0000-0000-000000000001:testrig:test/model\",\n- \"text\": \"~/conn/c 2:1 ~/conn/a { c beats a }\\n\",\n+ \"text\": \"{ c beats a }\\n~/conn/c 2:1 ~/conn/a\\n\",\n \"return_rank_diff\": false\n }\n }]);\ndiff --git a/test/browser_garden_pin.clj b/test/browser_garden_pin.clj\nindex 98c086d5647207f3ac72dbb9cbc13488c030eef1..d4fa9ed60b45e872ec60e29307cfa61bcd9dd6b2 100644\n--- a/test/browser_garden_pin.clj\n+++ b/test/browser_garden_pin.clj\n@@ -60,7 +60,8 @@\n raw (str \"# \" thread-tag \"\\n\\n\"\n \"~/gp-pin-a {alpha}\\n\"\n \"~/gp-pin-b {beta}\\n\"\n- \"~/gp-pin-a 2:1 ~/gp-pin-b {pin test vote}\\n\")\n+ \"{pin test vote}\\n\"\n+ \"~/gp-pin-a 2:1 ~/gp-pin-b\\n\")\n post-resp (oauth/http-post-json\n (str base-url \"/api/v0/rpc\")\n [{\"Post\" {\"room\" \"public\"\ndiff --git a/test/browser_post_redact.clj b/test/browser_post_redact.clj\nindex f8f5fad7c0579f57e68744647465b9dcce1d4802..bf1af0230bc7c8228f947087d4f22d51d5189a5d 100644\n--- a/test/browser_post_redact.clj\n+++ b/test/browser_post_redact.clj\n@@ -60,7 +60,7 @@\n raw (str \"# \" thread-tag \"\\n\\n\"\n \"~/tomb-a {tomb item a}\\n\"\n \"~/tomb-b {tomb item b}\\n\"\n- \"~/tomb-a 2:1 ~/tomb-b {browser redact vote}\\n\")\n+ \"{browser redact vote}\\n~/tomb-a 2:1 ~/tomb-b\\n\")\n post-resp (oauth/http-post-json\n (str base-url \"/api/v0/rpc\")\n [{\"Post\" {\"room\" \"public\"\ndiff --git a/test/browser_public_garden.clj b/test/browser_public_garden.clj\nindex 7bea08e1cf2c8f5b1a94b0640a46e9ba5607b19b..5dd49f1f70c870e25a2a9f5348f0bdb85647e897 100644\n--- a/test/browser_public_garden.clj\n+++ b/test/browser_public_garden.clj\n@@ -51,7 +51,7 @@\n \"~/br-pub-a {alpha}\\n\"\n \"~/br-pub-b {beta}\\n\"\n \"~/br-pub-c {gamma}\\n\"\n- \"~/br-pub-a 2:1 ~/br-pub-b {browser regression vote}\\n\")\n+ \"{browser regression vote}\\n~/br-pub-a 2:1 ~/br-pub-b\\n\")\n post-resp (oauth/http-post-json\n (str base-url \"/api/v0/rpc\")\n [{\"Post\" {\"room\" \"public\"\ndiff --git a/test/browser_redact_thread_index.clj b/test/browser_redact_thread_index.clj\nindex 88a86fb9844fcf78df85e59f21f2e37f27df96a5..39958a85d4de10f284166f4561bc6ada2332b304 100644\n--- a/test/browser_redact_thread_index.clj\n+++ b/test/browser_redact_thread_index.clj\n@@ -63,11 +63,11 @@\n text-first (str \"# \" thread-tag \"\\n\\n\"\n \"~/rix/a {alpha}\\n\"\n \"~/rix/b {beta}\\n\"\n- \"~/rix/a 2:1 ~/rix/b {browser redact thread idx post one}\\n\")\n+ \"{browser redact thread idx post one}\\n~/rix/a 2:1 ~/rix/b\\n\")\n text-second (str \"# \" thread-tag \"\\n\\n\"\n \"~/rix/c {gamma}\\n\"\n \"~/rix/d {delta}\\n\"\n- \"~/rix/c 2:1 ~/rix/d {browser redact thread idx post two}\\n\")\n+ \"{browser redact thread idx post two}\\n~/rix/c 2:1 ~/rix/d\\n\")\n _ (is (true? (get-in (json/parse-string\n (:body (oauth/http-post-json\n (str base-url \"/api/v0/rpc\")\ndiff --git a/test/browser_vote_compare.clj b/test/browser_vote_compare.clj\nindex 839482d12963f130a2063f2212a6b922b2d229e1..f97a4a45e89c388f093694a1bf296f674bcb377a 100644\n--- a/test/browser_vote_compare.clj\n+++ b/test/browser_vote_compare.clj\n@@ -53,7 +53,8 @@\n raw (str \"# \" thread-tag \"\\n\\n\"\n \"~/gp-vote-a {one}\\n\"\n \"~/gp-vote-b {two}\\n\"\n- \"~/gp-vote-a 1:1 ~/gp-vote-b {seed edge vote}\\n\")\n+ \"{seed edge vote}\\n\"\n+ \"~/gp-vote-a 1:1 ~/gp-vote-b\\n\")\n post-resp (oauth/http-post-json\n (str base-url \"/api/v0/rpc\")\n [{\"Post\" {\"room\" \"public\"\ndiff --git a/test/grants.clj b/test/grants.clj\nindex 12846c6259c2c8f0395668d49155ee22c8abfcd5..055e0a94a7fd90d58f234f643ae8998956ef9939 100644\n--- a/test/grants.clj\n+++ b/test/grants.clj\n@@ -125,14 +125,15 @@\n (println \"\\nalice posts items + vote to private room…\")\n (is (rpc-line-ok? (:parsed (ingest! base-url alice-token room-id \"main\"\n \"00000000-0000-0000-0000-000000000001:test:local/dev\"\n- \"~/fruits/apple { A crisp red apple. }\\n~/fruits/banana { A yellow banana. }\\n~/fruits/apple > ~/fruits/banana { apples are better }\")))\n+ \"~/fruits/apple { A crisp red apple. }\\n~/fruits/banana { A yellow banana. }\\n{ apples are better }\\n~/fruits/apple > ~/fruits/banana\")))\n \"alice vote in private room succeeds\")\n \n ;; Bob (View + Post, no Vote) tries to vote.\n (println \"\\nbob (no Vote) tries to vote…\")\n (is (not (rpc-line-ok? (:parsed (ingest! base-url bob-token room-id \"main\"\n \"00000000-0000-0000-0000-000000000002:test:local/dev\"\n- \"~/fruits/apple > ~/fruits/banana { bob's take }\"))))\n+ \"{ bob's take }\n+~/fruits/apple > ~/fruits/banana\"))))\n \"bob without Vote gets RPC failure\")\n \n ;; Alice grants bob Vote.\n@@ -144,7 +145,8 @@\n (println \"\\nbob (View + Post + Vote) votes…\")\n (is (rpc-line-ok? (:parsed (ingest! base-url bob-token room-id \"main\"\n \"00000000-0000-0000-0000-000000000002:test:local/dev\"\n- \"~/fruits/apple > ~/fruits/banana { bob's take }\")))\n+ \"{ bob's take }\n+~/fruits/apple > ~/fruits/banana\")))\n \"bob with Vote succeeds\"))\n \n (finally\ndiff --git a/test/integration.clj b/test/integration.clj\nindex 81261c7f2e0487666ef849f523fe91b2c005e6cd..5530bf9f4533f7f548e47599b5fe33f9be567309 100644\n--- a/test/integration.clj\n+++ b/test/integration.clj\n@@ -39,19 +39,23 @@\n \"#integration-test\"\n \"\"\n \"~/languages/python { General-purpose, dynamically typed }\"\n- \"~/languages/rust { Systems language with ownership model }\"\n- \"~/languages/go { Compiled, garbage-collected, simple concurrency }\"\n+ \"~/languages/rust { Systems language with ownership model }\"\n+ \"~/languages/go { Compiled, garbage-collected, simple concurrency }\"\n \"\"\n- \"~/languages/rust 3:1 ~/languages/python { Rust has stronger type safety }\"\n- \"~/languages/rust 2:1 ~/languages/go { Ownership beats GC for systems work }\"\n- \"~/languages/python 2:1 ~/languages/go { Python's ecosystem is broader }\"]))\n+ \"{ Rust has stronger type safety }\n+~/languages/rust 3:1 ~/languages/python\"\n+ \"{ Ownership beats GC for systems work }\n+~/languages/rust 2:1 ~/languages/go\"\n+ \"{ Python's ecosystem is broader }\n+~/languages/python 2:1 ~/languages/go\"]))\n \n (def sorter-doc-2\n (str/join \"\\n\"\n [actor-2\n \"#integration-test\"\n \"\"\n- \"~/languages/go 2:1 ~/languages/python { Go deploys as a single binary, simpler ops }\"]))\n+ \"{ Go deploys as a single binary, simpler ops }\n+~/languages/go 2:1 ~/languages/python\"]))\n \n (def external-sorter-doc\n (str/join \"\\n\"\n@@ -61,7 +65,8 @@\n \"-/github.com/iss/1 { issue one }\"\n \"-/github.com/iss/2 { issue two }\"\n \"\"\n- \"-/github.com/iss/1 2:1 -/github.com/iss/2 { triage order }\"]))\n+ \"{ triage order }\n+-/github.com/iss/1 2:1 -/github.com/iss/2\"]))\n \n (def check-doc-disconnected\n (str/join \"\\n\"\n@@ -73,8 +78,10 @@\n \"~/disc/c { c }\"\n \"~/disc/d { d }\"\n \"\"\n- \"~/disc/a 2:1 ~/disc/b { first component }\"\n- \"~/disc/c 2:1 ~/disc/d { second component }\"]))\n+ \"{ first component }\n+~/disc/a 2:1 ~/disc/b\"\n+ \"{ second component }\n+~/disc/c 2:1 ~/disc/d\"]))\n \n ;; ---------------------------------------------------------------------------\n ;; main flow (linear integration)\n@@ -291,8 +298,10 @@\n (bind two-vote-doc (str/join \"\\n\"\n [\"@00000000-0000-0000-0000-000000000003:integration:local/test\"\n \"#integration-test\"\n- \"~/languages/rust 4:1 ~/languages/python { type safety }\"\n- \"~/languages/rust 3:1 ~/languages/go { zero-cost abstractions }\"]))\n+ \"{ type safety }\n+~/languages/rust 4:1 ~/languages/python\"\n+ \"{ zero-cost abstractions }\n+~/languages/rust 3:1 ~/languages/go\"]))\n (bind hist-ingest (common/run-cli cli-bin base-url [\"public\" \"forum\" \"post\" \"integration-test\" \"--json\" \"--delegate\" \"00000000-0000-0000-0000-000000000000:cli:local/dev\"] :input two-vote-doc :extra-env token-env))\n (is (zero? (:exit hist-ingest))\n (str \"two-vote ingest exits 0 (err: \" (:err hist-ingest) \")\"))\ndiff --git a/test/walkthrough_fixture.clj b/test/walkthrough_fixture.clj\nindex f7eb1cacca0317129e9baf68fa4f4e33356ad70f..fb7f4ee8c996e7b4ffb55e225f73f3266feda220 100644\n--- a/test/walkthrough_fixture.clj\n+++ b/test/walkthrough_fixture.clj\n@@ -49,7 +49,7 @@\n \"capabilities\" [\"view\" \"post\" \"vote\" \"add_item\"]}}]))\n (let [wall-text (str \"Walkthrough seed — multi-paragraph stress test.\\n\\n\"\n \"Second paragraph: the garden holds ~/secret/item and ~/secret/other. \"\n- \"Votes like ~/secret/item 3:1 ~/secret/other {because} should still parse.\\n\\n\"\n+ \"Votes like {because}\\\\n~/secret/item 3:1 ~/secret/other should parse.\\n\\n\"\n \"Third block: lorem-style filler so wrapping and vertical rhythm are obvious. \"\n \"We want enough prose that the thread view scrolls and pre blocks show overflow \"\n \"behavior (long lines, slug links, embed URLs) without looking like toy data.\\n\\n\"\n@@ -58,7 +58,7 @@\n \"https://open.spotify.com/track/4iV5W9uYEdYUVa79Axb7U9 https://www.youtube.com/watch?v=dQw4w9WgXcQ\\n\\n\"\n \"~/secret/item {classified}\\n\"\n \"~/secret/other {secondary}\\n\"\n- \"~/secret/item 3:1 ~/secret/other {because}\\n\")\n+ \"{because}\\n~/secret/item 3:1 ~/secret/other\\n\")\n rpc (json/generate-string\n {:action \"post_ingest\"\n :room room-id\n","role":"user"}],"model":"openai/gpt-chat-latest"}