Repository navigation
🤖 docs: halve agent-facing text, enforce its rules as checks, and fix the drift it hid - #8233
Conversation
…L sink audits, backend logging, HistoryService doubles, docs layout)
…into code comments and process text into skills
Replace prose that restates scripts, the Makefile or pr.yml with pointers to the source, and fix stale facts (story locations, the socket path limit, references to a removed AGENTS.md section, a missing test file path).
…ead of racing it
…t overrides A blinded ablation (3 replicates x 2 real tasks per condition) found no score gap of 2 points or more between the full text, root+domain, and root-only AGENTS.md (medians 9.0 / 8.77 / 7.875). Under the pre-registered rule, the domain section, the workflow section and the .xum/agents exec/plan overrides go. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
…rules in AGENTS.md The pre-registered ablation rule deletes every skill an A run opened when the full text does not beat root+domain by 2 points (it did not: 9.0 vs 8.77). One A run opened pull-requests. The rules agents cannot discover from the repo (title prefix, attribution footer, never merge yourself, wait_pr_ready.sh) move into the root AGENTS.md section. The eval graded code changes, not PR or commit text, so this commit is separate and can be reverted on its own. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
…session opened Pre-registered rule R3: delete the prose of any skill or RFC that 0 of the 6 full-text eval runs opened and at most 1 of 94 real xum sessions on this host opened. Deleted: bug-bash, react-effects, generate-readme-screenshots, verify-xum (SKILL.md and features/), tbench, formal-stop-retry, the vendored dogfood and electron skills (and their skills-lock.json entries), and every RFC except 20261030_cursor-plugin-support.md (opened in 14 or more real sessions). Code that a Makefile target, workflow or test calls stays and moves out of the skill folders: - verify-xum.sh and webkit-capture.mjs -> scripts/verify-xum/ (now shfmt-checked like the rest of scripts/; covered by the `scripts/**` CI path filter). - the TLA+ model, configs and check.sh -> formal/stop-retry/ (`make formal-check`); each config names its Stop entry point. - benchmarks/terminal_bench/README.md was a symlink to the tbench SKILL.md; it is now a regular README with the same text. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
…EADME example The Makefile has no TB_SAMPLE_SIZE; TB_TASK_NAMES is the knob that limits a run. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
Reverts 4bdd2bb4d. The ablation graded code tasks only, so it says nothing about PR, commit or review work, which is what this skill covers (and it is the most-read project skill: 20 of 94 real sessions). --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
R3 deleted verify-xum because no full-text eval run and only one real session opened it. Neither eval task needed a check in the running app, so the eval never measured it, and the skill is the repo's means of proving a UI change against the real artifact. The skill comes back unchanged with its scripts in their old place; only the links to the deleted electron and bug-bash skills now name the Makefile targets. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
Like verify-xum, R3 deleted them on usage counts the eval could not test: neither eval task needed a repro story or touched the auto-retry code. bug-bash is how a finding becomes a failing repro test, and formal-stop-retry tells an agent that touches RetryManager or the stream-error code to run `make formal-check` and maps the model to the code. Both come back unchanged, with the TLA+ files in their old place. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
…ent's LoC rule The ablation scored root + design judgment above root only on both tasks (medians 9.04 vs 7.50 and 8.50 vs 8.25), short of the 2-point bar with only 3 runs each. Four weeks of transcripts show agents acting on rules that exist nowhere else in the repo, such as checking a UI change at 375px (20 sessions) and `.nullish()` tool inputs (16). The rules are not discoverable from the code, so the section comes back. .xum/agents/plan.md (net LoC estimate per approach) returns too: every eval run used Exec mode, so the eval never measured it. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
…kills - rfc/*: design records that humans own (rfc/README.md), including an open Draft (foreign-plugin-agent-aliases). Agent read counts are the wrong test for them. - react-effects: the design-judgment section points to it, and code comments cite it (RightSidebar.tsx). - tbench: back as the skill, with benchmarks/terminal_bench/README.md linking to it as before; its example no longer names the nonexistent TB_SAMPLE_SIZE. - electron (vendored, with its skills-lock.json entry): the only how-to for driving the desktop app over CDP; dev-desktop-sandbox and verify-xum point to it. Also fixes .storybook/test-runner.ts, which said a limit is stated in docs/AGENTS.md; it is in the tests skill. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
The transcripts of a second Xum host (12 months, about 18,000 xum sessions) show both in use: agents loaded dogfood in 129 sessions, 35 of them in November 2026, and generate-readme-screenshots in 13 sessions, 8 in November. The first host only covered four weeks. generate-readme-screenshots now matches scripts/capture-readme-screenshots.ts: a 3 s settle (not 2 s), 3 attempts in total, a viewport-only capture, and `bun install --frozen-lockfile` instead of `bun add` for missing deps. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
…arry Delete what the scripts already print or document: the mergeable/merge-state table and rebase command (wait_pr_checks.sh), the security-receipt mechanics (check_codex_comments.sh, wait_pr_codex.sh), the heredoc comment example (wait_pr_codex.sh), the queue-reading details and check-name pointer (watch_pr_state.sh header). Delete the copies of AGENTS.md rules (local validation, the PR creation gate) and merge the triplicated coder-agents-review and push-upkeep rules into one place each. Keep the footer, readiness definition, loop, early-stop cases, review-fix scope, gate-at-origin/main and merge-queue lessons. Add `docs` to the title prefixes (used on main), state that the readiness script's Codex usage-limit pass is not approval, and say merges need the user's explicit request (the merge-queue section assumes agents land PRs when asked). Make the no-hand-written-polling-loop rule prominent: transcripts still show hand loops in 1 of 5 sessions.
The skill restated the Makefile, the workflow inputs and each script's docstring, and several of its facts had drifted: - Results are Harbor job folders (`jobs/<timestamp>/`), not `runs/...` with `sessions/agent.log` (terminal-bench.yml "Print results summary"). - CI has uploaded no run artifacts since #4002, so download_run_logs.py and the download modes of prepare_leaderboard_submission.py find nothing for new runs; the skill still sent agents there. - The scheduled run covers five models twice a week, not "Claude and GPT nightly", and its example models did not match the workflow. - The Daytona tier and speed numbers contradicted the workflow's 25-sandbox note. Keep the judgment the code does not carry: CI dispatch by default, MUX_RUN_ARGS instead of per-flag plumbing, one global TB_TIMEOUT, the monitored local run, and where results and failure analysis live. List TB_TASK_NAMES, MUX_RUN_ARGS and MUX_RUN_AS_GOAL in the `make help` line instead of the skill, move the Hugging Face upload fallback into the docstring of the script that prints the upload command, and drop the leaderboard no-submit rule that AGENTS.md already holds.
… traps Delete what scripts/capture-readme-screenshots.ts already states: the viewport, DPR and WebP constants, the story-to-file table, the retry and wait steps, the dimension check (the script prints each size and exits 1 on a failed story) and the ProductHero note. Two of those claims were stale: MobileServerMode uses the postProcess hook the skill called unused, and four stories crop with a clip, so not every image is 3800 px wide. The description and file table named src/browser/stories/mockFactory.ts, which no longer exists; the mocks are under src/browser/stories/mocks/. Keep the procedure (static build, background server, capture), the stop rule for missing dependencies, the bun-fetch versus curl trap, the retry advice for interactive stories and the fix-the-story-not-the-script rule.
Applies the pstack no-prose method (Steps 1-2) to the verify-xum skill. - Deletes prose that restates verify-xum.sh, its refusal messages (which name their fixes), warmViteModules.ts and the Makefile: the launch readiness list, the per-refusal list, doctor's check list, the run-home rules, WebKit host/Docker mechanics and the Playwright bump recipe. - Keeps one owner per rule: SKILL.md Drive owns the driving rules that features/README.md repeated, and the threat model now also covers the Xum Browser tab turning a session's stream on (moved from dev-server-sandbox). - Makes the rules agents broke in transcripts prominent with the failure seen: the token in an `agent-browser open` argument, a missing `eval` of `verify-xum.sh env`, and runs that ended without cleanup. - Fixes stale code refs (App.tsx:1386 and App.tsx:1133 had drifted) by citing symbols, and drops dated history lines. - Adds scripts/verifyXumFeatures.test.ts, which replaces the "Feature entry contract" prose: feature-file shape, index links, relative links and anchors, and no file:line refs. The PR workflow's config filter now covers the whole skill folder so Markdown edits run it.
Applies the pstack no-prose method (Steps 1-2) to both sandbox skills. - dev-server-sandbox: deletes what the script, its --help, its banner and the Makefile's comments already say (seeding steps, Allowed hosts, token mechanics and lifetimes, the Unix socket and its length limit). Keeps the monitored background start, the stdin curl and agent-browser recipes, and the guardrails no code enforces: the seeded API keys, XUM_DEV_SERVER_NO_AUTH=1 and XUM_VITE_ALLOWED_HOSTS=all. The DevTools, stream and Xum Browser tab warnings now live once, in verify-xum's threat model, which this skill points to. - dev-desktop-sandbox: points to the dev-server sandbox for seeding and the background start instead of repeating them, names the electron skill and the printed Electron debug port for driving the app, and says to set ELECTRON_DEBUG_PORT=0 on a host with other accounts because that port has no credential. Moves the XUM_SERVER_PORT override into the script's header comment, beside the others. - Fixes the dev-server script header's stale ~/.mux-dev default. - scripts/verifyXumFeatures.test.ts now also resolves these skills' links and anchors into verify-xum, and the PR workflow's config filter covers both folders.
Wait timeouts were the most frequent failure in the sampled verify-xum and dev-server-sandbox transcripts. The Gotchas now start from that symptom: run idle, reload on exit 3, and run idle once more on a slow Loading Xum. The Launch section also says that source edits hot-reload, so an edit needs no new launch.
…ts skill SKILL.md goes from 27,342 to 11,401 bytes. It cited 15 file:line numbers, 11 of them drifted (such as agentSession.ts:3554 and workspaceTurnManager.ts:4038), and repeated the sync-line rule. Its diff recipe also resolved the sync commit with `git log -G`, which now finds the 2026-12-04 skill restore instead of #7903, so it showed no code change since the last sync. - scripts/formalStopRetrySkill.test.ts fails when SKILL.md or StopRetry.tla cite a file:line, name a function, file or event that is not in src/, quote a test title that no test file holds, or write anything but a PR number in the sync line. It also fails when a new function calls handleStreamFailureForAutoRetry, retryManager.handleStreamFailure or beginWorkspaceStop and neither file names it. - The diff recipe finds the sync commit by the PR number on the sync line, and diffs the src/ files the folder cites plus every file that sets disableAutoRetry, instead of a hand-kept list. - The scope, the gaps and why each is safe move from SKILL.md into the header of StopRetry.tla (no line numbers). The table keeps function names only. The run details that check.sh's header and the Makefile already give are gone.
SKILL.md goes from 20,121 to 5,336 bytes. Most of it restated the headers of tests/bugbash/run.ts, sandbox/launch.ts, proxy.ts, runner.ts, hostPause.ts and aiMode.ts, the Makefile comments, the stories files and the Stories workflows. It keeps the judgment calls and the guardrails (the key variable, the budget is not a billing cap, paid repro calls, the manual leftover check before `docker rm -f`). - tests/bugbash/reproRules.test.ts now also fails on a repro test with no `bugbash` tag or no bug ID tag, one that sends a `[mock:...]` prompt (directly, through a file-level constant or a local helper) without `mock-only`, and a `known-failure` test without the open issue's number. Those rules leave the skill. - The skill's exit-code table described `make bug-bash`, but make exits 2 on any failure; the run's own code is make's `Error N`. The skill now says so and points at run.ts's header. - The charter rules (name the workspace and view, keep explorers out of MCP servers and editor commands) move to the charters.txt header. - cacheSeed.ts told readers to copy a job's cache into the seed folder, which grows the seed until checkSeed refuses it; it now names `summary.ts --next-seed`. launch.ts pointed at docs/AGENTS.md for the manual leftover check, which is in the bug-bash skill.
…anges The Bun unit job runs only when pr.yml's src or config filter matches. A PR that edits only .xum/skills/formal-stop-retry (a new file:line citation, a renamed function in the code map, a branch SHA on the sync line) matched neither, so scripts/formalStopRetrySkill.test.ts did not run for it. The config filter now lists the folder, as it lists verify-xum's scripts for scripts/verifyXumWebkit.test.ts.
Drop text that restates the Makefile, .storybook/main.ts, the test runner and AGENTS.md (the tautology rule), and fix stale facts: tests/ui starts from createAppHarness() (47 files) rather than renderReviewPanel(), scroll settling is waitForScrollStabilization() in storyPlayHelpers.ts (useAutoScroll no longer waits a frame), and the Storybook test runner pins a viewport for stories in PINNED_VIEWPORT_STORIES. The runner's own comment now carries the diagram-timing limit the skill used to repeat.
…help crap-check's repair line offered "or test it" even when the report scored complexity alone (the commit hook, plain `make crap-check`), where no test lowers the score. The line now says so in that mode, with a test, so the skill drops its paragraph about it. The skill also drops text the report already prints (rules, reliefs, the shrink repair), the `!` half of the `?.` rule that ESLint's no-non-null-assertion enforces, and the Crap-Debt approval rule that AGENTS.md holds. It keeps the async split rules, the anti-gaming rules and the trailer-versus-label mechanics.
Drop text the reports, markers.py and pr.yml already carry (the DRY repair steps, "do not change code only to kill a mutant", the CI modes, the marker examples' parsing rules) and the assertion rule the crap-gate skill holds. Keep marker discipline, the moved-file note and the partial-run procedure. The skill, the check.ts header and the Makefile said exit 3 means a test failed without a mutant. check.ts returns 3 for any dropped test, including one that hung or met the 15-minute deadline (a slow suite), which needs a hand run of its mutants rather than a test fix; all three now say so. The skill also names the most common equivalent mutant (`??` to `||` on a value that is never falsy), which agents rewrote code to dodge.
Keep the decision order, the anti-pattern examples, useSyncExternalStore and the stale-fetch guard in one shorter page. Drop the app-initialization section (no agent used it in 78 sessions that loaded the skill) and the react.dev link. No lint replaces the prose yet: the pinned eslint-plugin-react-hooks 5.2.0 has only rules-of-hooks and exhaustive-deps, and oxlint 1.88's react/set-state-in-effect flags 129 sites in 80 files, a mix of real prop-to-state syncs and legitimate fetch effects, so it is not enabled.
Merge the review rubric into the lane list (they named the same areas), drop the generic diff-reading steps and the anti-patterns that repeated the intro, and keep the lanes, the severity scale and the synthesis format that past reviews used. Questions now go only to what the code cannot answer: users often replied to a review's question list by telling the agent to decide. The docs page and the built-in xum-docs skill embed this file and are regenerated.
Both BigQuery upload steps in terminal-bench.yml ran only when `github.repository == 'coder/mux'`. After the repo became coder/xum in August 2026 every run skipped them: the nightly runs of 2026-08-17 still show one upload step succeeding per job, and every sampled run from 2026-09-14 on shows both skipped. The steps now check for coder/xum. The tbench skill notes the gap, so nobody reads it as missing runs. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
#8231 added an iOS section to the old AGENTS.md while this branch shortened it. The section stays as written: its rule binds changes made outside ios/ (settings, workspace actions, route shapes), so it must be always-on rather than in a skill. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dc4860dad2
ℹ️ 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".
The test failed only when the hint's wording changed, which AGENTS.md rules out. The mode-dependent hint in check.ts stays; its comment says why. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
🟢 e2e stories (Haiku): 14 passed21 agent steps · 6 replayed from cache · 15 model calls · 47.5k tokens (23% cached) All 14 tests in 9 files
e2e 0.20.0 · 1m 19s · web · run artifacts 🟢 e2e Electron stories (Haiku): 3 passed3 agent steps · 3 model calls · 7.9k tokens (22% cached) All 3 tests in 3 files
e2e 0.20.0 · 20.4s · electron · run artifacts 🟢 e2e agent repros (Haiku): no tests selectedSpend: $0.00 of the $1.00 cap (proxy ledger) e2e 0.20.0 · 6.5s · 2 targets (web, phone) · run artifacts |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Ready except the review gate: Codex approved 4e4d0a8, every review thread is resolved, and every required check passes (44 pass, 8 skipped). The |
…ts first oracle found (#8228) ## Summary Adopts `@tanstack/oracles` in Xum, starting with an oracle for the memory secret detector (`src/node/services/memorySecretRedaction.ts`). The oracle states six laws about what `redactSecretLike`, `redactWithinCap`, `containsSecretLike` and `addsSecretLike` promise, and checks them against an independent model with generated notes. It found six classes of leaks and false refusals, and this PR fixes them. ## Background The detector guards every memory write (`memoryService.ts` `assertNoNewSecret`) and redacts what the memory harvest quotes. Its unit tests pin examples, but the inputs are open-ended: any note, line order, lead character and JSON escaping. An oracle generates those inputs and judges each result against the law, and its gap check mutates the owned code to show which changes no law notices. ## What the oracle found (fixed here) The share is the measured share of generated inputs in each family that broke the law before the fix. | Rule broken | Example | Share | | --- | --- | --- | | A nested YAML key leaked its value | `token:` over ` api_key: X` | 15/65 combinations | | In JSON-escaped text, a provider key, `Bearer` or JWT on a later line leaked | `"a\nsk-..."` | 7/20 shapes | | A key that its own quotes wrap took the closing quote as its value, eating the text after it | `\"API_KEY=\"` inside a JSON string | 3–5/14 forms | | A cookie value two JSON layers deep lost its closing quote | `\\\"Cookie: sid=S\\\"` | 7/9 frames | | A note that quotes a key's marker was refused | `password=[redacted]`, `API_KEY: [redacted]` | every unquoted key form | | A key behind leading punctuation on the line under a key leaked (also on `main`) | `password=` over `(API_KEY: <value>` | found by CI's random seed | | A cookie value ran past its line or its list's `]` | `curl -H "Cookie: sid=S"; echo done`, `["a=]b", "sid=S"]` | both shapes | Also tightened: a key pair on the line under a key (YAML's nested `api_key:`, or one behind punctuation such as `(API_KEY:`) is never the value of the key above, so its own value goes, while a key name glued into a value on the key's own line (`password=hunter2_api_key:`) is the value's text and goes with it, a key's own closing quote is not its value, and an unquoted value of Markdown structure or a placeholder alone (`` ` ``, `**`, `~~`, `>`, `...`) is no value, while any other symbols are (`password=!@#$%^`). Each fix went oracle-first: the law failed on the old code, then passed after the fix. New unit tests also fail on the old code. ## Implementation - **Toolchain:** `@tanstack/oracles` 0.0.1, `@tanstack/eslint-plugin-oracles` 0.0.1, `fast-check` 4.11.0, `vitest` 4.1.12, pinned. `bunfig.toml` exempts the two TanStack packages from the 7-day release wait; remove that after 2026-12-10. - **Lint:** the oracle presets in `eslint.config.mjs`, mirrored in `.oxlintrc.json` (the plugin is aliased to `oracle`, its rule prefix). `oracle/no-oracle-disable` cannot run in oxlint (its JS plugin API lacks `getInlineConfigNodes`), so `check-oxlint-config.mjs` lists it as an intentional gap. - **Running:** `make test-oracles` runs the oracles and the gap check (local, about 90 s). `make check-oracles` runs only the laws (about 5 s); CI runs it in `Test / Unit` shard 1, because the gap check exits 0 even when a law fails. `vitest.oracle.config.mts` joins the `config` path filter. - **Agents:** an "Oracle tests" block in `AGENTS.md` (the tool's template 4, condensed to the shorter style of #8233), and skill pointers in `.agents/skills` and `.claude/skills` that load the skills shipped in `node_modules/@tanstack/oracles`. - **The oracle:** `tests/oracles/memorySecretRedaction.oracle.ts`, six laws: secrets go, ordinary text stays, guards agree, a quoted marker is no credential, the cap shows only its own text, no throw. Laws 1–4 also hold on notes JSON-escaped once or twice. ## Validation - Gap check: 665 mutants, 562 killed, 103 gaps (268 at the first full run). The guards-agree law now covers a renamed key that keeps its value (`password=hunter2` to `API_KEY: hunter2`, accepted), which kills the change that would compare main's key read with its key. Remaining gaps: 68 in the cookie reader's list and quote paths (mostly code that no history reaches, since the regex pass redacts those values first), 18 in marker tails (non-ASCII letters, the `]` scan), 14 in the `]` tracking between passes, 3 in the cap. - Every unit test file that imports the detector or the memory service passes (2313 tests). The linear-time tests can miss their CPU ceiling on a loaded host; they pass on rerun, and timings match `main`. - CI runs the laws with a fresh random seed on each run, as the tool intends. That seed found two of the bugs here, one of them also on `main` (`password=` over `(API_KEY: <value>` leaked the value). A failure prints its seed and a replay line; when it also fails on `main`, it is not the PR's bug and should be filed, not block (the tool's own guidance). ## Risks Medium, limited to memory notes. Redaction keeps more text in one place: a quoted marker (`password=[redacted]`) is accepted when no letter or digit follows its closing quote. A key that ends its line still takes the next line's first word as its value, as on `main`, including a heading over prose (`## Deploy token:` over `Rotate every password.`). This PR first narrowed that read to keep prose readable, and three security-review rounds each found a credential that the narrower read left readable (`password:` over `hunter2`, then `hunter2 # comment`), so the read is `main`'s again. For the same reason a key that ends a JSON string after other text (`{"title": "## Deploy token:"}`) takes the string's closing quote as its value's opening one, as on `main`: a quoted value may start with `,`, `}` or `]` (`{"password": ", hunter2"}`, which a guard for that case left readable in 48 of 60 probed forms). The guards refuse at least what `main`'s guard refuses, by construction: they also count what `main`'s key read and `Bearer` read take out (`MAIN_READS`), apart from the passes (Option B, chosen after four security reviews in a row found a credential that a rule leaving a key's value out let through). A differential fuzz of 400,000 texts and edits, cookie headers included, found no text or edit that `main`'s guards refuse and these accept. The cost is `main`'s: a note that leaves a value out behind its key's own quote (`Set "API_KEY=" before deploy.`) or behind Markdown (`**Token:** rotate monthly.`) is refused, and so is any edit below such a quote, whose read runs to the next quote in the text. The same holds for a marker that main's key read takes as a value: a quoted marker after a key (`"password": "[redacted]"`, `credential: "[redacted]", word`) and a `Bearer` marker after a key (`Authorization: Bearer [redacted]`) are refused, as on `main`. Redaction still returns those lines unchanged. A cookie header's marker (`Cookie: [redacted]`) is refused too, as on `main` (Option A, third round): every rule that accepted it left a way to glue a value onto it behind its closing quote, which the shell joins onto the header. Every other change redacts more or refuses more. ## Decisions and follow-ups - **Kept as on main:** a cookie header with no value (`Set-Cookie:` alone on a line) is still redacted and refused, and the guards refuse a cookie header's marker (`Cookie: [redacted]`) and a signed URL's marker alone (`?sig=[redacted]`). The guard refuses at least what main's regex passes refuse, and these refusals expose no secret. The oracle states both as limits. - **Follow-up:** a cookie header after other text inside a JSON string (`"Send the Cookie:\nnext"`) has a raw frame, so its value runs to the end of the note. That loses text and never leaks. Fixing it needs the reader to track which string the header sits in. - **Follow-up PR (decided on this PR, Option B):** redaction leaves text that the shell joins onto a quoted cookie header readable: a word or a second quoted segment glued behind its closing quote (`curl -H "Cookie: a=b",sid=<value>`, `curl -H "Cookie: a=b","<value>"`). `main` does the same in raw and once-escaped text. In twice-escaped text `main` removes it only because its pattern cannot find the header's closing quote and reads to the end of the text; this PR finds that quote at every depth. The guards refuse such a line at every depth, because they count the header's value. The fix needs the cookie reader to tell a quote that closes a shell word from one that closes a JSON list item (`["Cookie: a=b","Accept: */*"]`), with its own oracle law (a shell argument's value runs to the end of its shell word). - **Next:** more oracles across the codebase. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `high` • Cost: `$37.71`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=high costs=37.71 -->
Summary
Cuts the agent-facing text in this repo roughly in half, turns the rules a machine can check into lints and tests, and fixes the stale facts and drift that the prose was hiding.
docs/AGENTS.mdgoes from 37 KB to 5.9 KB, and the project skills from 184 KB to 87 KB. Two real bugs surfaced on the way and are fixed here: Terminal-Bench results have not reached BigQuery since the repo rename, and agent shells picked up the wrongbun.Background
Most of AGENTS.md and the skills restated the Makefile, scripts and workflows, and much of that had drifted (wrong exit codes, file:line references that no longer point at the code, a nonexistent
TB_SAMPLE_SIZE, abun addfix that breaks the lockfile rule). Rules that only live in prose also get skipped. This follows the pstackno-prosemethod: delete what restates code, encode what a check can enforce, keep only judgment.What stayed was decided on evidence, not byte counts:
Implementation
New checks (each shown failing on a real violation before the prose went):
local/no-emoji-in-jsx,local/require-html-sink-audit,local/no-history-service-double, andno-consoleinsrc/node(mirrored in.oxlintrc.json);scripts/agent-rule-lints.test.tscovers them.scripts/agentDocsLayout.test.ts: agent docs live where agents look, user docs are indocs.json.scripts/formalStopRetrySkill.test.ts: every function, path and test title the formal-stop-retry skill andStopRetry.tlacite exists insrc/, and no new caller of the retry path goes unnamed. 11 of 15 oldfile:linereferences had drifted.scripts/verifyXumFeatures.test.ts: verify-xum feature files keep their shape, are all indexed, links and anchors resolve, and cite symbols instead of line numbers.tests/bugbash/reproRules.test.ts: repro tests carrybugbashplus a bug ID,mock-onlywhen they send[mock:prompts, and an issue number onknown-failure.scripts/crap/check.ts: the CRAP report no longer says "or test it" when the score counts complexity only.Text: AGENTS.md keeps the project, commands, public-action and design-judgment sections plus main's iOS section. Rules about one file moved into a comment at that file. Each skill now holds its judgment calls and guardrails and points to the script, header or Makefile target for the rest.
.xum/agents/exec.mdis gone (it repeated the Commands section).Fixes:
terminal-bench.yml: both BigQuery upload steps checkedgithub.repository == 'coder/mux'and have been skipped on every run since the rename (the 2026-08-17 runs still uploaded; every sampled run from 2026-09-14 skipped both). They now checkcoder/xum..xum/tool_envputs the pinnedbunfirst on PATH, and.xum/initgeneratessrc/version.tsfor new worktrees: most eval runs lost time to both.Validation
make formal-check: 6 of 6 configs as expected after the formal-stop-retry edits.file:linecitation) and passes on the tree.Risks
Low; mostly text. The lints are new errors: if one fires on code this branch did not see, its message names the replacement. The
configpath filter inpr.ymlnow includes three skill folders, so Markdown-only edits there run the unit lane. If the BigQuery upload fails on the next run, it is a secrets or permissions question for coder/xum, not this change.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high• Cost:$32.28