# Set up your project

Docs for TrueQuery 0.1.6. Run init once to detect your stack, record your team's definitions in DATA.md, and get a baseline receipt.

Run setup once in each project, from your agent:

```
/truequery init
```

In Muse Code, ask for setup in your own words, or load the skill with `/skill truequery`. Codex doesn't have the skill yet.

## What it does

1. **Detects your stack and SQL dialect,** from your dbt or SQLMesh config. A plain folder of SQL works too.
2. **Writes `DATA.md`,** and seeds `contracts/` from any schema YAML. Anything it can't know is left as a `TODO`, not guessed.
3. **Asks a few questions,** skipping what the repo already answers, each with a suggested default: what counts as revenue, which accounts are test or internal, how money is stored, which date an order belongs to, and who owns corrections.
4. **Runs a first review.** That receipt is your baseline.

It keeps your `DATA.md` unless you pass `--force`, and never overwrites an existing contract, even with `--force`.

## What goes in DATA.md

`DATA.md` holds your team's definitions, so nobody is asked the same question twice. Every later request follows them. [Your definitions](https://analytically.ai/truequery/docs/definitions.md) covers what happens when a request disagrees.

## Without an agent

In a terminal or a CI script, after `pip install truequery`, `truequery init` does only the mechanical part: it detects the stack and writes the files, with no questions.

```bash
truequery init
```

Keep the `tq-config` block it writes. That's where the settings live; edit the rest freely.
