---
description: Write a hound JSON spec and run it against the running dev server to verify API endpoints (status, partial body match, headers).
argument-hint: <endpoints or feature to test>
allowed-tools: Bash(mole *), Bash(hound *), Write, Read
---
API-test: **$ARGUMENTS**

1. Confirm the server: `mole check http://localhost:10500`. If it is down, tell me to run `/serve` first and stop.
2. Write a hound spec to `/tmp/dp_api_test.json` in the form:
   `{"tests": [{"name": "...", "method": "GET", "path": "/api/...", "expect_status": 200, "expect_body": {...}, "expect_headers": {"content-type": "json"}}]}`
   covering the endpoints I named. `expect_status` is exact, `expect_body` is a partial dict match, `expect_headers` is a case-insensitive substring match. For authenticated routes, include the session or `X-API-KEY` header as needed.
3. Run `hound /tmp/dp_api_test.json --base-url http://localhost:10500`.
4. Report pass or fail per test with the response detail. All tests must pass for API work to be complete.
