agentleFS
Sathvikar01Sathvikar01/Agent-engineering-skills/agent-testing/SKILL.md

agent-testing

Skill3 starsChanged 38 days agoMITView on GitHub

Build a risk-based test pyramid and CI verification strategy for an AI-agent runtime. Use when implementing agent tests across deterministic admission/state, schemas, tool contracts, integration, trajectories, eval suites, adversarial behavior or restart/recovery. Do not use for ordinary test-first coding without an AI runtime, writing a gold-set scoring strategy alone, or browser automation unrelated to agent behavior.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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:

    Test the system that interprets and executes model proposals.

    line 12

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

Agent Testing

Test the system that interprets and executes model proposals. Spend model calls only where model variability matters. Red-green-refactor mechanics belong to general TDD practice (or a TDD skill, if available); agent-evals owns task population, rubrics and statistical release thresholds.

Allocate tests by ownership and risk

LayerVerifyPreferred execution
UnitPolicies, permissions, money/units, budgets, state transitionsPure deterministic tests; boundary/property cases
SchemaRequired/extra fields, variants, malformed/refused output, versionsFixtures and real validators
Tool contractInputs/results/errors, pagination, timeout, idempotencyFakes plus adapter tests against resettable sandbox
IntegrationAdmission→executor→receipt→state, trust and tenant boundariesScripted model/tool responses
TrajectoryAllowed call dependencies, no forbidden effects, terminationRecorded/scripted traces; model runs for selection behavior
Eval suiteOutcome quality, grounding, abstention and stochastic variationVersioned representative/adversarial model tasks
Restart/recoveryCrash windows, unknown commit, resume budgets and stale approvalFault injection with durable fake/provider sandbox
E2E/browserActual user approval/diff, cancellation and visible outcomeBrowser/E2E only when that surface exists

Construct evidence before implementation

  1. Map each high-impact invariant to an executable deterministic test. Cover both deny and allow paths and assert persisted state/no-effect outcomes; matching an error string alone is weak evidence.
  2. Stub the model at integration boundaries using valid, malformed, unsupported, adversarial and refused outputs; include empty/missing fields, valid shape with invalid meaning, invented IDs, contradictory evidence, timeout, repeated/no-progress answers and unsupported tool requests. Stub tools with realistic envelopes and uncertain commit results. Verify the production validator/executor, not a test-only implementation mirroring it.
  3. Test properties across generated inputs where practical: denial never mutates state; a key/payload pair commits at most one effect under supported semantics; unknown variants fail closed; tenant A cannot read/write B; budgets never increase on resume. Reenter terminal controllers and resume terminal checkpoints: they must reuse the outcome or reject, without another dispatch/effect; new work needs a distinct logical task. A fake cannot prove a provider's idempotency guarantee—test the real adapter contract too.
  4. Inject crashes before/after effect commit and before receipt persistence; race concurrent approvals/state updates; expire grants and credentials; simulate rate limits, slow tools, poisoned results and evaluator disagreement. Reconcile uncertainty before replay.
  5. For stochastic model behavior, use the eval specification, pinned versions, held-out fixtures, repeated runs and meaningful thresholds. Assert permitted dependencies/effects rather than an exact transcript or chain-of-thought. Do not use an LLM grader for arithmetic, schema or permission predicates.

Gate and report

  1. Put cheap deterministic tests in the fast CI path; run integration/contract checks at relevant change boundaries, and expensive eval slices on prompt/model/tool/retrieval changes. Use a larger release suite for consequential regressions. Keep critical authority checks fail closed even if a model-eval dependency is unavailable.
  2. Reset sandbox fixtures, preserve failing seeds/trajectories, and distinguish a product failure from infrastructure failure or flaky stochastic scoring. Do not silently mark skipped/unavailable tests passed. Report commands, versions, counts and uncovered risks before completion.

Deliver a risk-to-test matrix, test fixtures/fakes, runnable checks at the changed layer, CI triggers and exact verification evidence. Select browser tools only for actual user flows. Do not require a sprawling test system for an advisory single call.

Add deterministic provenance/reconciliation tests: unknown IDs and retrieved-but-unused citations cannot support claims; explanation facts must match admitted structured decisions. Include a repairable candidate reaching fresh validation/admission and an unrepairable candidate causing no effect. Execute fault fixtures against the surrounding validator/controller, not merely model promises. agent-development-workflow coordinates run/debug/correct/review; a TDD skill, if available, keeps the implementation mechanics.

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.