agentleFS
rakaarwakyrakaarwaky/agents-arwaky/skills/aes-architecture/aes-testing-suite/SKILL.md

aes-testing-suite

Skill0 starsChanged 26 days agoMITView on GitHub

Generates contract to E2E suites plus benches. Use when adding package tests, coverage, perf.

We split this skill into the rules it gives an agent

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

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every rule is verified by the language run command (see each HOW-TO § Verify).

    line 80
  2. Distinctive:

    Test-type reference (prefix · directory · scope · speed · runs when):

    line 97
  3. Distinctive:

    Ask these questions in order.

    line 118
  4. Very specific:

    Write contract_ (seam), then unit_ (happy / edge / error), then integration_ (real DI).

    line 138
  5. Very specific:

    Write dogfood_ (live service.

    line 139
  6. Very specific:

    Write bench_<subject> in benches/ (Rust: also register [[bench]] in Cargo.toml).

    line 140
  7. Distinctive:

    Run the language verify command, then confirm coverage targets met.

    line 141
  8. Very specific:

    Hand-rolled timing loops: use pytest-benchmark / criterion / vitest/benchmark.

    line 186
  9. Distinctive:

    Dogfood tests without skip logic: must auto-skip in CI when service unavailable.

    line 188

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

aes-testing-suite

Purpose: Give every layer one test layout — tests in tests/, benchmarks in benches/, never inline in the source file; the file-name prefix is the virtual folder. Audience: The agent creating or validating a module/crate/package test suite. Scope: Python, Rust, and TypeScript test and bench files — contract, unit, integration, smoke, e2e, acceptance, and bench with flat prefix naming.

The test types decide which prefixes, which directories, and which coverage floor apply. Rules, templates, section contracts, and Verify blocks live in the language HOW-TUs under references/.

LanguageFocusBody ruleHOW-TO
PythonTest suiteFlat prefix naming; tests/ + benches/; no inline testsreferences/HOW-TO-MAKE-PYTHON-TESTING.md
RustTest suiteFlat prefix naming; tests/ + benches/; no inline testsreferences/HOW-TO-MAKE-RUST-TESTING.md
TypeScriptTest suiteFlat prefix naming; tests/ + benches/; no inline testsreferences/HOW-TO-MAKE-TYPESCRIPT-TESTING.md

The test chain:

contract_ (seam exists) → unit_ / integration_ (behaviour + wiring) → dogfood_ (live service validation, skip in CI) → smoke_ / e2e_ / acceptance_ (app + requirement) → bench_ (nightly)

Each prefix answers one question. A test in the wrong directory or with the wrong prefix is the defect this skill exists to prevent.


Invariants

Every rule is verified by the language run command (see each HOW-TO § Verify). Layout, placement, and naming are manual — the runner does not police file location.

LayerRule
PlacementTests live in tests/, benchmarks in benches/ — never inline in src/.
NamingFlat prefix IS the virtual folder: <type>_<subject>.<ext> / bench_<subject>.<ext> — no subdirectories.
BenchmarksUse the language benchmark library (pytest-benchmark, criterion, vitest/benchmark) — never hand-rolled timing; Rust registers [[bench]].
ContractProves the protocol/trait/interface implementation exists before behaviour tests.
UnitHappy path, edge cases, error paths — one public function each.
IntegrationUses the real DI container / entry point (module, crate, or package wiring).
E2EHits the real CLI/API/entry point and asserts on real output.
AcceptanceMaps 1:1 to a business requirement (FRD/PRD ID).
SmokeCompletes in under 5 seconds.
CoveragePer-layer floor: capabilities 70%, agent 60%, utility 50%.
VerifyLanguage run command → green.

Test-type reference (prefix · directory · scope · speed · runs when):

PrefixDirectoryScopeSpeedRuns when
contract_tests/Protocol/trait/interface impl existsmsEvery PR
unit_tests/One public functionmsEvery PR
integration_tests/Module / crate / package + DI wiringms–sEvery PR
dogfood_tests/CLI against live service/session; skip if unavailables–minLocal only; skip CI
smoke_tests/App boots + responds<5sEvery PR
e2e_tests/Full request lifecyclesEvery PR (critical path)
acceptance_tests/Business requirement metsEvery PR / release gate
bench_benches/Performance regressions–minRelease gate / nightly

Coverage targets: capabilities 70% · agent 60% · utility 50%.

Split directory tree, config file, and run commands: read the language HOW-TO — do not restate them here.


Diagnostic Tree

Ask these questions in order. The first "No" dictates your next action.

  1. Are tests out of src/ and under tests/ / benches/?
    • No → move them; inline tests are the first defect to clear.
  2. Are file names flat <type>_<subject> prefixes with no subdirectories?
    • No → rename; the prefix is the virtual folder.
  3. Does a contract test prove the seam exists?
    • No → write contract_* first, then behaviour tests.
  4. Do integration/e2e tests use real wiring and real output (not mocks)?
    • No → rebuild against the real DI container / entry point.
  5. Do benches use the benchmark library (Rust: [[bench]] registered)?
    • No → switch; hand-rolled timing is not a benchmark.
  6. Does the language run command pass and coverage meet 70/60/50?
    • No → add missing cases, re-run.

Workflow

  1. Analyze module / crate / package structure and identify untested public API.
  2. Write contract_ (seam), then unit_ (happy / edge / error), then integration_ (real DI).
  3. Write dogfood_ (live service; skip gracefully in CI), then smoke_, e2e_, and acceptance_ mapped to FRD/PRD IDs.
  4. Write bench_<subject> in benches/ (Rust: also register [[bench]] in Cargo.toml).
  5. Run the language verify command, then confirm coverage targets met.

Verification

Machine Checks

pytest --tb=short                                   # Python
cargo nextest run --workspace --lib --tests -j 2     # Rust
npx vitest run                                      # TypeScript

# Plus per HOW-TO: pytest-benchmark / cargo bench / vitest bench, and coverage (Python/TS).

```text

A pass means every suite is green. Prefix discipline, real-vs-mock wiring, and FRD/PRD mapping are **manual** — see HOW-TO § Rules.

### Human Checks

A machine pass does not mean the suite is right. Requirement coverage, smoke budget, and "real output, not mocks" still need a reader (HOW-TO § Rules).

---

## Pre-flight Checklist

- [ ] Language run command exits 0.
- [ ] Every touched HOW-TO's `Verify` block was executed.
- [ ] No inline tests in `src/`; everything under `tests/` or `benches/`.
- [ ] Flat prefix naming; no subdirectories.
- [ ] Contract test proves the protocol/trait/interface implementation exists.
- [ ] Acceptance tests reference FRD/PRD IDs; smoke runs in <5s.
- [ ] Benchmarks use the proper library (Rust: `[[bench]]` registered).
- [ ] Coverage meets 70/60/50 for capabilities/agent/utility.
- [ ] Related skills considered for the layer under test.

---

## Common Mistakes (Anti-Patterns)

The runner covers green/red. These need a reader (HOW-TO § Rules):

- **Inline tests in `src/`**: move to `tests/`; source stays clean.
- **Subdirectories under `tests/`**: the prefix IS the folder — keep it flat.
- **Hand-rolled timing loops**: use `pytest-benchmark` / `criterion` / `vitest/benchmark`.
- **Mocked integration tests**: integration uses the real DI wiring; e2e asserts on real output.
- **Dogfood tests without skip logic**: must auto-skip in CI when service unavailable; never break CI.
- **Acceptance tests without FRD/PRD IDs**: requirement traceability is the point.
- **Restating HOW-TO rules in SKILL.md**: delegate — this file only routes.

---

## Related Skills

- `aes-capabilities`
- `aes-agent`
- `aes-utility`
- `aes-lint-arwaky`

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.