agentleFS
leszekgruchalaleszekgruchala/buddy/skills/curate-tests/SKILL.md

curate-tests

Skill6 starsChanged 4 months agoApache-2.0View on GitHub

Curate unit and integration tests for a named target; add tests for uncovered behaviors, refactor existing tests, and remove clearly useless ones without losing coverage. Keep the current request in this skill; route new requests by their own scope.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 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.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Keep the current request in this skill.

    line 8
  2. Distinctive:

    Do not ask the user before a refactor or removal that section 10 permits.

    line 21
  3. Distinctive:

    Use documented test commands.

    line 22
  4. Very specific:

    Write this record to .ai/worklog/<yyyyMMdd>_<work-name>/test-changes.md, or to the run's worklog folder when there is one:

    line 23
  5. Distinctive:

    When a test exposes a suspected production defect, keep it visible through the project's skip or expected-failure convention with the …

    line 36

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

Curate tests

Keep the current request in this skill. Do not activate another Buddy skill without user or develop direction. Workers return to their caller. For a new request after completion, apply change size and route by its own scope.

Resolve .ai/ paths from the user's workspace root (its git root), never from the skill or plugin directory.

Model selection

Apply change size and model selection; recommend balanced.

Rules

  1. Require a target: a file, module, behavior, or change. Ask once if it is ambiguous.
  2. Load test design before reading the target, and apply it. A direct call also applies section 10, curate existing tests, to the target's tests. When every behavior is covered and nothing needs curation, report that and stop.
  3. Change only test code, test support, and the record in rule 6.
  4. Do not ask the user before a refactor or removal that section 10 permits. Record it instead.
  5. Use documented test commands. Never install dependencies; report and stop if required.
  6. Write this record to .ai/worklog/<yyyyMMdd>_<work-name>/test-changes.md, or to the run's worklog folder when there is one:
Test changes:
- Test design: loaded `curate-tests/test-design.md`
- Protected before: <behaviors the target's tests protected before your edits>
- Protects: <behaviors the tests now protect; every item of Protected before stays>
- Existing tests: <none, or each refactored or removed test, what changed, and its section 10 reason>
- Redundant: <none, or each doubtful test you kept, and why>
- Break check: <for each behavior in Protects: what you broke, the failing test, and the clean restore; or why it is not practical>
- Final check: <abstractions raised or extended, duplicates removed; or no issues>
  1. When a test exposes a suspected production defect, keep it visible through the project's skip or expected-failure convention with the reason, and report it.

Output

Report behaviors now protected, tests refactored or removed with the reason, behaviors skipped with the reason, suspected production defects, the record path, and the test command with its result. Return the report and stop; never transition into implementation.

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.