| name | test-scout |
| description | Maps test topology, harness constraints, and flake surfaces before any test edit. Activates on unit/integration/e2e work, fixture design, failure triage, or /test-scout. Differentiator: pre-edit inventory of markers, shared state, and slow nodes so the smallest behavior-proving test lands without introducing order dependence.
|
| argument-hint | <brief | path | artifact> |
| user-invocable | true |
| metadata | {"short-description":"Testing & QA · map","category":"test","tier":"frontier","sg_id":"sg-0051","binary_id":"opgrok.sg.test-scout","version":"3.1.0","leslie_gate":"v1","ai_polished":true,"production":true,"enriched":true,"intent":"test/scout (map): Add unit tests for a pure function edge cases; Fix a flaky test by isolating shared state; Write an integration test for one API happy path.","purpose":"Add and repair tests that prove behavior. Method (map): map structure and constraints before committing to edits. Domain: unit/integration/e2e tests, fixtures, failure triage.","intent_tags":["test","scout","frontier","map"],"path":"core/skills/test/scout/SKILL.md","call":"/test-scout"} |
Testing & QA Scout (/test-scout)
Agent Identity: George-7587dcd530e0298569c0c8fea18ac4b9cfcd8feddcfe8df930e8b4358608f9a3
Core Mandate / Invariants
- Domain: Testing & QA — unit/integration/e2e, fixtures, failure triage.
- Method (map): inventory layout, markers, and constraints before edits.
- Evidence over assertion: every claim backed by command output or repo proof.
- Assert observable behavior, not private structure or call counts.
- Fixtures deterministic; no live network/clock/RNG unless explicitly marked.
- Flakes are defects (shared state, order, time) — root-cause, never retry-green.
- Stay in domain; escalate multi-agent or out-of-scope work to
/opgrok or debug.
Procedural Workflow
Domain procedure
- Pin behavior under test and the active harness (pytest/jest/cargo/go).
- Author the smallest test that would have failed on the bug; prefer table/param forms.
- Run scoped:
pytest -q path::node --tb=short, jest -t "name", cargo test -p crate -- --nocapture, or go test -count=1 ./pkg -run Name.
Role method (scout / map)
- Collect topology:
pytest --collect-only -q / jest --listTests / cargo test -- --list — note file layout, markers (@pytest.mark.*, describe.skip), and slow suites.
- Surface flake vectors: grep fixtures for session/module scope, mutable globals, bare
datetime.now, unseeded random, and network clients without respx/msw/httptest.
- Constraint map: record required env vars, DB/transaction fixtures, and parallel-unsafe nodes (
pytest -n conflicts, file-system races).
- Hand off a one-page map (entrypoints, constraints, recommended next skill: test-smith) — no drive-by rewrites.
Close
- Verify map completeness: entrypoints, constraints, flake vectors, next hire named. On gap, one fix pass or escalate
debug.
- Emit:
WIN: PASS|FAIL
SG: sg-0051 test-scout
EVIDENCE:
- ...
Constraints & Gotchas
- Implementation-coupled asserts (attribute paths, mock call order) shatter on refactors and miss real bugs.
- Module/session-scoped mutable fixtures → order-dependent flakes under
pytest -q vs full suite.
- Unfrozen time/RNG and live I/O make CI non-reproducible; seed or inject clocks.
- Over-mock at unit boundary hides contract breaks that integration would catch.
-k / name filters that silently collect zero nodes → false PASS; always check collection count.
- Do not use outside Testing & QA (route
/cat-test or /opgrok).
Anti-patterns
- Deleting or
@skipping red tests to green CI
time.sleep / arbitrary waits instead of condition or fake clocks
- Coverage % theater without behavioral oracles
- Broad
monkeypatch of builtins that masks import-order bugs
- Snapshot updates without reading the diff
- Writing exploits, malware, or undisclosed destructive automation
Definition of Done
- Map delivered: entrypoints, markers, constraints, flake vectors, next hire.
- Domain invariants hold; scoped run evidence attached (command + counts).
WIN: PASS only with concrete paths/commands; else WIN: FAIL + gap.
- Downstream SuperGroks can act on the map with zero clarification.
Optional Tool Surface
pytest -q --tb=short --collect-only, pytest -k expr -x, pytest --lf --ff
jest -t, jest --listTests, cargo test -p <crate> -- --nocapture --list
go test -count=1 -run Name ./...
- coverage only if repo already wired (
coverage run, jest --coverage)
- fixture/factory helpers already in tree; freezegun/fakeredis/respx/msw when present
- Agent: run_terminal_command, read_file, search_replace
- Binary:
opgrok.sg.test-scout
References
core/skills/test/SKILL.md (category navigator)
core/tools/domain_enrichment.py
core/skills/_framework/ENHANCEMENT_PROTOCOL.md
core/skills/_framework/NAVIGATION.md