agentleFS
fabioc-alohafabioc-aloha/Alex_ACT_ONE/skills/corpus-qa-sweep/SKILL.md

corpus-qa-sweep

Skill0 starsChanged 9 days agoMITView on GitHub

Run a QA sweep across an entire corpus instead of one sample: instrument the real output boundary, assert machine-checkable invariants, sweep every item, then triage every flag before believing it. Works on doc sites, generated pages, chart batches, report sets, prose, and formatting. Use when a change to a renderer, template, generator, or shared component affects many outputs, when someone asks to check all the pages or wants no surprises before a release, or when a single-sample pass feels like thin evidence. For judging one rendered artifact against a failure catalog, use render-verify instead.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Treat a flag as a hypothesis about the product, and the harness as the first suspect.

    line 80
  2. Distinctive:

    Only after the item is in front of you is the finding a defect.

    line 90
  3. Distinctive:

    When the product deliberately rewrites content, a raw comparison reports loss that did not happen.

    line 96

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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-qa-sweep: check every page, not one page

Why this skill exists

One artifact passing is not evidence that the corpus passes. A renderer change that looks perfect on the page you happened to open will meet content you did not imagine: a doc that is 90% tables, a heading that ends in the word you used as a marker, a version number in the middle of a sentence.

The second reason matters more, and is the part people skip. On a first sweep, most flags are defects in the harness, not the product. A sweep that reports findings without triaging them manufactures work and erodes trust in the next sweep. The triage step is not optional polish; it is the skill.

When to invoke

  • A change to a renderer, template, generator, stylesheet, or shared component affects many outputs at once.
  • Someone says "check all the pages", "use more test cases", "make sure there are no surprises", or asks for a pre-release regression pass.
  • A single-sample verification passed and the evidence feels thin.
  • A corpus has grown and nobody knows whether old items still hold.

Do not use this for a single artifact. One chart, one figure, one report goes to render-verify, which judges a rendered artifact against a failure catalog using human or model judgment. The two compose: sweep to find candidates, then judge one.

Step 1 — instrument the real output boundary

Capture what the system actually emits, at the last point before a human or a consumer sees it. Never re-run your own logic as the oracle; that only proves the logic agrees with itself.

ArtifactCapture at
Rendered page textThe DOM after render, not the source markdown
Spoken or streamed outputThe API the product calls, intercepted (speechSynthesis.speak, a socket send, a write handler)
ChartComputed style and bounding boxes, not the chart spec
Generated documentThe emitted file bytes, not the template
Formatting and lintThe formatter's own output, not your model of it

Interception beats reimplementation because it survives refactors and cannot silently drift from the shipped path.

Step 2 — write invariants a machine can check

An invariant is a claim that must hold for every item. Prefer claims that fail loudly over claims that need a human to read them.

FamilyExample
Count agreementEmitted skip markers equal skippable elements in the page
BoundsNo emitted chunk exceeds the size budget
Forbidden contentNo raw URL, no contentless fragment, no placeholder-only output
CoverageThe last block of each document is reached
Non-lossNo item that should be included is silently dropped
IdempotenceRunning twice produces the same result

Count agreement is the strongest of these. "Twelve markers for twelve tables" is checkable; "the output looks reasonable" is not.

Step 3 — sweep the whole corpus

  • Enumerate from the manifest, index, or router, never from a hand-written list. A hand-written list drifts and quietly stops covering new items.
  • Batch the run to stay under tool and timeout limits.
  • Bound every wait, and report whether the bound was hit. A truncated run looks exactly like a clean run with fewer results. Emit a guardHit flag and treat it as invalidating, not informational.

Step 4 — triage every flag before believing it

Treat a flag as a hypothesis about the product, and the harness as the first suspect. Look at the offending item before filing anything.

SymptomSuspect the harness first
Count mismatch on the largest items onlyThe run truncated; raise the bound and re-measure
Content appears "missing"The product legitimately transformed it, and you compared raw to transformed
One extra matchYour pattern matched real prose that happens to look like a marker
A flag that only fires on one itemRead that item; corpora contain legitimate oddities

Only after the item is in front of you is the finding a defect. Report harness false positives explicitly. They are evidence about the sweep's own reliability and they stop the next person re-chasing them.

Step 5 — compare representation-insensitively

When the product deliberately rewrites content, a raw comparison reports loss that did not happen. Normalize both sides to the part that must survive.

Letters-only normalization is usually enough: strip everything except a-z, lowercase, then compare a distinctive slice. It tolerates rewrites, whitespace, and punctuation while still catching genuinely dropped content.

Step 6 — report clean count and violations separately

State how many items were swept, how many were clean, and what each violation was. Separate product defects from harness defects in the report. A sweep that says "7 violations" when 4 were its own bugs is worse than no sweep.

Worked example

The sweep that produced this skill, over a documentation shell's read-aloud feature:

Result
Corpus67 documents enumerated from the manifest
Captured24,583 emitted chunks, by intercepting the speech API
InvariantsCount agreement, size bound, forbidden content, coverage, non-loss
Product defects found2 (meaning-destroying collapse; contentless fragments)
Harness false positives4 (truncated run, over-broad marker pattern, two raw-vs-transformed comparisons)

Four of six first-pass findings were the harness. That ratio is the reason Step 4 exists.

Anti-patterns

Anti-patternCorrection
Verifying one sample and calling the corpus coveredSweep the enumerated corpus; the interesting content is in the item you did not open
Re-implementing the product's logic as the test oracleInstrument the real boundary; self-agreement proves nothing
Filing every flag as a defectTriage first. Read the offending item
Asserting on internal state instead of emitted outputState can be correct while output is wrong
An unbounded or silently bounded waitBound it and report whether the bound was hit
Comparing raw source to transformed outputNormalize both sides to what must survive
Reporting a violation count without separating harness bugsIt inflates the number and discredits the next sweep

Related skills

  • render-verify — judge one rendered artifact against a failure catalog. Use it on the items this sweep flags.
  • docs-shell — the shell whose manifest enumerates the corpus when sweeping a documentation site.
  • figure-generator — contract tests pinning headline numbers, the same invariant idea applied to one generated figure.

Would Revise If

Revise this skill if any of the following fires:

  • A sweep run by this method reports violations that are later found to be entirely harness defects, meaning Step 4 was performed but did not work.
  • A corpus-wide sweep passes and a user still hits a defect of a class the invariants in Step 2 were meant to cover.
  • The harness-first triage posture causes a real product defect to be dismissed as a false positive.
  • Enumerating from a manifest proves impossible for a corpus this skill is invoked on, and Step 3 needs a discovery fallback.
  • Zero sweeps are run by this method in the window, which would mean the skill is decorative for its intended audience.

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.