Files
Marius van Niekerk f0a5be9a54 docs(skills): add testing-without-tautologies skill and expose skills to Claude Code (#981)
## What

Adds a `testing-without-tautologies` agent skill under `.agents/skills/`, ported from the middleman repo and re-grounded in this codebase, and wires up `.claude/skills/` so project skills are actually discoverable by Claude Code.

## Why

Agent-written tests routinely pass without being able to fail: mirror assertions that compute the expectation with the code under test, mocks that accept anything, tests that re-prove `net/http` or FTS5 instead of our boundary contract, and — during cleanups — guard tests asserting a deleted function or file stays deleted. The skill makes the repo's testing expectations enforceable at authoring time instead of at review time, framed around one question: what production change should make this test fail?

Separately, skills here canonically live in `.agents/skills/`, but Claude Code only discovers project skills under `.claude/skills/` — so the existing `localization-paraglide` skill was invisible to Claude Code sessions. Tracked relative symlinks (the same pattern middleman uses) let both harness layouts read one skill source.

## What's agentsview-specific

- Examples target this repo's surfaces: hand-written parser JSONL fixtures (never generate expectations by running the parser), `testDB(t)`/`httptest`/`t.TempDir()`, SSE payloads, FTS query construction.
- A Backend Parity section: a contract protected by an `internal/db` test must also be protected by the `pgtest`-tagged `internal/postgres` test, since a parity bug only one backend's suite can catch will be missed.
- Codifies existing prose rules with teeth: the testify `require`/`assert` split, shell-script tests must exercise behavior rather than grep the script source, and no fabricated DB state to provoke errors (test the error-to-message mapping via a typed error instead).
- A new rule with no middleman counterpart: never write negative-existence tests. Deletion is proven by the deletion, the build, and the replacement's behavior tests; a "still-deleted" assertion protects nothing, blocks future reuse of the name, and outlives the migration it policed.

## Limitations / follow-ups

- New skills need both the `.agents/skills/` entry and a matching `.claude/skills/` symlink; nothing enforces that pairing yet.
- Symlinks require a checkout that preserves them (fine on macOS/Linux; Windows checkouts need `core.symlinks=true`).

## Where to look

- `.agents/skills/testing-without-tautologies/SKILL.md` — the skill itself; the Required Checks and Backend Parity sections carry the substance.
- `.claude/skills/` — the two symlinks.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Marius van Niekerk <mariusvniekerk@users.noreply.github.com>
2026-07-03 22:03:41 -05:00
..