> ## Documentation Index
> Fetch the complete documentation index at: https://kowshik-93.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# feature-tests (Phase 4)

> A test mapped to every acceptance criterion, run until green. Commits; never pushes.

<Info>
  **Invoke:** `/feature-tests AB#1234` · **Side effects:** commits, never pushes · **Reads:**
  `context.md`, `plan.md`
</Info>

## What it does

1. Determines the test framework/command from `tests.framework` / `tests.run_command`, or
   auto-detects (`package.json` → jest/vitest/mocha, `pyproject.toml` → pytest, `*.csproj` →
   dotnet test, `go.mod` → go test). **Polyrepo:** does this **per touched repo** — each can use a
   different framework.
2. Writes at least one test per acceptance criterion (a test that would fail if the criterion were
   unmet), plus at least one test per changed public unit — the traceability map this produces
   feeds `feature-verify` and the PR body.
3. Runs the suite until green, iterating on the code if the *implementation* is wrong.

<Warning>
  If a test can't pass because the **requirement** is ambiguous or unachievable as written, this
  phase stops and surfaces it — it does not delete or dilute a test to force a green run. A
  passing suite that doesn't actually check the AC is worse than an honest red.
</Warning>

## Output

Reports tests added, the AC → test mapping, and the final suite result verbatim (per repo in
polyrepo) — including anything still red, since `feature-verify` and you need the truth, not a
green checkmark.
