Skip to content

ARX4 ideation: Discord packing bets (explore #2 implemented) - #99

Closed
baanish wants to merge 5 commits into
arx4-experimentationfrom
cursor/arx4-discord-ideation-4e94
Closed

baanish wants to merge 5 commits into
arx4-experimentationfrom
cursor/arx4-discord-ideation-4e94

Conversation

@baanish

@baanish baanish commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Handoff — ARX4 Discord packing exploration

Experimental only. Nothing here ships as a codec. Base: arx4-experimentation.

Goal

Pack more into Discord’s [label](url) ≤ 2000 (JS/UTF-16 .length) beyond ARX3 baseBMP (~15.92 bits/unit).

What we explored and why we rejected it

Idea What we tried Why rejected / deprioritized
baseAstral wire Pack into supplementary-plane scalars (~20 bits/code point) Discord client counting looks like UTF-16 units (emoji≈2). Astral costs 2 units → ~10 bits/unit, worse than baseBMP. Optional paste test only.
Discord framing diet Short host / 1-char label Already practiced in the skill; host shortening is DNS, not a codec lever.
Alphabet / wire density tweaks Push past baseBMP Already ~99.5% of the 16-bit UTF-16 ceiling — exhausted.
Bet #2: content-first / CBOR + Brotli shared dict Binary envelopes; residual brotli(dict‖data)−brotli(dict); real brotli -D Residual estimates overstated (~6–8%). Real shared dict ~0–1%. Binary envelopes alone ≠ Discord unlock. Browser wasm still has no dict API. Keep as plumbing only.
Mined overlay growth Extra n-gram substitution layer Regressed this corpus (+3–4%). Don’t grow dicts without a gate.
Warm / contaminated chunk priors CDC-ish windows → short IDs, prior includes target Looks magical (−70%+) but is a content-addressed cache, not compression. Ignore warm numbers.
Leave-one-out chunk / word priors Same idea, held-out prior Regressed ~+20% BMP vs ARX3 — ID framing + literals lose to ARX3+Brotli.
Template / skeleton delta Strip known scaffolds, store residual+marks Brotli already eats repeats; mark scheme often adds overhead.
Label-as-bitstream Put title in Discord [label] Framing cost ≈ payload save → wash.
Hybrid stub URL + fence Bulk in ```arx fence, tiny link Usually wash/slight loss; paste UX bend, not denser wire.
Mosaic 1/N reassembly Split one artifact across N messages for N× budget Multiplies capacity in math, but protocol/UX not worth it. Prefer agent semantic splits (skill).
Kind-specific dictionaries Per-kind overlays; free tags (m/k/…) vs +1 selector Free tags cost 0 chars (prefer over +1 if ever shipping). On LOO corpus: do not beat ARX3 (Σ +0.4% free-tag, +0.8% with +1). Don’t spend a char hoping to “save thousands”. Needs a larger held-out corpus before revisit.

What we kept / preferred instead

  1. Agent-side semantic splits when over Discord budget — sections/files as independent self-decoding links (skills/agent-render-linking/SKILL.md). Not mosaic stitching.
  2. Small honest plumbing if ARX4 ever happens: implied envelope / kind IR (~3–4%), optional lossy preview (~8%) — not capacity unlocks alone.
  3. Revisit kind dicts or domain priors only with a bigger LOO/held-out gate that actually beats ARX3.

How to re-run

npm run bench:arx4-ideation
npm run bench:arx4-bet2
npm run bench:arx4-silly
npm run bench:arx4-kind-dicts

Docs

  • docs/arx4-ideation.md — ranked bets + Discord counting research
  • docs/arx4-bet2-bench.md — content-first + real brotli -D
  • docs/arx4-silly-cuts.md — priors, IR, mosaic/fence math
  • docs/arx4-kind-dicts.md — kind overlays + free-tag vs +1 selector

Non-goals

No shipped ARX4 tag, no AGENTS.md “ships” claims, no query-param bodies, no weakening fragment budgets.


PR contents (reference)

Experimental benches + skill split guidance on branch cursor/arx4-discord-ideation-4e94. Not a shipped codec.

Open in Web Open in Cursor 

Add an ideation probe and findings doc comparing ARX3 against denser
alphabets, binary envelopes, shared-dictionary estimates, and framing
tricks — without changing the shipped codec surface.

Co-authored-by: Aanish Bhirud <baanish@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 42b5c22c-cad7-4ea5-9266-8349a0db8cd5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/arx4-discord-ideation-4e94

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 8, 2026

Copy link
Copy Markdown

Deploying agent-render with  Cloudflare Pages  Cloudflare Pages

Latest commit: b9f6c10
Status: ✅  Deploy successful!
Preview URL: https://91a5db74.agent-render.pages.dev
Branch Preview URL: https://cursor-arx4-discord-ideation.agent-render.pages.dev

View logs

cursoragent and others added 2 commits July 8, 2026 18:38
Web evidence favors UTF-16 client counting (emoji=2), so deprioritize
baseAstral for Discord; keep content-first + real Brotli dict as the
main exploration path and drop framing from ARX4 scope.

Co-authored-by: Aanish Bhirud <baanish@users.noreply.github.com>
Add an experimental content-first/CBOR envelope module with round-trip tests,
and a bench that measures real `brotli -D` shared dictionaries against ARX3.
Residual dict estimates overstated wins; real shared-dict gains are ~0–2%.

Co-authored-by: Aanish Bhirud <baanish@users.noreply.github.com>
@cursor cursor Bot changed the title ARX4 ideation: squeeze more into Discord messages ARX4 ideation: Discord packing bets (explore #2 implemented) Jul 8, 2026
@baanish
baanish marked this pull request as ready for review July 8, 2026 19:00
}

function encodeCborishValue(value: CborishValue, chunks: number[], encoder: TextEncoder): void {
if (value === null) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: encodeCborishValue throws on undefined tuple elements, diverging from the shipped ARX2/3 JSON path and from the bench's own mirror.

envelopeToArx4Tuple can legitimately emit a tuple with an interior undefined hole: for a multi-artifact bundle with no envelope-level title but a non-first activeArtifactId, it returns [2, artifacts, undefined, activeIndex] (the trailing activeIndex stops trimOptionalTuple from removing the absent title). Arx2EnvelopeTuple explicitly allows this (OptionalTupleString = string | null | undefined). The shipped path JSON.stringifys such a tuple, mapping undefinednull, and the bench's encodeCborish mirrors that (if (v === null || v === undefined)). This CBOR path instead falls through to Unsupported ARX4 CBOR-ish value: undefined and throws, so encodeArx4CborishEnvelope(envelope) crashes on a valid envelope. Normalize undefinednull before CBOR-encoding (or broaden CborishValue/the null check) so the wire matches ARX2/3.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
src/lib/payload/arx4-content-first.ts 350 encodeCborishValue throws on undefined tuple elements (interior absent title in a multi-artifact bundle with activeIndex > 0), diverging from the ARX2/3 JSON path and the bench mirror; encodeArx4CborishEnvelope crashes on a valid envelope. Unchanged in this increment; re-verified at HEAD.
Files Reviewed (5 files)
  • src/lib/payload/arx4-content-first.ts - 1 issue (carried over, active inline comment)
  • scripts/bench-arx4-silly.mjs - 0 issues
  • docs/arx4-silly-cuts.md - 0 issues
  • docs/arx4-ideation.md - 0 issues
  • package.json - 0 issues

Fix these issues in Kilo Cloud

Previous Review Summary (commit 621bd00)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 621bd00)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
src/lib/payload/arx4-content-first.ts 350 encodeCborishValue throws on undefined tuple elements (interior absent title in a multi-artifact bundle), diverging from the ARX2/3 JSON path and the bench mirror; encodeArx4CborishEnvelope crashes on a valid envelope.
Files Reviewed (7 files)
  • src/lib/payload/arx4-content-first.ts - 1 issue
  • scripts/bench-arx4-bet2.mjs - 0 issues
  • tests/arx4-content-first.test.ts - 0 issues
  • scripts/arx4-ideation-probe.mjs - 0 issues
  • docs/arx4-bet2-bench.md - 0 issues
  • docs/arx4-ideation.md - 0 issues
  • package.json - 0 issues

Fix these issues in Kilo Cloud


Reviewed by glm-5.2-short · Input: 44K · Output: 8.4K · Cached: 836.9K

@greptile-apps

greptile-apps Bot commented Jul 8, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds ARX4 ideation benchmarks and a canonical arx4-content-first.ts module that explores binary (content-first) and CBOR-ish tuple encoding to pack more into Discord's 2000-char markdown link budget — all explicitly marked as non-shipped experiments. The production codec surface and AGENTS.md are untouched; the skill guidance is updated to explicitly forbid mosaic/1-of-N reassembly in favour of semantic splits.

  • src/lib/payload/arx4-content-first.ts — new round-tripable TS module implementing content-first binary envelope and CBOR-ish tuple encoder/decoder with varint lengths, proper error handling, and exhaustive kind switches; tested with four describe-blocks.
  • Four bench scripts (arx4-ideation-probe, bench-arx4-bet2, bench-arx4-silly, bench-arx4-kind-dicts) measure each idea against ARX3 BMP-char counts and document verdicts; none are wired into CI.
  • skills/agent-render-linking/SKILL.md is updated with explicit no-mosaic guidance and semantic-split examples for Discord over-budget payloads.

Confidence Score: 5/5

Safe to merge — all changes are experimental bench scripts and a clearly labelled non-shipped module; no production codec paths or shipped APIs are modified.

The canonical TS module is well-structured with round-trip tests, the bench scripts are isolated from CI, and the skill update correctly documents the no-mosaic decision. The two findings are narrow correctness issues in the CBOR decoder (silent passthrough for an input the encoder never produces) and a wire format inconsistency in the ideation probe — neither affects the production codec surface or the accuracy of the benchmark corpus results.

src/lib/payload/arx4-content-first.ts (CBOR additional-info 27 gap) and scripts/arx4-ideation-probe.mjs (meta-length encoding divergence)

Important Files Changed

Filename Overview
src/lib/payload/arx4-content-first.ts New experimental encoder/decoder for content-first binary and CBOR-ish tuple formats; CBOR decoder has a gap for additional-info value 27 (uint64 prefix) that causes silent misparse on fuzz/hostile input rather than a clear error
tests/arx4-content-first.test.ts Covers round-trips for markdown/code/CBOR, multi-artifact bundles, envelope title override, and truncation rejection; CSV and JSON artifact kinds are covered only implicitly through the bundle test
scripts/bench-arx4-bet2.mjs Real Brotli shared-dictionary benchmark; temp directory cleanup is not wrapped in try/finally (flagged in prior review); wire format mirrors canonical TS module correctly including varint meta-length
scripts/arx4-ideation-probe.mjs Initial ideation probe; encodeBinaryContentFirst uses a single-byte meta-length field and serializes empty meta as "{}" rather than "", diverging slightly from the canonical TS wire format and the bet2 bench; harmless for the current corpus but could mislead future callers on edge-case fixtures
skills/agent-render-linking/SKILL.md Updated to explicitly prohibit mosaic/1-of-N reassembly schemes; semantic-split guidance is clear and consistent with the PR's conclusions
package.json Adds bench:arx4-ideation, bench:arx4-bet2, bench:arx4-silly, and bench:arx4-kind-dicts scripts; none are wired into CI (test:ci) so they don't affect normal builds

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[PayloadEnvelope] -->|single text artifact| B["encodeArx4ContentFirst()\nmagic|version|kind|id|content|meta"]
  A -->|any artifact| C["envelopeToArx4Tuple()\nARX2/3 tuple shape"]
  C --> D["encodeArx4CborishTuple()\nCBOR major types 0/3/4/7"]
  A -->|bench baseline| E["ARX3 JSON tuple\n+ v1/overlay text substitution"]
  B --> F["brotliCompressSync q11\nnative zlib OR brotli-D CLI"]
  D --> F
  E --> F
  F --> G["baseBMP base-encode\n~15.92 bits/char\nDiscord payload chars"]
  G --> H{"≤ 1962 payload chars\n2000 – framing overhead"}
  H -->|fits| I["✓ Discord-safe link"]
  H -->|over budget| J["Split by meaning\nno mosaic protocol"]
  B -->|round-trip| K["decodeArx4ContentFirst()\ncodec: plain"]
  D -->|round-trip| L["decodeArx4CborishTuple()\nArx2EnvelopeTuple"]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
  A[PayloadEnvelope] -->|single text artifact| B["encodeArx4ContentFirst()\nmagic|version|kind|id|content|meta"]
  A -->|any artifact| C["envelopeToArx4Tuple()\nARX2/3 tuple shape"]
  C --> D["encodeArx4CborishTuple()\nCBOR major types 0/3/4/7"]
  A -->|bench baseline| E["ARX3 JSON tuple\n+ v1/overlay text substitution"]
  B --> F["brotliCompressSync q11\nnative zlib OR brotli-D CLI"]
  D --> F
  E --> F
  F --> G["baseBMP base-encode\n~15.92 bits/char\nDiscord payload chars"]
  G --> H{"≤ 1962 payload chars\n2000 – framing overhead"}
  H -->|fits| I["✓ Discord-safe link"]
  H -->|over budget| J["Split by meaning\nno mosaic protocol"]
  B -->|round-trip| K["decodeArx4ContentFirst()\ncodec: plain"]
  D -->|round-trip| L["decodeArx4CborishTuple()\nArx2EnvelopeTuple"]
Loading

Reviews (3): Last reviewed commit: "Deprioritize mosaic; probe kind dicts; t..." | Re-trigger Greptile

Comment on lines +12 to +13
* CBOR-ish: minimal CBOR major types 0/2/3/4/7 for the existing ARX2/3 tuple shape
* (non-negative ints, byte/text strings, arrays, null).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 The module-level comment says "CBOR major types 0/2/3/4/7" and "(non-negative ints, byte/text strings, arrays, null)", but major type 2 (byte strings) is never encoded or decoded — only major type 3 (UTF-8 text strings) is used. A future reader comparing the code against the RFC could spend time looking for the byte-string path that doesn't exist.

Suggested change
* CBOR-ish: minimal CBOR major types 0/2/3/4/7 for the existing ARX2/3 tuple shape
* (non-negative ints, byte/text strings, arrays, null).
* CBOR-ish: minimal CBOR major types 0/3/4/7 for the existing ARX2/3 tuple shape
* (non-negative ints, text strings, arrays, null).

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Codex

Comment on lines +551 to +553
const start = performance.now();
const rows = corpus.map((item) => ({ name: item.name, ...measureRow(item.envelope) }));
const budget = discordBudget();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 TMP_ROOT is created at module scope and the cleanup at the bottom only runs when execution reaches that line. If measureRow, brotliCli, or writeFileSync(REPORT_PATH, …) throw, the temp directory under tmpdir() is never removed. Wrapping the main work in try/finally ensures cleanup even on an unhandled error.

Suggested change
const start = performance.now();
const rows = corpus.map((item) => ({ name: item.name, ...measureRow(item.envelope) }));
const budget = discordBudget();
const start = performance.now();
let rows, budget;
try {
rows = corpus.map((item) => ({ name: item.name, ...measureRow(item.envelope) }));
budget = discordBudget();

Fix in Codex

Comment on lines +154 to +158
if (artifact.title) meta.t = artifact.title;
if (artifact.filename) meta.f = artifact.filename;
if (artifact.kind === "code" && artifact.language) meta.l = artifact.language;
if (envelope.title && envelope.title !== artifact.title) meta.e = envelope.title;
const metaBytes = encoder.encode(Object.keys(meta).length > 0 ? JSON.stringify(meta) : "");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Silent loss of undefined envelope title after round-trip. When envelope.title is falsy (e.g. not set) but artifact.title is a non-empty string, the encoder skips meta.e; the decoder then falls back to artifact.title, so decoded.title becomes the artifact title rather than undefined. The same applies to empty-string "" titles. For an experimental module this is likely acceptable, but the existing tests don't cover this case (markdownEnvelope always sets matching titles), so the edge case goes undetected.

Fix in Codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 621bd0062f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +121 to +122
if (end === fields.length) return fields;
return fields.slice(0, end) as T;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve tuple holes as null placeholders

For valid payloads where an earlier optional tuple slot is absent but a later one is present (for example a code artifact with title/filename but no language, or a diff with oldContent/newContent but no patch), this returns tuples with interior undefined entries. encodeCborishValue has no undefined case, so encodeArx4CborishEnvelope throws instead of mirroring the existing ARX2 tuple packing, which keeps those slots as null placeholders.

Useful? React with 👍 / 👎.

Comment on lines +815 to +817
w("1. **Content-first binary envelope + CBOR/binary tuple (worth exploring)**");
w(" - Alone: small (~0–5%) on already-substituted ARX3 text.");
w(" - Combined with a shared-dict estimate: best corpus BMP win here (~2–28% depending on fixture).");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the ideation generator aligned with bet #2

Because npm run bench:arx4-ideation rewrites docs/arx4-ideation.md from these strings, rerunning the documented command replaces the committed bet #2 follow-up with the older recommendation that content-first/CBOR plus shared-dictionary estimates is still worth exploring. That drops the new real-brotli -D conclusion that the win was only about 0–1%, so the generated report regresses to stale guidance.

Useful? React with 👍 / 👎.

Comment thread docs/arx4-ideation.md
## Corpus results

Visible char counts assume the ARX3-style compact tag + dense Unicode wire (marker + 2-char length + digits).
Percentages are vs ARX3 baseBMP visible chars (negative = larger / worse).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Correct the delta sign explanation

The tables immediately below use negative deltas for smaller/winning outputs (for example 351 vs the 401 ARX3 baseline is shown as −12.5%, and the win column also reports wins as negative), so this sentence tells readers to interpret the signs backwards and can invert the benchmark conclusions.

Useful? React with 👍 / 👎.

return {
v: 1,
codec: "plain",
title: typeof meta.e === "string" ? meta.e : artifact.title,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve absent envelope titles

When a single artifact has its own title but the envelope's top-level title is intentionally absent, the encoder only writes meta.t and no marker for the envelope title, so this fallback recreates envelope.title from the artifact title. As a result decodeArx4ContentFirst(encodeArx4ContentFirst(envelope)) changes valid metadata (also for explicit empty titles), unlike the ARX2/3 tuple path, and consumers that use envelope.title for labels/status see a title that was not in the original payload.

Useful? React with 👍 / 👎.

Measure unconventional Discord packing levers beyond envelope/Brotli
tweaks. Leave-one-out priors regress vs ARX3; warm priors are fake.
Mosaic across messages is the only real capacity multiplier.

Co-authored-by: Aanish Bhirud <baanish@users.noreply.github.com>
for (const r of rows) {
const L = r.label;
w(
`| ${r.name} | \`${L.shortLabel.replace(/\|/g, "\\|")}\` | ${L.framingDelta > 0 ? "+" : ""}${L.framingDelta} | ~${L.approxPayloadBmpSaved} | ${L.netDiscordDelta > 0 ? "+" : ""}${L.netDiscordDelta} |`,
@greptile-apps

greptile-apps Bot commented Jul 8, 2026

Copy link
Copy Markdown

Want your agent to iterate on Greptile's feedback? Try greploops.

Kind-specific LOO overlays do not beat shared ARX3 on this corpus
(even with free tags). Prefer agent-side section/file splits in the
linking skill over mosaic reassembly. Document the +1-char verdict.

Co-authored-by: Aanish Bhirud <baanish@users.noreply.github.com>
@baanish

baanish commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

Handoff — ARX4 Discord packing exploration

Experimental only. Nothing here ships as a codec. Base branch: arx4-experimentation.

Goal

Pack more into Discord’s [label](url) ≤ 2000 (JS/UTF-16 .length) beyond ARX3 baseBMP (~15.92 bits/unit).

What we explored and why we rejected it

Idea What we tried Why rejected / deprioritized
baseAstral wire Pack into supplementary-plane scalars (~20 bits/code point) Discord client counting looks like UTF-16 units (emoji≈2). Astral costs 2 units → ~10 bits/unit, worse than baseBMP. Optional paste test only.
Discord framing diet Short host / 1-char label Already practiced in the skill; host shortening is DNS, not a codec lever.
Alphabet / wire density tweaks Push past baseBMP Already ~99.5% of the 16-bit UTF-16 ceiling — exhausted.
Bet #2: content-first / CBOR + Brotli shared dict Binary envelopes; residual brotli(dict‖data)−brotli(dict); real brotli -D Residual estimates overstated (~6–8%). Real shared dict ~0–1%. Binary envelopes alone ≠ Discord unlock. Browser wasm still has no dict API. Keep as plumbing only.
Mined overlay growth Extra n-gram substitution layer Regressed this corpus (+3–4%). Don’t grow dicts without a gate.
Warm / contaminated chunk priors CDC-ish windows → short IDs, prior includes target Looks magical (−70%+) but is a content-addressed cache, not compression. Ignore warm numbers.
Leave-one-out chunk / word priors Same idea, held-out prior Regressed ~+20% BMP vs ARX3 — ID framing + literals lose to ARX3+Brotli.
Template / skeleton delta Strip known scaffolds, store residual+marks Brotli already eats repeats; mark scheme often adds overhead.
Label-as-bitstream Put title in Discord [label] Framing cost ≈ payload save → wash.
Hybrid stub URL + fence Bulk in ```arx fence, tiny link Usually wash/slight loss; paste UX bend, not denser wire.
Mosaic 1/N reassembly Split one artifact across N messages for N× budget Multiplies capacity in math, but protocol/UX not worth it. Prefer agent semantic splits (skill).
Kind-specific dictionaries Per-kind overlays; free tags (m/k/…) vs +1 selector Free tags cost 0 chars (prefer over +1 if ever shipping). On LOO corpus: do not beat ARX3 (Σ +0.4% free-tag, +0.8% with +1). Don’t spend a char hoping to “save thousands”. Needs a larger held-out corpus before revisit.

What we kept / preferred instead

  1. Agent-side semantic splits when over Discord budget — sections/files as independent self-decoding links (skills/agent-render-linking/SKILL.md). Not mosaic stitching.
  2. Small honest plumbing if ARX4 ever happens: implied envelope / kind IR (~3–4%), optional lossy preview (~8%) — not capacity unlocks alone.
  3. Revisit kind dicts or domain priors only with a bigger LOO/held-out gate that actually beats ARX3.

How to re-run

npm run bench:arx4-ideation
npm run bench:arx4-bet2
npm run bench:arx4-silly
npm run bench:arx4-kind-dicts

Docs

  • docs/arx4-ideation.md — ranked bets + Discord counting research
  • docs/arx4-bet2-bench.md — content-first + real brotli -D
  • docs/arx4-silly-cuts.md — priors, IR, mosaic/fence math
  • docs/arx4-kind-dicts.md — kind overlays + free-tag vs +1 selector

Non-goals

No shipped ARX4 tag, no AGENTS.md “ships” claims, no query-param bodies, no weakening fragment budgets.

@baanish baanish closed this Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants