agentleFS
gualaskgualask/clean-flow/skills/cf-test/SKILL.md

cf-test

Skill1 starsChanged 27 days agoMITView on GitHub

Report assertion-quality findings for pending tests, a named history range, explicit tests, or the existing suite. Use when the request asks to review assertion quality, coverage against invariants, brittle or over-specified tests, flaky or nondeterministic tests, implementation-detail coupling, negative assertions, or invalid domain states representable by the project's types or schemas. Route ambiguous expected behavior to cf-mr-wolf.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No invariant or observable contract, no candidate.

    line 22
  2. Very specific:

    Read references/context-gate.md.

    line 28
  3. Very specific:

    Read references/assertion-quality.md and run every declared lens group.

    line 29
  4. Distinctive:

    When it already exists and the request is about it, work through it under the same contract instead of running the Flow.

    line 36
  5. Very specific:

    Create or update no other repository file, including any other .cflow/* file and todo files.

    line 37
  6. Very specific:

    Lenses: every lens from references/assertion-quality.md, marked reporting, silent, or not applicable with the absent condition.

    line 45

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

Report assertion-quality candidates against observable contracts and invariants. Do not edit repository files other than the batched pass's recap, or turn test style preferences into candidates.

Scope

Resolve exactly one test scope:

  • Pending tests, the default when no target is named and the working tree holds test changes: existing test files selected by staged, unstaged, and untracked work together.
  • The existing suite, when no target is named and the working tree holds no test change: every existing test file. A clean checkout does not make a request about tests unanswerable; it makes the whole suite the subject.
  • A named history range: existing test files selected by the requested commits, range, or branch.
  • Explicit tests: the named test files or directories, whether changed or unchanged.

Treat every selected test file as a primary test and inspect it as a whole. Treat changed production files in the same change set, production files directly imported by explicit tests, and identified authoritative sources as contract surfaces. Requirements, product or domain documentation, and acceptance criteria are authoritative sources only when they name the tested behavior; path proximity alone is insufficient. Contract surfaces provide evidence but are not themselves review targets.

Exclude generated, vendored, ignored, fixture-only, snapshot-output, and deleted files unless an authoritative source makes one directly relevant.

Hard Gates

  • No invariant or observable contract, no candidate. A preference is not an invariant.
  • Report one candidate per test case or test table, or per duplicated setup with its copies. Do not turn one candidate into a repository-wide pattern inventory.

Flow

  1. Resolve primary tests, contract surfaces, and authoritative sources by path without loading the corpus in full.
  2. Read references/context-gate.md. Run the installed-local context gate against every primary test and already-selected contract surface. Follow its policy exactly; when it is batched, read references/batched-execution.md and follow it.
  3. Read references/assertion-quality.md and run every declared lens group. For local, run them sequentially. For batched, every batch applies every lens group. The shared reference owns batching and completion.
  4. De-risk every candidate against the cited primary test, contract surface, and authoritative source. Inspect only the cited evidence needed to accept, narrow, or exclude it.
  5. Route once after the complete pass. Route ambiguous expected behavior, and a domain-model redesign such as making invalid domain states unrepresentable, to cf-mr-wolf.

Artifacts

  • Owns .cflow/cf-test-recap.md: the batched pass's recap, written under the Recap File contract in references/batched-execution.md. It is the pass's one repository write.
  • When it already exists and the request is about it, work through it under the same contract instead of running the Flow.
  • Create or update no other repository file, including any other .cflow/* file and todo files. Persisting candidates in a todo file belongs to cf-docs.

Output Format

Return only:

  • Scope: resolved scope, primary tests, contract surfaces, authoritative sources, and exclusions.
  • Context budget: measured files, LOC, estimated tokens, and selected policy.
  • Lenses: every lens from references/assertion-quality.md, marked reporting, silent, or not applicable with the absent condition.
  • Findings: candidates grouped by the action their lens names, in the order remove, rewrite, strengthen, redesign, and by severity within each group. A test case that does not pay for itself is the answer to a different question than a test case that covers too little, and burying the first under the second answers neither. Each candidate carries id, primary test, claim, evidence, invariant or observable contract, concrete regression or behavior-preserving change, severity, confidence with its basis, false-positive check, route (cf-mr-wolf or none), status candidate, and unknowns.
  • Handoff: destination mapped to candidate ids, recommended first action, or none.
  • Result: clear or candidates found, opening with how many test cases are proposed for remove; then state that confirmation is still needed, that no files were modified except the recap when written, and the next action.

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.