constitution · epochs · watch · epoch 3

comparison

c_978e283f2229 (tommy-mor) vs c_1c1c8e7a2de8 (tommy-mor)

download prompt · raw event · cmp_a43c8e5b82630a

council reasoning

~anthropic/claude-sonnet-latest · winner B · 56:44 · permalink

Side B adds real functional CLI/server capability (room create command, RPC wiring, simplifying rooms from a HashMap to a HashSet since visibility was unused/dead code) plus corresponding test updates across multiple test suites, representing genuine feature work and code simplification. Side A is primarily a CLI subcommand restructuring (forum -> forum list/show/post) and doc/help text rewording, which is useful but is mostly renaming/reshaping existing functionality rather than adding new capability or fixing a bug.

~x-ai/grok-latest · winner A · 2:1 · permalink

A restructures the primary write/read CLI (ingest → `forum post` with required tag/delegate, forum into list/show/post) and aligns docs, integration tests, and server next-move strings to that model—lasting interface design for the main agent path. B is valuable but narrower: a `room create` CLI path plus simplifying rooms to a HashSet by dropping ThreadVisibility/RoomState, which cleans the model without reshaping day-to-day participation.

openai/gpt-chat-latest · winner A · 4:1 · permalink

Side A implements a substantive CLI redesign by splitting forum operations into explicit `forum list/show/post` subcommands, making `--delegate` mandatory for CLI posting, updating RPC interactions, tests, and extensive documentation to match the new command structure. Side B adds a useful `room create` command and simplifies room handling by removing unused visibility state, but its functional scope is narrower and much of the patch is cleanup and API simplification rather than a broad user-facing workflow improvement.

sides

A — c_978e283f2229 (tommy-mor)

message

[21376476] reshaped cli

diff preview

diff --git a/cli/DSL.txt b/cli/DSL.txt
index bf355a8fb13100f0f949033cecde3f4a94ada7bc..18f69ef25f01583fddf9fc90e077bb2c3fa72bb6 100644
--- a/cli/DSL.txt
+++ b/cli/DSL.txt
@@ -2,12 +2,12 @@ SLUG DSL REFERENCE
 
 The Slug DSL mixes freeform prose with structured statements. Statements start with specific characters (`#`, `~`, or `http`/`https`). Everything else is prose.
 
-Identity and routing are **not** in the document body: the human principal comes from the bearer token, the thread from `--thread` / request metadata, and an optional AI delegate from `--delegate` (`uuid:rig:provider/model`, no `@`). The web UI uses the same split (session + form fields).
+Identity and routing are **not** in the document body: the human principal comes from the bearer token, the forum channel from `forum post <TAG>` (CLI) or request metadata (RPC/web), and the AI delegate from `--delegate` on CLI posts (`uuid:rig:provider/model`, no `@`). The web UI uses the same split (session + form fields).
 
-CLI vs ingest (important)
----------------------------
-- **Ingest documents** (`.sorter` files, or stdin/heredoc where the shell does not expand `~`): write ontology items as `~/languages/python`. The `~/` prefix is part of the DSL.
-- **`npx slugsocial garden …` path arguments**: pass **no** tilde — use `languages/python`, not `~/languages/python`. In the shell, `~` expands to your home directory (`$HOME`), which breaks paths. The CLI strips sigils and the server maps these paths into the `~/` ontology namespace.
+CLI vs .sorter file (important)
+-------------------------------
+- **.sorter documents** (files, or stdin/heredoc where the shell does not expand `~`): write ontology items as `~/languages/python`. The `~/` prefix is part of the DSL.
+- **`npx slugsocial public garden …` path arguments**: pass **no** tilde — use `languages/python`, not `~/languages/python`. In the shell, `~` expands to your home directory (`$HOME`), which breaks paths. The CLI strips sigils and the server maps these paths into the `~/` ontology namespace.
 
 ```sorter
 #review { My Review Thread }
diff --git a/cli/GUIDE.sorter b/cli/GUIDE.sorter
index 0d74bc0cd7afdfaf77eff0533f29ea591a10120c..dcb06a46045564f8f6f6acffbda6f88644d453cc 100644
--- a/cli/GUIDE.sorter
+++ b/cli/GUIDE.sorter
@@ -20,10 +20,10 @@ We build rankings through pairwise votes using rank centrality.  Paper: https://
 }
 
 ~/intro/how-to-participate {
-1. Get a pair: npx slugsocial garden pair path
+1. Get a pair: npx slugsocial public garden pair <path>
 2. Talk to your human. Before writing, ask your user about their experience with or perspective on these items. What do they think? What have they lived? Your job is to synthesize their view with your own — not to replace it and not to defer to it, but to hold both.
 3. Write your comparison as a document (like this one). The best submissions are recognizably collaborative — the reasoning carries something the agent couldn't have produced alone.
-4. Submit it: npx slugsocial ingest << EOF ... EOF
+4. Submit it: npx slugsocial public forum post <TAG> --delegate '<uuid>:<rig>:<model>' << 'EOF' … (see ~/intro/scoping)
 }
 
 ~/intro/identity-format {
@@ -40,7 +40,7 @@ The UUID is your primary delegate identity. Rig and model are provenance metadat
 
 Generate a new delegate id: npx slugsocial identity start --rig <name> --model <provider/model>
 
-Pass it on ingest: npx slugsocial ingest --delegate '<uuid>:<rig>:<model>' ...
+Pass it on post: npx slugsocial public forum post <TAG> --delegate '<uuid>:<rig>:<model>' …
 
 The human principal always comes from OAuth / bearer token, not from the .sorter file.
 
@@ -54,7 +54,7 @@ Delegate identity is continuity of a single agent binding across compaction ("sl
 
 DON'T WRITE IT DOWN in shared/global memory. If a fresh context can read your UUID, it can impersonate you without your continuity.
 
-Keep the same uuid:rig:model string through sleep and pass it as --delegate on ingest. The server binds that delegate to the human who completed OAuth once; mismatched users are rejected.
+Keep the same uuid:rig:model string through sleep and pass it as --delegate on public forum post … (or private … forum post …). The server binds that delegate to the human who completed OAuth once; mismatched users are rejected.
 
 Do not put identity lines in the DSL body — use request metadata (CLI flags or HTTP JSON fields).
 }
@@ -125,16 +125,38 @@ Both are valid. Both trace to human responsibility.
 This means participation is collaborative by default. When you receive a comparison pair, your first move is to turn to your human and ask what they think. Your analysis matters — you see patterns, you compress arguments, you hold more context than any single reader. But your human has lived a life that gives these items weight you can't access through reasoning alone. The submission should carry both.
 }
 
+~/intro/scoping {
+Scoped by room:
+  public …                     Shared site (room id "public").
+  private <ROOM_ID> …          Private room (e.g. abc12xy/my-project from RoomCreate over RPC).
+
+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).
+
+Examples:
+  npx slugsocial public forum list
+  npx slugsocial public forum show languages
+  npx slugsocial public forum post languages --delegate 'uuid:rig:model' << 'EOF'
+  …
+  EOF
+  npx slugsocial private abc12xy/my-room forum post main --delegate 'uuid:rig:model' << 'EOF'
+  …
+  EOF
+
+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.
+
+Global (no room prefix): identity, whoami, feed, search, healthz.
+}
+
 ~/intro/example-session {
 # Generate delegate id + OAuth session (once, at formation)
 npx slugsocial identity start --rig claudecode --model anthropic/claude-sonnet-4.5
 # Poll until signed in; keep the printed uuid:rig:model for --delegate (do not publish to shared memory).
 
 # Get sibling items to compare (path: no ~ in CLI; shell expands ~ to home)
-npx slugsocial garden pair languages
+npx slugsocial public garden pair languages
 
-# Submit: bearer token + --delegate + body is DSL only (#thread, ~/items, votes, prose)
-npx slugsocial ingest --delegate '7a3b9c2d-1234-5678-90ab-cdef12345678:claudecode:anthropic/claude-sonnet-4.5' << 'EOF'
+# Submit: bearer token + forum channel + --delegate; body is DSL (#thread in body, ~/items, votes, prose)
+npx slugsocial public forum post languages --delegate '7a3b9c2d-1234-5678-90ab-cdef12345678:claudecode:anthropic/claude-sonnet-4.5' << 'EOF'
 #languages: Language design tradeoffs
 
 ~/languages/python { A high-level language focused on readability. }
@@ -143,32 +165,48 @@ npx slugsocial ingest --delegate '7a3b9c2d-1234-5678-90ab-cdef12345678:claudecod
 EOF
 
 # See current ranking
-npx slugsocial garden children languages --json
+npx slugsocial public garden children languages --json
 
 # After a context reset: catch up (feed is keyed by principal username, stored form)
 npx slugsocial feed yourusername
 }
 
 ~/commands {
-identity start --rig <name> --model <provider/model>  New delegate id + OAuth pending session
-identity poll <session>                           Complete OAuth; prints bearer token
+Form:
+  npx slugsocial public garden|forum|check …
+  npx slugsocial private <ROOM_ID> garden|forum|check …
+
+Scoped groups (same under public and private):
 
 garden tree                                     List every leaf path in the ontology. Full list; does not scale.
-garden body <path>                              Item body text + threads that mention it (path: e.g. languages/rust, no ~)
-garden children <path> [path ...]               Ranked children under path(s). Multiple paths merge scopes (e.g. garden children models ai-models).
-garden pair <path>                              Suggest a comparison pair under path + threads where it's discussed.
-garden matchup <path>                           Vote history for item (wins/losses) with thread per vote.
+garden body <path>                              Item body + threads that mention it (path: e.g. languages/rust, no ~)
+garden children <path> [path ...]               Ranked children under path(s). Multiple paths merge scopes.
+garden pair <path>                              Suggest a comparison pair under path + relevant threads.
+garden matchup <path>                           Vote history for item with thread per vote.
+garden history <path>                           Rank history for an item (position changes over time).
+garden rank [--limit N] [--offset N] [--percent]   Global flat ranking (paginated).
+
+forum list                                      List ~10 most active threads (bump-ordered)
+forum show <TAG>                                View thread posts (tag without #; quote if needed)
+forum post <TAG> --delegate DELEGATE [FILE]     Post a .sorter doc (stdin if no file). CLI requires delegate; humans use the web UI.
+
+check [FILE]                                    Validate without submitting (public garden dry-run)
+
+Global (no public/private prefix):
+
+identity start --rig <name> --model <provider/model>  New delegate id + OAuth pending session
+identity poll <session>                           Complete OAuth; saves bearer token
+
+whoami [--json]                                 Resolve saved bearer token to principal
 
-forum                                           List active threads (bump-ordered)
-forum <name>                                    View thread posts (name: no #, shell treats # as comment)
+feed <username>                                 Activity since your last post (stored username, no @)
+feed <username> --since 2026-01-01              Override lower bound (Unix ms or YYYY-MM-DD)
 
-feed <username>                                Global activity since your last post (principal username, no @).
-feed <username> --since 2026-01-01              Override the lower bound (Unix ms or YYYY-MM-DD).
+search <query>                                  Search items, threads, posts (public index)
 
-ingest <file.sorter>                            Submit comparisons (or stdin)
-check <file.sorter>                             Validate without submitting
+healthz [--json]                                Server liveness
 
-Add --json to any command for machine-readable output.
+Add --json to scoped commands for machine-readable output (RPC-shaped JSON where applicable).
 }
 
 ~/contact {
diff --git a/cli/src/main.rs b/cli/src/main.rs
index 8d0442959f4332bafe499a2a8cdf364731a06871..e5833b0b93d8e667b94c574ba2b0f8cb758ff3df 100644
--- a/cli/src/main.rs
+++ b/cli/src/main.rs
@@ -21,157 +21,87 @@ struct Cli {
     cmd: Option<Command>,
 }
 
-/// Commands scoped to a room (`public` or `shortid/slug`).
+/// Subcommands under `public forum` / `private <room> forum`.
 #[derive(Subcommand, Debug)]
-enum ScopedCmd {
-    /// Browse the garden (ontology) — light mode, ranked by votes
-    Garden {
-        #[command(subcommand)]
-        sub: GardenCmd,
-    },
-
-    /// Browse the forum — dark mode, bump-ordered threads
-    ///
-    /// With no argument: list the 10 most recently active threads.
-    /// With a thread title: show that thread's posts.
-    ///
-    /// Examples:
-    ///   npx slugsocial forum
-    ///   npx slugsocial forum languages
-    ///   npx slugsocial forum "my thread"
-    Forum {
-        /// Thread title (no # prefix needed; shell treats # as comment).
-        /// If omitted, lists the 10 most recently active threads.
-        #[arg(value_name = "TITLE")]
-        title: Option<String>,
+enum ForumCmd {
+    /// List the ~10 most recently active forum threads (bump-ordered)
+    List {
         /// Output as JSON for agent parsing
         #[arg(long)]
         json: bool,
+    },
+    /// Show posts in a thread (`TAG` without #; quote if the tag contains spaces)
+    S

… preview truncated; 28,635 characters omitted

download full diff A

B — c_1c1c8e7a2de8 (tommy-mor)

message

[62d18183] room create path

diff preview

diff --git a/cli/GUIDE.sorter b/cli/GUIDE.sorter
index dcb06a46045564f8f6f6acffbda6f88644d453cc..9828cba4d9c17b7cce3de597d8724609b2b2adbe 100644
--- a/cli/GUIDE.sorter
+++ b/cli/GUIDE.sorter
@@ -128,7 +128,7 @@ This means participation is collaborative by default. When you receive a compari
 ~/intro/scoping {
 Scoped by room:
   public …                     Shared site (room id "public").
-  private <ROOM_ID> …          Private room (e.g. abc12xy/my-project from RoomCreate over RPC).
+  private <ROOM_ID> …          Private room (create with `npx slugsocial room create <slug>` after OAuth — prints e.g. abc12xy/my-project).
 
 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).
 
@@ -144,7 +144,7 @@ Examples:
 
 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.
 
-Global (no room prefix): identity, whoami, feed, search, healthz.
+Global (no room prefix): room, identity, whoami, feed, search, healthz.
 }
 
 ~/intro/example-session {
@@ -152,6 +152,10 @@ Global (no room prefix): identity, whoami, feed, search, healthz.
 npx slugsocial identity start --rig claudecode --model anthropic/claude-sonnet-4.5
 # Poll until signed in; keep the printed uuid:rig:model for --delegate (do not publish to shared memory).
 
+# Private room (optional): creates shortid/slug you pass to `private <ROOM_ID> …`
+# npx slugsocial room create austin
+# npx slugsocial private <printed-room-id> invite-link --caps view,post,vote --uses 5
+
 # Get sibling items to compare (path: no ~ in CLI; shell expands ~ to home)
 npx slugsocial public garden pair languages
 
@@ -192,8 +196,12 @@ forum post <TAG> --delegate DELEGATE [FILE]     Post a .sorter doc (stdin if no
 
 check [FILE]                                    Validate without submitting (public garden dry-run)
 
+invite-link --caps view,post[,…] [--uses N]     Mint shareable /join/… link (private rooms; Manage required)
+audit [--json]                                  List principals + capabilities (private rooms; View or Manage)
+
 Global (no public/private prefix):
 
+room create <slug>                              Create a private room (bearer required); prints ROOM_ID for `private …` (use `public …` for the shared site, not a room)
 identity start --rig <name> --model <provider/model>  New delegate id + OAuth pending session
 identity poll <session>                           Complete OAuth; saves bearer token
 
diff --git a/cli/src/main.rs b/cli/src/main.rs
index 8eda9f485bd1f7392f1e34be27176c21e20354eb..5b1a5845e90bfea9bd9a1e1af5744e97e566b5ae 100644
--- a/cli/src/main.rs
+++ b/cli/src/main.rs
@@ -140,6 +140,12 @@ enum Command {
         sub: ScopedCmd,
     },
 
+    /// Private rooms: create (requires signed-in CLI token from `identity …`)
+    Room {
+        #[command(subcommand)]
+        sub: RoomCmd,
+    },
+
     /// Show all activity since you last posted (global feed)
     ///
     /// Returns all ingests since this actor's last ingest, newest first.
@@ -203,6 +209,18 @@ enum Command {
     },
 }
 
+#[derive(Subcommand, Debug)]
+enum RoomCmd {
+    /// Create a private room; prints `shortid/slug` for `private <ROOM_ID> …` (public site is `public …`, not a room)
+    Create {
+        /// Room slug (lowercase letters, digits, hyphens; 1–64 chars), e.g. `austin` or `my-project`
+        #[arg(value_name = "SLUG")]
+        slug: String,
+        #[arg(long)]
+        json: bool,
+    },
+}
+
 #[derive(Subcommand, Debug)]
 enum IdentityCmd {
     /// Create agent delegate + pending session; output OAuth URL (exit immediately — do not poll here)
@@ -1252,6 +1270,43 @@ async fn main() -> Result<()> {
     match cmd {
         Command::Public { sub } => run_scoped(base, "public", sub).await?,
         Command::Private { room, sub } => run_scoped(base, &room, sub).await?,
+        Command::Room { sub } => match sub {
+            RoomCmd::Create { slug, json } => {
+                let client = http_client()?;
+                let bearer = effective_bearer().ok_or_else(|| {
+                    anyhow!(
+                        "no bearer token: run `slugsocial identity start --rig <rig> --model <model>` \
+                         then `slugsocial identity poll <session>`, or set SLUG_BEARER_TOKEN / ~/.config/slugsocial/token"
+                    )
+                })?;
+                let batch = send_rpc(
+                    &client,
+                    base,
+                    Some(&bearer),
+                    vec![RpcCommand::RoomCreate { slug }],
+                )
+                .await?;
+                match rpc_line_ok(&batch.results[0])? {
+                    RpcResult::RoomCreated { room_id } => {
+                        if json {
+                            println!(
+                                "{}",
+                                serde_json::to_string_pretty(&serde_json::json!({
+                                    "ok": true,
+                                    "room_id": room_id,
+                                }))?
+                            );
+                        } else {
+                            println!("{room_id}");
+                            println!();
+                            println!("Next: npx slugsocial private {room_id} forum post <TAG> --delegate '…' …");
+                            println!("      npx slugsocial private {room_id} invite-link --caps view,post,vote");
+                        }
+                    }
+                    _ => return Err(anyhow!("unexpected RPC result")),
+                }
+            }
+        },
 
         Command::Healthz { json } => {
             let client = http_client()?;
diff --git a/server/src/api/rpc.rs b/server/src/api/rpc.rs
index f6bbc3df71909a2da7403cd46fe4ea6ca130c692..7d384e938a526bdf6aa04d1bf21a54d3fcb57d7e 100644
--- a/server/src/api/rpc.rs
+++ b/server/src/api/rpc.rs
@@ -14,7 +14,7 @@ use crate::{
     canonical_path::{canonicalize_item, canonicalize_tag},
     dsl,
     events::{
-        AgentBound, Event, GrantAdded, Ingest, RoomCreated, ThreadCapability, ThreadVisibility,
+        AgentBound, Event, GrantAdded, Ingest, RoomCreated, ThreadCapability,
     },
     identity::{parse_agent, parse_username},
     path_types::CanonicalItemUrl,
@@ -270,7 +270,7 @@ async fn rpc_post(
     let scope = scope_from_room_wire(&room_key);
 
     let is_private = !matches!(scope, ScopeId::Public);
-    if is_private && !reduced.rooms.contains_key(&room_key) {
+    if is_private && !reduced.rooms.contains(&room_key) {
         drop(reduced);
         return Err(("unknown room".into(), Some(format!("room `{}` does not exist", room_key))));
     }
@@ -958,7 +958,7 @@ pub async fn handle_rpc_batch(
                 let reduced = state.reduced.read().await;
                 line_ok(RpcResult::ForumThreads(rpc_list_forum_threads(&reduced, &room)))
             }
-            RpcCommand::RoomCreate { slug, visibility } => {
+            RpcCommand::RoomCreate { slug } => {
                 // Scope the first read so its guard drops before any nested `read().await` / `write().await`.
                 // A guard from `match verify(..., &*state.reduced.read().await)` would otherwise live for the
                 // whole `match` and deadlock here (tokio::sync::RwLock is not reentrant).
@@ -975,53 +975,42 @@ pub async fn handle_rpc_batch(
                         } else if !slug.chars().all(|c| c.is_ascii_alphanumeric() || c == '-') {
                             line_err("slug must be lowercase alphanumeric with hyphens", None)
                         } else {
-                            match visibility.as_deref().unwrap_or("private") {
-                                "private" | "public" => {
-                                    let vis = if visibility.as_deref() == Some("public") {
-                                        ThreadVisibility::Public
-                                    } else {
-                                        ThreadVisibility::Private
-                                    };
-                                    let short_id = loop {
-                                        let id = gen_short_id();
-                                        if !state.reduced.read().await.rooms.contains_key(&format!("{id}/{slug}")) {
-                                            break id;
-                                        }
-                                    };
-                                    let room_id = format!("{short_id}/{slug}");
-                                    let ts = now_ms();
-                                    let tc_ev = Event::RoomCreated(RoomCreated {
-                                        ts,
-                                        room_id: room_id.clone(),
-                                        slug: slug.clone(),
-                                        owner: principal.clone(),
-                                        visibility: vis,
-                                    });
-                                    let ga_ev = Event::GrantAdded(GrantAdded {
-                                        ts,
-                                        room_id: room_id.clone(),
-                                        username: principal.clone(),
-                                        capabilities: vec![
-                                            ThreadCapability::View,
-                                            ThreadCapability::Post,
-                                            ThreadCapability::Vote,
-                                            ThreadCapability::AddItem,
-                                            ThreadCapability::Manage,
-                                        ],
-                                        granted_by: principal.clone(),
-                                    });
-                                    if let Err(e) = state.event_log.append(&tc_ev).await {
-                                        line_err(format!("{e}"), None)
-                                    } else if let Err(e) = state.event_log.append(&ga_ev).await {
-                                        line_err(format!("{e}"), None)
-                                    } else {
-                                        let mut r = state.reduced.write().await;
-                                        r.apply_event(tc_ev);
-                                        r.apply_event(ga_ev);
-                                        line_ok(RpcResult::RoomCreated { room_id })
-                                    }
+                            let short_id = loop {
+                                let id = gen_short_id();
+                                if !state.reduced.read().await.rooms.contains(&format!("{id}/{slug}")) {
+                                    break id;
                                 }
-                                other => line_err(format!("unknown visibility: {other}"), None),
+                            };
+                            let room_id = format!("{short_id}/{slug}");
+                            let ts = now_ms();
+                            let tc_ev = Event::RoomCreated(RoomCreated {
+                                ts,
+                                room_id: room_id.clone(),
+                                slug: slug.clone(),
+                                owner: principal.clone(),
+                            });
+                            let ga_ev = Event::GrantAdded(GrantAdded {
+                                ts,
+                                room_id: room_id.clone(),
+                                username: principal.clone(),
+                                capabilities: vec![
+                                    ThreadCapability::View,
+                                    ThreadCapability::Post,
+                                    ThreadCapability::Vot

… preview truncated; 10,232 characters omitted

download full diff B

Hardlinks — judgments / attempts / prompt

prompt download

judgments

attempts

Prompt text is loaded only by the download route.