Live survey315 models · 14 providers · 23,592 auditsAudited implement · SAFE →What changedHow we verifyllms.txt

Agent skill · Audited from source

Nw Test Optimization

skill · nWave-ai/nWaveMIT licenceAudited 14 Oct 2026 · source 1a864ec81cde

★ 617pushed 27 days ago
✓SAFEGrade B · 89/100 · 14 Oct 2026 · 1a864ec
617repo stars · whole nWave-ai/nWave

Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 1a864ec81cde and found no filesystem, network or shell access and no hard-coded secrets. What it does: Methodology for minimizing test count while maximizing behavioral coverage - behavior definition, anti-pattern catalog, consolidation patterns, stopping criterion, coverage-preserving validation

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “Nw Test Optimization (nWave-ai/nWave)”. Retrieved 14 Oct 2026. https://modelsatlas.com/skills/nwave-ai/nw-test-optimization

Trust audit

Audit 0.4.1 · source read 14 Oct 2026

Trust score89/100✓SAFE B
0 critical0 high0 medium0 low0 info

SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.

What the source does

  • FilesystemNone observedNo reads or writes in the source
  • NetworkNone observedNo outbound calls in the source
  • ShellNone observedNo commands run in the source
  • DependenciesPinnedNothing floats
  • SecretsNone foundNo keys in source

Five audit layers

LayerWhat we checkResultFindings
L0 ProvenanceRepo owner, licence, archive status, activityPASS0
L1 Static sourceSecrets, path traversal, supply chain, hidden codeNA0
L2 InstructionsPrompt injection, authority framing, hidden directivesPASS0
L3 InventoryThe files and declarations match the sourcePASS0
L4 SandboxRun in isolation and watch behaviourSKIPPED why0

Gates applied: no behavioural pass.

Findings (0)

No findings at any severity. We re-audit when the source changes.

Audit 0.4.1 · source sha 1a864ec81cde · 14 Oct 2026Report an issue or request a re-scan

Provenance

Who published it, and what the verdict is pinned to

  • PublishernWave-ai GitHub organizationOwner of the repository this skill is read from
  • Source foldernWave-ai/nWave/nWave/skills/nw-test-optimizationThe exact folder we audited
  • LicenceMITAs the repository states it
  • Commit pinned for this verdict1a864ec81cdeA new audit runs when the source changes
  • Repository statusNot archivedLast push 27 days ago
  • Sandboxed runNot runSkills are read, not executed; layer L4 is skipped

What it tells the agent

Full source on GitHub ↗

Its description: Methodology for minimizing test count while maximizing behavioral coverage - behavior definition, anti-pattern catalog, consolidation patterns, stopping criterion, coverage-preserving validation

---
name: nw-test-optimization
description: Methodology for minimizing test count while maximizing behavioral coverage - behavior definition, anti-pattern catalog, consolidation patterns, stopping criterion, coverage-preserving validation
user-invocable: false
disable-model-invocation: true
---

# Test Optimization Methodology

## Mission

> Minimize tests, maximize value, reduce feedback time, maintain quality.
> (Ale, 2026-04-28: "Bisogna minimizzare i test, massimizzare il valore per ridurre il tempo di feedback, mantenendo la qualità.")

This skill operationalizes that mission. Apply during DELIVER COMMIT, scheduled audits, or `/nw-optimize-tests` invocations.

## 1. Behavior Definition (the loose joint, closed)

The phrase "distinct behavior" in the test budget formula `max_unit_tests = 2 × distinct_behaviors` is the loose joint that lets test counts inflate. Close it with these rules.

### 1.1 What IS a behavior

A behavior is an **observable outcome via a port** (driving or driven):

- A return value from a driving-port call given specific inputs
- A state change visible through a driving-port query after an action
- A side effect at a driven-port boundary (call sequence + payload)
- An exception raised from a driving port
- A business invariant that holds across a class of inputs

### 1.2 What is NOT a behavior

- Phrase presence in markdown — that is one **document contract**, not one behavior per phrase
- AST shape (try/except wrapping, decorator presence, import order) — that is source structure, not runtime behavior
- Type system facts (subclass relations, attribute presence) — Python language guarantees, not domain behaviors
- Internal data shape (dataclass field assignment, dict structure) — language guarantees
- Internal method calls (mock.assert_called_with) — implementation, not outcome
- Source-shape compliance — runtime behavior on each supported environment IS the behavior, not the source it was compiled from

### 1.3 Counting rules — concrete cases

| Surface | Behaviors |
|---------|-----------|
| Markdown skill with required phrases | 1 (the file conforms to the contract) |
| 5 skill files × 30 required phrases each | 5 (one per file), NOT 150 |
| Function with N input variations, same assertion shape | 1 (parametrize the variations) |
| Function with N error types, distinct messages and paths | N |
| Adapter that calls a driven port with ordered payload | 1 per call site, asserted once |
| Pure dataclass storing fields | 0 (Python guarantees this) |
| ABC with 5 abstract methods | 0 (Python guarantees abstract enforcement) |

### 1.4 Re-derivation procedure

Before counting tests in a target scope:

1. List the driving ports the scope exposes
2. For each driving port, list the observable outcomes it produces (return values, state, side effects, exceptions)
3. Collapse outcomes that vary only by input value into one parametrized behavior
4. Count the result. That number × 2 = budget.

If your count exceeds 2× behaviors, you have either testing theater or genuinely high behavioral surface — investigate which before adding mass.

## 2. Banned Anti-Patterns

Each pattern below is an automatic block at review. Counter-example shows the right test.

### 2.1 Language-Guarantee Tests

Tests that assert what the language already guarantees.

```python
# BANNED — Python @abstractmethod already enforces this at instantiation
def test_config_port_interface_defines_required_methods():
    assert issubclass(ConfigPort, ABC)
    assert hasattr(ConfigPort, "get_timeout_threshold_default")

# CORRECT — test runtime behavior of a concrete adapter
def test_config_adapter_returns_default_when_unset():
    adapter = EnvironmentConfigAdapter(env={})
    assert adapter.get_timeout_threshold_default() == DEFAULT_THRESHOLD
```

### 2.2 AST-Shape Tests

Tests that parse source and assert structural shape.

```python
# BANNED — tests source structure, not runtime behavior
def test_no_bare_typing_self_import():
    src = Path("src/des/domain/value_objects.py").read_text()
    tree = ast.parse(src)
    # ... assert try/except wraps the import ...

# CORRECT — test runtime behavior on each supported version (matrix in CI)
def test_value_objects_import_succeeds_on_python_310():
    # Run pytest under Python 3.10 in CI matrix
    from des.domain.value_objects import OrderId
    assert OrderId("abc").value == "abc"
```

Source compliance is a CI matrix concern, not a unit test.

### 2.3 Trivial Dataclass-Storage Tests

```python
# BANNED — Python @dataclass guarantees field assignment
def test_turn_limit_config_stores_limits_by_task_type():
    config = TurnLimitConfig(quick=20, deep=60)
    assert config.quick == 20
    assert config.deep == 60

# CORRECT — test the behavior that uses the config
def test_turn_counter_aborts_quick_task_at_limit():
    counter = TurnCounter(TurnLimitConfig(quick=20, deep=60))
    for _ in range(20):
        counter.increment("quick")
    assert counter.is_exhausted("quick")
```

If the dataclass has invariants (validation, derived fields), those ARE behaviors — test them.

### 2.4 Mock-Asserting-Mock

```python
# BANNED — mock returns what you told it to; you are testing unittest.mock
def test_repository_returns_user():
    mock_repo = Mock()
    mock_repo.get.return_value = User(name="Alice")
    result = mock_repo.get(1)
    assert result.name == "Alice"

# CORRECT — test the application service that uses the repository
def test_user_service_returns_active_user():
    repo = InMemoryUserRepository(users=[User(id=1, name="Alice", active=True)])
    service = UserService(repo)
    assert service.get_active(1).name == "Alice"
```

### 2.5 Parametrize-Inflation

One contract becomes N tests by parametrizing every variant.

```python
# BANNED — 150 tests for "the markdown contains required phrases"
@pytest.mark.parametrize("phrase", PHRASES_30)
@pytest.mark.parametrize("skill_dir", SKILLS_5)
def test_skill_contains_phrase(skill_dir, phrase):
    md = (skill_dir / "SK

Excerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.

Install

Pinned to the audited commit 1a864ec

Download folder ↗
uv run pytest <scope> -p no:randomly --tb=no -q | tail -3
uv run pytest <scope> --cov=<package> --cov-report=term-missing -p no:randomly | tail -20
uv run pytest <scope> -p no:randomly --tb=short
uv run pytest <scope> --cov=<package> -p no:randomly | tail -5
uv run mutmut run --paths-to-mutate <scope>

Commands as the repository documents them: shown, never run by us. Our verdict covers commit 1a864ec81cde only.

Works in

The author has not said which agents this skill supports, and we have not tested it in any.

Audit history

Every audit, every source change

  1. ✓SAFE B 89 / 100

    first audit · source 1a864ec81cde

README badge

For maintainers · shows the latest audit

ModelsAtlas: SAFE BMODELSATLASSAFE · B
[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/nwave-ai/nw-test-optimization/badge.svg)](https://modelsatlas.com/skills/nwave-ai/nw-test-optimization/)

The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.

Add this badge to your README

[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/nwave-ai/nw-test-optimization/badge.svg)](https://modelsatlas.com/skills/nwave-ai/nw-test-optimization/)

Questions about Nw Test Optimization

What does the Nw Test Optimization skill do?
AI agents that guide you from idea to working code, with you in control at every step.
Is Nw Test Optimization safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Nw Test Optimization access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
How current is this page?
The grade is for one exact copy of the source (1a864ec81cde), read on 2026-10-14. The repository is watched, and a new audit runs when it changes — this is the first audit.

Sources

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.