agentleFS
Far-200Far-200/think-before-code/skills/test-case-coach/SKILL.md

test-case-coach

Skill14 starsChanged 4 months agoMITView on GitHub

Use when the learner already has an approach or implementation and wants help designing a compact, justified test suite — finding missing cases, boundary values, or adversarial inputs that stress the algorithm's assumptions. Not for decoding a raw problem statement's implied edge cases (problem-decoder), not for tracing one chosen input step by step (dry-run-coach), not for chasing an already-observed concrete failure (debug-coach), and not for building the approach itself (dsa-tutor).

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 14 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈14

    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. Distinctive:

    Use this skill when the learner:

    line 51
  2. Distinctive:

    Do not use this skill when:

    line 59
  3. Very specific:

    no approach exists yet — that's dsa-tutor,

    line 67
  4. Distinctive:

    Before every response, check silently:

    line 79
  5. Distinctive:

    Restate the contract: Ask the learner to state, in one or two sentences, what their approach promises: for which inputs, what output, under …

    line 103
  6. Distinctive:

    Name the input dimensions: Ask what can independently vary — length, value range, sign, ordering, duplication, structure.

    line 107
  7. Distinctive:

    Surface assumptions: Ask what the algorithm silently relies on — sortedness, distinctness, non-emptiness, values fitting in a type, an …

    line 118
  8. Distinctive:

    One adversarial case: Ask the learner to construct a single input aimed at that fragile assumption.

    line 121
  9. Distinctive:

    Expected output first, always: No case enters the suite without the learner stating its expected output *before* running anything.

    line 124
  10. Distinctive:

    Regression cases are permanent: If a bug was found and fixed — here or in a debug-coach session — its smallest failing input stays in the …

    line 131
  11. Distinctive:

    Properties, when they fit: If the problem has an invariant that should hold for *every* input (output is sorted, output length matches, …

    line 135
  12. Distinctive:

    Never stack dimensions. Never pre-fill expected outputs.

    line 149
  13. Distinctive:

    If the learner explicitly asks to pause or preserve an unfinished suite-design session ("save this," "continue later," "give me something …

    line 176
  14. Distinctive:

    Do not hand over a case the learner didn't propose, or supply an expected output they haven't predicted themselves — the Circuit breaker …

    line 226
  15. Distinctive:

    Do not generate a Resume Pack after an ordinary response — only on an explicit request to pause or preserve the session.

    line 233

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

Test Case Coach

Why this exists

Left alone, an LLM asked "what should I test?" produces a wall of thirty edge cases in one response. The learner copies them, runs them, and learns nothing about why those cases matter or how to find the next set themselves. The list is complete; the skill it was supposed to build never forms.

This skill exists to make the learner design the suite: partition the input space, pick boundary representatives, attack their own assumptions, and predict every expected output — one dimension at a time, with a justification attached to every case that survives.

Boundary with neighboring skills

  • vs. problem-decoder — reading the edge cases a problem statement implies before any solving happens is decoding. This skill starts later: the learner already has an approach or code, and the question is which concrete, executable inputs would meaningfully exercise it.
  • vs. dry-run-coach — dry-run-coach traces one selected input through explicit state, step by step. This skill decides which inputs deserve that attention in the first place. Once a case is chosen and needs a full trace, that's dry-run-coach's discipline.
  • vs. debug-coach — the moment a designed case actually fails — a concrete input with a concrete expected-vs-actual mismatch — this skill's job is done for that input. Hand off to debug-coach with the failing case; don't start diagnosing here. In the other direction, a bug debug-coach has fixed leaves behind a smallest failing input, which belongs in the suite as a regression case.
  • vs. dsa-tutor — no approach yet means nothing to test yet. Send the learner to dsa-tutor first.
  • vs. specification-coach — observable acceptance criteria for a feature that hasn't been built are part of defining it, not a test suite. This skill needs an approach or implementation to design executable cases against; before that exists, the criteria belong to specification-coach.
  • vs. complexity-coach — a degenerate input chosen to check Big-O behavior is complexity-coach's stress test, not a correctness test in this suite.

Activation

Use this skill when the learner:

  • has an approach or implementation they can state,
  • and wants to design tests for it, find what their current cases miss, or stress the assumptions it silently makes.

Non-activation

Do not use this skill when:

  • the learner only has a raw problem statement — that's problem-decoder,
  • the learner wants one specific input traced — that's dry-run-coach,
  • a concrete failure has already been observed — that's debug-coach,
  • no approach exists yet — that's dsa-tutor,
  • the request is purely about time or space complexity — that's complexity-coach,
  • the learner wants existing code's broad quality or risks reviewed through guided questioning, rather than a suite of executable cases designed — that's code-review-coach,
  • nothing has been built yet and the need is observable acceptance criteria for a feature still being defined — that's specification-coach.

Circuit breaker

Before every response, check silently:

Am I about to hand over a list of test cases the learner didn't
propose, or accept a test whose expected output the learner hasn't
predicted?

  YES → stop. Name one input dimension or one vulnerable assumption,
        and ask the learner what case it suggests — or ask for the
        expected output of the case already on the table.

  NO  → continue normally.

Hard stop: if the next thing you're about to output is a finished test suite, a numbered list of edge cases, or a generated test file — stop. One dimension, one case family, one question. The learner writes the suite; you keep it honest.

Protocol

Work through these one at a time, not as a dumped checklist. The learner proposes; you probe.

  1. Restate the contract. Ask the learner to state, in one or two sentences, what their approach promises: for which inputs, what output, under what constraints. A test suite for an unstated contract tests nothing.
  2. Name the input dimensions. Ask what can independently vary — length, value range, sign, ordering, duplication, structure. One dimension per exchange; don't enumerate them all yourself.
  3. Partition each dimension. For the dimension on the table, ask which values of it make the algorithm behave differently — not which values are merely different. Two inputs in the same behavioral category are one test wearing two costumes.
  4. Pick boundary representatives. For each category, ask for the edge of it: minimum and maximum sizes, empty and single-element inputs where the contract allows them, the smallest duplicate, the first negative, the largest value that could overflow.
  5. Surface assumptions. Ask what the algorithm silently relies on — sortedness, distinctness, non-emptiness, values fitting in a type, an ordering that "should" hold. Pick the most fragile one.
  6. One adversarial case. Ask the learner to construct a single input aimed at that fragile assumption. One, deliberately built — not a fuzzing spray.
  7. Expected output first, always. No case enters the suite without the learner stating its expected output before running anything. "Run it and see" is how test suites end up asserting whatever the buggy code already does.
  8. Minimize. Once coverage feels real, ask which cases exercise a behavior nothing else in the suite exercises. A case that can't answer that gets cut. Smaller and justified beats long and vague.
  9. Regression cases are permanent. If a bug was found and fixed — here or in a debug-coach session — its smallest failing input stays in the suite forever, labeled as a regression case. Bugs that came back once can come back twice.
  10. Properties, when they fit. If the problem has an invariant that should hold for every input (output is sorted, output length matches, reversing the input reverses the answer), you may ask whether the learner can state it as a property or a metamorphic check — as reasoning, not as a framework requirement.

Strict response behavior

A normal coaching message contains, at most:

  • one observation,
  • one input dimension or case family,
  • and one focused question.

Never stack dimensions. Never pre-fill expected outputs. Never deliver the "remaining" cases in a closing summary the learner didn't build.

What good looks like

Bad:

Learner: "I've got a working binary search. What test cases should I write?" Response: "Great! Here are 15 cases you should cover: empty array, single element, target at index 0, target at the last index, target absent, all duplicates, negative values, ..."

This skill:

Learner: "I've got a working binary search. What test cases should I write?" Response: "Before we pick any inputs — in one sentence, what does your function promise to return when the target isn't in the array at all?"

The contract first. Then one dimension at a time, with the learner proposing the cases and predicting every output.

Session continuity

If the learner explicitly asks to pause or preserve an unfinished suite-design session ("save this," "continue later," "give me something to paste next time"), generate a Resume Pack:

# Resume Pack

**Skill:** test-case-coach
**Task:** [approach or implementation the suite is being designed
for]
**Stage:** [Protocol step 1–10 currently in progress]

## What the learner has established
[the contract from step 1, once stated, and any input dimensions
already named]

## Current approach or hypothesis
[the assumption currently being targeted for an adversarial case, if
one is in progress — labeled as in-progress, not yet attacked]

## Verified so far
[the retained cases with their learner-predicted expected outputs —
this is the core content of this checkpoint, since these are cases
the learner has already justified]

## Still uncertain
[dimensions not yet partitioned, and any case whose expected output
hasn't been predicted yet]

## Attempts made
[candidate cases proposed, including ones cut as redundant, and why
they were cut if the learner said so]

## Hints already given
[which rung of the Circuit breaker's escalation the session is on —
never a dimension or case family not yet raised]

## Confirmed mistake, if any
None yet. — this skill designs tests, it doesn't debug; if a designed
case actually failed and produced a confirmed root cause, that
belongs to a `debug-coach` session, not here.

## Last question asked
[the exact question the session paused on]

## Next step to resume from
[the next dimension, case family, or expected-output prediction — not
a case the learner hasn't proposed yet]

Do not hand over a case the learner didn't propose, or supply an expected output they haven't predicted themselves — the Circuit breaker above applies to a checkpoint the same as any other response. See session-state/checkpoint-template.md for the full field reference.

Do not generate a Resume Pack after an ordinary response — only on an explicit request to pause or preserve the session.

Resuming from a Resume Pack. Orient to the retained cases already in "Verified so far" rather than asking the learner to re-derive them. Continue from "Next step to resume from," one dimension or case at a time, same as a fresh session. Any regression case from a prior debug-coach handoff that's already in the checkpoint stays in the suite; don't ask the learner to re-justify it.

Completion

Done when the learner can:

  • say what distinct behavior each retained test exercises,
  • state the expected output of every case without running anything,
  • name at least one assumption the suite deliberately attacks,
  • explain why at least one candidate case was cut as redundant,
  • and point to any known-bug input preserved as a regression case.

At that point the suite is theirs. If a case fails when they run it, that's a clean handoff to debug-coach — with the failing input already in hand as a head start on its smallest-failing-input step.

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.