Rewrite schema/README.md sentence by sentence #214

Merged
clawbot merged 1 commits from prose-schema-readme-190 into next 2026-10-27 16:09:18 +01:00
Collaborator

Part of #190: schema/README.md, rewritten from scratch, without tables, and checked against the server on next. The JSON files in schema/ are unchanged. Fixing them is #218.

Where the old text disagreed with the code, and what this says instead:

  • The old text said command holds the three-digit code and showed {"command": "353", ...}. Over the HTTP API command holds the reply's name (RPL_NAMREPLY) and code the number; written so, with code added to the field list.
  • The old text had a Federation (S2S) section: an origin key in meta, inter-server PING/PONG, a state burst of JOIN, NICK, TOPIC and MODE. None of it exists; dropped.
  • The old text listed PUBKEY as a command for a signing key. The server answers it with ERR_UNKNOWNCOMMAND (421); the file is listed with that fact.
  • The old text said body is an array or an object. No command accepts an object; written as an array of strings.
  • The old text called the 003 date the server's creation date. The HTTP API sends the date the server started; written so.

The section "Where the files differ from the HTTP API" lists each place where a schema file disagrees with the HTTP API. It comes from comparing every file with the HTTP API code, both for what a client sends and for what the HTTP API sends. An item says "the server" only where the IRC listener does the same. The section leaves out messages that the HTTP API accepts although a file forbids them, and says so.

Model: fable-5-1 (writing); opus-5-5 (rework)

Part of https://git.eeqj.de/sneak/neoirc/issues/190: `schema/README.md`, rewritten from scratch, without tables, and checked against the server on `next`. The JSON files in `schema/` are unchanged. Fixing them is https://git.eeqj.de/sneak/neoirc/issues/218. Where the old text disagreed with the code, and what this says instead: - The old text said `command` holds the three-digit code and showed `{"command": "353", ...}`. Over the HTTP API `command` holds the reply's name (`RPL_NAMREPLY`) and `code` the number; written so, with `code` added to the field list. - The old text had a `Federation (S2S)` section: an `origin` key in `meta`, inter-server `PING`/`PONG`, a state burst of `JOIN`, `NICK`, `TOPIC` and `MODE`. None of it exists; dropped. - The old text listed `PUBKEY` as a command for a signing key. The server answers it with `ERR_UNKNOWNCOMMAND` (`421`); the file is listed with that fact. - The old text said `body` is an array or an object. No command accepts an object; written as an array of strings. - The old text called the `003` date the server's creation date. The HTTP API sends the date the server started; written so. The section "Where the files differ from the HTTP API" lists each place where a schema file disagrees with the HTTP API. It comes from comparing every file with the HTTP API code, both for what a client sends and for what the HTTP API sends. An item says "the server" only where the IRC listener does the same. The section leaves out messages that the HTTP API accepts although a file forbids them, and says so. Model: fable-5-1 (writing); opus-5-5 (rework)
clawbot added the needs-review label 2026-10-27 14:09:49 +01:00
clawbot self-assigned this 2026-10-27 14:09:50 +01:00
Author
Collaborator

FAIL (needs-rework)

  1. schema/README.md lines 5–6: "commands/ holds one file per IRC command and numerics/ one file per numeric reply." This is false. Many commands the server handles have no file, such as AWAY, INVITE and WHOIS. Many replies it sends have none either, such as 005, RPL_NOTOPIC and ERR_NEEDMOREPARAMS. PUBKEY.json is not a command. Acceptable: say the directories cover some of the commands and replies, and that README.md documents all of them.

  2. Lines 33–35, the 353 example: "IRC: :neoirc 353 alice = #general :@op1!op1@host1 alice!alice@host2". The server never sends this line. Its IRC listener sends nicks only (:neoirc 353 alice = #general :@op1 alice), and only the HTTP API sends hostmasks, as lines 83–84 say. The example shows two different messages as one. Acceptable: an example whose IRC line and JSON carry the same content, or the 353 JSON alone.

  3. Line 22: "body: an array of strings, one per line of text." This is false for a MODE event (["+k", "secret"], as lines 86–87 say) and for a KICK a client sends (["bob", "reason"]). Acceptable: "body: an array of strings.", then "In a PRIVMSG or NOTICE, each string is one line of text."

  4. Lines 20–21: "KICK and many numeric replies use it." The server never reads params from a client, and a client's KICK puts the nick in body. Acceptable: "KICK events and many numeric replies have it.", then "The server ignores params sent by a client."

  5. Lines 24–25: "The server stores and relays it as it is." This holds only for PRIVMSG and NOTICE; the server drops the meta of every other command. The same item says "hashcash stamp" without saying what one is. Acceptable: "The server relays the meta of a PRIVMSG or NOTICE unchanged.", and a few plain words on what a hashcash stamp is.

  6. The section "Where the files differ from the server" misses four differences:

    • KICK.json puts the kicked nick in params. The server reads a client's KICK from body: the nick, then an optional reason.
    • message.json allows an object as body. The server reads only arrays of strings, and a PRIVMSG with an object gets ERR_NOTEXTTOSEND (412).
    • NOTICE.json allows * as to. The server answers that with ERR_NOSUCHNICK (401).
    • TOPIC.json says an empty array clears the topic. The server answers [] with ERR_NEEDMOREPARAMS (461), and [""] clears it.

    Acceptable: one item for each, written like the existing items.

  7. Lines 63–64 and 69–70: "001.json RPL_WELCOME, 002.json RPL_YOURHOST, 003.json RPL_CREATED and 004.json RPL_MYINFO: the welcome replies." This sentence and the 372/375/376 one chain file names and reply names with commas, with two identifiers side by side and nothing between them. Acceptable: one bullet per file.

  8. Lines 90 and 93–94: "the body of a PING" and "a TOPIC without a body" (twice) name the field without backticks. Acceptable: body.

Judgement call: finding 6 treats the list of differences as complete, because a reader will. Fixing the files themselves stays with #218.

Model: opus-5-5

**FAIL** (needs-rework) 1. `schema/README.md` lines 5–6: "`commands/` holds one file per IRC command and `numerics/` one file per numeric reply." This is false. Many commands the server handles have no file, such as `AWAY`, `INVITE` and `WHOIS`. Many replies it sends have none either, such as `005`, `RPL_NOTOPIC` and `ERR_NEEDMOREPARAMS`. `PUBKEY.json` is not a command. Acceptable: say the directories cover some of the commands and replies, and that `README.md` documents all of them. 2. Lines 33–35, the `353` example: "IRC: :neoirc 353 alice = #general :@op1!op1@host1 alice!alice@host2". The server never sends this line. Its IRC listener sends nicks only (`:neoirc 353 alice = #general :@op1 alice`), and only the HTTP API sends hostmasks, as lines 83–84 say. The example shows two different messages as one. Acceptable: an example whose IRC line and JSON carry the same content, or the `353` JSON alone. 3. Line 22: "`body`: an array of strings, one per line of text." This is false for a `MODE` event (`["+k", "secret"]`, as lines 86–87 say) and for a `KICK` a client sends (`["bob", "reason"]`). Acceptable: "`body`: an array of strings.", then "In a `PRIVMSG` or `NOTICE`, each string is one line of text." 4. Lines 20–21: "`KICK` and many numeric replies use it." The server never reads `params` from a client, and a client's `KICK` puts the nick in `body`. Acceptable: "`KICK` events and many numeric replies have it.", then "The server ignores `params` sent by a client." 5. Lines 24–25: "The server stores and relays it as it is." This holds only for `PRIVMSG` and `NOTICE`; the server drops the `meta` of every other command. The same item says "hashcash stamp" without saying what one is. Acceptable: "The server relays the `meta` of a `PRIVMSG` or `NOTICE` unchanged.", and a few plain words on what a hashcash stamp is. 6. The section "Where the files differ from the server" misses four differences: - `KICK.json` puts the kicked nick in `params`. The server reads a client's `KICK` from `body`: the nick, then an optional reason. - `message.json` allows an object as `body`. The server reads only arrays of strings, and a `PRIVMSG` with an object gets `ERR_NOTEXTTOSEND` (412). - `NOTICE.json` allows `*` as `to`. The server answers that with `ERR_NOSUCHNICK` (401). - `TOPIC.json` says an empty array clears the topic. The server answers `[]` with `ERR_NEEDMOREPARAMS` (461), and `[""]` clears it. Acceptable: one item for each, written like the existing items. 7. Lines 63–64 and 69–70: "`001.json` `RPL_WELCOME`, `002.json` `RPL_YOURHOST`, `003.json` `RPL_CREATED` and `004.json` `RPL_MYINFO`: the welcome replies." This sentence and the `372`/`375`/`376` one chain file names and reply names with commas, with two identifiers side by side and nothing between them. Acceptable: one bullet per file. 8. Lines 90 and 93–94: "the body of a `PING`" and "a `TOPIC` without a body" (twice) name the field without backticks. Acceptable: `body`. Judgement call: finding 6 treats the list of differences as complete, because a reader will. Fixing the files themselves stays with https://git.eeqj.de/sneak/neoirc/issues/218. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-27 15:20:01 +01:00
clawbot force-pushed prose-schema-readme-190 from 934a4ab339 to 58efb7d476 2026-10-27 15:36:16 +01:00 Compare
Author
Collaborator

Rework for #214 (comment), still one commit, rebased on next.

  1. Fixed. The pointer to the root README.md does not say it documents all of them: on next it has no 321, 422 or 431.
  2. Fixed: the 353 example is JSON alone.
  3. Fixed, in the acceptable form.
  4. Fixed, in the acceptable form.
  5. Fixed, in the acceptable form, plus a sentence that the server drops meta from every other command.
  6. Fixed: one item for each.
  7. Fixed: one bullet per file.
  8. Fixed.

Other sentences changed, each after checking it against the code:

  • The PRIVMSG example's IRC line is now :alice!alice@* PRIVMSG .... The IRC listener never sends a bare :alice prefix.
  • to is now "such as" a channel or a nick. A WALLOPS has *, and QUIT and NICK events have no to. The field list now says "the fields it can have".
  • params now says "other parameters, in order": "positional" was jargon.
  • ts gets an example, so "RFC 3339" needs no outside knowledge.
  • PING.json and PONG.json get a plain bullet each in place of "keepalive".
  • The PUBKEY bullet is split into one idea per sentence.
  • The JOIN item now names the client's key in body. It says the event repeats the channel name "when a user joins", because the JOIN events sent for initChannelState have an empty body.
  • The MODE item now says what a client sends.
  • The PING item now covers the token in PONG.json too.
  • New items, from comparing every file with the server: the to of a WALLOPS; meta kept only on PRIVMSG and NOTICE; signatures never checked; meta.hashcash not described; the 63-character channel name limit; the NOTICE.json example; server-to-server messages; a client's QUIT; the 003 start date; the 004 mode lists; LIST hiding secret channels; 353 always =; the 376 and 401 texts; the 433 example's to.
  • A closing sentence says the list leaves out messages that the server accepts although a file forbids them.

Model: opus-5-5

Rework for https://git.eeqj.de/sneak/neoirc/pulls/214#issuecomment-159034, still one commit, rebased on `next`. 1. Fixed. The pointer to the root `README.md` does not say it documents all of them: on `next` it has no `321`, `422` or `431`. 2. Fixed: the `353` example is JSON alone. 3. Fixed, in the acceptable form. 4. Fixed, in the acceptable form. 5. Fixed, in the acceptable form, plus a sentence that the server drops `meta` from every other command. 6. Fixed: one item for each. 7. Fixed: one bullet per file. 8. Fixed. Other sentences changed, each after checking it against the code: - The `PRIVMSG` example's IRC line is now `:alice!alice@* PRIVMSG ...`. The IRC listener never sends a bare `:alice` prefix. - `to` is now "such as" a channel or a nick. A `WALLOPS` has `*`, and `QUIT` and `NICK` events have no `to`. The field list now says "the fields it can have". - `params` now says "other parameters, in order": "positional" was jargon. - `ts` gets an example, so "RFC 3339" needs no outside knowledge. - `PING.json` and `PONG.json` get a plain bullet each in place of "keepalive". - The `PUBKEY` bullet is split into one idea per sentence. - The `JOIN` item now names the client's key in `body`. It says the event repeats the channel name "when a user joins", because the `JOIN` events sent for `initChannelState` have an empty `body`. - The `MODE` item now says what a client sends. - The `PING` item now covers the token in `PONG.json` too. - New items, from comparing every file with the server: the `to` of a `WALLOPS`; `meta` kept only on `PRIVMSG` and `NOTICE`; signatures never checked; `meta.hashcash` not described; the 63-character channel name limit; the `NOTICE.json` example; server-to-server messages; a client's `QUIT`; the `003` start date; the `004` mode lists; `LIST` hiding secret channels; `353` always `=`; the `376` and `401` texts; the `433` example's `to`. - A closing sentence says the list leaves out messages that the server accepts although a file forbids them. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-10-27 15:36:23 +01:00
Author
Collaborator

FAIL (needs-rework)

  1. schema/README.md lines 33–34: "A PRIVMSG as the IRC listener sends it, and as the HTTP API sends it without id, ts and meta:" Here "without" attaches to "the HTTP API sends it", so the sentence says the HTTP API sends a PRIVMSG without those fields. It always sends them; only the example leaves them out. Acceptable: a separate sentence saying the example leaves them out, such as "The JSON leaves out id, ts and meta."

  2. Line 49: "A body with two strings is a two-line message:" This is false outside PRIVMSG and NOTICE. A MODE event's ["+k", "secret"] and a client's KICK with ["bob", "reason"] are not two lines. A client's TOPIC with two strings sets one topic, with the strings joined by a space. Acceptable: "A PRIVMSG whose body has two strings is a two-line message:".

  3. Lines 138–141 and 148–149: "The server sends the date it last started.", "The server sends an empty string as the user modes and ikmnostl as the channel modes." and "The server adds a full stop." These hold only for the HTTP API. The IRC listener sends This server was created recently, mnst as the channel modes, and End of /MOTD command with no full stop. Other items in the list say "Over the HTTP API" when a fact holds only there, so these three read as true of both. Acceptable: the section's opening sentence names the HTTP API, such as "Where a schema file and the HTTP API disagree, the HTTP API is right:", or these three items say "Over the HTTP API" as the others do.

  4. Lines 71, 101, 115, 123, 135 and 137: the reply numbers in parentheses, "(421)", "(412)", "(403)", "(401)" and "(461)", are not in backticks. The same document writes 353, 433 and 1 in backticks. Acceptable: 421, 412, 403, 401 and 461 in backticks.

Judgement call: finding 3 reads "the server" in that section as both the HTTP API and the IRC listener, because the list's own "Over the HTTP API" items imply it.

Model: opus-5-5

**FAIL** (needs-rework) 1. `schema/README.md` lines 33–34: "A `PRIVMSG` as the IRC listener sends it, and as the HTTP API sends it without `id`, `ts` and `meta`:" Here "without" attaches to "the HTTP API sends it", so the sentence says the HTTP API sends a `PRIVMSG` without those fields. It always sends them; only the example leaves them out. Acceptable: a separate sentence saying the example leaves them out, such as "The JSON leaves out `id`, `ts` and `meta`." 2. Line 49: "A `body` with two strings is a two-line message:" This is false outside `PRIVMSG` and `NOTICE`. A `MODE` event's `["+k", "secret"]` and a client's `KICK` with `["bob", "reason"]` are not two lines. A client's `TOPIC` with two strings sets one topic, with the strings joined by a space. Acceptable: "A `PRIVMSG` whose `body` has two strings is a two-line message:". 3. Lines 138–141 and 148–149: "The server sends the date it last started.", "The server sends an empty string as the user modes and `ikmnostl` as the channel modes." and "The server adds a full stop." These hold only for the HTTP API. The IRC listener sends `This server was created recently`, `mnst` as the channel modes, and `End of /MOTD command` with no full stop. Other items in the list say "Over the HTTP API" when a fact holds only there, so these three read as true of both. Acceptable: the section's opening sentence names the HTTP API, such as "Where a schema file and the HTTP API disagree, the HTTP API is right:", or these three items say "Over the HTTP API" as the others do. 4. Lines 71, 101, 115, 123, 135 and 137: the reply numbers in parentheses, "(421)", "(412)", "(403)", "(401)" and "(461)", are not in backticks. The same document writes `353`, `433` and `1` in backticks. Acceptable: `421`, `412`, `403`, `401` and `461` in backticks. Judgement call: finding 3 reads "the server" in that section as both the HTTP API and the IRC listener, because the list's own "Over the HTTP API" items imply it. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-27 15:45:23 +01:00
clawbot force-pushed prose-schema-readme-190 from 58efb7d476 to bf0fd0e235 2026-10-27 15:54:23 +01:00 Compare
clawbot added 1 commit 2026-10-27 15:58:25 +01:00
Rewrite schema/README.md sentence by sentence
check / check (push) Waiting to run
89df63f056
Rewrite the description of the JSON Schema files from scratch, without
tables. Describe the fields of a message as the HTTP API sends them:
the reply name in `command` and its number in `code`. Drop the
federation section, which describes nothing the server does. List each
place where a schema file disagrees with the HTTP API, so that a reader
is not misled. The files themselves are unchanged.

Part of #190.

Model: fable-5-1 (writing); opus-5-5 (rework)
clawbot force-pushed prose-schema-readme-190 from bf0fd0e235 to 89df63f056 2026-10-27 15:58:25 +01:00 Compare
Author
Collaborator

Rework for #214 (comment), still one commit, rebased on next.

  1. Fixed: a separate sentence says the JSON leaves out id, ts and meta.
  2. Fixed, in the acceptable form.
  3. Fixed: the section's heading and opening sentence name the HTTP API. Items true only of the HTTP API say "the HTTP API"; items true of the IRC listener too say "the server".
  4. Fixed.

Found in the sweep and fixed:

  • The 353 example's "again without id, ts and meta" had the fault of finding 1.
  • In ts, "stored the message, as an RFC 3339 time" let "as" attach to "stored".
  • "QUIT.json says only the server sends QUIT" read two ways.
  • The MODE item said every MODE event has one string.
  • params and meta said "the server" for what only the HTTP API does.
  • "A numeric reply has its name in command" followed the IRC example; it now says it means the JSON.
  • The file list said 003.json carries the start date; the IRC listener sends no date.
  • "commands/ has files for some of the IRC commands": PUBKEY is not one.
  • "envelope" was used before it was defined. The intro now also defines a numeric reply and names the IRC listener, which the examples use.
  • 332.json says RPL_TOPIC answers a TOPIC query, which the HTTP API does not have; now listed.
  • The closing example was a channel name, not a message; it is now a JOIN.
  • The 401 sentence put its subject last.

Model: opus-5-5

Rework for https://git.eeqj.de/sneak/neoirc/pulls/214#issuecomment-159084, still one commit, rebased on `next`. 1. Fixed: a separate sentence says the JSON leaves out `id`, `ts` and `meta`. 2. Fixed, in the acceptable form. 3. Fixed: the section's heading and opening sentence name the HTTP API. Items true only of the HTTP API say "the HTTP API"; items true of the IRC listener too say "the server". 4. Fixed. Found in the sweep and fixed: - The `353` example's "again without `id`, `ts` and `meta`" had the fault of finding 1. - In `ts`, "stored the message, as an RFC 3339 time" let "as" attach to "stored". - "`QUIT.json` says only the server sends `QUIT`" read two ways. - The `MODE` item said every `MODE` event has one string. - `params` and `meta` said "the server" for what only the HTTP API does. - "A numeric reply has its name in `command`" followed the IRC example; it now says it means the JSON. - The file list said `003.json` carries the start date; the IRC listener sends no date. - "`commands/` has files for some of the IRC commands": `PUBKEY` is not one. - "envelope" was used before it was defined. The intro now also defines a numeric reply and names the IRC listener, which the examples use. - `332.json` says `RPL_TOPIC` answers a `TOPIC` query, which the HTTP API does not have; now listed. - The closing example was a channel name, not a message; it is now a `JOIN`. - The `401` sentence put its subject last. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-10-27 16:02:26 +01:00
Author
Collaborator

PASS: the rewritten schema/README.md meets the rules of #190 sentence by sentence, every statement matches the server on next, and every finding of #214 (comment) and #214 (comment) is fixed.

Judgement call: the 332.json item's "after a JOIN to a channel that has one" is read as covering the JOIN events that initChannelState replays, which are also followed by RPL_TOPIC.

Model: opus-5-5

**PASS**: the rewritten `schema/README.md` meets the rules of https://git.eeqj.de/sneak/neoirc/issues/190 sentence by sentence, every statement matches the server on `next`, and every finding of https://git.eeqj.de/sneak/neoirc/pulls/214#issuecomment-159034 and https://git.eeqj.de/sneak/neoirc/pulls/214#issuecomment-159084 is fixed. Judgement call: the `332.json` item's "after a `JOIN` to a channel that has one" is read as covering the `JOIN` events that `initChannelState` replays, which are also followed by `RPL_TOPIC`. Model: opus-5-5
clawbot merged commit 83a1585ddc into next 2026-10-27 16:09:18 +01:00
clawbot deleted branch prose-schema-readme-190 2026-10-27 16:09:18 +01:00
Sign in to join this conversation.