maximus-eval-and-test
Skill1 starsChanged 4 months agoMITView on GitHub
Test and eval strategy for a project: unit, integration, e2e, and for AI features the PR / nightly LLM-judge / production-canary pyramid. Use for 'add tests', 'set up CI', 'design eval', 'measure quality', 'evaluate the agent'. Comparing local models: maximus-slm-eval.
In this repository49 other files it gives its agents.
- core/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- file-opsSkill
- maximus-agent-designSkill
- maximus-ai-cost-controlSkill
- maximus-ai-data-pipelineSkill
- maximus-ai-fluency-for-buildersSkill
- maximus-ai-product-specSkill
- maximus-ai-safety-governanceSkill
- maximus-ai-ux-patternsSkill
- maximus-brainSkill
- maximus-build-featureSkill
- maximus-chain-of-verificationSkill
- maximus-code-reviewSkill
- maximus-contact-intelligenceSkill
- maximus-counterparty-discoverySkill
- maximus-debug-incidentSkill
- maximus-deep-research-proSkill
- maximus-deep-researchSkill
- maximus-design-specSkill
- maximus-devops-shipSkill
- maximus-fine-tuningSkill
- maximus-fintech-paymentsSkill
- maximus-investigative-researchSkill
- maximus-k3-model-selectionSkill
- maximus-k3-self-hostingSkill
- maximus-literature-reviewSkill
- maximus-llm-model-selectionSkill
- maximus-local-research-assistantSkill
- maximus-local-research-assistantSkill
- maximus-mlops-deploySkill
- maximus-ollama-opsSkill
- maximus-openclaw-localSkill
- maximus-people-finder-recruiterSkill
- maximus-people-finderSkill
- maximus-plan-implementationSkill
- maximus-prompt-engineeringSkill
- maximus-python-scientificSkill
- maximus-rag-pipelineSkill
- maximus-replit-handoff-proSkill
- maximus-slm-evalSkill
- maximus-slm-local-finetuneSkill
- maximus-slm-local-stackSkill
- maximus-slm-tool-callingSkill
- maximus-transaction-analystSkill
- maximus-write-articleSkill
- memory-keeperSkill
- skill-templateSkill
- web-researchSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
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
- Distinctive: line 17
Before shipping an AI-powered feature (agent, RAG, multi-step tool use) to production — the standard unit test is necessary but nowhere …
- Distinctive: line 37
No live model required for the check.
- Distinctive: line 53
Identify what "correct" means: before writing a single test.
- Distinctive: line 79
Web service: every public endpoint has at least one happy-path and one auth-failure integration test.
- Distinctive: line 80
Fintech: every money-handling code path has a test asserting correct cents and currency.
≈ “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.
Files
Maximus — Evaluation & Testing Strategy
Tests are not coverage; tests are evidence. The point isn't to fill a coverage bar — it's to be able to say, with a straight face, "we know this works." For AI features the bar is higher: a single-prompt unit test cannot prove a multi-step agent worked end-to-end. The horse pulls; the rider checks the load before, during, and after the haul.
When to use
- Starting a new project or feature and deciding the testing strategy.
- The user asks: "add tests", "set up CI", "design eval", "test plan", "how do we measure quality", "evaluate the agent".
- Before shipping an AI-powered feature (agent, RAG, multi-step tool use) to production — the standard unit test is necessary but nowhere near sufficient.
The testing pyramid (deterministic code)
Bottom to top, fast to slow, many to few:
- Unit tests — pure functions, single classes. Run in milliseconds. Exercise branches, boundary conditions, error paths. The bulk of the test count.
- Integration tests — multiple components together, real dependencies (DB, queue, in-process), no network. Run in seconds. Exercise the interaction points where unit tests can't see.
- End-to-end tests — full stack, including the user surface. Run in tens of seconds to minutes. Few in number; cover the critical user journeys only. Playwright/Cypress for web; HTTP-driven for API-only.
- Smoke tests — handful of E2E tests that run against staging or production after deploy. Tell you "the deploy didn't break the building".
Rough ratio: many units, fewer integrations, very few E2E. If the ratio is inverted, the suite is slow and brittle.
The three-tier eval pyramid (AI features)
A single response to a single prompt cannot evaluate a multi-step agent. Use three tiers, each at the right stage of the release pipeline:
- PR tier — Tool-call regression (cheap, deterministic, fast)
- Recorded "cassettes" of the model's intended tool calls for each test case.
- On every PR: re-run the agent against the same inputs with stubbed tools; assert the same tools were called in the same order with valid arguments.
- No live model required for the check; runs in seconds; blocks merge on structural diff.
- Catches the "agent now calls the wrong tool" regression that user-facing output checks would miss.
- Nightly tier — LLM-as-judge across a golden dataset (moderate cost)
- A curated dataset of ~50–200 representative tasks with expected outcomes (not exact strings — outcomes).
- Nightly run executes the agent end-to-end against each task; an LLM judge scores correctness, completeness, and tone against a rubric.
- Track the pass rate over time; alert on a >5-point drop.
- Catches phrasing and reasoning regressions deterministic tests miss.
- Production tier — Canary + error budget (continuous)
- Sample live traces in production; score online with the same rubric or a lighter heuristic.
- Define an error budget on task success and tool accuracy.
- New versions ship at 5% canary traffic first; auto-rollback if the budget burns.
The three tiers exist because the failure modes are different and only one is cheap.
Procedure
- Identify what "correct" means before writing a single test. For a function: defined I/O. For a feature: acceptance criteria. For an agent: an outcome rubric. If you cannot articulate correct, no test will tell you it's right.
- Map test types to behaviors:
- Pure logic → unit tests.
- Cross-module interactions, persistence, queue handling → integration tests.
- Critical user journeys (login → purchase → confirmation) → E2E.
- AI tool selection and ordering → tool-call regression (PR tier).
- AI output quality → LLM-as-judge (nightly).
- AI behavior in the wild → production canary.
- Build the harness early. A project without a smoke test on day 1 will not have one on day 30. The first test is the hardest to add.
- Wire CI on day 1. GitHub Actions or equivalent: install → lint → typecheck → unit + integration on every push. Nightly job for slow suites and AI nightly tier. Slow gates run after merge to main, not on PR.
- Set quality gates explicitly.
- Coverage gate (if used): minimum on changed lines, not total — total coverage is a vanity metric.
- Lint and typecheck: zero new errors.
- Eval pass rate (AI): defined floor; merges blocked below it.
- Add tests at the point of change. New code lands with new tests in the same PR. Refactor PRs add tests for previously untested behavior they touch.
- Treat flaky tests as bugs. Flake erodes signal until no one trusts the suite. Quarantine + ticket + fix; do not retry into green.
Tooling — common stacks
- Python:
pytest+pytest-cov+hypothesis(property tests) +pytest-asyncio; integration via testcontainers orpytest-postgresql; E2E viahttpx/playwright. - JavaScript / TypeScript:
vitestorjestfor unit/integration;playwrightfor E2E;mswfor HTTP mocks. - Go: stdlib
testing+testify;httptestfor HTTP handlers; testcontainers-go for integration. - AI evals: Braintrust, Inspect, LangSmith, or a hand-rolled harness — anything that records traces and supports LLM-as-judge with a versioned rubric.
Domain-specific test priorities
- Web service: every public endpoint has at least one happy-path and one auth-failure integration test; rate-limit behavior tested; error envelopes tested.
- Fintech: every money-handling code path has a test asserting correct cents and currency; webhook handler tests for valid, invalid signature, and duplicate event; reconciliation test against a fixture batch.
- Scientific / ML: schema validation tests on data inputs; deterministic-output test (same seed + same data → same result, byte-equal where feasible); end-to-end smoke pipeline runs on a tiny sample in CI.
- DevOps / IaC:
terraform validateandplanin CI; policy tests via OPA/Conftest where applicable; smoke test on a deployed staging environment after every infra change. - AI agents: tool-call regression for every supported task pattern; golden dataset large enough that a 5% drop is statistically meaningful (≥50 cases); production sampling rate set so daily counts are usable.
Gotchas
- Coverage as a goal — high coverage with thin tests proves nothing. Tests exist to fail when behavior changes; if mutating the code under test doesn't fail any test, the test is decorative.
- Skipping tests during a "rush" — the bug you ship has a half-life longer than the rush.
- Mocks all the way down in integration tests — you're testing your mocks, not the system. Use real components for integration; reserve mocks for boundaries you don't own.
- One enormous E2E test per feature — slow, brittle, debug-hostile. Several focused tests beat one mega-test.
- AI eval = "ask GPT-4 if the output is good" without a rubric — you're measuring vibes. Versioned rubric, frozen judge model, tracked over time.
- Flaky tests retried until green in CI — that's how a real regression escapes for weeks.
- Eval dataset that the model has seen — leakage destroys the signal. Curate, hold out, refresh.
Output
A test plan document (or PR adding tests) covering: layer-by-layer test list, CI workflow file(s), eval harness scaffold for AI features, and a defined set of quality gates. Final chat summary lists: layer counts, CI job names, gate thresholds, and the first 5 tests to write if starting from zero.
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
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.

