corpus-check
Skill149 starsChanged 3 months agoApache-2.0View on GitHub
Validate a txcript parsing, discovery, or search change against every real agent session on this machine — old-vs-new parity, no panics, and release-build timings. Use before landing changes to discover(), Store loaders, codecs, or the search index.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
If the old behavior is reachable from the new code (e.g.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Corpus check
Unit fixtures cover the shapes we thought of; the ~570 real sessions across
harnesses on this machine cover the shapes that actually exist. Any change to
discover(), a Store loader, a codec, or search::Index gets validated
against the full local corpus before it lands. This was done ad hoc twice
(discover-vs-load meta parity on Jul 6 2026; index determinism on Jul 9 2026)
— this skill is the distilled procedure.
Procedure
- Write a throwaway harness as an example binary (
examples/, modeled onexamples/search_bench.rs), not a test — it needs the real home-directory corpus, which tests must never touch. Delete it (or leave it untracked) when done unless the user wants it kept. - Compare old vs new on identical inputs. Two options, cheapest first:
- If the old behavior is reachable from the new code (e.g. full
load()vs the newdiscover()fast path), compare both paths in one binary. - Otherwise build a baseline binary from
main(git stash/git worktree) and diff the two binaries' outputs on the same corpus. Parity means field-level equality of the results (Metafields, message counts, hit ordering), not just "both succeeded". Report mismatches with session id + harness so they can be inspected individually.
- If the old behavior is reachable from the new code (e.g. full
- Count failures explicitly. Unreadable stores/sessions are skipped by
design in
local::sessions()— capture the skip count and check it didn't grow versus baseline. Zero panics is a hard gate (overflow checks are on in release for exactly this). - Time it in release.
--releaseonly; report per-harness before/after wall clock, since the corpus is dominated by one or two harnesses and an aggregate number hides regressions in the small ones.
Known traps (each cost real debugging time)
- The current session mutates mid-scan. The session recording this very
run grows while you read it, so two enumerations differ. Exclude the live
session id, or scope comparisons with a harness/cwd filter that avoids it
(
--from <fixture-harness>was the Jul 9 fix). - Bookkeeping-only files have no real timestamp. Sessions with no
conversational records fall back to
Utc::now()forMeta.timestamp, so they "mismatch" between any two runs. Treat timestamp diffs on such files as expected; verify by checking the file has no conversational records before calling it a regression. - Fixture/synthetic sessions live in the corpus (greeting fixtures, cross-harness duplicates sharing one id). Ties and duplicates are where ordering nondeterminism hides — don't dedupe them away when checking determinism; run the pass twice and require identical output.
Report
State: corpus size per harness, parity result (mismatches with ids, or none), skip/failure counts vs baseline, per-harness timings before/after, and whether the throwaway harness was deleted or kept.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

