# Try Oracles

Pick a project you know well and let your coding agent investigate one function, feature or troublesome interaction. Paste the prompt below to start.

> [!NOTE]
> Outline draft for review. The prompt downloads the explore skill from GitHub’s `main` branch; the skill installs the latest npm release.

## What to expect

Start with a codebase you can run and change locally. Pick a part to investigate, or ask the agent to suggest one.

1. The agent reads your code, runs small experiments and shows you what it finds.
2. You decide what the code should do. The agent writes an oracle to check those rules across many inputs and sequences of operations.
3. When you confirm a bug, the agent makes the oracle catch it, fixes the code and reruns the checks.
4. The agent tests the oracle by changing a copy of your code and checking whether the oracle notices. You can ask it to explain how the oracle caught a bug using the actual code and failing case.

When a problem turns up, you get something concrete to inspect: the actions that produced it, what should have happened and what your code actually did.

The agent installs the test packages it needs and adds an oracle file, with test configuration if needed. You can stop at any time and decide later whether to set up Oracles more broadly.

## Paste this prompt

```text
Show me what oracle testing with @tanstack/oracles can find in this repository.

Download https://raw.githubusercontent.com/TanStack/oracles/main/packages/oracles/skills/oracles-explore/SKILL.md

Read it in full and follow it to explore this repository with Oracles.
```

## A few words you’ll encounter

- **Probe:** a focused experiment to learn how the code behaves.
- **Law:** one promise about how the code should behave across a set of inputs or situations.
- **Model:** a simplified simulation of how the code should behave, written independently of the production implementation.
- **History:** one test case: an input or sequence of operations, usually generated randomly through property-based testing.
- Link unfamiliar terms to the [glossary](./glossary.md) as they become relevant.

## Watch a session

- Recording to add: a short narrated investigation on a real codebase.
- Show the evidence, a human decision, a counterexample and the resulting change.
- Reuse the recording for social media; keep the written prompt usable without it.

## After your first session

- Use the oracle to test the area more thoroughly, then ask the agent to port the tests into your existing unit-test suite. Keep regression cases that fail before the fix and pass afterward.
- [Keep the oracle](./guides/adopt-oracles.md) alongside your current tests. The next agent can check changes against the behavior you agreed on here.
- For other languages: describe the currently available adaptation path before adding runnable instructions; do not imply identical tooling support.

<!-- Sources: oracles-explore, package README, troubleshooting reference, PR #7 and Kyle’s release-blog draft. -->
