> For the complete documentation index, see [llms.txt](https://taskflow-1.gitbook.io/taskflow-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://taskflow-1.gitbook.io/taskflow-docs/environments.md).

# Environments

Expands the environment table in `deployment.md` with the data, secrets, and access rules for each environment. Release mechanics themselves live in `deployment.md`; this file is about what may live where.

|                  | `dev`                                      | `staging`                      | `prod`                                     |
| ---------------- | ------------------------------------------ | ------------------------------ | ------------------------------------------ |
| Data             | Synthetic seed data                        | Anonymized snapshot of prod    | Real data                                  |
| Snapshot refresh | On demand (`make seed`)                    | Monthly, as a restore drill    | —                                          |
| Secrets          | Local file outside the repo                | Secrets manager, staging scope | Secrets manager, prod scope                |
| Who can deploy   | The developer                              | Any engineer                   | Manual pipeline approval (`deployment.md`) |
| Direct DB writes | Via the local `api-service` (seed tooling) | Migrations only                | Migrations only                            |

## Data rules

* Production data never enters `dev`. Debugging against real data happens in `prod` tooling with user IDs, or not at all.
* Anonymization for `staging` rewrites every `users.email` to a `@example.invalid` address before the snapshot is usable. Email remains the only PII column, so it is the only column the anonymizer touches.
* `staging` sends no real email: the worker's mail sink is a local outbox file, the same pattern the demo implementation uses.

## Configuration rules

* Configuration comes from environment variables; the same container image runs in every environment.
* A required variable missing in `prod` fails startup — fail closed, never fall back to a default credential or endpoint.
* Feature flags default to off in `prod`. A flag older than 90 days is a cleanup finding in review.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://taskflow-1.gitbook.io/taskflow-docs/environments.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
