agentleFS
skillsynchqskillsynchq/txcript/.claude/skills/corpus-check/SKILL.md

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.

  • In this repository2 other files it gives its agents.

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
  1. Very specific:

    If the old behavior is reachable from the new code (e.g.

    line 23

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Write a throwaway harness as an example binary (examples/, modeled on examples/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.
  2. 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 new discover() 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 (Meta fields, message counts, hit ordering), not just "both succeeded". Report mismatches with session id + harness so they can be inspected individually.
  3. 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).
  4. Time it in release. --release only; 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() for Meta.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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.